pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
final copy to PACKAGES dir on network volume fails; patch for mk/pkgformat/pkg/package.mk
Hello,
using pkgsrc from CVS.
Some changes under /mk/ from late May broke "bmake package" on my build
servers. The packages would build fine, but the last step, copying the
completed package to the PACKAGE directory (on an SMB network volume)
would fail.
Error message like
/bin/cp: failed to preserve ownership for ...: Permission denied
The builds run as root on linux servers, the PACKAGE directory is an SMB
mount using non-root user credentials to the samba server.
It would work with
cvs checkout -D 2013/05/20 pkgsrc/mk/
The problem is in pkgsrc/mk/pkgformat/pkg/package.mk
79 .if ${_USE_DESTDIR} != "no"
80 ${PKGFILE}: ${STAGE_PKGFILE}
81 ${RUN} ${MKDIR} ${.TARGET:H}
82 @${STEP_MSG} "Creating binary package ${.TARGET}"
83 ${LN} -f ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null || \
==> 84 ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE}
85 .endif
If I remove the "-p" option from ${CP}, copying succeeds again.
I attached the simple patch to remove "-p". Is "-p" needed in other
circumstances?
Best regards
Matthias Ferdinand
Index: mk/pkgformat/pkg/package.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkgformat/pkg/package.mk,v
retrieving revision 1.2
diff -u -p -u -r1.2 package.mk
--- mk/pkgformat/pkg/package.mk 23 May 2013 13:18:56 -0000 1.2
+++ mk/pkgformat/pkg/package.mk 19 Jul 2013 16:54:27 -0000
@@ -81,7 +81,7 @@ ${PKGFILE}: ${STAGE_PKGFILE}
${RUN} ${MKDIR} ${.TARGET:H}
@${STEP_MSG} "Creating binary package ${.TARGET}"
${LN} -f ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null || \
- ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE}
+ ${CP} -f ${STAGE_PKGFILE} ${PKGFILE}
.endif
######################################################################
Home |
Main Index |
Thread Index |
Old Index