You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
3.6 KiB

From 42b0b82a5dfd15966e8820a99d95c321d685d172 Mon Sep 17 00:00:00 2001
From: Christian Seiler <christian.iscsi@gmail.com>
Date: Sat, 13 Feb 2016 01:05:33 +0100
Subject: [PATCH v2 3/9] Build system: sort object file lists
Hi,
Debian is currently working on making the entire archive build
reproducibly. <https://reproducible-builds.org/> is a good
resource describing the motivation behind this effort.
There was one problem that was found in the open-iscsi package
build system that prevented builds from being reproducible:
the list of object files generated by the wildcard Makefile
function are not in a deterministic order, causing changes in
the output depending on the order in the underlying filesystem.
I've attached a patch against the current git master that
sorts the list of object files within the Makefile, making the
order deterministic and allowing reproducible builds to be
made. See also:
<https://reproducible-builds.org/docs/stable-inputs/>
It would be great if you could apply this patch upstream, so we
don't have to carry it in Debian.
Thanks!
Regards,
Christian
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
From a919d214d10870a54c6a5e383a19a6e82e5f8a54 Mon Sep 17 00:00:00 2001
From: Christian Seiler <christian@iwakd.de>
Date: Sat, 13 Feb 2016 00:56:19 +0100
Subject: [PATCH] Build system: sort object file lists
The object file list generated by the wildcard Makefile function is not
deterministic, because it may change depending on the underlying file
system.
Use the sort function to make the list deterministic in these cases, to
be able to build open-iscsi deterministically. See
<https://reproducible-builds.org/>
for further details.
Signed-off-by: Christian Seiler <christian@iwakd.de>
---
usr/Makefile | 4 ++--
utils/fwparam_ibft/Makefile | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr/Makefile b/usr/Makefile
index 5ac0726..277ac6a 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -34,7 +34,7 @@ CFLAGS += $(WARNFLAGS) -I../include -I. -D$(OSNAME) $(IPC_CFLAGS)
PROGRAMS = iscsid iscsiadm iscsistart
# libc compat files
-SYSDEPS_SRCS = $(wildcard ../utils/sysdeps/*.o)
+SYSDEPS_SRCS = $(sort $(wildcard ../utils/sysdeps/*.o))
# sources shared between iscsid, iscsiadm and iscsistart
ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \
sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o \
@@ -45,7 +45,7 @@ ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \
INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o kern_err_table.o
# fw boot files
-FW_BOOT_SRCS = $(wildcard ../utils/fwparam_ibft/*.o)
+FW_BOOT_SRCS = $(sort $(wildcard ../utils/fwparam_ibft/*.o))
# core discovery files
DISCOVERY_SRCS = $(FW_BOOT_SRCS) strings.o discovery.o
diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
index 773d8eb..ade8a56 100644
--- a/utils/fwparam_ibft/Makefile
+++ b/utils/fwparam_ibft/Makefile
@@ -21,7 +21,7 @@
# "Prasanna Mumbai" <mumbai.prasanna@gmail.com>
#
-SYSDEPS_OBJS = $(wildcard ../sysdeps/*.o)
+SYSDEPS_OBJS = $(sort $(wildcard ../sysdeps/*.o))
OBJS := fw_entry.o fwparam_sysfs.o $(SYSDEPS_OBJS) ../../usr/iscsi_net_util.o
OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o
CLEANFILES = $(OBJS) *.output *~
--
2.5.5