Change in vdsm[ovirt-3.4]: spec: Move /lib files to /usr/lib
ybronhei at redhat.com
ybronhei at redhat.com
Mon Oct 6 13:37:08 UTC 2014
Hello Dima Kuznetsov, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/33854
to review the following change.
Change subject: spec: Move /lib files to /usr/lib
......................................................................
spec: Move /lib files to /usr/lib
Fedora 19+ and EL7 stopped using /lib which is now a symbolic link to
/usr/lib and deprecated installing files to /lib.
We store the following files in /lib:
* systemd configs:
Not present on EL6, if using systemd always install to /usr/lib.
* udev rules:
Checks if current version is EL6 and installs to old or new path
accordingly.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1121494
Change-Id: I091174b7126ad3196c1670803eb16a5b5591a89a
Signed-off-by: Dima Kuznetsov <dkuznets at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/30869
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/30963
---
M vdsm.spec.in
1 file changed, 13 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/33854/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 66427e1..102f7ec 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -44,6 +44,12 @@
%global with_tmpfiles_macro 1
%endif
+%if 0%{?rhel} == 6
+%global _udevrulesdir /lib/udev/rules.d/
+%else
+%global _udevrulesdir /usr/lib/udev/rules.d/
+%endif
+
Name: %{vdsm_name}
Version: @PACKAGE_VERSION@
Release: @PACKAGE_RELEASE@%{?dist}%{?extra_release}
@@ -619,18 +625,18 @@
# Install the lvm rules
install -Dm 0644 vdsm/storage/vdsm-lvm.rules \
- %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules
+ %{buildroot}%{_udevrulesdir}/12-vdsm-lvm.rules
install -Dm 0644 vdsm/limits.conf \
%{buildroot}/etc/security/limits.d/99-vdsm.conf
%if 0%{?with_systemd}
-install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/lib/systemd/systemd-vdsmd
+install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/usr/lib/systemd/systemd-vdsmd
install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service
install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service
install -Dm 0755 vdsm_reg/vdsm-reg.init \
- %{buildroot}/lib/systemd/systemd-vdsm-reg
+ %{buildroot}/usr/lib/systemd/systemd-vdsm-reg
install -Dm 0644 vdsm_reg/vdsm-reg.service \
%{buildroot}%{_unitdir}/vdsm-reg.service
install -Dm 0644 vdsm/vdsm-modules-load.d.conf \
@@ -816,7 +822,7 @@
# fallback to vdsmd reconfigure api - This change may be removed
# when vdsm won't support any downgrade\upgrade to versions that
# don't include vdsm-tool configure api (vdsm <= 3.3)
- for f in '/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do
+ for f in '/usr/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do
if [ -f "${f}" ]; then
"${f}" reconfigure >/dev/null 2>&1 || :
fi
@@ -888,7 +894,7 @@
%defattr(-, root, root, -)
%doc COPYING README lib/vdsm/vdsm.conf.sample
%if 0%{?with_systemd}
-/lib/systemd/systemd-vdsmd
+/usr/lib/systemd/systemd-vdsmd
%{_unitdir}/vdsmd.service
%{_unitdir}/supervdsmd.service
%else
@@ -1094,7 +1100,7 @@
%exclude %{_datadir}/%{vdsm_name}/gluster/*
%endif
%{python_sitelib}/sos/plugins/vdsm.py*
-/lib/udev/rules.d/12-vdsm-lvm.rules
+%{_udevrulesdir}/12-vdsm-lvm.rules
/etc/security/limits.d/99-vdsm.conf
%{_mandir}/man8/vdsmd.8*
%if 0%{?rhel}
@@ -1394,7 +1400,7 @@
%ghost %dir /data
%ghost %dir %attr(0775, root, root) /data/updates
%if 0%{?with_systemd}
-/lib/systemd/systemd-vdsm-reg
+/usr/lib/systemd/systemd-vdsm-reg
%{_unitdir}/vdsm-reg.service
%else
%{_initrddir}/vdsm-reg
--
To view, visit http://gerrit.ovirt.org/33854
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I091174b7126ad3196c1670803eb16a5b5591a89a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
More information about the vdsm-patches
mailing list