Bug 18251 - BackupPC fails to open any saved backup
Summary: BackupPC fails to open any saved backup
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-23 23:08 CEST by Juergen Harms
Modified: 2021-02-21 08:59 CET (History)
3 users (show)

See Also:
Source RPM: backuppc-3.3.1-2.mga6.x86_64.rpm
CVE:
Status comment:


Attachments
Patch for a workaround and, possibly, a fix (506 bytes, patch)
2016-04-26 10:35 CEST, Juergen Harms
Details | Diff

Description Juergen Harms 2016-04-23 23:08:46 CEST
Description of problem:

When you try to open a previously saved backup, BackupPC fails with the message

Software error:
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/share/backuppc/lib/BackupPC/CGI/Browse.pm line 68.

Line 68 in Browse.pm contains an " if (defined (@Backups) ..." term, but calling "defined" on an array is deprecated; perl 5.22 does not tolerate this any more (perl 5.20 on Mageia 5 did)

It is not very clear what this term is meant to achieve - simply replacing 
    if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
            by
    if ( !defined($In{num}) && @Backups > 0 ) {
(line 68) makes the error go away and permits to correctly open any existing backup.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=755076
	



Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Open a BackupPC browser window
2. Select a target host (some backups must already exist for that host)
3. In the "Backup Summary" list, select any backup number (Backup# column)
Marja Van Waes 2016-04-24 15:36:02 CEST

CC: (none) => marja11
Assignee: bugsquad => shlomif

Comment 1 Juergen Harms 2016-04-26 10:35:29 CEST
Created attachment 7695 [details]
Patch for a workaround and, possibly, a fix
Comment 2 Juergen Harms 2017-02-03 23:26:45 CET
Craig Barrat has just released a stability update - BackupPC 3.3.2. It might be worth while considering this new release for Mageia 6

CC: (none) => juergen.harms

Comment 3 Juergen Harms 2017-02-05 15:42:35 CET
Ping

Mageia-6 should not come with a frequently used backup tool that backs up, but than does not allow users to restore their saved data (there is no problem with Mageia 5 since the problem is caused by Perl recently having tightened the rules for doing scalar operations on an array).

I did not shout so far since I was not 100%  sure whether the patch I suggested is just a workaround or whether it is a solid fix of the problem: it is a solid fix, BackupPC 3.3.2 introduces precisely the same code as the proposed patch.

So, for Mageia-6 there is now the choice of either applying the patch or (I think the better solution) offering BackupPC 3.3.2 instead of the present 3.3.1. If that helps, I should be able to locally build and test 3.3.2, reducing the work still to be done to a final verification and submitting the package.

I append the announcement of BackupPC 3.3.2

Juergen

----------------------------------------------

I'm pleased to announce that BackupPC 3.3.2 was released a few days ago on Github and SF.net.  It's a minor release with a couple of small changes.

The ChangeLog is below.

Craig

#------------------------------------------------------------------------
# Version 3.3.2, 25 Jan 2017
#------------------------------------------------------------------------

* Updates to bin/BackupPC_dump and lib/BackupPC/Xfer/Smb.pm from maksyms to fix
  incompatabilities with Samba 4.3 (#22)

* Sort hash of config editor tabs in lib/BackupPC/CGI/EditConfig.pm from
  polo (#23)

* Fixes to bin/BackupPC_sendEmail to avoid per-host overwrite of EMailAdminUserName
  from derrickdominic (#30)

* Fixed minor typos in several language files; from Alexander Moisseev

* Updated deprecated syntax (defined(@array) and "{" in regexps) from
  Alexander Moisseev.

* Documentation updates from Alexander Moisseev.
Comment 4 Shlomi Fish 2017-02-05 17:05:28 CET
Hi!

I updated backuppc to 3.3.2 in the mgarepo/SVN repository and requested a freeze push. Sorry it took me so long.
Comment 5 Juergen Harms 2017-02-05 19:02:11 CET
Sorry Shlomi - I did not want to rush you, rather offer help to make this bug get fixed before freezes become tough.

Cheers - and thanks for your great work.
Comment 6 Shlomi Fish 2017-02-05 20:37:34 CET
(In reply to Juergen Harms from comment #5)
> Sorry Shlomi - I did not want to rush you, rather offer help to make this
> bug get fixed before freezes become tough.
> 
> Cheers - and thanks for your great work.

Hi Juergen!

No worries really. I should really have done it earlier, and it's my fault.
Comment 7 Morgan Leijström 2021-02-19 10:27:37 CET
I believe this is solved then?

CC: (none) => fri

Comment 8 Juergen Harms 2021-02-21 08:58:00 CET
It is, thanks for catching this - closing
Comment 9 Juergen Harms 2021-02-21 08:59:37 CET
Fixed with updated BackupPC (3.3.2) package

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.