archlinux-s390x/patches/pkgbuild/grep.sh

42 lines
1.9 KiB
Bash
Raw Normal View History

[FIX] grep: skip its host-vetting bootstrap; util-linux: lib64 again grep is the only package here that INSPECTS the version of the m4 macros its build host provides, and refuses to proceed: ./bootstrap: do not use pkg.m4 serial 12 That is not an s390x incompatibility -- the same refusal happens on any Ubuntu host, x86 included. The release tarball is already bootstrapped, so re-running ./bootstrap regenerates what is already there and skipping it costs nothing. util-linux hits the lib64-versus-lib divergence already handled in gcc.sh. Here it surfaces as rm: cannot remove '.../usr/lib/lib*.la': No such file or directory a glob that matched nothing, which rm reports as a missing file rather than an empty expansion -- so the error names a path that was never going to exist. Same remedy: merge the trees before package() touches anything, leaving the upstream paths working unchanged. That divergence has now appeared twice. If a third package hits it, it belongs in the shared bootstrap rather than in per-package hooks. --- FR --- grep est le seul paquet ici a EXAMINER la version des macros m4 que lui fournit son hote, et a refuser de poursuivre : ./bootstrap: do not use pkg.m4 serial 12 Ce n est pas une incompatibilite s390x -- le meme refus survient sur n importe quel hote Ubuntu, x86 compris. L archive de version est deja amorcee, donc relancer ./bootstrap regenere ce qui existe deja et le sauter ne coute rien. util-linux rencontre la divergence lib64 contre lib deja traitee dans gcc.sh. Elle apparait ici sous la forme rm: cannot remove '.../usr/lib/lib*.la': No such file or directory un motif qui ne correspond a rien, que rm signale comme un fichier manquant plutot que comme une expansion vide -- l erreur nomme donc un chemin qui n allait jamais exister. Meme remede : fusionner les arbres avant que package() ne touche a quoi que ce soit. Cette divergence est apparue deux fois. Si un troisieme paquet la rencontre, sa place est dans l amorcage partage et non dans des crochets par paquet. Assisted-by: Claude Opus 5
2026-08-16 23:26:54 -04:00
#!/usr/bin/env bash
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
# grep: neutralise the pkg.m4 serial check inside bootstrap.conf.
[FIX] grep: skip its host-vetting bootstrap; util-linux: lib64 again grep is the only package here that INSPECTS the version of the m4 macros its build host provides, and refuses to proceed: ./bootstrap: do not use pkg.m4 serial 12 That is not an s390x incompatibility -- the same refusal happens on any Ubuntu host, x86 included. The release tarball is already bootstrapped, so re-running ./bootstrap regenerates what is already there and skipping it costs nothing. util-linux hits the lib64-versus-lib divergence already handled in gcc.sh. Here it surfaces as rm: cannot remove '.../usr/lib/lib*.la': No such file or directory a glob that matched nothing, which rm reports as a missing file rather than an empty expansion -- so the error names a path that was never going to exist. Same remedy: merge the trees before package() touches anything, leaving the upstream paths working unchanged. That divergence has now appeared twice. If a third package hits it, it belongs in the shared bootstrap rather than in per-package hooks. --- FR --- grep est le seul paquet ici a EXAMINER la version des macros m4 que lui fournit son hote, et a refuser de poursuivre : ./bootstrap: do not use pkg.m4 serial 12 Ce n est pas une incompatibilite s390x -- le meme refus survient sur n importe quel hote Ubuntu, x86 compris. L archive de version est deja amorcee, donc relancer ./bootstrap regenere ce qui existe deja et le sauter ne coute rien. util-linux rencontre la divergence lib64 contre lib deja traitee dans gcc.sh. Elle apparait ici sous la forme rm: cannot remove '.../usr/lib/lib*.la': No such file or directory un motif qui ne correspond a rien, que rm signale comme un fichier manquant plutot que comme une expansion vide -- l erreur nomme donc un chemin qui n allait jamais exister. Meme remede : fusionner les arbres avant que package() ne touche a quoi que ce soit. Cette divergence est apparue deux fois. Si un troisieme paquet la rencontre, sa place est dans l amorcage partage et non dans des crochets par paquet. Assisted-by: Claude Opus 5
2026-08-16 23:26:54 -04:00
#
# ./bootstrap: do not use pkg.m4 serial 12;
# see https://lists.gnu.org/r/grep-devel/2025-04/msg00006.html
#
[FIX] grep: neutralise the m4 check, do not skip bootstrap The previous version of this hook skipped ./bootstrap entirely, on the assumption that the source was a released tarball and therefore already bootstrapped. It is not -- it is a git checkout, so skipping bootstrap removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory That made things worse than the failure it was meant to fix, and it was my assumption that was wrong, not the package. What has to go is the check, not the bootstrap. grep is the only package here that INSPECTS the version of the m4 macros its host provides and refuses to proceed on Ubuntu's serial -- on any Ubuntu host, x86 included. The check lives in the extracted source, so it is removed from prepare(). The hook now verifies BOTH that the check is gone and that ./bootstrap is still invoked, so this particular mistake cannot come back silently. --- FR --- La version precedente de ce crochet sautait ./bootstrap entierement, en supposant que la source etait une archive de version, donc deja amorcee. Elle ne l est pas -- c est un depot git, et sauter bootstrap supprimait configure lui-meme : PKGBUILD: line 43: ./configure: No such file or directory Cela empirait l etat au lieu de le corriger, et c est mon hypothese qui etait fausse, pas le paquet. Ce qu il faut retirer, c est la verification, pas l amorcage. grep est le seul paquet ici a EXAMINER la version des macros m4 de son hote et a refuser la serie d Ubuntu -- sur n importe quel hote Ubuntu, x86 compris. La verification vit dans la source extraite : elle est donc retiree depuis prepare(). Le crochet controle desormais A LA FOIS que la verification a disparu et que ./bootstrap est toujours appele, pour que cette erreur precise ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-16 23:30:49 -04:00
# grep is the only package here that INSPECTS the version of the m4 macros
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
# its build host provides. Not an s390x incompatibility: the same refusal
# happens on any Ubuntu host, x86 included -- pkg-config 0.29.2 ships that
# serial everywhere.
[FIX] grep: skip its host-vetting bootstrap; util-linux: lib64 again grep is the only package here that INSPECTS the version of the m4 macros its build host provides, and refuses to proceed: ./bootstrap: do not use pkg.m4 serial 12 That is not an s390x incompatibility -- the same refusal happens on any Ubuntu host, x86 included. The release tarball is already bootstrapped, so re-running ./bootstrap regenerates what is already there and skipping it costs nothing. util-linux hits the lib64-versus-lib divergence already handled in gcc.sh. Here it surfaces as rm: cannot remove '.../usr/lib/lib*.la': No such file or directory a glob that matched nothing, which rm reports as a missing file rather than an empty expansion -- so the error names a path that was never going to exist. Same remedy: merge the trees before package() touches anything, leaving the upstream paths working unchanged. That divergence has now appeared twice. If a third package hits it, it belongs in the shared bootstrap rather than in per-package hooks. --- FR --- grep est le seul paquet ici a EXAMINER la version des macros m4 que lui fournit son hote, et a refuser de poursuivre : ./bootstrap: do not use pkg.m4 serial 12 Ce n est pas une incompatibilite s390x -- le meme refus survient sur n importe quel hote Ubuntu, x86 compris. L archive de version est deja amorcee, donc relancer ./bootstrap regenere ce qui existe deja et le sauter ne coute rien. util-linux rencontre la divergence lib64 contre lib deja traitee dans gcc.sh. Elle apparait ici sous la forme rm: cannot remove '.../usr/lib/lib*.la': No such file or directory un motif qui ne correspond a rien, que rm signale comme un fichier manquant plutot que comme une expansion vide -- l erreur nomme donc un chemin qui n allait jamais exister. Meme remede : fusionner les arbres avant que package() ne touche a quoi que ce soit. Cette divergence est apparue deux fois. Si un troisieme paquet la rencontre, sa place est dans l amorcage partage et non dans des crochets par paquet. Assisted-by: Claude Opus 5
2026-08-16 23:26:54 -04:00
#
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
# TWO EARLIER VERSIONS OF THIS HOOK WERE WRONG, both for the same reason --
# assuming the shape of a file instead of reading it:
[FIX] grep: neutralise the m4 check, do not skip bootstrap The previous version of this hook skipped ./bootstrap entirely, on the assumption that the source was a released tarball and therefore already bootstrapped. It is not -- it is a git checkout, so skipping bootstrap removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory That made things worse than the failure it was meant to fix, and it was my assumption that was wrong, not the package. What has to go is the check, not the bootstrap. grep is the only package here that INSPECTS the version of the m4 macros its host provides and refuses to proceed on Ubuntu's serial -- on any Ubuntu host, x86 included. The check lives in the extracted source, so it is removed from prepare(). The hook now verifies BOTH that the check is gone and that ./bootstrap is still invoked, so this particular mistake cannot come back silently. --- FR --- La version precedente de ce crochet sautait ./bootstrap entierement, en supposant que la source etait une archive de version, donc deja amorcee. Elle ne l est pas -- c est un depot git, et sauter bootstrap supprimait configure lui-meme : PKGBUILD: line 43: ./configure: No such file or directory Cela empirait l etat au lieu de le corriger, et c est mon hypothese qui etait fausse, pas le paquet. Ce qu il faut retirer, c est la verification, pas l amorcage. grep est le seul paquet ici a EXAMINER la version des macros m4 de son hote et a refuser la serie d Ubuntu -- sur n importe quel hote Ubuntu, x86 compris. La verification vit dans la source extraite : elle est donc retiree depuis prepare(). Le crochet controle desormais A LA FOIS que la verification a disparu et que ./bootstrap est toujours appele, pour que cette erreur precise ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-16 23:30:49 -04:00
#
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
# 1. Skipping ./bootstrap. The source is a git checkout, not a released
# tarball, so that removed configure itself:
# PKGBUILD: line 43: ./configure: No such file or directory
# 2. Editing `bootstrap`. The check is not there. It lives in
# bootstrap.conf, in a shell function, built from a $url variable --
# which is why grepping for the literal message found nothing.
[FIX] grep: neutralise the m4 check, do not skip bootstrap The previous version of this hook skipped ./bootstrap entirely, on the assumption that the source was a released tarball and therefore already bootstrapped. It is not -- it is a git checkout, so skipping bootstrap removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory That made things worse than the failure it was meant to fix, and it was my assumption that was wrong, not the package. What has to go is the check, not the bootstrap. grep is the only package here that INSPECTS the version of the m4 macros its host provides and refuses to proceed on Ubuntu's serial -- on any Ubuntu host, x86 included. The check lives in the extracted source, so it is removed from prepare(). The hook now verifies BOTH that the check is gone and that ./bootstrap is still invoked, so this particular mistake cannot come back silently. --- FR --- La version precedente de ce crochet sautait ./bootstrap entierement, en supposant que la source etait une archive de version, donc deja amorcee. Elle ne l est pas -- c est un depot git, et sauter bootstrap supprimait configure lui-meme : PKGBUILD: line 43: ./configure: No such file or directory Cela empirait l etat au lieu de le corriger, et c est mon hypothese qui etait fausse, pas le paquet. Ce qu il faut retirer, c est la verification, pas l amorcage. grep est le seul paquet ici a EXAMINER la version des macros m4 de son hote et a refuser la serie d Ubuntu -- sur n importe quel hote Ubuntu, x86 compris. La verification vit dans la source extraite : elle est donc retiree depuis prepare(). Le crochet controle desormais A LA FOIS que la verification a disparu et que ./bootstrap est toujours appele, pour que cette erreur precise ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-16 23:30:49 -04:00
#
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
# The check is two lines: a grep for the serial, and a die. Replaced by a
# no-op that keeps the surrounding function valid.
[FIX] grep: skip its host-vetting bootstrap; util-linux: lib64 again grep is the only package here that INSPECTS the version of the m4 macros its build host provides, and refuses to proceed: ./bootstrap: do not use pkg.m4 serial 12 That is not an s390x incompatibility -- the same refusal happens on any Ubuntu host, x86 included. The release tarball is already bootstrapped, so re-running ./bootstrap regenerates what is already there and skipping it costs nothing. util-linux hits the lib64-versus-lib divergence already handled in gcc.sh. Here it surfaces as rm: cannot remove '.../usr/lib/lib*.la': No such file or directory a glob that matched nothing, which rm reports as a missing file rather than an empty expansion -- so the error names a path that was never going to exist. Same remedy: merge the trees before package() touches anything, leaving the upstream paths working unchanged. That divergence has now appeared twice. If a third package hits it, it belongs in the shared bootstrap rather than in per-package hooks. --- FR --- grep est le seul paquet ici a EXAMINER la version des macros m4 que lui fournit son hote, et a refuser de poursuivre : ./bootstrap: do not use pkg.m4 serial 12 Ce n est pas une incompatibilite s390x -- le meme refus survient sur n importe quel hote Ubuntu, x86 compris. L archive de version est deja amorcee, donc relancer ./bootstrap regenere ce qui existe deja et le sauter ne coute rien. util-linux rencontre la divergence lib64 contre lib deja traitee dans gcc.sh. Elle apparait ici sous la forme rm: cannot remove '.../usr/lib/lib*.la': No such file or directory un motif qui ne correspond a rien, que rm signale comme un fichier manquant plutot que comme une expansion vide -- l erreur nomme donc un chemin qui n allait jamais exister. Meme remede : fusionner les arbres avant que package() ne touche a quoi que ce soit. Cette divergence est apparue deux fois. Si un troisieme paquet la rencontre, sa place est dans l amorcage partage et non dans des crochets par paquet. Assisted-by: Claude Opus 5
2026-08-16 23:26:54 -04:00
set -euo pipefail
[FIX] grep: neutralise the m4 check, do not skip bootstrap The previous version of this hook skipped ./bootstrap entirely, on the assumption that the source was a released tarball and therefore already bootstrapped. It is not -- it is a git checkout, so skipping bootstrap removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory That made things worse than the failure it was meant to fix, and it was my assumption that was wrong, not the package. What has to go is the check, not the bootstrap. grep is the only package here that INSPECTS the version of the m4 macros its host provides and refuses to proceed on Ubuntu's serial -- on any Ubuntu host, x86 included. The check lives in the extracted source, so it is removed from prepare(). The hook now verifies BOTH that the check is gone and that ./bootstrap is still invoked, so this particular mistake cannot come back silently. --- FR --- La version precedente de ce crochet sautait ./bootstrap entierement, en supposant que la source etait une archive de version, donc deja amorcee. Elle ne l est pas -- c est un depot git, et sauter bootstrap supprimait configure lui-meme : PKGBUILD: line 43: ./configure: No such file or directory Cela empirait l etat au lieu de le corriger, et c est mon hypothese qui etait fausse, pas le paquet. Ce qu il faut retirer, c est la verification, pas l amorcage. grep est le seul paquet ici a EXAMINER la version des macros m4 de son hote et a refuser la serie d Ubuntu -- sur n importe quel hote Ubuntu, x86 compris. La verification vit dans la source extraite : elle est donc retiree depuis prepare(). Le crochet controle desormais A LA FOIS que la verification a disparu et que ./bootstrap est toujours appele, pour que cette erreur precise ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-16 23:30:49 -04:00
python3 - <<'PY'
import io, re
s = io.open("PKGBUILD", encoding="utf-8").read()
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
fix = """ # Port: bootstrap.conf refuses the host pkg.m4 serial; see
# patches/pkgbuild/grep.sh. The check spans two lines, ending in "|| :".
sed -i "/serial 12. m4.pkg.m4/,+1c\\\\ :" bootstrap.conf
[FIX] grep: neutralise the m4 check, do not skip bootstrap The previous version of this hook skipped ./bootstrap entirely, on the assumption that the source was a released tarball and therefore already bootstrapped. It is not -- it is a git checkout, so skipping bootstrap removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory That made things worse than the failure it was meant to fix, and it was my assumption that was wrong, not the package. What has to go is the check, not the bootstrap. grep is the only package here that INSPECTS the version of the m4 macros its host provides and refuses to proceed on Ubuntu's serial -- on any Ubuntu host, x86 included. The check lives in the extracted source, so it is removed from prepare(). The hook now verifies BOTH that the check is gone and that ./bootstrap is still invoked, so this particular mistake cannot come back silently. --- FR --- La version precedente de ce crochet sautait ./bootstrap entierement, en supposant que la source etait une archive de version, donc deja amorcee. Elle ne l est pas -- c est un depot git, et sauter bootstrap supprimait configure lui-meme : PKGBUILD: line 43: ./configure: No such file or directory Cela empirait l etat au lieu de le corriger, et c est mon hypothese qui etait fausse, pas le paquet. Ce qu il faut retirer, c est la verification, pas l amorcage. grep est le seul paquet ici a EXAMINER la version des macros m4 de son hote et a refuser la serie d Ubuntu -- sur n importe quel hote Ubuntu, x86 compris. La verification vit dans la source extraite : elle est donc retiree depuis prepare(). Le crochet controle desormais A LA FOIS que la verification a disparu et que ./bootstrap est toujours appele, pour que cette erreur precise ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-16 23:30:49 -04:00
"""
m = re.search(r"\nprepare\(\) \{\n(\s*cd [^\n]*\n)", s)
assert m, "prepare() with a cd not found"
s = s[:m.end()] + fix + s[m.end():]
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
PY
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
grep -q 'bootstrap.conf refuses the host pkg.m4' PKGBUILD || {
echo "grep: patch step not inserted" >&2; exit 1; }
[FIX] grep: neutralise the m4 check, do not skip bootstrap The previous version of this hook skipped ./bootstrap entirely, on the assumption that the source was a released tarball and therefore already bootstrapped. It is not -- it is a git checkout, so skipping bootstrap removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory That made things worse than the failure it was meant to fix, and it was my assumption that was wrong, not the package. What has to go is the check, not the bootstrap. grep is the only package here that INSPECTS the version of the m4 macros its host provides and refuses to proceed on Ubuntu's serial -- on any Ubuntu host, x86 included. The check lives in the extracted source, so it is removed from prepare(). The hook now verifies BOTH that the check is gone and that ./bootstrap is still invoked, so this particular mistake cannot come back silently. --- FR --- La version precedente de ce crochet sautait ./bootstrap entierement, en supposant que la source etait une archive de version, donc deja amorcee. Elle ne l est pas -- c est un depot git, et sauter bootstrap supprimait configure lui-meme : PKGBUILD: line 43: ./configure: No such file or directory Cela empirait l etat au lieu de le corriger, et c est mon hypothese qui etait fausse, pas le paquet. Ce qu il faut retirer, c est la verification, pas l amorcage. grep est le seul paquet ici a EXAMINER la version des macros m4 de son hote et a refuser la serie d Ubuntu -- sur n importe quel hote Ubuntu, x86 compris. La verification vit dans la source extraite : elle est donc retiree depuis prepare(). Le crochet controle desormais A LA FOIS que la verification a disparu et que ./bootstrap est toujours appele, pour que cette erreur precise ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-16 23:30:49 -04:00
grep -qE '^\s*\./bootstrap' PKGBUILD || {
[FIX] grep: the m4 check lives in bootstrap.conf, not bootstrap Third attempt on this package, and the first one written after reading the file instead of assuming its shape. The two before it failed for the same reason: 1. Skipping ./bootstrap. The source is a git checkout, not a released tarball, so that removed configure itself: PKGBUILD: line 43: ./configure: No such file or directory 2. Editing `bootstrap`. The check is not there. It lives in bootstrap.conf, inside a shell function, and its message is built from a $url variable -- which is why grepping the literal text found nothing, twice. The check is two lines: a grep for the serial and a die. Both are replaced by a no-op that keeps the enclosing function valid, verified against the real file before being committed. grep is the only package here that INSPECTS its host's m4 macros. This is not an s390x incompatibility: pkg-config 0.29.2 ships that serial on every distribution, x86 included. The hook checks BOTH that the patch step was inserted and that ./bootstrap is still invoked, so mistake 1 cannot come back silently. --- FR --- Troisieme tentative sur ce paquet, et la premiere ecrite apres avoir lu le fichier au lieu d en supposer la forme. Les deux precedentes ont echoue pour la meme raison : 1. Sauter ./bootstrap. La source est un depot git, pas une archive de version : cela supprimait configure lui-meme. 2. Modifier « bootstrap ». La verification n y est pas. Elle vit dans bootstrap.conf, dans une fonction shell, et son message est construit a partir d une variable $url -- d ou l echec, deux fois, de la recherche du texte litteral. La verification tient en deux lignes : un grep sur la serie et un die. Les deux sont remplacees par une instruction vide qui laisse la fonction valide, essai fait sur le vrai fichier avant de commiter. grep est le seul paquet ici a EXAMINER les macros m4 de son hote. Ce n est pas une incompatibilite s390x : pkg-config 0.29.2 livre cette serie sur toutes les distributions, x86 compris. Le crochet verifie A LA FOIS que l etape de correction est inseree et que ./bootstrap est toujours appele, pour que l erreur 1 ne puisse pas revenir en silence. Assisted-by: Claude Opus 5
2026-08-17 00:00:48 -04:00
echo "grep: bootstrap no longer invoked -- configure would be missing" >&2; exit 1; }
echo "grep: bootstrap kept, its bootstrap.conf serial check neutralised"