[libvirt] [PATCH] spec: silence warnings when installing in F16
Daniel Veillard
veillard at redhat.com
Sat Sep 17 14:44:54 UTC 2011
On Fri, Sep 16, 2011 at 04:44:51PM -0600, Eric Blake wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=738725 documents that
> 'yum install libvirt' in Fedora 16 is rather noisy. This fixes
> the problems.
>
> * libvirt.spec.in (%post client): Silence chkconfig warning about
> SysV services.
> (%post) [with_cgconfig]: Drop for Fedora 15 and newer, where
> systemd does this automatically.
> ---
>
> We should get this in before 0.9.5, but I'm just fuzzy enough with
> spec files that I'd prefer an ACK instead of invoking the trivial rule.
>
> libvirt.spec.in | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 19f91d7..25e521c 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -894,10 +894,14 @@ done
> %endif
>
> %if %{with_cgconfig}
> +# Starting with Fedora 15, systemd automounts all cgroups, and cgconfig is
> +# no longer a necessary service.
> +%if 0%{?fedora} <= 14 || 0%{?rhel} <= 6
> if [ "$1" -eq "1" ]; then
> /sbin/chkconfig cgconfig on
> fi
> %endif
> +%endif
>
> /sbin/chkconfig --add libvirtd
> if [ "$1" -ge "1" ]; then
> @@ -926,7 +930,8 @@ fi
> /sbin/chkconfig --add libvirt-guests
> if [ $1 -ge 1 ]; then
> level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
> - if /sbin/chkconfig --list libvirt-guests | /bin/grep -q $level:on ; then
> + if /sbin/chkconfig --list libvirt-guests 2>/dev/null \
> + | /bin/grep -q $level:on ; then
> # this doesn't do anything but allowing for libvirt-guests to be
> # stopped on the first shutdown
> /sbin/service libvirt-guests start > /dev/null 2>&1 || true
ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list