From 54cb686bffc7c084dc7791c0b10553081fe49905 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 7 Oct 2023 23:52:06 +0100 Subject: [PATCH 1/5] Fix installCommand description typo --- Cabal/src/Distribution/Simple/Setup/Install.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cabal/src/Distribution/Simple/Setup/Install.hs b/Cabal/src/Distribution/Simple/Setup/Install.hs index b038a18a0b1..a0502693ec4 100644 --- a/Cabal/src/Distribution/Simple/Setup/Install.hs +++ b/Cabal/src/Distribution/Simple/Setup/Install.hs @@ -77,8 +77,8 @@ installCommand = "Copy the files into the install locations. Run register." , commandDescription = Just $ \_ -> wrapText $ - "Unlike the copy command, install calls the register command." - ++ "If you want to install into a location that is not what was" + "Unlike the copy command, install calls the register command. " + ++ "If you want to install into a location that is not what was " ++ "specified in the configure step, use the copy command.\n" , commandNotes = Nothing , commandUsage = \pname -> From 12eeb79bacd2347572c21715a8e4ba844fb71e45 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Mon, 2 Oct 2023 15:40:55 +0800 Subject: [PATCH 2/5] Allow containers-0.7 Closes: #9289 --- Cabal/Cabal.cabal | 2 +- cabal-install-solver/cabal-install-solver.cabal | 2 +- cabal-install/cabal-install.cabal | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal index 5ac700ad461..da7eeda354c 100644 --- a/Cabal/Cabal.cabal +++ b/Cabal/Cabal.cabal @@ -38,7 +38,7 @@ library array >= 0.4.0.1 && < 0.6, base >= 4.9 && < 5, bytestring >= 0.10.0.0 && < 0.13, - containers >= 0.5.0.0 && < 0.7, + containers >= 0.5.0.0 && < 0.8, deepseq >= 1.3.0.1 && < 1.6, directory >= 1.2 && < 1.4, filepath >= 1.3.0.1 && < 1.5, diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal index 3aa2a435a11..98f8253b102 100644 --- a/cabal-install-solver/cabal-install-solver.cabal +++ b/cabal-install-solver/cabal-install-solver.cabal @@ -109,7 +109,7 @@ library , bytestring >=0.10.6.0 && <0.13 , Cabal ^>=3.11 , Cabal-syntax ^>=3.11 - , containers >=0.5.6.2 && <0.7 + , containers >=0.5.6.2 && <0.8 , edit-distance ^>= 0.2.2 , filepath ^>=1.4.0.0 , mtl >=2.0 && <2.4 diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal index 85b84f43f5a..d47f5494c2c 100644 --- a/cabal-install/cabal-install.cabal +++ b/cabal-install/cabal-install.cabal @@ -210,7 +210,7 @@ library base64-bytestring >= 1.0 && < 1.3, binary >= 0.7.3 && < 0.9, bytestring >= 0.10.6.0 && < 0.13, - containers >= 0.5.6.2 && < 0.7, + containers >= 0.5.6.2 && < 0.8, cryptohash-sha256 >= 0.11 && < 0.12, directory >= 1.3.7.0 && < 1.4, echo >= 0.1.3 && < 0.2, From fd31a016548c37ea36e50cf27888f3ac8b183d2d Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 8 Oct 2023 16:46:35 +0100 Subject: [PATCH 3/5] Fix #9318 Avoid Haddock warning with `haddock --for-hackage` --- Cabal/src/Distribution/Simple/Haddock.hs | 42 +++++++++++++++--------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs index 7476f70006c..720989bfdfc 100644 --- a/Cabal/src/Distribution/Simple/Haddock.hs +++ b/Cabal/src/Distribution/Simple/Haddock.hs @@ -866,25 +866,33 @@ renderPureArgs version comp platform args = , ["--since-qual=external" | isVersion 2 20] , [ "--quickjump" | isVersion 2 19, True <- flagToList . argQuickJump $ args ] - , [ "--hyperlinked-source" | isVersion 2 17, True <- flagToList . argLinkedSource $ args - ] + , [ "--hyperlinked-source" | isHyperlinkedSource ] , (\(All b, xs) -> bool (map (("--hide=" ++) . prettyShow) xs) [] b) . argHideModules $ args , bool ["--ignore-all-exports"] [] . getAny . argIgnoreExports $ args - , maybe - [] - ( \(m, e, l) -> - [ "--source-module=" ++ m - , "--source-entity=" ++ e - ] - ++ if isVersion 2 14 - then ["--source-entity-line=" ++ l] - else [] - ) - . flagToMaybe - . argLinkSource - $ args + -- Haddock's --source-* options are ignored once --hyperlinked-source is + -- set. + -- See https://haskell-haddock.readthedocs.io/en/latest/invoking.html#cmdoption-hyperlinked-source + -- To avoid Haddock's warning, we only set --source-* options if + -- --hyperlinked-source is not set. + , if isHyperlinkedSource + then + [] + else + maybe + [] + ( \(m, e, l) -> + [ "--source-module=" ++ m + , "--source-entity=" ++ e + ] + ++ if isVersion 2 14 + then ["--source-entity-line=" ++ l] + else [] + ) + . flagToMaybe + . argLinkSource + $ args , maybe [] ((: []) . ("--css=" ++)) . flagToMaybe . argCssFile $ args , maybe [] ((: []) . ("--use-contents=" ++)) . flagToMaybe . argContents $ args , bool ["--gen-contents"] [] . fromFlagOrDefault False . argGenContents $ args @@ -965,6 +973,10 @@ renderPureArgs version comp platform args = | otherwise = "--verbose" haddockSupportsVisibility = version >= mkVersion [2, 26, 1] haddockSupportsPackageName = version > mkVersion [2, 16] + haddockSupportsHyperlinkedSource = isVersion 2 17 + isHyperlinkedSource = + haddockSupportsHyperlinkedSource + && fromFlagOrDefault False (argLinkedSource args) --------------------------------------------------------------------------------- From 730095ccf3f3b8ada452e9f5968e33ac9463392f Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 8 Oct 2023 16:59:34 +0100 Subject: [PATCH 4/5] Satisfy fourmolu's formatting preferences --- Cabal/src/Distribution/Simple/Haddock.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs index 720989bfdfc..784894325cb 100644 --- a/Cabal/src/Distribution/Simple/Haddock.hs +++ b/Cabal/src/Distribution/Simple/Haddock.hs @@ -866,19 +866,18 @@ renderPureArgs version comp platform args = , ["--since-qual=external" | isVersion 2 20] , [ "--quickjump" | isVersion 2 19, True <- flagToList . argQuickJump $ args ] - , [ "--hyperlinked-source" | isHyperlinkedSource ] + , ["--hyperlinked-source" | isHyperlinkedSource] , (\(All b, xs) -> bool (map (("--hide=" ++) . prettyShow) xs) [] b) . argHideModules $ args , bool ["--ignore-all-exports"] [] . getAny . argIgnoreExports $ args - -- Haddock's --source-* options are ignored once --hyperlinked-source is + , -- Haddock's --source-* options are ignored once --hyperlinked-source is -- set. -- See https://haskell-haddock.readthedocs.io/en/latest/invoking.html#cmdoption-hyperlinked-source -- To avoid Haddock's warning, we only set --source-* options if -- --hyperlinked-source is not set. - , if isHyperlinkedSource - then - [] + if isHyperlinkedSource + then [] else maybe [] @@ -975,8 +974,8 @@ renderPureArgs version comp platform args = haddockSupportsPackageName = version > mkVersion [2, 16] haddockSupportsHyperlinkedSource = isVersion 2 17 isHyperlinkedSource = - haddockSupportsHyperlinkedSource - && fromFlagOrDefault False (argLinkedSource args) + haddockSupportsHyperlinkedSource + && fromFlagOrDefault False (argLinkedSource args) --------------------------------------------------------------------------------- From 4fdbdfea256a3ec93eaa19e297784d92a56fc60d Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Tue, 3 Oct 2023 13:00:58 -0400 Subject: [PATCH 5/5] Upgrade urllib3 due to CVE-2023-43804 --- doc/requirements.in | 2 ++ doc/requirements.txt | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/requirements.in b/doc/requirements.in index b022abd00a4..0a8bc49fecc 100644 --- a/doc/requirements.in +++ b/doc/requirements.in @@ -6,3 +6,5 @@ sphinxnotes-strike Pygments >= 2.7.4 # CVE-2023-37920 certifi >= 2023.07.22 +# CVE-2023-43804 +urllib3 >= 2.0.6 diff --git a/doc/requirements.txt b/doc/requirements.txt index af23e5d28ec..290dcd024d4 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -69,5 +69,7 @@ sphinxcontrib-serializinghtml==1.1.5 # via sphinx sphinxnotes-strike==1.2 # via -r requirements.in -urllib3==2.0.2 - # via requests +urllib3==2.0.6 + # via + # -r requirements.in + # requests