pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/pkgformat/pkg



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Sat Dec 11 09:01:23 UTC 2021

Modified Files:
        pkgsrc/mk/pkgformat/pkg: package.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/mk/pkgformat/pkg/package.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/pkgformat/pkg/package.mk
diff -u pkgsrc/mk/pkgformat/pkg/package.mk:1.16 pkgsrc/mk/pkgformat/pkg/package.mk:1.17
--- pkgsrc/mk/pkgformat/pkg/package.mk:1.16     Sat Aug 19 00:30:19 2017
+++ pkgsrc/mk/pkgformat/pkg/package.mk  Sat Dec 11 09:01:23 2021
@@ -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
 
 ######################################################################



Home | Main Index | Thread Index | Old Index