On Fri, May 31, 2019 at 6:30 AM Matthias Kilian <k...@outback.escape.de> wrote:
> The cabal / hackage / library people are clueless if it comes to
> version limits in dependencies and when which part of a library
> should be bumped. Instead of correcting this, they invented a
> mechanism to publish "revised" meta data for a package via hackage.

Thanks for your detailed explanation. I understand now. And to be
clear, devel/hs-async is currently building fine using the packages
posted at the start of this thread.

I am interested in updating cabal-install to 2.4.1.0. I definitely
understand wanting to keep the number of hs-ports low, and fixing
cabal-install should help. To try to help, I have updated a few more
ports. I have attached the diff since I think my mail client will
mangle it. The changes:

devel/hs-tar: Updated to 0.5.1.0, hackage patch added
security/hs-cryptohash-sha256: Hackage patch added, revision bumped
security/hs-hackage-security: Updated to 0.5.3.0, hackage patch added

This is the first time that I have done this, so I hope I did it
right; I did my best to read the documentation carefully. (Is there an
easy way to get MODGHC_PACKAGE_KEY? I ended up having to do a run of
"make update-plist" to get the new one from the file names, edit the
Makefile, and then run "make update-plist" again.)

Note that devel/hs-mtl, devel/hs-parsec, devel/hs-text, and
devel/hs-stm are now core libraries included in ghc
(https://www.haskell.org/platform/contents.html), and so I think those
ports can be removed and packages that depend on them explicitly need
to have those dependencies removed.

The new cabal-install 2.4.1.0 has a new dependency, resolve, which has
not been packaged. I'd be happy to also do that soon, but I need to
study the documentation more before trying to make a new port.

Best,
Daniel

On Fri, May 31, 2019 at 6:30 AM Matthias Kilian <k...@outback.escape.de> wrote:
>
> On Thu, May 30, 2019 at 06:37:50PM -0400, Daniel Moerner wrote:
> > Thanks a lot for your work on this. I just built some of ghc 8.6.4 on
> > a machine running -current using your patches.
> >
> > Unfortunately, devel/hs-async doesn't build with this version of ghc
> > and base (4.12):
> >
> > Configuring async-2.2.1...
> > [...]
> > Setup: Encountered missing dependencies:
> > base >=4.3 && <4.12, hashable >=1.1.1.0 && <1.3, stm >=2.2 && <2.5
> >
> > Looking into this a bit, hackage says that async 2.2.1 supports base
> > (>=4.3 && <4.13) (https://hackage.haskell.org/package/async), but this
> > just seems to be a mistake in hackage. At present async supports base
> > 4.12 only in git (and there's a fairly old issue request for a new
> > release https://github.com/simonmar/async/issues/89).
>
> The cabal / hackage / library people are clueless if it comes to
> version limits in dependencies and when which part of a library
> should be bumped. Instead of correcting this, they invented a
> mechanism to publish "revised" meta data for a package via hackage.
> For async-2.2.1, the "revised" package description can be found at
>
> http://hackage.haskell.org/package/async-2.2.1/async.cabal
>
> If you compare this against the package description contained in the
> distfile (or at
> http://hackage.haskell.org/package/async-2.2.1/src/async.cabal), you'll
> see that the revised onealready as less strict dependencies (but of
> course, this will fail again with the next update of ghc):
>
> --- async.cabal-dist Fri May 31 11:09:12 2019
> +++ async.cabal-hackage Fri May 31 11:10:12 2019
> @@ -1,5 +1,6 @@
>  name:                async
>  version:             2.2.1
> +x-revision:          2
>  -- don't forget to update ./changelog.md!
>  synopsis:            Run IO operations asynchronously and wait for their 
> results
>
> @@ -50,14 +51,14 @@
>      if impl(ghc>=7.1)
>          other-extensions: Trustworthy
>      exposed-modules:     Control.Concurrent.Async
> -    build-depends:       base >= 4.3 && < 4.12, hashable >= 1.1.1.0 && < 
> 1.3, stm >= 2.2 && < 2.5
> +    build-depends:       base >= 4.3 && < 4.13, hashable >= 1.1.1.0 && < 
> 1.4, stm >= 2.2 && < 2.6
>
>  test-suite test-async
>      default-language: Haskell2010
>      type:       exitcode-stdio-1.0
>      hs-source-dirs: test
>      main-is:    test-async.hs
> -    build-depends: base >= 4.3 && < 4.12,
> +    build-depends: base >= 4.3 && < 4.13,
>                     async,
>                     stm,
>                     test-framework,
>
> See http://hackage.haskell.org/package/async-2.2.1/revisions/ for that
> concept of 'revised' package descriptions.
>
> In other words: when doing operating system distribution packages
> (like our ports), you have to fetch the distfile *and* also watch
> for revised package descriptions, and if there are differences,
> patch the package description contained in the distfile. An example
> of this ist devel/hs-echo/patches/patch-echo_cabal in our ports
> tree.
>
> The haskell eco system is extremely hostile to people who try to
> provide operating system distribution packages -- they think everyone
> just uses cabal-install. That's the reason I try to keep the number
> of hs-ports as low as possible (but to still provide some more or
> less useful tools like darcs or xmonad).
>
> Ciao,
>         Kili
diff --git devel/hs-tar/Makefile devel/hs-tar/Makefile
index 07a87426c7c..d9e11ad83f2 100644
--- devel/hs-tar/Makefile
+++ devel/hs-tar/Makefile
@@ -2,8 +2,7 @@
 
 COMMENT =		tar bindings for Haskell
 
-DISTNAME =		tar-0.5.0.3
-REVISION =		0
+DISTNAME =		tar-0.5.1.0
 CATEGORIES =		devel archivers
 
 MAINTAINER =		Matthias Kilian <k...@openbsd.org>
@@ -15,6 +14,6 @@ MODULES =		lang/ghc
 
 MODGHC_BUILD =		cabal hackage haddock register
 
-MODGHC_PACKAGE_KEY =	4RaKOzbHzG1EpSAqFcpBFH
+MODGHC_PACKAGE_KEY =	HaIVxa1LuWJqqT6yxHWqZ
 
 .include <bsd.port.mk>
diff --git devel/hs-tar/distinfo devel/hs-tar/distinfo
index 58905b46a93..795e27c1cda 100644
--- devel/hs-tar/distinfo
+++ devel/hs-tar/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ghc/tar-0.5.0.3.tar.gz) = 2Nmth2Nl+IvczQIHMEnlhxXNW6lN4G65jiHVlSRJGKM=
-SIZE (ghc/tar-0.5.0.3.tar.gz) = 38764
+SHA256 (ghc/tar-0.5.1.0.tar.gz) = yJ1pe2RytznbUOYSASUfyvio9bWVsdmkiNOV19XOS2g=
+SIZE (ghc/tar-0.5.1.0.tar.gz) = 39271
diff --git devel/hs-tar/patches/patch-tar_cabal devel/hs-tar/patches/patch-tar_cabal
new file mode 100644
index 00000000000..0409c303e9a
--- /dev/null
+++ devel/hs-tar/patches/patch-tar_cabal
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Bump containers dependency as in hackage revision 1.
+
+Index: tar.cabal
+--- tar.cabal.orig
++++ tar.cabal
+@@ -41,7 +41,7 @@ library
+   build-depends: base       == 4.*,
+                  filepath             < 1.5,
+                  array                < 0.6,
+-                 containers >= 0.2 && < 0.6,
++                 containers >= 0.2 && < 0.7,
+                  deepseq    >= 1.1 && < 1.5
+ 
+   if flag(old-time)
diff --git devel/hs-tar/pkg/PLIST devel/hs-tar/pkg/PLIST
index 0a471f6b0a4..696e052d7f9 100644
--- devel/hs-tar/pkg/PLIST
+++ devel/hs-tar/pkg/PLIST
@@ -38,12 +38,14 @@ share/doc/hs-${DISTNAME}/html/Codec-Archive-Tar-Entry.html
 share/doc/hs-${DISTNAME}/html/Codec-Archive-Tar-Index.html
 share/doc/hs-${DISTNAME}/html/Codec-Archive-Tar.html
 share/doc/hs-${DISTNAME}/html/doc-index.html
-share/doc/hs-${DISTNAME}/html/haddock-util.js
+share/doc/hs-${DISTNAME}/html/haddock-bundle.min.js
 share/doc/hs-${DISTNAME}/html/hslogo-16.png
 share/doc/hs-${DISTNAME}/html/index.html
+share/doc/hs-${DISTNAME}/html/meta.json
 share/doc/hs-${DISTNAME}/html/minus.gif
 share/doc/hs-${DISTNAME}/html/ocean.css
 share/doc/hs-${DISTNAME}/html/plus.gif
+share/doc/hs-${DISTNAME}/html/quick-jump.css
 share/doc/hs-${DISTNAME}/html/synopsis.png
 share/doc/hs-${DISTNAME}/html/tar.haddock
 @exec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/register.sh -v0
diff --git security/hs-cryptohash-sha256/Makefile security/hs-cryptohash-sha256/Makefile
index 9d57c802130..3c87b8ad500 100644
--- security/hs-cryptohash-sha256/Makefile
+++ security/hs-cryptohash-sha256/Makefile
@@ -5,6 +5,7 @@
 COMMENT=		fast, pure and practical SHA-256 implementation
 
 DISTNAME=		cryptohash-sha256-0.11.101.0
+REVISION=		0
 CATEGORIES=		security
 
 # BSD3
@@ -14,6 +15,6 @@ MODULES=		lang/ghc
 
 MODGHC_BUILD =          cabal hackage haddock register
 
-MODGHC_PACKAGE_KEY =	2y5kOPF2abcAQTysw8Z7cK
+MODGHC_PACKAGE_KEY =	4hEdGCusAXMBLiu8h413L1
 
 .include <bsd.port.mk>
diff --git security/hs-cryptohash-sha256/patches/patch-cryptohash-sha256_cabal security/hs-cryptohash-sha256/patches/patch-cryptohash-sha256_cabal
new file mode 100644
index 00000000000..01e8a64460d
--- /dev/null
+++ security/hs-cryptohash-sha256/patches/patch-cryptohash-sha256_cabal
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Relax base bound, following hackage revision 2.
+
+Index: cryptohash-sha256.cabal
+--- cryptohash-sha256.cabal.orig
++++ cryptohash-sha256.cabal
+@@ -74,7 +74,7 @@ library
+                      Trustworthy
+                      Unsafe
+ 
+-  build-depends:     base             >= 4.5   && < 4.11
++  build-depends:     base             >= 4.5   && < 4.13
+                    , bytestring       >= 0.9.2 && < 0.11
+ 
+   ghc-options:       -Wall
diff --git security/hs-cryptohash-sha256/pkg/PLIST security/hs-cryptohash-sha256/pkg/PLIST
index 7ccbe556817..75f1996232b 100644
--- security/hs-cryptohash-sha256/pkg/PLIST
+++ security/hs-cryptohash-sha256/pkg/PLIST
@@ -17,12 +17,14 @@ share/doc/hs-${DISTNAME}/html/
 share/doc/hs-${DISTNAME}/html/Crypto-Hash-SHA256.html
 share/doc/hs-${DISTNAME}/html/cryptohash-sha256.haddock
 share/doc/hs-${DISTNAME}/html/doc-index.html
-share/doc/hs-${DISTNAME}/html/haddock-util.js
+share/doc/hs-${DISTNAME}/html/haddock-bundle.min.js
 share/doc/hs-${DISTNAME}/html/hslogo-16.png
 share/doc/hs-${DISTNAME}/html/index.html
+share/doc/hs-${DISTNAME}/html/meta.json
 share/doc/hs-${DISTNAME}/html/minus.gif
 share/doc/hs-${DISTNAME}/html/ocean.css
 share/doc/hs-${DISTNAME}/html/plus.gif
+share/doc/hs-${DISTNAME}/html/quick-jump.css
 share/doc/hs-${DISTNAME}/html/synopsis.png
 @exec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/register.sh -v0
 @unexec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/unregister.sh -v0 --force
diff --git security/hs-hackage-security/Makefile security/hs-hackage-security/Makefile
index 51925398ee9..c92a3df8ce2 100644
--- security/hs-hackage-security/Makefile
+++ security/hs-hackage-security/Makefile
@@ -4,8 +4,7 @@
 
 COMMENT=		hackage security library
 
-DISTNAME=		hackage-security-0.5.2.2
-REVISION =		0
+DISTNAME=		hackage-security-0.5.3.0
 CATEGORIES=		security
 
 # BSD3
@@ -15,15 +14,13 @@ MODULES=		lang/ghc
 
 MODGHC_BUILD =          cabal hackage haddock register
 
-MODGHC_PACKAGE_KEY =	2xPvTJk9eMUH8RAihmaWhK
+MODGHC_PACKAGE_KEY = 	FUbsijtpJ6LFeDbXxwoo30
 
 RUN_DEPENDS =		archivers/hs-zlib>=0.5,<0.7 \
 			devel/hs-base16-bytestring>=0.1.1,<0.2 \
 			devel/hs-base64-bytestring>=1.0,<1.1 \
-			devel/hs-mtl>=2.2,<2.3 \
-			devel/hs-network>=2.6,<2.7 \
+			devel/hs-network>=2.6,<2.9 \
 			devel/hs-network-uri>=2.6,<2.7 \
-			devel/hs-parsec>=3.1,<3.2 \
 			devel/hs-tar>=0.5,<0.6 \
 			security/hs-cryptohash-sha256>=0.11,<0.12 \
 			security/hs-ed25519
diff --git security/hs-hackage-security/distinfo security/hs-hackage-security/distinfo
index c8d4f84f350..491f59d25ff 100644
--- security/hs-hackage-security/distinfo
+++ security/hs-hackage-security/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ghc/hackage-security-0.5.2.2.tar.gz) = UHqDeFEmSndMj01AD3mMPaxb4R3EKP5y0z71lMpTPEE=
-SIZE (ghc/hackage-security-0.5.2.2.tar.gz) = 83131
+SHA256 (ghc/hackage-security-0.5.3.0.tar.gz) = 25huF+kmWqnkCQFpCBW4kLl9UxWesk0KbK+qfBhXfCE=
+SIZE (ghc/hackage-security-0.5.3.0.tar.gz) = 87119
diff --git security/hs-hackage-security/patches/patch-hackage-security_cabal security/hs-hackage-security/patches/patch-hackage-security_cabal
index 8301141700a..9164f692006 100644
--- security/hs-hackage-security/patches/patch-hackage-security_cabal
+++ security/hs-hackage-security/patches/patch-hackage-security_cabal
@@ -1,53 +1,41 @@
-$OpenBSD: patch-hackage-security_cabal,v 1.1 2018/01/22 21:23:53 kili Exp $
+$OpenBSD$
 
-Some (not all) stupid "metadata" changes, not contained in the
-distribution file.
-
-http://hackage.haskell.org/package/hackage-security-0.5.2.2/revisions/
+Make all of these version bumps to bring up to hackage revision 6.
 
 Index: hackage-security.cabal
 --- hackage-security.cabal.orig
 +++ hackage-security.cabal
-@@ -99,9 +99,9 @@ library
+@@ -98,12 +98,12 @@ library
+                        Hackage.Security.Util.TypedEmbedded
+                        Prelude
+   -- We support ghc 7.4 (bundled with Cabal 1.14) and up
+-  build-depends:       base              >= 4.5     && < 4.12,
++  build-depends:       base              >= 4.5     && < 4.13,
                         base16-bytestring >= 0.1.1   && < 0.2,
                         base64-bytestring >= 1.0     && < 1.1,
                         bytestring        >= 0.9     && < 0.11,
--                       Cabal             >= 1.14    && < 1.26,
-+                       Cabal             >= 1.14    && < 2.2,
-                        containers        >= 0.4     && < 0.6,
--                       directory         >= 1.1.0.2 && < 1.3,
-+                       directory         >= 1.1.0.2 && < 1.4,
+-                       Cabal             >= 1.14    && < 2.4,
+-                       containers        >= 0.4     && < 0.6,
++                       Cabal             >= 1.14    && < 3.2,
++                       containers        >= 0.4     && < 0.7,
                         ed25519           >= 0.0     && < 0.1,
                         filepath          >= 1.2     && < 1.5,
                         mtl               >= 2.2     && < 2.3,
-@@ -111,7 +111,7 @@ library
+@@ -113,7 +113,7 @@ library
                         -- 0.4.2 introduces TarIndex, 0.4.4 introduces more
                         -- functionality, 0.5.0 changes type of serialise
                         tar               >= 0.5     && < 0.6,
--                       time              >= 1.2     && < 1.7,
-+                       time              >= 1.2     && < 1.9,
+-                       time              >= 1.2     && < 1.9,
++                       time              >= 1.2     && < 1.10,
                         transformers      >= 0.4     && < 0.6,
                         zlib              >= 0.5     && < 0.7,
                         -- whatever versions are bundled with ghc:
-@@ -149,9 +149,7 @@ library
-                        UndecidableInstances
-   -- use the new stage1/cross-compile-friendly Quotes subset of TH for new GHCs
-   if impl(ghc >= 8.0)
--    -- place holder until Hackage allows to edit in the new extension token
--    -- other-extensions: TemplateHaskellQuotes
--    other-extensions:
-+    other-extensions: TemplateHaskellQuotes
+@@ -200,7 +200,7 @@ library
+   -- dependency in network is not redundant.)
+   if flag(use-network-uri)
+     build-depends: network-uri >= 2.6 && < 2.7,
+-                   network     >= 2.6 && < 2.7
++                   network     >= 2.6 && < 2.9 || >= 3.0 && < 3.2
    else
-     other-extensions: TemplateHaskell
- 
-@@ -205,9 +203,7 @@ library
- 
-   if impl(ghc >= 7.10)
-      other-extensions: AllowAmbiguousTypes
----                       StaticPointers
---- ^^^ Temporarily disabled because Hackage doesn't know yet about this
---- extension and will therefore reject this package.
-+                       StaticPointers
+     build-depends: network     >= 2.5 && < 2.6
  
- test-suite TestSuite
-   type:                exitcode-stdio-1.0
diff --git security/hs-hackage-security/pkg/PLIST security/hs-hackage-security/pkg/PLIST
index 3f1b1d21a5d..a0cc45e7501 100644
--- security/hs-hackage-security/pkg/PLIST
+++ security/hs-hackage-security/pkg/PLIST
@@ -74,6 +74,10 @@ lib/ghc/${DISTNAME}/Hackage/Security/Util/Base64.hi
 lib/ghc/${DISTNAME}/Hackage/Security/Util/Base64.p_hi
 lib/ghc/${DISTNAME}/Hackage/Security/Util/Checked.hi
 lib/ghc/${DISTNAME}/Hackage/Security/Util/Checked.p_hi
+lib/ghc/${DISTNAME}/Hackage/Security/Util/Exit.hi
+lib/ghc/${DISTNAME}/Hackage/Security/Util/Exit.p_hi
+lib/ghc/${DISTNAME}/Hackage/Security/Util/FileLock.hi
+lib/ghc/${DISTNAME}/Hackage/Security/Util/FileLock.p_hi
 lib/ghc/${DISTNAME}/Hackage/Security/Util/IO.hi
 lib/ghc/${DISTNAME}/Hackage/Security/Util/IO.p_hi
 lib/ghc/${DISTNAME}/Hackage/Security/Util/JSON.hi
@@ -149,12 +153,14 @@ share/doc/hs-${DISTNAME}/html/doc-index-V.html
 share/doc/hs-${DISTNAME}/html/doc-index-W.html
 share/doc/hs-${DISTNAME}/html/doc-index.html
 share/doc/hs-${DISTNAME}/html/hackage-security.haddock
-share/doc/hs-${DISTNAME}/html/haddock-util.js
+share/doc/hs-${DISTNAME}/html/haddock-bundle.min.js
 share/doc/hs-${DISTNAME}/html/hslogo-16.png
 share/doc/hs-${DISTNAME}/html/index.html
+share/doc/hs-${DISTNAME}/html/meta.json
 share/doc/hs-${DISTNAME}/html/minus.gif
 share/doc/hs-${DISTNAME}/html/ocean.css
 share/doc/hs-${DISTNAME}/html/plus.gif
+share/doc/hs-${DISTNAME}/html/quick-jump.css
 share/doc/hs-${DISTNAME}/html/synopsis.png
 @exec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/register.sh -v0
 @unexec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/unregister.sh -v0 --force

Reply via email to