[rear-users] need testing advice - REQUIRED_PROGS containing spaces

Schlomo Schapiro schlomo at schapiro.org
Wed Oct 21 17:50:39 CEST 2015

Hi Robert,

quoting is always good and I can't imagine a case where it would have been
a feature that quoting is bad. The really few cases where I used Bash
tricks I actually put a large comment above it mentioning the fact that
this line does not have quotes on purpose.

The reason why there are no quotes so far is very simple: The has_binary
function is intended to check for the existance of programs in $PATH,
without the need to know where exactly in $PATH the program lies. The fact
that it also works with fully qualified file names is more of a welcome
side effect and not the typical use case.

I noticed the use of fully qualified file names in your pull requests and
decided to not talk about it because I thought that you have your reasons.

IMHO on Unix/Linux installing software in directories with spaces in the
name is a really bad idea and not something that is a very common

But, the purpose of ReaR is to serve the needs ot our users so that we will
be happy to accept pull requests that enable ReaR to support such scenarios
like you describe.


Kind Regards,

On 21 October 2015 at 18:04, Gratien D'haese <gratien.dhaese at it3.be> wrote:

> That should work in other situations as well - more testing required of
> course
> Gratien
> On Wed, 21 Oct 2015 11:19:04 -0400, Robert Owens <rowens at fdrinnovation.com>
> wrote:
>> I'd like to make a change that would allow spaces in the contents of
>> REQUIRED_PROGS.  This would allow checking for programs that may be
>> installed in a directory containing a space.
>> I've tested this using BACKUP=FDRUPSTREAM and it works.  But since
>> this change would affect all ReaR users, and not just users of my
>> company's backup product, I'm looking for advice on test cases, or
>> thoughts on where this could go wrong.
>> The change is small.  I've simply quoted the two variables in the
>> has_binary function of /usr/share/rear/lib/_input-output-functions.sh:
>> # Check if any of the binaries/aliases exist
>> has_binary() {
>>         for bin in "$@"; do
>>                 if type "$bin" >&8 2>&1; then
>>                         return 0
>>                 fi
>>         done
>>         return 1
>> }
>> Thoughts?
>> _______________________________________________
>> rear-users mailing list
>> rear-users at lists.relax-and-recover.org
>> http://pikachu.3ti.be/mailman/listinfo/rear-users
> --
> Gratien D'haese
> IT3 Consultants bvba
> Vennestraat 15, B-2560 Nijlen
> _______________________________________________
> rear-users mailing list
> rear-users at lists.relax-and-recover.org
> http://pikachu.3ti.be/mailman/listinfo/rear-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pikachu.3ti.be/pipermail/rear-users/attachments/20151021/27e6f014/attachment-0001.html>

More information about the rear-users mailing list