#916475 ghdl: various suggestions to simplify the packaging

Package:
src:ghdl
Source:
ghdl
Submitter:
Nicolas Boulenguez
Date:
2026-04-17 19:55:01 UTC
Severity:
wishlist
Tags:
#916475#5
Date:
2018-12-14 20:45:34 UTC
From:
To:
Hello.
The attachment contains various ideas to update or simplify the
packaging.
Last patch adapts #916412 to these changes (-e is not necessary
anymore).
Thanks for reviewing.

#916475#10
Date:
2022-12-21 17:12:09 UTC
From:
To:
Hello.

I see that you have committed most suggestions in this bug report.
Great!

Four were ignored, probably because you are busy with the build
failures.

Just in case, a rebased version is attached.

I have not tried a full rebuild, because it is also possible that you
prefer the existing code.

#916475#15
Date:
2023-09-29 12:39:28 UTC
From:
To:
Hi Nicolas,

It's been a while since you submitted these patches and Andreas changed a
lot of the packaging since. Could you do me a favor and re-check if your
improvements were included in spirit/whole?

Me and Simon have put in some work to get ghdl_3.0.0 packaged and I'd love
to apply any of your changes that are still relevant.

Thanks,
--Daniel

#916475#20
Date:
2023-10-11 07:03:16 UTC
From:
To:
Hello.
A rebased and extended list of suggestions is attached.
Debdiff reports no change in the binary packages.

#916475#25
Date:
2023-10-11 12:39:41 UTC
From:
To:
Hi Nicolas,

Thanks for taking the time.

Unfortunately
0003-Install-development-symbolic-link-to-shared-library-.patch is broken
because the builtin dash basename only takes one argument. I'm not sure how
you got this to build?

You likeley wanted to use `command basename -a` for coreutils basename, but
honestly the whole link script looks like a hack to me, I prefer the way it
was before.

Not picking that patch makes the series fail to apply, so please
resend. Prefereably with git send-email (to me directly, not sure BTS will
like the mail flood), I don't enjoy manually picking 14 patches
individually :]

Thanks,
--Daniel

#916475#30
Date:
2023-10-11 20:58:22 UTC
From:
To:
Hello.

I agree that an executable debian/libghdl-dev.links is a last resort,
but a reader discovering the package does not need to

* guess that usr/lib/*/libghdl.so is a symbolic link from its name
  (this is only evident if you have already packaged a library)

* search where (debian/tmp/)?usr/lib/*/libghdl.so comes from (not
  evident at all, even assuming familiarity with the dh sequence).

The debian/libghdl-dev.links I am suggesting is complex, but handles a
single task (ln -s) and does not require the reader to remember each
detail of the far more complex debian/rules to understand what
happens.

Of course, the decision is yours eventually, and I may rebase the
other commits if you choose to keep the sequence as it is.

If so, I suggest to replace
     usr/lib/*/libghdl.so
in debian/libghdl-dev.install with
     usr/lib/${DEB_HOST_MULTIARCH}/libghdl.so

#916475#35
Date:
2023-10-17 13:22:55 UTC
From:
To:
Hi Nicolas,

Well at least the new version has more docs and works, I'll take it. Let's
see if Andreas just reverts it or not ;)

More comments inline below.

This breaks the build for me since I build the source package on bookworm
(via gbp). I might hold off on this one until dh-builtusing is backported.

This is kind of obscure, think of the (lack of an) error message. If we
skip this we'll get an "undefined $2" error due to set -u, which I find is
more helpful than a quiet exit rv>0.

#916475#40
Date:
2023-10-19 13:44:25 UTC
From:
To:
Passing -nc to dpkg-buildpackage may fix this, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054125

Else, there is no problem with postponing the change.
Dh-builtusing is convenient but not necessary.

Please use the attached commit instead.

#916475#45
Date:
2023-11-27 10:17:17 UTC
From:
To:
Hi Nicolas,

I've finally pushed your patches through to salsa after build testing and
verifying the resulting binary packages packages are equivalent using
debdiff. Differences are seem to come down to to dependency versions
changing:

```
$ debdiff ../ghdl_3.0.0+dfsg2-1_amd64.changes ../from-archive/ghdl_3.0.0+dfsg2-1_amd64.changes
[The following lists of changes regard files as different if they have
different names, permissions or owners.]

Files in second .changes but not in first
-----------------------------------------
-rw-r--r--  root/root   /usr/lib/debug/.build-id/4f/d46ef61c57d68aabc9d4cdafc5852fb899051f.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/5f/360efc6c03c7585caf925bcbea6ad8163e0b84.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/67/03f8ecaace7be7ad9c4e1c76f79f60299eb5e1.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/83/8101776d4af339a5fdbc155750b25513d70c5e.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/88/259f50a0d6125260020aed22e69837a1418d9f.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/97/1167de6d6502682678be2557a3f037fdb9a299.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/98/4a150aedbac5ecc98964a654c1f32c1a669fab.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/9d/6731573091925ccd801408416af337fb2def67.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/9f/a6e677d86433c0c55a1b305db2d5107dbbd3e3.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/af/15744ce92590cba9bf6e5f2ac3f6abdaa356d1.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/af/f5a7ca2cc39dab5444187a8ff8230d44a1f09c.debug

Files in first .changes but not in second
-----------------------------------------
-rw-r--r--  root/root   /usr/lib/debug/.build-id/05/67e87b4f827133b5a5e6dbc1de66873eed152f.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/25/8b5853f5fb49bd900ae137b0f3ad679494d6dd.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/39/61a65390c7ff8e603734a17eea5cd8b380aa35.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/5b/560130ca4bf4ecc153a867be2c51658368f6d0.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/62/c278ed0eca6c59573e4767ed867ff9d29d7814.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/9e/a63af44bc20979afdfeac844d7878f40e35269.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/a3/e0033ddba6d7e4b75ea67608c7fbcb823f9b6d.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/a8/159ae681c2031121f3e2f41699688f4dd92510.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/b1/a96219303a0a3b5c13e3db6ee6f968282b84b9.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/b9/4ba16cde9f1c4664e87cc233027d76500603d8.debug
-rw-r--r--  root/root   /usr/lib/debug/.build-id/e1/362da76f0e7263f7173a9376c7363f9c723009.debug

No differences were encountered between the control files of package ghdl

No differences were encountered between the control files of package ghdl-common

Control files of package ghdl-gcc: lines which differ (wdiff format)
--------------------------------------------------------------------
Built-Using: gcc-12 (= [-12.3.0-11)-] {+12.3.0-9)+}
Depends: ghdl-common (= 3.0.0+dfsg2-1), libc6 (>= 2.36), libgmp10 (>= 2:6.3.0+dfsg), libgnat-12 (>= 12.3.0), libisl23 (>= 0.15), libmpc3 (>= 1.1.0), libmpfr6 (>= 3.1.3), [-libzstd1 (>= 1.5.5),-] zlib1g (>= 1:1.1.4), gcc, zlib1g-dev

Control files of package ghdl-gcc-dbgsym: lines which differ (wdiff format)
---------------------------------------------------------------------------
Build-Ids: [-0567e87b4f827133b5a5e6dbc1de66873eed152f 3961a65390c7ff8e603734a17eea5cd8b380aa35 62c278ed0eca6c59573e4767ed867ff9d29d7814 9ea63af44bc20979afdfeac844d7878f40e35269-] {+4fd46ef61c57d68aabc9d4cdafc5852fb899051f 5f360efc6c03c7585caf925bcbea6ad8163e0b84 838101776d4af339a5fdbc155750b25513d70c5e aff5a7ca2cc39dab5444187a8ff8230d44a1f09c+}
Installed-Size: [-102822-] {+102828+}

No differences were encountered between the control files of package ghdl-llvm

Control files of package ghdl-llvm-dbgsym: lines which differ (wdiff format)
----------------------------------------------------------------------------
Build-Ids: [-b1a96219303a0a3b5c13e3db6ee6f968282b84b9 b94ba16cde9f1c4664e87cc233027d76500603d8 e1362da76f0e7263f7173a9376c7363f9c723009-] {+6703f8ecaace7be7ad9c4e1c76f79f60299eb5e1 88259f50a0d6125260020aed22e69837a1418d9f 984a150aedbac5ecc98964a654c1f32c1a669fab+}

No differences were encountered between the control files of package ghdl-mcode

Control files of package ghdl-mcode-dbgsym: lines which differ (wdiff format)
-----------------------------------------------------------------------------
Build-Ids: [-258b5853f5fb49bd900ae137b0f3ad679494d6dd a8159ae681c2031121f3e2f41699688f4dd92510-] {+9fa6e677d86433c0c55a1b305db2d5107dbbd3e3 af15744ce92590cba9bf6e5f2ac3f6abdaa356d1+}

No differences were encountered between the control files of package ghdl-tools

Control files of package ghdl-tools-dbgsym: lines which differ (wdiff format)
-----------------------------------------------------------------------------
Build-Ids: [-a3e0033ddba6d7e4b75ea67608c7fbcb823f9b6d-] {+9d6731573091925ccd801408416af337fb2def67+}

Control files of package libghdl-3-0-0: lines which differ (wdiff format)
-------------------------------------------------------------------------
Built-Using: gcc-12 (= [-12.3.0-11)-] {+12.3.0-9)+}

Control files of package libghdl-3-0-0-dbgsym: lines which differ (wdiff format)
--------------------------------------------------------------------------------
Build-Ids: [-5b560130ca4bf4ecc153a867be2c51658368f6d0-] {+971167de6d6502682678be2557a3f037fdb9a299+}

Control files of package libghdl-dev: lines which differ (wdiff format)
-----------------------------------------------------------------------
Built-Using: gcc-12 (= [-12.3.0-11)-] {+12.3.0-9)+}
```

#916475#50
Date:
2023-12-19 14:10:43 UTC
From:
To:
Hello.

The remaining suggestions are rebased and attached.

If you agree in principle with attachment #1 but do not want to apply
it for now, please keep a reminder (this bug, a pull request or
whatever fits your workflow).

Attachment #2 should answer your concern.

This seems OK to me, or unrelated for the dependency on libzstd1.

#916475#55
Date:
2024-03-04 16:04:33 UTC
From:
To:
Hello.
0001 is unchanged.
0002 is stripped from unwanted spaces<->tabulations changes.

#916475#60
Date:
2024-05-07 16:23:10 UTC
From:
To:
Hello.

The attachment fixes several bugs including the release-critical one.
The build succeeds on ppc64el, although running
  neither dh_auto_test nor autopkgtests.
Debdiff only reports expected differences.

Lintian reports nothing new, but there were already two errors.
https://udd.debian.org/lintian/?packages=ghdl

0001-New-upstream-version-4.0.0-dfsg.patch
0002-New-upstream-version-4.1.0-dfsg.patch
are not attached because
* bugs.debian.org refuses heavy attachments,
* you can recreate them with
  # uscan --download-version=4.0.0
  # gbp import-orig ../ghdl_4.0.0+dfsg.orig.tar.xz
  # uscan --download-version=4.1.0
  # gbp import-orig ../ghdl_4.1.0+dfsg.orig.tar.xz
  You should get:
  Checksums-Sha1: 6f89acac3c926c9653e96e58aee6cb344ef26d4e 4862224 ghdl_4.1.0+dfsg.orig.tar.xz
  Checksums-Sha256: d300c4078fa30af33cb614ff5e40f03d19e3b32eca71ca6cd1d6422c7dc40c06 4862224 ghdl_4.1.0+dfsg.orig.tar.xz
  Files:  4da868cf483d095e014c3d3c5c7e3801 4862224 ghdl_4.1.0+dfsg.orig.tar.xz
* I have not reviewed the licenses of the new files in detail.

0003-Delegate-computation-of-Built-Using-to-dh-builtusing
0004-test-driver-move-error-reporting-to-a-separate-proce
are two commits remaining from #916475.

0006-Set-shared-object-version-to-4
0007-Build-using-GCC-13
0008-Build-using-default-LLVM-version
0010-Adapt-install-path-of-ghdl1-lib-libexec
0011-Refresh-patches-for-upstream-version-4
0012-Build-again-on-s390x-fixed-by-ghdl-4
0013-Disable-the-gcc-backend-on-risv64
0015-Apply-upstream-patch-to-fix-issues-2641-and-2642
are backported from Ubuntu.  I have split some commits, rebased, and
added information in the headers, especially the closed Debian bugs.

0005-Avoid-hardcoding-the-shared-object-version-several-t
0009-Stop-hardcoding-the-gcc-version-in-the-gcc-patches-s
0014-Standards-Version-4
0016-Add-license-paragraph-for-ghw
0017-Update-path-syntax-in-lintian-overrides
0018-Restrict-VHDL-sources-to-ASCII-encoding
0019-changelog-lintian-cleanup
0020-copyright-fix-typos-in-paths-lintian
are new suggestions. Most of them are cosmetic.

Ubuntu also ignores the build and run time tests for the llvm and
mcode backends, but as far as I understand this was only necessary
before debian/patches/fix-issue-264x.diff.

#916475#65
Date:
2025-04-19 18:49:10 UTC
From:
To:
Hello.
The attachment contains the remaining suggestions, rebased on
5.0.1+dfsg-1.

#916475#70
Date:
2026-04-17 19:53:14 UTC
From:
To:
[Nicolas Boulenguez]

I am having a look at these, and the set of patches make me wonder why
you have not volunteered to join the electronics team and help out
directly with the packages.  Did you consider it?

Note, I am just a drive by Debian developer interested in GHDL,
looking at how to improve the current situation of GHDL in Debian and
get the package back into testing, I have not worked on GHDL before.
But I am a member of the electronics team. :)