Re: How to create a PkgBase based chroot directory tree (for example)
- In reply to: Mark Millard : "How to create a PkgBase based chroot directory tree (for example)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Nov 2024 02:41:57 UTC
[Mostly fixing a dumb path mistake.]
On Nov 21, 2024, at 12:18, Mark Millard <marklmi@yahoo.com> wrote:
> Some context:
>
> I used url: "pkg+http://pkg.FreeBSD.org/${ABI}/base_weekly"
> as it was somewhat older then the kernel that the system
> was running. (Newer worlds on older kernels can be a problem.)
>
> What I grabbed also grabbed the kernels, for example. That
> might not be desired.
>
> For reference on the system in use, before this activity
> I had in place:
>
> # more /usr/local/etc/pkg/repos/base.conf
> base: {
> url: "pkg+http://pkg.FreeBSD.org/${ABI}/base_weekly",
> mirror_type: "srv",
> signature_type: "fingerprints",
> fingerprints: "/usr/share/keys/pkg",
> enabled: yes
> }
>
> What did I do starting from that? . . .
>
> I created an empty: /usr/obj/DESTDIRs/main-amd64-pbase/
>
> I the copied over just the tree: /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/pkg
I should have listed making a copy of: /usr/share/keys/pkg
> into the that newly created area.
Also, clearer would have been explicit commands:
# mkdir -p /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/
# cp -ax /usr/share/keys/pkg /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/
> This produced:
>
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/share
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/pkg
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/pkg/revoked
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/pkg/trusted
> /usr/obj/DESTDIRs/main-amd64-pbase/usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301
>
> With just that much of a directory tree present, I
> was then able to do the following. (I did the fetch
> stage separately from the update stage.)
>
> # pkg-static -r /usr/obj/DESTDIRs/main-amd64-pbase/ install -F -rbase -g 'FreeBSD-*'
> # pkg-static -r /usr/obj/DESTDIRs/main-amd64-pbase/ install -U -rbase -g 'FreeBSD-*'
> # chroot /usr/obj/DESTDIRs/main-amd64-pbase/
> # freebsd-version -kru
> 15.0-CURRENT
> 15.0-CURRENT
> 15.0-CURRENT
> # exit
> #
>
> After later setting some more up in the chroot :
>
> # ~/pkgbase-snapshot-list.sh
> Via pkg-static info -C -x '^FreeBSD-' . . .
> 1 FreeBSD-*-15.snap20241117111205
> 8 FreeBSD-*-15.snap20241116201407
> 2 FreeBSD-*-15.snap20241116191014
> 1 FreeBSD-*-15.snap20241116040924
> 16 FreeBSD-*-15.snap20241115155402
> 328 FreeBSD-*-15.snap20241115030705
> 66 FreeBSD-*-15.snap20241114232424
> 4 FreeBSD-*-15.snap20241114162618
> 1 FreeBSD-*-15.snap20241113231628
> 1 FreeBSD-*-15.snap20241113125231
> 1 FreeBSD-*-15.snap20241113091125
> 1 FreeBSD-*-15.snap20241112035500
> 1 FreeBSD-*-15.snap20241108205938
> 1 FreeBSD-*-15.snap20241108132953
> 1 FreeBSD-*-15.snap20241107061333
> 1 FreeBSD-*-15.snap20241107020356
> 5 FreeBSD-*-15.snap20241104155004
> 1 FreeBSD-*-15.snap20241103222744
> 1 FreeBSD-*-15.snap20241029132733
> 1 FreeBSD-*-15.snap20241028160252
> 97 FreeBSD-*-15.snap20241026125659
> Instead via /var/cache/pkg/*.snap*.pkg . . .
> 1 FreeBSD-*-15.snap20241117111205
> 8 FreeBSD-*-15.snap20241116201407
> 2 FreeBSD-*-15.snap20241116191014
> 1 FreeBSD-*-15.snap20241116040924
> 16 FreeBSD-*-15.snap20241115155402
> 328 FreeBSD-*-15.snap20241115030705
> 66 FreeBSD-*-15.snap20241114232424
> 4 FreeBSD-*-15.snap20241114162618
> 1 FreeBSD-*-15.snap20241113231628
> 1 FreeBSD-*-15.snap20241113125231
> 1 FreeBSD-*-15.snap20241113091125
> 1 FreeBSD-*-15.snap20241112035500
> 1 FreeBSD-*-15.snap20241108205938
> 1 FreeBSD-*-15.snap20241108132953
> 1 FreeBSD-*-15.snap20241107061333
> 1 FreeBSD-*-15.snap20241107020356
> 5 FreeBSD-*-15.snap20241104155004
> 1 FreeBSD-*-15.snap20241103222744
> 1 FreeBSD-*-15.snap20241029132733
> 1 FreeBSD-*-15.snap20241028160252
> 97 FreeBSD-*-15.snap20241026125659
>
>
> SIDE NOTE
> I learned that base_weekly does not have have
> FreeBSD-dtb , unlike base_latest .
> END SIDE NOTE
===
Mark Millard
marklmi at yahoo.com