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
conf:
src: sftp
- name: mumble
conf:
src: mumble
persist:
- name: mumbledb
mount: /var/db/murmur
# - name: mumble
# conf:
# src: mumble
# persist:
# - name: mumbledb
# mount: /var/db/murmur
bhyve_dataset: zmass/encrypted/vm
bhyve_list: []
bhyve_canmount: "on"

View File

@ -22,6 +22,7 @@ function by_src {
make -j 16 buildworld
make installworld DESTDIR=$DESTDIR
make distribution DESTDIR=$DESTDIR
switch_to_latest_packages
}
function by_bin {
@ -29,6 +30,7 @@ function by_bin {
DESTARCH=`uname -m`
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
switch_to_latest_packages
}
function by_pkg {
@ -46,6 +48,22 @@ base: {
EOF
)
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

View File

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

View File

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