From c593f930aa44cd4998a621cab70c32fb87d9bc680a7bb3dc82bfd456e48cbc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 7 Nov 2018 10:28:43 +0000 Subject: [PATCH] Accepting request 646916 from devel:languages:haskell:ghc-8.6.x - dont require memory-constraints on ppc archs - dropped reproducible-tmp-names.patch OBS-URL: https://build.opensuse.org/request/show/646916 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=286 --- ghc.changes | 6 +++++ ghc.spec | 7 +++--- reproducible-tmp-names.patch | 43 ------------------------------------ 3 files changed, 9 insertions(+), 47 deletions(-) delete mode 100644 reproducible-tmp-names.patch diff --git a/ghc.changes b/ghc.changes index 447c799..62dd6fb 100644 --- a/ghc.changes +++ b/ghc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 7 10:00:46 UTC 2018 - Ondřej Súkup + +- dont require memory-constraints on ppc archs +- dropped reproducible-tmp-names.patch + ------------------------------------------------------------------- Tue Nov 6 13:56:27 UTC 2018 - Ondřej Súkup diff --git a/ghc.spec b/ghc.spec index afdbc45..3532e34 100644 --- a/ghc.spec +++ b/ghc.spec @@ -53,7 +53,10 @@ BuildRequires: libffi48-devel BuildRequires: libffi-devel %endif BuildRequires: libtool +# not resolvable on ppc +%ifarch %{arm} %{ix86} x86_64 BuildRequires: memory-constraints +%endif BuildRequires: ncurses-devel BuildRequires: pkg-config BuildRequires: xz @@ -96,8 +99,6 @@ Patch35: ghc-pie.patch 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 %description Haskell is the standard purely functional programming language; the @@ -209,8 +210,6 @@ except the ghc library, which is installed by the toplevel ghc metapackage. %patch35 -p1 %patch100 -p1 %patch110 -p1 -#%%patch111 -p1 -# Probably fixed upstream %build # patch 1 modifies build system, we need to recreate configure diff --git a/reproducible-tmp-names.patch b/reproducible-tmp-names.patch deleted file mode 100644 index 141e8cf..0000000 --- a/reproducible-tmp-names.patch +++ /dev/null @@ -1,43 +0,0 @@ -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.2.1.20170929/compiler/main/SysTools.hs -=================================================================== ---- ghc-8.2.1.20170929.orig/compiler/main/SysTools.hs -+++ ghc-8.2.1.20170929/compiler/main/SysTools.hs -@@ -68,6 +68,7 @@ import Platform - import Util - import DynFlags - import Exception -+import Fingerprint - - import LlvmCodeGen.Base (llvmVersionStr, supportedLlvmVersion) - -@@ -1121,8 +1122,8 @@ getTempDir dflags = do - 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 -@@ -1558,6 +1559,13 @@ getProcessID :: IO Int - 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]