[Pkg-haskell-commits] darcs: ghc: Merge from unstable

Joachim Breitner mail at joachim-breitner.de
Mon Jun 15 08:28:55 UTC 2015


Mon Jun 15 07:41:04 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Merge from unstable

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

Mon Jun 15 07:41:04 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Merge from unstable
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog	2015-06-15 08:28:55.365671581 +0000
+++ new-ghc/changelog	2015-06-15 08:28:55.369671579 +0000
@@ -3,6 +3,7 @@
   * Calculate haddock interface version using the built haddock, not the
     installed (Thanks to David Fox for noticing).
   * New upstream release randidate (7.10.2-rc1)
+  * Merge from unstable
 
  -- Joachim Breitner <nomeata at debian.org>  Mon, 15 Jun 2015 09:26:23 +0200
 
@@ -45,6 +46,20 @@
 
  -- Joachim Breitner <nomeata at debian.org>  Tue, 12 May 2015 12:41:40 +0200
 
+ghc (7.8.4-9) unstable; urgency=medium
+
+  * Another stab at making GHC more reproducible: Use a hash of the command
+    line instead of the pid when calculating a "random" directory name.
+
+ -- Joachim Breitner <nomeata at debian.org>  Sun, 07 Jun 2015 16:21:38 +0200
+
+ghc (7.8.4-8) unstable; urgency=medium
+
+  * debian/patches/stable-specialization-rule-names: Root out another cause of
+    binary ABI instability.
+
+ -- Joachim Breitner <nomeata at debian.org>  Mon, 25 May 2015 19:28:56 +0200
+
 ghc (7.8.4-7) unstable; urgency=medium
 
   * Remove useless *.haddock.t files (upstream bug 10410)
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-06-15 08:28:55.381671577 +0000
@@ -0,0 +1,43 @@
+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.
+
+Instead of using the process id, create a hash from the command line arguments,
+and assume that is going to be unique.
+
+Index: ghc-7.10/compiler/main/SysTools.hs
+===================================================================
+--- ghc-7.10.orig/compiler/main/SysTools.hs	2015-06-15 09:38:53.366538998 +0200
++++ ghc-7.10/compiler/main/SysTools.hs	2015-06-15 09:39:00.778652716 +0200
+@@ -61,6 +61,7 @@
+ import Util
+ import DynFlags
+ import Exception
++import Fingerprint
+ 
+ import Data.IORef
+ import Control.Monad
+@@ -1119,8 +1120,8 @@
+     mapping <- readIORef dir_ref
+     case Map.lookup tmp_dir mapping of
+         Nothing -> do
+-            pid <- getProcessID
+-            let prefix = tmp_dir </> "ghc" ++ show pid ++ "_"
++            pid <- getStableProcessID
++            let prefix = tmp_dir </> "ghc" ++ pid ++ "_"
+             mask_ $ mkTempDir prefix
+         Just dir -> return dir
+   where
+@@ -1446,6 +1447,13 @@
+ getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
+ #endif
+ 
++-- Debian-specific hack to get reproducible output, by not using the "random"
++-- pid, but rather something determinisic
++getStableProcessID :: IO String
++getStableProcessID = do
++    args <- getArgs
++    return $ take 4 $ show $ fingerprintString $ unwords args
++
+ -- Divvy up text stream into lines, taking platform dependent
+ -- line termination into account.
+ linesPlatform :: String -> [String]
diff -rN -u old-ghc/patches/series new-ghc/patches/series
--- old-ghc/patches/series	2015-06-15 08:28:55.365671581 +0000
+++ new-ghc/patches/series	2015-06-15 08:28:55.381671577 +0000
@@ -5,3 +5,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