jammy haskell-devscripts-minimal prevent launchpad builds of ghc pkgs

Bug #1986483 reported by Jens Elkner
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
haskell-devscripts (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When trying to create new ghc packages for jammy on launchpad, haskell devscripts (/usr/share/cdbs/1/class/hlibrary.mk) fail with strange error messages like:

...
Running dh_haskell_depends -plibghc-hexpat-dev
ghc-pkg: cannot parse 'List-0.6.2-CBzPU1mwmz68Yae32Ju0Tg' as a package identifier (exact): "<eitherParsec>" (line 1, column 34):
unexpected all digits or a dot in a portion of package name
expecting "-"
make: *** [/usr/share/cdbs/1/class/hlibrary.mk:204: install/libghc-hexpat-dev] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
...

The error message seems is very strange, because package IDs are generated by haskell itself.

Same src package works since xenial, i.e. no probblems on xenial|bionic|focal.

For details see: https://launchpadlibrarian.net/618240334/buildlog_ubuntu-jammy-amd64.libghc-hexpat-dev-src_0.20.13-9.22.4_BUILDING.txt.gz

The related source packages are available via launchpad:
https://launchpad.net/~hets/+archive/ubuntu/hets?field.series_filter=jammy

E.g.:
libghc-list-src (required by hexpat)
  https://launchpad.net/~hets/+archive/ubuntu/hets/+sourcepub/13872690/+listing-archive-extra
libghc-hexpat-src
  https://launchpad.net/~hets/+archive/ubuntu/hets/+sourcepub/13872696/+listing-archive-extra

Tags: patch
Revision history for this message
Jens Elkner (jelmd) wrote :

Found an easy way to identify the problem:

On focal:
---------
cd /tmp
wget https://launchpad.net/~hets/+archive/ubuntu/hets/+files/libghc-list-dev_0.6.2-4.20.4_amd64.deb
dpkg -i libghc-list-dev_0.6.2-4.20.4_amd64.deb
ghc-pkg --global field List-0.6.2-CBzPU1mwmz68Yae32Ju0Tg library-dirs

works.

On jammy:
---------
cd /tmp
wget https://launchpad.net/~hets/+archive/ubuntu/hets/+files/libghc-list-dev_0.6.2-5.22.4_amd64.deb
dpkg -i libghc-list-dev_0.6.2-5.22.4_amd64.deb
ghc-pkg --global field List-0.6.2-CBzPU1mwmz68Yae32Ju0Tg library-dirs

fails.

So it seems, that /usr/bin/dh_haskell_depends needs to be adjusted to remove the trailing -$ID when getting any field from a package.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in haskell-devscripts (Ubuntu):
status: New → Confirmed
Revision history for this message
Tillmo (till-mossakowski) wrote :

A quick fix: in /usr/share/haskell-devscripts/Dh_Haskell.sh , remove the if statement (line 147)
  if dpkg --compare-versions "${ghcversion}" '>=' 8
and only keep the else branch
  dep=`strip-hash $2`
It seems that ghc-pkc 8.6.5 (used in focal) can handle unstripped package ids, but ghc-pkc 8.8.4 (used in jammy) cannot (and neither can ghc-pkc with version < 8).

Revision history for this message
Jens Elkner (jelmd) wrote :

Not sure, why ubuntu does not care about broken software, but it looks like we need to build our own haskell-devscripts-minimal package, since simply patching the buggy script during build is not possible.

Just in case the "un-maintainers" wake up, the patch below fixes the problem.

Revision history for this message
Jens Elkner (jelmd) wrote :

fix buggy /usr/share/haskell-devscripts/Dh_Haskell.sh

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "dh-hc-script.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.