Re: [BackupPC-users] Invalid config.pl via configuration web interface
Hi Iosif, spot on, thanks a lot - problem solved for me, and reported upstream for Arch Linux (https://bugs.archlinux.org/task/76499). Cheers, Alex On 11/9/22 13:44, Iosif Fettich wrote: > Hi Alexander, > > here's what probably has bitten yoou: > > --- > > Date: Fri, 15 Apr 2022 11:45:54 -0700 > From: Craig Barratt > Reply-To: backuppc/backuppc > > To: backuppc/backuppc > Cc: Iosif Fettich , Mention > Subject: [backuppc/backuppc] Config write fails with Data::Dumper versions >= > 2.182 (Issue #466) > Parts/Attachments: > 1 OK 11 lines Text > 2 Shown 23 lines Text > > > > @ifettich [github.com] discovered that config file writing fails with > Data::Dumper versions > 2.178 due to a typo in the Data::Dumper->new() call. > The second argument is missing a qw() wrapper. This was benign up to around > Data::Dumper version < 2.182, but some changes to the XS library since then > expose the long-time bug in BackupPC. > > Because Data::Dumper is used in terse mode, there's no need to provide the > variable name in the second argument. So the fix is to simply remove the 2nd > argument. That fix is backward compatible with older versions of Data::Dumper. > > --- > > Hope this helps a little bit. Mosty probably updating your BackupPC to the > corrected version is all you need to do (besides restoring the settings that > you had in use) > > Best regards, > > Iosif Fettich > > > > > > > On Wed, 9 Nov 2022, Alexander Kobel wrote: > >> Dear all, >> >> I receive validation errors of my config file after changes to the (global) >> config in the web interface. Consequently, BackupPC terminates. >> >> I'm absolutely sure that this worked before; my last (host) config change >> dates back to Feb 2022, the last global config change happened mid 2020. >> Unfortunately, I can't pinpoint a specific culprit (system) update anymore. >> Normal operation is not affected, so I didn't spot the issue earlier; just >> undoing the most recent perl-related updates from today's regular update >> does not help. >> >> The issue is that upon changing the main config or, e.g., adding a host, >> HASH or ARRAY entries in the config file are written with parentheses rather >> than braces or brackets, as expected. In turn, I receive >> >>> Software error: >>> >>> Not an ARRAY reference at /usr/share/backuppc/lib/BackupPC/CGI/Lib.pm line >>> 468. >> >> or similar messages on operations that re-read the config, accompanied by >> crashes of the server. Attached is a diff of the config folder, with entries >> like >> >> 2431c2431 >> < $Conf{ClientShareName2Path} = {}; >> --- >>> $Conf{ClientShareName2Path} = (); >> 2433c2433 >> < $Conf{RsyncIncrArgsExtra} = []; >> --- >>> $Conf{RsyncIncrArgsExtra} = (); >> >> I can fix the config manually and the server starts again; however, I'm not >> 100% confident whether some log/configuration data is written periodically, >> e.g. on nightlies, and more dragons hide behind the scenes. >> >> Did anyone experience a similar problem? Any know incompatibilities with one >> of the more recent perl packages? Any clues what might be the problem? >> >> For context, I'm on Arch, pretty much up-to-date; relevant versions of >> BackupPC, web server and dependencies are >> >> backuppc 4.4.0-5 >> lighttpd 1.4.67-1 >> >> glibc 2.36-6 >> popt 1.18-3 >> perl 5.36.0-1 >> par2cmdline 0.8.1-2 >> perl-archive-zip 1.68-7 >> perl-io-dirent 0.05-15 >> perl-file-listing 6.15-2 >> perl-time-modules 2013.0912-8 >> perl-cgi 4.54-2 >> perl-xml-rss 1.62-1 >> perl-json-xs 4.03-3 >> postfix 3.7.3-2 >> >> >> Thanks and cheers, >> Alex > > > ___ > BackupPC-users mailing list > BackupPC-users@lists.sourceforge.net > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki: https://github.com/backuppc/backuppc/wiki > Project: https://backuppc.github.io/backuppc/ smime.p7s Description: S/MIME Cryptographic Signature ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:https://github.com/backuppc/backuppc/wiki Project: https://backuppc.github.io/backuppc/
Re: [BackupPC-users] Invalid config.pl via configuration web interface
Hi Alexander, here's what probably has bitten yoou: --- Date: Fri, 15 Apr 2022 11:45:54 -0700 From: Craig Barratt Reply-To: backuppc/backuppc To: backuppc/backuppc Cc: Iosif Fettich , Mention Subject: [backuppc/backuppc] Config write fails with Data::Dumper versions >= 2.182 (Issue #466) Parts/Attachments: 1 OK 11 lines Text 2 Shown23 lines Text @ifettich [github.com] discovered that config file writing fails with Data::Dumper versions > 2.178 due to a typo in the Data::Dumper->new() call. The second argument is missing a qw() wrapper. This was benign up to around Data::Dumper version < 2.182, but some changes to the XS library since then expose the long-time bug in BackupPC. Because Data::Dumper is used in terse mode, there's no need to provide the variable name in the second argument. So the fix is to simply remove the 2nd argument. That fix is backward compatible with older versions of Data::Dumper. --- Hope this helps a little bit. Mosty probably updating your BackupPC to the corrected version is all you need to do (besides restoring the settings that you had in use) Best regards, Iosif Fettich On Wed, 9 Nov 2022, Alexander Kobel wrote: Dear all, I receive validation errors of my config file after changes to the (global) config in the web interface. Consequently, BackupPC terminates. I'm absolutely sure that this worked before; my last (host) config change dates back to Feb 2022, the last global config change happened mid 2020. Unfortunately, I can't pinpoint a specific culprit (system) update anymore. Normal operation is not affected, so I didn't spot the issue earlier; just undoing the most recent perl-related updates from today's regular update does not help. The issue is that upon changing the main config or, e.g., adding a host, HASH or ARRAY entries in the config file are written with parentheses rather than braces or brackets, as expected. In turn, I receive Software error: Not an ARRAY reference at /usr/share/backuppc/lib/BackupPC/CGI/Lib.pm line 468. or similar messages on operations that re-read the config, accompanied by crashes of the server. Attached is a diff of the config folder, with entries like 2431c2431 < $Conf{ClientShareName2Path} = {}; --- $Conf{ClientShareName2Path} = (); 2433c2433 < $Conf{RsyncIncrArgsExtra} = []; --- $Conf{RsyncIncrArgsExtra} = (); I can fix the config manually and the server starts again; however, I'm not 100% confident whether some log/configuration data is written periodically, e.g. on nightlies, and more dragons hide behind the scenes. Did anyone experience a similar problem? Any know incompatibilities with one of the more recent perl packages? Any clues what might be the problem? For context, I'm on Arch, pretty much up-to-date; relevant versions of BackupPC, web server and dependencies are backuppc 4.4.0-5 lighttpd 1.4.67-1 glibc 2.36-6 popt 1.18-3 perl 5.36.0-1 par2cmdline 0.8.1-2 perl-archive-zip 1.68-7 perl-io-dirent 0.05-15 perl-file-listing 6.15-2 perl-time-modules 2013.0912-8 perl-cgi 4.54-2 perl-xml-rss 1.62-1 perl-json-xs 4.03-3 postfix 3.7.3-2 Thanks and cheers, Alex ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:https://github.com/backuppc/backuppc/wiki Project: https://backuppc.github.io/backuppc/
[BackupPC-users] Invalid config.pl via configuration web interface
Dear all, I receive validation errors of my config file after changes to the (global) config in the web interface. Consequently, BackupPC terminates. I'm absolutely sure that this worked before; my last (host) config change dates back to Feb 2022, the last global config change happened mid 2020. Unfortunately, I can't pinpoint a specific culprit (system) update anymore. Normal operation is not affected, so I didn't spot the issue earlier; just undoing the most recent perl-related updates from today's regular update does not help. The issue is that upon changing the main config or, e.g., adding a host, HASH or ARRAY entries in the config file are written with parentheses rather than braces or brackets, as expected. In turn, I receive > Software error: > > Not an ARRAY reference at /usr/share/backuppc/lib/BackupPC/CGI/Lib.pm line > 468. or similar messages on operations that re-read the config, accompanied by crashes of the server. Attached is a diff of the config folder, with entries like 2431c2431 < $Conf{ClientShareName2Path} = {}; --- > $Conf{ClientShareName2Path} = (); 2433c2433 < $Conf{RsyncIncrArgsExtra} = []; --- > $Conf{RsyncIncrArgsExtra} = (); I can fix the config manually and the server starts again; however, I'm not 100% confident whether some log/configuration data is written periodically, e.g. on nightlies, and more dragons hide behind the scenes. Did anyone experience a similar problem? Any know incompatibilities with one of the more recent perl packages? Any clues what might be the problem? For context, I'm on Arch, pretty much up-to-date; relevant versions of BackupPC, web server and dependencies are backuppc 4.4.0-5 lighttpd 1.4.67-1 glibc 2.36-6 popt 1.18-3 perl 5.36.0-1 par2cmdline 0.8.1-2 perl-archive-zip 1.68-7 perl-io-dirent 0.05-15 perl-file-listing 6.15-2 perl-time-modules 2013.0912-8 perl-cgi 4.54-2 perl-xml-rss 1.62-1 perl-json-xs 4.03-3 postfix 3.7.3-2 Thanks and cheers, Alexdiff -r backuppc/config.pl backuppc.broken/config.pl 116c116 < $Conf{WakeupSchedule} = [ --- > $Conf{WakeupSchedule} = ( 213c213 < ]; --- > ); 420c420 < $Conf{DHCPAddressRanges} = []; --- > $Conf{DHCPAddressRanges} = (); 639c639 < $Conf{FullKeepCnt} = [ --- > $Conf{FullKeepCnt} = ( 647c647 < ]; --- > ); 756c756 < $Conf{BackupFilesOnly} = {}; --- > $Conf{BackupFilesOnly} = (); 812c812 < $Conf{BackupFilesExclude} = {}; --- > $Conf{BackupFilesExclude} = (); 885c885 < $Conf{BlackoutPeriods} = [ --- > $Conf{BlackoutPeriods} = ( 899c899 < ]; --- > ); 1003c1003 < $Conf{SmbShareName} = [ --- > $Conf{SmbShareName} = ( 1005c1005 < ]; --- > ); 1121c1121 < $Conf{TarShareName} = [ --- > $Conf{TarShareName} = ( 1123c1123 < ]; --- > ); 1267c1267 < $Conf{RsyncSshArgs} = [ --- > $Conf{RsyncSshArgs} = ( 1270c1270 < ]; --- > ); 1287c1287 < $Conf{RsyncShareName} = [ --- > $Conf{RsyncShareName} = ( 1289c1289 < ]; --- > ); 1326c1326 < $Conf{RsyncFullArgsExtra} = [ --- > $Conf{RsyncFullArgsExtra} = ( 1328c1328 < ]; --- > ); 1334c1334 < $Conf{RsyncArgs} = [ --- > $Conf{RsyncArgs} = ( 1352c1352 < ]; --- > ); 1386c1386 < $Conf{RsyncArgsExtra} = [ --- > $Conf{RsyncArgsExtra} = ( 1394c1394 < ]; --- > ); 1424c1424 < $Conf{RsyncRestoreArgs} = [ --- > $Conf{RsyncRestoreArgs} = ( 1440c1440 < ]; --- > ); 1477c1477 < $Conf{FtpShareName} = [ --- > $Conf{FtpShareName} = ( 1479c1479 < ]; --- > ); 2234c2234 < $Conf{CgiNavBarLinks} = [ --- > $Conf{CgiNavBarLinks} = ( 2250c2250 < ]; --- > ); 2255c2255 < $Conf{CgiStatusHilightColor} = { --- > $Conf{CgiStatusHilightColor} = ( 2263c2263 < }; --- > ); 2290c2290 < $Conf{CgiExt2ContentType} = {}; --- > $Conf{CgiExt2ContentType} = (); 2328c2328 < $Conf{CgiUserConfigEdit} = { --- > $Conf{CgiUserConfigEdit} = ( 2425c2425 < }; --- > ); 2431c2431 < $Conf{ClientShareName2Path} = {}; --- > $Conf{ClientShareName2Path} = (); 2433c2433 < $Conf{RsyncIncrArgsExtra} = []; --- > $Conf{RsyncIncrArgsExtra} = (); smime.p7s Description: S/MIME Cryptographic Signature ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:https://github.com/backuppc/backuppc/wiki Project: https://backuppc.github.io/backuppc/