[Slackbuilds-users] Fwd: Re: slackbuild script dangers [volkerdi at slackware.com]

Eric Hameleers e.hameleers at chello.nl
Sun Nov 5 15:42:35 UTC 2006


Robby Workman wrote:

> As Eric Hameleers incicated, we have two measures in place to prevent
> modifying the ownership/permissions of /tmp:
> 1. Build in a subdirectory of /tmp: TMP=${TMP:-/tmp/SBo}
> 2. Use of command || exit 1 in numerous places to cause
>    the script to exit if something doesn't occur correctly.
> 
> As Martin suggested, some of his (and other) scripts also use
> the 'set -e' parameter, which accomplishes the same thing as
> command || exit 1 for the most part.
> 
> We implemented these things early in the project's life, mainly
> because I and several others had experienced those same problems
> in /tmp.  Of course, there is a third good solution as well:
> don't build packages on a production box - have a second box
> set up for development purposes only, use a qemu image, and/or
> use a chroot environment on your production box.

Well... the way I see it, people who download a SlackBuild from SB.o
should not have to worry about chroots, VMs and build boxes - the
package creation should always work or at least not break the system
while building. That is our "quality seal" if you wish.

I use "set -e" and "set -u" in all of my SLackBuilds now, and this has
caught quite many early-development bugs.
That, combined with "TMP=${TMP:-/tmp/SBo}" should make the scripts
fairly robust out of the box, and protect against future stupid
modifications as well.

Eric

-- 

Eric Hameleers                     >')
ICQ: 151799386                     ( \
Jabber: alien at jabber.xs4all.nl      ^^`



More information about the Slackbuilds-users mailing list