__package_pkgng_freebsd: Bootstrapping broken on FreeBSD 12.2 #20

Closed
opened 2021-11-20 11:24:51 +00:00 by ungleich-gitea · 2 comments

I just downloaded a fresh FreeBSD 12.2 VM from https://download.freebsd.org/ftp/releases/VM-IMAGES/12.2-RELEASE/ to configure it using cdist.

But package installations fail with this error message:

INFO: freebsd-12-2.vm: Processing __package_pkgng_freebsd/htop
ERROR: freebsd-12-2.vm: ssh -o User=root -o ControlPath=/var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpynu9qn98/s -o ControlMaster=auto -o ControlPersist=2h freebsd-12-2.vm /bin/sh -c ' export __object=/tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i;  export __object_id=htop;/bin/sh -e /tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i/code-remote': ['ssh', '-o', 'User=root', '-o', 'ControlPath=/var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpynu9qn98/s', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=2h', 'freebsd-12-2.vm', "/bin/sh -c ' export __object=/tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i;  export __object_id=htop;/bin/sh -e /tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i/code-remote'"]

Error processing object '__package_pkgng_freebsd/htop'
======================================================
name: __package_pkgng_freebsd/htop
path: /var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpix1pu4ar/1170e84c2bf1c7ffd27c8c10947f9e5f/data/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i
source: /var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpix1pu4ar/1170e84c2bf1c7ffd27c8c10947f9e5f/data/conf/type/__package/manifest
type: /Users/yoshi/.cdist/src/cdist/cdist/conf/type/__package_pkgng_freebsd


ERROR: cdist: Failed to configure the following hosts: freebsd-12-2.vm

Because this error does not really help, I checked the generated code:

pkg bootstrap -y >/dev/null 2>&1
pkg install -y htop >/dev/null 2>&1
status=$?
if [ "$status" -ne "0" ]; then
	echo "Error: pkg install -y htop exited nonzero with $status"'!' >&2
	exit 1
fi

The first line seems to be the culprit:

root@freebsd-12-2:~ # pkg bootstrap -y
Invalid argument specified
Usage: pkg bootstrap [-f]

ASSUME_ALWAYS_YES=yes pkg bootstrap works for me.

@evilham Since I'm a FreeBSD noob, and you wrote the bootstrapping patch: is ASSUME_ALWAYS_YES a doable workaround?

I just downloaded a fresh FreeBSD 12.2 VM from https://download.freebsd.org/ftp/releases/VM-IMAGES/12.2-RELEASE/ to configure it using cdist. But package installations fail with this error message: ``` INFO: freebsd-12-2.vm: Processing __package_pkgng_freebsd/htop ERROR: freebsd-12-2.vm: ssh -o User=root -o ControlPath=/var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpynu9qn98/s -o ControlMaster=auto -o ControlPersist=2h freebsd-12-2.vm /bin/sh -c ' export __object=/tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i; export __object_id=htop;/bin/sh -e /tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i/code-remote': ['ssh', '-o', 'User=root', '-o', 'ControlPath=/var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpynu9qn98/s', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=2h', 'freebsd-12-2.vm', "/bin/sh -c ' export __object=/tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i; export __object_id=htop;/bin/sh -e /tmp/cdist/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i/code-remote'"] Error processing object '__package_pkgng_freebsd/htop' ====================================================== name: __package_pkgng_freebsd/htop path: /var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpix1pu4ar/1170e84c2bf1c7ffd27c8c10947f9e5f/data/object/__package_pkgng_freebsd/htop/.cdist-iujbw48i source: /var/folders/hm/1zn8rd0d3jgbk342zbxl9sww0000gn/T/tmpix1pu4ar/1170e84c2bf1c7ffd27c8c10947f9e5f/data/conf/type/__package/manifest type: /Users/yoshi/.cdist/src/cdist/cdist/conf/type/__package_pkgng_freebsd ERROR: cdist: Failed to configure the following hosts: freebsd-12-2.vm ``` Because this error does not really help, I checked the generated code: ```sh pkg bootstrap -y >/dev/null 2>&1 pkg install -y htop >/dev/null 2>&1 status=$? if [ "$status" -ne "0" ]; then echo "Error: pkg install -y htop exited nonzero with $status"'!' >&2 exit 1 fi ``` The first line seems to be the culprit: ```console root@freebsd-12-2:~ # pkg bootstrap -y Invalid argument specified Usage: pkg bootstrap [-f] ``` `ASSUME_ALWAYS_YES=yes pkg bootstrap` works for me. @evilham Since I'm a FreeBSD noob, and you wrote the bootstrapping patch: is `ASSUME_ALWAYS_YES` a doable workaround?
Author
Owner

Update on this, there was a regression in argument handling for pkg(7) between 12.1-RELEASE and 12.2-RELEASE.

It's fixed here for CURRENT: https://cgit.freebsd.org/src/commit/?id=ae994fdc5bd2ccc0ac0b8745fd1f1be67ad6e071
and should be merged to the RELEASE branch in a couple weeks and afterwards available when a new patch level is released.
In any case, closing this since we merged !961

Update on this, there was a regression in argument handling for `pkg(7)` between 12.1-RELEASE and 12.2-RELEASE. It's fixed here for CURRENT: https://cgit.freebsd.org/src/commit/?id=ae994fdc5bd2ccc0ac0b8745fd1f1be67ad6e071 and should be merged to the RELEASE branch in a couple weeks and afterwards available when a new patch level is released. In any case, closing this since we merged !961
Author
Owner

mentioned in merge request !961

mentioned in merge request !961
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#20
No description provided.