tech-pkg archive

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

[patch] Installing signed packages from source



			Hi tech-pkg@,

I am currently experiencing issues when installing signed packages from
source.

With this setup:

/etc/pkg_install.conf:
VERIFIED_INSTALLATION=always

/etc/mk.conf:
.ifdef BSD_PKG_MK
SIGN_PACKAGES=gpg
.endif

then pkgsrc builds a signed package ($PKGFILE) from the staging package
($STAGE_PKGFILE) as expected. However, it then tries to install the
staging package, which is not signed, and fails.

It seems to me that it could install $PKGFILE directly instead; I have
not tested every different possible code path though, so I will welcome
review and feedback.

Cheers,
-- 
khorben
Index: pkgformat/pkg/package.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkgformat/pkg/package.mk,v
retrieving revision 1.10
diff -p -u -r1.10 package.mk
--- pkgformat/pkg/package.mk	21 Apr 2015 17:01:56 -0000	1.10
+++ pkgformat/pkg/package.mk	12 Jul 2015 15:14:27 -0000
@@ -201,13 +201,13 @@ su-real-package-install:
 	@${PHASE_MSG} "Install binary package of "${PKGNAME:Q}
 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
 	@${MKDIR} ${_CROSS_DESTDIR}${PREFIX}
-	${PKG_ADD} -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${STAGE_PKGFILE}
+	${PKG_ADD} -m ${MACHINE_ARCH} -I -p ${_CROSS_DESTDIR}${PREFIX} ${PKGFILE}
 	@${ECHO} "Fixing recorded cwd..."
 	@${SED} -e 's|@cwd ${_CROSS_DESTDIR}|@cwd |' ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS > ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp
 	@${MV} ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS
 .else
 	${RUN} case ${_AUTOMATIC:Q}"" in					\
-	[yY][eE][sS])	${PKG_ADD} -A ${STAGE_PKGFILE} ;;		\
-	*)		${PKG_ADD} ${STAGE_PKGFILE} ;;			\
+	[yY][eE][sS])	${PKG_ADD} -A ${PKGFILE} ;;		\
+	*)		${PKG_ADD} ${PKGFILE} ;;			\
 	esac
 .endif


Home | Main Index | Thread Index | Old Index