ports/176025: [maintainer update] sysutils/backuppc: switch to sysutils/p5-File-Listing dependency, etc.
Alexander Moisseev
moiseev at mezonplus.ru
Mon Feb 11 10:10:01 UTC 2013
>Number: 176025
>Category: ports
>Synopsis: [maintainer update] sysutils/backuppc: switch to sysutils/p5-File-Listing dependency, etc.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 11 10:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Alexander Moisseev
>Release:
>Organization:
>Environment:
>Description:
- Switch to sysutils/p5-File-Listing from www/p5-libwww dependency
- Convert to new options framework
- Trim Makefile header
- Bump PORTREVISION
- Source code related patches:
* Lib.pm, Text.pm: fix deprecated usage of qw(...) as parentheses
* config.pl: remove "-N" smbclient option
* BackupPC_zipCreate: fix filenames encoding
* CGI: add Zip archive "Code page" option
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -ruN backuppc.orig/Makefile backuppc/Makefile
--- backuppc.orig/Makefile 2013-02-07 17:42:10.000000000 +0400
+++ backuppc/Makefile 2013-02-08 11:44:46.000000000 +0400
@@ -1,12 +1,9 @@
-# New ports collection makefile for: BackupPC
-# Date created: 19 Aug 2010
-# Whom: Alexander Moisseev <moiseev at mezonplus.ru>
-#
-# $FreeBSD: ports/sysutils/backuppc/Makefile,v 1.9 2012/12/16 06:16:58 svnexp Exp $
-#
+# Created by: Alexander Moisseev <moiseev at mezonplus.ru>
+# $FreeBSD$
PORTNAME= backuppc
PORTVERSION= 3.2.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= SF
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION}
@@ -15,7 +12,7 @@
MAINTAINER= moiseev at mezonplus.ru
COMMENT= System for backing PCs and laptops to a server
-RUN_DEPENDS= p5-libwww>=0:${PORTSDIR}/www/p5-libwww
+RUN_DEPENDS= p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing
NO_BUILD= yes
@@ -34,31 +31,35 @@
MAN1= ${PORTNAME}.1
-OPTIONS= COMPRESS_ZLIB "Perl5 interface to zlib compression library" on \
- ARCHIVE_ZIP "Perl module for Zip archive files" on \
- FILE_RSYNCP "Perl Rsync client" off \
- SMBCLIENT "Samba client" off \
- NMBLOOKUP "NetBIOS Name lookup tool" off \
- XML_RSS "Perl extension to manage RSS files" off
+OPTIONS_DEFINE= COMPRESS_ZLIB ARCHIVE_ZIP FILE_RSYNCP SMBCLIENT \
+ NMBLOOKUP XML_RSS DOCS
+OPTIONS_DEFAULT= COMPRESS_ZLIB ARCHIVE_ZIP
+
+COMPRESS_ZLIB_DESC= Perl5 interface to zlib compression library
+ARCHIVE_ZIP_DESC= Perl module for Zip archive files
+FILE_RSYNCP_DESC= Perl Rsync client
+SMBCLIENT_DESC= Samba client
+NMBLOOKUP_DESC= NetBIOS Name lookup tool
+XML_RSS_DESC= Perl extension to manage RSS files
.include <bsd.port.options.mk>
-.if defined(WITH_COMPRESS_ZLIB)
+.if ${PORT_OPTIONS:MCOMPRESS_ZLIB}
RUN_DEPENDS+= p5-IO-Compress>=0:${PORTSDIR}/archivers/p5-IO-Compress
.endif
-.if defined(WITH_ARCHIVE_ZIP)
+.if ${PORT_OPTIONS:MARCHIVE_ZIP}
RUN_DEPENDS+= p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip
.endif
-.if defined(WITH_FILE_RSYNCP)
+.if ${PORT_OPTIONS:MFILE_RSYNCP}
RUN_DEPENDS+= p5-File-RsyncP>=0:${PORTSDIR}/net/p5-File-RsyncP
.endif
-.if defined(WITH_SMBCLIENT)
+.if ${PORT_OPTIONS:MSMBCLIENT}
RUN_DEPENDS+= smbclient:${PORTSDIR}/net/samba-smbclient
.endif
-.if defined(WITH_NMBLOOKUP)
+.if ${PORT_OPTIONS:MNMBLOOKUP}
RUN_DEPENDS+= nmblookup:${PORTSDIR}/net/samba-nmblookup
.endif
-.if defined(WITH_XML_RSS)
+.if ${PORT_OPTIONS:MXML_RSS}
RUN_DEPENDS+= p5-XML-RSS>=0:${PORTSDIR}/textproc/p5-XML-RSS
.endif
@@ -108,7 +109,7 @@
@${EXEC} pod2man --section=1 --release=${PORTVERSION} --name=BackupPC --center=BackupPC" user guide" ${WRKSRC}/BackupPC.pod ${WRKSRC}/${PORTNAME}.1
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR}
.endif
diff -ruN backuppc.orig/files/patch-bin-BackupPC_zipCreate backuppc/files/patch-bin-BackupPC_zipCreate
--- backuppc.orig/files/patch-bin-BackupPC_zipCreate 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-bin-BackupPC_zipCreate 2013-02-07 18:11:19.000000000 +0400
@@ -0,0 +1,44 @@
+--- bin/BackupPC_zipCreate.orig 2011-04-25 07:31:55.000000000 +0400
++++ bin/BackupPC_zipCreate 2013-02-07 18:09:08.000000000 +0400
+@@ -21,7 +21,7 @@
+ # -r pathRemove path prefix that will be replaced with pathAdd
+ # -p pathAdd new path prefix
+ # -c level compression level (default is 0, no compression)
+-# -e charset charset for encoding file names (default: cp1252)
++# -e charset charset for encoding file names (default: utf8)
+ #
+ # The -h, -n and -s options specify which dump is used to generate
+ # the zip archive. The -r and -p options can be used to relocate
+@@ -93,7 +93,7 @@
+ -r pathRemove path prefix that will be replaced with pathAdd
+ -p pathAdd new path prefix
+ -c level compression level (default is 0, no compression)
+- -e charset charset for encoding file names (default: cp1252)
++ -e charset charset for encoding file names (default: utf8)
+ EOF
+ exit(1);
+ }
+@@ -135,7 +135,7 @@
+ exit(1);
+ }
+
+-my $Charset = "cp1252";
++my $Charset = ""; # default: utf8
+ $Charset = $opts{e} if ( $opts{e} ne "" );
+
+ my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ );
+@@ -311,6 +311,14 @@
+ # Specify the compression level for this member
+ $zipmember->desiredCompressionLevel($compLevel) if ($compLevel =~ /[0-9]/);
+
++ if ( $Charset =~ /^(?:utf[-_]?8)?$/i ) {
++ # Set general purpose bit 11 for UTF-8 code page
++ $zipmember->{bitFlag} = $zipmember->{bitFlag} | 0x0800 ;
++ } elsif ( $Charset =~ /^cp(?:437|720|737|775|85[02578]|86[069]|874|93[26]|949|950)$/i ) {
++ # Set "version made by" field to 0 (MS-DOS) for OEM code pages
++ $zipmember->fileAttributeFormat('FA_MSDOS');
++ }
++
+ # Finally Zip the member
+ $zipfh->addMember($zipmember);
+ }
diff -ruN backuppc.orig/files/patch-conf-config.pl backuppc/files/patch-conf-config.pl
--- backuppc.orig/files/patch-conf-config.pl 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-conf-config.pl 2013-02-08 15:33:32.000000000 +0400
@@ -0,0 +1,29 @@
+--- conf/config.pl.orig 2013-02-08 15:31:56.000000000 +0400
++++ conf/config.pl 2013-02-08 15:32:32.000000000 +0400
+@@ -976,7 +976,7 @@
+ # redirection and pipes; put that in a script if you need it.
+ #
+ $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
+- . ' $I_option -U $userName -E -N -d 1'
++ . ' $I_option -U $userName -E -d 1'
+ . ' -c tarmode\\ full -Tc$X_option - $fileList';
+
+ #
+@@ -990,7 +990,7 @@
+ # redirection and pipes; put that in a script if you need it.
+ #
+ $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
+- . ' $I_option -U $userName -E -N -d 1'
++ . ' $I_option -U $userName -E -d 1'
+ . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
+
+ #
+@@ -1008,7 +1008,7 @@
+ # redirection and pipes; put that in a script if you need it.
+ #
+ $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
+- . ' $I_option -U $userName -E -N -d 1'
++ . ' $I_option -U $userName -E -d 1'
+ . ' -c tarmode\\ full -Tx -';
+
+ ###########################################################################
diff -ruN backuppc.orig/files/patch-doc-BackupPC.html backuppc/files/patch-doc-BackupPC.html
--- backuppc.orig/files/patch-doc-BackupPC.html 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-doc-BackupPC.html 2013-02-07 18:13:43.000000000 +0400
@@ -0,0 +1,11 @@
+--- doc/BackupPC.html.orig 2011-04-25 07:31:55.000000000 +0400
++++ doc/BackupPC.html 2013-02-07 18:09:08.000000000 +0400
+@@ -1664,7 +1664,7 @@
+ -r pathRemove path prefix that will be replaced with pathAdd
+ -p pathAdd new path prefix
+ -c level compression level (default is 0, no compression)
+- -e charset charset for encoding file names (default: cp1252)</pre>
++ -e charset charset for encoding file names (default: utf8)</pre>
+ <p>The command-line files and directories are relative to the specified
+ shareName. The zip file is written to stdout. The -h, -n and -s
+ options specify which dump is used to generate the zip archive. The
diff -ruN backuppc.orig/files/patch-doc-BackupPC.pod backuppc/files/patch-doc-BackupPC.pod
--- backuppc.orig/files/patch-doc-BackupPC.pod 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-doc-BackupPC.pod 2013-02-07 18:13:31.000000000 +0400
@@ -0,0 +1,11 @@
+--- doc/BackupPC.pod.orig 2011-04-25 07:31:55.000000000 +0400
++++ doc/BackupPC.pod 2013-02-07 18:09:08.000000000 +0400
+@@ -1729,7 +1729,7 @@
+ -r pathRemove path prefix that will be replaced with pathAdd
+ -p pathAdd new path prefix
+ -c level compression level (default is 0, no compression)
+- -e charset charset for encoding file names (default: cp1252)
++ -e charset charset for encoding file names (default: utf8)
+
+ The command-line files and directories are relative to the specified
+ shareName. The zip file is written to stdout. The -h, -n and -s
diff -ruN backuppc.orig/files/patch-lib-BackupPC-CGI-Restore.pm backuppc/files/patch-lib-BackupPC-CGI-Restore.pm
--- backuppc.orig/files/patch-lib-BackupPC-CGI-Restore.pm 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-lib-BackupPC-CGI-Restore.pm 2013-02-11 11:50:51.000000000 +0400
@@ -0,0 +1,10 @@
+--- lib/BackupPC/CGI/Restore.pm.orig 2013-02-08 15:54:10.000000000 +0400
++++ lib/BackupPC/CGI/Restore.pm 2013-02-11 10:49:44.000000000 +0400
+@@ -233,6 +233,7 @@
+ "-n", $num,
+ "-c", $In{compressLevel},
+ "-s", $share,
++ "-e", $In{codePage},
+ @pathOpts,
+ @fileList
+ ],
diff -ruN backuppc.orig/files/patch-lib-BackupPC-Lang-en.pm backuppc/files/patch-lib-BackupPC-Lang-en.pm
--- backuppc.orig/files/patch-lib-BackupPC-Lang-en.pm 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-lib-BackupPC-Lang-en.pm 2013-02-11 12:05:23.000000000 +0400
@@ -0,0 +1,21 @@
+--- lib/BackupPC/Lang/en.pm.orig 2013-02-08 15:54:10.000000000 +0400
++++ lib/BackupPC/Lang/en.pm 2013-02-11 11:39:16.000000000 +0400
+@@ -530,8 +530,16 @@
+ to \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)}
+ (otherwise archive will contain full paths).
+ <br>
+-Compression (0=off, 1=fast,...,9=best)
+-<input type="text" size="6" value="5" name="compressLevel">
++<table class="tableStnd" border="0">
++<tr>
++ <td>Compression (0=off, 1=fast,...,9=best)</td>
++ <td><input type="text" size="6" value="5" name="compressLevel"></td>
++</tr><tr>
++ <td>Code page (e.g. cp866)</td>
++ <td><input type="text" size="6" value="utf8" name="codePage"></td>
++</tr>
++</table>
++Note: for filenames with non latin characters OEM code page is compatible with most of the ZIP archivers.
+ <br>
+ <input type="submit" value="Download Zip File" name="ignore">
+ </form>
diff -ruN backuppc.orig/files/patch-lib-BackupPC-Lib.pm backuppc/files/patch-lib-BackupPC-Lib.pm
--- backuppc.orig/files/patch-lib-BackupPC-Lib.pm 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-lib-BackupPC-Lib.pm 2013-02-07 17:48:14.000000000 +0400
@@ -0,0 +1,11 @@
+--- lib/BackupPC/Lib.pm.orig 2013-02-07 17:44:35.000000000 +0400
++++ lib/BackupPC/Lib.pm 2013-02-07 17:44:59.000000000 +0400
+@@ -1409,7 +1409,7 @@
+
+ $conf->{$shareName} = [ $conf->{$shareName} ]
+ if ( ref($conf->{$shareName}) ne "ARRAY" );
+- foreach my $param qw(BackupFilesOnly BackupFilesExclude) {
++ foreach my $param (qw(BackupFilesOnly BackupFilesExclude)) {
+ next if ( !defined($conf->{$param}) );
+ if ( ref($conf->{$param}) eq "HASH" ) {
+ #
diff -ruN backuppc.orig/files/patch-lib-BackupPC-Storage-Text.pm backuppc/files/patch-lib-BackupPC-Storage-Text.pm
--- backuppc.orig/files/patch-lib-BackupPC-Storage-Text.pm 1970-01-01 03:00:00.000000000 +0300
+++ backuppc/files/patch-lib-BackupPC-Storage-Text.pm 2013-02-07 17:55:24.000000000 +0400
@@ -0,0 +1,11 @@
+--- lib/BackupPC/Storage/Text.pm.orig 2013-02-07 17:45:14.000000000 +0400
++++ lib/BackupPC/Storage/Text.pm 2013-02-07 17:45:43.000000000 +0400
+@@ -298,7 +298,7 @@
+ #
+ # Promote BackupFilesOnly and BackupFilesExclude to hashes
+ #
+- foreach my $param qw(BackupFilesOnly BackupFilesExclude) {
++ foreach my $param (qw(BackupFilesOnly BackupFilesExclude)) {
+ next if ( !defined($conf->{$param}) || ref($conf->{$param}) eq "HASH" );
+ $conf->{$param} = [ $conf->{$param} ]
+ if ( ref($conf->{$param}) ne "ARRAY" );
diff -ruN backuppc.orig/pkg-plist backuppc/pkg-plist
--- backuppc.orig/pkg-plist 2013-02-07 17:42:10.000000000 +0400
+++ backuppc/pkg-plist 2013-02-08 11:29:02.000000000 +0400
@@ -133,11 +133,11 @@
@unexec echo "If you are permanently removing BackupPC, you should manually delete:"
@unexec echo
@unexec echo " - the backuppc user/group: pw userdel backuppc"
- at unexec rmdir %D/%%ETCDIR%% 2>/dev/null || echo " - BackupPC configuration: rm -rf %D/%%ETCDIR%%"
- at unexec rmdir %%BPC_DATADIR%%/cpool 2>/dev/null || true
- at unexec rmdir %%BPC_DATADIR%%/pc 2>/dev/null || true
- at unexec rmdir %%BPC_DATADIR%%/pool 2>/dev/null || true
- at unexec rmdir %%BPC_DATADIR%%/trash 2>/dev/null || true
- at unexec rmdir %%BPC_DATADIR%% 2>/dev/null || echo " - BackupPC data directory: rm -rf %%BPC_DATADIR%%"
- at unexec rmdir /var/log/BackupPC 2>/dev/null || echo " - BackupPC logs directory: rm -rf /var/log/BackupPC"
+ at unexec rmdir %D/%%ETCDIR%% 2>/dev/null || echo " - BackupPC configuration: rm -r %D/%%ETCDIR%%"
+ at dirrmtry %%BPC_DATADIR%%/cpool
+ at dirrmtry %%BPC_DATADIR%%/pc
+ at dirrmtry %%BPC_DATADIR%%/pool
+ at dirrmtry %%BPC_DATADIR%%/trash
+ at unexec rmdir %%BPC_DATADIR%% 2>/dev/null || echo " - BackupPC data directory: rm -r %%BPC_DATADIR%%"
+ at unexec rmdir /var/log/BackupPC 2>/dev/null || echo " - BackupPC logs directory: rm -r /var/log/BackupPC"
@unexec echo
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list