diff options
author | Matthew Seaman <matthew@FreeBSD.org> | 2016-11-30 07:16:29 +0000 |
---|---|---|
committer | Matthew Seaman <matthew@FreeBSD.org> | 2016-11-30 07:16:29 +0000 |
commit | 91c915facf29fa2ded409354e49e9b8833c132f3 (patch) | |
tree | 9608eee36673e00f296ccd92ba72b332702f6976 /release/scripts/make-pkg-package.sh | |
parent | fdd0222a048ff961110d308c99c2c9096fb0ec58 (diff) | |
download | src-91c915facf29fa2ded409354e49e9b8833c132f3.tar.gz src-91c915facf29fa2ded409354e49e9b8833c132f3.zip |
Allow a user-overridable setting 'PKG_CMD' to control the command used
to create a repo during 'make packages'
This would have been useful for a situation I found myself in where
pkg(8) had been upgraded to a version that wanted the FBSD_1.5 ABI
version but libc.so.7 had not been upgraded, and only provided
FBSD_1.4. I found I needed to update libc in order to run pkg, and I
also needed to use pkg to update libc... Which is why pkg-static
exists, but there's currently no way to tell the build system to use
pkg-static instead of pkg.
This creates a variable PKG_CMD, default value 'pkg', that can be
overridden from the command line.
Reviewed by: gjb
Approved by: gjb
Differential Revision: https://reviews.freebsd.org/D8120
Notes
Notes:
svn path=/head/; revision=309314
Diffstat (limited to 'release/scripts/make-pkg-package.sh')
-rwxr-xr-x | release/scripts/make-pkg-package.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh index ab9418bab803..39814f17453f 100755 --- a/release/scripts/make-pkg-package.sh +++ b/release/scripts/make-pkg-package.sh @@ -8,6 +8,7 @@ eval $(make -C ${SRCDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildenvvar export WRKDIRPREFIX=/tmp/ports.${TARGET} export WSTAGEDIR=${WSTAGEDIR} export REPODIR=${REPODIR} +export PKG_CMD=${PKG_CMD} export PKG_VERSION=${PKG_VERSION} export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR) @@ -15,11 +16,11 @@ make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \ stage create-manifest -pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh \ +${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh \ create -v -m ${WRKDIR}/.metadir/ \ -r ${WRKDIR}/stage \ -p ${WRKDIR}/.PLIST.mktmp \ - -o ${REPODIR}/$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} -mkdir -p ${REPODIR}/$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ -cd ${REPODIR}/$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ && \ + -o ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} +mkdir -p ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ +cd ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ && \ ln -s ../pkg-*.txz |