From 919999bea4c870cc7c8524705b8c2e832f796c6d Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Fri, 10 Jan 2025 17:39:55 +0000 Subject: [PATCH] Set up a CI job to build and test the Debian packaging Refs [ticket: 4150](https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4150) --- .circleci/config.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 69990798a..c17908423 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -117,6 +117,10 @@ workflows: - "another-locale": {} + # Test our sources with the packaging for Debian Testing + # https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4150 + - "debian-trixie-package" + - "windows-server-2022": name: "Windows Server 2022, CPython <>" matrix: @@ -542,6 +546,60 @@ jobs: <<: *UTF_8_ENVIRONMENT TAHOE_LAFS_TOX_ENVIRONMENT: "py310" + debian-trixie-package: + docker: + - <<: *DOCKERHUB_AUTH + image: "debian:trixie" + steps: + - run: + name: "Get latest Debian repository index and install essentials" + command: | + apt update + apt-get install --no-install-recommends --yes \ + git \ + ca-certificates \ + quilt + - run: + name: "Download sources for Tahoe-LAFS and @merkys Debian packaging" + command: | + mkdir /tmp/debian-trixie-package + cd /tmp/debian-trixie-package + # Take Tahoe-LAFS source + git clone https://github.com/tahoe-lafs/tahoe-lafs.git + # Take debian/ directory from Debian packaging repository + git clone https://salsa.debian.org/merkys/tahoe-lafs.git merkys-tahoe-lafs + cd tahoe-lafs/ + ln -s ../merkys-tahoe-lafs/debian + ln -s ../merkys-tahoe-lafs/debian/patches + - run: + name: "Install Tahoe-LAFS dependencies from the Debian repositories" + command: | + # 'apt-get install' dependencies from debian/control + apt-get install --no-install-recommends --yes $(awk ' + /^(Build-)?Depends:/ || /^ / && deps { + sub(/^[^ ]+: /, "") + deps = 1 + dep_str = dep_str ", " $0 + next + } + { deps=0 } + END { + split(dep_str, dep_array, /[,|] */) + for (d in dep_array) { + dep = dep_array[d] + gsub(/[^a-z0-9_.+-].*$/, "", dep) + if (dep && !seen[dep]++) print dep + } + }' debian/control) + - run: + name: "Apply the Debian package's patches" + command: | + quilt push -a + - run: + name: "Build & run tests" + command: | + make -f debian/rules binary + nixos: parameters: nixpkgs: