Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 2020 10:02:23 +0100
From:      Kurt Jaeger <pi@freebsd.org>
To:        "@lbutlr" <kremels@kreme.com>
Cc:        FreeBSD <freebsd-ports@freebsd.org>
Subject:   Re: Starting with poudriere
Message-ID:  <20200216090223.GH37073@home.opsec.eu>
In-Reply-To: <D786D70F-8909-4360-B87A-7F7901567124@kreme.com>
References:  <3743CEAE-BCC9-479E-8367-F3DA0E30496E@kreme.com> <4D118F32-E38F-4860-BBE8-4D9F259BF653@kreme.com> <CAK82gMF1O1EgBSW_hH_F-oPFOqx7iL-09ydi-myFUfhgyRYCFw@mail.gmail.com> <D786D70F-8909-4360-B87A-7F7901567124@kreme.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

> On 15 Feb 2020, at 21:43, Dan McGrath <danmcgrath.ca@gmail.com> wrote:
> > You would run "poudriere bulk", then sit back sipping coffee while it
> > churns through all of the packages.
> 
> Hang on a second, so the intended use for poudriere is to build ALL packages?

Only those you want, and automatically those, that are required to
build those.

For example, I have a file 'server', which is used to build
all the ports I need for servers.

-----------------------
archivers/arc
archivers/arj
archivers/cabextract
archivers/deb2targz
archivers/gtar
archivers/lha
archivers/libmspack
archivers/libzip
[...]
-----------------------

I use a small script:

-----------------------
#!/usr/local/bin/bash

poudriere ports -u

stmp=`date +%s`

cd ~/pkg
cat php74 server > all

poudriere bulk -T -f ~/pkg/all -j cur > ~/logs/cur-all-$stmp
-----------------------

to build those. My build host runs current, and it can build for
current and older versions:

poudriere jail -l lists my build systems:

JAILNAME VERSION                      ARCH          METHOD  TIMESTAMP           PATH
112      11.2-RELEASE                 amd64         ftp     2018-06-28 07:36:14 /pou/jails/112
113      11.3-RELEASE                 amd64         ftp     2019-07-11 06:42:40 /pou/jails/113
120      12.0-RELEASE-p9              amd64         ftp     2019-08-10 15:06:39 /pou/jails/120
121      12.1-RELEASE                 amd64         ftp     2019-11-04 20:37:14 /pou/jails/121
12i      12.1-RELEASE                 i386          ftp     2019-11-04 21:46:18 /pou/jails/12i
arm      13.0-CURRENT 1300013 r344710 arm64.aarch64 svn+ssh 2019-03-02 14:35:50 /pou/jails/arm
cur      13.0-CURRENT 1300054 r354278 amd64         svn+ssh 2019-11-03 13:17:47 /pou/jails/cur
curi     13.0-CURRENT 1300054 r354278 i386          svn+ssh 2019-11-03 12:12:11 /pou/jails/curi

> Right now I have two jails setup, one for 12.1 amd64 and one for 11.3 i386. That seems like a *LOT* of compiling/building.

Yes, it's a lot of compiling. I only build our selection of ports
(approx. 2000 ports), and all it requirements, in sum it's approx. 3800
ports.

To be fair, I could probably strip a awful lot of the 2000 ports,
that number is that high because I did not find the time to prune
that list.

And: I do not build it every day, only one every week or so.

And: If I want to build a new port, I have a different script, to build
exactly that and its requirements:

---------------
#!/usr/local/bin/bash

echo $1 > ~/pkg/one
poudriere ports -u
poudriere bulk -T -f ~/pkg/one -j cur

---------------

Called like this:

bulkcurone shells/bash

it just builds bash, and updates bash and its requirements.

If that means to rebuild gmake, it will also rebuild gmake.

So after such a 'bulkone' action, if I update the target system using

pkg upgrade

it might upgrade only bash, or a few other packages, or a lot,
if I did not upgrade that target system for a long time.

Which is fine, because, for almost all cases, nothing breaks if
all that stuff is updated.

I can even test complex dependencies. I do this using jail-specific
make.conf files, for example:

/usr/local/etc/poudriere.d/121-default-make.conf

WARNING_WAIT=0
WITH_MPM=event
DEFAULT_VERSIONS= perl5=5.30 python=3.6 python3=3.6 ruby=2.6 pgsql=12 php=7.3 mysql=10.4m gcc=9 samba=4.10

If I want to experiment with php 7.4, I change that field, rebuild
all (bulk121), wait a bit and everything is set.

> And once I've build, say, ImageMagick or
> postfix/dovecot/mariadb/apache/etc how do I then deploy them to the
> 11.3 server (as in, a different machine)?

I have a webserver running on the box, https://repo.opsec.eu/ (not
public) or on the company build host, https://repo.nepustil.net/ (public).

There, we have the ready-to-use package repos available, just as symlinks
into the poudriere directory tree.

On my target systems, I use:

mkdir -p /usr/local/etc/pkg/repos/
cat > nepustil.conf <<EOF 
nepustil: {
    url: https://repo.nepustil.net/${ABI}
}
EOF

It looks hugely complicated, but it's very user-friendly, in fact.

It's *so* cool, that I decided to use a very beefy builder box (32
cores, 128 GB RAM, NVM) to be able to quickly build everything I need.

-- 
pi@opsec.eu            +49 171 3101372                    Now what ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200216090223.GH37073>