Re: keeping old php74 in poudriere

From: void <void_at_f-m.fm>
Date: Wed, 22 Feb 2023 19:46:48 UTC
On Wed, Feb 22, 2023 at 06:15:40PM +0100, Andrea Venturoli wrote:
>
>Let me know how you manage, please, since I might need to do this too :(

For these particular machines, these are being supported using a 
particular poudriere instance. So I make

1. poudriere ports -c -p default1 -m git+https -q

and a small script to tell it to refresh and then remove MOVED
from it, before the poudriere run for this instance. My other
poudriere instances run with default ports tree, not default1 
(in other words, I still want MOVED for those ones)

I got the last branch with php74 in which was 2022Q4 so

2. poudriere ports -c -p php74 -B 2022Q4 -m git+https -q

Then needed to "delete" the newly fetched branch so poudriere 
no longer knew about it, in order to make it nullfs mounted.

3. poudriere ports -d -k -p php74

4. poudriere ports -c -p php74 -m null -M /usr/local/poudriere/ports/php74

Then got a list of php ports on the client machine:

5. pkg info -xo php | sort | tee php74.txt

sftp it to the poudriere host, stripped out the part that is just portname 
rather than port/origin in the list, then cat it followed by sort into the
ports list.

Then looked at php74.txt in one term and opened /usr/local/poudriere/ports/php74
in mc. matched category/port with what i wanted to keep, and deleted everything
else apart from Mk/bsd.default-versions.mk and Mk/Uses/php.mk.

I have the following set in 123R-make.conf

###
WITH_CCACHE_BUILD=YES
CCACHE_DIR=/var/cache/ccache
SCCACHE_DIR=/root/.sccache
OVERLAYS+=/usr/local/share/sccache/overlay

#
OPTIONS_UNSET+=DEBUG ALSA PULSEAUDIO WKS_SERVER SCDAEMON BRACKETEDPASTE GITWEB FLANG LTO
OPTIONS_SET+=OPTIMIZED_CFLAGS MAN MANPAGES SUID_GPG BROTLI ZSTD
OPTIONS_SET+=DOCS NLS AVX LARGE_RSA LIBZ2 LIBZ LIBSECRET GBDM LIBEDIT_DL
DEFAULT_VERSIONS+=MYSQL=5.7
DEFAULT_VERSIONS+=PHP=7.4
LICENSES_ACCEPTED+=GPLv2+ MSPAT PDFlib

###

Then ran the build with

poudriere bulk -j 123R -O sccache -O php74 -f 123R-ports.txt

It seems to build the right things :D

>I personally rely on git.

I haven't been able to get my head round git yet apart from the very simplest stuff

>I maintain my own branches and periodically "rebase" on the official ones.

I'd like to know how to do this in git as well. 

>However, I don't do this just for a port or two, I have some ports to
>add, some to patch, etc... (and I also do this for src), so it's
>possible that, for your use case, this might be overkill.

It'd be useful for me to know how to rebase/cherry pick safely.
Sometimes fixes appear in reviews but they don't MFC yet,
same for ports sometimes.

>WRT php74 I'm a bit scared, since it's not just a matter of adding some
>ports, but also make the infrastructure cope (USES, VERSIONS, etc...).

zeroing (not *deleting*) MOVED seems to take care of this, so far.

--