pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/pkgformat/pkg I export pkgsrc over NFS from a macOS...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3abc233c3770
branches: trunk
changeset: 770880:3abc233c3770
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Sat Dec 11 09:01:23 2021 +0000
description:
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.
diffstat:
mk/pkgformat/pkg/package.mk | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r ae92e1fb4ad8 -r 3abc233c3770 mk/pkgformat/pkg/package.mk
--- a/mk/pkgformat/pkg/package.mk Sat Dec 11 07:25:05 2021 +0000
+++ b/mk/pkgformat/pkg/package.mk Sat Dec 11 09:01:23 2021 +0000
@@ -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 @@
@${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
######################################################################
Home |
Main Index |
Thread Index |
Old Index