Compare commits

..

9 Commits

9 changed files with 65 additions and 7 deletions

View File

@@ -97,7 +97,7 @@ variables:
test:linux:recommended:
extends: .test_ghcup_version:linux
variables:
GHC_VERSION: "8.8.3"
GHC_VERSION: "8.8.4"
CABAL_VERSION: "3.2.0.0"
test:linux:latest:
@@ -150,7 +150,7 @@ release:linux:64bit:
- ./.gitlab/before_script/linux/alpine/install_deps.sh
variables:
ARTIFACT: "x86_64-linux-ghcup"
GHC_VERSION: "8.8.3"
GHC_VERSION: "8.8.4"
CABAL_VERSION: "3.2.0.0"
@@ -162,7 +162,7 @@ release:linux:32bit:
- ./.gitlab/before_script/linux/alpine/install_deps.sh
variables:
ARTIFACT: "i386-linux-ghcup"
GHC_VERSION: "8.8.3"
GHC_VERSION: "8.6.5"
CABAL_VERSION: "3.2.0.0"

View File

@@ -546,6 +546,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
struct fixup_entry *fe;
const char *linkname;
int ret, r;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -590,6 +591,17 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
if (ret != ARCHIVE_OK)
return (ret);
/*
* Check if we have a hardlink that points to itself.
*/
linkname = archive_entry_hardlink(a->entry);
if (linkname != NULL && strcmp(a->name, linkname) == 0) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Skipping hardlink pointing to itself: %s",
a->name);
return (ARCHIVE_WARN);
}
/*
* Query the umask so we get predictable mode settings.
* This gets done on every call to _write_header in case the

View File

@@ -1,5 +1,16 @@
# Revision history for ghcup
## 0.1.7 -- 2020-07-20
* Fix a bug in libarchive not unpacking some uncleanly packed bindists
* Improved fish support in bootstrap-haskell
* Only check for upgrades when not upgrading
* Fix platform detection for i386 docker images
* Improve alpine support
- more/proper bindists
- don't fall back to glibc based bindists
- install bindists with `--disable-ld-override` to avoid ld.gold bugs
## 0.1.6 -- 2020-07-13
* Create a new curses (brick) based TUI, accessible via `ghcup tui` #24

View File

@@ -887,6 +887,13 @@
}
},
"A_32": {
"Linux_Alpine": {
"unknown_versioning": {
"dlHash": "3737837550d9b177acfe150e3a3cd4545427ded020487c2ed5194d7b8f116349",
"dlSubdir": "ghc-8.6.5",
"dlUri": "https://files.hasufell.de/ghc/ghc-8.6.5-i386-alpine-linux.tar.xz"
}
},
"Linux_Debian": {
"unknown_versioning": {
"dlHash": "1cddb907393a669342b1a922dd16d505d9d93d50bd9433a54a8162f8701250dc",
@@ -1956,6 +1963,13 @@
}
},
"A_32": {
"Linux_Alpine": {
"unknown_versioning": {
"dlHash": "892888d388ef5c9cadf5cfba1146d62237c25b9b066fb62fee940b2b285fd308",
"dlSubdir": "ghc-8.4.4",
"dlUri": "https://files.hasufell.de/ghc/ghc-8.4.4-i386-alpine-linux.tar.xz"
}
},
"Linux_Debian": {
"unknown_versioning": {
"dlHash": "678bafaabea6af70ba71ccf0210bb437f9f5591ec28ac1cbbbd5f7aa6894e450",

View File

@@ -1,6 +1,6 @@
cabal-version: 3.0
name: ghcup
version: 0.1.6
version: 0.1.7
synopsis: ghc toolchain installer as an exe/library
description:
A rewrite of the shell script ghcup, for providing

View File

@@ -137,13 +137,18 @@ installGHCBin bDls ver pfreq@(PlatformRequest {..}) = do
lift $ $(logInfo) "Installing GHC (this may take a while)"
lEM $ execLogged "./configure"
False
["--prefix=" <> toFilePath inst]
(["--prefix=" <> toFilePath inst] ++ alpineArgs)
[rel|ghc-configure|]
(Just path)
Nothing
lEM $ make ["install"] (Just path)
pure ()
alpineArgs
| ver >= [vver|8.2.2|]
, Linux Alpine <- _rPlatform = ["--disable-ld-override"]
| otherwise = []
installCabalBin :: ( MonadMask m
, MonadCatch m

View File

@@ -352,6 +352,11 @@ ghc_844_64_freebsd = DownloadInfo
(Just [rel|ghc-8.4.4|])
"44fbd142d1c355d6110595c59c760e2c73866ff9259ec85ebf814edb244d1940"
ghc_844_32_alpine :: DownloadInfo
ghc_844_32_alpine = DownloadInfo
[uri|https://files.hasufell.de/ghc/ghc-8.4.4-i386-alpine-linux.tar.xz|]
(Just [rel|ghc-8.4.4|])
"892888d388ef5c9cadf5cfba1146d62237c25b9b066fb62fee940b2b285fd308"
@@ -569,6 +574,12 @@ ghc_865_64_alpine = DownloadInfo
(Just [rel|ghc-8.6.5|])
"b9d3ed7f7aa24ef2d58bb579252289caa0b8877adee3685e3af2fb73d440afdc"
ghc_865_32_alpine :: DownloadInfo
ghc_865_32_alpine = DownloadInfo
[uri|https://files.hasufell.de/ghc/ghc-8.6.5-i386-alpine-linux.tar.xz|]
(Just [rel|ghc-8.6.5|])
"3737837550d9b177acfe150e3a3cd4545427ded020487c2ed5194d7b8f116349"
ghc_865_64_freebsd :: DownloadInfo
ghc_865_64_freebsd = DownloadInfo
[uri|https://files.hasufell.de/ghc/ghc-8.6.5-x86_64-portbld-freebsd.tar.xz|]
@@ -1331,6 +1342,7 @@ ghcupDownloads = M.fromList
, (Linux Ubuntu, M.fromList [(Nothing, ghc_844_32_deb8)])
, (Linux Mint , M.fromList [(Nothing, ghc_844_32_deb8)])
, (Linux Debian, M.fromList [(Nothing, ghc_844_32_deb8)])
, (Linux Alpine, M.fromList [(Nothing, ghc_844_32_alpine)])
]
)
]
@@ -1575,6 +1587,7 @@ ghcupDownloads = M.fromList
, (Linux Ubuntu, M.fromList [(Nothing, ghc_865_32_deb9)])
, (Linux Mint , M.fromList [(Nothing, ghc_865_32_deb9)])
, (Linux Debian, M.fromList [(Nothing, ghc_865_32_deb9)])
, (Linux Alpine, M.fromList [(Nothing, ghc_865_32_alpine)])
]
)
]

View File

@@ -270,7 +270,10 @@ getDownloadInfo :: Tool
getDownloadInfo t v (PlatformRequest a p mv) dls = maybe
(Left NoDownload)
Right
(with_distro <|> without_distro_ver <|> without_distro)
(case p of
-- non-musl won't work on alpine
Linux Alpine -> with_distro <|> without_distro_ver
_ -> with_distro <|> without_distro_ver <|> without_distro)
where
with_distro = distro_preview id id

View File

@@ -16,7 +16,7 @@ ghcupURL :: URI
ghcupURL = [uri|https://www.haskell.org/ghcup/data/ghcup-0.0.2.json|]
ghcUpVer :: PVP
ghcUpVer = [pver|0.1.6|]
ghcUpVer = [pver|0.1.7|]
numericVer :: String
numericVer = T.unpack . prettyPVP $ ghcUpVer