On Tue, Sep 17, 2013 at 01:40:47PM +0200, Giovanni Bechis wrote: > On 09/17/13 09:51, Giovanni Bechis wrote: > > Update to latest version, some bugs fixed and mydumper support added. > > I do not know if it is worth to add mydumper as a run dependency or if it > > is a too heavy one (it depends on glib2). > > Comments ? > > Cheers > > Giovanni > > > Missing patch, new diff. > Cheers > Giovanni and finally suppress a warning if you backup all databases with parallel jobs. ok anyone ? Cheers Giovanni
Index: Makefile =================================================================== RCS file: /cvs/ports/databases/mysql-zrm/Makefile,v retrieving revision 1.18 diff -u -p -u -p -r1.18 Makefile --- Makefile 11 Mar 2013 20:59:05 -0000 1.18 +++ Makefile 18 Sep 2013 08:17:20 -0000 @@ -2,10 +2,9 @@ COMMENT = MySQL backup scripts -V = 2.2 -DISTNAME = MySQL-zrm-$V.0 -PKGNAME = ${DISTNAME:L} -REVISION = 5 +V = 3.0 +DISTNAME = MySQL-zrm-${V}-release +PKGNAME = mysql-zrm-${V} CATEGORIES = databases perl5 HOMEPAGE = http://www.zmanda.com/ @@ -19,13 +18,18 @@ MASTER_SITES = http://www.zmanda.com/dow RUN_DEPENDS = archivers/gtar \ databases/p5-DBD-mysql \ + databases/mydumper \ security/gnupg \ textproc/p5-XML-RSS + +WRKDIST = ${WRKDIR} + NO_BUILD = Yes NO_TEST = Yes pre-configure: ${SUBST_CMD} ${WRKSRC}/usr/bin/mysql-zrm + ${SUBST_CMD} ${WRKSRC}/usr/lib/mysql-zrm/ZRM/MySQL.pm ${SUBST_CMD} ${WRKSRC}/etc/mysql-zrm/mysql-zrm.conf @perl -pi -e 's,/usr/lib,${PREFIX}/lib,g;' \ -e 's,/usr/bin/mysql-,${PREFIX}/bin/mysql-,g;' \ @@ -41,7 +45,7 @@ do-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mysql-zrm/plugins/ ${INSTALL_SCRIPT} ${WRKSRC}/usr/share/mysql-zrm/plugins/*.pl ${PREFIX}/share/examples/mysql-zrm/plugins/ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mysql-zrm/ - ${INSTALL_DATA} ${WRKSRC}/usr/share/doc/${DISTNAME}/README-* ${PREFIX}/share/doc/mysql-zrm/ + ${INSTALL_DATA} ${WRKSRC}/usr/share/doc/MySQL-zrm-${V}/README-* ${PREFIX}/share/doc/mysql-zrm/ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mysql-zrm/ ${INSTALL_DATA} ${WRKSRC}/etc/mysql-zrm/* ${PREFIX}/share/examples/mysql-zrm/ .for s in 1 5 Index: distinfo =================================================================== RCS file: /cvs/ports/databases/mysql-zrm/distinfo,v retrieving revision 1.4 diff -u -p -u -p -r1.4 distinfo --- distinfo 5 May 2010 17:03:19 -0000 1.4 +++ distinfo 18 Sep 2013 08:17:20 -0000 @@ -1,5 +1,2 @@ -MD5 (MySQL-zrm-2.2.0.tar.gz) = kTaCJB4JcTP/kNz4WBL/ig== -RMD160 (MySQL-zrm-2.2.0.tar.gz) = Mvimt5cv7V+cQuJVDaDv+sEemGE= -SHA1 (MySQL-zrm-2.2.0.tar.gz) = I0inDfKOp/aW5KlSMDyozQ/WgUY= -SHA256 (MySQL-zrm-2.2.0.tar.gz) = EDs8pdRkkXydapo63TzALEtDuTYRI7JyO8tSIZhCNGw= -SIZE (MySQL-zrm-2.2.0.tar.gz) = 149771 +SHA256 (MySQL-zrm-3.0-release.tar.gz) = BeA0KxkLZHXyIAFKEm7SE0QuJK97bjKV+pFPy0exuTE= +SIZE (MySQL-zrm-3.0-release.tar.gz) = 152711 Index: patches/patch-etc_mysql-zrm_mysql-zrm_conf =================================================================== RCS file: /cvs/ports/databases/mysql-zrm/patches/patch-etc_mysql-zrm_mysql-zrm_conf,v retrieving revision 1.3 diff -u -p -u -p -r1.3 patch-etc_mysql-zrm_mysql-zrm_conf --- patches/patch-etc_mysql-zrm_mysql-zrm_conf 5 May 2010 17:03:19 -0000 1.3 +++ patches/patch-etc_mysql-zrm_mysql-zrm_conf 18 Sep 2013 08:17:20 -0000 @@ -1,16 +1,20 @@ $OpenBSD: patch-etc_mysql-zrm_mysql-zrm_conf,v 1.3 2010/05/05 17:03:19 giovanni Exp $ ---- etc/mysql-zrm/mysql-zrm.conf.orig Thu Feb 4 01:19:25 2010 -+++ etc/mysql-zrm/mysql-zrm.conf Wed May 5 12:10:00 2010 -@@ -40,7 +40,7 @@ +--- etc/mysql-zrm/mysql-zrm.conf.orig Mon Aug 26 22:45:37 2013 ++++ etc/mysql-zrm/mysql-zrm.conf Sat Sep 14 09:39:01 2013 +@@ -40,8 +40,11 @@ # mysqldump(1) tool # This parameter is optional and default value is "raw". # -#backup-mode=raw +backup-mode=logical ++# Enable to use mydumper utility ++logical-parallel=0 ++ # Size of LVM snapshot. This parameter is optional and is required only # for "raw" backup-mode and if the MySQL database data are stored in -@@ -64,7 +64,7 @@ + # LVM logical volumes. +@@ -64,7 +67,7 @@ # directory. This parameter is optional and the default # value is "/var/lib/mysql-zrm" # @@ -19,7 +23,7 @@ $OpenBSD: patch-etc_mysql-zrm_mysql-zrm_ # Specifies how long the backup should be retained. The value can be # specified in days (suffix D), weeks (suffix: W), months (suffix: M) or -@@ -97,7 +97,7 @@ +@@ -97,7 +100,7 @@ # This parameter specifies that the program that should be used for # backup data encryption. "decrypt-option" parameter should also be specified. @@ -28,7 +32,7 @@ $OpenBSD: patch-etc_mysql-zrm_mysql-zrm_ # This specifies the option to be passed to the encryption # program specified as "encrypt-plugin" parameter for decryption. -@@ -165,7 +165,7 @@ +@@ -165,7 +168,7 @@ #Name of Socket file that can be used for connecting to MySQL # @@ -37,7 +41,7 @@ $OpenBSD: patch-etc_mysql-zrm_mysql-zrm_ # ssl-options are arguments that are passed to MySQL client commands # for SSL connection to the MySQL server. This parameter is optional and is -@@ -272,18 +272,18 @@ +@@ -272,18 +275,18 @@ # # Please read the Notes at /usr/share/doc/mysql-zrm/README-plugin-socket-copy # @@ -59,7 +63,7 @@ $OpenBSD: patch-etc_mysql-zrm_mysql-zrm_ # Set of parameters passed to the pre-backup-plugin. These parameters are # passed to "pre-backup-plugin" before a backup run for the backup set. -@@ -292,7 +292,7 @@ +@@ -292,7 +295,7 @@ # POST-BACKUP plugin: Plugin that will be called after a backup run for # the backup set. @@ -68,7 +72,7 @@ $OpenBSD: patch-etc_mysql-zrm_mysql-zrm_ # Set of parameters passed to the post-backup-plugin. These parameters are # passed to "post-backup-plugin" after a backup run for the backup set. -@@ -301,7 +301,7 @@ +@@ -301,7 +304,7 @@ # PRE-SCHEDULER plugin: Plugin that can be used to dynamically determine the # start time for a backup run. Index: patches/patch-usr_bin_mysql-zrm-backup =================================================================== RCS file: /cvs/ports/databases/mysql-zrm/patches/patch-usr_bin_mysql-zrm-backup,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-usr_bin_mysql-zrm-backup --- patches/patch-usr_bin_mysql-zrm-backup 29 Mar 2012 09:30:05 -0000 1.4 +++ patches/patch-usr_bin_mysql-zrm-backup 18 Sep 2013 08:17:20 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-usr_bin_mysql-zrm-backup,v 1.4 2012/03/29 09:30:05 giovanni Exp $ ---- usr/bin/mysql-zrm-backup.orig Thu Feb 4 01:19:25 2010 -+++ usr/bin/mysql-zrm-backup Thu Mar 29 11:05:57 2012 +--- usr/bin/mysql-zrm-backup.orig Mon Aug 26 22:45:36 2013 ++++ usr/bin/mysql-zrm-backup Wed Sep 18 10:16:58 2013 @@ -40,7 +40,7 @@ $SIG{'TERM'} = sub { $abort_flag = 1; }; $SIG{'PIPE'} = sub { &printWarning( "Communication pipe broke. Continuing\n" ); }; @@ -10,7 +10,21 @@ $OpenBSD: patch-usr_bin_mysql-zrm-backup my $MAILCMD=""; -@@ -1889,8 +1889,9 @@ sub totalSize() +@@ -1692,8 +1692,11 @@ sub doMyDumper() + if( $abort_flag ){ + &abortAndDie( ); + } +- my $command = ""; +- $command .= " ".$_[0]." --outputdir ".$inputs{"destination"}; ++ my $command = " "; ++ if ( defined $_[0] ) { ++ $command .= $_[0]; ++ } ++ $command .= " --outputdir ".$inputs{"destination"}; + if( defined $inputs{"extra-mydumper-options"} ){ + $command .= " ".$inputs{"extra-mydumper-options"}; + } +@@ -2035,8 +2038,9 @@ sub totalSize() $inputs{"synchronous-checksum"} == 1 ){ my $file = $File::Find::fullname; if( -f $file ){ Index: patches/patch-usr_lib_mysql-zrm_ZRM_Common_pm =================================================================== RCS file: /cvs/ports/databases/mysql-zrm/patches/patch-usr_lib_mysql-zrm_ZRM_Common_pm,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-usr_lib_mysql-zrm_ZRM_Common_pm --- patches/patch-usr_lib_mysql-zrm_ZRM_Common_pm 11 Mar 2013 20:59:05 -0000 1.4 +++ patches/patch-usr_lib_mysql-zrm_ZRM_Common_pm 18 Sep 2013 08:17:20 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-usr_lib_mysql-zrm_ZRM_Common_pm,v 1.4 2013/03/11 20:59:05 sthen Exp $ ---- usr/lib/mysql-zrm/ZRM/Common.pm.orig Thu Feb 4 00:19:25 2010 -+++ usr/lib/mysql-zrm/ZRM/Common.pm Mon Mar 11 20:48:14 2013 +--- usr/lib/mysql-zrm/ZRM/Common.pm.orig Mon Aug 26 22:45:36 2013 ++++ usr/lib/mysql-zrm/ZRM/Common.pm Fri Sep 13 19:01:19 2013 @@ -90,9 +90,9 @@ our $LOGGER; our $INDEX_FILENAME="index"; our $MYSQL_ZRM_CONFIG_FILE=catfile( $MYSQL_ZRM_BASEDIR, "mysql-zrm.conf"); @@ -14,7 +14,7 @@ $OpenBSD: patch-usr_lib_mysql-zrm_ZRM_Co our $TAR_EXCLUDE_OPTION=" --exclude"; our $COMPRESS_FILENAME="backup-data"; our $COMPRESS_LOGICAL_FILENAME="backup-sql"; -@@ -1349,7 +1349,7 @@ sub createConfigFile() +@@ -1350,7 +1350,7 @@ sub createConfigFile() # if( $action eq "check" ){ #return; #} Index: patches/patch-usr_lib_mysql-zrm_ZRM_MySQL_pm =================================================================== RCS file: patches/patch-usr_lib_mysql-zrm_ZRM_MySQL_pm diff -N patches/patch-usr_lib_mysql-zrm_ZRM_MySQL_pm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-usr_lib_mysql-zrm_ZRM_MySQL_pm 18 Sep 2013 08:17:20 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- usr/lib/mysql-zrm/ZRM/MySQL.pm.orig Tue Sep 17 13:35:08 2013 ++++ usr/lib/mysql-zrm/ZRM/MySQL.pm Tue Sep 17 13:35:30 2013 +@@ -599,7 +599,7 @@ sub checkForLogicalParallelBackup() + $isMyDumper = 1; + } + if($isMyDumper){ +- my $mydumper = "$MYSQL_BIN_PATH/mydumper"; ++ my $mydumper = "${LOCALBASE}/bin/mydumper"; + if(! -f $mydumper){ + &printAndDie("mydumper not found - $mydumper. Logical Parallel backup requires the mydumper tool\n"); + } Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/databases/mysql-zrm/pkg/PLIST,v retrieving revision 1.4 diff -u -p -u -p -r1.4 PLIST --- pkg/PLIST 11 Jun 2010 10:01:26 -0000 1.4 +++ pkg/PLIST 18 Sep 2013 08:17:20 -0000 @@ -36,7 +36,7 @@ lib/mysql-zrm/ZRM/SnapshotCommon.pm @man man/cat1/mysql-zrm-check.0 @man man/cat1/mysql-zrm-extract-backup.0 @man man/cat1/mysql-zrm-list.0 -@man man/cat1/mysql-zrm-manage-backup.0 +@comment @man man/cat1/mysql-zrm-manage-backup.0 @man man/cat1/mysql-zrm-parse-binlogs.0 @man man/cat1/mysql-zrm-purge.0 @man man/cat1/mysql-zrm-reporter.0