%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)
%bcond_without ipv6 # ipv6 support
%bcond_without aufs # aufs4 support
+%bcond_without apparmor # UBUNTU SAUCE apparmor patches
%bcond_with vserver # support for VServer
%define have_pcmcia 0
%endif
-%define rel 1
-%define basever 4.12
-%define postver .4
+%define rel 0.1
+%define basever 4.14
+%define postver .0
# define this to '-%{basever}' for longterm branch
%define versuffix %{nil}
License: GPL v2
Group: Base/Kernel
Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
-# Source0-md5: fc454157e2d024d401a60905d6481c6b
+# Source0-md5: bacdb9ffdcd922aa069a5e1520160e24
%if "%{postver}" != ".0"
Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: 8b701bde9ab905f36c9917a6afdfb3e5
+# Patch0-md5: 665b55e1f24ec56de55f7d0302d7c4f5
%endif
Source1: kernel.sysconfig
# http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
Patch3: kernel-fbcondecor.patch
+Patch6: linux-wistron-nx.patch
# netfilter related stuff mostly based on patch-o-matic-ng
# snapshot 20070806 with some fixes. Some modules
# 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
-# git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
-# branch v4.7-aa2.8-out-of-tree
-Patch5000: kernel-apparmor.patch
+# https://gitlab.com/apparmor/apparmor/tree/master/kernel-patches/v4.14
+Patch5001: 0012-apparmor-add-base-infastructure-for-socket-mediation.patch
+Patch5002: 0001-UBUNTU-SAUCE-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
Suggests: crda
Suggests: dracut
Suggests: keyutils
-Suggests: kernel%{versuffix}-ide = %{epoch}:%{version}-%{release}
-%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 fbcondecor}
%patch3 -p1
%endif
+%patch6 -p1
## netfilter
#
%endif
# apparmor
-%patch5000 -p1
+%if %{with apparmor}
+%patch5001 -p1
+%patch5002 -p1
+%endif
%patch250 -p1
%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
/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
%{_docdir}/%{name}-%{version}/[jkz]*.txt
%{_docdir}/%{name}-%{version}/kbuild
%{_docdir}/%{name}-%{version}/kdump
+%{_docdir}/%{name}-%{version}/kernel-hacking
%endif
%if %{with source}
%{_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