From 5c983daffe3ca32e70a08b7a37823d50039e9859 Mon Sep 17 00:00:00 2001 From: ManasBagul23 Date: Mon, 30 Nov 2026 01:03:40 +0530 Subject: [PATCH 1/2] Read PDFio minimum from libcupsfilters --- ci/ci-setup.sh | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/ci/ci-setup.sh b/ci/ci-setup.sh index c09ab5d6..ce88870d 100755 --- a/ci/ci-setup.sh +++ b/ci/ci-setup.sh @@ -56,7 +56,6 @@ _classify_failure() { } trap _classify_failure EXIT -PDFIO_VER=1.6.4 LIBCUPSFILTERS_URL="${LIBCUPSFILTERS_URL:-https://github.com/OpenPrinting/libcupsfilters.git}" LIBCUPSFILTERS_REF="${LIBCUPSFILTERS_REF:-master}" @@ -112,6 +111,38 @@ build_autoconf() { $SUDO ldconfig || true } +prepare_libcupsfilters_source() { + cache_root="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/libppd-libcupsfilters" + src="$cache_root/source" + if [ ! -d "$src/.git" ]; then + mkdir -p "$src" + git -C "$src" init -q + git -C "$src" remote add origin "$LIBCUPSFILTERS_URL" + git -C "$src" fetch -q --depth 1 origin "$LIBCUPSFILTERS_REF" + git -C "$src" checkout -q --detach FETCH_HEAD + printf '%s\n' "$LIBCUPSFILTERS_REF" > "$cache_root/requested-ref" + fi + + [ "$(git -C "$src" remote get-url origin)" = "$LIBCUPSFILTERS_URL" ] || { + echo "ci-setup: cached libcupsfilters URL does not match" >&2; exit 2; + } + [ "$(cat "$cache_root/requested-ref")" = "$LIBCUPSFILTERS_REF" ] || { + echo "ci-setup: cached libcupsfilters ref does not match" >&2; exit 2; + } + printf '%s\n' "$src" +} + +build_libcupsfilters() { + src="$(prepare_libcupsfilters_source)" + echo "ci-setup: building $LIBCUPSFILTERS_URL @ $(git -C "$src" rev-parse HEAD)" + ( cd "$src" + [ -x ./configure ] || ./autogen.sh + ./configure --prefix=/usr + make -j"$(nproc)" + $SUDO make install ) + $SUDO ldconfig || true +} + cmd_cups() { kind="$1" case "$kind" in @@ -141,6 +172,11 @@ cmd_cups() { } cmd_pdfio() { + libcupsfilters_src="$(prepare_libcupsfilters_source)" + # shellcheck disable=SC1091 + . "$libcupsfilters_src/ci/dependency-versions.env" + PDFIO_VER="$PDFIO_MIN_VERSION" + [ -n "$PDFIO_VER" ] || { echo "ci-setup: missing PDFIO_MIN_VERSION" >&2; exit 2; } echo "ci-setup: building pdfio $PDFIO_VER" src="$(mktemp -d)" ( cd "$src" @@ -163,7 +199,7 @@ cmd_libcupsfilters() { # Build libcupsfilters against the CUPS already installed above. # Its configure auto-detects CUPS via pkg-config (cups3 / cups / # cups-config), so the same source matches every CUPS release. - build_autoconf "$LIBCUPSFILTERS_URL" "$LIBCUPSFILTERS_REF" "" + build_libcupsfilters ;; *) echo "ci-setup: unknown libcupsfilters kind: $kind" >&2; exit 2 ;; From 43b419f57cb69866d64deb2fd095361b743ff233 Mon Sep 17 00:00:00 2001 From: ManasBagul23 Date: Wed, 2 Dec 2026 00:27:51 +0530 Subject: [PATCH 2/2] Read dependency-versions from its new root-level path in libcupsfilters Follows libcupsfilters moving the file from ci/dependency-versions.env to dependency-versions at the repo root, per Till's review on #394. --- ci/ci-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/ci-setup.sh b/ci/ci-setup.sh index ce88870d..71c4e80c 100755 --- a/ci/ci-setup.sh +++ b/ci/ci-setup.sh @@ -174,7 +174,7 @@ cmd_cups() { cmd_pdfio() { libcupsfilters_src="$(prepare_libcupsfilters_source)" # shellcheck disable=SC1091 - . "$libcupsfilters_src/ci/dependency-versions.env" + . "$libcupsfilters_src/dependency-versions" PDFIO_VER="$PDFIO_MIN_VERSION" [ -n "$PDFIO_VER" ] || { echo "ci-setup: missing PDFIO_MIN_VERSION" >&2; exit 2; } echo "ci-setup: building pdfio $PDFIO_VER"