Skip to content
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

build: Fix pam_adsys build #789

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
export GOCACHE=$(shell mktemp -d /tmp/gocache-XXXX)

WIN_ARCHS := amd64 arm64
# Tags should always come last as we append to them in other parts of the build
COMMON_GOFLAGS := -ldflags=-X=github.com/ubuntu/adsys/internal/consts.Version=$(shell dpkg-parsechangelog -S Version) -mod=vendor -tags=withmo
GabrielNagy marked this conversation as resolved.
Show resolved Hide resolved
export GOFLAGS := $(COMMON_GOFLAGS) -buildmode=pie
export GOFLAGS := -buildmode=pie $(COMMON_GOFLAGS)
export WIN_GOFLAGS := $(COMMON_GOFLAGS)
# PIE on Windows is only supported for amd64
ifeq ($(shell dpkg --print-architecture),amd64)
Expand Down Expand Up @@ -81,4 +82,4 @@ endif
# Create adsysctl command
ln -s adsysd debian/tmp/sbin/adsysctl
# Run go generate to install assets, but don’t regenerate them
GENERATE_ONLY_INSTALL_TO_DESTDIR=$(CURDIR)/debian/tmp go generate -x -tags tools $(GOFLAGS) ./...
GENERATE_ONLY_INSTALL_TO_DESTDIR=$(CURDIR)/debian/tmp go generate -x $(GOFLAGS),tools ./...