Hello community, here is the log from the commit of package ghc for openSUSE:Factory checked in at 2017-05-31 12:19:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc (Old) and /work/SRC/openSUSE:Factory/.ghc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc" Wed May 31 12:19:10 2017 rev:55 rq:498960 version:8.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc/ghc.changes 2017-05-09 18:06:27.136893220 +0200 +++ /work/SRC/openSUSE:Factory/.ghc.new/ghc.changes 2017-05-31 12:20:01.681979381 +0200 @@ -1,0 +2,8 @@ +Sun May 28 12:52:06 UTC 2017 - [email protected] + +- make compactible with new upstream macros +- added patches for more stable abi: +* buildpath-abi-stability.patch +* reproducible-tmp-names.patch + +------------------------------------------------------------------- New: ---- buildpath-abi-stability.patch reproducible-tmp-names.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc.spec ++++++ --- /var/tmp/diff_new_pack.HU5S9W/_old 2017-05-31 12:20:02.825817911 +0200 +++ /var/tmp/diff_new_pack.HU5S9W/_new 2017-05-31 12:20:02.833816782 +0200 @@ -78,6 +78,10 @@ Patch31: ghc-pie.patch # PATCH-FIX-OPENSUSE ghc-8.0.2-Cabal-dynlibdir.patch -- Fix shared library directory location. Patch100: ghc-8.0.2-Cabal-dynlibdir.patch +# PATCH-FIX-UPSTREAM buildpath-abi-stability.patch -- debian patch for more stable abi-1 +Patch110: buildpath-abi-stability.patch +# PATCH-FIX-UPSTREAM reproducible-tmp-names.patch -- debian patch for more stable abi-2 +Patch111: reproducible-tmp-names.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -119,30 +123,30 @@ %global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release} %if %{defined ghclibdir} -%ghc_lib_subpackage Cabal-1.24.2.0 -%ghc_lib_subpackage array-0.5.1.1 -%ghc_lib_subpackage -c gmp-devel,libffi-devel,libdw-devel,libelf-devel base-4.9.1.0 -%ghc_lib_subpackage binary-0.8.3.0 -%ghc_lib_subpackage bytestring-0.10.8.1 -%ghc_lib_subpackage containers-0.5.7.1 -%ghc_lib_subpackage deepseq-1.4.2.0 -%ghc_lib_subpackage directory-1.3.0.0 -%ghc_lib_subpackage filepath-1.4.1.1 -%ghc_lib_subpackage -x ghc-%{ghc_version_override} -%ghc_lib_subpackage ghc-boot-%{ghc_version_override} -%ghc_lib_subpackage ghc-boot-th-%{ghc_version_override} -%ghc_lib_subpackage -x ghci-%{ghc_version_override} -%ghc_lib_subpackage haskeline-0.7.3.0 -%ghc_lib_subpackage hoopl-3.10.2.1 -%ghc_lib_subpackage hpc-0.6.0.3 -%ghc_lib_subpackage pretty-1.1.3.3 -%ghc_lib_subpackage process-1.4.3.0 -%ghc_lib_subpackage template-haskell-2.11.1.0 -%ghc_lib_subpackage -c ncurses-devel terminfo-0.4.0.2 -%ghc_lib_subpackage time-1.6.0.1 -%ghc_lib_subpackage transformers-0.5.2.0 -%ghc_lib_subpackage unix-2.7.2.1 -%ghc_lib_subpackage xhtml-3000.2.1 +%ghc_lib_subpackage -d Cabal-1.24.2.0 +%ghc_lib_subpackage -d array-0.5.1.1 +%ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel base-4.9.1.0 +%ghc_lib_subpackage -d binary-0.8.3.0 +%ghc_lib_subpackage -d bytestring-0.10.8.1 +%ghc_lib_subpackage -d containers-0.5.7.1 +%ghc_lib_subpackage -d deepseq-1.4.2.0 +%ghc_lib_subpackage -d directory-1.3.0.0 +%ghc_lib_subpackage -d filepath-1.4.1.1 +%ghc_lib_subpackage -d -x ghc-%{ghc_version_override} +%ghc_lib_subpackage -d ghc-boot-%{ghc_version_override} +%ghc_lib_subpackage -d ghc-boot-th-%{ghc_version_override} +%ghc_lib_subpackage -d -x ghci-%{ghc_version_override} +%ghc_lib_subpackage -d haskeline-0.7.3.0 +%ghc_lib_subpackage -d hoopl-3.10.2.1 +%ghc_lib_subpackage -d hpc-0.6.0.3 +%ghc_lib_subpackage -d pretty-1.1.3.3 +%ghc_lib_subpackage -d process-1.4.3.0 +%ghc_lib_subpackage -d template-haskell-2.11.1.0 +%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.0.2 +%ghc_lib_subpackage -d time-1.6.0.1 +%ghc_lib_subpackage -d transformers-0.5.2.0 +%ghc_lib_subpackage -d unix-2.7.2.1 +%ghc_lib_subpackage -d xhtml-3000.2.1 %endif %global version %{ghc_version_override} @@ -168,6 +172,8 @@ %patch30 -p1 %patch31 -p1 %patch100 -p1 +%patch110 -p1 +%patch111 -p1 %build # Check if bootstrap is required, i.e. version is different from ghc's version ++++++ buildpath-abi-stability.patch ++++++ Index: ghc-7.10.1/compiler/iface/MkIface.hs =================================================================== --- ghc-7.10.1.orig/compiler/iface/MkIface.hs 2015-05-17 20:34:02.808643844 +0200 +++ ghc-7.10.1/compiler/iface/MkIface.hs 2015-05-17 20:34:02.804643799 +0200 @@ -611,7 +611,7 @@ iface_hash <- computeFingerprint putNameLiterally (mod_hash, ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache - mi_usages iface0, + usages, sorted_deps, mi_hpc iface0) @@ -644,6 +644,9 @@ (non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0) fix_fn = mi_fix_fn iface0 ann_fn = mkIfaceAnnCache (mi_anns iface0) + -- Do not allow filenames to affect the interface + usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ] + getOrphanHashes :: HscEnv -> [Module] -> IO [Fingerprint] getOrphanHashes hsc_env mods = do ++++++ reproducible-tmp-names.patch ++++++ 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-8.0.2/compiler/main/SysTools.hs =================================================================== --- ghc-8.0.2.orig/compiler/main/SysTools.hs +++ ghc-8.0.2/compiler/main/SysTools.hs @@ -65,6 +65,7 @@ import Util import DynFlags import Exception +import Fingerprint import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion) @@ -1145,8 +1146,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 @@ -1562,6 +1563,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]
