X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=kernel.spec;h=6045354066ba2a6e533db28ff7e4eb96fb210669;hb=1866281e07cf2685fec759af8dd331ccc5e0126d;hp=b04b65c173237faa60448efc348cf7ca010bce4d;hpb=fe6f752d81a1c5024300f59315f46b723a82cfc4;p=packages%2Fkernel.git diff --git a/kernel.spec b/kernel.spec index b04b65c1..60453540 100644 --- a/kernel.spec +++ b/kernel.spec @@ -18,7 +18,6 @@ %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) @@ -30,6 +29,7 @@ %bcond_without ipv6 # ipv6 support %bcond_without aufs # aufs4 support +%bcond_without apparmor # UBUNTU SAUCE apparmor patches %bcond_with vserver # support for VServer @@ -69,8 +69,8 @@ %endif %define rel 1 -%define basever 4.12 -%define postver .10 +%define basever 4.16 +%define postver .8 # define this to '-%{basever}' for longterm branch %define versuffix %{nil} @@ -119,10 +119,10 @@ Epoch: 3 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: 1357fb4ee7c288fdeac5d4e0048f5c18 %if "%{postver}" != ".0" Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz -# Patch0-md5: 372499380d29bbbc176d7672bd21f812 +# Patch0-md5: d9fa8a5d6450d6c2700f31243928dd93 %endif Source1: kernel.sysconfig @@ -196,10 +196,9 @@ Patch101: kernel-vserver-fixes.patch # 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 # @@ -217,9 +216,9 @@ Patch2000: kernel-small_fixes.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.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 @@ -238,7 +237,7 @@ BuildRequires: binutils >= 3:2.18 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 @@ -251,11 +250,11 @@ BuildRequires: uboot-mkimage %endif BuildRequires: xz >= 1:4.999.7 Requires(post): coreutils -Requires(post): geninitrd >= 12749 +Requires(post): geninitrd >= 12757-8 Requires(post): kmod >= 12-2 Requires: /sbin/depmod Requires: coreutils -Requires: geninitrd >= 12749 +Requires: geninitrd >= 12757-8 Requires: kmod >= 12-2 %if %{with pae} %ifarch i686 athlon pentium3 pentium4 @@ -265,12 +264,7 @@ Requires: cpuinfo(pae) 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 @@ -689,7 +683,10 @@ rm -f localversion-rt %endif # apparmor -%patch5000 -p1 +%if %{with apparmor} +%patch5001 -p1 +%patch5002 -p1 +%endif %patch250 -p1 @@ -703,6 +700,8 @@ rm -f localversion-rt # 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 @@ -920,13 +919,12 @@ cd - %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 @@ -1017,6 +1015,13 @@ for dir in $(cd %{objdir} && find arch -name generated -type d); do 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 @@ -1210,9 +1215,6 @@ fi /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 @@ -1391,16 +1393,13 @@ fi %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 %attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh %{_kernelsrcdir}/scripts/kconfig/*.in -%{_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 @@ -1423,6 +1422,10 @@ fi %{_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 @@ -1433,6 +1436,7 @@ fi %{_docdir}/%{name}-%{version}/[jkz]*.txt %{_docdir}/%{name}-%{version}/kbuild %{_docdir}/%{name}-%{version}/kdump +%{_docdir}/%{name}-%{version}/kernel-hacking %endif %if %{with source} @@ -1457,7 +1461,6 @@ fi %{_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 @@ -1499,6 +1502,10 @@ fi %{_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