Bug 263830 - textproc/hs-pandoc build failure, HUnit missing in distinfo
Summary: textproc/hs-pandoc build failure, HUnit missing in distinfo
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-07 00:50 UTC by Jory Folker
Modified: 2022-05-07 16:48 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jory Folker 2022-05-07 00:50:23 UTC
I ran into some trouble while attempting to build pandoc from the ports tree, the build error is at the bottom of this post. In distinfo, I found that "SIZE" and "SHA256" records for the HUnit tarball do not exist.

Eventually, I gave up and ran 'pkg install hs-pandoc', which works. The maintainer of this port and I are probably the only ones who have any interest in this, so unless anyone objects, I'll try my hand at fixing it.

I also couldn't help but notice the version of HUnit in the ports tree is older than the one pandoc depends on. I'll try my hand at updating this port while I'm at it:

https://www.freshports.org/devel/hs-HUnit

Here is the build error:

freebsd% pwd
/usr/ports/textproc/hs-pandoc
freebsd% doas make
Password:
===>  License GPLv2 accepted by the user
===>   hs-pandoc-2.14.2 depends on file: /usr/local/sbin/pkg - found
=> cabal/HUnit-1.6.2.0/HUnit-1.6.2.0.tar.gz is not in /usr/ports/textproc/hs-pandoc/distinfo.
=> Either /usr/ports/textproc/hs-pandoc/distinfo is out of date, or
=> cabal/HUnit-1.6.2.0/HUnit-1.6.2.0.tar.gz is spelled incorrectly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/textproc/hs-pandoc
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/hs-pandoc
freebsd%
Comment 1 Jory Folker 2022-05-07 02:14:27 UTC
I believe I owe some justification for HUnit, considering nobody wants to maintain it and some people are interested in removing it from the ports tree.

pandoc and HUnit are dependencies for youtube-dl: a CLI util written in Python for scraping videos from streaming sites.

https://github.com/ytdl-org/youtube-dl

I can understand why the good folks at FreeBSD don't want the legal warfare associated with youtube-dl in ports tree, but I would settle for keeping its dependencies up to date, even if I'm stuck with the ones nobody is using for anything else.

Any questions, comments, or suggestions would be greatly appreciated.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-05-07 13:05:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7b893f709d3ed523acdf683b75120817fba32f30

commit 7b893f709d3ed523acdf683b75120817fba32f30
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2022-05-07 13:02:55 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-05-07 13:04:37 +0000

    textproc/hs-pandoc: Fix build with TRYPANDOC=OFF.

    PR:             263830

 textproc/hs-pandoc/distinfo | 48 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-05-07 13:06:44 UTC
A commit in branch 2022Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9ce9fd029c55e01967e7500756e279d1420ab3ae

commit 9ce9fd029c55e01967e7500756e279d1420ab3ae
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2022-05-07 13:02:55 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-05-07 13:05:53 +0000

    textproc/hs-pandoc: Fix build with TRYPANDOC=OFF.

    PR:             263830
    (cherry picked from commit 7b893f709d3ed523acdf683b75120817fba32f30)

 textproc/hs-pandoc/distinfo | 48 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2022-05-07 13:10:17 UTC
The problem with pandoc was that its distinfo file was generated for TRYPANDOC option turned OFF.

Also, this port doesn't depend on HUnit port, but compiles it as part of its own build process and links it statically.
Comment 5 Jory Folker 2022-05-07 16:48:17 UTC
I stand corrected. Thanks, Gleb!