On Sat, May 02, 2020 at 05:16:07PM +0200, Geert Stappers wrote: > On Sat, May 02, 2020 at 09:34:34AM +0200, Geert Stappers wrote: > > On Fri, May 01, 2020 at 06:36:05PM -0400, Neil Roza wrote: > > > > > > Please find the attached a patch that makes the generation > > > of most artifacts deterministic. > > > > > > > I also like reproducible builds. I'm happy to help find consensus. > > > > > > > > Neil Roza > > > > > > That I missed something is concern for later ...
Commit message. Can be achieved in three steps * git add * git commit * git format-patch > > > index 1dd14794..93c598d2 100644 > > > --- a/src/Makefile.housekeeping > > > +++ b/src/Makefile.housekeeping > > > > > > Oops, hefty changes. I think I can make the proposed changes less > > intrusive. > > Find attached two patches (a third is work in progress) > Find attached two more patches. Groeten Geert Stappers P.S. Some happy git flow git checkout master git pull git checkout -b myfeaturebranch # the actual development git add files_worked_on git commit # further development git add files_worked_on git commit git format-patch master # now you have patches that can be shared / distributed / emailed At recieving end git checkout master git checkout -b reviewbranch git am *.patch # actual reviewing git checkout master git rebase reviewbranch At transmitting end git checkout master git branch -d myfeaturebranch At recieving end git branch -d reviewbranch Please note this the happy flow, reality is more challenging :-) -- Silence is hard to parse
>From 9ee86d128000d921c927c30406f6b4f9a6d77d66 Mon Sep 17 00:00:00 2001 From: Geert Stappers <stapp...@stappers.nl> Date: Sat, 2 May 2020 19:00:24 +0200 Subject: [PATCH 1/2] src/Makefile.housekeeping: minor tweak The sole purpose of this meaningless looking change is to make it easier to check changes in the next change. build_command_id is changed into build_command_id parameter The current build_command_id ignores that parameter, but we will be ready for build_command_ids that take parameters. --- src/Makefile.housekeeping | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 59053d52..7ed22314 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -1204,7 +1204,7 @@ $(BIN)/version.%.o : core/version.c $(MAKEDEPS) $(GIT_INDEX) $(BIN)/%.tmp : $(BIN)/version.%.o $(BLIB) $(MAKEDEPS) $(LDSCRIPT) $(QM)$(ECHO) " [LD] $@" $(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $< $(BLIB) -o $@ \ - --defsym _build_id=`$(BUILD_ID_CMD)` \ + --defsym _build_id=`$(BUILD_ID_CMD) $@` \ --defsym _build_timestamp=$(BUILD_TIMESTAMP) \ -Map $(BIN)/$*.tmp.map $(Q)$(OBJDUMP) -ht $@ | $(PERL) $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map -- 2.20.1
>From 2f6581ad163d26f215f3dde2ad9baee72556233d Mon Sep 17 00:00:00 2001 From: Geert Stappers <stapp...@stappers.nl> Date: Sat, 2 May 2020 19:52:44 +0200 Subject: [PATCH 2/2] Reproducible builds Build id part Added comment why BUILD_ID_CMD was added. ( git log -p 58f6e5536...58f6e5536^1 ) The actual addition is inspired on $(BIN)/%.tmp : $(BIN)/version.%.o $(BLIB) $(MAKEDEPS) $(LDSCRIPT) $(QM)$(ECHO) " [LD] $@" $(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $< $(BLIB) -o $@ \ - --defsym _build_id=`$(BUILD_ID_CMD)` \ + --defsym _build_id="0x$$(echo $@ | md5sum | head -c8)" \ --defsym _build_timestamp=$(BUILD_TIMESTAMP) \ -Map $(BIN)/$*.tmp.map $(Q)$(OBJDUMP) -ht $@ | $(PERL) $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map from Neil Roza <n...@rtr.ai> --- src/Makefile.housekeeping | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 7ed22314..abafa7b9 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -1183,8 +1183,11 @@ BUILD_TIMESTAMP := $(SOURCE_DATE_EPOCH) # Command to generate build ID. Must be unique for each $(BIN)/%.tmp, # even within the same build run. +# To identify identical iPXE ROMs when multiple ROMs are present in a system. # BUILD_ID_CMD := perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );' +BUILD_ID_CMD := perl -e 'use Digest::MD5 md5_hex; \ + print "0x" . substr(md5_hex(@ARGV[0]), 0, 8);' # Build version # -- 2.20.1
_______________________________________________ ipxe-devel mailing list ipxe-devel@lists.ipxe.org https://lists.ipxe.org/mailman/listinfo/ipxe-devel