Skip to content

Commit

Permalink
debian: Add authd-example-broker package
Browse files Browse the repository at this point in the history
In order to do integration tests, autopkgtests or manual tests we may
need to have a simple broker installed.

So expose the example broker as a separate binary pacakge so that we can
easily install it when required.
  • Loading branch information
3v1n0 committed Feb 23, 2024
1 parent 8d0ee0c commit 1d050c5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions debian/authd-example-broker.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
usr/bin/examplebroker-bin /usr/libexec/authd-examplebroker

examplebroker/com.ubuntu.authd.ExampleBroker.conf /usr/share/dbus-1/system.d
examplebroker/ExampleBroker /etc/authd/brokers.d
examplebroker/com.ubuntu.authd.ExampleBroker.service /usr/share/dbus-1/system-services

systemd/authd-examplebroker.* /usr/lib/systemd/system/
10 changes: 10 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,13 @@ Description: ${source:Synopsis}
.
This package contains the authentication daemon together with the PAM & NSS
modules.

Package: authd-example-broker
Architecture: any
Built-Using: ${misc:Built-Using},
Depends: ${shlibs:Depends},
${misc:Depends},
Description: ${source:Synopsis} - Example broker
${source:Extended-Description}
.
This package contains an example broker for testing and autopkgtests purposes.
7 changes: 6 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export AUTHD_SKIP_EXTERNAL_DEPENDENT_TESTS=1
# Defines the targets to be built as part of dh_auto_build
export DH_GOLANG_BUILDPKG := $(AUTHD_GO_PACKAGE)/...

EXAMPLE_BROKER_BUILD_TAG := with_standalone_examplebroker

# Run go generate on the targets
export DH_GOLANG_GO_GENERATE := 1

Expand Down Expand Up @@ -78,7 +80,10 @@ override_dh_auto_build:
-Dt $(BUILD_GOPATH)/github.com/msteinert/pam/v2/cmd/pam-moduler

# Build the daemon and libraries defined in $(DH_GOLANG_BUILDPKG)
dh_auto_build
# but we manually include the example broker because otherwise it's not
# part of the normal install.
dh_auto_build -- -tags $(EXAMPLE_BROKER_BUILD_TAG) \
$(AUTHD_GO_PACKAGE)/examplebroker/examplebroker-bin

override_dh_auto_install:
dh_auto_install --destdir=debian/tmp -- --no-source
Expand Down

0 comments on commit 1d050c5

Please sign in to comment.