spec.in: handle src.rpm and mock build
This commit is contained in:
parent
502e8891de
commit
f71aebfe7f
@ -1,3 +1,4 @@
|
|||||||
ifeq ($(PACKAGE_SET),dom0)
|
ifeq ($(PACKAGE_SET),dom0)
|
||||||
RPM_SPEC_FILES := kernel.spec
|
RPM_SPEC_FILES := kernel.spec
|
||||||
|
NO_ARCHIVE := 1
|
||||||
endif
|
endif
|
||||||
|
@ -2,15 +2,11 @@
|
|||||||
# Based on the Open SUSE kernel-spec & Fedora kernel-spec.
|
# Based on the Open SUSE kernel-spec & Fedora kernel-spec.
|
||||||
#
|
#
|
||||||
|
|
||||||
%if 0%{?qubes_builder}
|
|
||||||
%define _sourcedir %(pwd)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%define variant pvops.qubes
|
%define variant pvops.qubes
|
||||||
%define plainrel %(cat rel)
|
%define plainrel @REL@
|
||||||
%define rel %{plainrel}.%{variant}
|
%define rel %{plainrel}.%{variant}
|
||||||
%define version %(cat version)
|
%define version @VERSION@
|
||||||
%define name_suffix %(cat suffix)
|
%define name_suffix -latest
|
||||||
|
|
||||||
%define _buildshell /bin/bash
|
%define _buildshell /bin/bash
|
||||||
%define build_xen 1
|
%define build_xen 1
|
||||||
@ -26,8 +22,6 @@
|
|||||||
%define kernel_build_dir %my_builddir/linux-obj
|
%define kernel_build_dir %my_builddir/linux-obj
|
||||||
%define vm_install_dir /var/lib/qubes/vm-kernels/%version-%{plainrel}
|
%define vm_install_dir /var/lib/qubes/vm-kernels/%version-%{plainrel}
|
||||||
|
|
||||||
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes})
|
|
||||||
|
|
||||||
%define install_vdso 1
|
%define install_vdso 1
|
||||||
%define debuginfodir /usr/lib/debug
|
%define debuginfodir /usr/lib/debug
|
||||||
|
|
||||||
@ -90,20 +84,32 @@ Conflicts: lvm2 < 2.02.33
|
|||||||
Provides: kernel = %kernelrelease
|
Provides: kernel = %kernelrelease
|
||||||
Provides: kernel-uname-r = %kernelrelease
|
Provides: kernel-uname-r = %kernelrelease
|
||||||
|
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
ExclusiveArch: x86_64
|
||||||
|
|
||||||
Source0: linux-%version.tar.xz
|
Source0: linux-%version.tar.xz
|
||||||
Source14: series.conf
|
|
||||||
Source16: guards
|
Source16: guards
|
||||||
Source17: apply-patches
|
Source17: apply-patches
|
||||||
Source33: check-for-config-changes
|
Source33: check-for-config-changes
|
||||||
Source34: gen-config
|
Source34: gen-config
|
||||||
Source100: config-base
|
Source100: config-base
|
||||||
Source101: config-qubes
|
Source101: config-qubes
|
||||||
# FIXME: Including dirs this way does NOT produce proper src.rpms
|
|
||||||
Source204: patches.rpmify
|
Patch0: 0001-kbuild-AFTER_LINK.patch
|
||||||
Source205: patches.xen
|
Patch1: 0002-xen-netfront-detach-crash.patch
|
||||||
Source300: patches.qubes
|
Patch2: 0003-mce-hide-EBUSY-initialization-error-on-Xen.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Patch3: 0004-Log-error-code-of-EVTCHNOP_bind_pirq-failure.patch
|
||||||
ExclusiveArch: x86_64
|
Patch4: 0005-pvops-respect-removable-xenstore-flag-for-block-devi.patch
|
||||||
|
Patch5: 0006-pvops-xen-blkfront-handle-FDEJECT-as-detach-request-.patch
|
||||||
|
Patch6: 0007-block-add-no_part_scan-module-parameter.patch
|
||||||
|
Patch7: 0008-xen-Add-RING_COPY_RESPONSE.patch
|
||||||
|
Patch8: 0009-xen-netfront-copy-response-out-of-shared-buffer-befo.patch
|
||||||
|
Patch9: 0010-xen-netfront-do-not-use-data-already-exposed-to-back.patch
|
||||||
|
Patch10: 0011-xen-netfront-add-range-check-for-Tx-response-id.patch
|
||||||
|
Patch11: 0012-xen-blkfront-make-local-copy-of-response-before-usin.patch
|
||||||
|
Patch12: 0013-xen-blkfront-prepare-request-locally-only-then-put-i.patch
|
||||||
|
Patch13: 0014-xen-pcifront-pciback-Update-pciif.h-with-err-and-res.patch
|
||||||
|
Patch14: 0015-xen-pciback-add-attribute-to-allow-MSI-enable-flag-w.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Qubes Dom0 kernel.
|
Qubes Dom0 kernel.
|
||||||
@ -118,21 +124,17 @@ fi
|
|||||||
SYMBOLS="xen-dom0 pvops"
|
SYMBOLS="xen-dom0 pvops"
|
||||||
|
|
||||||
# Unpack all sources and patches
|
# Unpack all sources and patches
|
||||||
%setup -q -c -T -a 0
|
%autosetup -N -c -T -a 0
|
||||||
|
|
||||||
mkdir -p %kernel_build_dir
|
mkdir -p %kernel_build_dir
|
||||||
|
|
||||||
cd linux-%version
|
cd linux-%version
|
||||||
|
%autopatch -p1
|
||||||
if [ -r %_sourcedir/series-%{version}.conf ]; then
|
|
||||||
%_sourcedir/apply-patches %_sourcedir/series-%{version}.conf %_sourcedir $SYMBOLS
|
|
||||||
else
|
|
||||||
%_sourcedir/apply-patches %_sourcedir/series.conf %_sourcedir $SYMBOLS
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd %kernel_build_dir
|
cd %kernel_build_dir
|
||||||
|
|
||||||
%_sourcedir/gen-config %_sourcedir/config-base %_sourcedir/config-qubes
|
# Create QubesOS config kernel
|
||||||
|
%{SOURCE34} %{SOURCE100} %{SOURCE101}
|
||||||
|
|
||||||
%build_src_dir/scripts/config \
|
%build_src_dir/scripts/config \
|
||||||
--set-str CONFIG_LOCALVERSION -%release.%cpu_arch %{setup_config}
|
--set-str CONFIG_LOCALVERSION -%release.%cpu_arch %{setup_config}
|
||||||
@ -520,5 +522,5 @@ exit 0
|
|||||||
%attr(0644, root, root) %vm_install_dir/vmlinuz
|
%attr(0644, root, root) %vm_install_dir/vmlinuz
|
||||||
%vm_install_dir/modules
|
%vm_install_dir/modules
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@CHANGELOG@
|
Loading…
Reference in New Issue
Block a user