Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

TrueOS standard Poudriere repo #1537

Open
digitalist opened this issue Mar 6, 2018 · 5 comments
Open

TrueOS standard Poudriere repo #1537

digitalist opened this issue Mar 6, 2018 · 5 comments
Assignees

Comments

@digitalist
Copy link

digitalist commented Mar 6, 2018

It makes sense to create a 'perfect' github repo of current TrueOS Chimaera Poudriere setup.
It should satisfy at least two purposes:

  • useful for TrueOS committers/porters (checking/fixing current issues like with dtrace/openal-soft)
  • helping iX devs with that piece of infrastructure
  • maybe - as a far goal - it can be used later for integrating into github ci (travis or independent) - because FreeBSD doesn't have such infrastructure

possible check-list;

  • repo
  • ansible/shell scripts for deploying a standalone installation
  • cleanup/reset scripts
  • some readme with instructions for tinkering with this setup
@digitalist
Copy link
Author

Pinging here, also can lend a hand on this ticket if someone drops on me a bunch of configs

@kmoore134
Copy link
Member

Ok, Here's my initial brain-dump. Not at a system with the information in front of me, so forgive any mistakes / omissions:

  1. Setup

Since we build on HEAD and poudriere is essentially using jails to do builds, you need to be running a system with a newer version of HEAD than the version of the OS you plan on building. I.E. trueos-unstable can build trueos-stable/trueos-unstable branches, but trueos-stable often cannot build trueos-unstable packages.

  1. Install poudriere

Since we're building with poudriere, we obviously need to install it. "pkg install poudriere" will get you setup. Once thats done edit /usr/local/etc/poudriere.conf to ensure the correct build settings are used, since its pretty easy to swap a builder to death if you use too many builders and do not have enough ram.

Once the initial setup is done, create a poudriere jail using the distfiles for whatever branch of TrueOS you intended to build on top of. Those files are located on the download site:

http://download.trueos.org/unstable/amd64/dist/

# poudriere jail -c -j trueos -v 12-CURRENT -m url=http://download.trueos.org/unstable/amd64/dist/

(To fix an issue with building using OpenRC there is a slight modification we have to make to poudriere, this may go away in the future when I or somebody has time to fix the "service" command working in openrc jails)
https://github.com/iXsystems/ixbuild/blob/master/trueos/scripts/portbuild.sh#L180

  1. The ports repo

The ports tree we build is https://github.com/trueos/freebsd-ports which we can setup with the following:

# echo "GIT_URL=https://github.com/trueos/freebsd-ports" >> /usr/local/etc/poudriere.conf
# poudriere ports -c -p trueos-ports -B trueos-master -m git

  1. Starting the build

First, grab a copy of our master ports make knobs:

https://github.com/trueos/trueos-core/blob/master/build-files/conf/desktop/port-make.conf

# cp port-make.conf /usr/local/etc/poudriere.d/trueos-make.conf

Now you can go ahead and start a complete build:

# poudriere bulk -a -j trueos -p trueos-ports

Of course you can replace -a with a list of ports to build if you don't want to do all 28k~

Note: This is all ripped from our build system here: https://github.com/iXsystems/ixbuild/tree/master/trueos/scripts

That repo is quite a bit of a mess right now and in desperate need of a re-write, so if somebody wants to take on the task of building a much "simpler" solution I'd be very happy to switch to it ;)

@digitalist
Copy link
Author

digitalist commented Mar 26, 2018

here's ansible playbook for setting up poudriere on some host according to your instructions. Well, at least I can use poudriere now :-)

Where goes this? For setting up poudriere as a service?

To fix an issue with building using OpenRC there is a slight modification we have to make to poudriere, this may go away in the future when I or somebody has time to fix the "service" command working in openrc jails

https://github.com/iXsystems/ixbuild/blob/master/trueos/scripts/portbuild.sh#L180

@kmoore134
Copy link
Member

@digitalist I'd just run this command somewhere in your playbook post-install of poudriere:

sed -i '' 's|injail service ldconfig start|injail /etc/rc.d/ldconfig start|g' /usr/local/share/poudriere/common.sh

That'll fix the issue starting the jails with OpenRC within poudriere. I really should look into how we can avoid that though so that service command works inside jails properly. :)

To push this forward, would you like to add this playbook to the trueos-core repo proper? Maybe add some wording to README.md as well which gives details on how to set it up?

For next-steps, we'd need instructions on how to run poudriere directly after setup. Something like:

poudriere bulk -a j trueos -p trueos-ports

And then sit and wait a LONG time while all packages build.

@digitalist
Copy link
Author

digitalist commented Apr 3, 2018

I've updated it.

I wonder how to test it on all packages,
guess I'll be out of disk space.

Should somehow build packages to /dev/null.

also I didn't see any openrc-related errors during build.

btw fix: this command poudriere bulk -a j trueos -p trueos-ports will not work, it should be poudriere bulk -j trueos -p trueos-ports -a, I guess you're writing it from memory or another version of poudriere

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants