File kmod-testsuite.spec of Package kmod

# spec file for package kmod-testsuite
# Copyright (c) 2018 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

Name:           kmod-testsuite
%define lname	libkmod2
Version:        25
Release:        0
Summary:        Testsuite of the kmod package
License:        LGPL-2.1-or-later AND GPL-2.0-or-later
Group:          System/Kernel

#Git-Clone:	git://
Patch0:         libkmod-signature-implement-pkcs7-parsing-with-asn1c.patch
Patch1:         0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
Patch2:         0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
Patch3:         0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
Patch4:         0010-modprobe-Implement-allow-unsupported-modules.patch
Patch5:         0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6:         libkmod-signature-Fix-crash-when-module-signature-is.patch
Patch7:         libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch
Patch8:         0012-modprobe-print-unsupported-status.patch
Patch9:         enum.patch
Patch10:        depmod-Prevent-module-dependency-files-missing-durin.patch
Patch11:        depmod-Prevent-module-dependency-files-corruption-du.patch
Patch12:        depmod-shut-up-gcc-insufficinet-buffer-warning.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  asn1c
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  git-core
BuildRequires:  kernel-default-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig >= 0.21
BuildRequires:  xz
BuildRequires:  pkgconfig(liblzma) >= 4.99
BuildRequires:  pkgconfig(zlib)
Requires:       suse-module-tools
%if !0%{?is_opensuse}
ExcludeArch:    %ix86 s390
%define kdir /usr/src/linux-obj/%_target_cpu/default

This spec file does not produce any binary RPMs. It just builds kmod and
runs its testsuite. It has been split off the kmod package to avoid a
buildloop with the kernel.

%setup -q -n kmod-%version
%autopatch -p1

autoreconf -fi
export LDFLAGS="-Wl,-z,relro,-z,now"
# The extra --includedir gives us the possibility to detect dependent
# packages which fail to properly use pkgconfig.
%configure \
	--with-xz \
	--with-zlib \
	--includedir="%_includedir/kmod" \
	--with-rootlibdir="%_libdir" \
make -C libkmod/pkcs7/asn1c-gen regen
make %{?_smp_mflags} V=1 KDIR="%kdir"

# empty

%ifarch ppc64
make check V=1 KDIR="%kdir" || echo "Warning: bypass boo#897845"
make check V=1 KDIR="%kdir"

openSUSE Build Service is sponsored by