Commit 36a43399 authored by 3pleX-dev's avatar 3pleX-dev
Browse files

judy: make build reproducible by removing timestamps from manpages and LC_UUID on macos

parent 567f1e2d
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
diff -Naur judy-1.0.5.orig/jhton.c judy-1.0.5/jhton.c
--- judy-1.0.5.orig/tool/jhton.c	2025-03-29 18:37:09
+++ judy-1.0.5/tool/jhton.c	2025-03-29 18:40:47
@@ -674,7 +674,6 @@
 	char *	pagesection;		// such as "3X".
 	char	lcletter;		// manual tab section, such as "j".
 	char *	revision;		// from centered table datum.
-	time_t	currtime;		// for ctime().
 
 // Extract "weird" header values:
 //
@@ -690,11 +689,8 @@
 		  "contain revision information");
 	}
 
-// Emit file header; note, ctime() output already contains a newline:
-
-	(void) time(&currtime);
-	(void) printf(".\\\" Auto-translated to nroff -man from %s by %s at %s",
-		      Filename, gc_myname, ctime(&currtime));
+	(void) printf(".\\\" Auto-translated to nroff -man from %s by %s\n",
+		      Filename, gc_myname);
 
 	(void) printf(".\\\" %s\n",  filerev);
 	(void) printf(".TA %c\n",    lcletter);
+10 −1
Original line number Diff line number Diff line
@@ -17,7 +17,16 @@ stdenv.mkDerivation rec {

  nativeBuildInputs = [ autoreconfHook ];
  depsBuildBuild = [ pkgsBuildBuild.stdenv.cc ];
  patches = [ ./cross.patch ];
  patches = [
    ./cross.patch
    # Fix reproducible timestamps.
    ./fix-source-date.patch
  ];

  # fixes non-determinism between builds on macos
  preConfigure = lib.optional stdenv.hostPlatform.isDarwin ''
    export LDFLAGS="$LDFLAGS -Wl,-no_uuid -Wl,-install_name,@rpath/libJudy.1.dylib"
  '';

  # Disable parallel builds as manpages lack some dependencies:
  #    ../tool/jhton ext/JudyHS_funcs_3.htm | grep -v '^[   ]*$' | sed -e 's/\.C//' > man/man3/JudyHS_funcs