pkg bootstrap chooses ABI/OSVERSION of host, not specified ABI & OSVERSION when installing into an empty directory

Aperta
#2,533 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c
Ambito
cli

Direzione di ricerca

Inizia dal punto di ingresso pkg bootstrap -f e riproduci il comando documentato usando --rootdir, ABI=FreeBSD:14:aarch64 e OSVERSION=1403000. Traccia il modo in cui bootstrap seleziona il repository e i valori di destinazione; il lavoro è completato quando una directory root vuota esegue il bootstrap dell’ABI e dell’OSVERSION richieste invece di usare i valori dell’host.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

use case

  • user is targeting either future jail, or empty boot env

context

Previously it was possible to bootstrap a FreeBSD system by unpacking base.txz into
a directory and then pkg(8) would figure out what ABI/OSVERSION was being targeted
when it bootstrapped inside the chroot/rootdir/jail. If dist sets are not going
to be provided, an alternative needs to be found.

example

  • pkg bootstrap -f should install the requested ABI/OSVERSION into the root dir
$ mkdir /tmp/foo && cd /tmp/foo
$ uname -a
FreeBSD wintermute 15.0-ALPHA4 FreeBSD 15.0-ALPHA4 stable/15-n280351-b15ef791f91f GENERIC amd64
## attempt to bootstrap into empty directory
$  env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg \
                              -o ABI=FreeBSD:14:aarch64 \
                              -o OSVERSION=1403000 \
                              -o AUTOCLEAN=yes \
                              -o INSTALL_AS_USER=yes \
                              -r FreeBSD-ports \
                              --rootdir . \
                              bootstrap -f
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
pkg(8) is already installed. Forcing reinstallation through pkg(7).
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest, please wait...
^C
  • but instead we get the ABI/OSVERSION from the host

partial workaround

  • pre-copy certs & FreeBSD-*.conf pkg repo files
  • use pkg install ... as this will respect ABI/OSVERSION

But with rootdir ... it will still attempt some operations on the host, not inside.

Some more notes & experiments at https://docs.skunkwerks.at/s/zG3lEhtP_#

Lingua principale
C
Stelle
835
Fork
313
Merge medio
3g 7h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di freebsd/pkg

Tutte le issue di freebsd/pkg

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.