rebase to 8.8.3 from ghc:8.8
This commit is contained in:
parent
915a022b3c
commit
a07f9ed8a0
@ -1,92 +0,0 @@
|
|||||||
From 3e0812fe9d3f4712638a1c4c49bf2b2a7dc4311b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ben Gamari <ben@smart-cactus.org>
|
|
||||||
Date: Mon, 1 Jul 2019 11:03:33 -0400
|
|
||||||
Subject: [PATCH] Call initgroups before setuid
|
|
||||||
|
|
||||||
Previously we would fail to call initgroups before setuid'ing. This
|
|
||||||
meant that our groups we not be reset to reflect those our new user
|
|
||||||
belongs to. Fix this.
|
|
||||||
---
|
|
||||||
cbits/runProcess.c | 32 +++++++++++++++++++++++++++++---
|
|
||||||
include/runProcess.h | 4 ++++
|
|
||||||
2 files changed, 33 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cbits/runProcess.c b/cbits/runProcess.c
|
|
||||||
index 10794bc..84d5fd4 100644
|
|
||||||
--- a/cbits/runProcess.c
|
|
||||||
+++ b/cbits/runProcess.c
|
|
||||||
@@ -33,6 +33,10 @@ static long max_fd = 0;
|
|
||||||
extern void blockUserSignals(void);
|
|
||||||
extern void unblockUserSignals(void);
|
|
||||||
|
|
||||||
+// These are arbitrarily chosen -- JP
|
|
||||||
+#define forkSetgidFailed 124
|
|
||||||
+#define forkSetuidFailed 125
|
|
||||||
+
|
|
||||||
// See #1593. The convention for the exit code when
|
|
||||||
// exec() fails seems to be 127 (gleened from C's
|
|
||||||
// system()), but there's no equivalent convention for
|
|
||||||
@@ -40,9 +44,8 @@ extern void unblockUserSignals(void);
|
|
||||||
#define forkChdirFailed 126
|
|
||||||
#define forkExecFailed 127
|
|
||||||
|
|
||||||
-// These are arbitrarily chosen -- JP
|
|
||||||
-#define forkSetgidFailed 124
|
|
||||||
-#define forkSetuidFailed 125
|
|
||||||
+#define forkGetpwuidFailed 128
|
|
||||||
+#define forkInitgroupsFailed 129
|
|
||||||
|
|
||||||
__attribute__((__noreturn__))
|
|
||||||
static void childFailed(int pipe, int failCode) {
|
|
||||||
@@ -182,6 +185,23 @@ runInteractiveProcess (char *const args[],
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( childUser) {
|
|
||||||
+ // Using setuid properly first requires that we initgroups.
|
|
||||||
+ // However, to do this we must know the username of the user we are
|
|
||||||
+ // switching to.
|
|
||||||
+ struct passwd pw;
|
|
||||||
+ struct passwd *res = NULL;
|
|
||||||
+ int buf_len = sysconf(_SC_GETPW_R_SIZE_MAX);
|
|
||||||
+ char *buf = malloc(buf_len);
|
|
||||||
+ gid_t suppl_gid = childGroup ? *childGroup : getgid();
|
|
||||||
+ if ( getpwuid_r(*childUser, &pw, buf, buf_len, &res) != 0) {
|
|
||||||
+ childFailed(forkCommunicationFds[1], forkGetpwuidFailed);
|
|
||||||
+ }
|
|
||||||
+ if ( res == NULL ) {
|
|
||||||
+ childFailed(forkCommunicationFds[1], forkGetpwuidFailed);
|
|
||||||
+ }
|
|
||||||
+ if ( initgroups(res->pw_name, suppl_gid) != 0) {
|
|
||||||
+ childFailed(forkCommunicationFds[1], forkInitgroupsFailed);
|
|
||||||
+ }
|
|
||||||
if ( setuid( *childUser) != 0) {
|
|
||||||
// ERROR
|
|
||||||
childFailed(forkCommunicationFds[1], forkSetuidFailed);
|
|
||||||
@@ -330,6 +350,12 @@ runInteractiveProcess (char *const args[],
|
|
||||||
case forkSetuidFailed:
|
|
||||||
*failed_doing = "runInteractiveProcess: setuid";
|
|
||||||
break;
|
|
||||||
+ case forkGetpwuidFailed:
|
|
||||||
+ *failed_doing = "runInteractiveProcess: getpwuid";
|
|
||||||
+ break;
|
|
||||||
+ case forkInitgroupsFailed:
|
|
||||||
+ *failed_doing = "runInteractiveProcess: initgroups";
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
*failed_doing = "runInteractiveProcess: unknown";
|
|
||||||
break;
|
|
||||||
diff --git a/include/runProcess.h b/include/runProcess.h
|
|
||||||
index 3807389..dff3905 100644
|
|
||||||
--- a/include/runProcess.h
|
|
||||||
+++ b/include/runProcess.h
|
|
||||||
@@ -21,6 +21,10 @@
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32))
|
|
||||||
+#include <pwd.h>
|
|
||||||
+#include <grp.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_FCNTL_H
|
|
||||||
#include <fcntl.h>
|
|
@ -1,24 +0,0 @@
|
|||||||
From 73ea41b3622e2e578d928f7513941aac9d873279 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ben Gamari <ben@smart-cactus.org>
|
|
||||||
Date: Mon, 1 Jul 2019 11:02:45 -0400
|
|
||||||
Subject: [PATCH] Fix incorrect case fallthrough
|
|
||||||
|
|
||||||
The error message lookup logic would fallthrough from the
|
|
||||||
forkSetuidFailed case into the default case, meaning that the error
|
|
||||||
message of the former would never be returned.
|
|
||||||
---
|
|
||||||
cbits/runProcess.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/cbits/runProcess.c b/cbits/runProcess.c
|
|
||||||
index c621158..10794bc 100644
|
|
||||||
--- a/cbits/runProcess.c
|
|
||||||
+++ b/cbits/runProcess.c
|
|
||||||
@@ -329,6 +329,7 @@ runInteractiveProcess (char *const args[],
|
|
||||||
break;
|
|
||||||
case forkSetuidFailed:
|
|
||||||
*failed_doing = "runInteractiveProcess: setuid";
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
*failed_doing = "runInteractiveProcess: unknown";
|
|
||||||
break;
|
|
@ -1,7 +1,5 @@
|
|||||||
Index: ghc-8.6.1/libraries/containers/include/containers.h
|
--- ghc-8.8.0.20190721/libraries/containers/containers/include/containers.h~ 2019-06-26 20:39:26.000000000 +0000
|
||||||
===================================================================
|
+++ ghc-8.8.0.20190721/libraries/containers/containers/include/containers.h 2019-07-27 08:55:10.747060247 +0000
|
||||||
--- ghc-8.6.1.orig/libraries/containers/include/containers.h
|
|
||||||
+++ ghc-8.6.1/libraries/containers/include/containers.h
|
|
||||||
@@ -35,7 +35,6 @@
|
@@ -35,7 +35,6 @@
|
||||||
|
|
||||||
#ifdef __GLASGOW_HASKELL__
|
#ifdef __GLASGOW_HASKELL__
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
From 35a897782b6b0a252da7fdcf4921198ad4e1d96c Mon Sep 17 00:00:00 2001
|
|
||||||
From: James Clarke <jrtc27@jrtc27.com>
|
|
||||||
Date: Thu, 22 Nov 2018 11:55:17 -0500
|
|
||||||
Subject: [PATCH] UNREG: PprC: Add support for adjacent floats
|
|
||||||
|
|
||||||
When two 32-bit floats are adjacent for a 64-bit target, there is no
|
|
||||||
padding between them to force alignment, so we must combine their bit
|
|
||||||
representations into a single word.
|
|
||||||
|
|
||||||
Reviewers: bgamari, simonmar
|
|
||||||
|
|
||||||
Reviewed By: simonmar
|
|
||||||
|
|
||||||
Subscribers: rwbarton, carter
|
|
||||||
|
|
||||||
GHC Trac Issues: #15853
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.haskell.org/D5306
|
|
||||||
---
|
|
||||||
compiler/cmm/PprC.hs | 24 +++++++++++++++++++++++-
|
|
||||||
1 file changed, 23 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
|
|
||||||
index 17fef7fc97..6ebfd20291 100644
|
|
||||||
--- a/compiler/cmm/PprC.hs
|
|
||||||
+++ b/compiler/cmm/PprC.hs
|
|
||||||
@@ -512,9 +512,12 @@ pprLit1 other = pprLit other
|
|
||||||
pprStatics :: DynFlags -> [CmmStatic] -> [SDoc]
|
|
||||||
pprStatics _ [] = []
|
|
||||||
pprStatics dflags (CmmStaticLit (CmmFloat f W32) : rest)
|
|
||||||
- -- floats are padded to a word by padLitToWord, see #1852
|
|
||||||
+ -- odd numbers of floats are padded to a word by mkVirtHeapOffsetsWithPadding
|
|
||||||
| wORD_SIZE dflags == 8, CmmStaticLit (CmmInt 0 W32) : rest' <- rest
|
|
||||||
= pprLit1 (floatToWord dflags f) : pprStatics dflags rest'
|
|
||||||
+ -- adjacent floats aren't padded but combined into a single word
|
|
||||||
+ | wORD_SIZE dflags == 8, CmmStaticLit (CmmFloat g W32) : rest' <- rest
|
|
||||||
+ = pprLit1 (floatPairToWord dflags f g) : pprStatics dflags rest'
|
|
||||||
| wORD_SIZE dflags == 4
|
|
||||||
= pprLit1 (floatToWord dflags f) : pprStatics dflags rest
|
|
||||||
| otherwise
|
|
||||||
@@ -1270,6 +1273,25 @@ floatToWord dflags r
|
|
||||||
, wORDS_BIGENDIAN dflags = 32
|
|
||||||
| otherwise = 0
|
|
||||||
|
|
||||||
+floatPairToWord :: DynFlags -> Rational -> Rational -> CmmLit
|
|
||||||
+floatPairToWord dflags r1 r2
|
|
||||||
+ = runST (do
|
|
||||||
+ arr <- newArray_ ((0::Int),1)
|
|
||||||
+ writeArray arr 0 (fromRational r1)
|
|
||||||
+ writeArray arr 1 (fromRational r2)
|
|
||||||
+ arr' <- castFloatToWord32Array arr
|
|
||||||
+ w32_1 <- readArray arr' 0
|
|
||||||
+ w32_2 <- readArray arr' 1
|
|
||||||
+ return (pprWord32Pair w32_1 w32_2)
|
|
||||||
+ )
|
|
||||||
+ where pprWord32Pair w32_1 w32_2
|
|
||||||
+ | wORDS_BIGENDIAN dflags =
|
|
||||||
+ CmmInt ((shiftL i1 32) .|. i2) W64
|
|
||||||
+ | otherwise =
|
|
||||||
+ CmmInt ((shiftL i2 32) .|. i1) W64
|
|
||||||
+ where i1 = toInteger w32_1
|
|
||||||
+ i2 = toInteger w32_2
|
|
||||||
+
|
|
||||||
doubleToWords :: DynFlags -> Rational -> [CmmLit]
|
|
||||||
doubleToWords dflags r
|
|
||||||
= runST (do
|
|
||||||
--
|
|
||||||
2.19.2
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
commit ce3897ffd6e7c8b8f36b8e920168bac8c7f836ae
|
|
||||||
Author: Ilias Tsitsimpis <iliastsi@debian.org>
|
|
||||||
Date: Tue Sep 18 17:45:17 2018 +0200
|
|
||||||
|
|
||||||
Fix check whether GCC supports __atomic_ builtins
|
|
||||||
|
|
||||||
Summary:
|
|
||||||
C11 atomics are never used because:
|
|
||||||
|
|
||||||
* The program used for checking whether GCC supports
|
|
||||||
__atomic_ builtins fails with the following error:
|
|
||||||
|
|
||||||
```
|
|
||||||
error: size mismatch in argument 2 of `__atomic_load`
|
|
||||||
int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }
|
|
||||||
```
|
|
||||||
|
|
||||||
* There is a typo when checking if CONF_GCC_SUPPORTS__ATOMICS equals YES,
|
|
||||||
resulting in PRIM_CFLAGS and PRIM_EXTRA_LIBRARIES never being set.
|
|
||||||
|
|
||||||
Reviewers: bgamari
|
|
||||||
|
|
||||||
Reviewed By: bgamari
|
|
||||||
|
|
||||||
Subscribers: rwbarton, erikd, carter
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.haskell.org/D5154
|
|
||||||
|
|
||||||
Index: b/libraries/ghc-prim/aclocal.m4
|
|
||||||
===================================================================
|
|
||||||
--- a/libraries/ghc-prim/aclocal.m4
|
|
||||||
+++ b/libraries/ghc-prim/aclocal.m4
|
|
||||||
@@ -5,7 +5,7 @@ AC_DEFUN([FP_GCC_SUPPORTS__ATOMICS],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([AC_PROG_CC])
|
|
||||||
AC_MSG_CHECKING([whether GCC supports __atomic_ builtins])
|
|
||||||
- echo 'int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }' > conftest.c
|
|
||||||
+ echo 'int test(int *x) { int y; __atomic_load(x, &y, __ATOMIC_SEQ_CST); return y; }' > conftest.c
|
|
||||||
if $CC -c conftest.c > /dev/null 2>&1; then
|
|
||||||
CONF_GCC_SUPPORTS__ATOMICS=YES
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
Index: b/libraries/ghc-prim/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- a/libraries/ghc-prim/configure.ac
|
|
||||||
+++ b/libraries/ghc-prim/configure.ac
|
|
||||||
@@ -8,7 +8,7 @@ dnl unregisterised, Sparc, and PPC ba
|
|
||||||
FP_GCC_SUPPORTS__ATOMICS
|
|
||||||
AC_DEFINE([HAVE_C11_ATOMICS], [$CONF_GCC_SUPPORTS__ATOMICS], [Does GCC support __atomic primitives?])
|
|
||||||
|
|
||||||
-if test "x$CONF_GCC_SUPPORTS__ATOMICS" = YES
|
|
||||||
+if test "$CONF_GCC_SUPPORTS__ATOMICS" = "YES"
|
|
||||||
then PRIM_CFLAGS=-DHAVE_C11_ATOMICS
|
|
||||||
PRIM_EXTRA_LIBRARIES=atomic
|
|
||||||
fi
|
|
@ -1,63 +0,0 @@
|
|||||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
|
||||||
Date: Wed, 18 Jul 2018 22:36:58 +0000 (+0100)
|
|
||||||
Subject: fix osReserveHeapMemory block alignment
|
|
||||||
X-Git-Url: https://git.haskell.org/ghc.git/commitdiff_plain/e175aaf6918bb2b497b83618dc4c270a0d231a1c
|
|
||||||
|
|
||||||
fix osReserveHeapMemory block alignment
|
|
||||||
|
|
||||||
Before the change osReserveHeapMemory() attempted
|
|
||||||
to allocate chunks of memory via osTryReserveHeapMemory()
|
|
||||||
not multiple of MBLOCK_SIZE in the following fallback code:
|
|
||||||
|
|
||||||
```
|
|
||||||
if (at == NULL) {
|
|
||||||
*len -= *len / 8;
|
|
||||||
```
|
|
||||||
|
|
||||||
and caused assertion failure:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make fulltest TEST=T11607 WAY=threaded1
|
|
||||||
T11607: internal error: ASSERTION FAILED: file rts/posix/OSMem.c, line 457
|
|
||||||
(GHC version 8.7.20180716 for riscv64_unknown_linux)
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
The change applies alignment mask before each MBLOCK allocation attempt
|
|
||||||
and fixes WAY=threaded1 test failures on qemu-riscv64.
|
|
||||||
|
|
||||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
||||||
|
|
||||||
Test Plan: run 'make fulltest WAY=threaded1'
|
|
||||||
|
|
||||||
Reviewers: simonmar, bgamari, erikd
|
|
||||||
|
|
||||||
Reviewed By: simonmar
|
|
||||||
|
|
||||||
Subscribers: rwbarton, thomie, carter
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.haskell.org/D4982
|
|
||||||
---
|
|
||||||
|
|
||||||
Index: b/rts/posix/OSMem.c
|
|
||||||
===================================================================
|
|
||||||
--- a/rts/posix/OSMem.c
|
|
||||||
+++ b/rts/posix/OSMem.c
|
|
||||||
@@ -476,6 +476,8 @@ osTryReserveHeapMemory (W_ len, void *hi
|
|
||||||
void *base, *top;
|
|
||||||
void *start, *end;
|
|
||||||
|
|
||||||
+ ASSERT((len & ~MBLOCK_MASK) == len);
|
|
||||||
+
|
|
||||||
/* We try to allocate len + MBLOCK_SIZE,
|
|
||||||
because we need memory which is MBLOCK_SIZE aligned,
|
|
||||||
and then we discard what we don't need */
|
|
||||||
@@ -552,6 +554,8 @@ void *osReserveHeapMemory(void *startAdd
|
|
||||||
|
|
||||||
attempt = 0;
|
|
||||||
while (1) {
|
|
||||||
+ *len &= ~MBLOCK_MASK;
|
|
||||||
+
|
|
||||||
if (*len < MBLOCK_SIZE) {
|
|
||||||
// Give up if the system won't even give us 16 blocks worth of heap
|
|
||||||
barf("osReserveHeapMemory: Failed to allocate heap storage");
|
|
105
ghc.spec
105
ghc.spec
@ -8,7 +8,7 @@
|
|||||||
# to handle RCs
|
# to handle RCs
|
||||||
%global ghc_release %{version}
|
%global ghc_release %{version}
|
||||||
|
|
||||||
%global base_ver 4.12.0.0
|
%global base_ver 4.13.0.0
|
||||||
|
|
||||||
# build profiling libraries
|
# build profiling libraries
|
||||||
# build haddock
|
# build haddock
|
||||||
@ -37,27 +37,28 @@
|
|||||||
# no longer build testsuite (takes time and not really being used)
|
# no longer build testsuite (takes time and not really being used)
|
||||||
%bcond_with testsuite
|
%bcond_with testsuite
|
||||||
|
|
||||||
# 8.6 needs llvm-6.0
|
# 8.8 needs llvm-7.0
|
||||||
%global llvm_major 6.0
|
%global llvm_major 7.0
|
||||||
%global ghc_llvm_archs armv7hl aarch64
|
%global ghc_llvm_archs armv7hl aarch64
|
||||||
|
|
||||||
%global ghc_unregisterized_arches s390 s390x %{mips}
|
%global ghc_unregisterized_arches s390 s390x %{mips}
|
||||||
|
|
||||||
Name: ghc
|
Name: ghc
|
||||||
Version: 8.6.5
|
Version: 8.8.3
|
||||||
# Since library subpackages are versioned:
|
# Since library subpackages are versioned:
|
||||||
# - release can only be reset if *all* library versions get bumped simultaneously
|
# - release can only be reset if *all* library versions get bumped simultaneously
|
||||||
# (sometimes after a major release)
|
# (sometimes after a major release)
|
||||||
# - minor release numbers for a branch should be incremented monotonically
|
# - minor release numbers for a branch should be incremented monotonically
|
||||||
Release: 104%{?dist}
|
Release: 105%{?dist}
|
||||||
Summary: Glasgow Haskell Compiler
|
Summary: Glasgow Haskell Compiler
|
||||||
|
|
||||||
License: BSD and HaskellReport
|
License: BSD and HaskellReport
|
||||||
URL: https://haskell.org/ghc/
|
URL: https://haskell.org/ghc/
|
||||||
Source0: https://downloads.haskell.org/~ghc/%{ghc_release}/ghc-%{version}-src.tar.xz
|
Source0: https://downloads.haskell.org/ghc/%{ghc_release}/ghc-%{version}-src.tar.xz
|
||||||
%if %{with testsuite}
|
%if %{with testsuite}
|
||||||
Source1: https://downloads.haskell.org/~ghc/%{ghc_release}/ghc-%{version}-testsuite.tar.xz
|
Source1: https://downloads.haskell.org/ghc/%{ghc_release}/ghc-%{version}-testsuite.tar.xz
|
||||||
%endif
|
%endif
|
||||||
|
Source2: https://downloads.haskell.org/ghc/%{ghc_release}/ghc-%{version}-src.tar.xz.sig
|
||||||
Source5: ghc-pkg.man
|
Source5: ghc-pkg.man
|
||||||
Source6: haddock.man
|
Source6: haddock.man
|
||||||
Source7: runghc.man
|
Source7: runghc.man
|
||||||
@ -68,10 +69,6 @@ Patch3: ghc-gen_contents_index-nodocs.patch
|
|||||||
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
|
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
|
||||||
Patch6: ghc-8.6.3-sphinx-1.8.patch
|
Patch6: ghc-8.6.3-sphinx-1.8.patch
|
||||||
|
|
||||||
# https://github.com/haskell/process/pull/148
|
|
||||||
Patch10: https://github.com/haskell/process/commit/73ea41b3622e2e578d928f7513941aac9d873279.patch
|
|
||||||
Patch11: https://github.com/haskell/process/commit/3e0812fe9d3f4712638a1c4c49bf2b2a7dc4311b.patch
|
|
||||||
|
|
||||||
# Arch dependent patches
|
# Arch dependent patches
|
||||||
|
|
||||||
# arm
|
# arm
|
||||||
@ -80,39 +77,27 @@ Patch12: ghc-armv7-VFPv3D16--NEON.patch
|
|||||||
# for unregisterized (s390x)
|
# for unregisterized (s390x)
|
||||||
# https://ghc.haskell.org/trac/ghc/ticket/15689
|
# https://ghc.haskell.org/trac/ghc/ticket/15689
|
||||||
Patch15: ghc-warnings.mk-CC-Wall.patch
|
Patch15: ghc-warnings.mk-CC-Wall.patch
|
||||||
# https://gitlab.haskell.org/ghc/ghc/issues/15853
|
|
||||||
# https://phabricator.haskell.org/D5306 (in 8.8)
|
|
||||||
# https://gitlab.haskell.org/ghc/ghc/commit/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch
|
|
||||||
# https://salsa.debian.org/haskell-team/DHG_packages/blob/master/p/ghc/debian/patches/PprC-Add-support-for-adjacent-floats
|
|
||||||
Patch17: PprC-Add-support-for-adjacent-floats.patch
|
|
||||||
|
|
||||||
# bigendian (s390x and ppc64)
|
# bigendian (s390x and ppc64)
|
||||||
# fix haddock-library
|
|
||||||
# https://gitlab.haskell.org/ghc/ghc/issues/15411
|
# https://gitlab.haskell.org/ghc/ghc/issues/15411
|
||||||
# https://gitlab.haskell.org/ghc/ghc/issues/16505
|
# https://gitlab.haskell.org/ghc/ghc/issues/16505
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1651448
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1651448
|
||||||
# https://ghc.haskell.org/trac/ghc/ticket/15914
|
# https://ghc.haskell.org/trac/ghc/ticket/15914
|
||||||
Patch18: https://gitlab.haskell.org/ghc/ghc/uploads/5deb133cf910e9e0ca9ad9fe53f7383a/Disable-unboxed-arrays.patch
|
# https://gitlab.haskell.org/ghc/ghc/issues/16973
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1733030
|
||||||
|
Patch18: Disable-unboxed-arrays.patch
|
||||||
|
|
||||||
# Debian patches:
|
# Debian patches:
|
||||||
Patch24: buildpath-abi-stability.patch
|
Patch24: buildpath-abi-stability.patch
|
||||||
Patch26: no-missing-haddock-file-warning.patch
|
Patch26: no-missing-haddock-file-warning.patch
|
||||||
Patch28: x32-use-native-x86_64-insn.patch
|
Patch28: x32-use-native-x86_64-insn.patch
|
||||||
# https://salsa.debian.org/haskell-team/DHG_packages/blob/master/p/ghc/debian/patches/add_-latomic_to_ghc-prim
|
|
||||||
Patch30: add_-latomic_to_ghc-prim.patch
|
|
||||||
# https://salsa.debian.org/haskell-team/DHG_packages/blob/master/p/ghc/debian/patches/e175aaf6918bb2b497b83618dc4c270a0d231a1c.patch
|
|
||||||
Patch32: https://salsa.debian.org/haskell-team/DHG_packages/raw/master/p/ghc/debian/patches/e175aaf6918bb2b497b83618dc4c270a0d231a1c.patch
|
|
||||||
# https://gitlab.haskell.org/ghc/ghc/issues/15913
|
|
||||||
# remove after Fedora default moves to 8.6
|
|
||||||
# https://salsa.debian.org/haskell-team/DHG_packages/blob/master/p/ghc/debian/patches/fix-build-using-unregisterized-v8.4
|
|
||||||
Patch34: fix-build-using-unregisterized-v8.4.patch
|
|
||||||
|
|
||||||
# fedora ghc has been bootstrapped on
|
# fedora ghc has been bootstrapped on
|
||||||
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
|
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
|
||||||
# and retired arches: alpha sparcv9 armv5tel
|
# and retired arches: alpha sparcv9 armv5tel
|
||||||
# see also deprecated ghc_arches defined in /etc/rpm/macros.ghc-srpm by redhat-rpm-macros
|
# see also deprecated ghc_arches defined in /etc/rpm/macros.ghc-srpm by redhat-rpm-macros
|
||||||
|
|
||||||
BuildRequires: ghc-compiler
|
BuildRequires: ghc-compiler > 8.4
|
||||||
# for ABI hash checking
|
# for ABI hash checking
|
||||||
%if %{with abicheck}
|
%if %{with abicheck}
|
||||||
BuildRequires: ghc
|
BuildRequires: ghc
|
||||||
@ -125,6 +110,7 @@ BuildRequires: ghc-directory-devel
|
|||||||
BuildRequires: ghc-pretty-devel
|
BuildRequires: ghc-pretty-devel
|
||||||
BuildRequires: ghc-process-devel
|
BuildRequires: ghc-process-devel
|
||||||
BuildRequires: ghc-transformers-devel
|
BuildRequires: ghc-transformers-devel
|
||||||
|
BuildRequires: alex
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -135,14 +121,10 @@ BuildRequires: perl-interpreter
|
|||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
%endif
|
%endif
|
||||||
%if %{with manual}
|
%if %{with manual}
|
||||||
%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8
|
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
%else
|
|
||||||
BuildRequires: python2-sphinx
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%ifarch %{ghc_llvm_archs}
|
%ifarch %{ghc_llvm_archs}
|
||||||
%if 0%{?fedora} >= 29
|
%if 0%{?fedora} > 29
|
||||||
BuildRequires: llvm%{llvm_major}
|
BuildRequires: llvm%{llvm_major}
|
||||||
%else
|
%else
|
||||||
BuildRequires: llvm >= %{llvm_major}
|
BuildRequires: llvm >= %{llvm_major}
|
||||||
@ -155,6 +137,9 @@ BuildRequires: elfutils-devel
|
|||||||
# patch12
|
# patch12
|
||||||
BuildRequires: autoconf, automake
|
BuildRequires: autoconf, automake
|
||||||
%endif
|
%endif
|
||||||
|
%if %{without quickbuild}
|
||||||
|
#BuildRequires: gnupg2
|
||||||
|
%endif
|
||||||
Requires: ghc-compiler = %{version}-%{release}
|
Requires: ghc-compiler = %{version}-%{release}
|
||||||
Requires: ghc-ghc-devel = %{version}-%{release}
|
Requires: ghc-ghc-devel = %{version}-%{release}
|
||||||
Requires: ghc-devel = %{version}-%{release}
|
Requires: ghc-devel = %{version}-%{release}
|
||||||
@ -199,6 +184,7 @@ License: BSD
|
|||||||
Requires: gcc%{?_isa}
|
Requires: gcc%{?_isa}
|
||||||
Requires: ghc-base-devel%{?_isa} = %{base_ver}-%{release}
|
Requires: ghc-base-devel%{?_isa} = %{base_ver}-%{release}
|
||||||
%if %{without haddock}
|
%if %{without haddock}
|
||||||
|
# added during f31
|
||||||
Obsoletes: ghc-doc-index < %{version}-%{release}
|
Obsoletes: ghc-doc-index < %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
%ifarch %{ghc_llvm_archs}
|
%ifarch %{ghc_llvm_archs}
|
||||||
@ -257,30 +243,32 @@ This package provides the User Guide and Haddock manual.
|
|||||||
|
|
||||||
# use "./libraries-versions.sh" to check versions
|
# use "./libraries-versions.sh" to check versions
|
||||||
%if %{defined ghclibdir}
|
%if %{defined ghclibdir}
|
||||||
%ghc_lib_subpackage -d -l BSD Cabal-2.4.0.1
|
%ghc_lib_subpackage -d -l BSD Cabal-3.0.1.0
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.3.0
|
%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.4.0
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver}
|
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver}
|
||||||
%ghc_lib_subpackage -d -l BSD binary-0.8.6.0
|
%ghc_lib_subpackage -d -l BSD binary-0.8.7.0
|
||||||
%ghc_lib_subpackage -d -l BSD bytestring-0.10.8.2
|
%ghc_lib_subpackage -d -l BSD bytestring-0.10.10.0
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.0.1
|
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.2.1
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.4.0
|
%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.4.0
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.3.0
|
%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.6.0
|
||||||
%ghc_lib_subpackage -d -l BSD filepath-1.4.2.1
|
%ghc_lib_subpackage -d -l BSD filepath-1.4.2.1
|
||||||
%ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override}
|
%ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override}
|
||||||
%ghc_lib_subpackage -d -l BSD ghc-compact-0.1.0.0
|
%ghc_lib_subpackage -d -l BSD ghc-compact-0.1.0.0
|
||||||
%ghc_lib_subpackage -d -l BSD ghc-heap-%{ghc_version_override}
|
%ghc_lib_subpackage -d -l BSD ghc-heap-%{ghc_version_override}
|
||||||
%ghc_lib_subpackage -d -l BSD haskeline-0.7.4.3
|
# see below for ghc-prim
|
||||||
|
%ghc_lib_subpackage -d -l BSD haskeline-0.7.5.0
|
||||||
%ghc_lib_subpackage -d -l BSD hpc-0.6.0.3
|
%ghc_lib_subpackage -d -l BSD hpc-0.6.0.3
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport libiserv-8.6.3
|
# see below for integer-gmp
|
||||||
|
%ghc_lib_subpackage -d -l %BSDHaskellReport libiserv-%{ghc_version_override}
|
||||||
%ghc_lib_subpackage -d -l BSD mtl-2.2.2
|
%ghc_lib_subpackage -d -l BSD mtl-2.2.2
|
||||||
%ghc_lib_subpackage -d -l BSD parsec-3.1.13.0
|
%ghc_lib_subpackage -d -l BSD parsec-3.1.14.0
|
||||||
%ghc_lib_subpackage -d -l BSD pretty-1.1.3.6
|
%ghc_lib_subpackage -d -l BSD pretty-1.1.3.6
|
||||||
%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.5.0
|
%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.8.0
|
||||||
%ghc_lib_subpackage -d -l BSD stm-2.5.0.0
|
%ghc_lib_subpackage -d -l BSD stm-2.5.0.0
|
||||||
%ghc_lib_subpackage -d -l BSD template-haskell-2.14.0.0
|
%ghc_lib_subpackage -d -l BSD template-haskell-2.15.0.0
|
||||||
%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.2
|
%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.4
|
||||||
%ghc_lib_subpackage -d -l BSD text-1.2.3.1
|
%ghc_lib_subpackage -d -l BSD text-1.2.4.0
|
||||||
%ghc_lib_subpackage -d -l BSD time-1.8.0.2
|
%ghc_lib_subpackage -d -l BSD time-1.9.3
|
||||||
%ghc_lib_subpackage -d -l BSD transformers-0.5.6.2
|
%ghc_lib_subpackage -d -l BSD transformers-0.5.6.2
|
||||||
%ghc_lib_subpackage -d -l BSD unix-2.7.2.2
|
%ghc_lib_subpackage -d -l BSD unix-2.7.2.2
|
||||||
%if %{with haddock}
|
%if %{with haddock}
|
||||||
@ -320,6 +308,9 @@ packages to be automatically installed too.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%if %{without quickbuild}
|
||||||
|
#%%{gpgverify} --keyring='%{SOURCE3}' --signature='%{SOURCE2}' --data='%{SOURCE0}'
|
||||||
|
%endif
|
||||||
%setup -q -n %{name}-%{version} %{?with_testsuite:-b1}
|
%setup -q -n %{name}-%{version} %{?with_testsuite:-b1}
|
||||||
|
|
||||||
%patch1 -p1 -b .orig
|
%patch1 -p1 -b .orig
|
||||||
@ -330,20 +321,12 @@ packages to be automatically installed too.
|
|||||||
|
|
||||||
rm -r libffi-tarballs
|
rm -r libffi-tarballs
|
||||||
|
|
||||||
(
|
|
||||||
cd libraries/process
|
|
||||||
%patch10 -p1 -b .orig10
|
|
||||||
%patch11 -p1 -b .orig11
|
|
||||||
)
|
|
||||||
|
|
||||||
%ifarch armv7hl
|
%ifarch armv7hl
|
||||||
%patch12 -p1 -b .orig
|
%patch12 -p1 -b .orig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{ghc_unregisterized_arches}
|
%ifarch %{ghc_unregisterized_arches}
|
||||||
%patch15 -p1 -b .orig
|
%patch15 -p1 -b .orig
|
||||||
%patch17 -p1 -b .orig
|
|
||||||
%patch34 -p1 -b .orig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# bigendian
|
# bigendian
|
||||||
@ -355,8 +338,6 @@ cd libraries/process
|
|||||||
%patch24 -p1 -b .orig
|
%patch24 -p1 -b .orig
|
||||||
%patch26 -p1 -b .orig
|
%patch26 -p1 -b .orig
|
||||||
%patch28 -p1 -b .orig
|
%patch28 -p1 -b .orig
|
||||||
%patch30 -p1 -b .orig
|
|
||||||
%patch32 -p1 -b .orig
|
|
||||||
|
|
||||||
%global gen_contents_index gen_contents_index.orig
|
%global gen_contents_index gen_contents_index.orig
|
||||||
%if %{with haddock}
|
%if %{with haddock}
|
||||||
@ -450,6 +431,9 @@ done
|
|||||||
sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynlibdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf
|
sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynlibdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# containers src moved to a subdir
|
||||||
|
cp -p libraries/containers/containers/LICENSE libraries/containers/LICENSE
|
||||||
|
|
||||||
# libraries licenses
|
# libraries licenses
|
||||||
rm %{buildroot}%{ghc_html_libraries_dir}/{ghc-prim,integer-gmp}-*/LICENSE
|
rm %{buildroot}%{ghc_html_libraries_dir}/{ghc-prim,integer-gmp}-*/LICENSE
|
||||||
mkdir -p %{buildroot}%{_ghclicensedir}
|
mkdir -p %{buildroot}%{_ghclicensedir}
|
||||||
@ -571,7 +555,6 @@ make test
|
|||||||
%transfiletriggerpostun compiler -- %{ghclibdir}/package.conf.d
|
%transfiletriggerpostun compiler -- %{ghclibdir}/package.conf.d
|
||||||
%ghc_pkg_recache
|
%ghc_pkg_recache
|
||||||
%end
|
%end
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with haddock}
|
%if %{with haddock}
|
||||||
@ -583,6 +566,7 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
|
|||||||
env -C %{ghc_html_libraries_dir} ./gen_contents_index
|
env -C %{ghc_html_libraries_dir} ./gen_contents_index
|
||||||
%end
|
%end
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -648,6 +632,7 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
|
|||||||
%ghost %{ghc_html_dir}/libraries/haddock-util.js
|
%ghost %{ghc_html_dir}/libraries/haddock-util.js
|
||||||
%ghost %{ghc_html_dir}/libraries/hslogo-16.png
|
%ghost %{ghc_html_dir}/libraries/hslogo-16.png
|
||||||
%ghost %{ghc_html_dir}/libraries/index*.html
|
%ghost %{ghc_html_dir}/libraries/index*.html
|
||||||
|
%ghost %{ghc_html_dir}/libraries/linuwial.css
|
||||||
%ghost %{ghc_html_dir}/libraries/minus.gif
|
%ghost %{ghc_html_dir}/libraries/minus.gif
|
||||||
%ghost %{ghc_html_dir}/libraries/ocean.css
|
%ghost %{ghc_html_dir}/libraries/ocean.css
|
||||||
%ghost %{ghc_html_dir}/libraries/plus.gif
|
%ghost %{ghc_html_dir}/libraries/plus.gif
|
||||||
@ -683,6 +668,12 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 14 2020 Jens Petersen <petersen@redhat.com> - 8.8.3-105
|
||||||
|
- rebase to 8.8.3 from ghc:8.8 module stream
|
||||||
|
- https://downloads.haskell.org/ghc/8.8.1/docs/html/users_guide/8.8.1-notes.html
|
||||||
|
- https://downloads.haskell.org/ghc/8.8.2/docs/html/users_guide/8.8.2-notes.html
|
||||||
|
- https://downloads.haskell.org/ghc/8.8.3/docs/html/users_guide/8.8.3-notes.html
|
||||||
|
|
||||||
* Mon Jul 6 2020 Jens Petersen <petersen@redhat.com> - 8.6.5-104
|
* Mon Jul 6 2020 Jens Petersen <petersen@redhat.com> - 8.6.5-104
|
||||||
- use python3-sphinx also for rhel8
|
- use python3-sphinx also for rhel8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user