Skip to content

Commit c03337a

Browse files
authored
build: add Debian packaging (#120)
2 parents 8cd5a0f + aef2d42 commit c03337a

19 files changed

Lines changed: 899 additions & 1 deletion

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Update translations and Rust packaging related files in main
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths-ignore:
7+
- debian/control
8+
concurrency: auto-update
9+
10+
jobs:
11+
update-rust-packaging:
12+
name: Update packaging related Rust files
13+
needs: update-po
14+
runs-on: ubuntu-latest
15+
# Right now, ubuntu 22.04 does not have the dh-cargo-vendored-sources script that is needed to
16+
# run this job, so we need to run it inside a rolling container to get the latest version possible.
17+
# This should be updated as soon as the dh-cargo version with the mentioned script gets ported to
18+
# 22.04 or ubuntu-latest changes to a more recent version.
19+
container:
20+
image: ubuntu:rolling
21+
steps:
22+
- name: Install dependencies
23+
run: |
24+
DEBIAN_FRONTEND=noninteractive apt update
25+
DEBIAN_FRONTEND=noninteractive apt install -y cargo dh-cargo git jq
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: main
29+
- name: Vendor the dependencies
30+
run: |
31+
cargo vendor vendor_rust/
32+
- name: Update XS-Vendored-Sources-Rust
33+
run: |
34+
set -eu
35+
36+
export CARGO_VENDOR_DIR=vendor_rust/
37+
VENDORED_SOURCES=$(/usr/share/cargo/bin/dh-cargo-vendored-sources 2>&1 || true)
38+
OUTPUT=$(echo "$VENDORED_SOURCES" | grep ^XS-Vendored-Sources-Rust: || true)
39+
if [ -z "$OUTPUT" ]; then
40+
echo "XS-Vendored-Sources-Rust is up to date. No change is needed.";
41+
exit 0
42+
fi
43+
sed -i "s/^XS-Vendored-Sources-Rust:.*/$OUTPUT/" debian/control
44+
45+
echo "modified=true" >> $GITHUB_ENV
46+
shell: bash
47+
# Since we run this job in a container, we need to manually add the safe directory due to some
48+
# issues between actions/checkout and actions/runner, which seem to be triggered by multiple
49+
# causes (e.g. https://github.com/actions/runner-images/issues/6775, https://github.com/actions/checkout/issues/1048#issuecomment-1356485556).
50+
- name: work around permission issue with git vulnerability (we are local here). TO REMOVE
51+
run: git config --global --add safe.directory "$PWD"
52+
- name: Create Pull Request
53+
if: ${{ env.modified == 'true' }}
54+
uses: peter-evans/create-pull-request@v5
55+
with:
56+
commit-message: Auto update packaging related Rust files
57+
title: Auto update packaging related Rust files
58+
labels: control, automated pr
59+
branch: auto-update-rust-packaging
60+
delete-branch: true
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
- name: Push branch
63+
if: ${{ env.modified == 'true' }}
64+
run: |
65+
git push origin auto-update-rust-packaging:main

debian/apport

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'''apport package hook for authd
2+
3+
(c) 2023 Canonical Ltd.
4+
'''
5+
6+
import apport.hookutils
7+
8+
def add_info(report):
9+
apport.hookutils.attach_related_packages(report, ["libpam-runtime", "libpam0g"])
10+
apport.hookutils.attach_conffiles(report, 'authd')
11+
apport.hookutils.attach_file_if_exists(report, '/etc/pam.d/common-auth')
12+
apport.hookutils.attach_file_if_exists(report, '/etc/nsswitch.conf')

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
authd (0.1) UNRELEASED; urgency=medium
2+
3+
* Initial release
4+
5+
-- Gabriel Nagy <gabriel.nagy@canonical.com> Thu, 30 Nov 2023 00:12:07 +0200

debian/control

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Source: authd
2+
Section: admin
3+
Priority: optional
4+
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5+
Build-Depends: debhelper-compat (= 13),
6+
dbus,
7+
dh-apport,
8+
dh-cargo,
9+
dh-golang,
10+
golang-go (>= 2:1.21~),
11+
jq,
12+
libpam0g-dev,
13+
libc6-dev (>= 2.35),
14+
libpam0g-dev,
15+
pkg-config,
16+
protobuf-compiler,
17+
Standards-Version: 4.6.2
18+
XS-Go-Import-Path: github.com/ubuntu/authd
19+
XS-Vendored-Sources-Rust: addr2line@0.21.0, adler@1.0.2, aho-corasick@1.0.5, anyhow@1.0.75, async-stream-impl@0.3.5, async-stream@0.3.5, async-trait@0.1.73, autocfg@1.1.0, axum-core@0.3.4, axum@0.6.20, backtrace@0.3.69, base64@0.21.3, bitflags@1.3.2, bitflags@2.4.0, bytes@1.5.0, cc@1.0.84, cfg-if@1.0.0, colored@2.0.4, ctor@0.2.5, deranged@0.3.8, either@1.9.0, equivalent@1.0.1, errno-dragonfly@0.1.2, errno@0.3.3, error-chain@0.12.4, fastrand@2.0.0, fixedbitset@0.4.2, fnv@1.0.7, futures-channel@0.3.28, futures-core@0.3.28, futures-sink@0.3.28, futures-task@0.3.28, futures-util@0.3.28, getrandom@0.2.10, gimli@0.28.0, h2@0.3.21, hashbrown@0.12.3, hashbrown@0.14.0, heck@0.4.1, hermit-abi@0.3.2, home@0.5.5, hostname@0.3.1, http-body@0.4.5, http@0.2.9, httparse@1.8.0, httpdate@1.0.3, hyper-timeout@0.4.1, hyper@0.14.27, indexmap@1.9.3, indexmap@2.0.0, is-terminal@0.4.9, itertools@0.11.0, itoa@1.0.9, lazy_static@1.4.0, libc@0.2.150, libnss@0.5.0, linux-raw-sys@0.4.5, log@0.4.20, match_cfg@0.1.0, matchit@0.7.2, memchr@2.6.3, mime@0.3.17, miniz_oxide@0.7.1, mio@0.8.9, multimap@0.8.3, num_cpus@1.16.0, num_threads@0.1.6, object@0.32.1, once_cell@1.18.0, paste@1.0.14, percent-encoding@2.3.0, petgraph@0.6.4, pin-project-internal@1.1.3, pin-project-lite@0.2.13, pin-project@1.1.3, pin-utils@0.1.0, ppv-lite86@0.2.17, prettyplease@0.2.14, proc-macro2@1.0.66, prost-build@0.12.0, prost-derive@0.12.3, prost-types@0.12.0, prost@0.12.3, quote@1.0.33, rand@0.8.5, rand_chacha@0.3.1, rand_core@0.6.4, redox_syscall@0.3.5, regex-automata@0.3.8, regex-syntax@0.7.5, regex@1.9.5, rustc-demangle@0.1.23, rustix@0.38.11, rustversion@1.0.14, serde@1.0.188, serde_derive@1.0.188, simple_logger@4.3.0, slab@0.4.9, socket2@0.4.9, socket2@0.5.5, syn@2.0.31, sync_wrapper@0.1.2, syslog@6.1.0, tempfile@3.8.0, time-core@0.1.1, time-macros@0.2.14, time@0.3.28, tokio-io-timeout@1.2.0, tokio-macros@2.2.0, tokio-stream@0.1.14, tokio-util@0.7.8, tokio@1.34.0, tonic-build@0.10.2, tonic@0.10.2, tower-layer@0.3.2, tower-service@0.3.2, tower@0.4.13, tracing-attributes@0.1.26, tracing-core@0.1.31, tracing@0.1.37, try-lock@0.2.4, unicode-ident@1.0.11, version_check@0.9.4, want@0.3.1, wasi@0.11.0+wasi-snapshot-preview1, which@4.4.2, winapi-i686-pc-windows-gnu@0.4.0, winapi-x86_64-pc-windows-gnu@0.4.0, winapi@0.3.9, windows-sys@0.48.0, windows-targets@0.48.5, windows_aarch64_gnullvm@0.48.5, windows_aarch64_msvc@0.48.5, windows_i686_gnu@0.48.5, windows_i686_msvc@0.48.5, windows_x86_64_gnu@0.48.5, windows_x86_64_gnullvm@0.48.5, windows_x86_64_msvc@0.48.5
20+
Homepage: https://github.com/ubuntu/authd
21+
Vcs-Browser: https://github.com/ubuntu/authd
22+
Vcs-Git: https://github.com/ubuntu/authd.git
23+
Description: Authentication daemon for external Broker
24+
Authd enables system authentication through external brokers.
25+
26+
Package: authd
27+
Architecture: any
28+
Built-Using: ${misc:Built-Using},
29+
Depends: ${shlibs:Depends},
30+
${misc:Depends},
31+
Description: ${source:Synopsis}
32+
${source:Extended-Description}
33+
.
34+
This package contains the authentication daemon together with the PAM & NSS
35+
modules.

0 commit comments

Comments
 (0)