The current Gentoo stable version of backuppc (4.4.0-r1) exhibits a nasty bug in that any change in the configuration initiated from the CGI interface mangles the configuration file by replacing many [...] and {...} with (...). As a result the configuration becomes unusable and so backuppc crashes and/or the CGI interface becomes unusable. The problem is caused by an incorrect second argument to Data::Dumper in a few places. An upstream patch to correct the issue is available at https://github.com/backuppc/backuppc/commit/2c9270b9b849b2c86ae6301dd722c97757bc9256 Reproducible: Always Steps to Reproduce: 1. Launch the backuppc CGI interface https://<host>/BackupPC_Admin 2. Go to any page that edits the configuration, such as https://<host>/BackupPC_Admin?action=editConfig&newMenu=hosts or https://<host>/BackupPC_Admin?action=editConfig 3. Edit something (such as adding a host) and save Actual Results: In /etc/BackupPC/config.pl many [...] and {...} constructs are replaced by (...). For example $Conf{WakeupSchedule} = [ 23, 0, 1, 2, 3, 4 ]; becomes $Conf{WakeupSchedule} = ( 23, 0, 1, 2, 3, 4 ); As a result the backuppc process crashes with errors such as Can't use string ("4") as an ARRAY ref while "strict refs" in use at /usr/bin/BackupPC line 868. Expected Results: The new configuration is saved correctly and backuppc continues to operate normally.
Mote than one year and the bug is still there? Just wanted to mention that I have been running for a long time and without any notable incident an -r2 version of BackupPC (see backuppc-4.4.0-r2.ebuild.diff) modified straightforwardly to include the Github patch (attached as backuppc-4.4.0-dumper.patch for convenience).
Created attachment 894511 [details, diff] Patch to ebuild
Created attachment 894512 [details, diff] Github patch
Dennis, still with us? I can fix it but I thought you were around. Stefan, please ping if no movement on it in a week or two.
Hi Sam, yes I am working on it. Sry that it took so long. I prepared the fix already I was just waiting for my other PR to be accepted. As thats the case now I will submit the PR for this Bug right away.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f58b0a6b8ab2e71139f20ecbd76cd7673b40d7 commit 04f58b0a6b8ab2e71139f20ecbd76cd7673b40d7 Author: Dennis Eisele <kernlpanic@dennis-eisele.de> AuthorDate: 2024-04-03 23:42:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-28 01:05:23 +0000 app-backup/backuppc: add patch for erroneous config write Signed-off-by: Dennis Eisele <kernlpanic@dennis-eisele.de> Closes: https://bugs.gentoo.org/888085 Closes: https://github.com/gentoo/gentoo/pull/36865 Signed-off-by: Sam James <sam@gentoo.org> app-backup/backuppc/backuppc-4.4.0-r2.ebuild | 195 +++++++++++++++++++++ .../4.4.0/backuppc-4.4.0-fix-config-write.patch | 48 +++++ 2 files changed, 243 insertions(+)