opnsense / update

OPNsense update tools
https://opnsense.org/
BSD 2-Clause "Simplified" License
128 stars 79 forks source link

opnsense-bootstrap: stops with `already unlocked` package even using a very recent FreeBSD build #99

Closed fdcastel closed 3 weeks ago

fdcastel commented 3 weeks ago

I'm having the same problem from #93 in a very recent build of FreeBSD (from 2024-10-28)

# sh opnsense-bootstrap.sh.in -y -V -r 24.7
+ [ -z 24.7 ]
+ uname -s
+ [ FreeBSD '!=' FreeBSD ]
+ uname -p
+ [ amd64 '!=' amd64 ]
+ uname -r
+ colrm 4
+ [ -n '' -a 14. '!=' %%FREEBSD%%. ]
+ [ -z '' ]
+ echo 'This utility will attempt to turn this installation into the latest'
This utility will attempt to turn this installation into the latest
+ echo 'OPNsense 24.7 release.  All packages will be deleted, the base'
OPNsense 24.7 release.  All packages will be deleted, the base
+ echo 'system and kernel will be replaced, and if all went well the system'
system and kernel will be replaced, and if all went well the system
+ echo 'will automatically reboot.'
will automatically reboot.
+ echo

+ [ -z -y ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ rm -rf /usr/local/etc/pkg
+ rm -rf /tmp/opnsense-bootstrap/core-stable-24.7 /tmp/opnsense-bootstrap/core.tar.gz
+ mkdir -p /tmp/opnsense-bootstrap
+ export 'ASSUME_ALWAYS_YES=yes'
+ [ -n '' ]
+ SUBFILE=stable/24.7
+ SUBDIR=stable-24.7
+ [ -n '' ]
+ [ -z '' ]
+ DO_ABI='-a 24.7'
+ fetch -o /tmp/opnsense-bootstrap/core.tar.gz https://github.com/opnsense/core/archive/stable/24.7.tar.gz
fetch: https://github.com/opnsense/core/archive/stable/24.7.tar.gz: size of remote file is not known
/tmp/opnsense-bootstrap/core.tar.gz                   7707 kB 4344 kBps    02s
+ tar -C /tmp/opnsense-bootstrap -xf /tmp/opnsense-bootstrap/core.tar.gz
+ [ -z '' ]
+ pkg -N
pkg: 48 packages installed
+ pkg unlock -ya
bash-5.2.37: already unlocked
# cat /etc/os-release
NAME=FreeBSD
VERSION="14.1-RELEASE-p5"
VERSION_ID="14.1"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 14.1-RELEASE-p5"
CPE_NAME="cpe:/o:freebsd:freebsd:14.1"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"

Link to image used can be found here from https://bsd-cloud-image.org.

fdcastel commented 3 weeks ago

Frankly, I'm unsure why the issue #93 was closed.

I'm working to automate a VM setup for my homelab Proxmox VE.

I’m using image from bsd-cloud-image.org because, unlike the official FreeBSD images, they include cloud-init (which allows me to automate the VM initialization).

fdcastel commented 3 weeks ago

...aaaand of course, after I posted the last message, I found this:

https://github.com/opnsense/update/issues/93#issuecomment-2242714677

Running

# pkg delete -fya

fixed the problem (packages are downloading now).

I need more coffee -- or maybe just more sleep.