oracleasm/oracleasm.spec

127 lines
3.7 KiB
RPMSpec

#
# spec file for package oracleasm
#
# Copyright (c) 2023 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# nodebuginfo
# needssslcertforbuild
# set buildrt 1 (old 0)
%ifarch x86_64
# Enable RT builds for SLE-15-SP6
%define buildrt 1
%endif
Name: oracleasm
Url: https://github.com/oracle/linux-uek
Version: 2.0.8
Release: 0
Summary: Kernel driver backing the Generic Linux ASM Library
# from https://github.com/oracle/linux-uek, branch uek6/u3.
License: GPL-2.0
Group: System/Kernel
Source0: %{name}-%{version}-uek6-u3.tar.xz
Source1: Module.supported
Source2: oracleasm.preamble
Patch1: oracleasm-rename-BIO_MAX_PAGES-to-BIO_MAX_VECS.patch
Patch2: oracleasm-fix-use-of-BDI_CAP_-values-no-longer-present.patch
Patch3: oracleasm-convert-blkdev_get-to-blkdev_get_by_dev.patch
Patch4: oracleasm-use-timespec64.patch
Patch5: oracleasm-handle-compat_timespec.patch
Patch6: oracleasm-add-namespace-arg-where-needed.patch
Patch7: oracleasm-add-needed-include.patch
Patch8: oracleasm-asm_bio_map_user_iov-and-asm_bio_unmap-update-for-5.15+-kernel.patch
Patch9: oracleasm-there-is-no-BIP_USER_MAPPED-flag.patch
patch10: oracleasm-work-with-6.4-kernel.patch
patch11: oracleasm-work-with-6.5-kernel.patch
Patch12: oracleasm-fix-sle-15-sp5-issues.patch
Patch13: oracleasm-handle-FMODE_EXCL-removal.patch
Patch14: oracleasm-handle-blkdev_put-holder-change.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: oracleasm-kmp
BuildRequires: kernel-syms
BuildRequires: module-init-tools
%if 0%{?buildrt}
BuildRequires: kernel-syms-rt
%endif
ExcludeArch: %ix86 s390
%suse_kernel_module_package -n %{name} -p %{S:2} kdump um
%description
This package provides kernel module for ASMLib. You need oracleasmlib
and oracleasm-support package to use this.
Authors:
--------
Joel Becker <joel.becker@oracle.com>
%package KMP
Summary: Kernel driver backing the Generic Linux ASM Library
Group: System/Kernel
%description KMP
This package provides KMP modules for oracleasm. You need oracleasmlib
and oracleasm-support package to use this.
%prep
%define subdir drivers/block/oracleasm
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
cp %{_sourcedir}/Module.supported %{subdir}/Module.supported
set -- *
mkdir source
mv "$@" source/
ln -s source/* .
mkdir obj
%build
export CONFIG_ORACLEASM=m
for flavor in %{flavors_to_build}; do
rm -rf obj/$flavor
cp -r source obj/$flavor
make -k %{?_smp_mflags} -C /usr/src/linux-obj/%{_target_cpu}/$flavor \
M=$PWD/obj/$flavor/%{subdir} \
KCPPFLAGS="-I$PWD/obj/$flavor/include" \
modules
done
%install
export CONFIG_ORACLEASM=m
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
export BRP_PESIGN_FILES="*.ko /lib/firmware"
for flavor in %{flavors_to_build}; do
make -C /usr/src/linux-obj/%{_target_cpu}/$flavor \
modules_install M=$PWD/obj/$flavor/%{subdir}
done
%changelog