Package: rsnapshot Version: 1.4.0-1 Severity: normal Tags: patch Dear Maintainer,
My /etc/rsnapshot.conf has an LVM backup source followed by non-LVM backup sources. This worked fine previously but broke in 1.4.0-1, see below. I'm attaching a patch which fixes the problem. Use of uninitialized value $traps{"linux_lvm_snapshot"} in string ne at /usr/bin/rsnapshot line 3939. Use of uninitialized value $linux_lvm_oldpwd in concatenation (.) or string at /usr/bin/rsnapshot line 3940. Use of uninitialized value $linux_lvm_oldpwd in chdir at /usr/bin/rsnapshot line 3942. Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/bin/rsnapshot line 3942. Use of uninitialized value $traps{"linux_lvm_mountpoint"} in numeric eq (==) at /usr/bin/rsnapshot line 3951. Use of uninitialized value $traps{"linux_lvm_snapshot"} in string ne at /usr/bin/rsnapshot line 3957. Use of uninitialized value $src in pattern match (m//) at /usr/bin/rsnapshot line 3973. Use of uninitialized value $src in concatenation (.) or string at /usr/bin/rsnapshot line 3978. ---------------------------------------------------------------------------- rsnapshot encountered an error! The program was invoked with these options: /usr/bin/rsnapshot daily ---------------------------------------------------------------------------- ERROR: Could not understand LVM source "" in linux_lvm_parseurl() Use of uninitialized value $traps{"linux_lvm_mountpoint"} in numeric eq (==) at /usr/bin/rsnapshot line 2034. Use of uninitialized value $traps{"linux_lvm_snapshot"} in string ne at /usr/bin/rsnapshot line 2040. Use of uninitialized value $src in pattern match (m//) at /usr/bin/rsnapshot line 3973. Use of uninitialized value $src in concatenation (.) or string at /usr/bin/rsnapshot line 3978. ERROR: Could not understand LVM source "" in linux_lvm_parseurl() Use of uninitialized value $traps{"linux_lvm_mountpoint"} in numeric eq (==) at /usr/bin/rsnapshot line 2034. [2] + exit 1 sudo rsnapshot daily -- System Information: Debian Release: stretch/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (102, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.1.0+ (SMP w/4 CPU cores) Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages rsnapshot depends on: ii liblchown-perl 1.01-3 ii logrotate 3.8.7-2 ii perl 5.20.2-6 ii rsync 3.1.1-3 Versions of packages rsnapshot recommends: ii openssh-client [ssh-client] 1:6.7p1-6 rsnapshot suggests no packages. -- Configuration Files: /etc/rsnapshot.conf changed [not included] -- no debconf information
--- /usr/bin/rsnapshot.orig 2015-07-20 04:33:15.000000000 +0900 +++ /usr/bin/rsnapshot 2015-07-30 11:57:29.371606295 +0900 @@ -3949,13 +3949,13 @@ sub rsync_backup_point { # delte the traps manually # umount LVM Snapshot if it is mounted if (1 == $traps{"linux_lvm_mountpoint"}) { - undef $traps{"linux_lvm_mountpoint"}; + $traps{"linux_lvm_mountpoint"} = 0; linux_lvm_unmount(); } # destroy snapshot created by rsnapshot if (0 ne $traps{"linux_lvm_snapshot"}) { - undef $traps{"linux_lvm_snapshot"}; + $traps{"linux_lvm_snapshot"} = 0; linux_lvm_snapshot_del(linux_lvm_parseurl($lvm_src)); } }