[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Handling Multi-Arch packages that must be installed for every enabled architecture?



Simon McVittie wrote:
> On Fri, 24 Jun 2016 at 23:01:21 -0700, Josh Triplett wrote:
> > Some packages, if installed on any architecture, must be installed for
> > every enabled architecture.  Most notably, an NSS or PAM module package,
> > if enabled in /etc/nsswitch.conf or /etc/pam.d respectively, must exist
> > for every enabled architecture to avoid breaking programs for that
> > architecture.
>
> This might well be true for PAM. For NSS, it used to be true, but based
> on work I did on nss-mdns a while ago, I'm reasonably sure that was a
> glibc bug that was later fixed. (See
> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479144>.)

Glad to hear that the NSS case has gotten a bit better.  But that still
means applications for an architecture without the configured NSS module
installed can't resolve names in the expected way.  Effectively, any NSS
module not shipped with glibc won't work reliably across all
applications without a solution to this problem.

> > As one possible solution for this problem (but not an ideal one, just a
> > thought experiment), dpkg could support a new value for "Multi-Arch",
> > "Multi-Arch: every".
> 
> A flag to indicate "keep this in sync across architectures" seems a
> good idea, but I think this is perhaps a job for apt rather than dpkg
> (and apt will need to understand it anyway). Using a separate field
> would avoid the need to add the field to dpkg, wait for a new stable,
> and only then start adding it to packages.

Good point; if dpkg and apt will both ignore any field they don't
understand, then this doesn't need to wait for a stable cycle.

> Perhaps something more like this? (I don't really like the field name,
> but it's the best I could think of right now.)
> 
>     Package: libpam-whatever
>     Multi-arch: same
>     Follow-architectures-of: libpam0g
>
> which would mean: if you install libpam-whatever:amd64, you have
> amd64, i386 and armhf architectures enabled in dpkg, and you have
> libpam0g:amd64 and libpam0g:i386 but not libpam0g:armhf, then
> libpam-whatever:i386 (only) is also automatically selected for
> installation; and if you subsequently enable arm64 and install
> libpam0g:arm64, then libpam-whatever:arm64 is also
> automatically selected?

That sounds perfect.

NSS modules would then "Follow-Arch-Of: libc6".  And PAM modules would
"Follow-Arch-Of: libpam0g".

Looking at the link provided elsewhere in the thread, this looks similar
to the "Install-Same-As" header suggested on
https://wiki.debian.org/HelmutGrohne/MultiarchSpecChanges .  Of the
proposals on that page, this seems like the most viable.

- Josh Triplett


Reply to: