non-installable in chroots without udev installed due to bad postinst file

Bug #1777476 reported by Gianfranco Costamagna
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rfkill (Ubuntu)
Fix Released
High
Gianfranco Costamagna
Xenial
Fix Released
Undecided
Unassigned
Artful
Won't Fix
Undecided
Unassigned

Bug Description

[Impact]
packages using rfkill in build-dependencies are not installable.

[Test Case]
Install rfkill in a chroot without udev installed

Unpacking rfkill (0.5-1ubuntu3) ...
Setting up rfkill (0.5-1ubuntu3) ...
/var/lib/dpkg/info/rfkill.postinst: 5: /var/lib/dpkg/info/rfkill.postinst: udevadm: not found
dpkg: error processing package rfkill (--configure):
 subprocess installed post-installation script returned error exit status 127

[Regression Potential]
* None, udev is already installed in user machines

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Artful is mostly EOL
Package is removed in Bionic. I consider enough fixing Xenial only

Changed in rfkill (Ubuntu):
status: New → Fix Released
importance: Undecided → High
assignee: nobody → LocutusOfBorg (costamagnagianfranco)
Changed in rfkill (Ubuntu Artful):
status: New → Won't Fix
Changed in rfkill (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Robie Basak (racb) wrote :

Do we really need to add a dependency here? Why not silently do nothing if udevadm isn't available? That'd fix your chroot case, right?

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

the problem is: it already has a runtime dependency on systemd, why doesn't it automagically add udev?

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

also changing the line to:
    udevadm trigger --subsystem-match=rfkill || true

fixes the issue, giving a warning during installation

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

reuploaded with
command -v udevadm >/dev/null && udevadm trigger --subsystem-match=rfkill

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

command -v didn't work correctly, lets go for:
if [ -x /sbin/udevadm ]; then
    udevadm trigger --subsystem-match=rfkill
fi

Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello LocutusOfBorg, or anyone else affected,

Accepted rfkill into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/rfkill/0.5-1ubuntu3.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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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 rfkill (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Selecting previously unselected package rfkill.
(Reading database ... 12129 files and directories currently installed.)
Preparing to unpack rfkill_0.5-1ubuntu3.1_amd64.deb ...
Unpacking rfkill (0.5-1ubuntu3.1) ...
Setting up rfkill (0.5-1ubuntu3.1) ...

I like it!

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

This bug was fixed in the package rfkill - 0.5-1ubuntu3.1

---------------
rfkill (0.5-1ubuntu3.1) xenial; urgency=medium

  * postinst: do not fail in case udev is not available (e.g. chroot)
    (LP: #1777476)

 -- Gianfranco Costamagna <email address hidden> Mon, 18 Jun 2018 17:53:33 +0200

Changed in rfkill (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for rfkill 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 regressions.

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.