pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: final copy to PACKAGES dir on network volume fails; patch for mk/pkgformat/pkg/package.mk
On Fri, Jul 19, 2013 at 03:50:10PM -0400, Greg Troxel wrote:
>
> Matthias Ferdinand <mf+ml.pkgsrc-users%netzwerkagentursaarland.de@localhost>
> writes:
>
> > Error message like
> > /bin/cp: failed to preserve ownership for ...: Permission denied
>
> > ==> 84 ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE}
>
> Which version of cp?
These are mostly older Linux systems, /bin/cp from coreutils:
SuSE Linux 9.0 (i586): cp (coreutils) 5.0
SuSE Linux 9.2 (i586): cp (coreutils) 5.2.1
SUSE LINUX 10.0 (i586): cp (GNU coreutils) 5.3.0
Ubuntu 6.06: cp (GNU coreutils) 5.93
Ubuntu 8.04: cp (GNU coreutils) 6.10
Ubuntu 10.04: cp (GNU coreutils) 7.4
Ubuntu 12.04: cp (GNU coreutils) 8.13
The file actually ends up on the server, but /bin/cp returns with an
error code ("1") for the failed attribute setting. While I may get the
basic perl package on the server, I never get any of the p5 module
packages, as they try again to bmake perl and fail.
> So perhaps adding || and ${CP} without the -p is the right thing.
That would work, but it copies the file twice over the network ( /bin/cp
copies first, then tries to adjust the permissions).
There is the finer-grained --preserve= option:
/bin/cp -f --preserve=mode,timestamps <src> <dst>
but that is in GNU coreutils, not in POSIX.
You could use touch and chmod on the copied file, omitting SELinux
context and xattr (if anybody relied on these).
Or just another configuration variable for "don't preserve ownership on
PACKAGES directory", or a variable for "use this command for copying to
PACKAGES"
I actually could live with the "|| ${CP} -f" version, our network can
take that little load it adds, it is just not very elegant.
Best regards
Matthias Ferdinand
Home |
Main Index |
Thread Index |
Old Index