Uses wrong pkg-config for dbus test when cross-building [SRU]

Bug #984962 reported by Wookey on 2012-04-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
consolekit (Debian)
Fix Released
Unknown
consolekit (Ubuntu)
High
Unassigned
Precise
High
Unassigned
Quantal
High
Unassigned

Bug Description

[Problem]
consolekit fails to cross-build due to trying use wrong-arch 'pkg-config' during configure.

[Impact]
The impact is only on those cross-building, but one target for the precise release was to have as much of the base system cross-buildable as possible. consolekit is a base system package so it's important to be able to cross-build it.

[Development Fix]
Upstream git has fixed this problem by removing the check in question entirely. See http://cgit.freedesktop.org/ConsoleKit/commit/?id=f42cafcce978c402bdbc9c6e03a0c90bb0924b89

But that version has not yet been released. I don't know if other changes are needed first before simply getting rid of it.

[Stable Fix]
The minimal fix is simply to use $PKG_CONFIG as set-up by autoconf instead of hard-coded 'pkg-config', then tha correct version is used for both native and cross builds.

[Test Case]
1. apt-get source consolekit
2. apt-get -a armel build-dep consolekit
3. cd consolekit-0.4.5
4. CONFIG_SITE=/etc/dpkg-cross/cross-config.armel DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -aarmel -uc -us

Broken Behavior: build will stop after a while saying:
  Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-1' found
Error: Couldn't determine the version of your DBUS package.
  This is probably an error in this script, please report it
  along with the following information:
      Base DBUS version =''
      DBUS_VERSION_MAJOR='0'
      DBUS_VERSION_MINOR='0'
      DBUS_VERSION_MICRO='0'
  (and then print out the whole of config.log)

Fixed Behavior: build will get past this point, saying:
 Your dbus version is 1,4,18.
It will stop a bit further on with "/bin/bash: /usr/bin/dbus-binding-tool: No such file or directory", unless you have qemu installed, but that's a different bug in a different package.

[Regression Potential]
The only thing that could go wrong is breaking the native build. I've tested that this works fine. You can confirm it with
1. apt-get build-dep consolekit
2. cd consolekit-0.4.5
3. dpkg-buildpackage -uc -us
that build should complete as normal.

[Original Report]

consolekit can't find dbus-1 when cross-building:

From the build log: http://people.linaro.org/~wookey/buildd/precise/sbuild-ma/consolekit_0.4.5-2-precise-ma-cross-armel-20120417-025041.38177.log
Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-1' found
Error: Couldn't determine the version of your DBUS package.

This turns out to be because a local test in configure.ac used hard-coded 'pkg-config' instead of $PKG_CONFIG which autoconf has set to the correct path (/usr/bin/<triplet>-pkg-config)

(This patch is not sufficient to cross-build this package which has other issues).

Wookey (wookey) on 2012-04-18
tags: added: cross

The attachment "consolekit-0.4.5-cross-pkg-config.patch" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch

Original patch had a bit missing. This one is right

Changed in consolekit (Debian):
status: Unknown → New
Bryce Harrington (bryce) wrote :

Heya, first off, thanks for this contribution to the LTS, it's much
appreciated!

As it happens, Ubuntu Precise has now progressed into Final Freeze.
Right now changes to the distro are limited to just ultra-critical
release bugs that the release team has flagged as priorities. Most
other bugs, including this one, need to now be handled as Stable
Release Updates (SRUs) or left until the next release (Q-series) opens
for development.

For reference, here is the SRU Policy Doc:
  https://wiki.ubuntu.com/StableReleaseUpdates

I've looked at your patch and think it may qualify as an SRU, but
there's a bit extra paperwork, which helps establish the justification
for the change and makes the change easier for reviewers. Would you
mind helping by filling in some blanks?

I've pasted in the standard SRU template into the bug description.
Click the yellow pencil icon to the right of 'Bug Description', and fill
in the empty sections.

Also, while the patch itself looks ok, there are a few changes necessary
to target it as an SRU:

 1. In the changelog entry, target the upload to 'precise-proposed'
    rather than just 'precise'.

 2. The version number should increment by a point rather than a full
    number. Examples:

     Currently in precise Proposed for precise-proposed
     foobar-1.2-1 ---> foobar-1.2-1ubuntu0.1
     foobar-1.2-1ubuntu2 ---> foobar-1.2-1ubuntu2.1
     foobar-1.2~dfsg.1-1 ---> foobar-1.2~dfsg.1-1ubuntu0.1
     foobar-1.2-1ubuntu1.5 ---> foobar-1.2-1ubuntu1.6

 3. Make certain the correct bug # is listed in the changelog entry
    description, in this format: (LP: #123456)

 4. Doublecheck the maintainer is set to Ubuntu. Easy to do, just run
    `update-maintainer` and it'll fix it.

description: updated
Bryce Harrington (bryce) on 2012-04-19
Changed in consolekit (Ubuntu Precise):
importance: Undecided → High
status: New → Incomplete
milestone: none → precise-updates
Bryce Harrington (bryce) on 2012-04-19
summary: - Uses wrong pkg-config for dbus test when cross-building
+ Uses wrong pkg-config for dbus test when cross-building [SRU]
Bryce Harrington (bryce) wrote :

Please re-subscribe the ubuntu-sponsors team to the bug report once the above has been done.

Wookey (wookey) on 2012-04-20
description: updated
tags: added: rls-q-incoming
Steve Langasek (vorlon) on 2012-06-24
tags: added: rls-q-notfixing
removed: rls-q-incoming
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in consolekit (Ubuntu Quantal):
status: Incomplete → Won't Fix
Changed in consolekit (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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