From 061ca630e0e095930fdde497f7310ae17958654e Mon Sep 17 00:00:00 2001 From: Christopher Colantuono Date: Thu, 26 Nov 2026 15:15:03 -0800 Subject: [PATCH 1/3] fix(runner): util-linux on the release runner's PATH for the live lock (flock, setsid) Release run 45903534528 passed build and packaging, then the first packaged row failed: flock missing. With util-linux added, all seven packaged rows pass locally under the runner's exact PATH and no display. Co-Authored-By: Claude Opus 5.5 --- systemd/legion-pb.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemd/legion-pb.nix b/systemd/legion-pb.nix index ee558f44..16ce9e02 100644 --- a/systemd/legion-pb.nix +++ b/systemd/legion-pb.nix @@ -106,7 +106,10 @@ in # it deletes everything inside it on every start; the tmpfiles rule in section 3 creates it. workDir = "/var/lib/pb-runner"; extraLabels = [ "powerbrowser-release" ]; - extraPackages = with pkgs; [ git gh nix podman uidmapWrappers ]; + # util-linux: verify-platform.sh takes the live lock with setsid and flock (first release run past + # packaging, 2026-11-26: "flock on the live lock ... ended without taking it"). With it, all seven + # packaged rows pass under this unit's PATH with no display. + extraPackages = with pkgs; [ git gh nix podman util-linux uidmapWrappers ]; extraEnvironment = { ACTIONS_RUNNER_HOOK_JOB_STARTED = "/etc/pb-runner/legion-pre-job-hook.sh"; # The module sets HOME to workDir, which it wipes on every start. Rootless podman keeps its image From 71742e6aeedb979fa3e9681663c9694dbc100d3b Mon Sep 17 00:00:00 2001 From: Christopher Colantuono Date: Thu, 26 Nov 2026 17:44:03 -0800 Subject: [PATCH 2/3] fix(runner): nix-ld carries the release tarball's libraries so the packaged rows run on legion Release run 45918887733: ng063-packaged-launch failed with 'libgtk-3.so.0: cannot open shared object file' (NixOS has no /usr/lib; the earlier local pass ran inside Orca's FHS sandbox). programs.nix-ld.libraries keeps its default and adds nix/pkg/powerbrowser-bin.nix's library list. Outside any sandbox, with these libraries, all seven packaged rows pass; without them the control fails the same way CI did. Co-Authored-By: Claude Opus 5.5 --- systemd/legion-pb.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/systemd/legion-pb.nix b/systemd/legion-pb.nix index 16ce9e02..f466b6b1 100644 --- a/systemd/legion-pb.nix +++ b/systemd/legion-pb.nix @@ -47,7 +47,7 @@ # path to the registration token (still InaccessiblePaths) or to /home (still ProtectHome). This is # the price of running rootless podman under this unit, and it is why third-party build code (the # agent server's npm closure in particular) should run inside the container or off this host. -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, options, ... }: let # Rootless podman runs newuidmap and newgidmap from PATH. The kernel lets a multi-range id map be # written only by the namespace owner holding CAP_SETUID (or CAP_SETGID) in the parent namespace, @@ -187,6 +187,16 @@ in enable = true; registries.search = [ "docker.io" ]; }; + # The packaged rows run the portable release tarball on this host, and NixOS has no /usr/lib, so + # the tarball's GTK, X11, audio and media libraries come through nix-ld. Same list as + # nix/pkg/powerbrowser-bin.nix (buildInputs and dlopen libraries). First release run past the lock + # (2026-11-26): "libmozgtk.so: libgtk-3.so.0: cannot open shared object file". With these libraries, + # all seven packaged rows pass outside any FHS sandbox. The module default (base libraries) is kept: + # setting the option replaces it otherwise. + programs.nix-ld.libraries = options.programs.nix-ld.libraries.default ++ (with pkgs; [ + gtk3 libx11 libxext libdbusmenu-gtk3 alsa-lib libpulseaudio libxscrnsaver libva libgbm cups udev + libnotify ffmpeg_8 pciutils vulkan-loader libglvnd speechd-minimal pipewire libkrb5 + ]); users.users.pb-runner = { isSystemUser = true; group = "pb-runner"; From a4a32a109bf7e68a5396731738e73144e96d7ef2 Mon Sep 17 00:00:00 2001 From: Christopher Colantuono Date: Thu, 26 Nov 2026 19:49:31 -0800 Subject: [PATCH 3/3] fix(release): build-signmar links NSS after the sources First sign-publish (run 45927779748) failed linking signmar on ubuntu-latest: 52 undefined references (VFY_*, SECKEY_*). The script put pkg-config's -l flags before the sources, and Ubuntu's linker defaults to --as-needed. Reproduced locally with -Wl,--as-needed: the old order fails the same way, the new order builds. Co-Authored-By: Claude Opus 5.5 --- scripts/build-signmar.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/build-signmar.sh b/scripts/build-signmar.sh index e1a9e8eb..04027a10 100755 --- a/scripts/build-signmar.sh +++ b/scripts/build-signmar.sh @@ -44,13 +44,16 @@ done < "$PIN" L="$SRC/modules/libmar" C="$SRC/other-licenses/nsis/Contrib/CityHash/cityhash" -NSS_FLAGS=$(pkg-config --cflags --libs nss nspr) +# Libraries go after the sources: Ubuntu's linker defaults to --as-needed, which drops a library named +# before the objects that use it ("undefined reference to VFY_Update", first sign-publish, 2026-11-26). +NSS_CFLAGS=$(pkg-config --cflags nss nspr) +NSS_LIBS=$(pkg-config --libs nss nspr) c++ -O2 -c -I"$C" "$C/city.cpp" -o "$SRC/city.o" # MAR_CHANNEL_ID and MOZ_APP_VERSION feed only the `signmar` banner; -T, -s and -v do not read them. # shellcheck disable=SC2086 -- pkg-config emits separate flags cc -O2 -DMAR_NSS -DMAR_CHANNEL_ID='"release-tool"' -DMOZ_APP_VERSION='"pinned-source"' \ - -I"$L/src" -I"$L/sign" -I"$L/verify" -I"$C" $NSS_FLAGS \ + -I"$L/src" -I"$L/sign" -I"$L/verify" -I"$C" $NSS_CFLAGS \ "$L/tool/mar.c" "$L/src/mar_create.c" "$L/src/mar_extract.c" "$L/src/mar_read.c" \ "$L/sign/mar_sign.c" "$L/sign/nss_secutil.c" "$L/verify/cryptox.c" "$L/verify/mar_verify.c" \ - "$SRC/city.o" -lstdc++ -o "$OUT/signmar" + "$SRC/city.o" $NSS_LIBS -lstdc++ -o "$OUT/signmar" sha256sum "$OUT/signmar"