FreeBSD Bugzilla – Attachment 244655 Details for
Bug 269884
[nanoBSD] cust_pkgng() fetches ports-mgmt/pkg from remote regardless of required package
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-nanoBSD-use-build-system-s-pkg-8-to-install-packages.patch (text/plain), 3.17 KB, created by
embhd
on 2023-09-05 09:57:11 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
embhd
Created:
2023-09-05 09:57:11 UTC
Size:
3.17 KB
patch
obsolete
>From eb278401ea3fdec9de9862ed974ffb5a11e846ea Mon Sep 17 00:00:00 2001 >From: Michael <embhd@posteo.de> >Date: Tue, 5 Sep 2023 11:41:15 +0200 >Subject: [PATCH] nanoBSD: use build system's pkg(8) to install packages > >Also, allow the NANO_PACKAGE_DIR to be linked ("find -L") in >/usr/src/tools/tools/nanobsd. >--- > tools/tools/nanobsd/defaults.sh | 24 +++++++----------------- > 1 file changed, 7 insertions(+), 17 deletions(-) > >diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh >index 45d9fe44c650..1d609862a0e3 100755 >--- a/tools/tools/nanobsd/defaults.sh >+++ b/tools/tools/nanobsd/defaults.sh >@@ -277,16 +277,6 @@ tgt_dir2symlink ( ) ( > fi > ) > >-# run in the world chroot, errors fatal >-CR ( ) { >- chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*" >-} >- >-# run in the world chroot, errors not fatal >-CR0 ( ) { >- chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true >-} >- > clean_build ( ) ( > pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" > >@@ -499,7 +489,7 @@ run_late_customize ( ) ( > # a user's cfg file would override this. > # > fixup_before_diskimage ( ) ( >- # Run the deduplication script that takes the matalog journal and >+ # Run the deduplication script that takes the metalog journal and > # combines multiple entries for the same file (see source for > # details). We take the extra step of removing the size keywords. This > # script, and many of the user scripts, copies, appeneds and otherwise >@@ -740,7 +730,7 @@ cust_install_files ( ) ( > find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -Ldumpv ${NANO_WORLDDIR} > > if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then >- CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE} >+ chroot "${NANO_WORLDDIR}" /bin/sh -exc "mtree -eiU -p / <${NANO_CUST_FILES_MTREE}" > fi > ) > >@@ -750,7 +740,7 @@ cust_install_files ( ) ( > cust_pkgng ( ) ( > mkdir -p ${NANO_WORLDDIR}/usr/local/etc > local PKG_CONF="${NANO_WORLDDIR}/usr/local/etc/pkg.conf" >- local PKGCMD="env BATCH=YES ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none /usr/sbin/pkg" >+ local PKGCMD="env BATCH=YES ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none pkg -c ${NANO_WORLDDIR}" > > # Ensure pkg.conf points pkg to where the package meta data lives. > touch ${PKG_CONF} >@@ -767,7 +757,7 @@ cust_pkgng ( ) ( > fi > > # Find a pkg-* package >- for x in `find -s ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do >+ for x in `find -Ls ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do > _NANO_PKG_PACKAGE=`basename "$x"` > done > if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGE_DIR}/${_NANO_PKG_PACKAGE}" ]; then >@@ -783,7 +773,7 @@ cust_pkgng ( ) ( > trap "umount ${NANO_WORLDDIR}/dev; umount ${NANO_WORLDDIR}/_.p ; rm -xrf ${NANO_WORLDDIR}/_.p" 1 2 15 EXIT > > # Install pkg-* package >- CR "${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE}" >+ ${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE} > > ( > # Expand any glob characters in pacakge list >@@ -798,11 +788,11 @@ cust_pkgng ( ) ( > > # Install packages > for _PKG in $_PKGS; do >- CR "${PKGCMD} add /_.p/${_PKG}" >+ ${PKGCMD} add /_.p/${_PKG} > done > ) > >- CR0 "${PKGCMD} info" >+ ${PKGCMD} info || true > > trap - 1 2 15 EXIT > umount ${NANO_WORLDDIR}/dev >-- >2.42.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269884
:
240489
|
244655
|
255143