[node-patches] Change in ovirt-node[master]: fix dracut config

mburns at redhat.com mburns at redhat.com
Thu Aug 30 23:37:51 UTC 2012


Michael Burns has uploaded a new change for review.

Change subject: fix dracut config
......................................................................

fix dracut config

Dracut modules were moved on some distros to /usr/lib
but others are still in /usr/share.  Handle this in both
spec and Makefiles.

Change-Id: I1772032a908d5b149426906952096b866d7d8826
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M configure.ac
M dracut/Makefile.am
M ovirt-node.spec.in
3 files changed, 7 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/43/7643/1

diff --git a/configure.ac b/configure.ac
index 8979c02..aef6a50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,7 @@
 AC_SUBST([FEDORA],[[`rpm --eval '%{fedora}'|sed 's/[^0-9]//g'`]])
 AC_SUBST([RHEL], [[`rpm --eval '%{rhel}'|sed 's/[^0-9]//g'`]])
 AC_SUBST([CENTOS], [[`rpm --eval '%{centos}'|sed 's/[^0-9]//g'`]])
+AC_SUBST([DRACUTDIR], [[`test -e /usr/share/dracut && echo "/usr/share/dracut/modules.d" || echo "/usr/lib/dracut/modules.d"`]])
 AC_SUBST([DISTRO])
 AC_SUBST([PACKAGE_NAME])
 AC_SUBST([PRODUCT_NAME])
diff --git a/dracut/Makefile.am b/dracut/Makefile.am
index 926b477..ea70a47 100644
--- a/dracut/Makefile.am
+++ b/dracut/Makefile.am
@@ -15,7 +15,7 @@
 # MA  02110-1301, USA.  A copy of the GNU General Public License is
 # also available at http://www.gnu.org/copyleft/gpl.html.
 
-dracutdir = $(prefix)/lib/dracut/modules.d/91ovirtnode
+dracutdir = @DRACUTDIR@/91ovirtnode
 dracutconfdir = $(sysconfdir)/dracut.conf.d
 
 dist_dracut_SCRIPTS = \
diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index b2ee106..1dd32b2 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -7,7 +7,7 @@
 %define is_rhel_systemd %(test 0%{?rhel} -ne 0 && test %{?rhel} -ge 7 && echo 1 || echo 0)
 %define is_centos_systemd %(test 0%{?centos} -ne 0 && test %{?centos} -ge 7 && echo 1 || echo 0)
 %define is_systemd %( test %{is_rhel_systemd} -eq 1 || test %{is_centos_systemd} = 1 || test %{is_fedora_systemd} = 1 && echo 1 || echo 0)
-
+%define dracutdir %(test -e /usr/share/dracut && echo "/usr/share/dracut/modules.d" || echo "/usr/lib/dracut/modules.d")
 
 
 Summary:        The %{product_family} daemons/scripts
@@ -20,7 +20,7 @@
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 URL:            http://www.ovirt.org/
-BuildRequires:  python-setuptools python-devel
+BuildRequires:  python-setuptools python-devel dracut
 BuildRequires:  automake autoconf
 %if %{is_systemd}
 BuildRequires:  systemd-units
@@ -267,9 +267,9 @@
 %{app_root}/dracut-93724aa28fc20c8b7f0167201d1759b7118ba890.patch
 %endif
 
-%{_prefix}/lib/dracut/modules.d/91ovirtnode/module-setup.sh
-%{_prefix}/lib/dracut/modules.d/91ovirtnode/ovirt-boot-functions
-%{_prefix}/lib/dracut/modules.d/91ovirtnode/ovirt-cleanup.sh
+%{dracutdir}/91ovirtnode/module-setup.sh
+%{dracutdir}/91ovirtnode/ovirt-boot-functions
+%{dracutdir}/91ovirtnode/ovirt-cleanup.sh
 %{_sysconfdir}/dracut.conf.d/ovirt-dracut.conf
 %{_libexecdir}/ovirt-auto-install
 %{_libexecdir}/ovirt-config-boot


--
To view, visit http://gerrit.ovirt.org/7643
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1772032a908d5b149426906952096b866d7d8826
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>



More information about the node-patches mailing list