diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch | 39 | ||||
-rw-r--r-- | PKGBUILD | 10 |
3 files changed, 49 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = sysbox-ce-git pkgdesc = Container runtime with VM-like isolation (run Systemd, Docker, K8s in containers) pkgver = r1722.b7f3457 - pkgrel = 1 + pkgrel = 2 url = https://github.com/nestybox/sysbox install = install.sh arch = x86_64 @@ -28,6 +28,7 @@ pkgbase = sysbox-ce-git source = git+https://github.com/nestybox/sysbox-mgr.git source = git+https://github.com/nestybox/sysbox-pkgr.git source = git+https://github.com/nestybox/sysbox-runc.git + source = Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP @@ -39,5 +40,6 @@ pkgbase = sysbox-ce-git sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP + sha256sums = 5264ed0c448868083a9f1bedc2846d744c9ea90e58f8555c50bbc155008512e5 pkgname = sysbox-ce-git diff --git a/Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch b/Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch new file mode 100644 index 000000000000..f3ea9fe9e6f9 --- /dev/null +++ b/Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch @@ -0,0 +1,39 @@ +diff --git a/sysbox-fs/Makefile b/sysbox-fs/Makefile +index b2c2de8..bf83db0 100644 +--- a/sysbox-fs/Makefile ++++ b/sysbox-fs/Makefile +@@ -32,7 +32,7 @@ NSENTER_SRC := $(shell find $(NSENTER_DIR) 2>&1 | grep -E '.*\.(c|h|go)') + + COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) + COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),$(COMMIT_NO)-dirty,$(COMMIT_NO)) +-BUILT_AT := $(shell date) ++BUILT_AT := $(shell date --utc --date="@$${SOURCE_DATE_EPOCH:-$$(date +%s)}") + BUILT_BY := $(shell git config user.name) + + LDFLAGS := -X 'main.edition=${EDITION}' -X main.version=${VERSION} \ +diff --git a/sysbox-mgr/Makefile b/sysbox-mgr/Makefile +index 8de0a67..d09eb68 100644 +--- a/sysbox-mgr/Makefile ++++ b/sysbox-mgr/Makefile +@@ -23,7 +23,7 @@ SYSLIB_SRC := $(shell find $(SYSLIB_DIR) 2>&1 | grep -E '.*\.(c|h|go|proto)$$') + + COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) + COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),$(COMMIT_NO)-dirty,$(COMMIT_NO)) +-BUILT_AT := $(shell date) ++BUILT_AT := $(shell date --utc --date="@$${SOURCE_DATE_EPOCH:-$$(date +%s)}") + BUILT_BY := $(shell git config user.name) + + LDFLAGS := -X 'main.edition=${EDITION}' -X main.version=${VERSION} \ +diff --git a/sysbox-runc/Makefile b/sysbox-runc/Makefile +index 82b6f7e..036d607 100644 +--- a/sysbox-runc/Makefile ++++ b/sysbox-runc/Makefile +@@ -40,7 +40,7 @@ RUNC := $(NBOX)/sysbox-runc + + COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) + COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),$(COMMIT_NO)-dirty,$(COMMIT_NO)) +-BUILT_AT := $(shell date) ++BUILT_AT := $(shell date --utc --date="@$${SOURCE_DATE_EPOCH:-$$(date +%s)}") + BUILT_BY := $(shell git config user.name) + + SYSIPC_DIR := ../sysbox-ipc @@ -1,7 +1,7 @@ # Maintainer: Joan Bruguera Micó <joanbrugueram@gmail.com> pkgname=sysbox-ce-git pkgver=r1722.b7f3457 -pkgrel=1 +pkgrel=2 pkgdesc="Container runtime with VM-like isolation (run Systemd, Docker, K8s in containers)" url="https://github.com/nestybox/sysbox" arch=('x86_64') @@ -16,8 +16,10 @@ source=("git+https://github.com/nestybox/sysbox.git" "git+https://github.com/nestybox/libseccomp-golang.git" "git+https://github.com/nestybox/sysbox-mgr.git" "git+https://github.com/nestybox/sysbox-pkgr.git" - "git+https://github.com/nestybox/sysbox-runc.git") -sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') + "git+https://github.com/nestybox/sysbox-runc.git" + Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch) +sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' + 5264ed0c448868083a9f1bedc2846d744c9ea90e58f8555c50bbc155008512e5) install=install.sh provides=('sysbox-ce') conflicts=('sysbox-ce') @@ -58,6 +60,8 @@ prepare() { sed -i 's/--go_out=plugins=grpc:./--go_out=. --go-grpc_out=. --go-grpc_opt=require_unimplemented_servers=false/g' \ sysbox/sysbox-ipc/sysboxFsGrpc/sysboxFsProtobuf/Makefile \ sysbox/sysbox-ipc/sysboxMgrGrpc/sysboxMgrProtobuf/Makefile + + patch -d sysbox -Np1 -i "$srcdir/Honor-SOURCE_DATE_EPOCH-for-reproducible-builds.patch" } build() { |