Adrian Schröter e9cfd5
#
Michal Marek 0b9e9a
# spec file for package kernel-obs-qa
Adrian Schröter e9cfd5
#
Takashi Iwai 39a1fc
# Copyright (c) @YEAR@ SUSE LLC
Adrian Schröter e9cfd5
#
Adrian Schröter e9cfd5
# All modifications and additions to the file contributed by third parties
Adrian Schröter e9cfd5
# remain the property of their copyright owners, unless otherwise agreed
Adrian Schröter e9cfd5
# upon. The license for this file, and modifications and additions to the
Adrian Schröter e9cfd5
# file, is the same license as for the pristine package itself (unless the
Adrian Schröter e9cfd5
# license for the pristine package is not an Open Source License, in which
Adrian Schröter e9cfd5
# case the license is the MIT License). An "Open Source License" is a
Adrian Schröter e9cfd5
# license that conforms to the Open Source Definition (Version 1.9)
Adrian Schröter e9cfd5
# published by the Open Source Initiative.
Adrian Schröter e9cfd5
77b5f8
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Adrian Schröter e9cfd5
#
Adrian Schröter e9cfd5
# needsrootforbuild
Adrian Schröter e9cfd5
Michal Marek 0b9e9a
Michal Marek b2e5f7
%define patchversion @PATCHVERSION@
Michal Marek b2e5f7
%define variant @VARIANT@%{nil}
Michal Marek b2e5f7
Michal Marek b2e5f7
%include %_sourcedir/kernel-spec-macros
Michal Marek b2e5f7
Michal Marek f4797c
Name:           kernel-obs-qa
Michal Marek f4797c
BuildRequires:  kernel-default
Adrian Schröter 7a16a4
# kernel-obs-build must be also configured as VMinstall, but is required
Adrian Schröter 7a16a4
# here as well to avoid that qa and build package build parallel
Adrian Schröter 7a16a4
BuildRequires:  kernel-obs-build
Michal Marek f65016
BuildRequires:  modutils
Michal Marek b2e5f7
ExclusiveArch:  @ARCHS@
Adrian Schröter e9cfd5
%if 0%{?suse_version} < 1200
Adrian Schröter e9cfd5
# for SLE 11
Adrian Schröter e9cfd5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Adrian Schröter e9cfd5
%endif
Michal Marek 0b9e9a
Summary:        Basic QA tests for the kernel
Michal Kubecek f888e0
License:        GPL-2.0-only
Michal Marek 0b9e9a
Group:          SLES
Michal Marek b2e5f7
Version:        @RPMVERSION@
Michal Marek b2e5f7
%if 0%{?is_kotd}
Michal Marek b2e5f7
Release:        <RELEASE>.g@COMMIT@
Michal Marek b2e5f7
%else
Michal Marek b2e5f7
Release:        @RELEASE@
Michal Marek b2e5f7
%endif
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
%description
Adrian Schröter e9cfd5
This package is using the kernel compiled within Open Build Service(OBS)
Adrian Schröter e9cfd5
projects and runs basic tests.
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
%prep
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
%build
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
%check
Adrian Schröter e9cfd5
# More tests are comming, currently the main test is the existens of
Adrian Schröter e9cfd5
# this spec file. It does trigger a build within OBS VM which is using
Adrian Schröter e9cfd5
# the kernel of the same project.
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
# test suites should be packaged in other packages, but build required
Adrian Schröter e9cfd5
# and called here.
Adrian Schröter e9cfd5
Michal Marek 28e9e7
krel=$(uname -r)
6f5ed0
if test ! -d "/lib/modules/$krel/kernel" && test ! -d "/usr/lib/modules/$krel/kernel"; then
Michal Marek 28e9e7
	echo "Kernel package for $krel not installed; exiting"
Michal Marek 28e9e7
	exit 0
Adrian Schröter 381166
fi
Michal Marek 28e9e7
/sbin/modprobe loop
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
%install
Michal Marek 717e96
mkdir -p %{buildroot}/usr/share/%name
Michal Marek 717e96
touch %{buildroot}/usr/share/%name/logfile
Adrian Schröter e9cfd5
Adrian Schröter e9cfd5
%files
Adrian Schröter e9cfd5
%defattr(-,root,root)
Michal Marek 717e96
/usr/share/%name
Adrian Schröter e9cfd5
Michal Marek 0b9e9a
%changelog