mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Apply patch to configure.pl to fix incompatibility with Data::Dumper>2.182
This commit is contained in:
parent
9a0afeb746
commit
1359364c05
@ -14,6 +14,8 @@ ENV RSYNC_BPC_VERSION="${RSYNC_BPC_VERSION}"
|
||||
RUN apk --no-cache --update add \
|
||||
rsync tar bash shadow ca-certificates \
|
||||
supervisor \
|
||||
# TODO: Remove patch when appliance of datadumper.path is not needed anymore
|
||||
patch \
|
||||
perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing perl-json-xs \
|
||||
expat samba-client iputils openssh openssl rrdtool ttf-dejavu \
|
||||
msmtp lighttpd lighttpd-mod_auth apache2-utils tzdata libstdc++ libgomp \
|
||||
@ -50,6 +52,8 @@ COPY files/auth.conf /etc/lighttpd/auth.conf
|
||||
COPY files/auth-ldap.conf /etc/lighttpd/auth-ldap.conf
|
||||
COPY files/entrypoint.sh /entrypoint.sh
|
||||
COPY files/supervisord.conf /etc/supervisord.conf
|
||||
# TODO: Remove when this patch is not applied anymore in entrypoint.sh
|
||||
COPY files/datadumper.patch /datadumper.patch
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
35
files/datadumper.patch
Normal file
35
files/datadumper.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/configure.pl b/configure.pl
|
||||
index 6826ebc..d5deef5 100755
|
||||
--- a/configure.pl
|
||||
+++ b/configure.pl
|
||||
@@ -668,7 +668,7 @@ if ( defined($Conf{CgiUserConfigEdit}) ) {
|
||||
if ( defined($Conf{CgiUserConfigEdit}{$p}) );
|
||||
}
|
||||
$Conf{CgiUserConfigEdit} = $new;
|
||||
- my $d = Data::Dumper->new([$new], [*value]);
|
||||
+ my $d = Data::Dumper->new([$new]);
|
||||
$d->Indent(1);
|
||||
$d->Terse(1);
|
||||
$d->Sortkeys(1);
|
||||
diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm
|
||||
index e9df664..09fcb24 100644
|
||||
--- a/lib/BackupPC/Storage/Text.pm
|
||||
+++ b/lib/BackupPC/Storage/Text.pm
|
||||
@@ -422,7 +422,7 @@ sub ConfigFileMerge
|
||||
my $var = $1;
|
||||
$skipExpr = "\$fakeVar = $2\n";
|
||||
if ( exists($newConf->{$var}) ) {
|
||||
- my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
|
||||
+ my $d = Data::Dumper->new([$newConf->{$var}]);
|
||||
$d->Indent(1);
|
||||
$d->Terse(1);
|
||||
$d->Sortkeys(1);
|
||||
@@ -454,7 +454,7 @@ sub ConfigFileMerge
|
||||
#
|
||||
foreach my $var ( sort(keys(%$newConf)) ) {
|
||||
next if ( $done->{$var} );
|
||||
- my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
|
||||
+ my $d = Data::Dumper->new([$newConf->{$var}]);
|
||||
$d->Indent(1);
|
||||
$d->Terse(1);
|
||||
$d->Sortkeys(1);
|
@ -43,6 +43,10 @@ if [ -f /firstrun ]; then
|
||||
tar xf "BackupPC-$BACKUPPC_VERSION.tar.gz"
|
||||
cd "/root/BackupPC-$BACKUPPC_VERSION"
|
||||
|
||||
# Fix BackupPC code to make it run with Data::Dumper >= 2.182.
|
||||
# TODO: Remove this patch once https://github.com/backuppc/backuppc/issues/466 has been merged in a new BackupPC release.
|
||||
patch -p1 < /datadumper.patch && rm -f /datadumper.patch
|
||||
|
||||
# Configure WEB UI access
|
||||
configure_admin=""
|
||||
if [ ! -f /etc/backuppc/htpasswd ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user