[libvirt] Patch replaces scriptlets with new systemd macros

Eric Blake eblake at redhat.com
Mon Oct 29 20:53:31 UTC 2012


On 10/29/2012 05:56 AM, Daniel P. Berrange wrote:
> On Fri, Oct 26, 2012 at 08:09:54AM +0200, Václav Pavlín wrote:
>> Eric Blake píše v Čt 25. 10. 2012 v 10:41 -0600:
>>> Hello,
>>
>>> Ah, then maybe you did answer the big question.  Except that I don't see
>>> the updated patch - did you forget to attach it?
>>
>> Sure, I did forgot, sorry. Here it is...
>>
> 
>> diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
>> index b7afadf..b78c301 100644
>> --- a/daemon/libvirtd.service.in
>> +++ b/daemon/libvirtd.service.in
>> @@ -7,6 +7,7 @@
>>  Description=Virtualization daemon
>>  Before=libvirt-guests.service
>>  After=network.target
>> +Requires=cgconfig.service
> 
> I explicitly left that out when i created the libvirtd.service file.
> Since systemd itself is capable of setting up cgroups by default, the
> common need for cgconfig.service has gone away. A minority of people
> may still wish to use it, but they can customize the libvirtd.service
> file themselves if desired - we shouldn't force cgconfig.service onto
> everyone esle.

Then why are we explicitly starting cgconfig.service in the spec file?
Shouldn't the argument go that only those people customizing the service
file to use cgconfig need cgconfig enabled in the first place?  In other
words, is there anything wrong with this one-liner?

diff --git i/libvirt.spec.in w/libvirt.spec.in
index ebebfab..9d11328 100644
--- i/libvirt.spec.in
+++ w/libvirt.spec.in
@@ -1465,13 +1465,12 @@ done
 %endif

 %if %{with_systemd}
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /bin/systemctl enable libvirtd.service >/dev/null 2>&1 || :
-    /bin/systemctl enable cgconfig.service >/dev/null 2>&1 || :
 fi
 %else
 %if %{with_cgconfig}
 # Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
 # and cgconfig is no longer a necessary service.
 %if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16)


-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121029/90a34d3e/attachment-0001.sig>


More information about the libvir-list mailing list