freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
393 stars 162 forks source link

Unable to update jails with host built WITHOUT_FREEBSD_UPDATE #940

Open swills opened 3 years ago

swills commented 3 years ago

Prerequisites

Describe the bug

A host built with WITHOUT_FREEBSD_UPDATE=yes doesn't have /usr/sbin/freebsd-update installed. This prevents updating jails that are created using ftp/http.

How to reproduce

Steps to reproduce the behavior:

  1. Build host OS with WITHOUT_FREEBSD_UPDATE=yes set in /etc/src.conf, run make delete-old
  2. Create poudriere jails with -m http
  3. Later, try to update the jail using poudriere jail -u
  4. See error: sed: /usr/sbin/freebsd-update: No such file or directory

Expected behavior

Poudriere uses /usr/sbin/freebsd-update from the jail to update the jail, instead of the one from the host, and the update succeeds.

Screenshots

sudo poudriere jail -u -j 130-amd64
[00:00:00] Upgrading using http
sed: /usr/sbin/freebsd-update: No such file or directory
13.0-RELEASE-p4
[00:00:00] Recording filesystem state for clean... done

Environment

Additional context

N/A

bdrewery commented 2 years ago

I'll try to add back compat for it. But it's such a small script why do we even allow not building it? Is there a concern about security or someone wrongly using it on the target system?

swills commented 2 years ago

I'll try to add back compat for it. But it's such a small script why do we even allow not building it? Is there a concern about security or someone wrongly using it on the target system?

I think it's a combination of vendors not wanting/needing it and potentially using it wrongly on systems built from source or using pkgbase. Which brings up a whole other issue of updating jails that are using pkgbase, but I suppose that's a separate issue to address later.