diff --git a/ChangeLog b/ChangeLog index 18ed157f8a58a372f9c97514749488c9f8445015..fb6b62297123d3a7ba5360cabfe9e5a615a11334 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,6 +42,8 @@ version 0.9.7 -- UNRELEASED database names. . Use bash pipefail option when needed so that failed dumps are reported as such. + rdiff: + . Fix include/exclude paths with spaces (Closes: #398435) sys: . New luksheaders option (default=disabled) to backup the Luks header of every Luks device. @@ -55,6 +57,7 @@ version 0.9.7 -- UNRELEASED one time (Closes: #536360) . Report duplicity output as "info" so that it can be included in report e-mail when reportinfo is on (Closes: #563734) + . Fix include/exclude paths with spaces helper changes dup: . Do not propose to exclude /home/*/.gnupg twice anymore diff --git a/handlers/dup.in b/handlers/dup.in index 6e0f69876f9d8564c4650db98d9f7fbb58e305b6..2f55b9c07668ac0b63680f9599b9d96f96032149 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -189,26 +189,35 @@ fi set -o noglob # excludes +SAVEIFS=$IFS +IFS=$(echo -en "\n\b") for i in $exclude; do str="${i//__star__/*}" execstr_source="${execstr_source} --exclude '$str'" done +IFS=$SAVEIFS # includes +SAVEIFS=$IFS +IFS=$(echo -en "\n\b") for i in $include; do [ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'" str="${i//__star__/*}" execstr_source="${execstr_source} --include '$str'" done +IFS=$SAVEIFS # vsincludes if [ $usevserver = yes ]; then for vserver in $vsnames; do + SAVEIFS=$IFS + IFS=$(echo -en "\n\b") for vi in $vsinclude; do str="${vi//__star__/*}" str="$VROOTDIR/$vserver$str" execstr_source="${execstr_source} --include '$str'" done + IFS=$SAVEIFS done fi diff --git a/handlers/rdiff.in b/handlers/rdiff.in index 45d5096675ba4a60c6e1f2ad8cd00402127ec0a6..98a53a3235c489ee392076429191e06a6c8353fc 100644 --- a/handlers/rdiff.in +++ b/handlers/rdiff.in @@ -209,20 +209,28 @@ symlinks_warning="Maybe you have mixed symlinks and '*' in this statement, which # TODO: order the includes and excludes # excludes +SAVEIFS=$IFS +IFS=$(echo -en "\n\b") for i in $exclude; do str="${i//__star__/*}" execstr="${execstr}--exclude '$str' " done +IFS=$SAVEIFS # includes +SAVEIFS=$IFS +IFS=$(echo -en "\n\b") for i in $include; do [ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'" str="${i//__star__/*}" execstr="${execstr}--include '$str' " done +IFS=$SAVEIFS # vsinclude if [ $usevserver = yes ]; then for vserver in $vsnames; do + SAVEIFS=$IFS + IFS=$(echo -en "\n\b") for vi in $vsinclude; do str="${vi//__star__/*}" str="$VROOTDIR/$vserver$str" @@ -232,6 +240,7 @@ if [ $usevserver = yes ]; then warning "vsinclude statement '${vi//__star__/*}' will be ignored for VServer $vserver. $symlinks_warning" fi done + IFS=$SAVEIFS done fi