Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Pharaoh_Atem:ZFS
spl
spl.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File spl.spec of Package spl
# debbuild doesn't define _usrsrc yet %if %{_vendor} == "debbuild" %global _usrsrc %{_prefix}/src %endif # On Debian/Ubuntu systems, /bin/sh usually points to /bin/dash, # and we need it to be /bin/bash, so we set it here. %if %{_vendor} == "debbuild" %global _buildshell /bin/bash %endif # Set up the correct DKMS module name, following proper conventions %if %{_vendor} == "debbuild" %global dkmsname %{name}-dkms %else %global dkmsname dkms-%{name} %endif %if %{_vendor} != "debbuild" %global kmodname %{name}-kmod #global kernelvr %(rpm -q --qf '%{VERSION}-%{RELEASE}' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) %global kernelvra %(rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) %global kernels %{kernelvra} %global buildforkernels current %endif %if %{_vendor} != "debbuild" %global rpm_dkms_opt 1 %endif # kmod install path %define _kmod_src_root %{_usrsrc}/%{name}-%{version} Name: spl Version: 0.7.13 Release: 1%{?dist} Summary: Solaris Porting Layer %if %{_vendor} == "debbuild" Group: kernel Packager: Neal Gompa <ngompa@datto.com> %else Group: System Environment/Kernel %endif License: GPLv2+ URL: http://zfsonlinux.org/ Source0: https://github.com/zfsonlinux/zfs/releases/download/zfs-%{version}/%{name}-%{version}.tar.gz ExclusiveArch: %{ix86} x86_64 %if %{_vendor} != "debbuild" BuildRequires: kmodtool-zfs BuildRequires: kernel-rpm-macros BuildRequires: kernel-devel BuildRequires: elfutils-libelf-devel Provides: %{name}-kmod-common = %{version}-%{release} Requires: %{kmodname} = %{version}-%{release} # kmodtool does its magic here %{expand:%(kmodtool --target %{_target_cpu} --kmodname %{name} --devel %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } %else Requires: %{dkmsname} = %{version}-%{release} %endif %description The Solaris Porting Layer (SPL) is a Linux kernel module which provides many of the Solaris kernel APIs. This shim layer makes it possible to run Solaris kernel code in the Linux kernel with relatively minimal modification. %package -n %{dkmsname} Summary: Kernel module sources for %{name} managed by DKMS %if %{_vendor} == "debbuild" Group: kernel %else Group: System Environment/Kernel %endif BuildArch: noarch Requires: gcc, make, perl Requires: dkms >= 2.2.0.2 %if %{_vendor} == "debbuild" # elfutils' libelf is required now for newer kernels Requires: libelf-dev %else # elfutils' libelf is required now for newer kernels Requires: elfutils-libelf-devel # Provide dependency compatibility with the kmod variant and conflict with kmod Provides: %{name}-kmod = %{version}-%{release} Conflicts: kmod-%{name}-devel RemovePathPostfixes: .dkms %endif %description -n %{dkmsname} This package contains the kernel module sources for the Solaris Porting Layer (SPL) that is managed by DKMS. %prep %if %{_vendor} != "debbuild" # error out if there was something wrong with kmodtool %{?kmodtool_check} # print kmodtool output for debugging purposes: kmodtool --target %{_target_cpu} --kmodname %{name} --devel %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} %endif %autosetup %build # Embed downstream version in module sed -e 's/^Version:.*/Version: %{version}/' -e 's/^Release:.*/Release: %{release}/' -i.orig META %if %{_vendor} != "debbuild" cp -a ../%{name}-%{version} ../%{name}-%{version}-kmodbuild pushd ../%{name}-%{version}-kmodbuild %configure --with-config=kernel --with-linux="/usr/src/kernels/%{kernelvra}" %make_build popd %endif scripts/dkms.mkconf -n %{name} -v %{version} -f dkms.conf %configure --with-config=user %make_build %install %if %{_vendor} != "debbuild" pushd ../%{name}-%{version}-kmodbuild %make_install INSTALL_MOD_DIR=extra/%{name} popd # find-debuginfo.sh only considers executables chmod u+x %{buildroot}/lib/modules/%{kernelvra}/extra/*/*/* # Perform UsrMove mv %{buildroot}/lib %{buildroot}%{_prefix} %endif %make_install # Create dummy /etc/hostid file mkdir -p %{buildroot}%{_sysconfdir} printf '\xFF\xFF\xFF\xFF' > %{buildroot}%{_sysconfdir}/hostid # Create source tree make distdir # Install kernel sources mkdir -p %{buildroot}%{_usrsrc} mv %{name}-%{version} %{buildroot}%{_usrsrc}/%{name}-%{version}.dkms cp dkms.conf %{buildroot}%{_kmod_src_root}.dkms %if %{_vendor} == "debbuild" # Set to correct path mv %{buildroot}%{_usrsrc}/%{name}-%{version}.dkms %{buildroot}%{_usrsrc}/%{name}-%{version} %endif # Fix name of splslab mv %{buildroot}%{_bindir}/splslab.py %{buildroot}%{_bindir}/splslab %preun -n %{dkmsname} if [ "$(dkms status -m %{name} -v %{version})" ]; then dkms remove -m %{name} -v %{version} --all %{?rpm_dkms_opt:--rpm_safe_upgrade} fi %post -n %{dkmsname} %if %{_vendor} == "debbuild" if [ "$1" = "configure" ]; then %else if [ "$1" -ge "1" ]; then %endif if [ -f /usr/lib/dkms/common.postinst ]; then /usr/lib/dkms/common.postinst %{name} %{version} exit $? fi fi %post # ZFS requires stable values for hostid HOSTID=$(hostid) if [ -f /etc/hostid -a "0x$HOSTID" != "0xffffffff" ]; then exit 0 fi # Truncate the dummy file and generate the actual system hostid. : >/etc/hostid HOSTID=$(hostid) # WARNING: Not compatible on big endian systems AA=$(echo $HOSTID | cut -b 1,2) BB=$(echo $HOSTID | cut -b 3,4) CC=$(echo $HOSTID | cut -b 5,6) DD=$(echo $HOSTID | cut -b 7,8) # Invoke the external printf because the dash builtin lacks the byte format. "$(which printf)" "\x$DD\x$CC\x$BB\x$AA" >"/etc/hostid" %files %license COPYING DISCLAIMER %doc AUTHORS %{_bindir}/* %{_sbindir}/* %{_mandir}/man1/*.1.* %{_mandir}/man5/*.5.* %config %{_sysconfdir}/hostid %files -n %{dkmsname} %license COPYING DISCLAIMER %doc AUTHORS %if %{_vendor} != "debbuild" %{_kmod_src_root}.dkms %else %dir %{_kmod_src_root} %{_kmod_src_root}/* %endif %changelog * Thu Apr 25 08:02:09 EDT 2019 Neal Gompa <ngompa@datto.com> - 0.7.13 - Upgrade to 0.7.13 * Wed Sep 19 15:12:01 EDT 2018 Neal Gompa <ngompa@datto.com> - 0.7.11 - Upgrade to 0.7.11 * Tue Sep 11 22:23:36 EDT 2018 Neal Gompa <ngompa@datto.com> - 0.7.10 - Upgrade to 0.7.10 * Tue Apr 10 07:31:28 EDT 2018 Neal Gompa <ngompa@datto.com> - 0.7.8 - Upgrade to 0.7.8 * Sat Mar 31 23:13:46 EDT 2018 Neal Gompa <ngompa@datto.com> - Don't run kmodtool in prep on Debian/Ubuntu * Sat Mar 31 22:30:12 EDT 2018 Neal Gompa <ngompa@datto.com> - 0.7.7 - Upgrade to 0.7.7 * Tue Feb 6 20:36:04 EST 2018 Neal Gompa <ngompa@datto.com> - 0.7.6 - Upgrade to 0.7.6 * Sun Feb 4 00:32:54 EST 2018 Neal Gompa <ngompa@datto.com> - Add elfutils-libelf-devel to fix kmod builds * Sun Jan 28 21:21:03 EST 2018 Neal Gompa <ngompa@datto.com> - 0.7.5 - Upgrade to 0.7.5 * Mon Jan 1 13:13:07 EST 2018 Neal Gompa <ngompa@datto.com> - Add support for building kmods for non-Debian * Wed Dec 13 2017 Neal Gompa <ngompa@datto.com> - 0.7.4 - Upgrade to 0.7.4 * Tue Oct 31 2017 Neal Gompa <ngompa@datto.com> - 0.7.3 - Upgrade to 0.7.3 * Thu Oct 12 2017 Neal Gompa <ngompa@datto.com> - 0.7.2 - Upgrade to 0.7.2 * Mon Aug 14 2017 Mark Bluemer <mbluemer@datto.com> - 0.7.1 - Upgrade to 0.7.1 * Thu Aug 03 2017 Neal Gompa <ngompa@datto.com> - 0.7.0 - Upgrade to 0.7.0 * Fri Apr 21 2017 Neal Gompa <ngompa@datto.com> - 0.6.5.9 - Upgrade to 0.6.5.9 * Thu Sep 29 2016 Neal Gompa <ngompa@datto.com> - 0.6.5.8 - Upgrade to 0.6.5.8 * Tue Aug 30 2016 Neal Gompa <ngompa@datto.com> - 0.6.5.7 - Initial packaging
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor