archlinux-s390x/patches/pkgbuild/shadow.sh

34 lines
1.7 KiB
Bash
Raw Normal View History

[FIX] libaio, and two packages that installed man pages nobody wrote libaio is a real closure gap: lvm2 stops on "libaio.h: No such file or directory". This port had already met that library from the other side, noting Ubuntu's time64 rename to libaio.so.1t64 long before anything needed its headers. fakeroot is the interesting one. The first hook removed the po4a call and nothing else, so build() ended on a bare `cd doc` and package() failed on install: cannot stat './faked.1': No such file or directory The English man pages ARE shipped. What is not shipped are the translations: doc/Makefile carries SUBDIRS = de es fr nl pt ro sv, each holding only Makefiles whose man_MANS name files po4a was supposed to generate. Removing the generator and leaving the recursion is the same mistake as removing a build target and leaving its install target. shadow needs distinguishing: xsltproc exists here now, from our libxslt. What is missing is the DocBook XML data its stylesheets read -- the same as pam. --- FR --- libaio est un vrai trou de fermeture : lvm2 s'arrête sur « libaio.h: No such file or directory ». Ce portage avait déjà croisé cette bibliothèque par l'autre bout, en notant le renommage time64 d'Ubuntu en libaio.so.1t64 bien avant que ses en-têtes servent. fakeroot est le cas intéressant. Le premier hook retirait l'appel à po4a et rien d'autre : build() finissait sur un `cd doc` nu et package() échouait sur install: cannot stat './faked.1': No such file or directory Les pages anglaises SONT livrées. Ce qui ne l'est pas, ce sont les traductions : doc/Makefile porte SUBDIRS = de es fr nl pt ro sv, chacun ne contenant que des Makefiles dont man_MANS nomme des fichiers que po4a devait générer. Retirer le générateur en laissant la récursion est la même erreur que retirer une cible de construction en laissant celle d'installation. shadow mérite une distinction : xsltproc existe désormais, via notre libxslt. Ce qui manque, ce sont les données DocBook que lisent ses feuilles de style — comme pour pam. Assisted-by: Claude Opus 5
2026-08-22 22:00:00 -04:00
#!/usr/bin/env bash
set -euo pipefail
# --- no man pages -------------------------------------------------------------
#
# install: cannot stat './man5/gshadow.5': No such file or directory
# install: cannot stat './man8/groupdel.8': No such file or directory
#
# shadow renders its man pages from DocBook with xsltproc. xsltproc EXISTS here
# now -- our libxslt supplies it -- and that is what makes this one worth
# distinguishing: what is missing is the DocBook XML data the stylesheets need,
# not the tool. Exactly pam's situation.
#
# TWO PLACES: --enable-man in the configure options and an explicit
# `make -C man install` in package(). The second is the one that reported the
# failure, and removing only it would leave configure still trying to build them.
set -euo pipefail
python3 - <<'ZZPY'
import io, re
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
en = [i for i, l in enumerate(lines) if re.match(r"^[ \t]*--enable-man[ \t]*$", l)]
assert len(en) == 1, "shadow: expected one --enable-man, got %d" % len(en)
lines[en[0]] = lines[en[0]].replace("--enable-man", "--disable-man")
inst = [i for i, l in enumerate(lines) if re.search(r"make .*-C man install", l)]
assert len(inst) == 1, "shadow: expected one `make -C man install`, got %d" % len(inst)
ind = re.match(r"^[ \t]*", lines[inst[0]]).group(0)
lines[inst[0]] = ind + ": # man pages need DocBook XML data, which this port lacks."
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
ZZPY
grep -q -- "--disable-man" PKGBUILD || { echo "shadow: man not disabled" >&2; exit 1; }
grep -qE "make .*-C man install" PKGBUILD && {
echo "shadow: the man install survived" >&2; exit 1; }
echo "shadow: man pages disabled (DocBook data absent, not xsltproc)"