diff options
author | schmonz <schmonz@pkgsrc.org> | 2021-12-11 09:01:23 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2021-12-11 09:01:23 +0000 |
commit | 5b326548c9ce5171872e3b67548515e2069f9122 (patch) | |
tree | 14ce6f59182d55f96e4442056410e5ef10b8986b | |
parent | 007f989cba5a79fc95616411b3c0e610fc90b231 (diff) | |
download | pkgsrc-5b326548c9ce5171872e3b67548515e2069f9122.tar.gz |
I export pkgsrc over NFS from a macOS host to a variety of VMs, each of
which sets ${PACKAGES} to a subdir of ${PKGSRCDIR}/packages (on the same
NFS mount) so that the generated packages all land in one place.
From my Debian, Devuan, Ubuntu, and CentOS 8 (but not 7) VMs,
copying ${STAGE_PKGFILE} to ${PKGFILE} fails to preserve permissions,
which fails the copy and the "package" target with it. The error
looks like so:
===> Building binary package for foo-4.2
=> Creating binary package /home/schmonz/trees/pkgsrc-cvs/packages/Debian/All/foo-4.2.tgz
/bin/cp: preserving permissions for ‘/home/schmonz/trees/pkgsrc-cvs/packages/Debian/All/foo-4.2.tgz’: Operation not permitted
Assuming permissions on built packages are merely a nice-to-have, avoid
failing if we couldn't preserve them. Patch from sjmulder@, for whom
this fixes a similar problem with FreeBSD with ZFS.
-rw-r--r-- | mk/pkgformat/pkg/package.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/pkgformat/pkg/package.mk b/mk/pkgformat/pkg/package.mk index 999b8c2e99c..2ad00f077fe 100644 --- a/mk/pkgformat/pkg/package.mk +++ b/mk/pkgformat/pkg/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.16 2017/08/19 00:30:19 jlam Exp $ +# $NetBSD: package.mk,v 1.17 2021/12/11 09:01:23 schmonz Exp $ .if defined(PKG_SUFX) WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION" @@ -66,7 +66,8 @@ ${PKGFILE}: ${STAGE_PKGFILE} @${STEP_MSG} "Creating binary package ${.TARGET}" ${RUN} ${MKDIR} ${.TARGET:H}; \ ${LN} -f ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null || \ - ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE} + ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null || \ + ${CP} -f ${STAGE_PKGFILE} ${PKGFILE} .endif ###################################################################### |