Discussion:
How to create a poudriere jail for a specific git hash of 15.0-CURRENT?
(too old to reply)
Craig Leres
2024-09-17 18:00:40 UTC
Permalink
I just updated my pfsense box to 24.03_1 and according to this page:

https://docs.netgate.com/pfsense/en/latest/releases/versions.html

23.04 is built from 15.0-***@a5a965d75934. How do I create a
poudriere jail for this specific hash?

I see how to create a *newer* version:

poudriere jail -x -c -j pfsense2403 -a arm64.aarch64 -m git+https \
-U https://git.freebsd.org/src.git -b releng/15.0 -v main

which I assume uses the most current hash.

Looking at the -m flag I suppose I could clone 15-CURRENT, "git checkout
a5a965d75934", and then use -b -m src=path? Is that my best option?

Craig


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Shawn Webb
2024-09-17 18:09:19 UTC
Permalink
Post by Craig Leres
which I assume uses the most current hash.
Looking at the -m flag I suppose I could clone 15-CURRENT, "git checkout
a5a965d75934", and then use -b -m src=path? Is that my best option?
That's exactly how I do it. Though, using `-m src=...` requires one to
do a buildworld first:

$ cd /data/src
$ git clone ssh://***@git.freebsd.org/src.git freebsd
$ cd freebsd
$ git reset --hard a5a965d75934
$ make -sj$(sysctl -n hw.ncpu) buildworld
$ sudo poudriere jail -c -m src=/data/src/freebsd -j current -p local

Thanks,
--
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50
https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
Craig Leres
2024-09-17 19:55:24 UTC
Permalink
Post by Shawn Webb
Post by Craig Leres
which I assume uses the most current hash.
Looking at the -m flag I suppose I could clone 15-CURRENT, "git checkout
a5a965d75934", and then use -b -m src=path? Is that my best option?
That's exactly how I do it. Though, using `-m src=...` requires one to
$ cd /data/src
$ cd freebsd
$ git reset --hard a5a965d75934
$ make -sj$(sysctl -n hw.ncpu) buildworld
$ sudo poudriere jail -c -m src=/data/src/freebsd -j current -p local
It worked for me without the buildworld. I did use the -b flag:

-b Build the source provided with the -m src=path option.

To wrap up here's what I did:

zfs create -o mountpoint=/usr/src/15-CURRENT -o compress=lz4
tank/15-CURRENT
cd /usr/src
git clone https://git.freebsd.org/src.git 15-CURRENT
cd 15-CURRENT
git checkout a5a965d75934
poudriere jail -x -c -j pfsense2403 -a arm64.aarch64 -m
src=/usr/src/15-CURRENT -b

Also note that I'm cross-compiling (my build server is amd64).

Craig


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Shawn Webb
2024-09-17 20:23:59 UTC
Permalink
Post by Craig Leres
Post by Shawn Webb
Post by Craig Leres
which I assume uses the most current hash.
Looking at the -m flag I suppose I could clone 15-CURRENT, "git checkout
a5a965d75934", and then use -b -m src=path? Is that my best option?
That's exactly how I do it. Though, using `-m src=...` requires one to
$ cd /data/src
$ cd freebsd
$ git reset --hard a5a965d75934
$ make -sj$(sysctl -n hw.ncpu) buildworld
$ sudo poudriere jail -c -m src=/data/src/freebsd -j current -p local
-b Build the source provided with the -m src=path option.
zfs create -o mountpoint=/usr/src/15-CURRENT -o compress=lz4
tank/15-CURRENT
cd /usr/src
git clone https://git.freebsd.org/src.git 15-CURRENT
cd 15-CURRENT
git checkout a5a965d75934
poudriere jail -x -c -j pfsense2403 -a arm64.aarch64 -m
src=/usr/src/15-CURRENT -b
Oh, cool! It has been a while since I looked at the manual page for
poudriere-build. I didn't know that option existed. I might just use
-b in the future. Thanks for the hint!
--
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50
https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
Loading...