mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-11-07 06:44:54 +03:00
Fix various generic kmod RPM spec issues.
There are a number of issues with the generic kmod RPM spec in its
current state:
- The "%{__id_u}" macro seems to not be available on some systems (e.g.
Debian squeeze). It appears it has been deprecated. Use "${__id} -u"
instead.
- The way the "--with-linux=" configure option is generated in the
non-RHEL/Fedora case is completely wrong with various newline and
escaping issues (also, $kernel_version is not available in the
generator context).
The second issue made the generator shell snippet (almost) silently
fail, which under specific circumstances can result in broken builds
against the wrong kernel sources.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1416
This commit is contained in:
parent
f706421173
commit
c4933aade7
@ -15,7 +15,7 @@ License: @ZFS_META_LICENSE@
|
|||||||
URL: http://zfsonlinux.org/
|
URL: http://zfsonlinux.org/
|
||||||
Source0: %{module}-%{version}.tar.gz
|
Source0: %{module}-%{version}.tar.gz
|
||||||
Source10: kmodtool
|
Source10: kmodtool
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
|
||||||
|
|
||||||
# The developments headers will conflict with the dkms packages.
|
# The developments headers will conflict with the dkms packages.
|
||||||
Conflicts: %{module}-dkms
|
Conflicts: %{module}-dkms
|
||||||
@ -90,12 +90,12 @@ for kernel_version in %{?kernel_versions}; do
|
|||||||
--with-linux="${kernel_version##*___}" \
|
--with-linux="${kernel_version##*___}" \
|
||||||
--with-linux-obj="${kernel_version##*___}" \
|
--with-linux-obj="${kernel_version##*___}" \
|
||||||
%else
|
%else
|
||||||
--with-linux=\
|
--with-linux="$( \
|
||||||
%(if [ -e /lib/modules/${kernel_version%%___*}/source ]; then \
|
if [ -e "/lib/modules/${kernel_version%%___*}/source" ]; then \
|
||||||
echo "/lib/modules/${kernel_version%%___*}/source" \
|
echo "/lib/modules/${kernel_version%%___*}/source"; \
|
||||||
else \
|
else \
|
||||||
echo "/lib/modules/${kernel_version%%___*}/build" \
|
echo "/lib/modules/${kernel_version%%___*}/build"; \
|
||||||
fi) \
|
fi)" \
|
||||||
--with-linux-obj="/lib/modules/${kernel_version%%___*}/build" \
|
--with-linux-obj="/lib/modules/${kernel_version%%___*}/build" \
|
||||||
%endif
|
%endif
|
||||||
--with-spl="/usr/src/spl-%{version}" \
|
--with-spl="/usr/src/spl-%{version}" \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user