Skip to content

Add Debian, RPM, and AUR packaging recipes, fix const-correctness, avoid conflicts - #78

Merged
jserv merged 4 commits into
sysprog21:mainfrom
erkinalp:devin/1785865912-packaging-recipes
Aug 5, 2026
Merged

Add Debian, RPM, and AUR packaging recipes, fix const-correctness, avoid conflicts#78
jserv merged 4 commits into
sysprog21:mainfrom
erkinalp:devin/1785865912-packaging-recipes

Conversation

@erkinalp

@erkinalp erkinalp commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Each recipe installs the compat libraries and headers into the private prefix /usr/lib/libx11-compat via make install, avoiding file conflicts with the real X11 dev packages.

Also fix the pre-2.20 SDL2_ttf wrapper thunks for TTF_GlyphIsProvided and TTF_GlyphIsProvided32: SDL2_ttf < 2.20 declares them with a non-const TTF_Font *, so the const-qualified thunks failed to compile against those headers (e.g. Ubuntu 22.04's SDL2_ttf 2.0.18).


Summary by cubic

Adds Debian, RPM, and AUR packaging that installs into a private prefix to avoid X11 dev conflicts, and supports fully offline, reproducible builds via pinned Xorg tarballs. Also fixes SDL2_ttf wrapper const-correctness for older headers.

  • New Features

    • Added Debian (debian/), RPM (packaging/rpm/libx11-compat.spec), and AUR (packaging/aur/PKGBUILD) recipes installing via make install into /usr/lib/libx11-compat (or %{_libdir}/libx11-compat); Debian uses dh_auto_install and honors DEB_BUILD_OPTIONS=parallel; RPM pins Source0 to a fixed commit; maintainer email set.
    • Fully offline builds: scripts/sync-upstream-headers.py accepts LIBX11_COMPAT_TARBALL_DIR to seed sha256‑pinned Xorg tarballs; RPM/PKGBUILD declare them as sources and point the var at %{_sourcedir}/$srcdir; Debian docs now note injecting both the tarballs and the env var into sbuild’s clean chroot.
  • Bug Fixes

    • Updated wrappers for TTF_GlyphIsProvided and TTF_GlyphIsProvided32 to use TTF_Font * with older SDL2_ttf headers, restoring builds on distros like Ubuntu 22.04.

Written for commit d3f4ac8. Summary will update on new commits.

Review in cubic

Each recipe installs the compat libraries and headers into the private
prefix /usr/lib/libx11-compat via make install, avoiding file conflicts
with the real X11 dev packages.

Also fix the pre-2.20 SDL2_ttf wrapper thunks for TTF_GlyphIsProvided
and TTF_GlyphIsProvided32: SDL2_ttf < 2.20 declares them with a
non-const TTF_Font *, so the const-qualified thunks failed to compile
against those headers (e.g. Ubuntu 22.04's SDL2_ttf 2.0.18).

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
@erkinalp erkinalp changed the title Add Debian, RPM, and AUR packaging recipes Add Debian, RPM, and AUR packaging recipes, fix const-correctness, avoid conflicts Aug 4, 2026
cubic-dev-ai[bot]

This comment was marked as resolved.

- Use a real maintainer email in debian/control, debian/changelog, the
  RPM changelog, and the PKGBUILD maintainer line.
- debian/rules: drop the dh_auto_build override and delegate install to
  dh_auto_install so DEB_BUILD_OPTIONS=parallel is honored.
- Drop the Debian revision from the version (0.1.0) to match the
  3.0 (native) source format.
- RPM: pin Source0 to a fixed commit with a snapshot Release, move the
  compat_prefix/commit %globals to the top of the spec, and keep the
  upstream-headers note out of %description text.
- PKGBUILD: stage the network-fetched upstream Xorg headers in
  prepare() via make upstream-sync instead of mid-build().
- Ignore debhelper build output under debian/.

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1785865912-packaging-recipes branch from 9512e10 to 857c451 Compare August 5, 2026 03:28
cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread packaging/README.md Outdated
Per review, the previous "pre-populate the cache" advice did not hold:
dpkg-buildpackage's clean wipes the in-tree cache, mock/koji chroots
are fresh with no network, and a prepare()-time fetch bypasses makepkg
checksums.

Teach scripts/sync-upstream-headers.py to seed the pinned upstream
tarballs from LIBX11_COMPAT_TARBALL_DIR (sha256-verified against the
pins) before falling back to the network. Declare the tarballs as real
sources: Source1..Source6 in the RPM spec with the variable pointed at
%_sourcedir, and source=() entries (checksummed by makepkg, noextract)
in the PKGBUILD with the variable pointed at $srcdir. Document the
Debian flow (seed directory outside the source tree) in debian/rules
and packaging/README.md, and drop the now-unneeded PKGBUILD prepare().

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
cubic-dev-ai[bot]

This comment was marked as resolved.

An env var exported in the caller's shell does not reach the inner
make under sbuild's clean chroot; note that the tarballs and
LIBX11_COMPAT_TARBALL_DIR must be injected into the chroot explicitly.

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
@jserv
jserv merged commit 4dfa927 into sysprog21:main Aug 5, 2026
68 of 69 checks passed
@jserv

jserv commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Thank @erkinalp for contributing!

@erkinalp
erkinalp deleted the devin/1785865912-packaging-recipes branch August 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants