]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel.spec
- fix orc_dump build on x32
[packages/kernel.git] / kernel.spec
index db7b3e52f656070ed79407ecc114ddac45c5eec2..b70ff2e83050b3e1c4e2430d4242731ab5795d37 100644 (file)
@@ -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)
 
 %bcond_with    nfsroot         # build with root on NFS support
 
 %bcond_without imq             # imq support
-%bcond_without esfq            # esfq support
 %bcond_without ipv6            # ipv6 support
 
+%bcond_without aufs            # aufs4 support
+%bcond_without apparmor        # UBUNTU SAUCE apparmor patches
+
 %bcond_with    vserver         # support for VServer
 
+%bcond_with    rt              # real-time kernel (CONFIG_PREEMPT_RT) for low latencies
+
 %bcond_with    vanilla         # don't include any patches
 %bcond_with    rescuecd        # build kernel for our rescue
 %bcond_with    myown           # build with your own config (kernel-myown.config)
@@ -40,7 +43,6 @@
 
 %define                have_drm        1
 %define                have_ide        1
-%define                have_oss        1
 %define                have_sound      1
 %define                have_pcmcia     1
 
@@ -53,7 +55,6 @@
 %if %{with myown}
 %define                have_drm        0
 %define                have_ide        0
-%define                have_oss        0
 %define                have_sound      0
 %define                have_pcmcia     0
 %endif
 %ifarch sparc sparc64
 %unglobal      with_pcmcia
 %define                have_drm        0
-%define                have_oss        0
 %endif
 
 %if %{without pcmcia}
 %define                have_pcmcia     0
 %endif
 
-%define                rel             1
-%define                basever         4.7
-%define                postver         .3
+%define                rel             0.1
+%define                basever         4.14
+%define                postver         .0
 
 # define this to '-%{basever}' for longterm branch
 %define                versuffix       %{nil}
@@ -97,6 +97,9 @@
 %if %{without pae}
 %define                alt_kernel      nopae
 %endif
+%if %{with rt}
+%define                alt_kernel      rt
+%endif
 
 # kernel release (used in filesystem and eventually in uname -r)
 # modules will be looked from /lib/modules/%{kernel_release}
@@ -116,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: 5276563eb1f39a048e4a8a887408c031
+# Source0-md5: bacdb9ffdcd922aa069a5e1520160e24
 %if "%{postver}" != ".0"
 Patch0:                https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5:  803bdedd9b9cd4ef43d9d5d41801f234
+# Patch0-md5:  665b55e1f24ec56de55f7d0302d7c4f5
 %endif
 Source1:       kernel.sysconfig
 
@@ -141,6 +144,7 @@ Source25:   kernel-ia64.config
 
 Source41:      kernel-patches.config
 Source43:      kernel-vserver.config
+Source44:      kernel-rt.config
 
 Source55:      kernel-imq.config
 
@@ -168,9 +172,6 @@ Patch40:    kernel-layer7.patch
 # http://www.linuximq.net
 Patch50:       kernel-imq.patch
 
-# http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
-Patch53:       kernel-esfq.patch
-
 # by Baggins request:
 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
 Patch55:       kernel-atm-vbr.patch
@@ -195,12 +196,10 @@ Patch101: kernel-vserver-fixes.patch
 # Patch creation:
 # git clone git://github.com/sfjro/aufs4-standalone.git
 # cd aufs4-standalone
-# git checkout -b aufs4.7 origin/aufs4.7
+# 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
-# diff -urN /usr/share/empty linux >> ~/rpm/packages/kernel/kernel-aufs4.patch
-# drop hunk at the end of patch (hunk is patching include/linux/Kbuild with single line change)
+# 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
 #
 Patch145:      kernel-aufs4.patch
@@ -209,14 +208,17 @@ Patch146: kernel-aufs4+vserver.patch
 # Show normal colors in menuconfig with ncurses ABI 6
 Patch250:      kernel-fix_256colors_menuconfig.patch
 
+# https://rt.wiki.kernel.org/
+# https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/patch-4.9.6-rt4.patch.xz
+Patch500:      kernel-rt.patch
+
 Patch2000:     kernel-small_fixes.patch
 Patch2001:     kernel-pwc-uncompress.patch
 Patch2003:     kernel-regressions.patch
-Patch2004:     kernel-libata-ahci-pm.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
@@ -236,6 +238,7 @@ BuildRequires:      elftoaout
 %endif
 BuildRequires: elfutils-devel
 BuildRequires: gcc >= 5:3.2
+BuildRequires: gcc-plugin-devel
 BuildRequires: hostname
 BuildRequires: kmod >= 12-2
 BuildRequires: openssl-devel
@@ -261,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
@@ -386,6 +384,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
 %{?with_nfsroot:Root on NFS - enabled}\
 %{?with_vserver:Linux-VServer - %{vserver_patch}}\
+%{?with_rt:CONFIG_PREEMPT_RT - enabled}\
 
 %define Features %(echo "%{__features}" | sed '/^$/d')
 
@@ -512,25 +511,6 @@ ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
 %description sound-alsa -l pl.UTF-8
 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
 
-%package sound-oss
-Summary:       OSS kernel modules
-Summary(de.UTF-8):     OSS Kernel Module
-Summary(pl.UTF-8):     Sterowniki dźwięku OSS
-Group:         Base/Kernel
-Requires(postun):      %{name} = %{epoch}:%{version}-%{release}
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-Obsoletes:     kernel-smp-sound-oss
-AutoReqProv:   no
-
-%description sound-oss
-OSS (Open Sound System) drivers.
-
-%description sound-oss -l de.UTF-8
-OSS (Open Sound System) Treiber.
-
-%description sound-oss -l pl.UTF-8
-Sterowniki dźwięku OSS (Open Sound System).
-
 %package headers
 Summary:       Header files for the Linux kernel
 Summary(de.UTF-8):     Header Dateien für den Linux-Kernel
@@ -667,12 +647,7 @@ cd linux-%{basever}
 # end of netfilter
 
 %if %{with imq}
-%patch50 -p1
-%endif
-
-# esfq
-%if %{with esfq}
-%patch53 -p1
+#%patch50 -p1
 %endif
 
 %patch55 -p1
@@ -690,19 +665,28 @@ cd linux-%{basever}
 %patch101 -p1
 %endif
 
-# aufs3
+%if %{with aufs}
+# aufs4
 %patch145 -p1
 %if %{with vserver}
 %patch146 -p1
 %endif
+%endif
 
 %if %{with rescuecd}
 %patch7000 -p1
 %endif
 
+%if %{with rt}
+%patch500 -p1
+rm -f localversion-rt
+%endif
+
 # apparmor
-# FIME
-%patch5000 -p1
+%if %{with apparmor}
+%patch5001 -p1
+%patch5002 -p1
+%endif
 
 %patch250 -p1
 
@@ -712,7 +696,6 @@ cd linux-%{basever}
 %patch2000 -p1
 %patch2001 -p1
 #%patch2003 -p1
-%patch2004 -p1
 
 # Do not remove this, please!
 #%%patch50000 -p1
@@ -739,7 +722,6 @@ EOF
 
 RescueConfig() {
        set -x
-       cat <<-EOCONFIG > $1
                # CONFIG_SOUND is not set
                # CONFIG_AUDIT is not set
                # CONFIG_TR is not set
@@ -904,6 +886,9 @@ EOCONFIG
 %endif
 %if %{with vserver}
                %{SOURCE43} \
+%endif
+%if %{with rt}
+               %{SOURCE44} \
 %endif
                %{SOURCE41} %{?0:patches} \
 %endif
@@ -932,13 +917,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
@@ -1187,12 +1171,6 @@ fi
 %postun sound-alsa
 %depmod %{kernel_release}
 
-%post sound-oss
-%depmod %{kernel_release}
-
-%postun sound-oss
-%depmod %{kernel_release}
-
 %post headers
 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
 
@@ -1228,13 +1206,11 @@ 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
 /lib/modules/%{kernel_release}/kernel/arch
+/lib/modules/%{kernel_release}/kernel/block
 /lib/modules/%{kernel_release}/kernel/crypto
 /lib/modules/%{kernel_release}/kernel/drivers
 %if %{have_drm}
@@ -1379,21 +1355,12 @@ fi
 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
-%if %{have_oss}
-%exclude /lib/modules/%{kernel_release}/kernel/sound/oss
-%endif
 %ifnarch sparc
 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/legacy/g_midi.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
 %endif
-
-%if %{have_oss}
-%files sound-oss
-%defattr(644,root,root,755)
-/lib/modules/%{kernel_release}/kernel/sound/oss
-%endif
 %endif
 
 %files headers -f files.headers_exclude_kbuild
@@ -1417,7 +1384,6 @@ 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
@@ -1426,7 +1392,6 @@ fi
 %{_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
@@ -1459,9 +1424,7 @@ fi
 %{_docdir}/%{name}-%{version}/[jkz]*.txt
 %{_docdir}/%{name}-%{version}/kbuild
 %{_docdir}/%{name}-%{version}/kdump
-%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
-%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
-%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
+%{_docdir}/%{name}-%{version}/kernel-hacking
 %endif
 
 %if %{with source}
@@ -1486,7 +1449,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
@@ -1533,5 +1495,4 @@ fi
 %{_kernelsrcdir}/CREDITS
 %{_kernelsrcdir}/MAINTAINERS
 %{_kernelsrcdir}/README
-%{_kernelsrcdir}/REPORTING-BUGS
 %endif
This page took 0.096092 seconds and 4 git commands to generate.