SRPM build farm / mock itergration

This commit is contained in:
Brian Behlendorf 2009-06-26 09:40:14 -07:00
parent 07114bdee9
commit e28bc9160d

View File

@ -18,7 +18,7 @@
%if %{defined sles_version} %if %{defined sles_version}
%if %{undefined kver} %if %{undefined kver}
%define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu}
%define kver %(%{__cat} %{klnk}/.kernelrelease) %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease 2>/dev/null) | tail -1)
%endif %endif
%define kpkg kernel-%{_target_cpu} %define kpkg kernel-%{_target_cpu}
%define kdevpkg kernel-source kernel-syms %define kdevpkg kernel-source kernel-syms
@ -31,7 +31,7 @@
%if %{defined ch4} %if %{defined ch4}
%if %{undefined kver} %if %{undefined kver}
%define klnk %{_usrsrc}/kernels/*/include/config %define klnk %{_usrsrc}/kernels/*/include/config
%define kver %((%{__cat} %{klnk}/kernel.release) | tail -1) %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1)
%endif %endif
%define kpkg chaos-kernel %define kpkg chaos-kernel
%define kdevpkg chaos-kernel-devel %define kdevpkg chaos-kernel-devel
@ -44,7 +44,7 @@
%if %{defined fedora} || %{defined rhel} %if %{defined fedora} || %{defined rhel}
%if %{undefined kver} %if %{undefined kver}
%define klnk %{_usrsrc}/kernels/*/include/config %define klnk %{_usrsrc}/kernels/*/include/config
%define kver %((%{__cat} %{klnk}/kernel.release) | tail -1) %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1)
%endif %endif
%define kpkg kernel %define kpkg kernel
%define kdevpkg kernel-devel %define kdevpkg kernel-devel
@ -80,9 +80,14 @@
%define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g') %define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g')
%endif %endif
# Required by mock to ensure valid 'Requires' and 'BuildRequires' fields
# are set even when a specific kernel version was not requested. This is
# used when mock is attempting to rebuild the srpm for the latest kernel.
%if %{defined require_kver} %if %{defined require_kver}
%define buildrequires %{kdevpkg}=%{require_kver} %define requires %{kpkg}=%{kverpkg}
%define buildrequires %{kdevpkg}=%{kverpkg}
%else %else
%define requires %{kpkg}
%define buildrequires %{kdevpkg} %define buildrequires %{kdevpkg}
%endif %endif
@ -95,7 +100,7 @@ License: GPL
URL: git://eris.llnl.gov/spl.git URL: git://eris.llnl.gov/spl.git
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
Source: %{name}-%{version}.tar.gz Source: %{name}-%{version}.tar.gz
Requires: %{kpkg} = %{kverpkg} Requires: %{requires}
BuildRequires: %{buildrequires} BuildRequires: %{buildrequires}
%description %description
@ -107,7 +112,7 @@ kstat, mutex, rwlock, taskq, thread, time, and vnode APIs.
%package devel %package devel
Summary: Solaris Porting Layer Headers and Symbols Summary: Solaris Porting Layer Headers and Symbols
Group: Development/Libraries Group: Development/Libraries
Requires: %{kpkg} = %{kverpkg} Requires: %{requires}
BuildRequires: %{buildrequires} BuildRequires: %{buildrequires}
%description devel %description devel