Use latest packages in jails.

This commit is contained in:
Tom Alexander 2024-06-30 12:30:46 -04:00
parent 2042719a3c
commit f09844c03c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 25 additions and 12 deletions

View File

@ -54,12 +54,12 @@ jail_list:
- name: sftp - name: sftp
conf: conf:
src: sftp src: sftp
- name: mumble # - name: mumble
conf: # conf:
src: mumble # src: mumble
persist: # persist:
- name: mumbledb # - name: mumbledb
mount: /var/db/murmur # mount: /var/db/murmur
bhyve_dataset: zmass/encrypted/vm bhyve_dataset: zmass/encrypted/vm
bhyve_list: [] bhyve_list: []
bhyve_canmount: "on" bhyve_canmount: "on"

View File

@ -22,6 +22,7 @@ function by_src {
make -j 16 buildworld make -j 16 buildworld
make installworld DESTDIR=$DESTDIR make installworld DESTDIR=$DESTDIR
make distribution DESTDIR=$DESTDIR make distribution DESTDIR=$DESTDIR
switch_to_latest_packages
} }
function by_bin { function by_bin {
@ -29,6 +30,7 @@ function by_bin {
DESTARCH=`uname -m` DESTARCH=`uname -m`
SOURCEURL=http://ftp.freebsd.org/pub/FreeBSD/releases/$DESTARCH/$DESTRELEASE/ SOURCEURL=http://ftp.freebsd.org/pub/FreeBSD/releases/$DESTARCH/$DESTRELEASE/
for component in base ports; do fetch $SOURCEURL/$component.txz -o - | tar -xf - -C "$DESTDIR" ; done for component in base ports; do fetch $SOURCEURL/$component.txz -o - | tar -xf - -C "$DESTDIR" ; done
switch_to_latest_packages
} }
function by_pkg { function by_pkg {
@ -46,6 +48,22 @@ base: {
EOF EOF
) )
IGNORE_OSVERSION=yes pkg --rootdir "$DESTDIR" --config <(cat <<<"$config") install --repository base --yes --glob 'FreeBSD-*' IGNORE_OSVERSION=yes pkg --rootdir "$DESTDIR" --config <(cat <<<"$config") install --repository base --yes --glob 'FreeBSD-*'
switch_to_latest_packages
cat > "$DESTDIR/usr/local/etc/pkg/repos/pkgbase.conf" <<<"$config"
# Post-install remove extra packages
# pkg remove --glob 'FreeBSD-*-lib32*' 'FreeBSD-*-dbg*' FreeBSD-src
}
function switch_to_latest_packages {
local latest_pkg
latest_pkg=$(cat <<EOF
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/\${ABI}/latest"
}
EOF
)
mkdir -p "$DESTDIR/usr/local/etc/pkg/repos"
cat > "$DESTDIR/usr/local/etc/pkg/repos/FreeBSD.conf" <<<"$latest_pkg"
} }
if [ "$1" = "src" ]; then if [ "$1" = "src" ]; then

View File

@ -1,7 +1,3 @@
FreeBSD: { FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
} }

View File

@ -106,7 +106,6 @@ KbdInteractiveAuthentication no
#PermitTunnel no #PermitTunnel no
#ChrootDirectory none #ChrootDirectory none
#UseBlacklist no #UseBlacklist no
#VersionAddendum FreeBSD-20231004
# no default banner path # no default banner path
#Banner none #Banner none