Revision: 144339 https://trac.macports.org/changeset/144339 Author: mojca@macports.org Date: 2016-01-06 14:02:07 -0800 (Wed, 06 Jan 2016) Log Message: ----------- backuppc: upgrade to 3.3.1 (#49571), create a mess with perl variants (#48365) Modified Paths: -------------- trunk/dports/sysutils/backuppc/Portfile Added Paths: ----------- trunk/dports/sysutils/backuppc/files/patch-docdir.diff trunk/dports/sysutils/backuppc/files/patch-progs.diff Removed Paths: ------------- trunk/dports/sysutils/backuppc/files/patch-configure.pl.diff trunk/dports/sysutils/backuppc/files/patch-lib-backuppc-cgi-view.pm.diff Modified: trunk/dports/sysutils/backuppc/Portfile =================================================================== --- trunk/dports/sysutils/backuppc/Portfile 2016-01-06 20:49:09 UTC (rev 144338) +++ trunk/dports/sysutils/backuppc/Portfile 2016-01-06 22:02:07 UTC (rev 144339) @@ -2,12 +2,12 @@ # $Id$ PortSystem 1.0 +PortGroup active_variants 1.1 +PortGroup perl5 1.0 name backuppc categories sysutils -version 3.1.0 -revision 2 -set perl_version 5.16 +version 3.3.1 maintainers nomaintainer license GPL-2+ homepage http://backuppc.sourceforge.net/ @@ -19,24 +19,34 @@ master_sites sourceforge +# TODO: +# - remove 5.16 once we upgrade to 5.22 as default +# - remove the variants once mod_perl2 switches to 5.22 only +perl5.require_variant yes +perl5.conflict_variants yes +perl5.branches 5.16 5.22 +perl5.create_variants ${perl5.branches} +# TODO: this has to be the same branch as for mod_perl2 +perl5.default_branch 5.22 +require_active_variants mod_perl2 ${perl5.variant} + depends_lib port:bzip2 \ port:gnutar \ port:gzip \ port:mod_perl2 \ port:openssh \ - port:p${perl_version}-archive-zip \ - port:p${perl_version}-compress-raw-zlib \ - port:p${perl_version}-file-rsyncp \ + port:p${perl5.major}-archive-zip \ + port:p${perl5.major}-compress-raw-zlib \ + port:p${perl5.major}-file-rsyncp \ port:par2 \ - port:perl${perl_version} \ + port:perl${perl5.major} \ port:rsync \ port:samba3 distname BackupPC-${version} -checksums md5 84b4471852ef910768eae9963ef932d2 \ - sha1 3bd6d637f4f08f2fda44a12668b91d47c4abb0a7 \ - rmd160 22d4cb6dd76f846fde489a301852f50e8db1ae1d +checksums rmd160 3db4d6a54c9cde61fa434292b53f18ded73dbb83 \ + sha256 c9cc4aec28a7474a68d40f4bc460ff15140e05c96900c7f98ff3ef06c4f6ae4c configure.args --batch \ --backuppc-user=backuppc \ @@ -46,10 +56,11 @@ --html-dir ${prefix}/var/wwwbackup/htdocs/backuppc \ --html-dir-url /backuppc \ --install-dir ${prefix} \ - --config-dir ${prefix}/etc/BackupPC + --config-dir ${prefix}/etc/BackupPC \ + --log-dir ${prefix}/var/log/BackupPC -patchfiles patch-configure.pl.diff \ - patch-lib-backuppc-cgi-view.pm.diff +patchfiles patch-docdir.diff \ + patch-progs.diff destroot.violate_mtree yes @@ -72,9 +83,6 @@ } configure { - reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure.pl - reinplace "s|@@PREFIX@@|${prefix}/|g" ${worksrcpath}/lib/BackupPC/CGI/View.pm - addgroup backuppc set gid [existsgroup backuppc] adduser backuppc gid=${gid} realname=BackupPC @@ -102,9 +110,10 @@ xinstall -d -m 770 -g backuppc -o backuppc ${destroot}${prefix}/var/log/BackupPC # create backup directory - system -W ${worksrcpath} "${prefix}/bin/perl${perl_version} configure.pl ${configure.args}" - xinstall -d -m 755 ${destroot}${prefix}/share/doc/ - move ${destroot}${prefix}/doc ${destroot}${prefix}/share/doc/BackupPC + system -W ${worksrcpath} "${prefix}/bin/perl${perl5.major} configure.pl ${configure.args}" + # done with a patch for now: + #xinstall -d -m 755 ${destroot}${prefix}/share/doc/ + #move ${destroot}${prefix}/doc ${destroot}${prefix}/share/doc/BackupPC # install the launch scripts xinstall -d -m 755 ${destroot}/Library/LaunchDaemons Deleted: trunk/dports/sysutils/backuppc/files/patch-configure.pl.diff =================================================================== --- trunk/dports/sysutils/backuppc/files/patch-configure.pl.diff 2016-01-06 20:49:09 UTC (rev 144338) +++ trunk/dports/sysutils/backuppc/files/patch-configure.pl.diff 2016-01-06 22:02:07 UTC (rev 144339) @@ -1,23 +0,0 @@ ---- configure.pl (saved version) -+++ (current document) -@@ -231,9 +231,9 @@ - # - if ( $opts{fhs} ) { - $Conf{TopDir} ||= "/data/BackupPC"; -- $Conf{ConfDir} ||= $opts{"config-dir"} || "/etc/BackupPC"; -+ $Conf{ConfDir} ||= $opts{"config-dir"} || "@@PREFIX@@/etc/BackupPC"; - $Conf{InstallDir} ||= "/usr/local/BackupPC"; -- $Conf{LogDir} ||= $opts{"log-dir"} || "/var/log/BackupPC"; -+ $Conf{LogDir} = "@@PREFIX@@/var/log/BackupPC";; - } - - # -@@ -265,7 +265,7 @@ - } - $Conf{$Programs{$prog}} = $path if ( !length($Conf{$Programs{$prog}}) ); - } -- -+$Conf{$Programs{'gtar/tar'}} = "@@PREFIX@@/bin/gnutar"; - while ( 1 ) { - print <<EOF; - Added: trunk/dports/sysutils/backuppc/files/patch-docdir.diff =================================================================== --- trunk/dports/sysutils/backuppc/files/patch-docdir.diff (rev 0) +++ trunk/dports/sysutils/backuppc/files/patch-docdir.diff 2016-01-06 22:02:07 UTC (rev 144339) @@ -0,0 +1,43 @@ +--- configure.pl.orig ++++ configure.pl +@@ -522,7 +522,7 @@ exit unless prompt("--> Do you want to continue?", "y") =~ /y/i; + # + # Create install directories + # +-foreach my $dir ( qw(bin doc ++foreach my $dir ( qw(bin share/doc/BackupPC + lib/BackupPC/CGI + lib/BackupPC/Config + lib/BackupPC/Lang +@@ -693,9 +693,9 @@ foreach my $init ( qw(gentoo-backuppc gentoo-backuppc.conf linux-backuppc + printf("Making Apache configuration file for suid-perl\n"); + InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644); + +-printf("Installing docs in $DestDir$Conf{InstallDir}/doc\n"); ++printf("Installing docs in $DestDir$Conf{InstallDir}/share/doc/BackupPC\n"); + foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) { +- InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/doc/$doc", 0444); ++ InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/share/doc/BackupPC/$doc", 0444); + } + + printf("Installing config.pl and hosts in $DestDir$Conf{ConfDir}\n"); +@@ -948,7 +948,7 @@ will need to do: + + - Edit the list of hosts to backup in $Conf{ConfDir}/hosts. + +- - Read the documentation in $Conf{InstallDir}/doc/BackupPC.html. ++ - Read the documentation in $Conf{InstallDir}/share/doc/BackupPC/doc/BackupPC.html. + Please pay special attention to the security section. + + - Verify that the CGI script BackupPC_Admin runs correctly. You might +--- lib/BackupPC/CGI/View.pm.orig ++++ lib/BackupPC/CGI/View.pm +@@ -89,7 +89,7 @@ sub action + $file = $bpc->ConfDir() . "/hosts"; + $linkHosts = 1; + } elsif ( $type eq "docs" ) { +- $file = $bpc->InstallDir() . "/doc/BackupPC.html"; ++ $file = $bpc->InstallDir() . "/share/doc/BackupPC/BackupPC.html"; + } elsif ( $host ne "" ) { + if ( !defined($In{num}) ) { + # get the latest LOG file Deleted: trunk/dports/sysutils/backuppc/files/patch-lib-backuppc-cgi-view.pm.diff =================================================================== --- trunk/dports/sysutils/backuppc/files/patch-lib-backuppc-cgi-view.pm.diff 2016-01-06 20:49:09 UTC (rev 144338) +++ trunk/dports/sysutils/backuppc/files/patch-lib-backuppc-cgi-view.pm.diff 2016-01-06 22:02:07 UTC (rev 144339) @@ -1,11 +0,0 @@ ---- lib/BackupPC/CGI/View.pm 2007-11-25 19:00:07.000000000 -0800 -+++ lib/BackupPC/CGI/View.pm.new 2009-08-03 11:28:00.000000000 -0700 -@@ -86,7 +86,7 @@ - $file = $bpc->ConfDir() . "/hosts"; - $linkHosts = 1; - } elsif ( $type eq "docs" ) { -- $file = $bpc->InstallDir() . "/doc/BackupPC.html"; -+ $file = "@@PREFIX@@share/doc/BackupPC/BackupPC.html"; - } elsif ( $host ne "" ) { - if ( !defined($In{num}) ) { - # get the latest LOG file Added: trunk/dports/sysutils/backuppc/files/patch-progs.diff =================================================================== --- trunk/dports/sysutils/backuppc/files/patch-progs.diff (rev 0) +++ trunk/dports/sysutils/backuppc/files/patch-progs.diff 2016-01-06 22:02:07 UTC (rev 144339) @@ -0,0 +1,13 @@ +--- configure.pl.orig ++++ configure.pl +@@ -247,8 +247,8 @@ if ( $opts{fhs} ) { + # These are the programs whose paths we need to find + # + my %Programs = ( +- perl => "PerlPath", +- 'gtar/tar' => "TarClientPath", ++ 'perl5.22' => "PerlPath", ++ gnutar => "TarClientPath", + smbclient => "SmbClientPath", + nmblookup => "NmbLookupPath", + rsync => "RsyncClientPath",