[CI] Detect flag collisions caused by Pikaur's configuration logic #55

Closed
opened 2025-11-10 12:04:42 +00:00 by jabber.developer · 1 comment

Problem

We are seeing reports of build failures on Arch Linux for users running pikaur. These failures occur during the compilation stage, often appearing as "variable redefined" errors or conflicting compiler options.

Root Cause

The issue stems from how pikaur handles makepkg configurations. Specifically, its makepkg_config.py logic causes flags from the system-wide /etc/makepkg.conf to be merged into the build environment.

When these system flags collide with flags explicitly defined in our project's Makefile.am (for example, different versions of -D_FORTIFY_SOURCE), the compiler encounters duplicate or conflicting definitions and aborts the build.

Impact

Our current CI environment is "too clean." Because the CI uses a standard Arch Linux container without the cascading configuration logic used by pikaur, our automated tests are failing to catch these collisions.

This creates a "silent killer" scenario: a developer can push a change that works perfectly in CI but breaks the build for all Arch users using pikaur.

Goal

We need to improve our Arch Linux CI pipeline to achieve parity with the pikaur environment. The CI should be able to detect when a code change introduces a flag collision by simulating the injection of system-level flags into the build environment.

Acceptance Criteria

  • The Arch Linux CI runner simulates the presence of flags from /etc/makepkg.conf.
  • The simulation is scoped strictly to the Arch Linux environment (does not affect Debian/Ubuntu runs).
  • The simulation correctly handles multi-line configuration files.
  • A change that introduces a flag collision in Makefile.am successfully triggers a failure in the Arch CI matrix.
## Problem We are seeing reports of build failures on Arch Linux for users running `pikaur`. These failures occur during the compilation stage, often appearing as "variable redefined" errors or conflicting compiler options. ## Root Cause The issue stems from how `pikaur` handles `makepkg` configurations. Specifically, its `makepkg_config.py` logic causes flags from the system-wide `/etc/makepkg.conf` to be merged into the build environment. When these system flags collide with flags explicitly defined in our project's `Makefile.am` (for example, different versions of `-D_FORTIFY_SOURCE`), the compiler encounters duplicate or conflicting definitions and aborts the build. ## Impact Our current CI environment is "too clean." Because the CI uses a standard Arch Linux container without the cascading configuration logic used by `pikaur`, our automated tests are failing to catch these collisions. This creates a "silent killer" scenario: a developer can push a change that works perfectly in CI but breaks the build for all Arch users using `pikaur`. ## Goal We need to improve our Arch Linux CI pipeline to achieve parity with the `pikaur` environment. The CI should be able to detect when a code change introduces a flag collision by simulating the injection of system-level flags into the build environment. ### Acceptance Criteria - [x] The Arch Linux CI runner simulates the presence of flags from `/etc/makepkg.conf`. - [x] The simulation is scoped strictly to the Arch Linux environment (does not affect Debian/Ubuntu runs). - [x] The simulation correctly handles multi-line configuration files. - [x] A change that introduces a flag collision in `Makefile.am` successfully triggers a failure in the Arch CI matrix.
jabber.developer added this to the Plans (2025-2026) project 2025-11-10 12:25:47 +00:00
jabber.developer added the
Kind/Testing
Priority
Medium
3
Reviewed
Confirmed
1
labels 2026-01-21 16:51:26 +00:00
jabber.developer changed title from Add autotests with pikaur-like build flags to [CI] Detect flag collisions caused by Pikaur's configuration logic 2026-04-18 16:11:45 +00:00
jabber.developer moved this to Verification in Plans (2025-2026) on 2026-04-18 16:49:37 +00:00
Author
Owner

Resolved by #108

Resolved by #108
jabber.developer moved this to Done in Plans (2025-2026) on 2026-04-25 18:13:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: devs/cproof#55
No description provided.