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
This commit is contained in:
Ondřej Súkup 2018-11-07 10:28:43 +00:00 committed by Git OBS Bridge
parent cd6c352512
commit c593f930aa
3 changed files with 9 additions and 47 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 7 10:00:46 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
- dont require memory-constraints on ppc archs
- dropped reproducible-tmp-names.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 6 13:56:27 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com> Tue Nov 6 13:56:27 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -53,7 +53,10 @@ BuildRequires: libffi48-devel
BuildRequires: libffi-devel BuildRequires: libffi-devel
%endif %endif
BuildRequires: libtool BuildRequires: libtool
# not resolvable on ppc
%ifarch %{arm} %{ix86} x86_64
BuildRequires: memory-constraints BuildRequires: memory-constraints
%endif
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: xz BuildRequires: xz
@ -96,8 +99,6 @@ Patch35: ghc-pie.patch
Patch100: ghc-8.0.2-Cabal-dynlibdir.patch Patch100: ghc-8.0.2-Cabal-dynlibdir.patch
# PATCH-FIX-UPSTREAM buildpath-abi-stability.patch -- debian patch for more stable abi-1 # PATCH-FIX-UPSTREAM buildpath-abi-stability.patch -- debian patch for more stable abi-1
Patch110: buildpath-abi-stability.patch 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 %description
Haskell is the standard purely functional programming language; the 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 %patch35 -p1
%patch100 -p1 %patch100 -p1
%patch110 -p1 %patch110 -p1
#%%patch111 -p1
# Probably fixed upstream
%build %build
# patch 1 modifies build system, we need to recreate configure # patch 1 modifies build system, we need to recreate configure

View File

@ -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]