[libvirt] [PATCH] libvirt.spec patch to fix some rpmlint warnings/errors

With this patch we remove some of the easier rpmlint warnings and errors. It is by no means rpmlint clean after applying this patch, but the remaining warnings and errors can be ignored. FWIW this is for the libvirt merge review: https://bugzilla.redhat.com/show_bug.cgi?id=226055 I'm not sure about the patch to libvirt.init.in, but rpmlint is quite insistent that we need this, or else we shouldn't start libvirtd by default. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v

On Wed, Feb 11, 2009 at 05:11:00PM +0000, Richard W.M. Jones wrote:
With this patch we remove some of the easier rpmlint warnings and errors. It is by no means rpmlint clean after applying this patch, but the remaining warnings and errors can be ignored.
FWIW this is for the libvirt merge review: https://bugzilla.redhat.com/show_bug.cgi?id=226055
I'm not sure about the patch to libvirt.init.in, but rpmlint is quite insistent that we need this, or else we shouldn't start libvirtd by default.
rpmlint is dumb. If we turn it off by default, then we'll just get a steady stream of bugs / confused users, who install libvirt RPM (or the "Virtualization Group" in installer), reboot and find it is not working because the daemon wasn't started. This would be a disservice to our users, which I don't think we should do
Index: libvirt.spec =================================================================== RCS file: /cvs/pkgs/rpms/libvirt/devel/libvirt.spec,v retrieving revision 1.109 diff -u -r1.109 libvirt.spec --- libvirt.spec 6 Feb 2009 19:28:20 -0000 1.109 +++ libvirt.spec 11 Feb 2009 17:05:01 -0000 @@ -47,16 +47,16 @@ Summary: Library providing a simple API virtualization Name: libvirt Version: 0.6.0 -Release: 2%{?dist}%{?extra_release} +Release: 3%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries Source: libvirt-%{version}.tar.gz Patch1: %{name}-%{version}-timeout.patch Patch2: %{name}-%{version}-rpccall.patch +Patch3: %{name}-%{version}-init.patch
NACK to that bit
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/ BuildRequires: python python-devel -Requires: libxml2
ACk to that
Requires: readline Requires: ncurses Requires: dnsmasq @@ -140,7 +140,8 @@ BuildRequires: parted-devel # For QEMU/LXC numa info BuildRequires: numactl-devel -Obsoletes: libvir +Obsoletes: libvir <= 0.2 +Provides: libvir = %{version}-%{release}
I reckon we can just kill this bit off completely by now. It was only called 'libvir' for one release before we renamed it. I think the RPM only ever existed for a few months in Fedora 5 with this old name.
@@ -157,7 +158,8 @@ %if %{with_xen} Requires: xen-devel %endif -Obsoletes: libvir-devel +Obsoletes: libvir-devel <= 0.2 +Provides: libvir-devel = %{version}-%{release}
%description devel Includes and documentations for the C library providing an API to use @@ -168,7 +170,8 @@ Summary: Python bindings for the libvirt library Group: Development/Libraries Requires: libvirt = %{version} -Obsoletes: libvir-python +Obsoletes: libvir-python <= 0.2 +Provides: libvir-python = %{version}-%{release}
Likewise for these 2 chunks.
@@ -181,6 +184,10 @@ %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 + +mv NEWS NEWS.old +iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS
The NEWS file is auto-generated - might be nicer to just change the XSL file so it generates UTF-8 straight away, instad of the ISO8859-1. The other bits look OK. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Wed, Feb 11, 2009 at 05:25:23PM +0000, Daniel P. Berrange wrote:
I'm not sure about the patch to libvirt.init.in, but rpmlint is quite insistent that we need this, or else we shouldn't start libvirtd by default.
rpmlint is dumb. If we turn it off by default, then we'll just get a steady stream of bugs / confused users, who install libvirt RPM (or the "Virtualization Group" in installer), reboot and find it is not working because the daemon wasn't started. This would be a disservice to our users, which I don't think we should do
Maybe you (or I) misunderstand the change to libvirtd.init.in. Supposedly this change should keep it on by default, AND silence rpmlint as well. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

On Wed, Feb 11, 2009 at 05:33:56PM +0000, Richard W.M. Jones wrote:
On Wed, Feb 11, 2009 at 05:25:23PM +0000, Daniel P. Berrange wrote:
I'm not sure about the patch to libvirt.init.in, but rpmlint is quite insistent that we need this, or else we shouldn't start libvirtd by default.
rpmlint is dumb. If we turn it off by default, then we'll just get a steady stream of bugs / confused users, who install libvirt RPM (or the "Virtualization Group" in installer), reboot and find it is not working because the daemon wasn't started. This would be a disservice to our users, which I don't think we should do
Maybe you (or I) misunderstand the change to libvirtd.init.in. Supposedly this change should keep it on by default, AND silence rpmlint as well.
My understanding is that when we do 'chkconfig --add libvirtd' in the %post section, it loooks at these magic headers we have: # Default-Start: 3 4 5 # chkconfig: 345 97 03 If there is no 'Default-Start', and the first 'chkconfig'field is '-' # chkconfig: - 97 03 then all the initial symlinks in /etc/rc.d/rcX.d will be disabled. So immediately after RPM install, it won't be configured to start on boot, and the user would need to menually run to turn it on chkconfig libvirtd on Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

OK, so I left out the change to init. Attached is the final patch, which I've committed to Rawhide. Are we still copying these changes into the specfile that we ship in the libvirt tarball? Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

On Thu, Feb 12, 2009 at 12:39:00PM +0000, Richard W.M. Jones wrote:
OK, so I left out the change to init. Attached is the final patch, which I've committed to Rawhide. Are we still copying these changes into the specfile that we ship in the libvirt tarball?
Yep, should apply them to CVS, since DV rebases the Fedora spec files to match when doing new release. Forthe NEWS file change though, you could just edit docs/news.xsl and change the XSL template to remove <xsl:output method="text" encoding="ISO-8859-1"/> In favour of <xsl:output method="text" encoding="UTF-8"/>
Index: libvirt.spec =================================================================== RCS file: /cvs/pkgs/rpms/libvirt/devel/libvirt.spec,v retrieving revision 1.109 retrieving revision 1.110 diff -u -r1.109 -r1.110 --- libvirt.spec 6 Feb 2009 19:28:20 -0000 1.109 +++ libvirt.spec 12 Feb 2009 12:35:17 -0000 1.110 @@ -47,7 +47,7 @@ Summary: Library providing a simple API virtualization Name: libvirt Version: 0.6.0 -Release: 2%{?dist}%{?extra_release} +Release: 3%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries Source: libvirt-%{version}.tar.gz @@ -56,7 +56,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/ BuildRequires: python python-devel -Requires: libxml2 Requires: readline Requires: ncurses Requires: dnsmasq @@ -140,7 +139,8 @@ BuildRequires: parted-devel # For QEMU/LXC numa info BuildRequires: numactl-devel -Obsoletes: libvir +Obsoletes: libvir <= 0.2 +Provides: libvir = %{version}-%{release}
# Fedora build root suckage BuildRequires: gawk @@ -152,12 +152,13 @@ %package devel Summary: Libraries, includes, etc. to compile with the libvirt library Group: Development/Libraries -Requires: libvirt = %{version} +Requires: libvirt = %{version}-%{release} Requires: pkgconfig %if %{with_xen} Requires: xen-devel %endif -Obsoletes: libvir-devel +Obsoletes: libvir-devel <= 0.2 +Provides: libvir-devel = %{version}-%{release}
%description devel Includes and documentations for the C library providing an API to use @@ -167,8 +168,9 @@ %package python Summary: Python bindings for the libvirt library Group: Development/Libraries -Requires: libvirt = %{version} -Obsoletes: libvir-python +Requires: libvirt = %{version}-%{release} +Obsoletes: libvir-python <= 0.2 +Provides: libvir-python = %{version}-%{release}
%description python The libvirt-python package contains a module that permits applications @@ -182,6 +184,9 @@ %patch1 -p1 %patch2 -p1
+mv NEWS NEWS.old +iconv -f ISO-8859-1 -t UTF-8 < NEWS.old > NEWS + %build
Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Couple of tiny changes in this patch which were necessary to complete the Fedora Merge Review. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
participants (2)
-
Daniel P. Berrange
-
Richard W.M. Jones