summaryrefslogtreecommitdiff
path: root/app-backup/backuppc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-backup/backuppc/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-backup/backuppc/files')
-rw-r--r--app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch11
-rw-r--r--app-backup/backuppc/files/3.2.0/05-nicelevel.patch18
-rw-r--r--app-backup/backuppc/files/3.3.0/01-fix-configure.pl.patch30
-rw-r--r--app-backup/backuppc/files/3.3.0/02-fix-config.pl-formatting.patch137
-rw-r--r--app-backup/backuppc/files/3.3.0/03-reasonable-config.pl-defaults.patch64
-rw-r--r--app-backup/backuppc/files/99_backuppc.conf32
-rw-r--r--app-backup/backuppc/files/backuppc-3.3.1-perl522.patch17
-rw-r--r--app-backup/backuppc/files/backuppc-3.3.1-perl526.patch21
-rw-r--r--app-backup/backuppc/files/backuppc.service13
9 files changed, 343 insertions, 0 deletions
diff --git a/app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch b/app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch
new file mode 100644
index 000000000000..0355aedf04b7
--- /dev/null
+++ b/app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch
@@ -0,0 +1,11 @@
+--- lib/BackupPC/CGI/View.pm.orig 2009-09-30 19:08:34.353577546 +0300
++++ lib/BackupPC/CGI/View.pm 2009-09-30 19:16:01.982412712 +0300
+@@ -86,7 +86,7 @@
+ $file = $bpc->ConfDir() . "/hosts";
+ $linkHosts = 1;
+ } elsif ( $type eq "docs" ) {
+- $file = $bpc->InstallDir() . "/doc/BackupPC.html";
++ $file = "__DOCDIR__/BackupPC.html";
+ } elsif ( $host ne "" ) {
+ if ( !defined($In{num}) ) {
+ # get the latest LOG file
diff --git a/app-backup/backuppc/files/3.2.0/05-nicelevel.patch b/app-backup/backuppc/files/3.2.0/05-nicelevel.patch
new file mode 100644
index 000000000000..50938f60bcdc
--- /dev/null
+++ b/app-backup/backuppc/files/3.2.0/05-nicelevel.patch
@@ -0,0 +1,18 @@
+--- init.d/src/gentoo-backuppc.orig 2009-10-18 00:14:44.125346723 +0300
++++ init.d/src/gentoo-backuppc 2009-10-18 00:15:37.101346981 +0300
+@@ -21,7 +21,7 @@
+ start() {
+ checkconfig || return 1
+ ebegin "Starting BackupPC"
+- start-stop-daemon --start --chuid ${USER} --user ${USER} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS}
++ start-stop-daemon --start --chuid ${USER} --user ${USER} --nicelevel ${NICELEVEL} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS}
+ eend $?
+ }
+
+--- init.d/src/gentoo-backuppc.conf.orig 2009-10-18 00:14:52.513347638 +0300
++++ init.d/src/gentoo-backuppc.conf 2009-10-18 00:16:03.457346630 +0300
+@@ -3,3 +3,4 @@
+ PID_FILE=__LOGDIR__/BackupPC.pid
+ EXEC=__INSTALLDIR__/bin/BackupPC
+ EXEC_OPTIONS=-d
++NICELEVEL=0
diff --git a/app-backup/backuppc/files/3.3.0/01-fix-configure.pl.patch b/app-backup/backuppc/files/3.3.0/01-fix-configure.pl.patch
new file mode 100644
index 000000000000..c943fdce68b1
--- /dev/null
+++ b/app-backup/backuppc/files/3.3.0/01-fix-configure.pl.patch
@@ -0,0 +1,30 @@
+--- configure.pl.dist 2013-09-23 23:01:19.524743747 +0300
++++ configure.pl 2013-09-23 23:01:37.344567459 +0300
+@@ -158,7 +158,7 @@
+ # config file to get all the defaults.
+ #
+ my $ConfigPath = "";
+-my $ConfigFileOK = 1;
++my $ConfigFileOK = 0;
+ while ( 1 ) {
+ if ( $ConfigFileOK && -f "/etc/BackupPC/config.pl" ) {
+ $ConfigPath = "/etc/BackupPC/config.pl";
+@@ -213,7 +213,8 @@
+ $bpc->{LogDir} = $Conf{LogDir} = "$Conf{TopDir}/log"
+ if ( $Conf{LogDir} eq '' );
+ }
+- $bpc->{ConfDir} = $Conf{ConfDir} = $confDir;
++ # Disable this as it's not really neccessary for this ebuild
++ # $bpc->{ConfDir} = $Conf{ConfDir} = $confDir;
+ my $err = $bpc->ServerConnect($Conf{ServerHost}, $Conf{ServerPort}, 1);
+ if ( $err eq "" ) {
+ print <<EOF;
+@@ -729,7 +730,7 @@
+ if ( $Conf{CgiDir} =~ m{cgi-bin(/.*)} ) {
+ $Conf{CgiURL} = "'http://$Conf{ServerHost}/cgi-bin$1/BackupPC_Admin'";
+ } else {
+- $Conf{CgiURL} = "'http://$Conf{ServerHost}/cgi-bin/BackupPC_Admin'";
++ $Conf{CgiURL} = "'http://$Conf{ServerHost}/BackupPC_Admin'";
+ }
+ }
+
diff --git a/app-backup/backuppc/files/3.3.0/02-fix-config.pl-formatting.patch b/app-backup/backuppc/files/3.3.0/02-fix-config.pl-formatting.patch
new file mode 100644
index 000000000000..79ad6547fa6f
--- /dev/null
+++ b/app-backup/backuppc/files/3.3.0/02-fix-config.pl-formatting.patch
@@ -0,0 +1,137 @@
+--- conf/config.pl.dist 2013-09-23 23:05:50.332064754 +0300
++++ conf/config.pl 2013-09-23 23:07:44.110943607 +0300
+@@ -355,7 +355,7 @@
+ # needs to be a full path and you can't include shell syntax like
+ # redirection and pipes; put that in a script if you need it.
+ #
+-$Conf{ServerInitdPath} = '';
++$Conf{ServerInitdPath} = undef;
+ $Conf{ServerInitdStartCmd} = '';
+
+
+@@ -373,7 +373,7 @@
+ # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
+ # will make the actual backup interval a bit longer.
+ #
+-$Conf{FullPeriod} = 6.97;
++$Conf{FullPeriod} = '6.97';
+
+ #
+ # Minimum period in days between incremental backups (a user requested
+@@ -383,7 +383,7 @@
+ # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
+ # will make the actual backup interval a bit longer.
+ #
+-$Conf{IncrPeriod} = 0.97;
++$Conf{IncrPeriod} = '0.97';
+
+ #
+ # Number of full backups to keep. Must be >= 1.
+@@ -458,7 +458,7 @@
+ # $Conf{FullKeepCnt} = 4;
+ # $Conf{FullKeepCnt} = [4];
+ #
+-$Conf{FullKeepCnt} = 1;
++$Conf{FullKeepCnt} = [1];
+
+ #
+ # Very old full backups are removed after $Conf{FullAgeMax} days. However,
+@@ -688,7 +688,7 @@
+ # '*' => ['/myFiles', '/important'], # these are other shares
+ # };
+ #
+-$Conf{BackupFilesOnly} = undef;
++$Conf{BackupFilesOnly} = {};
+
+ #
+ # List of directories or files to exclude from the backup. For Smb,
+@@ -749,7 +749,7 @@
+ # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
+ # };
+ #
+-$Conf{BackupFilesExclude} = undef;
++$Conf{BackupFilesExclude} = {};
+
+ #
+ # PCs that are always or often on the network can be backed up after
+@@ -932,7 +932,7 @@
+ #
+ # This setting only matters if $Conf{XferMethod} = 'smb'.
+ #
+-$Conf{SmbShareName} = 'C$';
++$Conf{SmbShareName} = ['C$'];
+
+ #
+ # Smbclient share user name. This is passed to smbclient's -U argument.
+@@ -1054,7 +1054,7 @@
+ #
+ # This setting only matters if $Conf{XferMethod} = 'tar'.
+ #
+-$Conf{TarShareName} = '/';
++$Conf{TarShareName} = ['/'];
+
+ #
+ # Command to run tar on the client. GNU tar is required. You will
+@@ -1233,7 +1233,7 @@
+ #
+ # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
+ #
+-$Conf{RsyncShareName} = '/';
++$Conf{RsyncShareName} = ['/'];
+
+ #
+ # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
+@@ -1285,7 +1285,7 @@
+ #
+ # This setting has no effect unless checksum caching is turned on.
+ #
+-$Conf{RsyncCsumCacheVerifyProb} = 0.01;
++$Conf{RsyncCsumCacheVerifyProb} = '0.01';
+
+ #
+ # Arguments to rsync for backup. Do not edit the first set unless you
+@@ -1883,7 +1883,7 @@
+ # rounded up (ie: 2.5 means a user will never receive email more
+ # than once every 3 days).
+ #
+-$Conf{EMailNotifyMinDays} = 2.5;
++$Conf{EMailNotifyMinDays} = '2.5';
+
+ #
+ # Name to use as the "from" name for email. Depending upon your mail
+@@ -1938,7 +1938,7 @@
+ # When there have been no backups in this number of days the user
+ # is sent an email.
+ #
+-$Conf{EMailNotifyOldBackupDays} = 7.0;
++$Conf{EMailNotifyOldBackupDays} = 7;
+
+ #
+ # This subject and message is sent to a user if their PC has not recently
+@@ -1965,7 +1965,7 @@
+ # How old the most recent backup of Outlook files has to be before
+ # notifying user.
+ #
+-$Conf{EMailNotifyOldOutlookDays} = 5.0;
++$Conf{EMailNotifyOldOutlookDays} = 5;
+
+ #
+ # This subject and message is sent to a user if their Outlook files have
+@@ -2102,14 +2102,17 @@
+ {
+ link => "?action=view&type=docs",
+ lname => "Documentation", # actually displays $Lang->{Documentation}
++ name => undef,
+ },
+ {
+ link => "http://backuppc.wiki.sourceforge.net",
+ name => "Wiki", # displays literal "Wiki"
++ lname => undef,
+ },
+ {
+ link => "http://backuppc.sourceforge.net",
+ name => "SourceForge", # displays literal "SourceForge"
++ lname => undef,
+ },
+ ];
+
diff --git a/app-backup/backuppc/files/3.3.0/03-reasonable-config.pl-defaults.patch b/app-backup/backuppc/files/3.3.0/03-reasonable-config.pl-defaults.patch
new file mode 100644
index 000000000000..8b54fc87b050
--- /dev/null
+++ b/app-backup/backuppc/files/3.3.0/03-reasonable-config.pl-defaults.patch
@@ -0,0 +1,64 @@
+--- conf/config.pl.formatted 2013-09-23 23:12:30.708129365 +0300
++++ conf/config.pl 2013-09-23 23:12:39.448043656 +0300
+@@ -1305,7 +1305,7 @@
+ '--times',
+ '--block-size=2048',
+ '--recursive',
+-
++ '--specials',
+ #
+ # Rsync >= 2.6.3 supports the --checksum-seed option
+ # which allows rsync checksum caching on the server.
+@@ -1313,7 +1313,7 @@
+ # you have a recent client rsync version and you want
+ # to enable checksum caching.
+ #
+- #'--checksum-seed=32761',
++ '--checksum-seed=32761',
+ ];
+
+ #
+@@ -1383,6 +1383,7 @@
+ '--relative',
+ '--ignore-times',
+ '--recursive',
++ '--specials',
+
+ #
+ # Rsync >= 2.6.3 supports the --checksum-seed option
+@@ -1391,7 +1392,7 @@
+ # you have a recent client rsync version and you want
+ # to enable checksum caching.
+ #
+- #'--checksum-seed=32761',
++ '--checksum-seed=32761',
+
+ #
+ # Add additional arguments here
+@@ -2029,7 +2030,7 @@
+ # --> administrative users are only craig and celia'.
+ #
+ $Conf{CgiAdminUserGroup} = '';
+-$Conf{CgiAdminUsers} = '';
++$Conf{CgiAdminUsers} = 'backuppc';
+
+ #
+ # URL of the BackupPC_Admin CGI script. Used for email messages.
+@@ -2076,7 +2077,7 @@
+ # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
+ # for international dates (DD/MM).
+ #
+-$Conf{CgiDateFormatMMDD} = 1;
++$Conf{CgiDateFormatMMDD} = 2;
+
+ #
+ # If set, the complete list of hosts appears in the left navigation
+@@ -2262,7 +2263,7 @@
+ ClientTimeout => 1,
+ MaxOldPerPCLogFiles => 1,
+ CompressLevel => 1,
+- ClientNameAlias => 1,
++ ClientNameAlias => 0,
+ DumpPreUserCmd => 0,
+ DumpPostUserCmd => 0,
+ RestorePreUserCmd => 0,
diff --git a/app-backup/backuppc/files/99_backuppc.conf b/app-backup/backuppc/files/99_backuppc.conf
new file mode 100644
index 000000000000..eae766e4fa75
--- /dev/null
+++ b/app-backup/backuppc/files/99_backuppc.conf
@@ -0,0 +1,32 @@
+<IfDefine BACKUPPC>
+
+
+Listen 8080
+<VirtualHost 127.0.0.1:8080>
+ AssignUserId backuppc backuppc
+ DocumentRoot "/usr/lib/backuppc/htdocs/"
+ RedirectMatch ^/$ /BackupPC_Admin
+
+ <Directory "/usr/lib/backuppc/htdocs">
+ AuthType Basic
+ AuthName "BackupPC Community Edition Administrative Interface"
+ AuthUserFile "/etc/BackupPC/users.htpasswd"
+ Options ExecCGI
+ Require valid-user
+ Require host 127.0.0.1
+ </Directory>
+
+ <Location "/BackupPC_Admin">
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::Registry
+ PerlOptions +ParseHeaders
+ </Location>
+
+ <Directory "/usr/lib/backuppc/htdocs/image">
+ Require all granted
+ Options -ExecCGI
+ </Directory>
+</VirtualHost>
+
+
+</IfDefine>
diff --git a/app-backup/backuppc/files/backuppc-3.3.1-perl522.patch b/app-backup/backuppc/files/backuppc-3.3.1-perl522.patch
new file mode 100644
index 000000000000..fb7eeeef1e02
--- /dev/null
+++ b/app-backup/backuppc/files/backuppc-3.3.1-perl522.patch
@@ -0,0 +1,17 @@
+--- lib/BackupPC/CGI/Browse.pm 2016-11-22 20:52:03.622509160 +0100
++++ lib/BackupPC/CGI/Browse.pm 2016-11-22 20:50:35.871018400 +0100
+@@ -62,13 +62,13 @@ fix bug https://bugzilla.redhat.com/attachment.cgi?id=1104083
+ #
+ my @Backups = $bpc->BackupInfoRead($host);
+
+ #
+ # default to the newest backup
+ #
+- if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
++ if ( !defined($In{num}) && @Backups > 0 ) {
+ $i = @Backups - 1;
+ $num = $Backups[$i]{num};
+ }
+
+ for ( $i = 0 ; $i < @Backups ; $i++ ) {
+ last if ( $Backups[$i]{num} == $num );
diff --git a/app-backup/backuppc/files/backuppc-3.3.1-perl526.patch b/app-backup/backuppc/files/backuppc-3.3.1-perl526.patch
new file mode 100644
index 000000000000..3a04f94835c3
--- /dev/null
+++ b/app-backup/backuppc/files/backuppc-3.3.1-perl526.patch
@@ -0,0 +1,21 @@
+diff -ruN BackupPC-3.3.1.orig/lib/BackupPC/Lib.pm BackupPC-3.3.1/lib/BackupPC/Lib.pm
+--- BackupPC-3.3.1.orig/lib/BackupPC/Lib.pm 2015-01-12 01:19:53.000000000 +0100
++++ BackupPC-3.3.1/lib/BackupPC/Lib.pm 2017-07-08 00:31:52.100003197 +0200
+@@ -1261,7 +1261,7 @@
+ #
+ # Replace scalar variables first
+ #
+- $arg =~ s[\${(\w+)}(\+?)]{
++ $arg =~ s[\$\{(\w+)}(\+?)]{
+ exists($vars->{$1}) && ref($vars->{$1}) ne "ARRAY"
+ ? ($2 eq "+" ? $bpc->shellEscape($vars->{$1}) : $vars->{$1})
+ : "\${$1}$2"
+@@ -1270,7 +1270,7 @@
+ # Now replicate any array arguments; this just works for just one
+ # array var in each argument.
+ #
+- if ( $arg =~ m[(.*)\${(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
++ if ( $arg =~ m[(.*)\$\{(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
+ my $pre = $1;
+ my $var = $2;
+ my $esc = $3;
diff --git a/app-backup/backuppc/files/backuppc.service b/app-backup/backuppc/files/backuppc.service
new file mode 100644
index 000000000000..7c4877a4ee24
--- /dev/null
+++ b/app-backup/backuppc/files/backuppc.service
@@ -0,0 +1,13 @@
+[Unit]
+Description= BackupPC server
+After=syslog.target local-fs.target remote-fs.target
+
+[Service]
+Type=oneshot
+User=backuppc
+Group=backuppc
+ExecStart=/usr/bin/BackupPC -d
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target