Re: poudriere cannot build 12.3R jail on a 13-stable system - cp: [vdso]: No such file or directory

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Wed, 28 Sep 2022 09:19:21 UTC
On Wed, 28 Sep 2022 03:32:11 +0100
void <void@f-m.fm> wrote:

> On Tue, 27 Sep 2022, at 15:49, void wrote:
> > On Tue, 27 Sep 2022, at 02:29, void wrote:
> >
> >> The same host creates 13.1R and 13-stable systems fine. I have not yet 
> >> tried making a 12.2R or a 12-stable system yet.
> >
> > 12-stable poudriere jail builds correctly
> 
> 12.2 fails at the same place.
> 
> Tried to build 12.3R poudriere with locally patched (from the review mentioned in  https://lists.freebsd.org/archives/freebsd-current/2022-April/001737.html ) not really expecting it to patch as here trying to build a 12.3R jail whereas the context 
> of the patch is addressing the same issue for building 13-stable on -current
> 
> # cd /tmp
> # git clone ssh://anongit@git.freebsd.org/src.git
> # cd src
> # git checkout releng/12.3
> # wget https://reviews.freebsd.org/file/data/3pwqyimbgzwstgvcmkos/PHID-FILE-xj5gncvnwh542umtjq7s/D34734.diff
> # patch < D34734.diff
> 
> The patch fails to apply when the sources are checked out to 12.3
> 
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |diff --git a/Makefile.inc1 b/Makefile.inc1
> |--- a/Makefile.inc1
> |+++ b/Makefile.inc1
> --------------------------
> Patching file Makefile.inc1 using Plan A...
> Hunk #1 failed at 1368.
> 1 out of 1 hunks failed--saving rejects to Makefile.inc1.rej
> Hmm...  Ignoring the trailing garbage.
> done

I'm not a user of poudriere, but looking into the patch you mentioned
and src of releng/12.3, it shouldn't apply as is.

The conditional at the top of the patch only appears on releng/13.0
and later only. (Seems to be introduced at r364760 on SVN era. [1])

Modifying the patch manually to be "just applicable" is quite easy,
but not sure the patch works as intended without the conditional.
Attaching modified patch but I cannot assure it builds/works.


An advice for the future:
For diffs on phablicator, use "-p1" option for patch.
This time, the target file is at current directory, so it is OK, but if
any of the targets are in subdirectories, the patch SHOULDN'T apply
without the option.
And try with option "-C" first to check whether it can be applicable
or not. 

BTW, annotate view on svnweb was quite useful on the situation like
this (Want to check when the code was introduced). But I cannot find
equivalent functionality on cgit. :-(


[1]
https://svnweb.freebsd.org/base/head/Makefile.inc1?r1=364759&r2=364760&



-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>