Your message dated Sat, 18 Jun 2022 12:35:44 +0100
with message-id <[email protected]>
and subject line Re: Bug#793687: Close as fixed in 1.4.0-1
has caused the Debian Bug report #793687,
regarding rsnapshot incorrectly handles quotes in per-backup rsync_long_args 
option
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
793687: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793687
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: rsnapshot
Version: 1.3.1-4
Severity: normal

Hi.

rsnapshot from Jessie incorrectly handles quotes in per-backup
'+rsync_long_args' option (in wheezy it works fine) - it does not remove them.
Though, quotes are required, if e.g. i want to add per-backup '--filter'
option.

How to reproduce:
1. Build..

    $ git checkout debian/1.3.1-4
    Previous HEAD position was 773afb8... Enable GNU cp and document 
stop_on_stale_lockfile option
    HEAD is now at 324f3d7... Bump to Standards-Version 3.9.4, change 
Vcs-{Git,Browse} and avoid rsnapshot-HOWTO.en.html duplication

    $ quilt push -a
    Applying patch debian/patches/01_rsnapshot_conf.diff
    patching file rsnapshot.conf.default.in
    patching file rsnapshot-program.pl
    patching file rsnapshot-program.pl

    Applying patch debian/patches/03_pod_missing_back.diff
    patching file rsnapshot-program.pl

    Applying patch debian/patches/05_backup_pgsql.diff
    patching file utils/backup_pgsql.sh

    Applying patch debian/patches/06_fix_random_file_verify.diff
    patching file utils/random_file_verify.sh

    Applying patch debian/patches/08_manpage_hourly_to_daily.diff
    patching file rsnapshot-program.pl

    Applying patch debian/patches/09_strip_backtick.diff
    patching file rsnapshot-program.pl

    Applying patch debian/patches/10_space_destdir.diff
    patching file rsnapshot-program.pl

    Applying patch debian/patches/11_lvm_snapshots.diff
    patching file rsnapshot.conf.default.in
    Hunk #2 succeeded at 202 (offset 6 lines).
    Hunk #3 succeeded at 235 (offset 6 lines).
    patching file configure.ac

    Applying patch debian/patches/12_include_conf_with_arguments.diff
    patching file rsnapshot-program.pl

    Applying patch debian/patches/13_print_warn.diff
    patching file rsnapshot-program.pl

    Now at patch debian/patches/13_print_warn.diff

    $ ./configure
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for perl... /usr/bin/perl
    checking for rsync... /usr/bin/rsync
    checking for cp... /bin/cp
    checking for rm... /bin/rm
    checking for ssh... /usr/bin/ssh
    checking for logger... /usr/bin/logger
    checking for du... /usr/bin/du
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating rsnapshot
    config.status: creating rsnapshot-diff
    config.status: creating rsnapshot.conf.default
    config.status: creating t/support/etc/configtest.conf
    config.status: creating t/support/etc/rsync.conf
    config.status: creating t/support/etc/gnu_cp.conf
    config.status: creating t/support/etc/relative_delete_bugfix.conf
    config.status: creating t/configtest.t
    config.status: creating t/rsync.t
    config.status: creating t/gnu_cp.t
    config.status: creating t/relative_delete_bugfix.t

    Now type  "make test"    to run the regression test suite.
    Then type "make install" to install the program.

    After rsnapshot is installed, don't forget to copy
    /usr/local/etc/rsnapshot.conf.default to /usr/local/etc/rsnapshot.conf

    $ make
    cd . && /bin/bash /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/missing 
--run aclocal-1.9
    /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/missing: line 52: 
aclocal-1.9: command not found
    WARNING: `aclocal-1.9' is missing on your system.  You should only need it 
if
             you modified `acinclude.m4' or `configure.ac'.  You might want
             to install the `Automake' and `Perl' packages.  Grab them from
             any GNU archive site.
     cd . && /bin/bash 
/home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/missing --run automake-1.9 
--gnu
    /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/missing: line 52: 
automake-1.9: command not found
    WARNING: `automake-1.9' is missing on your system.  You should only need it 
if
             you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
             You might want to install the `Automake' and `Perl' packages.
             Grab them from any GNU archive site.
    cd . && /bin/bash /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/missing 
--run autoconf
    /bin/bash ./config.status --recheck
    running /bin/bash ./configure   --no-create --no-recursion
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking for perl... /usr/bin/perl
    checking for rsync... /usr/bin/rsync
    checking for cp... /bin/cp
    checking for rm... /bin/rm
    checking for ssh... /usr/bin/ssh
    checking for lvcreate... no
    checking for lvremove... no
    checking for mount... /bin/mount
    checking for umount... /bin/umount
    checking for logger... /usr/bin/logger
    checking for du... /usr/bin/du
    configure: creating ./config.status

    Now type  "make test"    to run the regression test suite.
    Then type "make install" to install the program.

    After rsnapshot is installed, don't forget to copy
    /usr/local/etc/rsnapshot.conf.default to /usr/local/etc/rsnapshot.conf

     /bin/bash ./config.status
    config.status: creating Makefile
    config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir 
setting
    config.status: creating rsnapshot
    config.status: creating rsnapshot-diff
    config.status: creating rsnapshot.conf.default
    config.status: creating t/support/etc/configtest.conf
    config.status: creating t/support/etc/rsync.conf
    config.status: creating t/support/etc/gnu_cp.conf
    config.status: creating t/support/etc/relative_delete_bugfix.conf
    config.status: creating t/configtest.t
    config.status: creating t/rsync.t
    config.status: creating t/gnu_cp.t
    config.status: creating t/relative_delete_bugfix.t
    /usr/bin/pod2man -c '' -n 'rsnapshot' -r '' rsnapshot > rsnapshot.1
    /usr/bin/pod2man -c '' -n 'rsnapshot-diff' -r '' rsnapshot-diff > 
rsnapshot-diff.1

2. Use this config:

    $ diff -u rsnapshot.conf.default ../rsn.conf
    --- rsnapshot.conf.default      2015-07-26 18:07:17.043999255 +0300
    +++ ../rsn.conf 2015-07-26 18:07:32.992906393 +0300
    @@ -24,7 +24,7 @@

     # All snapshots will be stored under this root directory.
     #
    -snapshot_root  /var/cache/rsnapshot/
    +snapshot_root  /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/

     # If no_create_root is enabled, rsnapshot will not automatically create the
     # snapshot_root directory. This is particularly useful if you are backing
    @@ -111,7 +111,7 @@
     # 4     Extra Verbose   Show extra verbose information
     # 5     Debug mode      Everything
     #
    -verbose                2
    +verbose                3

     # Same as "verbose" above, but controls the amount of data sent to the
     # logfile, if one is being used. The default is 3.
    @@ -128,7 +128,7 @@
     # If you enable this, make sure the lockfile directory is not world
     # writable. Otherwise anyone can prevent the program from running.
     #
    -lockfile       /var/run/rsnapshot.pid
    +#lockfile      /var/run/rsnapshot.pid

     # By default, rsnapshot check lockfile, check if PID is running
     # and if not, consider lockfile as stale, then start
    @@ -227,9 +227,10 @@
     ###############################

     # LOCALHOST
    -backup /home/          localhost/
    -backup /etc/           localhost/
    -backup /usr/local/     localhost/
    +#backup        /home/          localhost/
    +#backup        /etc/           localhost/
    +#backup        /usr/local/     localhost/
    +backup /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/      localhost/  
    +rsync_long_args=--filter='. 
/home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter'
     #backup        /var/log/rsnapshot              localhost/
     #backup        /etc/passwd     localhost/
     #backup        /home/foo/My Documents/         localhost/

where rsync filter is

    $ cat ../etc.rsync-filter
    - .git/

3. And run..

    $ perl ./rsnapshot-program.pl -c ../rsn.conf hourly
    /bin/rm -rf /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.5/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.4/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.5/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.3/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.4/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.2/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.3/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.1/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.2/
    /bin/cp -al /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0 \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.1
    /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
        --filter='. /home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter' \
        --exclude=bkp /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot \
        
/home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/localhost/
    Unknown filter rule: `'. 
/home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter''
    rsync error: syntax or usage error (code 1) at exclude.c(904) [client=3.1.1]
    ----------------------------------------------------------------------------
    rsnapshot encountered an error! The program was invoked with these options:
    ./rsnapshot-program.pl -c ../rsn.conf hourly
    ----------------------------------------------------------------------------
    ERROR: /usr/bin/rsync returned 1 while processing 
/home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/
    touch /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/

if i'll use script, which outputs its own arguments instead of rsync (in 
'cmd_rsync'):

    $ cat ../lspp.sh
    #!/bin/sh

    for f; do
        echo "$f"
    done

i'll get

    $ perl ./rsnapshot-program.pl -c ../rsn.conf hourly
    /bin/rm -rf /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.5/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.4/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.5/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.3/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.4/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.2/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.3/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.1/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.2/
    /bin/cp -al /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0 \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.1
    /home/sgf/Documents/rsnapshot/src/3rd/t/lspp.sh -a --delete --numeric-ids \
        --relative --delete-excluded --filter='. \
        /home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter' --exclude=bkp 
\
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot \
        
/home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/localhost/
    -a
    --delete
    --numeric-ids
    --relative
    --delete-excluded
    --filter='. /home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter'
    --exclude=bkp
    /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot
    /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/localhost/
    touch /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/

(i.e. quotes are passed in argument, but they should be removed).

Without quotes

    backup /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/      localhost/   
   +rsync_long_args=--filter=. 
/home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter

this example does not work either:

    $ perl ./rsnapshot-program.pl -c ../rsn.conf hourly
    /bin/rm -rf /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.5/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.4/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.5/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.3/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.4/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.2/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.3/
    mv /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.1/ \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.2/
    /bin/cp -al /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0 \
        /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.1
    /usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
        --filter=. /home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter \
        --exclude=bkp /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot \
        
/home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/localhost/
    unexpected end of filter rule: .
    rsync error: syntax or usage error (code 1) at exclude.c(1013) 
[client=3.1.1]
    ----------------------------------------------------------------------------
    rsnapshot encountered an error! The program was invoked with these options:
    ./rsnapshot-program.pl -c ../rsn.conf hourly
    ----------------------------------------------------------------------------
    ERROR: /usr/bin/rsync returned 1 while processing 
/home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/
    touch /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/hourly.0/

Using this

    backup  /home/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/      localhost/  
    +rsync_long_args='--filter=. 
/home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter'

results in rsync treating --filter option as file:

    rsync: link_stat 
"/home/common/sgf/Documents/rsnapshot/src/3rd/t/rsnapshot/bkp/'--filter=. 
/home/sgf/Documents/rsnapshot/src/3rd/t/etc.rsync-filter'" failed: No such file 
or directory (2)


-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=ru_RU.utf8 (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-2+b1
ii  logrotate       3.8.7-1+b1
ii  perl            5.20.2-3+deb8u1
ii  rsync           3.1.1-3

Versions of packages rsnapshot recommends:
ii  openssh-client [ssh-client]  1:6.7p1-5

rsnapshot suggests no packages.

-- Configuration Files:
/etc/cron.d/rsnapshot changed [not included]
/etc/rsnapshot.conf changed [not included]

-- debconf-show failed

--- End Message ---
--- Begin Message ---
Version: 1.4.0-1

In #859099 this behaviour was pinpointed to the 10_space_destdir patch which was
 removed in version 1.4.0-1.

Closing as fixed.

Thanks

Mark

--- End Message ---

Reply via email to