From 3149e5860a9d62f8da9b501baf4455e530ac6734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 27 Jan 2025 18:06:35 +0100 Subject: [PATCH] tmp --- .github/workflows/auto-updates.yaml | 5 ++++- .github/workflows/build-deb.yaml | 2 +- debian/control | 2 +- debian/rules | 14 ++++++++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-updates.yaml b/.github/workflows/auto-updates.yaml index 519282644..ad5b16e0f 100644 --- a/.github/workflows/auto-updates.yaml +++ b/.github/workflows/auto-updates.yaml @@ -2,7 +2,7 @@ name: Update translations and Rust packaging related files in main on: push: branches: - - main + - "*" paths-ignore: - debian/control concurrency: auto-update @@ -20,6 +20,7 @@ jobs: matrix: branch: [main] ubuntu-version: [devel] + # dependencies: [ ['cargo-filterer'] ] include: - branch: noble ubuntu-version: noble @@ -71,6 +72,8 @@ jobs: run: | set -euo pipefail + set -x + VENDORED_SOURCES=$(/usr/share/cargo/bin/dh-cargo-vendored-sources 2>&1) \ || cmd_status=$? OUTPUT=$(echo "$VENDORED_SOURCES" | grep ^XS-Vendored-Sources-Rust: || true) diff --git a/.github/workflows/build-deb.yaml b/.github/workflows/build-deb.yaml index 8a05bc73c..ba51f6f2c 100644 --- a/.github/workflows/build-deb.yaml +++ b/.github/workflows/build-deb.yaml @@ -3,7 +3,7 @@ name: Build debian packages on: push: branches: - - main + - "*" tags: - "*" pull_request: diff --git a/debian/control b/debian/control index b03e16deb..da6156756 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ Build-Depends: debhelper-compat (= 13), protobuf-compiler, Standards-Version: 4.6.2 XS-Go-Import-Path: github.com/ubuntu/authd -XS-Vendored-Sources-Rust: addr2line@0.21.0, adler@1.0.2, aho-corasick@1.1.3, android-tzdata@0.1.1, android_system_properties@0.1.5, anyhow@1.0.86, async-stream-impl@0.3.5, async-stream@0.3.5, async-trait@0.1.80, atomic-waker@1.1.2, autocfg@1.3.0, axum-core@0.4.3, axum@0.7.5, backtrace@0.3.71, base64@0.22.1, bitflags@2.5.0, bumpalo@3.16.0, bytes@1.7.1, cc@1.2.10, cfg-if@1.0.0, chrono@0.4.38, colored@2.1.0, core-foundation-sys@0.8.6, crc32fast@1.4.2, ctor@0.2.9, deranged@0.3.11, either@1.12.0, equivalent@1.0.1, errno@0.3.10, fastrand@2.1.0, fixedbitset@0.4.2, flate2@1.0.30, fnv@1.0.7, futures-channel@0.3.30, futures-core@0.3.30, futures-sink@0.3.30, futures-task@0.3.30, futures-util@0.3.30, getrandom@0.2.15, gimli@0.28.1, h2@0.4.6, hashbrown@0.12.3, hashbrown@0.14.5, heck@0.5.0, hermit-abi@0.3.9, hex@0.4.3, hostname@0.4.0, http-body-util@0.1.2, http-body@1.0.1, http@1.1.0, httparse@1.8.0, httpdate@1.0.3, hyper-timeout@0.5.1, hyper-util@0.1.10, hyper@1.4.1, iana-time-zone-haiku@0.1.2, iana-time-zone@0.1.60, indexmap@1.9.3, indexmap@2.2.6, itertools@0.12.1, itoa@1.0.11, js-sys@0.3.69, lazy_static@1.4.0, libc@0.2.169, libnss@0.8.0, linux-raw-sys@0.4.14, log@0.4.25, matchit@0.7.3, memchr@2.7.2, mime@0.3.17, miniz_oxide@0.7.3, mio@1.0.1, multimap@0.10.0, num-conv@0.1.0, num-traits@0.2.19, num_threads@0.1.7, object@0.32.2, once_cell@1.19.0, paste@1.0.15, percent-encoding@2.3.1, petgraph@0.6.5, pin-project-internal@1.1.5, pin-project-lite@0.2.14, pin-project@1.1.5, pin-utils@0.1.0, powerfmt@0.2.0, ppv-lite86@0.2.17, prettyplease@0.2.20, proc-macro2@1.0.84, procfs-core@0.17.0, procfs@0.17.0, prost-build@0.12.6, prost-derive@0.12.6, prost-derive@0.13.4, prost-types@0.12.6, prost@0.12.6, prost@0.13.4, quote@1.0.36, rand@0.8.5, rand_chacha@0.3.1, rand_core@0.6.4, regex-automata@0.4.6, regex-syntax@0.8.3, regex@1.10.4, rustc-demangle@0.1.24, rustix@0.38.44, rustversion@1.0.17, serde@1.0.203, serde_derive@1.0.203, shlex@1.3.0, simple_logger@5.0.0, slab@0.4.9, smallvec@1.13.2, socket2@0.5.7, syn@2.0.66, sync_wrapper@0.1.2, sync_wrapper@1.0.1, syslog@7.0.0, tempfile@3.10.1, time-core@0.1.2, time-macros@0.2.18, time@0.3.36, tokio-macros@2.5.0, tokio-stream@0.1.16, tokio-util@0.7.11, tokio@1.43.0, tonic-build@0.11.0, tonic@0.12.3, tower-layer@0.3.2, tower-service@0.3.2, tower@0.4.13, tracing-attributes@0.1.27, tracing-core@0.1.32, tracing@0.1.40, try-lock@0.2.5, unicode-ident@1.0.12, want@0.3.1, wasi@0.11.0+wasi-snapshot-preview1, wasm-bindgen-backend@0.2.92, wasm-bindgen-macro-support@0.2.92, wasm-bindgen-macro@0.2.92, wasm-bindgen-shared@0.2.92, wasm-bindgen@0.2.92, windows-core@0.52.0, windows-sys@0.48.0, windows-sys@0.52.0, windows-targets@0.48.5, windows-targets@0.52.5, windows@0.52.0, windows_aarch64_gnullvm@0.48.5, windows_aarch64_gnullvm@0.52.5, windows_aarch64_msvc@0.48.5, windows_aarch64_msvc@0.52.5, windows_i686_gnu@0.48.5, windows_i686_gnu@0.52.5, windows_i686_gnullvm@0.52.5, windows_i686_msvc@0.48.5, windows_i686_msvc@0.52.5, windows_x86_64_gnu@0.48.5, windows_x86_64_gnu@0.52.5, windows_x86_64_gnullvm@0.48.5, windows_x86_64_gnullvm@0.52.5, windows_x86_64_msvc@0.48.5, windows_x86_64_msvc@0.52.5 +XS-Vendored-Sources-Rust: adler@1.0.2, aho-corasick@1.1.3, anyhow@1.0.86, async-stream-impl@0.3.5, async-stream@0.3.5, async-trait@0.1.80, atomic-waker@1.1.2, autocfg@1.3.0, axum-core@0.4.3, axum@0.7.5, base64@0.22.1, bitflags@2.5.0, bytes@1.7.1, cc@1.2.10, cfg-if@1.0.0, chrono@0.4.38, colored@2.1.0, crc32fast@1.4.2, ctor@0.2.9, deranged@0.3.11, either@1.12.0, equivalent@1.0.1, errno@0.3.10, fastrand@2.1.0, fixedbitset@0.4.2, flate2@1.0.30, fnv@1.0.7, futures-channel@0.3.30, futures-core@0.3.30, futures-sink@0.3.30, futures-task@0.3.30, futures-util@0.3.30, getrandom@0.2.15, h2@0.4.6, hashbrown@0.12.3, hashbrown@0.14.5, heck@0.5.0, hex@0.4.3, hostname@0.4.0, http-body-util@0.1.2, http-body@1.0.1, http@1.1.0, httparse@1.8.0, httpdate@1.0.3, hyper-timeout@0.5.1, hyper-util@0.1.10, hyper@1.4.1, iana-time-zone@0.1.60, indexmap@1.9.3, indexmap@2.2.6, itertools@0.12.1, itoa@1.0.11, lazy_static@1.4.0, libc@0.2.169, libnss@0.8.0, linux-raw-sys@0.4.14, log@0.4.25, matchit@0.7.3, memchr@2.7.2, mime@0.3.17, miniz_oxide@0.7.3, mio@1.0.1, multimap@0.10.0, num-conv@0.1.0, num-traits@0.2.19, num_threads@0.1.7, once_cell@1.19.0, paste@1.0.15, percent-encoding@2.3.1, petgraph@0.6.5, pin-project-internal@1.1.5, pin-project-lite@0.2.14, pin-project@1.1.5, pin-utils@0.1.0, powerfmt@0.2.0, ppv-lite86@0.2.17, prettyplease@0.2.20, proc-macro2@1.0.84, procfs-core@0.17.0, procfs@0.17.0, prost-build@0.12.6, prost-derive@0.12.6, prost-derive@0.13.4, prost-types@0.12.6, prost@0.12.6, prost@0.13.4, quote@1.0.36, rand@0.8.5, rand_chacha@0.3.1, rand_core@0.6.4, regex-automata@0.4.6, regex-syntax@0.8.3, regex@1.10.4, rustix@0.38.44, rustversion@1.0.17, serde@1.0.203, shlex@1.3.0, simple_logger@5.0.0, slab@0.4.9, smallvec@1.13.2, socket2@0.5.7, syn@2.0.66, sync_wrapper@0.1.2, sync_wrapper@1.0.1, syslog@7.0.0, tempfile@3.10.1, time-core@0.1.2, time-macros@0.2.18, time@0.3.36, tokio-macros@2.5.0, tokio-stream@0.1.16, tokio-util@0.7.11, tokio@1.43.0, tonic-build@0.11.0, tonic@0.12.3, tower-layer@0.3.2, tower-service@0.3.2, tower@0.4.13, tracing-attributes@0.1.27, tracing-core@0.1.32, tracing@0.1.40, try-lock@0.2.5, unicode-ident@1.0.12, want@0.3.1 Homepage: https://github.com/ubuntu/authd Vcs-Browser: https://github.com/ubuntu/authd Vcs-Git: https://github.com/ubuntu/authd.git diff --git a/debian/rules b/debian/rules index 644965485..8858c2c43 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,13 @@ #!/usr/bin/make -f #export DH_VERBOSE = 1 +include /usr/share/dpkg/pkg-info.mk include /usr/share/rustc/architecture.mk # The package name for authd, used only locally to avoid repetitions AUTHD_GO_PACKAGE := $(shell grep-dctrl -s XS-Go-Import-Path -n - ./debian/control) -export GOFLAGS := -ldflags=-X=$(AUTHD_GO_PACKAGE)/internal/consts.Version=$(shell dpkg-parsechangelog -S Version) --mod=vendor -buildmode=pie +export GOFLAGS := -ldflags=-X=$(AUTHD_GO_PACKAGE)/internal/consts.Version=$(DEB_VERSION_UPSTREAM) --mod=vendor -buildmode=pie export DEB_BUILD_MAINT_OPTIONS := optimize=-lto @@ -80,7 +81,16 @@ override_dh_auto_configure: dh_auto_configure touch debian/cargo-checksum.json - dh_auto_configure --buildsystem=cargo + + # Go manual if cargo-vendor-filterer is not around, otherwise dh-cargo will + # ensure that what we've filtered won't be still listed in debian/control. + # TODO: Drop this when we won't care about noble anymore. + if ! command -v cargo-vendor-filterer 2>/dev/null; then \ + env DEB_CARGO_CRATE="$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)" \ + $(CARGO_PATH) prepare-debian "$(CARGO_VENDOR_DIR)"; \ + else \ + dh_auto_configure --buildsystem=cargo; \ + fi for i in debian/*.service.in debian/pam-configs/*.in; do \ sed s,@AUTHD_DAEMONS_PATH@,$(AUTHD_DAEMONS_PATH),g $$i > $${i%.*}; \