From a8b1aaa6b0729e9bc78608414c0f06ac10900f81 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 2 Jun 2026 21:45:43 +0200 Subject: [PATCH 1/3] ci: only add linux pkg suffix for branch builds --- cmd/agent_local/package/linux/nfpm.yaml | 2 +- cmd/agent_system/package/linux/nfpm.yaml | 2 +- cmd/cli/package/linux/nfpm.yaml | 2 +- common.mk | 13 +++++++++++-- nss/nfpm.yaml | 2 +- pam/nfpm.yaml | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cmd/agent_local/package/linux/nfpm.yaml b/cmd/agent_local/package/linux/nfpm.yaml index bd6e09d0..02692e25 100644 --- a/cmd/agent_local/package/linux/nfpm.yaml +++ b/cmd/agent_local/package/linux/nfpm.yaml @@ -2,7 +2,7 @@ name: "authentik-agent" arch: "${ARCH}" platform: "linux" -version: "${VERSION}+ak-${VERSION_HASH_SHORT}" +version: "${VERSION_PKG}" description: | authentik Agent vendor: "Authentik Security Inc." diff --git a/cmd/agent_system/package/linux/nfpm.yaml b/cmd/agent_system/package/linux/nfpm.yaml index 38c6cc01..f2b2afd0 100644 --- a/cmd/agent_system/package/linux/nfpm.yaml +++ b/cmd/agent_system/package/linux/nfpm.yaml @@ -2,7 +2,7 @@ name: "authentik-sysd" arch: "${ARCH}" platform: "linux" -version: "${VERSION}+ak-${VERSION_HASH_SHORT}" +version: "${VERSION_PKG}" description: | authentik System Agent vendor: "Authentik Security Inc." diff --git a/cmd/cli/package/linux/nfpm.yaml b/cmd/cli/package/linux/nfpm.yaml index 39f1efcb..16476a94 100644 --- a/cmd/cli/package/linux/nfpm.yaml +++ b/cmd/cli/package/linux/nfpm.yaml @@ -2,7 +2,7 @@ name: "authentik-cli" arch: "${ARCH}" platform: "linux" -version: "${VERSION}+ak-${VERSION_HASH_SHORT}" +version: "${VERSION_PKG}" description: | authentik CLI vendor: "Authentik Security Inc." diff --git a/common.mk b/common.mk index c03f135b..c43fbca9 100644 --- a/common.mk +++ b/common.mk @@ -7,6 +7,15 @@ VERSION = 0.43.1 VERSION_HASH = $(shell git rev-parse HEAD) VERSION_HASH_SHORT = $(shell git rev-parse HEAD | head -c 8) VERSION_TAG = $(shell git tag --points-at HEAD) +ifeq ($(GITHUB_ACTIONS),true) + ifeq ($(AK_IS_RELEASE),true) + VERSION_PKG = ${VERSION} + else + VERSION_PKG = ${VERSION}+ak-${VERSION_HASH_SHORT} + endif +else + VERSION_PKG = ${VERSION} +endif VERSION_TS = $(shell date +%s) PLATFORM := $(shell bash -c "uname -o | tr '[:upper:]' '[:lower:]'") ifeq ($(OS),Windows_NT) @@ -66,13 +75,13 @@ define go_generate_resources endef define nfpm_package - VERSION=${VERSION} VERSION_HASH_SHORT=${VERSION_HASH_SHORT} ARCH=${ARCH} \ + VERSION_PKG=${VERSION_PKG} ARCH=${ARCH} \ go tool github.com/goreleaser/nfpm/v2/cmd/nfpm \ package \ -p deb \ -t ${TOP}/bin/${TARGET} \ -f $(1) - VERSION=${VERSION} VERSION_HASH_SHORT=${VERSION_HASH_SHORT} ARCH=${ARCH} \ + VERSION_PKG=${VERSION_PKG} ARCH=${ARCH} \ go tool github.com/goreleaser/nfpm/v2/cmd/nfpm \ package \ -p rpm \ diff --git a/nss/nfpm.yaml b/nss/nfpm.yaml index 72e1a28b..dec11024 100644 --- a/nss/nfpm.yaml +++ b/nss/nfpm.yaml @@ -2,7 +2,7 @@ name: "libnss-authentik" arch: "${ARCH}" platform: "linux" -version: "${VERSION}+ak-${VERSION_HASH_SHORT}" +version: "${VERSION_PKG}" description: | NSS module for authentik vendor: "Authentik Security Inc." diff --git a/pam/nfpm.yaml b/pam/nfpm.yaml index b059c7bd..5483d81c 100644 --- a/pam/nfpm.yaml +++ b/pam/nfpm.yaml @@ -2,7 +2,7 @@ name: "libpam-authentik" arch: "${ARCH}" platform: "linux" -version: "${VERSION}+ak-${VERSION_HASH_SHORT}" +version: "${VERSION_PKG}" description: | libpam-authentik authenticates users through authentik. vendor: "Authentik Security Inc." From e37cc071739a4a2a3aed3aab2e4b15b57390d48b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 2 Jun 2026 21:47:10 +0200 Subject: [PATCH 2/3] cleanup remnants --- cmd/agent_system/Makefile | 2 +- cmd/cli/Makefile | 4 ++-- common.mk | 3 +-- containers/e2e/Makefile | 2 +- containers/selenium/Makefile | 2 +- vpkg/macos/Makefile | 2 +- vpkg/windows/Makefile | 2 +- vpkg/windows/Package.wxs | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/agent_system/Makefile b/cmd/agent_system/Makefile index dd48c2c8..ea37cbf7 100644 --- a/cmd/agent_system/Makefile +++ b/cmd/agent_system/Makefile @@ -37,5 +37,5 @@ package-gnu/linux: build $(call nfpm_package,${TOP}/cmd/${TARGET}/package/linux/nfpm.yaml) test-deploy: package-gnu/linux - $(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-sysd_${VERSION}+ak-${VERSION_HASH_SHORT}_${ARCH}.deb + $(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-sysd_${VERSION}+_${ARCH}.deb $(TME) systemctl restart ak-sysd diff --git a/cmd/cli/Makefile b/cmd/cli/Makefile index 7466253a..b46e12c0 100644 --- a/cmd/cli/Makefile +++ b/cmd/cli/Makefile @@ -32,6 +32,6 @@ package-gnu/linux: build $(call nfpm_package,${TOP}/cmd/${TARGET}/package/linux/nfpm.yaml) test-deploy: package-gnu/linux - $(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-${TARGET}_${VERSION}+ak-${VERSION_HASH_SHORT}_${ARCH}.deb + $(TME) dpkg -i /workspaces/bin/${TARGET}/authentik-${TARGET}_${VERSION}+_${ARCH}.deb $(TME) systemctl restart ssh - sudo dpkg -i ${TOP}/bin/${TARGET}/authentik-${TARGET}_${VERSION}+ak-${VERSION_HASH_SHORT}_${ARCH}.deb + sudo dpkg -i ${TOP}/bin/${TARGET}/authentik-${TARGET}_${VERSION}+_${ARCH}.deb diff --git a/common.mk b/common.mk index c43fbca9..3e0e6d83 100644 --- a/common.mk +++ b/common.mk @@ -5,13 +5,12 @@ UID = $(shell id -u) GID = $(shell id -g) VERSION = 0.43.1 VERSION_HASH = $(shell git rev-parse HEAD) -VERSION_HASH_SHORT = $(shell git rev-parse HEAD | head -c 8) VERSION_TAG = $(shell git tag --points-at HEAD) ifeq ($(GITHUB_ACTIONS),true) ifeq ($(AK_IS_RELEASE),true) VERSION_PKG = ${VERSION} else - VERSION_PKG = ${VERSION}+ak-${VERSION_HASH_SHORT} + VERSION_PKG = ${VERSION}+ak-${shell git rev-parse HEAD | head -c 8} endif else VERSION_PKG = ${VERSION} diff --git a/containers/e2e/Makefile b/containers/e2e/Makefile index 00215723..0603b59d 100644 --- a/containers/e2e/Makefile +++ b/containers/e2e/Makefile @@ -8,7 +8,7 @@ local-build: docker build \ -t xghcr.io/goauthentik/platform-e2e:local \ --no-cache \ - --build-arg="AK_PLATFORM_VER=${VERSION}+ak-${VERSION_HASH_SHORT}" \ + --build-arg="AK_PLATFORM_VER=${VERSION}+" \ --build-arg="AK_PLATFORM_ARCH=${ARCH}" \ -f "${PWD}/Dockerfile" \ ${TOP} diff --git a/containers/selenium/Makefile b/containers/selenium/Makefile index 73d06c7a..cdd98db2 100644 --- a/containers/selenium/Makefile +++ b/containers/selenium/Makefile @@ -10,7 +10,7 @@ ci-container-tag: .PHONY: ci-build-args ci-build-args: - @echo AK_PLATFORM_VER=${VERSION}+ak-${VERSION_HASH_SHORT} + @echo AK_PLATFORM_VER=${VERSION}+ @echo AK_DEPLOY_URL=${AK_DEPLOY_URL} .PHONY: local-build diff --git a/vpkg/macos/Makefile b/vpkg/macos/Makefile index 19a6b5cd..d70758d7 100644 --- a/vpkg/macos/Makefile +++ b/vpkg/macos/Makefile @@ -34,7 +34,7 @@ package: pkgbuild \ --component "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}" \ --identifier "io.goauthentik.agent" \ - --version "${VERSION}.${VERSION_HASH_SHORT}" \ + --version "${VERSION}" \ --scripts "${PWD}/scripts" \ --install-location /Applications \ "${TOP}/bin/${TARGET}/agent.pkg" diff --git a/vpkg/windows/Makefile b/vpkg/windows/Makefile index 6ede4f74..11b74d65 100644 --- a/vpkg/windows/Makefile +++ b/vpkg/windows/Makefile @@ -16,7 +16,7 @@ endif dotnet restore \ --packages "${TOP}/cache/${TARGET}" \ "${PWD}/" - ROOT=${TOP} VERSION=${VERSION} VERSION_HASH_SHORT=${VERSION_HASH_SHORT} dotnet build \ + ROOT=${TOP} VERSION=${VERSION} dotnet build \ --packages "${TOP}/cache/${TARGET}" \ --artifacts-path "${TOP}/cache/${TARGET}" \ --output "${TOP}/bin/${TARGET}" \ diff --git a/vpkg/windows/Package.wxs b/vpkg/windows/Package.wxs index 3293ecdc..62d8e5a8 100644 --- a/vpkg/windows/Package.wxs +++ b/vpkg/windows/Package.wxs @@ -8,7 +8,7 @@ xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"> From 3aa9edea40d67de37e99ca045d46876d690ba331 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 2 Jun 2026 22:29:16 +0200 Subject: [PATCH 3/3] fix container builds...? --- containers/e2e/Makefile | 2 +- containers/selenium/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/e2e/Makefile b/containers/e2e/Makefile index 0603b59d..65926063 100644 --- a/containers/e2e/Makefile +++ b/containers/e2e/Makefile @@ -8,7 +8,7 @@ local-build: docker build \ -t xghcr.io/goauthentik/platform-e2e:local \ --no-cache \ - --build-arg="AK_PLATFORM_VER=${VERSION}+" \ + --build-arg="AK_PLATFORM_VER=${VERSION_PKG}" \ --build-arg="AK_PLATFORM_ARCH=${ARCH}" \ -f "${PWD}/Dockerfile" \ ${TOP} diff --git a/containers/selenium/Makefile b/containers/selenium/Makefile index cdd98db2..3d2226b2 100644 --- a/containers/selenium/Makefile +++ b/containers/selenium/Makefile @@ -10,7 +10,7 @@ ci-container-tag: .PHONY: ci-build-args ci-build-args: - @echo AK_PLATFORM_VER=${VERSION}+ + @echo AK_PLATFORM_VER=${VERSION_PKG} @echo AK_DEPLOY_URL=${AK_DEPLOY_URL} .PHONY: local-build