No description
Find a file
Mathieu Benoit c43289c5ca [FIX] /dev/shm was mounted and unwritable, so python lost its semaphores
sem_open: Permission denied
  checking whether POSIX semaphores are enabled... no

EACCES, not ENOSYS. This port read the failure as a missing mount, mounted the
tmpfs, and got the same result -- because `-o mode=1777` applies only when the
mount is created, and the `mountpoint -q ||` guard skips an existing one. findmnt
showed a tmpfs at /dev/shm while the directory itself was drwxr-xr-x, so the
build user could create nothing in it.

CPython runs sem_open at CONFIGURE time. It concluded the platform has no working
semaphores, set POSIX_SEMAPHORES_NOT_ENABLED, and compiled _multiprocessing
without SemLock -- and every consumer then failed with a message blaming the
platform, days after the cause.

The mode is now set with chmod rather than trusted to the mount option, and the
result is PROVED from inside the chroot as the build user. Every earlier check of
this was made as root and passed while the build kept failing.

--- FR ---

  sem_open: Permission denied
  checking whether POSIX semaphores are enabled... no

EACCES, pas ENOSYS. Ce portage a lu l'échec comme un montage absent, a monté le
tmpfs, et a obtenu le même résultat — car `-o mode=1777` ne s'applique qu'à la
création du montage, et la garde `mountpoint -q ||` saute un montage existant.
findmnt montrait un tmpfs sur /dev/shm alors que le répertoire était drwxr-xr-x :
l'utilisateur de compilation n'y pouvait rien créer.

CPython exécute sem_open au moment de CONFIGURE. Il en a conclu que la plateforme
n'a pas de sémaphores fonctionnels, a posé POSIX_SEMAPHORES_NOT_ENABLED et
compilé _multiprocessing sans SemLock — et chaque consommateur a ensuite échoué
sur un message accusant la plateforme, des jours après la cause.

Le mode est désormais posé par chmod plutôt que confié à l'option de montage, et
le résultat est PROUVÉ depuis l'intérieur du chroot, sous l'utilisateur de
compilation. Toutes les vérifications précédentes avaient été faites en root et
passaient pendant que la construction échouait.

Assisted-by: Claude Opus 5
2026-08-24 00:54:22 -04:00
.github/workflows making the house a home 2026-01-27 23:26:31 +01:00
arch-kernel making the house a home 2026-01-27 23:26:31 +01:00
boot making the house a home 2026-01-27 23:26:31 +01:00
patches [FIX] systemd: sixteen man page operations, across five sub-packages 2026-08-24 00:33:37 -04:00
scripts [FIX] /dev/shm was mounted and unwritable, so python lost its semaphores 2026-08-24 00:54:22 -04:00
.env.example [ADD] upstream.lock, and keep the machine out of the repository 2026-08-22 22:52:04 -04:00
.gitignore making the house a home 2026-01-27 23:26:31 +01:00
CODEOWNERS making the house a home 2026-01-27 23:26:31 +01:00
Containerfile making the house a home 2026-01-27 23:26:31 +01:00
LICENSE use arch kernel patches 2025-06-02 21:53:33 +02:00
Makefile making the house a home 2026-01-27 23:26:31 +01:00
README.md making the house a home 2026-01-27 23:26:31 +01:00
RELAIS.md [ADD] upstream.lock, and keep the machine out of the repository 2026-08-22 22:52:04 -04:00
TODO.md [FIX] help2man was uninstallable, which stopped the whole pass 2026-08-21 00:33:07 -04:00

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.