From de0b49606c5ad260fd33add639b565157d23b533 Mon Sep 17 00:00:00 2001 From: Arjan H Date: Thu, 13 Feb 2025 20:41:11 +0100 Subject: [PATCH] Use modern ubuntu for standalone containers (#154) Abandon attempts to build really static binaries both for amd64 and arm64, this was taking way too much time. Just use a more modern base container that has a correct libc version. --- Makefile | 7 ++++++- build/Dockerfile-standalone | 2 +- debian/control | 8 ++------ debian/copyright | 32 +++++++++++++++++++++++++++++--- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 227d31d..d452219 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ PREFIX?= TAG=$(shell git rev-list --tags --max-count=1) VERSION=$(shell git describe --always --tags $(TAG)) DEB_VERSION=$(shell echo $(VERSION) | sed 's/^v//' | sed 's/-/./g') +FULLVERSION=$(shell git describe --always --tags) RELEASE=./release all: build @@ -16,13 +17,14 @@ all: build ifdef V $(info VERSION is $(VERSION)) $(info DEB_VERSION is $(DEB_VERSION)) +$(info FULLVERSION is $(FULLVERSION)) endif ######################################### # Build ######################################### -LDFLAGS := -ldflags='-w -X "main.standaloneVersion=$(VERSION)" -extldflags "-static"' \ +LDFLAGS := -ldflags='-w -X "main.standaloneVersion=$(FULLVERSION)" -extldflags "-static"' \ -tags standalone download: @@ -65,14 +67,17 @@ changelog: $Q echo " * See https://github.com/hakwerk/labca/releases" >> debian/changelog $Q echo >> debian/changelog $Q echo " -- hakwerk $(shell date -uR)" >> debian/changelog + $Q sed -i -e "s/Version: .*/Version: $(DEB_VERSION)/" debian/control debian: changelog + $Q sed -i -e "s/Architecture: .*/Architecture: amd64/" debian/control; \ $Q mkdir -p $(RELEASE); \ OUTPUT=../labca-gui*.deb; \ rm -f $$OUTPUT; \ dpkg-buildpackage -b -rfakeroot -us -uc && cp $$OUTPUT $(RELEASE)/ debian-arm64: changelog + $Q sed -i -e "s/Architecture: .*/Architecture: arm64/" debian/control; \ $Q mkdir -p $(RELEASE); \ OUTPUT=../labca-gui*.deb; \ rm -f $$OUTPUT; \ diff --git a/build/Dockerfile-standalone b/build/Dockerfile-standalone index e615e83..323960b 100644 --- a/build/Dockerfile-standalone +++ b/build/Dockerfile-standalone @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:24.04 ARG TARGETARCH diff --git a/debian/control b/debian/control index 7f5179d..0a47b1d 100644 --- a/debian/control +++ b/debian/control @@ -2,14 +2,10 @@ Source: labca-gui Section: utils Priority: optional Maintainer: hakwerk -Build-Depends: debhelper (>= 10) -Standards-Version: 4.1.2 Homepage: https://github.com/hakwerk/labca -Vcs-Browser: https://github.com/hakwerk/labca.git Vcs-Git: https://github.com/hakwerk/labca.git Package: labca-gui Architecture: any -Depends: ${misc:Depends} -Description: Standalone ACME GUI - Standalone web GUI for ACME servers. +Version: 0 +Description: Standalone web GUI for ACME servers diff --git a/debian/copyright b/debian/copyright index a5daba4..87f385f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -2,11 +2,12 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: labca-gui Source: https://github.com/hakwerk/labca -Files: * +Files: + * Copyright: 2022-2025 hakwerk -License: MPL 2.0 +License: MPL-2.0 and Commons-Clause-1.0 -License: MPL 2.0 +License: MPL-2.0 Copyright (c) 2022-2025 hakwerk . Licensed under the Mozilla Public License 2.0 (the "License"); @@ -20,3 +21,28 @@ License: MPL 2.0 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +License: Commons-Clause-1.0 + "Commons Clause" License Condition v1.0 + . + The Software is provided to you by the Licensor under the License, as + defined below, subject to the following condition. + . + Without limiting other conditions in the License, the grant of rights + under the License will not include, and the License does not grant to + you, the right to Sell the Software. + . + For purposes of the foregoing, "Sell" means practicing any or all of the + rights granted to you under the License to provide to third parties, for + a fee or other consideration (including without limitation fees for + hosting or consulting/ support services related to the Software), a + product or service whose value derives, entirely or substantially, from + the functionality of the Software. Any license notice or attribution + required by the License must also include this Commons Cause License + Condition notice. + . + Software: LabCA + . + License: Mozilla Public License 2.0 + . + Licensor: https://github.com/hakwerk