%bcond_without source # don't build kernel-source package
%bcond_without doc # don't build kernel-doc package
%bcond_without pcmcia # don't build pcmcia
-%bcond_without firmware # don't build firmware into main package
%bcond_with verbose # verbose build (V=1)
%endif
%define rel 1
-%define basever 4.13
+%define basever 4.15
%define postver .5
# define this to '-%{basever}' for longterm branch
License: GPL v2
Group: Base/Kernel
Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
-# Source0-md5: ab1a2abc6f37b752dd2595338bec4e78
+# Source0-md5: 0d701ac1e2a67d47ce7127432df2c32b
%if "%{postver}" != ".0"
Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: 2f4bc91fdada9a5dc60e58bed623dce3
+# Patch0-md5: 1e86f92db62560a3646f897c4b19a5f5
%endif
Source1: kernel.sysconfig
# Patch creation:
# git clone git://github.com/sfjro/aufs4-standalone.git
# cd aufs4-standalone
-# git checkout -b aufs4.12 origin/aufs4.12
+# git checkout -b aufs4.14 origin/aufs4.14
# cat aufs4-kbuild.patch aufs4-base.patch aufs4-mmap.patch aufs4-standalone.patch > ~/rpm/packages/kernel/kernel-aufs4.patch
-# rm -rf linux && mkdir linux
-# cp -a Documentation fs include linux
+# rm -rf linux && mkdir linux; cp -a Documentation fs include linux
# diff -urN /usr/share/empty linux | filterdiff -x linux/include/uapi/linux/Kbuild >> ~/rpm/packages/kernel/kernel-aufs4.patch
# cat aufs4-loopback.patch >> ~/rpm/packages/kernel/kernel-aufs4.patch
#
Patch2001: kernel-pwc-uncompress.patch
Patch2003: kernel-regressions.patch
-# http://bazaar.launchpad.net/~apparmor-dev/apparmor/master/files/head:/kernel-patches/v4.13/
-Patch5001: 0002-apparmor-Fix-shadowed-local-variable-in-unpack_trans.patch
-Patch5002: 0003-apparmor-Fix-logical-error-in-verify_header.patch
-Patch5003: 0004-apparmor-Fix-an-error-code-in-aafs_create.patch
-Patch5004: 0005-apparmor-Redundant-condition-prev_ns.-in-label.c-149.patch
-Patch5005: 0006-apparmor-add-the-ability-to-mediate-signals.patch
-Patch5006: 0007-apparmor-add-mount-mediation.patch
-Patch5007: 0008-apparmor-cleanup-conditional-check-for-label-in-labe.patch
-Patch5008: 0009-apparmor-add-support-for-absolute-root-view-based-la.patch
-Patch5009: 0010-apparmor-make-policy_unpack-able-to-audit-different-.patch
-Patch5010: 0011-apparmor-add-more-debug-asserts-to-apparmorfs.patch
-Patch5011: 0012-apparmor-add-base-infastructure-for-socket-mediation.patch
-Patch5012: 0013-apparmor-move-new_null_profile-to-after-profile-look.patch
-Patch5013: 0014-apparmor-fix-race-condition-in-null-profile-creation.patch
-Patch5014: 0015-apparmor-ensure-unconfined-profiles-have-dfas-initia.patch
-Patch5015: 0016-apparmor-fix-incorrect-type-assignment-when-freeing-.patch
-Patch5016: 0017-UBUNTU-SAUCE-apparmor-af_unix-mediation.patch
+# https://gitlab.com/apparmor/apparmor/tree/master/kernel-patches/v4.15
+Patch5001: 0001-apparmor-add-base-infastructure-for-socket-mediation.patch
+Patch5002: 0002-apparmor-af_unix-mediation.patch
# for rescuecd
# based on ftp://ftp.leg.uct.ac.za/pub/linux/rip/tmpfs_root-2.6.30.diff.gz
BuildRequires: elftoaout
%endif
BuildRequires: elfutils-devel
-BuildRequires: gcc >= 5:3.2
+BuildRequires: gcc >= 6:7.2.0-6
BuildRequires: gcc-plugin-devel
BuildRequires: hostname
BuildRequires: kmod >= 12-2
Suggests: crda
Suggests: dracut
Suggests: keyutils
-%if %{with firmware}
-Suggests: linux-firmware
-%else
Requires: linux-firmware
-%endif
Provides: %{name}(netfilter) = 20070806
Provides: %{name}(vermagic) = %{kernel_release}
Obsoletes: kernel%{_alt_kernel}-char-lirc-ene0100
%if %{with apparmor}
%patch5001 -p1
%patch5002 -p1
-%patch5003 -p1
-%patch5004 -p1
-%patch5005 -p1
-%patch5006 -p1
-%patch5007 -p1
-%patch5008 -p1
-%patch5009 -p1
-%patch5010 -p1
-%patch5011 -p1
-%patch5012 -p1
-%patch5013 -p1
-%patch5014 -p1
-%patch5015 -p1
-%patch5016 -p1
%endif
%patch250 -p1
# Do not remove this, please!
#%%patch50000 -p1
+chmod 755 tools/objtool/sync-check.sh
+
# Fix EXTRAVERSION in main Makefile
sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:.%{alt_kernel}}#g' Makefile
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install %{?with_firmware:firmware_install} \
+%{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install \
-C %{objdir} \
%{?with_verbose:V=1} \
DEPMOD=%{DepMod} \
mod_compress_cmd=true \
INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
- INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
KERNELRELEASE=%{kernel_release}
install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
find $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir -name '.*.cmd' -exec rm "{}" ";"
done
+%ifarch %{x8664} x32
+# Needed for CONFIG_STACK_VALIDATION / ORC_UNWINDER enabled builds
+install -d $RPM_BUILD_ROOT%{_kernelsrcdir}/tools/objtool
+cp -a %{objdir}/tools/objtool/fixdep $RPM_BUILD_ROOT%{_kernelsrcdir}/tools/objtool
+cp -a %{objdir}/tools/objtool/objtool $RPM_BUILD_ROOT%{_kernelsrcdir}/tools/objtool
+%endif
+
# version.h location changed in 3.7, but a lot of external modules don't know about it
# add a compatibility symlink
ln -s ../generated/uapi/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/version.h
/boot/config-%{kernel_release}
%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
%ghost %{initrd_dir}/initramfs-%{kernel_release}.img
-%if %{with firmware}
-/lib/firmware/%{kernel_release}
-%endif
%dir /lib/modules/%{kernel_release}
%dir /lib/modules/%{kernel_release}/kernel
%exclude %dir %{_kernelsrcdir}/arch/um
%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
-%{_kernelsrcdir}/drivers/lguest/lg.h
%{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
%{_kernelsrcdir}/kernel/bounds.c
%{_kernelsrcdir}/scripts/basic/*.c
%{_kernelsrcdir}/scripts/kconfig/*_shipped
%{_kernelsrcdir}/scripts/kconfig/*.pl
%{_kernelsrcdir}/scripts/kconfig/*.glade
-%{_kernelsrcdir}/scripts/kconfig/*.gperf
%{_kernelsrcdir}/scripts/kconfig/*.cc
%{_kernelsrcdir}/scripts/kconfig/*.y
%{_kernelsrcdir}/scripts/kconfig/*.l
%{_kernelsrcdir}/scripts/selinux/mdp/*.c
%exclude %dir %{_kernelsrcdir}/security
%exclude %dir %{_kernelsrcdir}/security/selinux
+%ifarch %{x8664} x32
+%attr(755,root,root) %{_kernelsrcdir}/tools/objtool/fixdep
+%attr(755,root,root) %{_kernelsrcdir}/tools/objtool/objtool
+%endif
%if %{with doc}
%files doc
%{_kernelsrcdir}/arch/x86/kvm
%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
-%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
%exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
%{_kernelsrcdir}/block
%{_kernelsrcdir}/certs
%{_kernelsrcdir}/security
%exclude %{_kernelsrcdir}/security/selinux/include
%{_kernelsrcdir}/tools/*
+%ifarch %{x8664} x32
+%exclude %{_kernelsrcdir}/tools/objtool/fixdep
+%exclude %{_kernelsrcdir}/tools/objtool/objtool
+%endif
%{_kernelsrcdir}/usr
%{_kernelsrcdir}/COPYING
%{_kernelsrcdir}/CREDITS