Public bug reported:
Binary package hint: kvm
This is a copy of the same debian bug which also affects ubuntu.
In debian i uploaded kvm-72+dfsg-2 to fix it, which is now migrating to
Lenny.
kvm's preinst contains the following code:
> GROUP=kvm
>
> # Workaround for bug in addgroup
> . /etc/adduser.conf
> [ -z "$FIRST_SYSTEM_UID" ] && exit 1
> [ -z "$LAST_SYSTEM_UID" ] && exit 2
>
> GID=$(grep ${GROUP} /etc/group >/dev/null && grep ${GROUP} /etc/group | cut
> -d ':' -f 3)
>
> if [ -n "$GID" ] \
> && [ "$GID" -lt "$FIRST_SYSTEM_UID" \
> -o "$GID" -gt "$LAST_SYSTEM_UID" ]; then
> cat >&2 <<EOF
>
> Error: The kvm package needs to create a group named "${GROUP}" in
> /etc/group to be used for /dev/kvm, but the group ${GROUP} already exists
> and it is not a group in the system range
> (${FIRST_SYSTEM_UID}..${LAST_SYSTEM_UID}). Depending on
> the circumstances, you may want to remove or rename the currently
> existing ${GROUP} group before reinstalling the kvm package.
>
> Aborting the installation of kvm now.
>
> EOF
> exit 3
> fi
>
> if [ -z "$GID" ]; then
> /usr/sbin/addgroup --system ${GROUP}
> if [ $? -ne 0 ]; then
> echo >&2 "Error: failed to add the group ${GROUP}."
> exit 4
> fi
> else
> echo >&2 "kvm: Using the existing group \"$GROUP\" (gid $GID) for
> /dev/kvm"
> fi
In particular, note that it simply does "grep ${GROUP} /etc/group".
This will match any line in /etc/group which contains the string
"kvm". This can lead to two possible failures:
* If an /etc/group line for a non-system group contains "kvm"
somewhere, the install will incorrectly complain that the group
already exists.
* If an /etc/group line for a system group contains "kvm" somewhere,
kvm will use it rather than creating a group "kvm".
Might I suggest "getent group kvm"?
(Also, I haven't seen code like this in any other package that creates
a group.)
- Josh Triplett
** Affects: kvm (Ubuntu)
Importance: Undecided
Status: New
** Affects: kvm (Debian)
Importance: Unknown
Status: Unknown
** Bug watch added: Debian Bug tracker #502299
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502299
** Also affects: kvm (Debian) via
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502299
Importance: Unknown
Status: Unknown
--
Fails to install correctly if /etc/group contains any line matching "kvm"
https://bugs.launchpad.net/bugs/286872
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs