Date: Mon, 14 Jul 2014 01:29:26 +0000 (UTC) From: Jonathan Chu <milki@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r361729 - in head/sysutils/backuppc: . files Message-ID: <201407140129.s6E1TQYc027210@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: milki Date: Mon Jul 14 01:29:26 2014 New Revision: 361729 URL: http://svnweb.freebsd.org/changeset/ports/361729 QAT: https://qat.redports.org/buildarchive/r361729/ Log: Bump sysutils/backuppc to 3.3.0_1 - Support StageDir - Add CONFLICTS (prepare to new port sysutils/backuppc-devel) - Add LICENSE - BackupPC.pod: add =encoding declaration (fix build with perl5.18) - Add DOCS options PR: 189799 Submitted by: Alexander Moisseev <moiseev@mezonplus.ru> (maintainer) Reviewed by: swills (mentor) Added: head/sysutils/backuppc/files/patch-doc-BackupPC.pod (contents, props changed) head/sysutils/backuppc/files/pkg-deinstall.in (contents, props changed) head/sysutils/backuppc/files/pkg-message.in (contents, props changed) Modified: head/sysutils/backuppc/Makefile head/sysutils/backuppc/files/patch-configure.pl head/sysutils/backuppc/pkg-plist Modified: head/sysutils/backuppc/Makefile ============================================================================== --- head/sysutils/backuppc/Makefile Sun Jul 13 23:36:40 2014 (r361728) +++ head/sysutils/backuppc/Makefile Mon Jul 14 01:29:26 2014 (r361729) @@ -3,6 +3,7 @@ PORTNAME= backuppc PORTVERSION= 3.3.0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION} @@ -11,8 +12,13 @@ DISTNAME= BackupPC-${PORTVERSION} MAINTAINER= moiseev@mezonplus.ru COMMENT= System for backing PCs and laptops to a server +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + RUN_DEPENDS= p5-File-Listing>=0:${PORTSDIR}/sysutils/p5-File-Listing +CONFLICTS= backuppc-devel-[0-9]* + USE_RC_SUBR= backuppc USES= perl5 @@ -21,17 +27,17 @@ NO_BUILD= yes USERS= backuppc GROUPS= backuppc -BPC_CGIDIR?= ${PREFIX}/www/cgi-bin -BPC_DATADIR?= /var/db/BackupPC +CGIDIR?= ${PREFIX}/www/cgi-bin -PLIST_SUB= BPC_CGIDIR=${BPC_CGIDIR:S,^${PREFIX}/,,} BPC_DATADIR=${BPC_DATADIR} +SUB_FILES= pkg-deinstall pkg-message -PORTDOCS= ChangeLog LICENSE README BackupPC.html BackupPC.pod +PLIST_SUB+= CGIDIR=${CGIDIR:S,^${PREFIX}/,,} \ + DISTVERSION=${DISTVERSION} -MAN1= ${PORTNAME}.1 +PORTDOCS= ChangeLog LICENSE README OPTIONS_DEFINE= ARCHIVE_ZIP COMPRESS_ZLIB DOCS FILE_RSYNCP NMBLOOKUP \ - RRDTOOL SMBCLIENT XML_RSS + RRDTOOL SMBCLIENT XML_RSS DOCS OPTIONS_DEFAULT= ARCHIVE_ZIP COMPRESS_ZLIB ARCHIVE_ZIP_DESC= Perl module for Zip archive files @@ -42,7 +48,6 @@ RRDTOOL_DESC= Use RRDTool to generate p SMBCLIENT_DESC= Samba client XML_RSS_DESC= Perl extension to manage RSS files -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MARCHIVE_ZIP} @@ -71,75 +76,60 @@ RUN_DEPENDS+= p5-XML-RSS>=0:${PORTSDIR}/ post-patch: @${REINPLACE_CMD} \ - -e 's,/etc/BackupPC/config.pl,${ETCDIR}/config.pl,' \ - -e 's|Conf{ConfDir}/hosts", 0644)|Conf{ConfDir}/hosts.sample", 0644)|' \ + -e 's|/etc/BackupPC\(/config.pl\)|${ETCDIR}\1|' \ + -e 's|^\(foreach my $$dir ( qw(bin \)doc$$|\1${DOCSDIR_REL}|' \ + -e 's|\($$DestDir$$Conf{InstallDir}/\)doc|\1${DOCSDIR_REL}|' \ ${WRKSRC}/configure.pl @${REINPLACE_CMD} \ -e 's,"/doc/BackupPC.html","/${DOCSDIR_REL}/BackupPC.html",' \ ${WRKSRC}/lib/BackupPC/CGI/View.pm @${REINPLACE_CMD} \ - -e 's,STDERR "Please su ,STDERR "Please su [-m] ,' \ + -e 's|STDERR "Please su |STDERR "Please su [-m] |' \ ${WRKSRC}/lib/BackupPC/Lib.pm @${REINPLACE_CMD} \ - -e 's, you can use the -s, you can use the -m,' \ - -e 's,option to su to explicitly run,option to su to run,' \ - -e 's,su -s /bin/bash __BACKUPPCUSER__,su -m __BACKUPPCUSER__,' \ + -e 's| you can use the -s| you can use the -m|' \ + -e 's|option to su to explicitly run|option to su to run|' \ + -e 's|su -s /bin/bash __BACKUPPCUSER__|su -m __BACKUPPCUSER__|' \ ${WRKSRC}/doc/BackupPC.html ${WRKSRC}/doc/BackupPC.pod -pre-install: - @${ECHO_MSG} - @${ECHO_MSG} ">>> -----------------------------------------------------------------------" - @${ECHO_MSG} ">>> You can use the following variables to tweak installation-time options:" - @${ECHO_MSG} ">>> BPC_CGIDIR" - @${ECHO_MSG} ">>> BPC_DATADIR" - @${ECHO_MSG} ">>> -----------------------------------------------------------------------" - @${ECHO_MSG} ">>> If this is an upgrade make sure the full path of the existing BackupPC" - @${ECHO_MSG} ">>> configuration directory is ${ETCDIR}" - @${ECHO_MSG} ">>> -----------------------------------------------------------------------" - @${ECHO_MSG} - do-install: - @cd ${WRKSRC} && ${PERL} configure.pl \ + if [ -f ${ETCDIR}/config.pl ]; then \ + ${MKDIR} ${STAGEDIR}${ETCDIR}; \ + ${CP} -p ${ETCDIR}/config.pl ${STAGEDIR}${ETCDIR}/config.pl; \ + fi + if [ -f ${ETCDIR}/hosts ]; then \ + ${MKDIR} ${STAGEDIR}${ETCDIR}; \ + ${CP} -p ${ETCDIR}/hosts ${STAGEDIR}${ETCDIR}/hosts; \ + fi + + cd ${WRKSRC} && ${PERL} configure.pl \ --batch \ --backuppc-user ${USERS} \ --config-dir ${ETCDIR} \ - --cgi-dir ${BPC_CGIDIR} \ - --data-dir ${BPC_DATADIR} \ + --cgi-dir ${CGIDIR} \ + --data-dir /var/db/BackupPC \ + --dest-dir ${STAGEDIR} \ --fhs \ --html-dir ${WWWDIR} \ --html-dir-url /${PORTNAME} \ --install-dir ${PREFIX} \ - --log-dir /var/log/BackupPC + --log-dir /var/log/BackupPC \ + --no-set-perms \ + --uid-ignore + + pod2man --section=1 --release=${PORTVERSION} \ + --name=BackupPC --center="BackupPC user guide" \ + ${WRKSRC}/doc/BackupPC.pod ${WRKSRC}/${PORTNAME}.1 + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1 + cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} -post-install: - @${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 ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} - @cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR} -.endif - - @${MV} ${ETCDIR}/config.pl ${ETCDIR}/config.pl.sample - - @${ECHO_MSG} - @${ECHO_MSG} ">>> ----------------------------------------------------------" - @${ECHO_MSG} ">>> You need to copy and customize" - @${ECHO_MSG} ">>> # cp -p ${ETCDIR}/config.pl.sample ${ETCDIR}/config.pl" - - @if [ ! -f ${ETCDIR}/hosts ]; then \ - ${ECHO_MSG} ">>> # cp -p ${ETCDIR}/hosts.sample ${ETCDIR}/hosts"; \ + if [ ! -f ${STAGEDIR}${ETCDIR}/config.pl.pre-${DISTVERSION} ]; then \ + > ${STAGEDIR}${ETCDIR}/config.pl.pre-${DISTVERSION}; \ fi - - @${ECHO_MSG} ">>>" - @${ECHO_MSG} ">>> Add the following line to /etc/rc.conf to enable BackupPC:" - @${ECHO_MSG} ">>> backuppc_enable=\"YES\"" - @${ECHO_MSG} ">>>" - @${ECHO_MSG} ">>> Data directory is ${BPC_DATADIR}" - @${ECHO_MSG} ">>> This is where all the PC backup data is stored." - @${ECHO_MSG} ">>> This file system needs to be big enough" - @${ECHO_MSG} ">>> to accommodate all the PCs you expect to backup." - @${ECHO_MSG} ">>> ----------------------------------------------------------" - @${ECHO_MSG} + ${INSTALL} -d ${STAGEDIR}${PREFIX}/libexec/${PORTNAME} + cd ${STAGEDIR}${ETCDIR} && \ + ${CHGRP} wheel config.pl config.pl.pre-${DISTVERSION} && \ + ${MV} config.pl hosts config.pl.pre-${DISTVERSION} \ + ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/ .include <bsd.port.mk> Modified: head/sysutils/backuppc/files/patch-configure.pl ============================================================================== --- head/sysutils/backuppc/files/patch-configure.pl Sun Jul 13 23:36:40 2014 (r361728) +++ head/sysutils/backuppc/files/patch-configure.pl Mon Jul 14 01:29:26 2014 (r361729) @@ -8,24 +8,3 @@ # # These are the programs whose paths we need to find -@@ -521,7 +521,7 @@ - # - # Create install directories - # --foreach my $dir ( qw(bin doc -+foreach my $dir ( qw(bin - lib/BackupPC/CGI - lib/BackupPC/Config - lib/BackupPC/Lang -@@ -689,9 +689,9 @@ - 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 WRKSRC\n"); - foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) { -- InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/doc/$doc", 0444); -+ InstallFile("doc/$doc", "./$doc", 0444); - } - - printf("Installing config.pl and hosts in $DestDir$Conf{ConfDir}\n"); Added: head/sysutils/backuppc/files/patch-doc-BackupPC.pod ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/backuppc/files/patch-doc-BackupPC.pod Mon Jul 14 01:29:26 2014 (r361729) @@ -0,0 +1,8 @@ +--- doc/BackupPC.pod.orig 2014-05-13 17:40:09.000000000 +0400 ++++ doc/BackupPC.pod 2014-05-13 17:40:27.000000000 +0400 +@@ -1,3 +1,5 @@ ++=encoding ISO8859-1 ++ + =head1 BackupPC Introduction + + This documentation describes BackupPC version 3.3.0, Added: head/sysutils/backuppc/files/pkg-deinstall.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/backuppc/files/pkg-deinstall.in Mon Jul 14 01:29:26 2014 (r361729) @@ -0,0 +1,21 @@ +#! /bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +echo +echo "=======================================================================" +echo " If you are permanently removing BackupPC, you should manually delete:" +echo " - the backuppc user/group: pw userdel backuppc" +if [ -d %%ETCDIR%% ]; then + echo " - BackupPC configuration: rm -r %%ETCDIR%%" +fi +if [ -d /var/db/BackupPC ]; then + echo " - BackupPC data directory: rm -r /var/db/BackupPC" +fi +if [ -d /var/log/BackupPC ]; then + echo " - BackupPC logs directory: rm -r /var/log/BackupPC" +fi +echo "=======================================================================" +echo Added: head/sysutils/backuppc/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/backuppc/files/pkg-message.in Mon Jul 14 01:29:26 2014 (r361729) @@ -0,0 +1,18 @@ +========================================================================== + - You need to customize %%ETCDIR%%/config.pl . + + If this is an upgrade, install BackupPC from port (not from package) + and make sure the full path of the existing BackupPC + configuration directory is %%ETCDIR%% . + Otherwise you will need to make changes in config.pl by hand. + + - Add the following line to /etc/rc.conf to enable BackupPC: + + backuppc_enable="YES" + + - Data directory is /var/db/BackupPC . + + This is where all the PC backup data is stored. + This file system needs to be big enough + to accommodate all the PCs you expect to backup. +========================================================================== Modified: head/sysutils/backuppc/pkg-plist ============================================================================== --- head/sysutils/backuppc/pkg-plist Sun Jul 13 23:36:40 2014 (r361728) +++ head/sysutils/backuppc/pkg-plist Mon Jul 14 01:29:26 2014 (r361729) @@ -1,3 +1,15 @@ +@stopdaemon backuppc +@unexec if cmp -s %D/%%ETCDIR%%/config.pl %D/%%ETCDIR%%/config.pl.sample; then rm -f %D/%%ETCDIR%%/config.pl; fi +@unexec if cmp -s %D/%%ETCDIR%%/hosts %D/%%ETCDIR%%/hosts.sample; then rm -f %D/%%ETCDIR%%/hosts; fi +@rmtry %%ETCDIR%%/config.pl.sample +@rmtry %%ETCDIR%%/hosts.sample +@mode 0555 +@stopdaemon backuppc +@unexec if cmp -s %D/%%ETCDIR%%/config.pl %D/%%ETCDIR%%/config.pl.sample; then rm -f %D/%%ETCDIR%%/config.pl; fi +@unexec if cmp -s %D/%%ETCDIR%%/hosts %D/%%ETCDIR%%/hosts.sample; then rm -f %D/%%ETCDIR%%/hosts; fi +@rmtry %%ETCDIR%%/config.pl.sample +@rmtry %%ETCDIR%%/hosts.sample +@mode 0555 bin/BackupPC bin/BackupPC_archive bin/BackupPC_archiveHost @@ -16,6 +28,7 @@ bin/BackupPC_tarPCCopy bin/BackupPC_trashClean bin/BackupPC_zcat bin/BackupPC_zipCreate +@mode 0444 lib/BackupPC/Attrib.pm lib/BackupPC/CGI/AdminOptions.pm lib/BackupPC/CGI/Archive.pm @@ -72,6 +85,10 @@ lib/BackupPC/Xfer/Tar.pm lib/BackupPC/Zip/FileMember.pm lib/Net/FTP/AutoReconnect.pm lib/Net/FTP/RetrHandle.pm +man/man1/backuppc.1.gz +%%PORTDOCS%%%%DOCSDIR%%/BackupPC.html +%%PORTDOCS%%%%DOCSDIR%%/BackupPC.pod +%%PORTDOCS%%@dirrm %%DOCSDIR%% %%WWWDIR%%/0000000.gif %%WWWDIR%%/0000011.gif %%WWWDIR%%/0001000.gif @@ -117,30 +134,50 @@ lib/Net/FTP/RetrHandle.pm %%WWWDIR%%/icon-symlink.png %%WWWDIR%%/logo.gif %%WWWDIR%%/sorttable.js -%%BPC_CGIDIR%%/BackupPC_Admin -@rmtry %%ETCDIR%%/hosts.sample -%%ETCDIR%%/config.pl.sample -@dirrmtry %%BPC_CGIDIR%% -@dirrmtry %%WWWDIR%% -@dirrmtry share/doc/backuppc -@dirrmtry lib/Net/FTP -@dirrmtry lib/Net -@dirrm lib/BackupPC/Zip -@dirrm lib/BackupPC/Xfer -@dirrm lib/BackupPC/Storage -@dirrm lib/BackupPC/Lang -@dirrm lib/BackupPC/Config +@owner backuppc +@group backuppc +@mode 04554 +%%CGIDIR%%/BackupPC_Admin +@owner +@group +@mode @dirrm lib/BackupPC/CGI +@dirrm lib/BackupPC/Config +@dirrm lib/BackupPC/Lang +@dirrm lib/BackupPC/Storage +@dirrm lib/BackupPC/Xfer +@dirrm lib/BackupPC/Zip @dirrm lib/BackupPC -@unexec echo -@unexec echo "If you are permanently removing BackupPC, you should manually delete:" -@unexec echo -@unexec echo " - the backuppc user/group: pw userdel backuppc" -@unexec rmdir %D/%%ETCDIR%% 2>/dev/null || echo " - BackupPC configuration: rm -r %D/%%ETCDIR%%" -@dirrmtry %%BPC_DATADIR%%/cpool -@dirrmtry %%BPC_DATADIR%%/pc -@dirrmtry %%BPC_DATADIR%%/pool -@dirrmtry %%BPC_DATADIR%%/trash -@unexec rmdir %%BPC_DATADIR%% 2>/dev/null || echo " - BackupPC data directory: rm -r %%BPC_DATADIR%%" -@unexec rmdir /var/log/BackupPC 2>/dev/null || echo " - BackupPC logs directory: rm -r /var/log/BackupPC" -@unexec echo +@dirrm lib/Net/FTP +@dirrm lib/Net +@dirrmtry %%WWWDIR%% +@dirrmtry %%CGIDIR%% +@exec install -d -o backuppc -g backuppc -m 0750 /var/log/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/cpool +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pc +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/pool +@exec install -d -o backuppc -g backuppc -m 0750 /var/db/BackupPC/trash +@dirrmtry /var/log/BackupPC +@dirrmtry /var/db/BackupPC/cpool +@dirrmtry /var/db/BackupPC/pc +@dirrmtry /var/db/BackupPC/pool +@dirrmtry /var/db/BackupPC/trash +@dirrmtry /var/db/BackupPC +@owner backuppc +@group backuppc +@dirrmtry %%ETCDIR%% +@mode 0640 +libexec/backuppc/config.pl.pre-%%DISTVERSION%% +@exec if [ -s %D/%F -a ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/; fi +libexec/backuppc/config.pl +@exec if [ ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/config.pl.sample; fi +@exec cp -p %D/%F %D/%%ETCDIR%%/ +@mode 0644 +libexec/backuppc/hosts +@exec if [ ! -f %D/%%ETCDIR%%/%f ]; then cp -p %D/%F %D/%%ETCDIR%%/hosts.sample; fi +@exec cp -p %D/%F %D/%%ETCDIR%%/ +@owner +@group +@mode +@dirrm libexec/backuppc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407140129.s6E1TQYc027210>