mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
build: install libvirt sysctl file correctly
https://bugzilla.redhat.com/show_bug.cgi?id=887017 reports that
even though libvirt attempts to set fs.aio-max-nr via sysctl,
the file was installed with the wrong name and gets ignored by
sysctl. Furthermore, 'man systcl.d' recommends that packages
install into hard-coded /usr/lib/sysctl.d (even when libdir is
/usr/lib64), so that sysadmins can use /etc/sysctl.d for overrides.
* daemon/Makefile.am (install-sysctl, uninstall-sysctl): Use
correct location.
* libvirt.spec.in (network_files): Reflect this.
(cherry picked from commit a1fd56cb30
)
This commit is contained in:
parent
1a32232e57
commit
9330984eef
@ -267,14 +267,16 @@ uninstall-sysconfig:
|
|||||||
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
||||||
|
|
||||||
if WITH_SYSCTL
|
if WITH_SYSCTL
|
||||||
|
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
|
||||||
|
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
|
||||||
install-sysctl:
|
install-sysctl:
|
||||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d
|
$(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
|
||||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||||
$(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
$(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||||
|
|
||||||
uninstall-sysctl:
|
uninstall-sysctl:
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||||
rmdir $(DESTDIR)$(sysconfdir)/sysctl.d || :
|
rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
|
||||||
else
|
else
|
||||||
install-sysctl:
|
install-sysctl:
|
||||||
uninstall-sysctl:
|
uninstall-sysctl:
|
||||||
|
@ -1632,9 +1632,9 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||||
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
|
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
|
||||||
%config(noreplace) %{_sysconfdir}/sysctl.d/libvirtd
|
%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||||
%else
|
%else
|
||||||
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
|
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
|
||||||
%endif
|
%endif
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
||||||
|
Loading…
Reference in New Issue
Block a user