[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
Mon May 25 10:05:13 UTC 2015
Mon May 25 09:06:45 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
Mon May 25 09:06:45 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-25 10:05:12.899840725 +0000
+++ new-ghc/changelog 2015-05-25 10:05:12.923841322 +0000
@@ -1,6 +1,8 @@
ghc (7.8.4-7) UNRELEASED; urgency=medium
* Remove useless *.haddock.t files (upstream bug 10410)
+ * A lucky guess at making GHC build reproducible, by not putting the process
+ id in temporary filenames.
-- Joachim Breitner <nomeata at debian.org> Mon, 25 May 2015 11:03:48 +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-25 10:05:12.915841123 +0000
@@ -0,0 +1,20 @@
+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.8.4/compiler/main/SysTools.lhs
+===================================================================
+--- ghc-7.8.4.orig/compiler/main/SysTools.lhs 2015-05-25 11:05:18.028939756 +0200
++++ ghc-7.8.4/compiler/main/SysTools.lhs 2015-05-25 11:05:18.028939756 +0200
+@@ -1011,8 +1011,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
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series 2015-05-25 10:05:12.899840725 +0000
+++ new-ghc/patches/series 2015-05-25 10:05:12.919841223 +0000
@@ -10,3 +10,4 @@
ghc-7.8.4-3-aarch64.patch
PPC-relocations.patch
buildpath-abi-stability.patch
+reproducible-tmp-names
More information about the Pkg-haskell-commits
mailing list