summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2015-02-16 17:15:37 +0100
committerHelge Deller <deller@gmx.de>2015-02-16 17:15:37 +0100
commitdb563d9c49054409959f9befbcb05d28a6d68c20 (patch)
tree176e9a3b3aa5a56ef90489b392ae2dfab2aa7887
parente66c3b09e99c4d8a2d483adbed3445b9c617f3d5 (diff)
downloadpalo-db563d9c49054409959f9befbcb05d28a6d68c20.tar.gz
Make the build reproducible (closes #778437)
-rw-r--r--debian/changelog6
-rw-r--r--ipl/Makefile10
-rw-r--r--ipl/bootloader.h2
-rw-r--r--palo/Makefile10
-rw-r--r--palo/palo.c2
5 files changed, 22 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index e719b4f..27cc738 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+palo (1.96) UNRELEASED; urgency=medium
+
+ * Make the build reproducible (closes #778437)
+
+ -- Helge Deller <deller@gmx.de> Mon, 16 Feb 2015 16:33:31 +0100
+
palo (1.95) unstable; urgency=medium
* Re-add build dependency on lynx, generate README from
diff --git a/ipl/Makefile b/ipl/Makefile
index edac764..b6c476b 100644
--- a/ipl/Makefile
+++ b/ipl/Makefile
@@ -7,8 +7,6 @@ OFILES=$(CFILES:.c=.o)
INCLUDES=bootloader.h common.h load.h
-###############{
-
# cc-cross-prefix
# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
# Return first prefix where a prefix$(CC) is found in PATH.
@@ -31,6 +29,12 @@ CC = ${CROSS_COMPILE}gcc
AR = ar
LD = ld
+ifneq ("$(wildcard /etc/debian_version)","")
+BLDINFO := $(shell echo `dpkg-parsechangelog -l../debian/changelog -SMaintainer` `dpkg-parsechangelog -l../debian/changelog -SDate`)
+else
+BLDINFO := $(shell echo `whoami`@`hostname` `LC_TIME=C date`)
+endif
+
# Source sharing with palo
VPATH=../lib:.
@@ -40,7 +44,7 @@ LDFLAGS = -N --section-start .init=0x60000 -e '$$START$$'
all: iplelf
iplelf: crt0.o ipl.a
- echo "char *bld_info = \"`whoami`@`hostname` `date`\";" > build.c
+ echo "const char bld_info[] = \"$(BLDINFO)\";" > build.c
$(CC) $(CFLAGS) -c -o build.o build.c
-rm -f build.c
$(LD) $(LDFLAGS) -o iplelf crt0.o ipl.a build.o `$(CC) -print-libgcc-file-name`
diff --git a/ipl/bootloader.h b/ipl/bootloader.h
index 4294bae..626ebd3 100644
--- a/ipl/bootloader.h
+++ b/ipl/bootloader.h
@@ -45,7 +45,7 @@ typedef int (*read_t)(int fd, char *buf, unsigned nbytes, unsigned devaddr);
extern int Debug;
-extern char *bld_info;
+extern const char bld_info[];
/* pdc_bootio.c */
int pdc_bootdev_open(void);
diff --git a/palo/Makefile b/palo/Makefile
index 0338dd6..5587cb9 100644
--- a/palo/Makefile
+++ b/palo/Makefile
@@ -7,8 +7,6 @@ OFILES=$(CFILES:.c=.o)
INCLUDES=common.h load.h palo.h
-###############{
-
OS := $(shell uname -s)
CC?=cc
ifeq ($(strip ${OS}),HP-UX)
@@ -17,6 +15,12 @@ else
CFLAGS=-g -O -I../include -I../lib -D_FILE_OFFSET_BITS=64
endif
+ifneq ("$(wildcard /etc/debian_version)","")
+BLDINFO := $(shell echo `dpkg-parsechangelog -l../debian/changelog -SMaintainer` `dpkg-parsechangelog -l../debian/changelog -SDate`)
+else
+BLDINFO := $(shell echo `whoami`@`hostname` `LC_TIME=C date`)
+endif
+
# LDFLAGS=-Wl,-Bstatic
LDFLAGS=
@@ -28,7 +32,7 @@ VPATH=../lib:.
all: palo mkbootable
palo: palo.a
- echo "char *bld_info = \"`whoami`@`hostname` `date`\";" > build.c
+ echo "const char bld_info[] = \"$(BLDINFO)\";" > build.c
$(CC) $(CFLAGS) -c -o build.o build.c
-rm -f build.c
$(CC) $(CFLAGS) $(LDFLAGS) -o palo palo.a build.o
diff --git a/palo/palo.c b/palo/palo.c
index 0638d14..837c3cd 100644
--- a/palo/palo.c
+++ b/palo/palo.c
@@ -714,7 +714,7 @@ main(int argc, char *argv[])
char *medianame = NULL;
char *bootloaderfile = "/usr/share/palo/iplboot";
int init = 0;
- extern char *bld_info;
+ extern const char bld_info[];
const char gargs[] = "f:C:s:b:k:c:r:I:e:U:v?";
char *config_file = "/etc/palo.conf";
char *newargv[MAXARGS];