From: Mike Jones on
Responding to Sylvain Robitaille:

> Robby Workman wrote:
>
>> Leave root's umask at 0022, and/or switch to root properly from your
>> user account, and/or manually set umask to 0022 before using one of the
>> build scripts. This is NOT a problem with the scripts,
>
> With all due respect, Robby, I would like to argue that the scripts
> should explicitly set any environment that they require to produce a
> proper package. That should certainly include, at a minimum, the umask
> the script expects to run with (and the PATH environment where any
> commands used should be found).
>
> It isn't at all reasonable for any script repository to dictate what the
> user's "root" environment (including umask and PATH) should be, and it's
> much more efficient and much less error-prone if that is setup in each
> script rather than the user needing to remember to set it prior to
> calling these scripts.
>
> That said, I know that I'm suggesting a large number of scripts be
> modified, but I would ask whether these will perpetually be cast in
> stone, regardless of any errors or oversights that might be found, just
> because of the sheer number of them? I certainly don't believe that is
> the intention, and what's presented here seems to me to simply be an
> easily corrected oversight.



I'm seeing the same logics here.

No biggie, but something that could be improved.

--
*=( http://www.thedailymash.co.uk/
*=( For all your UK news needs.
From: Jim Diamond on
On 2010-07-13 at 18:29 ADT, Sylvain Robitaille <syl(a)alcor.concordia.ca> wrote:
> Robby Workman wrote:
>
>> Leave root's umask at 0022, and/or switch to root properly from
>> your user account, and/or manually set umask to 0022 before using
>> one of the build scripts. This is NOT a problem with the scripts,
>
> With all due respect, Robby, I would like to argue that the scripts
> should explicitly set any environment that they require to produce a
> proper package. That should certainly include, at a minimum, the umask
> the script expects to run with (and the PATH environment where any
> commands used should be found).
>
> It isn't at all reasonable for any script repository to dictate what the
> user's "root" environment (including umask and PATH) should be, and it's
> much more efficient and much less error-prone if that is setup in each
> script rather than the user needing to remember to set it prior to
> calling these scripts.
>
> That said, I know that I'm suggesting a large number of scripts be
> modified, but I would ask whether these will perpetually be cast in
> stone, regardless of any errors or oversights that might be found, just
> because of the sheer number of them? I certainly don't believe that is
> the intention, and what's presented here seems to me to simply be an
> easily corrected oversight.

Sylvain, I think you are right, the scripts should try to set the
environment correctly. (I say try to, because, as you probably know,
it is hard to make programs foolproof since fools are so ingenious).

Anyway, I don't think it should be a huge effort to modify the
slackbuilds, since it could (*cough*) be easily automated, depending
on how they are stored.
- find(1) to get a list of xyz.SlackBuild scripts
- grep to find the ones that don't have a umask already
(none of the 87 ones I have on my system have a umask)
- something like replace(1) to replace (say)
CWD=$(pwd)
with
umask 022
CWD=$(pwd)
Of course, assuming these are in some revision control system there
will be a bit more to pull them out and check them in. And then
someone will probably want to eyeball the diffs to make sure nothing
bad happens. Still, not a lifetime of effort.

Cheers.
Jim
From: Robby Workman on
On 2010-07-13, Sylvain Robitaille <syl(a)alcor.concordia.ca> wrote:
> Robby Workman wrote:
>
>> Leave root's umask at 0022, and/or switch to root properly from
>> your user account, and/or manually set umask to 0022 before using
>> one of the build scripts. This is NOT a problem with the scripts,
>
> With all due respect, Robby, I would like to argue that the scripts
> should explicitly set any environment that they require to produce a
> proper package. That should certainly include, at a minimum, the umask
> the script expects to run with (and the PATH environment where any
> commands used should be found).
>
> It isn't at all reasonable for any script repository to dictate what the
> user's "root" environment (including umask and PATH) should be, and it's
> much more efficient and much less error-prone if that is setup in each
> script rather than the user needing to remember to set it prior to
> calling these scripts.


I understand what you're staying, and part of me wants to agree, but
I can't help but argue :-) I guess my disagreement is twofold:

1. Expecting root's umask to be 0022 and to have a sane PATH
is *not* unreasonable. If you have changed root's umask,
then you are (or soon will be) very aware of various issues
with that, and you need to take appropriate steps to work
around them.

2. How far should we go to ensure a sane root environment?
http://lists.slackbuilds.org/pipermail/slackbuilds-users/2010-July/006182.html


> That said, I know that I'm suggesting a large number of scripts be
> modified, but I would ask whether these will perpetually be cast in
> stone, regardless of any errors or oversights that might be found, just
> because of the sheer number of them? I certainly don't believe that is
> the intention, and what's presented here seems to me to simply be an
> easily corrected oversight.


We use git for SCM, and the modification would be trivial to
script. I'm just not sure it's a slope we want to slide...

-RW
From: Jim Diamond on
On 2010-07-14 at 19:16 ADT, Robby Workman <newsgroups(a)rlworkman.net> wrote:
> On 2010-07-13, Sylvain Robitaille <syl(a)alcor.concordia.ca> wrote:
>> Robby Workman wrote:
>>
>>> Leave root's umask at 0022, and/or switch to root properly from
>>> your user account, and/or manually set umask to 0022 before using
>>> one of the build scripts. This is NOT a problem with the scripts,
>>
>> With all due respect, Robby, I would like to argue that the scripts
>> should explicitly set any environment that they require to produce a
>> proper package. That should certainly include, at a minimum, the umask
>> the script expects to run with (and the PATH environment where any
>> commands used should be found).
>>
>> It isn't at all reasonable for any script repository to dictate what the
>> user's "root" environment (including umask and PATH) should be, and it's
>> much more efficient and much less error-prone if that is setup in each
>> script rather than the user needing to remember to set it prior to
>> calling these scripts.

> I understand what you're staying, and part of me wants to agree, but
> I can't help but argue :-)
I think you need to deal with that :-)

> I guess my disagreement is twofold:
>
> 1. Expecting root's umask to be 0022 and to have a sane PATH
> is *not* unreasonable. If you have changed root's umask,
> then you are (or soon will be) very aware of various issues
> with that, and you need to take appropriate steps to work
> around them.
Maybe that is true for you, but not for me. And if it isn't true for
me, then there are probably other people out there for whom it is also
not true.

One should aspire to write robust software, even while acknowledging
that making any non-trivial program 100% robust is difficult or
impossible. (After all, someone could replace /bin/sh and /bin/bash
with shells which behave differently.) You might argue that someone
who does that gets what they deserve, and I would not argue with you
there. However, it is not unreasonable for root to have a umask other
than 022, and the fix for this is simple and straightforward. So
given that this particular issue has bitten one person, why not fix
it? (The fact that he is being gratuitously argumentative and
difficult (IMHO) is not a reason to ignore the problem.)


> 2. How far should we go to ensure a sane root environment?
> http://lists.slackbuilds.org/pipermail/slackbuilds-users/2010-July/006182.html
Thus my comment about the difficulty of making something foolproof.
You can only go so far. But the fact that you can't make something
100% robust is not a reason to avoid shooting for 95%, 98% or 99%.


>> That said, I know that I'm suggesting a large number of scripts be
>> modified, but I would ask whether these will perpetually be cast in
>> stone, regardless of any errors or oversights that might be found, just
>> because of the sheer number of them? I certainly don't believe that is
>> the intention, and what's presented here seems to me to simply be an
>> easily corrected oversight.

> We use git for SCM, and the modification would be trivial to
> script. I'm just not sure it's a slope we want to slide...
I don't see the problem, and I'm guessing Sylvain doesn't either. But
I admit this doesn't mean there isn't one.

Cheers.
Jim
From: Dario Niedermann on
Grant <omg(a)grrr.id.au> wrote:

> I guess 'they', the Slack team, don't see looking after the
> not-so-bright user as very important.

You must feel abandoned then.

--
> head -n1 /etc/*-{version,release} && uname -moprs
Slackware 12.2.0
Linux 2.6.27.31-smp i686 AMD Turion(tm) 64 Mobile Technology MK-36 GNU/Linux