facter fails to run from rebuilt source package

Bug #1173265 reported by Robie Basak
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
facter (Ubuntu)
Fix Released
High
Unassigned
Precise
Invalid
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned
Raring
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

SRUs and security updates are impossible without breaking the package.

[Development Fix]

My merge of facter 1.7 drops most of the Ubuntu delta that is now no longer necessary. This eliminates the problem.

[Stable Fix]

Build-Depend on ruby1.8 specifically, instead of the ruby virtual package. The Quantal and Raring binaries in the archive were originally built against ruby1.8 anyway, as this is what the ruby virtual package brought in at the time of the build. With this minimal fix, the build doesn't change to pulling in 1.9.1 instead and thus causing breakage.

[Test Case]

A dep8 smoke test has been added. If the problem is fixed, the dep8 test should pass.

Failing this, just run "facter". If you get a bunch of facts printed out, then the problem is fixed. Note that to test this properly, you should start by not having ruby1.9.1 installed.

The two failure possibilities are:

# facter
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- facter/application (LoadError)
 from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/bin/facter:58:in `<main>'

# facter
bash: /usr/bin/facter: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory

[Regression Potential]

The build could have accidentally changed other things apart from the original Ruby 1.8 dependency since the original build. But since "facter" on its own prints all known facts, it is easy to confidently verify that factor's fact-detection behaviour has not changed unexpectedly after an update.

[Original Description]

If I rebuild 1.6.9-2ubuntu1 in a raring chroot, then when I attempt to run facter I get an error:

$ sudo dpkg -i facter_1.6.9-2ubuntu1_all.deb
(Reading database ... 77464 files and directories currently installed.)
Preparing to replace facter 1.6.9-2ubuntu1 (using facter_1.6.9-2ubuntu1_all.deb) ...
Unpacking replacement facter ...
Setting up facter (1.6.9-2ubuntu1) ...
Processing triggers for man-db ...
ubuntu@raring-test:~$ facter
-bash: /usr/bin/facter: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory

The problem is that /usr/bin/facter gets a shebang of #!/usr/bin/ruby1.9.1 after the rebuild, rather than the #!/usr/bin/ruby1.8 shebang in the binary in the archive. It looks like this might have happened after the ruby metapackage was updated to 4.9 which changed the default ruby to 1.9 from 1.8, causing the facter package build to turn out differently.

It also looks like Debian's facter 1.6.10-1 rejigged some of the ruby versioning, so I suspect that the problem can be fixed in Saucy with a simple merge.

But I suspect that an attempted SRU to Quantal or Raring will cause a regression unless this bug is fixed there.

Revision history for this message
Robie Basak (racb) wrote :

Debdiff against Debian facter 1.6.10-1 (current sid) for a merge attached.

Revision history for this message
Robie Basak (racb) wrote :

The debdiff adds a dep8 smoke test for facter, which should help pick up this same issue in a rebuild test in the future if it happens again. This is my first dep8 test submission, so I'd like it reviewed by a sponsor before I submit it to Debian. Thanks!

Revision history for this message
Robie Basak (racb) wrote :

Sponsors: please could you add Quantal and Precise tasks to both this bug and to bug 1170325? Thanks!

Revision history for this message
Robie Basak (racb) wrote :

My mistake: Precise is not affected by this bug, and I've just tested a rebuilt package to double-check.

Changed in facter (Ubuntu Precise):
status: New → Invalid
Robie Basak (racb)
description: updated
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Attached is an updated merge against Debian facter 1.7.0-1.

Revision history for this message
Robie Basak (racb) wrote :

The above debdiffs additionally contain a fix for bug 1170325 - hence the precise debdiff which doesn't actually apply to this bug itself.

Robie Basak (racb)
Changed in facter (Ubuntu Quantal):
status: New → Triaged
Changed in facter (Ubuntu Raring):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package facter - 1.7.0-1ubuntu1

---------------
facter (1.7.0-1ubuntu1) saucy; urgency=low

  * Merge from Debian unstable (LP: #1173265). Remaining changes:
    - debian/control: ruby-json is not in main, so move Depends to Suggests.
  * Dropped changes:
    - gem2deb and ruby-pkg-tools are now in main:
      + use what we had in natty; we don't want ruby-pkg-tools
         in main. (LP: #408402)
      + Continue using ruby + libopenssl-ruby as Build-Depends even tho Debian
        has moved to gem2deb (not in main).
    - No longer necessary:
      + Use dh_prep instead of dh_clean, add build-arch + build-indep targets
    - Debian packaging now supports multiple Ruby versions:
      + Make binary package depend on ruby1.8 explicitly
    - Applied in Debian:
      + debian/patches/ubuntu_xen_print_virtual.patch: correctly detect
        xen0,xenu. (LP: #980291)
  * d/control: virt-what is not in main, so move Depends to Suggests.
  * d/control, d/tests: add dep8 smoke test.
  * d/p/kvm-cpuinfo: detect "Common KVM processor" in /proc/cpuinfo as virtual
    (LP: #1170325).

facter (1.7.0-1) unstable; urgency=low

  [ Micah Anderson ]
  * fix xen0/xenu detection (Closes: #682417)

  [ Stig Sandbeck Mathisen ]
  * New upstream release
  * Recommend virt-what for virtualization detection
  * Update copyright information

facter (1.6.10-1) unstable; urgency=low

  * New upstream release
  * Remove upstream LSB patch included in this release
 -- Robie Basak <email address hidden> Mon, 20 May 2013 14:09:11 +0000

Changed in facter (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to raring.

Revision history for this message
Brian Murray (brian-murray) wrote :

And quantal and precise.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Robie, or anyone else affected,

Accepted facter into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/facter/1.6.9-2ubuntu1.12.10.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 facter (Ubuntu Quantal):
status: Triaged → Fix Committed
tags: added: verification-needed
Changed in facter (Ubuntu Raring):
status: Triaged → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Robie, or anyone else affected,

Accepted facter into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/facter/1.6.9-2ubuntu1.13.04.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!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [facter/quantal] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for quantal for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Robie Basak (racb) wrote :

Verified on Quantal and Raring.

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

This bug was fixed in the package facter - 1.6.9-2ubuntu1.12.10.1

---------------
facter (1.6.9-2ubuntu1.12.10.1) quantal; urgency=low

  * d/p/kvm-cpuinfo: detect "Common KVM processor" in /proc/cpuinfo as virtual
    (LP: #1170325).
  * d/control: force build against ruby 1.8 to match the existing archive
    binary (LP: #1173265).
  * Add dep8 smoke test.
 -- Robie Basak <email address hidden> Fri, 17 May 2013 12:35:40 +0000

Changed in facter (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) 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.

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

This bug was fixed in the package facter - 1.6.9-2ubuntu1.13.04.1

---------------
facter (1.6.9-2ubuntu1.13.04.1) raring; urgency=low

  * d/p/kvm-cpuinfo: detect "Common KVM processor" in /proc/cpuinfo as virtual
    (LP: #1170325).
  * d/control: force build against ruby 1.8 to match the existing archive
    binary (LP: #1173265).
  * Add dep8 smoke test.
 -- Robie Basak <email address hidden> Mon, 20 May 2013 13:48:59 +0000

Changed in facter (Ubuntu Raring):
status: Fix Committed → 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.