rpms/BackupPC/devel BackupPC-2.1.2pl2.diff, NONE, 1.1 BackupPC.htaccess, NONE, 1.1 BackupPC.logrotate, NONE, 1.1 BackupPC.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Michael Patrick McGrath (mmcgrath) fedora-extras-commits at redhat.com
Thu Jul 27 20:04:03 UTC 2006


Author: mmcgrath

Update of /cvs/extras/rpms/BackupPC/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8199/devel

Modified Files:
	.cvsignore sources 
Added Files:
	BackupPC-2.1.2pl2.diff BackupPC.htaccess BackupPC.logrotate 
	BackupPC.spec 
Log Message:
auto-import BackupPC-2.1.2-6 on branch devel from BackupPC-2.1.2-6.src.rpm

BackupPC-2.1.2pl2.diff:

--- NEW FILE BackupPC-2.1.2pl2.diff ---
#
# BackupPC-2.1.2pl2.diff: BackupPC patch file generated
# on Sun Jun 18 19:36:32 2006.
#
# This patch file should be applied to a cleanly unpacked BackupPC
# version 2.1.2.  Do not apply any old patch files; each
# patch file accumulates all previous changes.
#
# Example:
#
#     # fetch BackupPC-2.1.2.tar.gz
#     # fetch BackupPC-2.1.2pl2.diff
#     tar zxvf BackupPC-2.1.2.tar.gz
#     cd BackupPC-2.1.2
#     patch -p0 < ../BackupPC-2.1.2pl2.diff
#     perl configure.pl
#
# ChangeLog:
#
#  - In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs}
#    and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and
#    "Can't open .../f%2f for empty output" errors with rsync 2.6.7+.
#    Fix proposed by Justin Pessa and Vincent Ho, and confirmed by
#    Dan Niles.
#
#  - Added patch from Michael (mna.news) to ignore "file is unchanged"
#    message from tar 1.15.x during incremental backups.
#
#  - Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
#    when used with xtar on MacOS.  Reported by Samuel Bancal and
#    Matthew Radey, who helped with debugging.
#
#  - Fixed bug in BackupPC_tarExtract for files >8GB in size whose
#    lengths are multiples of 256.  Reported by Jamie Myers and
#    Marko Tukiainen, who both helped debugging the problem.
#
#  - Fixed bug in lib/BackupPC/Xfer/RsyncFileIO.pm that caused
#    incorrected deleted attributes to be set in directories
#    where one of the files had an rsync phase 1 retry during
#    an incremental.  Reported by Tony Nelson.
#
--- bin/BackupPC_tarExtract	2005-09-05 16:21:21.000000000 -0700
+++ bin/BackupPC_tarExtract	2006-06-18 19:36:31.995945464 -0700
@@ -58,7 +58,7 @@
     exit(1);
 }
 my $client = $1;
-if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
+if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
     print("$0: bad share name '$ARGV[1]'\n");
     exit(1);
 }
@@ -101,7 +101,7 @@
 #                 Copyright 1998 Stephen Zander. All rights reserved.
 #
 my $tar_unpack_header
-    = 'Z100 A8 A8 A8 A12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
+    = 'Z100 A8 A8 A8 a12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
 my $tar_header_length = 512;
 
 my $BufSize  = 1048576;     # 1MB or 2^20
@@ -251,7 +251,7 @@
         $name     = $longName if ( defined($longName) );
         $linkname = $longLink if ( defined($longLink) );
         $name     =~ s{^\./+}{};
-        $name     =~ s{/+$}{};
+        $name     =~ s{/+\.?$}{};
         $name     =~ s{//+}{/}g;
         return {
             name       => $name,
@@ -313,7 +313,7 @@
         #
         my($nRead);
         #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -351,7 +351,7 @@
 	# a plain file.
         #
         $f->{size} = length($f->{linkname});
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -369,7 +369,7 @@
         # contents.
         #
         $f->{size} = length($f->{linkname});
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          $f->{size}, $Compress);
@@ -393,7 +393,7 @@
         } else {
             $data = "$f->{devmajor},$f->{devminor}";
         }
-        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+        pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
         my $poolWrite = BackupPC::PoolWrite->new($bpc,
                                          "$OutDir/$ShareName/$f->{mangleName}",
                                          length($data), $Compress);
@@ -487,17 +487,21 @@
 #
 sub pathCreate
 {
-    my($dir, $fullPath, $file, $f) = @_;
+    my($dir, $fullPath, $f) = @_;
 
     #
     # Get parent directory of each of $dir and $fullPath
     #
-    $dir      =~ s{/[^/]*$}{};
+    # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
+    $dir      =~ s{/([^/]*)$}{};
+    my $file  = $bpc->fileNameUnmangle($1);
     $fullPath =~ s{/[^/]*$}{};
-    return if ( -d $fullPath );
+    return if ( -d $fullPath || $file eq "" );
+    unlink($fullPath) if ( -e $fullPath );
     mkpath($fullPath, 0, 0777);
     $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
                                 if ( !defined($Attrib{$dir}) );
+    # print("pathCreate: adding file = $file to dir = $dir\n");
     $Attrib{$dir}->set($file, {
                             type  => BPC_FTYPE_DIR,
                             mode  => 0755,
--- lib/BackupPC/Lib.pm	2005-09-05 16:21:21.000000000 -0700
+++ lib/BackupPC/Lib.pm	2006-06-18 19:36:32.035939384 -0700
@@ -59,7 +59,7 @@
         TopDir  => $topDir || '__TOPDIR__',
         BinDir  => $installDir || '__INSTALLDIR__',
         LibDir  => $installDir || '__INSTALLDIR__',
-        Version => '2.1.2',
+        Version => '2.1.2pl2',
         BackupFields => [qw(
                     num type startTime endTime
                     nFiles size nFilesExist sizeExist nFilesNew sizeNew
--- lib/BackupPC/Xfer/RsyncFileIO.pm	2005-09-05 16:21:21.000000000 -0700
+++ lib/BackupPC/Xfer/RsyncFileIO.pm	2006-06-18 19:36:32.120926464 -0700
@@ -405,6 +405,11 @@
     my($fio, $d) = @_;
     my($poolWrite);
 
+    #
+    # Don't write attributes on 2nd phase - they're already
+    # taken care of during the first phase.
+    #
+    return if ( $fio->{phase} > 0 );
     if ( !defined($d) ) {
         #
         # flush all entries (in reverse order)
@@ -932,6 +937,7 @@
 
     close($fio->{rxInFd})  if ( defined($fio->{rxInFd}) );
     unlink("$fio->{outDirSh}RStmp") if  ( -f "$fio->{outDirSh}RStmp" );
+    $fio->{phase} = $phase;
 
     #
     # Check the final md4 digest
--- lib/BackupPC/Xfer/Tar.pm	2005-09-05 16:21:21.000000000 -0700
+++ lib/BackupPC/Xfer/Tar.pm	2006-06-18 19:36:32.110927984 -0700
@@ -221,8 +221,13 @@
             $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
             $t->{fileCnt}++;
         } else {
-            $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
-            $t->{xferErrCnt}++;
+            #
+            # Ignore annoying log message on incremental for tar 1.15.x
+            #
+            if ( !/: file is unchanged; not dumped$/ ) {
+                $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
+                $t->{xferErrCnt}++;
+            }
 	    #
 	    # If tar encounters a minor error, it will exit with a non-zero
 	    # status.  We still consider that ok.  Remember if tar prints
--- conf/config.pl	2005-09-05 16:21:22.000000000 -0700
+++ conf/config.pl	2006-06-18 19:36:31.968949568 -0700
@@ -1052,7 +1052,7 @@
             '--perms',
             '--owner',
             '--group',
-            '--devices',
+            '-D',
             '--links',
             '--times',
             '--block-size=2048',
@@ -1086,7 +1086,7 @@
 	    '--perms',
 	    '--owner',
 	    '--group',
-	    '--devices',
+	    '-D',
 	    '--links',
 	    '--times',
 	    '--block-size=2048',


--- NEW FILE BackupPC.htaccess ---
<Directory       /usr/share/BackupPC/sbin/>
# BackupPC requires valid authentication in order for the web interface to
# function properly.  One can view the web interface without authentication
# though all functionality is disabled.
# 
# htpasswd -c /etc/BackupPC/apache.users yourusername
# 

order deny,allow
deny from all
allow from 127.0.0.1
AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName "BackupPC

require valid-user

</Directory>


Alias           /BackupPC/images        /usr/share/BackupPC/html/
ScriptAlias     /BackupPC               /usr/share/BackupPC/sbin/BackupPC_Admin


--- NEW FILE BackupPC.logrotate ---
# ----- logrotate config -------------
# BackupPC rotates its own logs!  Do not enable this unless BackupPC's internal
# log rotation system has been disabled or if you REALLY know what you are doing.

#/var/log/BackupPC/LOG {
#       missingok
#       weekly
#       notifempty
#       nocompress
#       create 644 backuppc backuppc
#}


--- NEW FILE BackupPC.spec ---
Name:		BackupPC
Version:	2.1.2
Release:	6%{?dist}
Summary:	BackupPC - high-performance backup system

Group:		Applications/System
License:	GPL
URL:		http://backuppc.sourceforge.net/
Source0:	http://dl.sourceforge.net/backuppc/%{name}-%{version}.tar.gz
Source1:	BackupPC.htaccess
Source2:	BackupPC.logrotate
Patch0:		BackupPC-2.1.2pl2.diff
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch

BuildRequires:	/bin/cat /bin/df /bin/gtar %{_bindir}/nmblookup %{_bindir}/rsync %{_sbindir}/sendmail %{_bindir}/smbclient %{_bindir}/split %{_bindir}/ssh
Requires: httpd
Requires: perl-suidperl
Requires: perl(File::RsyncP)
Requires: rsync
Requires(pre): %{_sbindir}/useradd
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(post): /sbin/chkconfig, /sbin/service, %{_sbindir}/usermod
Requires(postun): /sbin/service



%description
BackupPC is a high-performance, enterprise-grade system for backing up Linux
and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable
and easy to install and maintain.

%prep
%setup -q
%patch0 -p0
sed -i s/\"backuppc\"/\"$LOGNAME\"/ configure.pl

# There is no good build method for backuppc.  Instead the configure script
# also does installation of files.

%install
rm -rf %{buildroot}
perl configure.pl --batch \
		--cgi-dir %{buildroot}/%{_datadir}/%{name}/sbin/ \
		--data-dir %{buildroot}/%{_localstatedir}/lib/%{name}/ \
		--html-dir %{buildroot}/%{_datadir}/%{name}/html/ \
		--html-dir-url /%{name}/images \
		--install-dir %{buildroot}/%{_datadir}/%{name} \
		--uid-ignore
for f in `find %{buildroot}`
do
	if [ -f $f ]
	then
		sed -i s,%{buildroot},,g $f
		sed -i s,$LOGNAME,backuppc,g $f
	fi
done
sed -i s,%{buildroot},,g init.d/linux-backuppc
sed -i s,$LOGNAME,backuppc,g init.d/linux-backuppc

%{__mkdir} -p %{buildroot}/%{_initrddir}
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/logrotate.d/
%{__mkdir} -p %{buildroot}/%{_localstatedir}/log/%{name}

%{__cp} init.d/linux-backuppc %{buildroot}/%{_initrddir}/%{name}
%{__cp} %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf
%{__cp} %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}

%{__chmod} 755 %{buildroot}/%{_datadir}/%{name}/bin/*
%{__chmod} 755 %{buildroot}/%{_initrddir}/%{name}

%{__mv} %{buildroot}/%{_localstatedir}/lib/%{name}/conf %{buildroot}/%{_sysconfdir}/%{name}

%{__rm} -f %{buildroot}/%{_datadir}/%{name}/html/CVS
%{__rm} -rf %{buildroot}/%{_localstatedir}/lib/%{name}/log

sed -i 's/^\$Conf{XferMethod}\ =.*/$Conf{XferMethod} = "rsync";/' %{buildroot}/%{_sysconfdir}/%{name}/config.pl
sed -i 's/^\$Conf{ServerHost}\ =.*/$Conf{ServerHost} = "localhost";/' %{buildroot}/%{_sysconfdir}/%{name}/config.pl
sed -i 's,^\$Conf{CgiURL}\ =.*,$Conf{CgiURL} = "http://localhost/cgi-bin/BackupPC_Admin";,' %{buildroot}/%{_sysconfdir}/%{name}/config.pl

ln -s %{_sysconfdir}/%{name}/ %{buildroot}/%{_localstatedir}/lib/%{name}/conf
ln -s ../../log/%{name}/ %{buildroot}/%{_localstatedir}/lib/%{name}/log


%clean
rm -rf %{buildroot}


%pre
%{_sbindir}/useradd -d %{_localstatedir}/lib/%{name} -r -s /sbin/nologin backuppc 2> /dev/null || :

%preun
if [ $1 = 0 ]; then
        /sbin/service %{name} stop > /dev/null 2>&1 || :
        /sbin/chkconfig --del %{name} || :
fi

%post
/sbin/chkconfig --add %{name} || :
/sbin/service httpd condrestart > /dev/null 2>&1 || :
%{_sbindir}/usermod -a -G backuppc apache || :

%postun
/sbin/service httpd condrestart > /dev/null 2>&1 || :

%files
%defattr(-,root,root,-)
%doc README ChangeLog LICENSE doc/
%dir %{_datadir}/%{name}/

%dir %attr(-,backuppc,backuppc) %{_localstatedir}/log/%{name}
%dir %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/

%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%config(noreplace) %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}

%{_datadir}/%{name}/[^s]*
%{_initrddir}/%{name}

%attr(4750,backuppc,apache) %{_datadir}/%{name}/sbin/BackupPC_Admin
%attr(-,backuppc,root) %{_localstatedir}/lib/%{name}/


%changelog
* Tue Jul 25 2006 Mike McGrath <imlinux at gmail.com> 2.1.2-6
- One more config change

* Sun Jul 23 2006 Mike McGrath <imlinux at gmail.com> 2.1.2-5
- Added upstream patch for better support for rsync

* Sun Jul 23 2006 Mike McGrath <imlinux at gmail.com> 2.1.2-4
- Properly marking config files as such

* Sun Jul 23 2006 Mike McGrath <imlinux at gmail.com> 2.1.2-3
- Changes to defaults in config.pl
- Added Requires: rsync

* Fri Jul 21 2006 Mike McGrath <imlinux at gmail.com> 2.1.2-2
- Added requires: perl(File::RsyncP)

* Tue Jul 18 2006 Mike McGrath <imlinux at gmail.com> 2.1.2-1
- Initial Fedora Packaging


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/BackupPC/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	27 Jul 2006 20:02:55 -0000	1.1
+++ .cvsignore	27 Jul 2006 20:04:03 -0000	1.2
@@ -0,0 +1 @@
+BackupPC-2.1.2.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/BackupPC/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	27 Jul 2006 20:02:55 -0000	1.1
+++ sources	27 Jul 2006 20:04:03 -0000	1.2
@@ -0,0 +1 @@
+72fc0f09084f44c42ba5d22451cfe29b  BackupPC-2.1.2.tar.gz




More information about the fedora-extras-commits mailing list