[Pkg-haskell-commits] darcs: ghc: A lucky guess at making GHC build reproducible, by not putting the process id in temporary filenames.

Joachim Breitner mail at joachim-breitner.de
Sun May 24 09:50:52 UTC 2015


Sun May 24 08:47:02 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * A lucky guess at making GHC build reproducible, by not putting the process id in temporary filenames.

    M ./changelog +2
    A ./patches/reproducible-tmp-names
    M ./patches/series +1

Sun May 24 08:47:02 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * A lucky guess at making GHC build reproducible, by not putting the process id in temporary filenames.
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog	2015-05-24 09:50:51.832186454 +0000
+++ new-ghc/changelog	2015-05-24 09:50:51.860187140 +0000
@@ -1,6 +1,8 @@
 ghc (7.10.1-5) UNRELEASED; urgency=medium
 
   * Merge from unstable (Closes: #785282, #785194 )
+  * A lucky guess at making GHC build reproducible, by not putting the process
+    id in temporary filenames.
 
  -- Joachim Breitner <nomeata at debian.org>  Sun, 17 May 2015 20:34:08 +0200
 
diff -rN -u old-ghc/patches/reproducible-tmp-names new-ghc/patches/reproducible-tmp-names
--- old-ghc/patches/reproducible-tmp-names	1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/patches/reproducible-tmp-names	2015-05-24 09:50:51.856187044 +0000
@@ -0,0 +1,30 @@
+This is an attempt to make GHC build reproducible. The name of .c files may end
+up in the resulting binary (in the debug section), but not the directory.
+
+Since the temporary directory already contains the process id, there is no need
+to put it into the filename as well.
+
+Index: ghc-7.10.1/compiler/main/SysTools.hs
+===================================================================
+--- ghc-7.10.1.orig/compiler/main/SysTools.hs	2015-03-21 23:30:07.000000000 +0100
++++ ghc-7.10.1/compiler/main/SysTools.hs	2015-05-24 10:45:40.537513384 +0200
+@@ -1072,8 +1072,7 @@
+ newTempName :: DynFlags -> Suffix -> IO FilePath
+ newTempName dflags extn
+   = do d <- getTempDir dflags
+-       x <- getProcessID
+-       findTempName (d </> "ghc" ++ show x ++ "_")
++       findTempName (d </> "ghc_")
+   where
+     findTempName :: FilePath -> IO FilePath
+     findTempName prefix
+@@ -1088,8 +1087,7 @@
+ newTempLibName :: DynFlags -> Suffix -> IO (FilePath, FilePath, String)
+ newTempLibName dflags extn
+   = do d <- getTempDir dflags
+-       x <- getProcessID
+-       findTempName d ("ghc" ++ show x ++ "_")
++       findTempName d ("ghc_")
+   where
+     findTempName :: FilePath -> String -> IO (FilePath, FilePath, String)
+     findTempName dir prefix
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2015-05-24 09:50:51.832186454 +0000
+++ new-ghc/patches/series	2015-05-24 09:50:51.856187044 +0000
@@ -6,3 +6,4 @@
 ARM-barriers.patch
 PPC-relocations.patch
 buildpath-abi-stability.patch
+reproducible-tmp-names




More information about the Pkg-haskell-commits mailing list