diff options
| author | Luca Boccassi <bluca@debian.org> | 2019-02-15 21:42:10 +0000 |
|---|---|---|
| committer | Javier Martinez Canillas <javier@dowhile0.org> | 2021-02-16 09:12:48 +0100 |
| commit | 8537e0555c828a27fda7b4e1f9191ab94cc827e1 (patch) | |
| tree | 7d0e4355a24e8e9cfc123599c30473d6a408ab21 | |
| parent | 44c5aac5392b806291c3b82939da28a0fbf8e336 (diff) | |
| download | efi-boot-shim-8537e0555c828a27fda7b4e1f9191ab94cc827e1.tar.gz efi-boot-shim-8537e0555c828a27fda7b4e1f9191ab94cc827e1.zip | |
Makefile: use fixed build host if SOURCE_DATE_EPOCH is defined
If SOURCE_DATE_EPOCH is defined then we can be reasonably sure the
user wants the build to be fully reproducible, so use a fixed string.
In case of a cross build, using uname -s -m -p -i o will still report
the host's kernel architecture, which will trip some CIs like
Debian's.
This is a backport from devel of:
commit 11fd3197d21f94b491ccfc1da6d38b14060e62d7
Author: Luca Boccassi <bluca@debian.org>
Date: Fri Feb 15 21:42:10 2019 +0000
Makefile: use fixed build host if SOURCE_DATE_EPOCH is defined
If SOURCE_DATE_EPOCH is defined then we can be reasonably sure the
user wants the build to be fully reproducible, so use a fixed string.
In case of a cross build, using uname -s -m -p -i o will still report
the host's kernel architecture, which will trip some CIs like
Debian's.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Peter Jones <pjones@redhat.com>
| -rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -47,6 +47,12 @@ ifneq ($(origin ENABLE_HTTPBOOT), undefined) SOURCES += httpboot.c include/httpboot.h endif +ifeq ($(SOURCE_DATE_EPOCH),) + UNAME=$(shell uname -s -m -p -i -o) +else + UNAME=buildhost +endif + SOURCES = $(foreach source,$(ORIG_SOURCES),$(TOPDIR)/$(source)) version.c MOK_SOURCES = $(foreach source,$(ORIG_MOK_SOURCES),$(TOPDIR)/$(source)) FALLBACK_SRCS = $(foreach source,$(ORIG_FALLBACK_SRCS),$(TOPDIR)/$(source)) @@ -67,7 +73,7 @@ shim_cert.h: shim.cer version.c : $(TOPDIR)/version.c.in sed -e "s,@@VERSION@@,$(VERSION)," \ - -e "s,@@UNAME@@,$(shell uname -s -m -p -i -o)," \ + -e "s,@@UNAME@@,$(UNAME)," \ -e "s,@@COMMIT@@,$(COMMIT_ID)," \ < $< > $@ |
