Bug#818230: aircrack-ng: please make the build reproducible

2016-12-25 Thread Samuel Henrique
Control: tags -1 + pending
Control: forwarded -1 https://github.com/aircrack-ng/aircrack-ng/pull/91

Fix commited and sent upstream, thanks a lot Reiner

Samuel Henrique 


Bug#818230: aircrack-ng: please make the build reproducible

2016-12-24 Thread Samuel Henrique
Control: tags 818230 - patch

Hi Reiner,

Thanks a lot for the work, but aircrack has made considerable amount of
changes on its build system since 1.2-0~beta3-4, i understand that rc4
still doesn't builds reproducibly.

Could you please update the patch to rc4? I would be infinitely grateful :)

Also, i believe you can also send this upstream, but if you don't, i can do
that for you.

Samuel Henrique 


Bug#818230: aircrack-ng: please make the build reproducible

2016-03-14 Thread Reiner Herrmann
Source: aircrack-ng
Version: 1:1.2-0~beta3-4
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that aircrack-ng could not be built reproducibly.
The command linking all object files together also contains an assembly
file. gcc compiles it into a temporary object file /tmp/cc??.o.
This path is embedded into debug information, which causes also a
difference in the build id of the aircrack-ng binary.

The attached patch fixes this by letting make compile the assembly file
before all object files are linked.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/009-reproducible_build.diff b/debian/patches/009-reproducible_build.diff
new file mode 100644
index 000..cd474c1
--- /dev/null
+++ b/debian/patches/009-reproducible_build.diff
@@ -0,0 +1,34 @@
+Author: Reiner Herrmann 
+Description: Let make build the sha1-sse2.o file
+ When the assembly file is part of the linking command, gcc
+ compiles it in a random temporary location, which makes the
+ build unreproducible.
+
+--- a/src/Makefile
 b/src/Makefile
+@@ -4,6 +4,7 @@
+ TEST_DIR	= $(AC_ROOT)/test
+ 
+ CFLAGS		+= -Iinclude
++ASFLAGS		+= $(CFLAGS)
+ 
+ iCC = $(shell find /opt/intel/cc/*/bin/icc)
+ iCFLAGS = -w -mcpu=pentiumpro -march=pentiumpro $(COMMON_CFLAGS)
+@@ -47,7 +48,7 @@
+ SRC_PTW		= aircrack-ptw-lib.c
+ SRC_AC		= aircrack-ng.c crypto.c common.c $(SRC_PTW)
+ OBJS_PTW	= aircrack-ptw-lib.o
+-OBJS_AC		= aircrack-ng.o crypto.o common.o uniqueiv.o $(OBJS_PTW)
++OBJS_AC		= aircrack-ng.o crypto.o common.o uniqueiv.o sha1-sse2.o $(OBJS_PTW)
+ ASM_AC		= sha1-sse2.S
+ 
+ OBJS_AD		= airdecap-ng.o crypto.o common.o
+@@ -129,7 +130,7 @@
+ 	aircrack-ng-opt-prof -lpthread $(LIBSQL)
+ 
+ aircrack-ng$(EXE): $(OBJS_AC)
+-	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL)
++	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL)
+ 
+ airdecap-ng$(EXE): $(OBJS_AD)
+ 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL)
diff --git a/debian/patches/series b/debian/patches/series
index 2b41baa..709236e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 006-CVE-2014-8323.diff
 007-CVE-2014-8324.diff
 008-Airodump_fix-ieee-oui-path.diff
+009-reproducible_build.diff


signature.asc
Description: PGP signature