on master help sign in
Merge remote-tracking branch 'upstream/master'
c714bc1Koz Ross
CURATORS.md+2−2
@@ -335,9 +335,9 @@ LTS minor bumps typically are run on Sundays.
335
335
336### Diskspace errors (and website sync debugging)
336### Diskspace errors (and website sync debugging)
337
337
338−* You can detect the problem by running `df`. If you see that `/` is out of space, we have a problem
338+* You can detect the problem by running `df`. If you see that `/` is out of space, we have a problem.
339* If you see that `/var/stackage/` is out of space, you can:
339* If you see that `/var/stackage/` is out of space, you can:
340− * run `./stackage/etc/diskspace/remove-old-stack-work-libs.hs` in `/var/stackage/stackage/automated/work/*/unpack-dir/.stack-work/install/x86_64-linux/*/*/` (hopefully sufficient)
340+ * run `./etc/diskspace/clean-old-stack-libs.sh [nightly|lts-XX]` (hopefully sufficient)
341
341
342 optionally (not recommended?):
342 optionally (not recommended?):
343 * `rm -r /var/stackage/stackage/automated/work/lts*/unpack-dir/unpacked/`
343 * `rm -r /var/stackage/stackage/automated/work/lts*/unpack-dir/unpacked/`
build-constraints.yaml+9−12
@@ -86,7 +86,7 @@ packages:
86
86
87 "Robert Vollmert <rob@vllmrt.net> @robx":
87 "Robert Vollmert <rob@vllmrt.net> @robx":
88 - configurator-pg
88 - configurator-pg
89− - postgrest
89+ - postgrest < 7.0.1 # https://github.com/commercialhaskell/stackage/issues/5383
90
90
91 "Sandy Maguire <sandy@sandymaguire.me> @isovector":
91 "Sandy Maguire <sandy@sandymaguire.me> @isovector":
92 - ecstasy
92 - ecstasy
@@ -2589,7 +2589,7 @@ packages:
2589 - mighty-metropolis
2589 - mighty-metropolis
2590 - speedy-slice
2590 - speedy-slice
2591 - hasty-hamiltonian
2591 - hasty-hamiltonian
2592− - declarative
2592+ - declarative < 0.5.2 # https://github.com/commercialhaskell/stackage/issues/5384
2593 - sampling
2593 - sampling
2594 - flat-mcmc
2594 - flat-mcmc
2595 - urbit-hob
2595 - urbit-hob
@@ -3266,7 +3266,7 @@ packages:
3266 - validation
3266 - validation
3267
3267
3268 "Tony Day <tonyday567@gmail.com> @tonyday567":
3268 "Tony Day <tonyday567@gmail.com> @tonyday567":
3269− - numhask
3269+ - numhask < 0.5 # https://github.com/commercialhaskell/stackage/issues/5382
3270 - numhask-array < 0
3270 - numhask-array < 0
3271 - numhask-prelude < 0
3271 - numhask-prelude < 0
3272 - numhask-space < 0
3272 - numhask-space < 0
@@ -3625,7 +3625,7 @@ packages:
3625 - ilist
3625 - ilist
3626 - life-sync
3626 - life-sync
3627 - membrain
3627 - membrain
3628− - relude < 0.7 # https://github.com/commercialhaskell/stackage/issues/5361
3628+ - relude
3629 - shellmet
3629 - shellmet
3630 - shortcut-links
3630 - shortcut-links
3631 - summoner
3631 - summoner
@@ -4038,7 +4038,7 @@ packages:
4038 - secp256k1-haskell
4038 - secp256k1-haskell
4039 - rocksdb-haskell
4039 - rocksdb-haskell
4040 - rocksdb-query
4040 - rocksdb-query
4041− - haskoin-core
4041+ - haskoin-core < 0.13.5 # https://github.com/haskoin/haskoin-core/issues/385
4042 - haskoin-node
4042 - haskoin-node
4043 - haskoin-store < 0 # https://github.com/haskoin/haskoin-store/issues/12
4043 - haskoin-store < 0 # https://github.com/haskoin/haskoin-store/issues/12
4044
4044
@@ -4244,7 +4244,7 @@ packages:
4244
4244
4245 "Rickey Visinski <rickeyvisinski+hs@gmail.com> @rickeyski":
4245 "Rickey Visinski <rickeyvisinski+hs@gmail.com> @rickeyski":
4246 - slack-api
4246 - slack-api
4247−
4247+
4248 "Dobromir Nikolov <dnikolovv@hotmail.com> @dnikolovv":
4248 "Dobromir Nikolov <dnikolovv@hotmail.com> @dnikolovv":
4249 - it-has
4249 - it-has
4250
4250
@@ -4409,6 +4409,7 @@ packages:
4409 - functor-combinators < 0 # via dependent-sum
4409 - functor-combinators < 0 # via dependent-sum
4410 - generic-arbitrary
4410 - generic-arbitrary
4411 - generics-sop-lens
4411 - generics-sop-lens
4412+ - ghc-byteorder
4412 - ghc-compact
4413 - ghc-compact
4413 - ghc-paths
4414 - ghc-paths
4414 - ghc-prof
4415 - ghc-prof
@@ -4820,15 +4821,9 @@ packages:
4820 # https://github.com/commercialhaskell/stackage/issues/5335
4821 # https://github.com/commercialhaskell/stackage/issues/5335
4821 - brick <0.53
4822 - brick <0.53
4822
4823
4823− # https://github.com/commercialhaskell/stackage/issues/5336
4824− - colourista < 0.1.0.0
4825−
4826 # https://github.com/commercialhaskell/stackage/issues/5347
4824 # https://github.com/commercialhaskell/stackage/issues/5347
4827 - persistent-template < 2.8.3
4825 - persistent-template < 2.8.3
4828
4826
4829− # https://github.com/commercialhaskell/stackage/issues/5346
4830− - validation-selective < 0.1.0.0
4831−
4832 # https://github.com/commercialhaskell/stackage/issues/5348
4827 # https://github.com/commercialhaskell/stackage/issues/5348
4833 - tasty < 1.3
4828 - tasty < 1.3
4834 - tasty-golden < 2.3.3.3
4829 - tasty-golden < 2.3.3.3
@@ -4839,6 +4834,8 @@ packages:
4839 # https://github.com/commercialhaskell/stackage/issues/5351
4834 # https://github.com/commercialhaskell/stackage/issues/5351
4840 - pantry < 0.5
4835 - pantry < 0.5
4841
4836
4837+ # https://github.com/commercialhaskell/path/issues/161
4838+ - path < 0.7.1
4842# end of packages
4839# end of packages
4843
4840
4844# Package flags are applied to individual packages, and override the values of
4841# Package flags are applied to individual packages, and override the values of
etc/diskspace/clean-old-stack-libs.shnew file+13
@@ -0,0 +1,13 @@
1+#!/bin/bash
2+
3+set -e
4+
5+if [ $# != 1 ]; then
6+ echo "Usage: $0 [nightly|lts-xx]"
7+ exit 1
8+fi
9+
10+cd ~/stackage/automated/work/$1/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-*
11+pwd
12+
13+stack --resolver lts-14.27 script ~/stackage/etc/diskspace/remove-old-stack-work-libs.hs
etc/diskspace/remove-old-stack-work-libs.hsmode 100755 → 100644+18−19
@@ -8,11 +8,13 @@
8
8
9import Data.List
9import Data.List
10import System.Directory
10import System.Directory
11+import System.FilePath
12+import Text.Regex.TDFA
11
13
12main = do
14main = do
13 files <- sort <$> listDirectory "."
15 files <- sort <$> listDirectory "."
14− (libdirs,dynlibs) <- partitionM doesDirectoryExist files
16+ let (dynlibs,libdirs) = partition (".so" `isExtensionOf`) files
15− let pkglibdirs = groupBy samePkgLibDir libdirs
17+ pkglibdirs = groupBy samePkgLibDir libdirs
16 pkgdynlibs = groupBy samePkgDynLib dynlibs
18 pkgdynlibs = groupBy samePkgDynLib dynlibs
17 mapM_ (removeOlder removeDirectoryRecursive) pkglibdirs
19 mapM_ (removeOlder removeDirectoryRecursive) pkglibdirs
18 mapM_ (removeOlder removeFile) pkgdynlibs
20 mapM_ (removeOlder removeFile) pkgdynlibs
@@ -20,22 +22,27 @@ main = do
20 samePkgLibDir l1 l2 = pkgDirName l1 == pkgDirName l2
22 samePkgLibDir l1 l2 = pkgDirName l1 == pkgDirName l2
21 where
23 where
22 pkgDirName p =
24 pkgDirName p =
23− if countDashes p < 2
25+ if length p < 25
24− then error $ p ++ " not in name-version-hash format"
26+ then error $ p ++ " too short to be in correct name-version-hash format"
25− else (removeDashSegment . removeDashSegment) p
27+ else extractNameInternal p
26
28
27− countDashes = length . filter (== '-')
29+ extractNameInternal :: String -> String
28−
30+ extractNameInternal p =
29− removeDashSegment = init . dropWhileEnd (/= '-')
31+ let (name,match,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{20,22}" :: (String, String, String)
32+ in if null match || null name then error $ p ++ " not in correct name-version-hash format"
33+ else name ++ internal
30
34
31 samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2
35 samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2
32 where
36 where
33 pkgDynName p =
37 pkgDynName p =
34− if countDashes p < 3
38+ if length p < 42
35− then error $ p ++ " not in libname-version-hash-ghc*.so format"
39+ then error $ p ++ " too short to be libHSname-version-hash-ghc*.so format"
36− else (removeDashSegment . removeDashSegment . removeDashSegment) p
40+ else (extractNameInternal . removeDashSegment) p
41+
42+ removeDashSegment = dropWhileEnd (/= '-')
37
43
38 removeOlder remover files = do
44 removeOlder remover files = do
45+ -- keep 2 latest builds
39 oldfiles <- drop 2 . reverse <$> sortByAge files
46 oldfiles <- drop 2 . reverse <$> sortByAge files
40 mapM_ remover oldfiles
47 mapM_ remover oldfiles
41
48
@@ -45,11 +52,3 @@ main = do
45 return $ map fst $ sortBy compareSnd fileTimes
52 return $ map fst $ sortBy compareSnd fileTimes
46
53
47 compareSnd (_,t1) (_,t2) = compare t1 t2
54 compareSnd (_,t1) (_,t2) = compare t1 t2
48−
49−-- borrowed from Control.Monad.Extra
50−partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a])
51−partitionM f [] = pure ([], [])
52−partitionM f (x:xs) = do
53− res <- f x
54− (as,bs) <- partitionM f xs
55− pure ([x | res]++as, [x | not res]++bs)