Skip to content

Build and test against CUPS 2.4, 2.5 and 3.x across 4 architectures#76

Merged
tillkamppeter merged 6 commits into
OpenPrinting:masterfrom
rkt0209:cups-2.5-and-3.x-support
Jun 19, 2026
Merged

Build and test against CUPS 2.4, 2.5 and 3.x across 4 architectures#76
tillkamppeter merged 6 commits into
OpenPrinting:masterfrom
rkt0209:cups-2.5-and-3.x-support

Conversation

@rkt0209

@rkt0209 rkt0209 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

This brings libppd up to the multi-CUPS testing standard: it now builds and passes its test suite against CUPS 2.4 (distro libcups2), CUPS 2.5 (OpenPrinting/cups master) and 3.x (OpenPrinting/libcups master), on amd64, arm64, armhf and riscv64 — a 12-combination CI matrix.

Since libppd needs libcupsfilters too, the source-CUPS legs build libcupsfilters (and pdfio) from master against the active CUPS.

CI / build system

  • .github/workflows/build.yml: 4 arch × 3 CUPS matrix (amd64/arm64 native, armhf/riscv64 under QEMU); runs make check + the downstream DESTDIR autopkgtest for every combination.
  • ci/ci-setup.sh: per-combination setup — provisions each CUPS, pdfio and libcupsfilters from source where needed, then configures and tests libppd.
  • configure.ac: detect CUPS 2.5 via pkg-config cups (2.5 dropped cups-config), keeping the existing cups3 and cups-config paths.
  • libppd.pc.in: export @CUPS_CFLAGS@ so downstream consumers find CUPS headers when CUPS is installed from source.

Source-portability fixes

  • C++ utilities (ppdc, ppdhtml, ppdi, ppdmerge, ppdpo, genstrings) used *_CFLAGS, which Automake ignores for C++ sources, dropping the CUPS include path on source-installed CUPS — switched to *_CXXFLAGS.
  • libcups3 now defines its own cups_bool_t enum, colliding with libppd's helper alias — renamed the alias to ppd_bool_t.
  • cupsParseOptions() is 4-arg on libcups3; added the translation in libcups2-private.h (2.5 → cupsParseOptions2, 2.4 → 3-arg form).

Test-data / environment fixes

  • ppdFilterUniversal now defaults the text→PDF charset dir from CUPS_DATADIR (libcupsfilters master no longer falls back to it), and the test harness seeds the charset files into the staged data dir.
  • All CUPS directory macros (CUPS_DATADIR, fontpath) now check the matching env var before the compiled-in path, for sandboxed/relocated installs.
  • testppd's run-time LANG-switching localization cases are guarded for libcups2 only: libcups3's cupsLangDefault() caches the language, so mid-process locale switching no longer applies (test_ppd_localize still covers localization on libcups3).

Notes for upstream review

  • libcupsfilters master texttopdf dropped its CUPS_DATADIR fallback — affects any caller that doesn't set the data dir.
  • libcups3 cupsLangDefault() caches the language; run-time locale switching is no longer honored.

@tillkamppeter tillkamppeter merged commit 267a550 into OpenPrinting:master Jun 19, 2026
14 checks passed
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