My exciting journey with poudriere on a Raspberry Pi

A jail should be treated as a separate "namespace" from the host.
For the sake of simplicity i ssh into my jails.
And all jails have "ip4 = inherit; ip6 = inherit;"

/root/.zshrc in the jail has:
PROMPT='a:$fg[green]%n: $fg[default]%d #'
So it is clear i'm in the jail.
 
It sounds like you need to have a jail up and running, not just installed.
Yeah, this is the problem here. I never worked with jails and only used poudriere to create the reference jail. I want poudriere to take care of all this stuff (for simplicity) and don't want to use jails regularly.

I think i let it build all the packages and see what the result is. For now it builds pkg in the jail:
Bash:
[main-default] [2021-11-19_22h33m59s] [balancing_pool:] Queued: 30 Built: 0  Failed: 0  Skipped: 0  Ignored: 0  Fetched: 0  Tobuild: 30  Time: 00:00:36
[00:04:10] Recording filesystem state for prepkg... done
[00:04:10] Building 30 packages using 1 builders
[00:04:10] Starting/Cloning builders
[00:08:12] Hit CTRL+t at any time to see build progress and stats
[00:08:12] [01] [00:00:00] Building ports-mgmt/pkg | pkg-1.17.5
[00:12:57] [01] [00:04:45] Finished ports-mgmt/pkg | pkg-1.17.5: Success
[00:12:57] [01] [00:00:00] Building print/indexinfo | indexinfo-0.3.1
[00:17:45] [01] [00:04:48] Finished print/indexinfo | indexinfo-0.3.1: Success
[00:17:45] [01] [00:00:00] Building devel/gettext-runtime | gettext-runtime-0.21

This will take a while.
 
Code:
[00:04:10] Building 30 packages using 1 builders
Unless this build contains 6 different compilers (LLVM and GCC) it should finish fairly quickly. You might want to increase the number of jobs though, so it can build several things in parallel.

I only have the Raspberry available at the moment..
Right. That's going to take some time then. The Pi isn't known for its speed.
 
Unless this build contains 6 different compilers (LLVM and GCC) it should finish fairly quickly.
Nope, it's been ~50 minutes and it only built 5 packages so far
Bash:
[00:08:12] [01] [00:00:00] Building ports-mgmt/pkg | pkg-1.17.5
[00:12:57] [01] [00:04:45] Finished ports-mgmt/pkg | pkg-1.17.5: Success
[00:12:57] [01] [00:00:00] Building print/indexinfo | indexinfo-0.3.1
[00:17:45] [01] [00:04:48] Finished print/indexinfo | indexinfo-0.3.1: Success
[00:17:45] [01] [00:00:00] Building devel/gettext-runtime | gettext-runtime-0.21
[00:25:06] [01] [00:07:21] Finished devel/gettext-runtime | gettext-runtime-0.21: Success
[00:25:07] [01] [00:00:00] Building devel/libtextstyle | libtextstyle-0.21
[00:33:53] [01] [00:08:46] Finished devel/libtextstyle | libtextstyle-0.21: Success
[00:33:54] [01] [00:00:00] Building devel/gettext-tools | gettext-tools-0.21
[00:49:48] [01] [00:15:54] Finished devel/gettext-tools | gettext-tools-0.21: Success
[00:49:49] [01] [00:00:00] Building lang/perl5.32 | perl5-5.32.1_1
You might want to increase the number of jobs though, so it can build several things in parallel.
Nope, otherwise i can't surf the forums in parallel. Leaving the default of 4 build jobs just makes the Pi unresponsive.
 
I used poudriere bulk -j main games/stonesoup to start the build, can i interrupt the build process via Ctrl + c and resume the build afterwards or will it create the reference jail again and start from scratch?
 
You can stop it. The packages which are completely build will not be needed to rebuild when you restart.
Note when you stop it, the builds are not added to repository (which is mostly what you want)
 
For raspberry pi i would put in make.conf
Code:
MAKE_JOBS_NUMBER=2
I've increased the number of builders to 2 but not in make.conf but in poudriere.conf
Bash:
# parallel build support.
#
# By default poudriere uses hw.ncpu to determine the number of builders.
# You can override this default by changing PARALLEL_JOBS here, or
# by specifying the -J flag to bulk/testport.
#
# Example to define PARALLEL_JOBS to one single job
PARALLEL_JOBS=2

Multitasking is slow but acceptable.
 
The port built fine (after 5 hours for 30 packages) and this was only the console version.

It has an SDL flavor and i don't know if i should try to build it.
But out of interest: How do i enable another flavor with poudriere?

From the Makefile
Code:
FLAVORS=    console sdl

Do i use poudriere options or is it another command?
 
poudriere bulk -j main games/stonesoup won't prefetch the packages but wants to build them.
What am i missing?

Relevant lines may be missing from the configuration file. From the sample configuration:

Code:
root@mowa219-gjp4-8570p-freebsd:~ # tail -n 15 /usr/local/etc/poudriere.conf.sample  


# Set to always attempt to fetch packages or dependencies before building.
# XXX: This is subject to change
# Default: off; requires -b <branch> for bulk or testport.
#PACKAGE_FETCH_BRANCH=latest
# The branch will be appended to the URL:
#PACKAGE_FETCH_URL=pkg+http://pkg.FreeBSD.org/\${ABI}
# Packages which should never be fetched.  This is useful for ports that
# you have local patches for as otherwise the patches would be ignored if
# a remote package is used instead.
#PACKAGE_FETCH_BLACKLIST=""
# Alternatively a whitelist can be created to only allow specific packages to
# be fetched.
# Default: everything
#PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"
root@mowa219-gjp4-8570p-freebsd:~ #
 
The port built fine (after 5 hours for 30 packages) and this was only the console version.

It has an SDL flavor and i don't know if i should try to build it.
But out of interest: How do i enable another flavor with poudriere?

From the Makefile
Code:
FLAVORS=    console sdl

Do i use poudriere options or is it another command?
Off the top of my head, I think there's something in poudriere.conf to enable building a different flavor, as well. I'd caution you to educate yourself on usage of word 'flavor', because that can mean a different architecture like amd64 or aarch64. But this looks more like a Makefile option. You can tell Poudriere to look in custom options directory and follow that.
 
Relevant lines may be missing from the configuration file.
Oops. Thanks. I totally missed chrbr s post.
In make.conf
Off the top of my head, I think there's something in poudriere.conf to enable building a different flavor, as well.
Thanks to both of you, i will look into this.

Edit: I think i found the answer in the man page (poudriere(8)):
A FLAVOR of bar for port devel/foo is specified as devel/foo@bar

So the command should be poudriere bulk -j main games/stonesoup@sdl
 
For the record:

1. The @ to specify the flavor works.

2. PACKAGE_FETCH_BRANCH=latest doesn't work for aarch64, there are a lot of missing packages, e.g.
Code:
[00:08:53] Warning: libmodplug-0.8.9.0.pkg not found. Remote PKG_SUFX likely differs temporarily
[00:08:53] Warning: zopfli-1.0.3_1.pkg not found. Remote PKG_SUFX likely differs temporarily
[00:08:53] Warning: gperf-3.1.pkg not found. Remote PKG_SUFX likely differs temporarily
[00:08:53] Warning: evdev-proto-5.8.pkg not found. Remote PKG_SUFX likely differs temporarily

2. PACKAGE_FETCH_BRANCH=quarterly does work, but it too does not fetch all packages due to missing dependencies:
Code:
[00:07:58] Deleting dbus-glib-0.112.pkg: missing dependency: glib-2.70.1,2
[00:07:58] Deleting libxcb-1.14_1.pkg: missing dependency: libXdmcp-1.1.3
[00:07:59] Deleting minixmlto-0.0.3.pkg: missing dependency: libxslt-1.1.34_2
[00:07:59] Deleting libX11-1.7.2,1.pkg: missing dependency: libxcb-1.14_1

Out of 143 packages, it fetched only 56 and wants to build 87.
Code:
[main-default] [2021-11-20_05h18m42s] [balancing_pool:] Queued: 143 Built: 0   Failed: 0   Skipped: 0   Ignored: 0   Fetched: 56  Tobuild: 87   Time: 00:03:23

Not today.
 

Crossed paths :) with <https://forums.freebsd.org/threads/82848/post-542861>

Incidentally, following the example there: FreeBSD bug 259942 – sysutils/fusefs-ext2 and flavoured sysutils/e2fsprogs@nobootfsck

PACKAGE_FETCH_BRANCH=latest doesn't work for aarch64, there are a lot of missing packages,

For the packages that are not fetched, does it not proceed to build packages?



Hint: maybe change the title here, it's a broad discussion. Thanks.
 
… Glad to see that feature finally made it over from ports-mgmt/poudriere-devel.

poudriere-bulk():

-b name Specify the name of the binary package branch to use to prefetch

As far as I know, it's not yet a feature of the non -devel port <https://www.freshports.org/ports-mgmt/poudriere/#history> at 3.3.7_1.

Option -b:
FreeBSD bug 256676 – ports-mgmt/poudriere manpage of poudriere-bulk(8) claims features which aren't available in 3.3.6

… please delete the Poudriere manpages. It's giving people the wrong information.
 
eternal_noob : I re-read this thread. Comments on Page 1 of this thread seem to touch on the same issues I'm having (with Poudriere not 'seeing' stuff that it should be able to 'see' from a jail). In my case, I was able to isolate the issue to null-mounting. A workaround that I'm thinking of is to fake a remote repo (call it repo A), tell Git and Poudriere about repo A being a default 'remote repo', then poudriere ports should use git to pull stuff from remote (repo A) to local, and then it should be visible, no problem. I'm still in the process of setting it up and seeing if that way will even work.
 
Back
Top