${prefix} present in Python files breaking sssd

Bug #1079938 reported by Andrew Gunnerson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sssd (Ubuntu)
Fix Released
Undecided
Timo Aaltonen
Precise
Fix Released
Medium
Unassigned
Quantal
Fix Released
Medium
Unassigned

Bug Description

[Impact]
packaging bug that causes incorrect paths in a python file

[Test case]
look at /usr/lib/python2.7/dist-packages/SSSDConfig/__init__.py

[Regression potential]
small, it's an obvious packaging bug

--

Currently, "${prefix}" is showing up in /usr/lib/python2.7/dist-packages/SSSDConfig/__init__.py, causing packages like freeipa to fail. I'm not sure if any other files are affected.

Please fix Ubuntu 12.10 package. Thanks in advance!

Revision history for this message
Andrew Gunnerson (cxl) wrote :

Ubuntu 13.04's package is also affected.

Revision history for this message
Andrew Gunnerson (cxl) wrote :

I've found the cause of the issue. The offending line is in debian/rules: http://paste.ubuntu.com/1363982/

which causes this: http://paste.ubuntu.com/1363979/

I don't see ${prefix} or ${libdir} defined anywhere, which is probably why this issue happens.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

thanks, looks like a leftover of the cdbs era.

Changed in sssd (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
status: New → Triaged
Revision history for this message
Andrew Gunnerson (cxl) wrote :

I've created a patch that fixes this issue. It:

1. Removes leftover cdbs bits
2. Bumps compat version to 9, so "--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)" is not needed anymore
3. Fixes kerberos plugins path. Ubuntu uses /usr/lib/.../krb5/plugins/krb5/ instead of /usr/lib/.../krb5/plugins/libkrb5/

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp1079938.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. 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-reviewers 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
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

thanks for the patch, I had it covered already though :) (local, uncommitted git)

And I don't understand the 3rd change? I see two packages using the current ../plugin/libkrb5 path, but none using the one you suggest?

Revision history for this message
Andrew Gunnerson (cxl) wrote :

I didn't know you had it done already...oops :)

As for the third change, I assumed that the .../krb5/ was the correct path, since that's what the krb5 packaging creates: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/raring/krb5/raring/view/head:/debian/libkrb5-3.dirs.in

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hmm, guess you're right then. I've also just gone with the default libexecdir which with compat 9 is under the multiarch dir.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sssd - 1.9.2-0ubuntu4

---------------
sssd (1.9.2-0ubuntu4) raring; urgency=low

  * Add -lpthread to sss_ssh_knownhostsproxy LDFLAGS (FTBFS).
 -- Timo Aaltonen <email address hidden> Sat, 01 Dec 2012 08:58:44 +0200

Changed in sssd (Ubuntu):
status: Triaged → Fix Released
Timo Aaltonen (tjaalton)
Changed in sssd (Ubuntu Precise):
importance: Undecided → Medium
status: New → In Progress
Changed in sssd (Ubuntu Quantal):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Xiao-Long: could you explain what issues the wrong path in the python file causes? Freeipa-client has installed fine for me.

description: updated
Revision history for this message
Andrew Gunnerson (cxl) wrote :

The problem is that "${prefix}" taken litterally by the python file. "ipa-client-install" with crash when configuring sssd because the path cannot be found.

Revision history for this message
Andrew Gunnerson (cxl) wrote :

Here is the exact error message: http://paste.ubuntu.com/1411155/

Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Xiao-Long, or anyone else affected,

Accepted sssd into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/sssd/1.8.6-0ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in sssd (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in sssd (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Xiao-Long, or anyone else affected,

Accepted sssd into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/sssd/1.9.1-0ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Andrew Gunnerson (cxl) wrote :

Hello Adam,

The sssd in 12.04 was never affected since it's on the 1.8.x series. Both 1.9.1-0ubuntu1.2 in Quantal and 1.9.3-0ubuntu2 in Raring still have '${prefix}' in /usr/lib/python2.7/dist-packages/SSSDConfig/__init__.py

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Andrew Gunnerson (cxl) wrote :

Okay, I've found the real cause of the issue. It's due to some differences between debhelper and rpmbuild:

**On Ubuntu:

Take a look at /usr/share/perl5/Debian/Debhelper/Buildsystem/autoconf.pm (Screenshot: http://i.imgur.com/WozcJoe.png )

Notice how debhelper passes '\${prefix}' directly to ./configure.

**On Fedora:

Take a look at /usr/lib/rpm/macros (Screenshot: http://i.imgur.com/Gm4Dd2q.png )

Notice how rpmbuild parses '%{_datadir}' to '/usr/share' before passing to ./configure.

--------

In short, Ubuntu's build process runs "./configure ... --datadir='\${prefix}/share' ..." whereas Fedora runs "./configure ... --datadir='/usr/share'"

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

So it's a debhelper bug? In any case, the cdbs cruft has been removed, so the sru is still validated even though it didn't fix your case.

tags: added: verification-done
removed: verification-failed
no longer affects: debhelper (Ubuntu Precise)
Revision history for this message
Andrew Gunnerson (cxl) wrote :

Actually, I think it's sssd that's at fault for not being able to parse debhelper's ./configure arguments, since pretty much every other project using ./configure can. I'll see if I can come up with a patch for the issue.

Revision history for this message
Andrew Gunnerson (cxl) wrote :

Hi Timo, I've been searching the automake docs all day and I think I've found something relevant.

According to https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html if "--datadir=..." is not passed (like in Ubuntu), then "@datadir@" is replaced with "${prefix}/share". So in that regard, sssd is not doing anything wrong.

To get it to use "/usr/share" instead of "${prefix}/share", the correct way is to pass "--datadir=/usr/share" to configure ( https://www.gnu.org/prep/standards/standards.html#Directory-Variables ).

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

There should be no need to pass --datadir, it's just that __init__.py should be created in a Makefile and not by autoconf, which is doing what is expected of it.

Timo Aaltonen (tjaalton)
no longer affects: debhelper (Ubuntu)
no longer affects: debhelper (Ubuntu Quantal)
Timo Aaltonen (tjaalton)
tags: added: verification-needed
removed: verification-done
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'll just pass --datadir, it's easiest that way..

Changed in sssd (Ubuntu):
status: Fix Released → Fix Committed
Changed in sssd (Ubuntu Precise):
status: Fix Committed → In Progress
Changed in sssd (Ubuntu Quantal):
status: Fix Committed → In Progress
Revision history for this message
Andrew Gunnerson (cxl) wrote :

Awesome, thanks!

Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Xiao-Long, or anyone else affected,

Accepted sssd into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/sssd/1.8.6-0ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in sssd (Ubuntu Precise):
status: In Progress → Fix Committed
Changed in sssd (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Xiao-Long, or anyone else affected,

Accepted sssd into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/sssd/1.9.1-0ubuntu1.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Andrew Gunnerson (cxl) wrote :

Everything is fine now in Quantal, and Raring. Precise was never affected.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sssd - 1.9.4-0ubuntu2

---------------
sssd (1.9.4-0ubuntu2) raring; urgency=low

  * Merge from unreleased debian git
    - Fix FTBFS on arm by raising test timeout to 30s
    - Introduces postinst/postrm to setup nsswitch.conf when installing
      libsss-sudo
 -- Stephane Graber <email address hidden> Sun, 10 Feb 2013 18:37:02 -0500

Changed in sssd (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Changed in sssd (Ubuntu Precise):
status: Fix Committed → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sssd - 1.9.1-0ubuntu1.3

---------------
sssd (1.9.1-0ubuntu1.3) quantal-proposed; urgency=low

  * rules: Really install the new pam-auth-update file for password
    changes. (LP: #1086272)
  * rules: Pass --datadir, so the path in autogenerated python files is
    correctly substituted. (LP: #1079938)
 -- Timo Aaltonen <email address hidden> Wed, 06 Feb 2013 01:13:23 +0200

Changed in sssd (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sssd - 1.8.6-0ubuntu0.2

---------------
sssd (1.8.6-0ubuntu0.2) precise-proposed; urgency=low

  * rules: Really install the new pam-auth-update file for password
    changes. (LP: #1086272)
  * rules: Pass --datadir, so the path in autogenerated python files is
    correctly substituted. (LP: #1079938)
 -- Timo Aaltonen <email address hidden> Wed, 06 Feb 2013 01:07:09 +0200

Changed in sssd (Ubuntu Precise):
status: Invalid → 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.