Ticket #50234: mysql-zrm-3.0.diff
File mysql-zrm-3.0.diff, 8.6 KB (added by mojca (Mojca Miklavec), 9 years ago) |
---|
-
Portfile
2 2 # $Id$ 3 3 4 4 PortSystem 1.0 5 PortGroup perl5 1.0 5 6 6 7 name mysql-zrm 7 version 2.0 8 revision 2 8 version 3.0 9 9 categories databases sysutils 10 10 maintainers bitwrangler.com:kmayer 11 11 description Zmanda Recovery Manager for MySQL … … 17 17 homepage http://www.zmanda.com/backup-mysql.html 18 18 platforms darwin 19 19 master_sites http://www.zmanda.com/downloads/community/ZRM-MySQL/${version}/Source/ 20 distname MySQL-zrm-${version} 21 checksums md5 13a82abeb181d265af553770d1db6718 \ 22 sha1 fbc38a346755fb228296af2a447cb5fd74d5d246 23 depends_lib port:p5.16-dbi \ 24 port:p5.16-xml-parser 20 distname MySQL-zrm-${version}-release 21 22 checksums rmd160 0573cfbeee98626e17411fb17bda6d76c9ad041d \ 23 sha256 05e0342b190b6475f220014a126ed213442e24af7b6e3295fa914fcb47b1b931 24 25 perl5.branches 5.22 26 # these are probably just runtime dependencies? 27 depends_lib port:p${perl5.major}-dbi \ 28 port:p${perl5.major}-xml-parser 25 29 use_configure no 26 30 patchfiles patch-mysql-zrm-backup-0 \ 27 31 patch-mysql-zrm-verify-backup-1 \ … … 31 35 destroot.keepdirs ${destroot}${prefix}/var/lib/mysql-zrm \ 32 36 ${destroot}${prefix}/var/log/mysql-zrm 33 37 38 39 post-extract { 40 file mkdir ${worksrcpath} 41 foreach d {etc usr var} { 42 file rename ${workpath}/${d} ${worksrcpath}/${d} 43 } 44 } 45 34 46 post-patch { 35 47 # Not the most efficient way to do this, but much more readable 36 48 foreach f [exec find ${worksrcpath} -type f -print] { 37 49 reinplace "s|/opt/csw/bin|${prefix}/bin|" ${f} 38 reinplace "s|/usr/bin/perl|${p refix}/bin/perl5.16|" ${f}50 reinplace "s|/usr/bin/perl|${perl5.bin}|" ${f} 39 51 reinplace "s|/usr/bin/mysql-zrm|${prefix}/bin/mysql-zrm|" ${f} 40 52 reinplace "s|/usr/lib/mysql-zrm|${prefix}/lib/mysql-zrm|" ${f} 41 53 reinplace "s|/usr/share/mysql-zrm|${prefix}/share/mysql-zrm|" ${f} … … 72 84 eval xinstall -m 444 [glob ${worksrcpath}/usr/lib/mysql-zrm/ZRM/*] \ 73 85 ${destroot}${prefix}/lib/mysql-zrm/ZRM 74 86 75 xinstall -m 755 -d ${destroot}${prefix}/share/doc/MySQL-zrm- 2.076 eval xinstall -m 444 [glob ${worksrcpath}/usr/share/doc/MySQL-zrm- 2.0/*] \77 ${destroot}${prefix}/share/doc/MySQL-zrm- 2.087 xinstall -m 755 -d ${destroot}${prefix}/share/doc/MySQL-zrm-${version} 88 eval xinstall -m 444 [glob ${worksrcpath}/usr/share/doc/MySQL-zrm-${version}/*] \ 89 ${destroot}${prefix}/share/doc/MySQL-zrm-${version} 78 90 79 91 xinstall -m 755 -d ${destroot}${prefix}/share/man/man1 80 92 eval xinstall -m 444 [glob ${worksrcpath}/usr/share/man/man1/*] \ … … 95 107 xinstall -m 755 -d ${destroot}${prefix}/var/lib/mysql-zrm 96 108 xinstall -m 755 -d ${destroot}${prefix}/var/log/mysql-zrm 97 109 } 110 111 livecheck.url http://www.zmanda.com/download-zrm.php 112 livecheck.regex {Release ([\d.]+)} -
files/patch-mysql-zrm-4
1 --- ./usr/bin/mysql-zrm.orig 2008-04-07 10:40:12.000000000 -1000 2 +++ ./usr/bin/mysql-zrm 2008-05-12 09:22:26.000000000 -1000 3 @@ -27,7 +27,7 @@ 4 $ENV{'PATH'} = "/usr/local/bin:/opt/csw/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ucb"; 1 --- usr/bin/mysql-zrm.orig 2 +++ usr/bin/mysql-zrm 3 @@ -36,7 +36,7 @@ if ( $^O =~ /^MSWin/ ) { 4 $ZRM_BINPATH= catfile( $ZRM_HOME, "usr", "bin" ); 5 } else { 6 $ENV{'PATH'} = "/usr/local/bin:/opt/csw/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ucb"; 7 - $ZRM_BINPATH="/usr/bin"; 8 + $ZRM_BINPATH="@BINPATH@"; 9 } 5 10 6 #path where ZRM utilities are installed7 -my $ZRM_BINPATH="/usr/bin";8 +my $ZRM_BINPATH="@BINPATH@";9 11 10 my $USAGE="--action <backup|restore|schedule-backup|report|list|getconf|purge|parse-binlogs|check|verify-backup|extract-backup|abort-backup>\nHelp on individual action items can be obtained by specifying --help with the required action.\nFor example: 'mysql-zrm --action backup --help'";11 -
files/patch-mysql-zrm-backup-0
1 --- ./usr/bin/mysql-zrm-backup.orig 2008-04-07 10:40:12.000000000 -1000 2 +++ ./usr/bin/mysql-zrm-backup 2008-05-08 10:36:55.000000000 -1000 3 @@ -38,7 +38,7 @@ 1 --- usr/bin/mysql-zrm-backup.orig 2 +++ usr/bin/mysql-zrm-backup 3 @@ -40,7 +40,7 @@ $SIG{'TERM'} = sub { $abort_flag = 1; }; 4 $SIG{'PIPE'} = sub { &printWarning( "Communication pipe broke. Continuing\n" ); }; 4 5 5 $SIG{'TERM'} = sub { $abort_flag = 1; };6 6 7 7 -my $MD5SUM="md5sum"; 8 8 +my $MD5SUM="md5"; 9 my $MAILCMD="mail";10 9 11 #Neither mysqlhotcopy not mysqldump will do a --flush-logs 12 @@ -1504,7 +1504,7 @@ 10 11 my $MAILCMD=""; 12 @@ -2035,7 +2035,7 @@ sub totalSize() 13 13 $inputs{"synchronous-checksum"} == 1 ){ 14 14 my $file = $File::Find::fullname; 15 15 if( -f $file ){ -
files/patch-mysql-zrm-scheduler-3
1 --- ./usr/bin/mysql-zrm-scheduler.orig 2008-04-07 10:40:12.000000000 -10002 +++ ./usr/bin/mysql-zrm-scheduler 2008-05-12 09:19:31.000000000 -10003 @@ -3 6,8 +36,8 @@1 --- usr/bin/mysql-zrm-scheduler.orig 2 +++ usr/bin/mysql-zrm-scheduler 3 @@ -38,8 +38,8 @@ my $logdir="/var/log/mysql-zrm"; 4 4 my $confdir="/etc/mysql-zrm"; 5 5 my $def_dest="/var/lib/mysql-zrm"; # backup root 6 6 my $logfile="$logdir/$prog.log"; … … 11 11 my $zrm_pre_backup="$pre_scheduler --action backup"; 12 12 my $zrm_backup="$zrm --action backup"; 13 13 my $zrm_purge="$zrm --action purge"; 14 @@ -16 0,7 +160,7 @@14 @@ -162,7 +162,7 @@ sub call_reporter () 15 15 my $date=`date +%Y%m%d%H%M%S`; 16 16 chomp($date); 17 17 my $report_out="$name.$date.html"; # report name is $backupsetname.timestamp.html -
files/patch-mysql-zrm-verify-backup-1
1 --- ./usr/bin/mysql-zrm-verify-backup.orig 2008-04-07 10:40:12.000000000 -10002 +++ ./usr/bin/mysql-zrm-verify-backup 2008-05-08 10:37:21.000000000 -10003 @@ -30,7 +30,7 @@ 1 --- usr/bin/mysql-zrm-verify-backup.orig 2 +++ usr/bin/mysql-zrm-verify-backup 3 @@ -30,7 +30,7 @@ use lib "/usr/lib/mysql-zrm"; 4 4 use ZRM::Common; 5 5 6 6 … … 9 9 my $CHECKSUM_FILE="zrm_checksum"; 10 10 my $CHECKSUM_PENDING=".checksum_pending"; 11 11 12 @@ -55,7 +55,7 @@ 12 @@ -55,7 +55,7 @@ sub verifyCheckSum() 13 13 $_ ne $EXTRACTED_FILENAME && $_ ne $CHECKSUM_FILE ){ 14 14 my $file = $File::Find::fullname; 15 15 if( -f $file ){ … … 18 18 $x = &execCmdAndGetOutput($x); 19 19 if( !defined $x ){ 20 20 &printError( "Could not get md5 checksum\n" ); 21 @@ -120,7 +120,7 @@ 21 @@ -120,7 +120,7 @@ sub calculateMD5Sum() 22 22 if( $_ ne "index" && $_ ne $CHECKSUM_PENDING ){ 23 23 my $file = $File::Find::fullname; 24 24 if( -f $file ){ -
files/patch-zrm-pre-scheduler-2
1 --- ./usr/bin/zrm-pre-scheduler.orig 2008-04-07 10:40:12.000000000 -10002 +++ ./usr/bin/zrm-pre-scheduler 2008-05-12 09:12:32.000000000 -10003 @@ -3 5,7 +35,7 @@1 --- usr/bin/zrm-pre-scheduler.orig 2 +++ usr/bin/zrm-pre-scheduler 3 @@ -34,7 +34,7 @@ use ZRM::Common; 4 4 my $oldPATH = $ENV{'PATH'}; 5 5 $ENV{'PATH'} = "/usr/local/bin:/opt/csw/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ucb"; 6 6 … … 9 9 my $prog="zrm-pre-scheduler"; 10 10 my $logdir="/var/log/mysql-zrm"; 11 11 my $logfile="$logdir/$prog.log"; 12 @@ -16 2,7 +162,7 @@12 @@ -161,7 +161,7 @@ sub reschedule() 13 13 if ( $int eq "daily" ) { 14 14 $mday = $wday = "*"; 15 15 } … … 18 18 print OUTF "--action $myaction "; 19 19 print OUTF "--interval $int " if ( $int ); 20 20 print OUTF "--backup-level $lev " if ( $lev ); 21 @@ -20 5,7 +205,7 @@21 @@ -204,7 +204,7 @@ sub call_reporter () 22 22 my $date=`date +%Y%m%d%H%M%S`; 23 23 chomp($date); 24 24 my $report_out="$name.$date.html"; # report name is $backupsetname.timestamp.html