-
Notifications
You must be signed in to change notification settings - Fork 37
build: add Debian packaging #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
719ff22
Add workflow to auto-update Rust vendored sources
GabrielNagy fcf3b71
Add Debian packaging
GabrielNagy 486a1c8
Add jq as a build dependency
GabrielNagy 559299f
Export variables used multiple times
GabrielNagy 36d2ea8
Skip pam-moduler call if dependencies are vendored
GabrielNagy aef2d42
Add ldconfig trigger
GabrielNagy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: Update translations and Rust packaging related files in main | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - debian/control | ||
| concurrency: auto-update | ||
|
|
||
| jobs: | ||
| update-rust-packaging: | ||
| name: Update packaging related Rust files | ||
| needs: update-po | ||
| runs-on: ubuntu-latest | ||
| # Right now, ubuntu 22.04 does not have the dh-cargo-vendored-sources script that is needed to | ||
| # run this job, so we need to run it inside a rolling container to get the latest version possible. | ||
| # This should be updated as soon as the dh-cargo version with the mentioned script gets ported to | ||
| # 22.04 or ubuntu-latest changes to a more recent version. | ||
| container: | ||
| image: ubuntu:rolling | ||
| steps: | ||
| - name: Install dependencies | ||
| run: | | ||
| DEBIAN_FRONTEND=noninteractive apt update | ||
| DEBIAN_FRONTEND=noninteractive apt install -y cargo dh-cargo git jq | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: main | ||
| - name: Vendor the dependencies | ||
| run: | | ||
| cargo vendor vendor_rust/ | ||
| - name: Update XS-Vendored-Sources-Rust | ||
| run: | | ||
| set -eu | ||
|
|
||
| export CARGO_VENDOR_DIR=vendor_rust/ | ||
| VENDORED_SOURCES=$(/usr/share/cargo/bin/dh-cargo-vendored-sources 2>&1 || true) | ||
| OUTPUT=$(echo "$VENDORED_SOURCES" | grep ^XS-Vendored-Sources-Rust: || true) | ||
| if [ -z "$OUTPUT" ]; then | ||
| echo "XS-Vendored-Sources-Rust is up to date. No change is needed."; | ||
| exit 0 | ||
| fi | ||
| sed -i "s/^XS-Vendored-Sources-Rust:.*/$OUTPUT/" debian/control | ||
GabrielNagy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo "modified=true" >> $GITHUB_ENV | ||
| shell: bash | ||
| # Since we run this job in a container, we need to manually add the safe directory due to some | ||
| # issues between actions/checkout and actions/runner, which seem to be triggered by multiple | ||
| # causes (e.g. https://github.com/actions/runner-images/issues/6775, https://github.com/actions/checkout/issues/1048#issuecomment-1356485556). | ||
| - name: work around permission issue with git vulnerability (we are local here). TO REMOVE | ||
| run: git config --global --add safe.directory "$PWD" | ||
| - name: Create Pull Request | ||
| if: ${{ env.modified == 'true' }} | ||
| uses: peter-evans/create-pull-request@v5 | ||
| with: | ||
| commit-message: Auto update packaging related Rust files | ||
| title: Auto update packaging related Rust files | ||
| labels: control, automated pr | ||
| branch: auto-update-rust-packaging | ||
| delete-branch: true | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Push branch | ||
| if: ${{ env.modified == 'true' }} | ||
| run: | | ||
| git push origin auto-update-rust-packaging:main | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| '''apport package hook for authd | ||
|
|
||
| (c) 2023 Canonical Ltd. | ||
| ''' | ||
|
|
||
| import apport.hookutils | ||
|
|
||
| def add_info(report): | ||
| apport.hookutils.attach_related_packages(report, ["libpam-runtime", "libpam0g"]) | ||
| apport.hookutils.attach_conffiles(report, 'authd') | ||
| apport.hookutils.attach_file_if_exists(report, '/etc/pam.d/common-auth') | ||
| apport.hookutils.attach_file_if_exists(report, '/etc/nsswitch.conf') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| authd (0.1) UNRELEASED; urgency=medium | ||
|
|
||
| * Initial release | ||
GabrielNagy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| -- Gabriel Nagy <gabriel.nagy@canonical.com> Thu, 30 Nov 2023 00:12:07 +0200 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| Source: authd | ||
| Section: admin | ||
| Priority: optional | ||
| Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | ||
| Build-Depends: debhelper-compat (= 13), | ||
| dbus, | ||
| dh-apport, | ||
| dh-cargo, | ||
| dh-golang, | ||
| golang-go (>= 2:1.21~), | ||
| jq, | ||
| libpam0g-dev, | ||
| libc6-dev (>= 2.35), | ||
| libpam0g-dev, | ||
| pkg-config, | ||
| 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.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 | ||
GabrielNagy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Homepage: https://github.com/ubuntu/authd | ||
GabrielNagy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Vcs-Browser: https://github.com/ubuntu/authd | ||
| Vcs-Git: https://github.com/ubuntu/authd.git | ||
| Description: Authentication daemon for external Broker | ||
| Authd enables system authentication through external brokers. | ||
|
|
||
| Package: authd | ||
| Architecture: any | ||
| Built-Using: ${misc:Built-Using}, | ||
| Depends: ${shlibs:Depends}, | ||
| ${misc:Depends}, | ||
| Description: ${source:Synopsis} | ||
| ${source:Extended-Description} | ||
| . | ||
| This package contains the authentication daemon together with the PAM & NSS | ||
| modules. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.