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

     
    22# $Id$
    33
    44PortSystem          1.0
     5PortGroup           perl5 1.0
    56
    67name                mysql-zrm
    7 version             2.0
    8 revision            2
     8version             3.0
    99categories          databases sysutils
    1010maintainers         bitwrangler.com:kmayer
    1111description         Zmanda Recovery Manager for MySQL
     
    1717homepage            http://www.zmanda.com/backup-mysql.html
    1818platforms           darwin
    1919master_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
     20distname            MySQL-zrm-${version}-release
     21
     22checksums           rmd160  0573cfbeee98626e17411fb17bda6d76c9ad041d \
     23                    sha256  05e0342b190b6475f220014a126ed213442e24af7b6e3295fa914fcb47b1b931
     24
     25perl5.branches      5.22
     26# these are probably just runtime dependencies?
     27depends_lib         port:p${perl5.major}-dbi \
     28                    port:p${perl5.major}-xml-parser
    2529use_configure       no
    2630patchfiles          patch-mysql-zrm-backup-0 \
    2731                    patch-mysql-zrm-verify-backup-1 \
     
    3135destroot.keepdirs   ${destroot}${prefix}/var/lib/mysql-zrm \
    3236                    ${destroot}${prefix}/var/log/mysql-zrm
    3337
     38
     39post-extract {
     40    file mkdir ${worksrcpath}
     41    foreach d {etc usr var} {
     42        file rename ${workpath}/${d} ${worksrcpath}/${d}
     43    }
     44}
     45
    3446post-patch {
    3547    # Not the most efficient way to do this, but much more readable
    3648    foreach f [exec find ${worksrcpath} -type f -print] {
    3749        reinplace "s|/opt/csw/bin|${prefix}/bin|" ${f}
    38         reinplace "s|/usr/bin/perl|${prefix}/bin/perl5.16|" ${f}
     50        reinplace "s|/usr/bin/perl|${perl5.bin}|" ${f}
    3951        reinplace "s|/usr/bin/mysql-zrm|${prefix}/bin/mysql-zrm|" ${f}
    4052        reinplace "s|/usr/lib/mysql-zrm|${prefix}/lib/mysql-zrm|" ${f}
    4153        reinplace "s|/usr/share/mysql-zrm|${prefix}/share/mysql-zrm|" ${f}
     
    7284    eval xinstall -m 444 [glob ${worksrcpath}/usr/lib/mysql-zrm/ZRM/*] \
    7385        ${destroot}${prefix}/lib/mysql-zrm/ZRM
    7486
    75     xinstall -m 755 -d ${destroot}${prefix}/share/doc/MySQL-zrm-2.0
    76     eval xinstall -m 444 [glob ${worksrcpath}/usr/share/doc/MySQL-zrm-2.0/*] \
    77         ${destroot}${prefix}/share/doc/MySQL-zrm-2.0
     87    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}
    7890
    7991    xinstall -m 755 -d ${destroot}${prefix}/share/man/man1
    8092    eval xinstall -m 444 [glob ${worksrcpath}/usr/share/man/man1/*] \
     
    95107    xinstall -m 755 -d ${destroot}${prefix}/var/lib/mysql-zrm
    96108    xinstall -m 755 -d ${destroot}${prefix}/var/log/mysql-zrm
    97109}
     110
     111livecheck.url       http://www.zmanda.com/download-zrm.php
     112livecheck.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 }
    510 
    6  #path where ZRM utilities are installed
    7 -my $ZRM_BINPATH="/usr/bin";
    8 +my $ZRM_BINPATH="@BINPATH@";
    911 
    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" ); };
    45 
    5  $SIG{'TERM'} = sub { $abort_flag = 1; };
    66 
    77-my $MD5SUM="md5sum";
    88+my $MD5SUM="md5";
    9  my $MAILCMD="mail";
    109 
    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()
    1313                                    $inputs{"synchronous-checksum"} == 1 ){
    1414                                        my $file = $File::Find::fullname;
    1515                                        if( -f $file ){
  • files/patch-mysql-zrm-scheduler-3

     
    1 --- ./usr/bin/mysql-zrm-scheduler.orig  2008-04-07 10:40:12.000000000 -1000
    2 +++ ./usr/bin/mysql-zrm-scheduler       2008-05-12 09:19:31.000000000 -1000
    3 @@ -36,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";
    44 my $confdir="/etc/mysql-zrm";
    55 my $def_dest="/var/lib/mysql-zrm";         # backup root
    66 my $logfile="$logdir/$prog.log";
     
    1111 my $zrm_pre_backup="$pre_scheduler --action backup";
    1212 my $zrm_backup="$zrm --action backup";
    1313 my $zrm_purge="$zrm --action purge";
    14 @@ -160,7 +160,7 @@
     14@@ -162,7 +162,7 @@ sub call_reporter ()
    1515     my $date=`date +%Y%m%d%H%M%S`;
    1616     chomp($date);
    1717     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 -1000
    2 +++ ./usr/bin/mysql-zrm-verify-backup   2008-05-08 10:37:21.000000000 -1000
    3 @@ -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";
    44 use ZRM::Common;
    55 
    66 
     
    99 my $CHECKSUM_FILE="zrm_checksum";
    1010 my $CHECKSUM_PENDING=".checksum_pending";
    1111 
    12 @@ -55,7 +55,7 @@
     12@@ -55,7 +55,7 @@ sub verifyCheckSum()
    1313                                $_ ne $EXTRACTED_FILENAME && $_ ne $CHECKSUM_FILE ){
    1414                                my $file = $File::Find::fullname;
    1515                                if( -f $file ){
     
    1818                                        $x = &execCmdAndGetOutput($x);
    1919                                        if( !defined $x ){
    2020                                                &printError( "Could not get md5 checksum\n" );
    21 @@ -120,7 +120,7 @@
     21@@ -120,7 +120,7 @@ sub calculateMD5Sum()
    2222                         if( $_ ne "index" && $_ ne $CHECKSUM_PENDING ){
    2323                                 my $file = $File::Find::fullname;
    2424                                 if( -f $file ){
  • files/patch-zrm-pre-scheduler-2

     
    1 --- ./usr/bin/zrm-pre-scheduler.orig    2008-04-07 10:40:12.000000000 -1000
    2 +++ ./usr/bin/zrm-pre-scheduler 2008-05-12 09:12:32.000000000 -1000
    3 @@ -35,7 +35,7 @@
     1--- usr/bin/zrm-pre-scheduler.orig
     2+++ usr/bin/zrm-pre-scheduler
     3@@ -34,7 +34,7 @@ use ZRM::Common;
    44 my $oldPATH = $ENV{'PATH'};
    55 $ENV{'PATH'} = "/usr/local/bin:/opt/csw/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ucb";
    66 
     
    99 my $prog="zrm-pre-scheduler";
    1010 my $logdir="/var/log/mysql-zrm";
    1111 my $logfile="$logdir/$prog.log";
    12 @@ -162,7 +162,7 @@
     12@@ -161,7 +161,7 @@ sub reschedule()
    1313        if ( $int eq "daily" ) {
    1414            $mday = $wday = "*";
    1515        }
     
    1818        print OUTF "--action $myaction ";
    1919         print OUTF "--interval $int " if ( $int );
    2020        print OUTF "--backup-level $lev " if ( $lev );
    21 @@ -205,7 +205,7 @@
     21@@ -204,7 +204,7 @@ sub call_reporter ()
    2222     my $date=`date +%Y%m%d%H%M%S`;
    2323     chomp($date);
    2424     my $report_out="$name.$date.html";  # report name is $backupsetname.timestamp.html