-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debian: Cleanup build process using more debhelper features (#223)
refactor quite a bit the `debian/*` code so that we are less dependent on our scripts, but instead we use debian tooling more. In particular: - Ensure that generated go files are properly created when bootstrapping the repo and removing them - Use `dh-cargo` tools more, reducing duplication - And when it's not possible, mimic its behavior more - Address various lintian warnings - Use install files to install the produced binaries - It has the benefit of fail if we miss something or if we're adding unexpected - Install the daemons in `/usr/libexec` instead of `/usr/sbin` (there's no need for them to be in `$PATH`) Closes: #218 UDENG-2342
- Loading branch information
Showing
23 changed files
with
144 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
File renamed without changes.
This file contains 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 |
---|---|---|
|
@@ -3,15 +3,17 @@ Section: admin | |
Priority: optional | ||
Maintainer: Ubuntu Developers <[email protected]> | ||
Build-Depends: debhelper-compat (= 13), | ||
dbus, | ||
dbus <!nocheck>, | ||
dh-apport, | ||
dh-cargo, | ||
dh-exec, | ||
dh-golang, | ||
dctrl-tools, | ||
golang-go (>= 2:1.21~), | ||
jq, | ||
libc6-dev (>= 2.35), | ||
libpam0g-dev, | ||
pkg-config, | ||
pkgconf, | ||
protobuf-compiler, | ||
Standards-Version: 4.6.2 | ||
XS-Go-Import-Path: github.com/ubuntu/authd | ||
|
@@ -21,7 +23,6 @@ Vcs-Browser: https://github.com/ubuntu/authd | |
Vcs-Git: https://github.com/ubuntu/authd.git | ||
Rules-Requires-Root: no | ||
Description: Authentication daemon for cloud-based identity provider | ||
. | ||
Authd is a versatile authentication service designed to seamlessly integrate | ||
with cloud identity providers like OpenID Connect and Entra ID. It offers a | ||
secure interface for system authentication, supporting cloud-based identity | ||
|
@@ -31,7 +32,9 @@ Description: Authentication daemon for cloud-based identity provider | |
|
||
Package: authd | ||
Architecture: any | ||
Built-Using: ${misc:Built-Using}, | ||
Built-Using: ${misc:Built-Using}, ${cargo:Built-Using} | ||
Static-Built-Using: ${misc:Static-Built-Using}, ${cargo:Static-Built-Using}, | ||
X-Cargo-Built-Using: ${cargo:X-Cargo-Built-Using}, | ||
Depends: ${shlibs:Depends}, | ||
${misc:Depends}, | ||
Description: ${source:Synopsis} | ||
|
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Vendored dependency contains an Apache NOTICE | ||
vendor/gopkg.in/yaml.v3/NOTICE | ||
# Vendored rust dependencies | ||
Cargo.lock |
This file contains 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,14 @@ | ||
#!/usr/bin/dh-exec | ||
|
||
# Install daemon | ||
usr/bin/authd ${env:AUTHD_DAEMONS_PATH} | ||
|
||
# pam-auth-update files | ||
debian/pam-configs/* /usr/share/pam-configs | ||
|
||
# PAM libraries | ||
${env:BUILT_PAM_LIBS_PATH}/pam_authd.so ${env:AUTHD_PAM_MODULES_PATH} | ||
${env:BUILT_PAM_LIBS_PATH}/go-loader/pam_go_loader.so ${env:AUTHD_PAM_MODULES_PATH} | ||
|
||
# Install NSS library with right soname | ||
target/${DEB_HOST_RUST_TYPE}/release/libnss_authd.so => /usr/lib/${DEB_TARGET_GNU_TYPE}/libnss_authd.so.2 |
This file contains 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 @@ | ||
usr/bin/pam |
This file contains 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
This file contains 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,8 @@ | ||
tar-ignore = */.git* | ||
tar-ignore = */.go* | ||
tar-ignore = */.editor* | ||
tar-ignore = */.mailmap | ||
tar-ignore = */.vscode | ||
tar-ignore = *.so | ||
tar-ignore = *.o | ||
tar-ignore = vendor_rust/*.a |
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Test-Command: AUTHD_SKIP_EXTERNAL_DEPENDENT_TESTS=1 go test -v -mod=vendor ./... | ||
Test-Command: debian/tests/run-tests.sh | ||
Features: test-name=go_tests | ||
Restrictions: allow-stderr | ||
Depends: @builddeps@ |
This file contains 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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exuo pipefail | ||
|
||
export AUTHD_SKIP_EXTERNAL_DEPENDENT_TESTS=1 | ||
export GOPROXY=off | ||
export GOTOOLCHAIN=local | ||
|
||
go test -v ./... |
This file contains 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
This file contains 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,6 @@ | ||
//go:build generate | ||
|
||
//go:generate ../../../../tools/generate-proto.sh --with-grpc grpctestservice.proto | ||
|
||
// Package grpctestservice contains the autogenerated GRPC API. | ||
package grpctestservice |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.