pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pbulk with a toolchain installed via pkgsrc

On 29 July 2011 02:44, Thomas Cort <> wrote:
> Greetings All,
> Myself and some other Minix developers and users have been performing
> bulk builds with pkgtools/pbulk on Minix. Minix is a little different
> than the BSDs in that our toolchain (gcc, binutils, etc) isn't part of
> the base system (like comp.tgz on NetBSD), it comes from pkgsrc
> (devel/binutils, lang/gcc44, etc).
> The first time I tried doing a bulk build I found out the hard way
> that /usr/pkg gets blown away. There goes my toolchain. To get around
> this, I backed up /usr/pkg to /usr/pkg.sav and added /usr/pkg.sav/bin
> and /usr/pkg.sav/sbin to PATH. That works for the most part, but at
> least one subtle bug was introduced.
> archivers/gzip searches the path for bash for it's shell scripts (zcat
> for example). bash is a dependency of gcc and is in our path in
> /usr/pkg.sav/bin/bash. bash isn't listed as a dependency for gzip, so
> it isn't in /usr/pkg/bin during the bulk build. As a result, the gzip
> package ends up finding the bash in /usr/pkg.sav/bin and creates
> scripts like zcat with a top line of "#!/usr/pkg.sav/bin/bash"
> Is there a clean solution to bulk building with a toolchain installed
> by pkgsrc? We don't want stuff in /usr/pkg.sav getting picked up
> during bulk builds. I can only think of a few solutions and they
> aren't very desirable...
> 1) Put the toolchain in the base system. This isn't good because we
> want package management for our compilers, tools, etc.
> 2) Install the toolchain with pkgsrc in a different PREFIX like
> /usr/toolchain/. This isn't good because package builds may find tools
> in there and include them (like with gzip above).
> 3) Add the toolchain to the bootstrap script so that the compiler will
> be in the binary kit. This would force casual users to install many
> megabytes of development tools.
> Or maybe I'm just being paranoid and gzip is the only place where this
> type of issue exists?

Some quick potential options:
- adjust path so a the shell from the base system is picked up first
- adjust the shell search routine in gzip to pick up base shell before pkg.sav
- have a toolchain bootstrap kit to be used for 'from source' pkgsrc
users (& bulk)

I think this issue has general application - it could affect Solaris
users as well for example, so a general solution would be nice.

Home | Main Index | Thread Index | Old Index