No description
A run reported "51 built, 0 failed" while glibc, gcc, coreutils and pacman had all failed. The cause is a bash rule that is easy to forget: callers invoke build_package inside an "if", and "if" DISABLES set -e for the whole function body. A failing makepkg fell through to repo-add, whose success became the function exit status. build_package now returns explicitly on failure and, more importantly, verifies that a package file actually exists. An exit code is not proof; only the artefact is. Measured before the fix: 23 files in the repository where a hundred were claimed. First real port patch, applied through a per-package hook rather than by hand: the glibc PKGBUILD passes --enable-sframe, and s390x has no SFrame at all -- configure refuses outright. Hooks re-clone cleanly, so an upstream change is never silently discarded. --nocheck for stage 1: these test suites run against the HOST libraries, not the Arch ones, so their verdict says nothing about the port. acl failed its check step on a sound build. Stage 2 runs them for real. The remaining failures were host makedepends that --nodeps hides: po4a, gnat, debuginfod and jansson are now installed up front. --- FR --- Une execution annoncait « 51 built, 0 failed » alors que glibc, gcc, coreutils et pacman avaient tous echoue. La cause est une regle de bash qu on oublie : build_package est appelee dans un « if », et « if » DESACTIVE set -e pour tout le corps de la fonction. Un makepkg en echec poursuivait jusqu a repo-add, dont la reussite devenait le code de sortie. build_package rend desormais la main explicitement en cas d echec et, surtout, verifie qu un fichier de paquet existe vraiment. Un code de sortie ne prouve rien ; seul l artefact prouve. Mesure avant correction : 23 fichiers dans le depot la ou cent etaient annonces. Premier vrai correctif de portage, applique par crochet et non a la main : le PKGBUILD de glibc passe --enable-sframe, et s390x n a aucun SFrame -- configure refuse net. Les crochets survivent a un reclonage, donc une evolution amont n est jamais perdue en silence. --nocheck pour l etage 1 : ces suites s executent contre les bibliotheques de l HOTE, pas celles d Arch, et leur verdict ne dit rien du portage. acl echouait a son etape check sur une compilation saine. L etage 2 les executera pour de vrai. Les autres echecs etaient des makedepends d hote que --nodeps masque : po4a, gnat, debuginfod et jansson sont poses d entree. Assisted-by: Claude Opus 5 |
||
|---|---|---|
| .github/workflows | ||
| arch-kernel | ||
| boot | ||
| patches | ||
| scripts | ||
| .env.example | ||
| .gitignore | ||
| CODEOWNERS | ||
| Containerfile | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Arch Linux s390x
A port of Arch Linux to IBM s390x mainframe architecture with systemd support.
Boots a full Arch Linux system on IBM mainframes (or QEMU s390x emulation) using a hybrid build: cross-compilation for the kernel, native s390x compilation on z/VM for userspace.
Quick Start
make container # build dev container (first time)
cp .env.example .env # configure z/VM access
make all # build kernel + initramfs + systemd
make test-systemd # boot it
What Works
- Arch Linux kernel 6.18.6-arch1 with Arch patches, cross-compiled
- Initramfs via modified mkinitcpio
- Static busybox built natively on z/VM, 2.3MB
- Root filesystem with ext4, switch_root to real rootfs
- Systemd as PID 1
Pacman, bash, and GNU coreutils are not yet ported.
Build System
The build uses two tiers:
Cross-compilation (x86_64 host): Kernel is built in a Fedora 43 container with s390x-linux-gnu-gcc. Initramfs is generated with a patched mkinitcpio that handles cross-architecture binary injection.
Native compilation (s390x z/VM): Busybox and systemd must be built on real s390x hardware. The z/VM system runs RHEL 9.6 with GCC 11.5.0. Scripts handle SSH deployment and retrieval automatically via .env configuration.