Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151436114
D54546.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D54546.diff
View Options
diff --git a/Makefile.inc1 b/Makefile.inc1
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2105,11 +2105,11 @@
package-pkg: _pkgbootstrap _repodir .PHONY
.if defined(INCLUDE_PKG_IN_PKGBASE_REPO)
.if exists(${PORTSDIR})
- rm -rf /tmp/ports.${TARGET} || :
- env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \
- PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \
- WSTAGEDIR=${WSTAGEDIR} \
- OSVERSION="${SRCRELDATE}" LOCALBASE=${LOCALBASE} \
+ env ${WMAKEENV} \
+ SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} OBJDIR=${.OBJDIR} \
+ REPODIR=${REPODIR} REVISION=${_REVISION} PKG_CMD=${PKG_CMD} \
+ WSTAGEDIR=${WSTAGEDIR} LOCALBASE=${LOCALBASE} \
+ PKG_VERSION=${PKG_VERSION} OSVERSION="${SRCRELDATE}" \
sh ${.CURDIR}/release/scripts/make-pkg-package.sh
.endif
.endif
diff --git a/release/Makefile b/release/Makefile
--- a/release/Makefile
+++ b/release/Makefile
@@ -164,7 +164,11 @@
.if defined(WITH_DVD) && !empty(WITH_DVD)
CLEANFILES+= pkg-stage
.endif
-CLEANDIRS= dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd pkgbase-repo.tar
+CLEANDIRS= dist ftp pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir \
+ pkgbase-repo.tar ports \
+ disc1 disc1-disc1 disc1-memstick \
+ bootonly bootonly-bootonly bootonly-memstick \
+ dvd
beforeclean:
chflags -R noschg .
.include <bsd.obj.mk>
@@ -231,7 +235,6 @@
pkgbase-repo:
mkdir -p pkgbase-repo
- mkdir -p /tmp/ports /tmp/distfiles
( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \
INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES )
diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh
--- a/release/scripts/make-pkg-package.sh
+++ b/release/scripts/make-pkg-package.sh
@@ -1,13 +1,22 @@
#!/bin/sh
+# We want to fail quickly if anything goes wrong.
+set -e
+
+if [ -z "$OBJDIR" ]; then
+ printf >&2 '%s: ERROR: $OBJDIR must be set.\n' "$0"
+ exit 1
+fi
+
# Simulate the build environment. Note that we need to unset some variables
# which are set in the src tree since they have different (unwanted) effects
# in the ports tree.
-SRC_PKG_VERSION=${PKG_VERSION}
-PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)
+SRC_PKG_VERSION="${PKG_VERSION}"
+PKG_ABI="$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)"
unset PKG_VERSION
unset MAKEFLAGS
unset PKGBASE
+
# Ports interprets CROSS_TOOLCHAIN differently from src, and having this set
# breaks the package-pkg build. For now, forcibly unset this and hope ports
# can find a working compiler.
@@ -15,9 +24,15 @@
printf >&2 '%s: WARNING: CROSS_TOOLCHAIN will be ignored for the pkg build.\n' "$0"
unset CROSS_TOOLCHAIN
fi
-export WRKDIRPREFIX=/tmp/ports.${TARGET}
-export DISTDIR=/tmp/distfiles
-export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)
+
+WRKDIRPREFIX="${OBJDIR}/ports/work"; export WRKDIRPREFIX
+DISTDIR="${OBJDIR}/ports/distfiles"; export DISTDIR
+WRKDIR="$(make -C ${PORTSDIR}/ports-mgmt/pkg \
+ I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \
+ -V WRKDIR)"
+export WRKDIR
+
+mkdir -p "$WRKDIRPREFIX" "$DISTDIR"
make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION} --prefix=${LOCALBASE}" \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 9:48 AM (12 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31150199
Default Alt Text
D54546.diff (3 KB)
Attached To
Mode
D54546: release: Keep the pkg build in OBJDIR
Attached
Detach File
Event Timeline
Log In to Comment