[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: adduser Pre-Depends for qemu-system-common

On Thu, Mar 14, 2013 at 10:59:42PM +0100, Michael Biebl wrote:
> On 14.03.2013 22:30, Serge Hallyn wrote:
> > Quoting Michael Biebl (biebl@debian.org):
> >> On 14.03.2013 22:15, Ansgar Burchardt wrote:
> >>> Hi,

> >>> Serge Hallyn <serge.hallyn@ubuntu.com> writes:
> >>>> qemu-system-common installs a udev rules file which sets /dev/kvm group
> >>>> to 'kvm'.  Its postinst then adds a kvm group.  However udev reads the
> >>>> new rules file as soon as it sees it, sees that group kvm doesn't
> >>>> exist, and ignores that part of the rule (until reboot, udev restart,
> >>>> or the rule is re-added, of course).

> >>> Couldn't postint tell udev explicitly to reload rules after the kvm
> >>> group was added? The init script has a reload action which calls
> >>> udevadm control --reload-rules which might do the right thing.

> >> I'd probably just do an explicit chown/chmod /dev/kvm (given the device
> >> exists) in postinst.

> > That is not sufficient.  If something else does udevadm trigger, udev
> > will re-label /dev/kvm with the old group perms.

> Nothing should run udevadm trigger, at least not without being specific
> to a subsystem. If a package is doing that, it's buggy.

The relevant subsystem for kvm is "misc", which could be triggered by any
number of arbitrary packages.  A solution that happens to work /unless/ some
other package gets installed that uses the same kernel subsystem isn't very
robust.  I think it's important to ensure that, by the time the package is
in state 'installed', the udev db is in a consistent state.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: