glib2.0:armel uninstallable on systems that don't support executing armel code

Bug #950967 reported by Wookey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glib2.0 (Debian)
Fix Released
Unknown
glib2.0 (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

glib-2.0 declares itself Multi-Arch: same, i.e co-installable. But in fact this does not work because it cannot be installed on anything other than the native architecture.

Amongst other things this means that no package build-depending on glib2.0 can be built (becuase the build-deps don't install).

$apt-get install libglib2.0-0:armel

Setting up libglib2.0-0:armel (2.31.20-0ubuntu2) ...
/var/lib/dpkg/info/libglib2.0-0:armel.postinst: 36: /var/lib/dpkg/info/libglib2.0-0:armel.postinst: /usr/lib/arm-linux-gnueabi/glib-2.0/glib-compile-schemas: not found
/var/lib/dpkg/info/libglib2.0-0:armel.postinst: 39: /var/lib/dpkg/info/libglib2.0-0:armel.postinst: /usr/lib/arm-linux-gnueabi/glib-2.0/gio-querymodules: not found
dpkg: error processing libglib2.0-0:armel (--configure):
 subprocess installed post-installation script returned error exit status 127

The problem is that the postinst contains:

        case $trigger in
          /usr/share/glib-2.0/schemas)
            # This is triggered everytime an application installs a
            # GSettings schema
            /usr/lib/arm-linux-gnueabi/glib-2.0/glib-compile-schemas /usr/share/glib-2.0/schemas || true
            ;;

          /usr/lib/arm-linux-gnueabi/gio/modules|/usr/lib/gio/modules)
            # This is triggered everytime an application installs a GIO
            # module into /usr/lib/arm-linux-gnueabi/gio/modules or the
            # backwards-compatible /usr/lib/gio/modules directory
            /usr/lib/arm-linux-gnueabi/glib-2.0/gio-querymodules /usr/lib/arm-linux-gnueabi/gio/modules /usr/lib/gio/modules

/usr/lib/arm-linux-gnueabi/glib-2.0/glib-compile-schemas and
 /usr/lib/arm-linux-gnueabi/glib-2.0/gio-querymodules
are both ELF executables and thus not executable on the machine you are cross-installing onto.

If the output of these commands is arch-independent then a good fix would be to change these lines to be:
/usr/lib/${DEB_BUILD_MULTIARCH}/glib-2.0/glib-compile-schemas
/usr/lib/${DEB_BUILD_MULTIARCH}/glib-2.0/gio-querymodules
so that the version for the arch being installed-onto always gets run.

However if it is not arch-independent then the postinsts should arrange to only run these commands when the package is being natively-installed. If the output for all the versions installed needs to be present then we need to arrange some way of making this work.

It may be that moving these binaries out into the libglib2.0-bin package is the right thing to do?

Wookey (wookey)
description: updated
Wookey (wookey)
summary: - glib2.0:armel uninstallable on other architectures
+ glib2.0:armel uninstallable on non-native architectures
Revision history for this message
Steve Langasek (vorlon) wrote :

It can be installed on lots of things that aren't the native architecture, the only requirement is that you're able to run the code - which is straightforward to accomplish using qemu-user-static, isn't it?

summary: - glib2.0:armel uninstallable on non-native architectures
+ glib2.0:armel uninstallable if the code on systems that don't support
+ executing armel code
summary: - glib2.0:armel uninstallable if the code on systems that don't support
- executing armel code
+ glib2.0:armel uninstallable on systems that don't support executing
+ armel code
Changed in glib2.0 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Steve Langasek (vorlon) wrote :

the change in the Debian upload is apparently wrong:

glib2.0 (2.30.2-7) UNRELEASED; urgency=low

  * libglib2.0-0.postinst.in:
    + Encapsulate gio-querymodules calls in || true statements.
      Closes: #659588.
    + Only run gio-querymodules on the non-multiarch path for the host»
      architecture.
  * rules: add substitution for #ARCH# for the above change.

There's no reason to assume we should exclude the non-multiarch path when running for foreign architectures. The files in /usr/lib/gio/modules could belong to packages of *any* architecture.

Revision history for this message
Steve Langasek (vorlon) wrote :

Discussed this with mbiebl and seb128 on IRC. In fact, since the giomodules.cache is per-directory, only one package can have a cache in /usr/ilb/gio/modules - so it might as well be the native arch for compatibility. Yeah, this change is reasonable.

Revision history for this message
Wookey (wookey) wrote : Re: [Bug 950967] Re: glib2.0:armel uninstallable if the code on systems that don't support executing armel code

+++ Steve Langasek [2012-03-09 17:32 -0000]:
> It can be installed on lots of things that aren't the native
> architecture, the only requirement is that you're able to run the code -
> which is straightforward to accomplish using qemu-user-static, isn't it?

This is true, but qemu support for the HOST arch of build-deps means
we can't cross build anything build-depending on this package for any
arch which doesn't have qemu support. The most pertinent current
example is aarch64 (arm64), for which everything currently needs to be
cross-built because there is no real hardware as well as no qemu
support :-)

It's important that simple M-A:same library packages should install
without qemu support unless it is absolutely unavoidable.

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/

Changed in glib2.0 (Debian):
status: Unknown → Fix Released
Marcin Juszkiewicz (hrw)
Changed in glib2.0 (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

I'd like to merge with Debian again, now that 2.30.2 has hit unstable. That way we'll reduce our delta again and get that fix.

Changed in glib2.0 (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.5 KiB)

This bug was fixed in the package glib2.0 - 2.32.0-1ubuntu1

---------------
glib2.0 (2.32.0-1ubuntu1) precise; urgency=low

  * Merge with Debian unstable. Remaining Ubuntu changes:
    - debian/control.in: Add Conflicts to obsolete libzeitgeist-gio,
      wncksyncdaemon, and old bamfdaemon, to clean them up on upgrades and
      avoid crashes due to incompatibilities. This can be dropped after the
      12.04 LTS release.
    - debian/control.in, debian/libglib2.0-bin.maintscript,
      debian/libglib2.0-bin.postinst: Remove /etc/etc/bash_completion.d/ files
      on upgrade, to clean up after LP #911191. This can be dropped after the
      12.04 LTS release.
    - 01_gettext-desktopfiles.patch: Use official "Keywords" key (lp #949864).
      Change now also committed to Debian SVN.
    - debian/libglib2.0-0.postrm.in: Only remove the compiled schemas on
      purge, not during upgrades. Otherwise we have no schemas available until
      the new postinst is run, which leads to applications aborting on missing
      schemas. Change now also committed to Debian SVN.
  * The new merge now makes packages which build depend on glib
    cross-buildable. (LP: #950967)

glib2.0 (2.32.0-2) unstable; urgency=low

  * Upload to unstable.
  * Revert upstream commit for now which makes single includes mandatory as
    the list of affected packages is still a bit too long.

glib2.0 (2.32.0-1) experimental; urgency=low

  * New upstream release.
  * Add single-include guard for gbytes.h. Patch cherry-picked from
    upstream Git.

glib2.0 (2.31.22-1) experimental; urgency=low

  * New upstream development release.
  * debian/libglib2.0-0.symbols: Add new symbol.

glib2.0 (2.31.20-1) experimental; urgency=low

  * New upstream development release.
  * debian/patches/61_glib-compile-binaries-path.patch: Refreshed.
  * debian/libglib2.0-0.symbols: Add new symbols.
  * Override list-missing target with an implementation that better handles
    multiple flavors (copied from the gtk+3.0 package).

glib2.0 (2.31.18-3) experimental; urgency=low

  * debian/control.in: Add Build-Depends on python-dbus, python-gobject-2, and
    libxml2-utils (xmllint). Required to run the test-suite.

glib2.0 (2.31.18-2) experimental; urgency=low

  * debian/control.in:
  - add libpcre3-dev to the list of dependencies of libglib2.0-dev
  - add libelf-dev as a build dependency to make gresource able to deal
    with ELF files

glib2.0 (2.31.18-1) experimental; urgency=low

  [ Gustavo Noronha Silva ]
  * New development release
  - Yeah, 2.31.8 was a mistake =/
  * debian/libglib2.0-0.symbols:
  - fix version declared for 2.31.8 symbols to not have -1
  - updated for 2.31.8 symbols
  * debian/patches/61_glib-compile-schemas-path.patch,
    debian/patches/61_glib-compile-binaries-path.patch:
  - renamed, and updated to also cover glib-compile-resources
  * debian/libglib2.0-0.install.in:
  - add glib-compile-resources

  [ Michael Biebl ]
  * debian/libglib2.0-bin.install: Install new gresource binary and the man
    pages for gresource and glib-compile-resources.
  * debian/libglib2.0-bin.links.in: Add symlink in /usr/bin for
    glib-compile-resources since we install the binary i...

Read more...

Changed in glib2.0 (Ubuntu):
status: In Progress → Fix Released
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.