[Pkg-libvirt-maintainers] Bug#844339: Bug#844339: patch for sid
Guido Günther
agx at sigxcpu.org
Mon Nov 14 17:54:22 UTC 2016
controL: tags -1 +moreinfo
H Mauricio,
On Mon, Nov 14, 2016 at 01:53:19PM -0200, Mauricio Faria de Oliveira wrote:
> Patch attached now.
Thanks for your patch, see my questions below:
>
> --
> Mauricio Faria de Oliveira
> IBM Linux Technology Center
> diff -Nru libvirt-2.3.0/debian/changelog libvirt-2.3.0/debian/changelog
> --- libvirt-2.3.0/debian/changelog 2016-10-16 10:14:45.000000000 -0400
> +++ libvirt-2.3.0/debian/changelog 2016-10-28 07:21:00.000000000 -0400
> @@ -1,3 +1,10 @@
> +libvirt (2.4.0-1uidgid1) UNRELEASED; urgency=medium
> +
> + * debian/libvirt-daemon-system.postinst: set libvirt-qemu UID/GID
> + if available; don't fail otherwise. (Closes: #)
> +
> + -- Mauricio Faria de Oliveira <mauricfo at linux.vnet.ibm.com> Wed, 26 Oct 2016 11:05:38 -0200
> +
> libvirt (2.4.0-1) unstable; urgency=medium
>
> * [abba3b7] New upstream version 2.4.0
> diff -Nru libvirt-2.3.0/debian/libvirt-daemon-system.postinst libvirt-2.3.0/debian/libvirt-daemon-system.postinst
> --- libvirt-2.3.0/debian/libvirt-daemon-system.postinst 2016-09-29 03:25:56.000000000 -0400
> +++ libvirt-2.3.0/debian/libvirt-daemon-system.postinst 2016-10-28 07:21:00.000000000 -0400
> @@ -17,6 +17,10 @@
> # for details, see http://www.debian.org/doc/debian-policy/ or
> # the debian-policy package
>
> +# Allocated UID and GID for libvirt-qemu
> +libvirt_qemu_uid=64055
> +libvirt_qemu_gid=64055
Please use all caps for the variable names.
> +
> add_users_groups()
> {
> if ! getent group libvirt >/dev/null; then
> @@ -28,6 +32,13 @@
> fi
> # user and group libvirt runs qemu/kvm instances with
> if ! getent passwd libvirt-qemu >/dev/null; then
> +
> + # set uid if available (expected); don't fail otherwise.
> + parameter_uid=''
> + if ! getent passwd $libvirt_qemu_uid >/dev/null; then
> + parameter_uid="--uid $libvirt_qemu_uid"
> + fi
> +
> adduser --quiet \
> --system \
> --ingroup kvm \
> @@ -37,10 +48,18 @@
> --home /var/lib/libvirt \
> --no-create-home \
> --gecos "Libvirt Qemu" \
> + $parameter_uid \
i wonder if _silently_ ignoring uid because it's already taken is the
right action. Did you check what other packages with reserved uids/gids
do in this case?
We should at least put out a warning or fail (which might not be
nice since the problem might not be easily solvable by the person
installing the package e.g. if users come from LDAP).
Cheers,
-- Guido
> libvirt-qemu
> fi
> if ! getent group libvirt-qemu >/dev/null; then
> - addgroup --quiet --system libvirt-qemu
> +
> + # set gid if available (expected); don't fail otherwise.
> + parameter_gid=''
> + if ! getent group $libvirt_qemu_gid >/dev/null; then
> + parameter_gid="--gid $libvirt_qemu_gid"
> + fi
> +
> + addgroup --quiet --system $parameter_gid libvirt-qemu
> adduser libvirt-qemu libvirt-qemu
> fi
> }
> _______________________________________________
> Pkg-libvirt-maintainers mailing list
> Pkg-libvirt-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-libvirt-maintainers
More information about the Pkg-libvirt-maintainers
mailing list