porting percona's xtrabackup (currently version 1.6.4)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

porting percona's xtrabackup (currently version 1.6.4)

claudiu vasadi
Hi guys,

The last version of percona's xtrabackup utility in the ports is 1.1. I
think this is a bit old. Therefore, I have written an e-mail to the
maintainer of the port asking if it would be possible to create a newer
version. No answer yet.

Since I'm the curious type of guy, I went ahead and tried it out myself. So
far, I have this:


PORTNAME= xtrabackup
PORTVERSION= 1.6.4
CATEGORIES= databases
MASTER_SITES=
http://www.percona.com/downloads/XtraBackup/XtraBackup-1.6.4/source/

COMMENT= OpenSource version of InnoDB backup with support of Percona
extensions

MAKE_JOBS_SAFE= yes
USE_GMAKE= yes

OPTIONS= innodb51_builtin "built-in InnoDB in MySQL 5.1" off \
innodb51 "InnoDB plugin in MySQL 5.1" off \
innodb55 "InnoDB in MySQL 5.5" on \
xtradb51 "Percona Server with XtraDB 5.1" off \
xtradb55 "Percona Server with XtraDB 5.5" off

BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
bzr:${PORTSDIR}/devel/bazaar-ng



.include <bsd.port.options.mk>

.if defined(WITH_innodb51_builtin)
.endif

.if defined(WITH_innodb55)
.endif

.if defined(WITH_xtradb51)
.endif

.if defined(WITH_xtradb55)
.endif


.include <bsd.port.mk>


Problems so far:
The xtrabackup archive has no [configure script. Instead, there is 1
script, build.sh that takes care of everything (using bash). Installation
rolls down to:

> AUTO_DOWNLOAD="YES" ./utils/build.sh <engine_option> <<<--- this is where
the dialog box should kick in



My question is:
1) Is there a way to connect this script to the make (I think) command of
the ports framework and to the OPTIONS parameter from the port?



--
Best regards,
Claudiu Vasadi
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: porting percona's xtrabackup (currently version 1.6.4)

Philip M. Gollucci-2
Hi claudiu,

flo@ and pgollucci@ (myself) should be able to help as maintainers of
percona-toolkit and percona.

Let me get back to you tonight or Friday.

You might look at CONFIGURE_SCRIPT=  in the mean-time.  See Mk/bsd.port.mk.



On 02/08/12 21:36, claudiu vasadi wrote:

> Hi guys,
>
> The last version of percona's xtrabackup utility in the ports is 1.1. I
> think this is a bit old. Therefore, I have written an e-mail to the
> maintainer of the port asking if it would be possible to create a newer
> version. No answer yet.
>
> Since I'm the curious type of guy, I went ahead and tried it out myself. So
> far, I have this:
>
>
> PORTNAME= xtrabackup
> PORTVERSION= 1.6.4
> CATEGORIES= databases
> MASTER_SITES=
> http://www.percona.com/downloads/XtraBackup/XtraBackup-1.6.4/source/
>
> COMMENT= OpenSource version of InnoDB backup with support of Percona
> extensions
>
> MAKE_JOBS_SAFE= yes
> USE_GMAKE= yes
>
> OPTIONS= innodb51_builtin "built-in InnoDB in MySQL 5.1" off \
> innodb51 "InnoDB plugin in MySQL 5.1" off \
> innodb55 "InnoDB in MySQL 5.5" on \
> xtradb51 "Percona Server with XtraDB 5.1" off \
> xtradb55 "Percona Server with XtraDB 5.5" off
>
> BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
> bzr:${PORTSDIR}/devel/bazaar-ng
>
>
>
> .include <bsd.port.options.mk>
>
> .if defined(WITH_innodb51_builtin)
> .endif
>
> .if defined(WITH_innodb55)
> .endif
>
> .if defined(WITH_xtradb51)
> .endif
>
> .if defined(WITH_xtradb55)
> .endif
>
>
> .include <bsd.port.mk>
>
>
> Problems so far:
> The xtrabackup archive has no [configure script. Instead, there is 1
> script, build.sh that takes care of everything (using bash). Installation
> rolls down to:
>
>> AUTO_DOWNLOAD="YES" ./utils/build.sh <engine_option> <<<--- this is where
> the dialog box should kick in
>
>
>
> My question is:
> 1) Is there a way to connect this script to the make (I think) command of
> the ports framework and to the OPTIONS parameter from the port?
>
>
>

--
------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci ([hidden email]) c: 703.336.9354
Member,                           Apache Software Foundation
Committer,                        FreeBSD Foundation
Consultant,                       P6M7G8 Inc.
Director Operations,              Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: porting percona's xtrabackup (currently version 1.6.4)

claudiu vasadi
Hi Phillip,

I played around a bit and and had some progress. This is what I have now:

PORTNAME= xtrabackup
PORTVERSION= 1.6.4
CATEGORIES= databases
MASTER_SITES=
http://www.percona.com/downloads/XtraBackup/XtraBackup-1.6.4/source/

MAINTAINER= [hidden email]
COMMENT= OpenSource version of InnoDB backup with support of Percona
extensions

MAKE_JOBS_SAFE= yes

OPTIONS= innodb51_builtin "built-in InnoDB in MySQL 5.1" off \
innodb51 "InnoDB plugin in MySQL 5.1" off \
innodb55 "InnoDB in MySQL 5.5" on \
xtradb51 "Percona Server with XtraDB 5.1" off \
xtradb55 "Percona Server with XtraDB 5.5" off

BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
bzr:${PORTSDIR}/devel/bazaar-ng \
wget:${PORTSDIR}/ftp/wget


HAS_CONFIGURE= yes
CONFIGURE_ENV= AUTO_DOWNLOAD="yes"
CONFIGURE_WRKSRC= ${WRKSRC}
CONFIGURE_SCRIPT= utils/build.sh

# not really working, allway picking up "innodb51_builtin" (first option)
instead of the option selected
CONFIGURE_ARGS= ${OPTIONS}



.include <bsd.port.mk>




For the moment, this is my TO-DO list:
1) make $OPTIONS be delivered to the "build.sh" script (I tried via the
"CONFIGURE_ARGS" but I guess that's not the way to do it. I also read "
bsd.port.mk" but couldn;t see how I could accomplish this)
2) make the "build.sh" script run under a "bash" shell
3) pkg-plist
4) definitely more but I'm tired now


Any pointers are greatly appreciated.

--
Best regards,
Claudiu Vasadi
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: porting percona's xtrabackup (currently version 1.6.4)

claudiu vasadi
Hi guys,

A bit more progress now:

PORTNAME=    xtrabackup
PORTVERSION=    1.6.4
CATEGORIES=    databases
MASTER_SITES=
http://www.percona.com/downloads/XtraBackup/XtraBackup-1.6.4/source/

MAINTAINER=    [hidden email]
COMMENT=    OpenSource version of InnoDB backup with support of Percona
extensions

MAKE_JOBS_SAFE=    yes

OPTIONS=        INNODB51_BUILTIN    "built-in InnoDB in MySQL 5.1"
off \
                INNODB55        "InnoDB in MySQL 5.5"            off \
        XTRADB51        "Percona Server with XtraDB 5.1"    off \
                XTRADB55        "Percona Server with XtraDB 5.5"    off

BUILD_DEPENDS=  bash:${PORTSDIR}/shells/bash \
        wget:${PORTSDIR}/ftp/wget \
        automake-1.11:${PORTSDIR}/devel/automake

HAS_CONFIGURE=        yes
CONFIGURE_ENV=        AUTO_DOWNLOAD="yes"
CONFIGURE_WRKSRC=    ${WRKSRC}
CONFIGURE_SCRIPT=    utils/build.sh


.include <bsd.port.options.mk>

.if defined(WITH_INNODB51_BUILTIN)
   CONFIGURE_ARGS+=    innodb51_builtin
.endif

.if defined(WITH_INNODB55)
   CONFIGURE_ARGS+=    innodb55
.endif

.if defined(WITH_XTRADB51)
   RUN_DEPENDS+=    bzr:${PORTSDIR}/devel/bazaar-ng
   CONFIGURE_ARGS+=    xtradb51
.endif

.if defined(WITH_XTRADB55)
   RUN_DEPENDS+=        bzr:${PORTSDIR}/devel/bazaar-ng
   CONFIGURE_ARGS+=    xtradb55
.endif


NO_BUILD=        yes
NO_INSTALL=        yes




#
# install process goes here
#

.include <bsd.port.mk>




At this point, the port builds correctly according to the ${OPTIONS}
selected but am stuck @ the installation part now.
The problem is that the "build.sh" script creates a dir for each option
selected and that's where the executable(s) reside. For more info on the
dir name for each option, see
http://www.percona.com/doc/percona-xtrabackup/installation/compiling_xtrabackup.html(the
table at the very bottom).

Basically, I'm left with these points:
# 1) make install (cp the correct executables to the proper location and
adjust line 87 of "innobackupex" to point to the location of the "
xtrabackup" utility)
# 2) man pages
# 3) pkg_plist
# 4) make the port safe (if no option is selected (not by default) warn and
exit)


Any thoughts ?

--
Best regards,
Claudiu Vasadi
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: porting percona's xtrabackup (currently version 1.6.4)

Ade Lovett
On 2/9/2012 12:21, claudiu vasadi wrote:

> BUILD_DEPENDS=  bash:${PORTSDIR}/shells/bash \
>          wget:${PORTSDIR}/ftp/wget \
>          automake-1.11:${PORTSDIR}/devel/automake

Do _not_ do this (the specific devel/automake BUILD_DEPENDS).

Mk/bsd.autotools.mk defines USE_AUTOTOOLS stanzas for bringing in
autofoo-related ports.

Direct-named dependencies like this _will_ result in the port failing
should things changes in autotools land and will be summarily (not to
mention gleefully) ignored by autotools@ when doing tree-sweeps.

-aDe
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[hidden email]"