Page MenuHomeFreeBSD

D51482.id.diff
No OneTemporary

D51482.id.diff

diff --git a/release/Makefile b/release/Makefile
--- a/release/Makefile
+++ b/release/Makefile
@@ -133,7 +133,7 @@
.if defined(WITH_DVD) && !empty(WITH_DVD)
CLEANFILES+= pkg-stage
.endif
-CLEANDIRS= dist pkgdb pkgbase-repo pkgbase-repo-conf ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd
+CLEANDIRS= dist pkgdb pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd
beforeclean:
chflags -R noschg .
.include <bsd.obj.mk>
@@ -194,8 +194,10 @@
.endif
.if !defined(NOPKGBASE) || empty(NOPKGBASE)
-PKGBASE_REPO= pkgbase-repo
-PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI)
+PKGBASE_REPO_DIR= pkgbase-repo-dir
+WSTAGEDIR!= ${IMAKE} -f Makefile.inc1 -C ${WORLDDIR} -V WSTAGEDIR
+PKG_ABI_FILE= ${WSTAGEDIR}/usr/bin/uname
+PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI)
.endif
pkgbase-repo:
@@ -204,7 +206,13 @@
( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \
INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES )
-disc1: ${PKGBASE_REPO}
+pkgbase-repo-dir: pkgbase-repo
+ mkdir -p pkgbase-repo-dir
+ printf "FreeBSD-base: { url: "file://%s", enabled: yes }" \
+ ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \
+ > pkgbase-repo-dir/FreeBSD-base.conf
+
+disc1: ${PKGBASE_REPO_DIR}
# Install system
mkdir -p ${.TARGET}
( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
@@ -218,7 +226,7 @@
# Create offline pkgbase repo on release media
mkdir -p ${.TARGET}/usr/freebsd-packages/repos/
${.CURDIR}/scripts/pkgbase-stage.lua disc \
- ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \
+ ${.OBJDIR}/pkgbase-repo-dir \
${.TARGET}/usr/freebsd-packages/offline \
"${_ALL_libcompats}" ${PKG_ABI}
cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \
@@ -308,7 +316,7 @@
echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
-dvd: ${PKGBASE_REPO}
+dvd: ${PKGBASE_REPO_DIR}
# Install system
mkdir -p ${.TARGET}
( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
@@ -318,7 +326,7 @@
# Create offline pkgbase repo on release media
mkdir -p ${.TARGET}/usr/freebsd-packages/repos/
${.CURDIR}/scripts/pkgbase-stage.lua dvd \
- ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \
+ ${.OBJDIR}/pkgbase-repo-dir \
${.TARGET}/usr/freebsd-packages/offline \
"${_ALL_libcompats}" ${PKG_ABI}
cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \
diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua
--- a/release/scripts/pkgbase-stage.lua
+++ b/release/scripts/pkgbase-stage.lua
@@ -81,28 +81,18 @@
-- Determines package subset selected
local media = assert(arg[1])
assert(media == "disc" or media == "dvd")
- -- Local repository to fetch from
- local source = assert(arg[2])
+ -- Directory containing FreeBSD-base repository config
+ local repo_dir = assert(arg[2])
-- Directory to create new repository
local target = assert(arg[3])
- -- =hitespace separated list of all libcompat names (e.g. "32")
+ -- Whitespace separated list of all libcompat names (e.g. "32")
local all_libcompats = assert(arg[4])
-- ABI of repository
local ABI = assert(arg[5])
- assert(os.execute("mkdir -p pkgbase-repo-conf"))
- local f <close> = assert(io.open("pkgbase-repo-conf/FreeBSD-base.conf", "w"))
- assert(f:write(string.format([[
- FreeBSD-base: {
- url: "file://%s",
- enabled: yes
- }
- ]], source)))
- assert(f:close())
-
local pkg = "pkg -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes " ..
"-o ABI=" .. ABI .. " " ..
- "-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R ./pkgbase-repo-conf "
+ "-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R " .. repo_dir .. " "
assert(os.execute(pkg .. "update"))

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 30, 5:34 PM (16 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28102949
Default Alt Text
D51482.id.diff (3 KB)

Event Timeline