From 24d35edf0180523b73c4d5e804ccbffe9ec85657 Mon Sep 17 00:00:00 2001 From: Gregoire Bellon-Gervais Date: Mon, 29 Jan 2018 15:07:43 +0100 Subject: [PATCH 1/4] [build] Fixed support for --libddir under Ubuntu Signed-off-by: Gregoire Bellon-Gervais --- config/zfs-build.m4 | 3 ++- rpm/generic/zfs.spec.in | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index adc99edf592d..c8a3fde65d54 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -185,7 +185,8 @@ AC_DEFUN([ZFS_AC_RPM], [ RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"' RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"' - RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"' + RPM_DEFINE_UTIL='--define "_libdir $(libdir)"' + RPM_DEFINE_UTIL+=' --define "_dracutdir $(dracutdir)"' RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"' RPM_DEFINE_UTIL+=' --define "_udevruledir $(udevruledir)"' RPM_DEFINE_UTIL+=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"' diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index faa73e3b794f..ab88198e6122 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -1,5 +1,13 @@ %global _sbindir /sbin -%global _libdir /%{_lib} + +# Set the default libdir directory based on distribution. +%if %{undefined _libdir} +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 +%global _libdir %{_lib} +%else +%global _libdir /lib +%endif +%endif # Set the default udev directory based on distribution. %if %{undefined _udevdir} From cb3ba8f4b99dce11bfa1f3ef3d9c1d0a64c480b4 Mon Sep 17 00:00:00 2001 From: albundy83 Date: Mon, 29 Jan 2018 16:35:17 +0100 Subject: [PATCH 2/4] Fixed typo --- rpm/generic/zfs.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index ab88198e6122..54c959ee7245 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -3,7 +3,7 @@ # Set the default libdir directory based on distribution. %if %{undefined _libdir} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 -%global _libdir %{_lib} +%global _libdir /%{_lib} %else %global _libdir /lib %endif From 3e926f000885d73b5e73d36298c3cbd58a88e4de Mon Sep 17 00:00:00 2001 From: Gregoire Bellon-Gervais Date: Mon, 29 Jan 2018 17:08:55 +0100 Subject: [PATCH 3/4] Revert "Fixed typo" Update commit message This reverts commit cb3ba8f4b99dce11bfa1f3ef3d9c1d0a64c480b4. --- rpm/generic/zfs.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index 54c959ee7245..ab88198e6122 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -3,7 +3,7 @@ # Set the default libdir directory based on distribution. %if %{undefined _libdir} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 -%global _libdir /%{_lib} +%global _libdir %{_lib} %else %global _libdir /lib %endif From 86bf39ec276769296994e2f4c750e32d1a70bb2e Mon Sep 17 00:00:00 2001 From: Gregoire Bellon-Gervais Date: Mon, 29 Jan 2018 17:09:58 +0100 Subject: [PATCH 4/4] [build] Fixed missing / Signed-off-by: Gregoire Bellon-Gervais --- rpm/generic/zfs.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index ab88198e6122..54c959ee7245 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -3,7 +3,7 @@ # Set the default libdir directory based on distribution. %if %{undefined _libdir} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 -%global _libdir %{_lib} +%global _libdir /%{_lib} %else %global _libdir /lib %endif