Subject: Re: CVS commit: pkgsrc/pkgtools/pbulk/files/pbulk/scripts
To: Joerg Sonnenberger <joerg@britannica.bec.de>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-changes
Date: 09/22/2007 02:13:33
Joerg Sonnenberger wrote:
> On Fri, Sep 21, 2007 at 01:42:55PM +0000, Roland Illig wrote:
> 
>>Before removing prefix, fix the permissions. Everything inside that
>>directory must be writable and all directories must be searchable.
>>NetBSD's chmod has an option -P which I would have liked to use, but
>>POSIX requires only -R to be implemented. Therefore, it is possible that
>>permissions of files outside the prefix are changed due to symlinks.
>>
>>The client-clean program promises to clean $prefix, so fail if that is
>>not possible. A common cause for this is that some files inside have
>>their flags set (see chflags(1) on NetBSD).
> 
> 
> Thanks for breaking the scripts for the recommented configuration of
> pbulk. When was this change discussed? There are at least two major
> issues:
> (a) chmod before rm is *slow*. If you seriously believe that the removal
> of flags is an issue, it should be done *after* the first rm -rf and
> that run twice.

Reverted. The reason I added this line was that some packages install 
directories with very weird permissions (like 0723 or 0070), so the 
files in it cannot be accessed.

> (b) The existance check and whether the cleanup is successful doesn't
> work for the two major cases I care:
> - ${prefix} itself is a mount point. This is a prerequirement to have /
> being read-only.
> - e.g. Linux procfs is mounted under emul/linux/proc.

Reverted.

>>When installing the bootstrap kit, the source may be either a regular
>>file (which is then assumed to be a tar archive) or a directory (which
>>is copied directly). The latter option is new and allows for easier
>>changes of files once the bulk build has started.
> 
> 
> This is another thing I would have prefered to see discussed first. I
> don't think it is as helpful. I am really strong on seeing bulk builds
> use the output of mkbinarykit without any further changes. All that is
> left for that is to be able to tell it to gzip the output and to be able
> to specify the output name.

When starting pbulk for the first time, it is common (at least for me) 
that I don't manage to get everything in mk.conf correct and complete 
for the first time. Therefore I wanted to have the possibility of 
changing things quickly. Another reason was the recent removal of the 
"not running as root" warning, for which I wanted to update pkg_add and 
pkg_delete without extracting bootstrap.tar.gz and packing it again.

(Not reverted, since I still find it useful. But if you think this makes 
pbulk too complicated or is against its philosophy, feel free to revert it.)

Roland