Skip to content

Commit

Permalink
Use modern ubuntu for standalone containers (#154)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hakwerk committed Feb 13, 2025
1 parent a95028c commit de0b496
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -65,14 +67,17 @@ changelog:
$Q echo " * See https://github.com/hakwerk/labca/releases" >> debian/changelog
$Q echo >> debian/changelog
$Q echo " -- hakwerk <[email protected]> $(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; \
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-standalone
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:24.04

ARG TARGETARCH

Expand Down
8 changes: 2 additions & 6 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ Source: labca-gui
Section: utils
Priority: optional
Maintainer: hakwerk <[email protected]>
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
32 changes: 29 additions & 3 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
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");
Expand All @@ -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

0 comments on commit de0b496

Please sign in to comment.