heads/patches/openssl-3.0.8.patch
Thierry Laurion d7915e1639
OpenSSL (libcrypto): patch so that crypto/buildinfo.h generated by perl script contains reproducible date and fake compiler_flags
hardcode VERSION='reproducible_build' into generated configure script to get rid of generate random git abbrev 8/12 chars (could not find source)
 patches/openssl-3.0.8.patch: clean up

tpm2-tools/tpm2-tss:
 hack configure scripts to not contain hardcoded libs and other rpath related strings, using sed instead of patching configure script like cryptsetup2 patch
  Will be clened up in other commits. Leaving here as trace for autotools sed patching for reproducible builds.

CircleCI: change working dir from project->heads so that CircleCI and local builds are from heads directory, helping reproducible builds

TODO: change other patches a well and generalize to gpg toolstack, removing patches that are a maintainership burden.

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
2024-04-03 13:48:47 -04:00

36 lines
858 B
Diff

--- ./util/mkbuildinf.pl.orig 2023-02-07 08:43:33.000000000 -0500
+++ ./util/mkbuildinf.pl 2024-03-27 14:36:49.974651246 -0400
@@ -12,7 +12,7 @@
my ($cflags, $platform) = @ARGV;
$cflags = "compiler: $cflags";
-my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC";
+my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || '0') . " UTC";
print <<"END_OUTPUT";
/*
@@ -36,21 +36,7 @@
* literal
*/
static const char compiler_flags[] = {
-END_OUTPUT
-
-my $ctr = 0;
-foreach my $c (split //, $cflags) {
- $c =~ s|([\\'])|\\$1|;
- # Max 16 characters per line
- if (($ctr++ % 16) == 0) {
- if ($ctr != 1) {
- print "\n";
- }
- print " ";
- }
- print "'$c',";
-}
-print <<"END_OUTPUT";
-'\\0'
+ 'r','e','p','r','o','d','u','c','i','b','l','e',' ','b','u','i',
+ 'l','d','\\0'
};
END_OUTPUT