Acknowledgement sent
to Simon McVittie <smcv@debian.org>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>.
(Sun, 12 Sep 2021 09:30:03 GMT) (full text, mbox, link).
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg: please provide multiarch tuple to maintainer scripts
Date: Sun, 12 Sep 2021 10:27:15 +0100
Package: dpkg
Version: 1.20.9
Severity: wishlist
Packages that have a plugin architecture, like glib2.0 and gdk-pixbuf,
often want to know the multiarch tuple in their maintainer scripts so
that they can enumerate plugins in a multiarch-qualified directory or
run multiarch-qualified helper programs.
At the moment, dpkg provides DPKG_MAINTSCRIPT_PACKAGE and
DPKG_MAINTSCRIPT_ARCH in maintainer scripts' enviroment, but packages
that need to know the multiarch tuple have to generate their maintainer
scripts from a template: for example, glib2.0 and gdk-pixbuf have a
.postinst.in template containing #MULTIARCH#, which gets substituted by
the package build.
It would be simpler for packages in this situation if dpkg provided
something like DPKG_MAINTSCRIPT_MULTIARCH in the environment.
smcv
Information forwarded
to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>: Bug#994120; Package dpkg.
(Sun, 12 Sep 2021 10:24:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Niels Thykier <niels@thykier.net>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>.
(Sun, 12 Sep 2021 10:24:02 GMT) (full text, mbox, link).
Subject: Re: dpkg: please provide multiarch tuple to maintainer scripts
Date: Sun, 12 Sep 2021 12:03:22 +0200
On Sun, 12 Sep 2021 10:27:15 +0100 Simon McVittie <smcv@debian.org> wrote:
> Package: dpkg
> Version: 1.20.9
> Severity: wishlist
>
> Packages that have a plugin architecture, like glib2.0 and gdk-pixbuf,
> often want to know the multiarch tuple in their maintainer scripts so
> that they can enumerate plugins in a multiarch-qualified directory or
> run multiarch-qualified helper programs.
>
> At the moment, dpkg provides DPKG_MAINTSCRIPT_PACKAGE and
> DPKG_MAINTSCRIPT_ARCH in maintainer scripts' enviroment, but packages
> that need to know the multiarch tuple have to generate their maintainer
> scripts from a template: for example, glib2.0 and gdk-pixbuf have a
> .postinst.in template containing #MULTIARCH#, which gets substituted by
> the package build.
>
> It would be simpler for packages in this situation if dpkg provided
> something like DPKG_MAINTSCRIPT_MULTIARCH in the environment.
>
> smcv
>
>
Hi,
Already mentioned this to Simon on IRC, but I figured it would make
sense to say it on the bug as well.
Since debhelper/12.5(.1), dh_installdeb provides the Multi-arch tuple
for you via the #DEB_HOST_MULTIARCH# token in your hand-written
maintainer scripts. You can also reference other
DEB_{HOST,BUILD,TARGET} variables as well as environment variables
without any custom substitution process (see man dh_installdeb for
details). I hope it will cover your need for having ".in" maintainer
scripts and your custom substitution.
(This is not a statement on whether dpkg should or should not provide
this variable at runtime - just a remark that dh_installdeb might solve
the use-case already)
Thanks,
~Niels
Information forwarded
to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>: Bug#994120; Package dpkg.
(Mon, 22 May 2023 22:18:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>.
(Mon, 22 May 2023 22:18:05 GMT) (full text, mbox, link).
To: Simon McVittie <smcv@debian.org>, 994120@bugs.debian.org
Subject: Re: Bug#994120: dpkg: please provide multiarch tuple to maintainer
scripts
Date: Tue, 23 May 2023 00:15:34 +0200
Hi!
On Sun, 2021-09-12 at 10:27:15 +0100, Simon McVittie wrote:
> Package: dpkg
> Version: 1.20.9
> Severity: wishlist
> Packages that have a plugin architecture, like glib2.0 and gdk-pixbuf,
> often want to know the multiarch tuple in their maintainer scripts so
> that they can enumerate plugins in a multiarch-qualified directory or
> run multiarch-qualified helper programs.
>
> At the moment, dpkg provides DPKG_MAINTSCRIPT_PACKAGE and
> DPKG_MAINTSCRIPT_ARCH in maintainer scripts' enviroment, but packages
> that need to know the multiarch tuple have to generate their maintainer
> scripts from a template: for example, glib2.0 and gdk-pixbuf have a
> .postinst.in template containing #MULTIARCH#, which gets substituted by
> the package build.
>
> It would be simpler for packages in this situation if dpkg provided
> something like DPKG_MAINTSCRIPT_MULTIARCH in the environment.
Sorry, didn't mention anything at the time because Niels reply seemed
like a better answer to this problem, that was already supported.
In any case, while this might be nice to have, it requires pretty much
reimplementing parts of dpkg-architecture in C to be usable from
libdpkg or dpkg itself, because we'd need to map the .deb arch into
the multiarch triplet, which we should not be hardcoding internally.
This has crossed my mind doing, and I think I started work in that
direction, but it has also not seemed a very urgent thing to do TBH.
Thanks,
Guillem
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.