]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel.spec
- up to 4.3.0; builds on x86_64; untested, so rel 0.1
[packages/kernel.git] / kernel.spec
index b05aa0785fbb2b8e48da82ac375df34d0b3fc0d8..a09995fa94a02dae751cbfe58fe84fe13d9e92a2 100644 (file)
@@ -1,6 +1,6 @@
 #
 # LATEST VERSION CHECKER:
-# # curl -s http://www.kernel.org/kdist/finger_banner
+# # curl -s https://www.kernel.org/finger_banner
 #
 # TODO:
 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
 %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    fbcondecor      # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
 %bcond_without pae             # build PAE (HIGHMEM64G) support on 32bit i686 athlon pentium3 pentium4
 %bcond_with    nfsroot         # build with root on NFS support
+%bcond_with    uksm            # build with UKSM patch, http://kerneldedup.org/projects/uksm/
 
 %bcond_without imq             # imq support
 %bcond_without esfq            # esfq support
 %bcond_without ipv6            # ipv6 support
-%bcond_with    padmcrypt       # parallel dm-crypt
 
 %bcond_with    vserver         # support for VServer
 
@@ -68,9 +69,9 @@
 %define                have_pcmcia     0
 %endif
 
-%define                rel             1
-%define                basever         3.15
-%define                postver         .4
+%define                rel             0.1
+%define                basever         4.3
+%define                postver         .0
 
 # define this to '-%{basever}' for longterm branch
 %define                versuffix       %{nil}
@@ -94,6 +95,9 @@
 %if %{with vanilla}
 %define                alt_kernel      vanilla
 %endif
+%if %{without pae}
+%define                alt_kernel      nopae
+%endif
 
 # kernel release (used in filesystem and eventually in uname -r)
 # modules will be looked from /lib/modules/%{kernel_release}
@@ -112,11 +116,11 @@ Release:  %{rel}
 Epoch:         3
 License:       GPL v2
 Group:         Base/Kernel
-Source0:       http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
-# Source0-md5: 97ca1625bb40368dc41b9a7971549071
+Source0:       http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
+# Source0-md5: 58b35794eee3b6d52ce7be39357801e7
 %if "%{postver}" != ".0"
-Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
-# Patch0-md5:  c0ecbe6a65913273c3338be7218dcf58
+Patch0:                http://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
+# Patch0-md5:  408f9975969da326b5804a04dbf0d4de
 %endif
 Source1:       kernel.sysconfig
 
@@ -140,12 +144,12 @@ Source41: kernel-patches.config
 Source43:      kernel-vserver.config
 
 Source55:      kernel-imq.config
+Source56:      kernel-uksm.config
 
 Source58:      kernel-inittmpfs.config
 
 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
 Patch3:                kernel-fbcondecor.patch
-Patch4:                kernel-fbcon-margins.patch
 Patch6:                linux-wistron-nx.patch
 
 # netfilter related stuff mostly based on patch-o-matic-ng
@@ -184,39 +188,33 @@ Patch59:  kernel-rndis_host-wm5.patch
 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
 Patch85:       kernel-hostap.patch
 
-# http://vserver.13thfloor.at/Experimental/patch-3.13.6-vs2.3.6.11.diff
+%define        vserver_patch 3.18.5-vs2.3.7.3
+# http://vserver.13thfloor.at/Experimental/patch-3.18.5-vs2.3.7.3.diff
 # note there are additional patches from above url:
 # - *fix* are real fixes (we want these)
 # - *feat* are new features/tests (we don't want these)
 Patch100:      kernel-vserver-2.3.patch
 Patch101:      kernel-vserver-fixes.patch
 
-# git clone git://kernel.opensuse.org/kernel-source.git
-# patches.suse/ovl*
-Patch110:      ovl01-vfs-add-i_op-dentry_open.patch
-Patch111:      ovl02-vfs-export-do_splice_direct-to-modules.patch
-Patch112:      ovl03-vfs-export-inode_permission-to-modules.patch
-Patch113:      ovl04-vfs-introduce-clone_private_mount.patch
-Patch114:      ovl05-overlay-filesystem.patch
-Patch115:      ovl06-overlayfs-add-statfs-support.patch
-Patch116:      ovl07-overlayfs-implement-show_options.patch
-Patch117:      ovl08-overlay-overlay-filesystem-documentation.patch
-Patch118:      ovl09-fs-limit-filesystem-stacking-depth.patch
-
-# git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git, read README
+# git://github.com/sfjro/aufs4-standalone.git, read README
 # Patch creation:
-# git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git
-# cd aufs3-standalone
-# git checkout -b aufs3.15 origin/aufs3.15
-# cat aufs3-kbuild.patch aufs3-base.patch aufs3-mmap.patch aufs3-standalone.patch > ~/rpm/packages/kernel/kernel-aufs3.patch
+# git clone git://github.com/sfjro/aufs4-standalone.git
+# cd aufs4-standalone
+# git checkout -b aufs4.3 origin/aufs4.3
+# cat aufs4-kbuild.patch aufs4-base.patch aufs4-mmap.patch aufs4-standalone.patch > ~/rpm/packages/kernel/kernel-aufs4.patch
 # mkdir linux
 # cp -a Documentation fs include linux
-# diff -urN /usr/share/empty linux >> ~/rpm/packages/kernel/kernel-aufs3.patch
+# 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)
-# cat aufs3-loopback.patch >> ~/rpm/packages/kernel/kernel-aufs3.patch
+# cat aufs4-loopback.patch >> ~/rpm/packages/kernel/kernel-aufs4.patch
 #
-Patch145:      kernel-aufs3.patch
-Patch146:      kernel-aufs3+vserver.patch
+Patch145:      kernel-aufs4.patch
+Patch146:      kernel-aufs4+vserver.patch
+
+%define uksm_major_version 0.1.2.3
+%define uksm_version %{uksm_major_version}-for-v3.18
+Patch150:      http://kerneldedup.org/download/uksm/%{uksm_major_version}/uksm-%{uksm_version}.patch
+# Patch150-md5:        b6a2b2aae9c2844d0c74690632d7019e
 
 # Show normal colors in menuconfig with ncurses ABI 6
 Patch250:      kernel-fix_256colors_menuconfig.patch
@@ -224,23 +222,13 @@ Patch250: kernel-fix_256colors_menuconfig.patch
 # https://patchwork.kernel.org/patch/236261/
 Patch400:      kernel-virtio-gl-accel.patch
 
-# http://people.redhat.com/mpatocka/patches/kernel/dm-crypt-paralelizace/current/series.html
-Patch500:      dm-crypt-remove-percpu.patch
-Patch501:      bio-kmalloc-align.patch
-Patch502:      dm-crypt-per_bio_data.patch
-Patch503:      dm-crypt-unbound-workqueue.patch
-Patch504:      dm-crypt-dont-allocate-partial-pages.patch
-Patch505:      dm-crypt-fix-allocation-deadlock.patch
-Patch506:      dm-crypt-remove-io-pool.patch
-Patch507:      dm-crypt-offload-writes-to-thread.patch
-Patch508:      dm-crypt-sort-requests.patch
-
 Patch2000:     kernel-small_fixes.patch
 Patch2001:     kernel-pwc-uncompress.patch
 Patch2003:     kernel-regressions.patch
+Patch2004:     kernel-libata-ahci-pm.patch
 
-# bzr co lp:apparmor
-# ls apparmor/kernel-patches/3.12
+# git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
+# branch v4.2-aa2.8-out-of-tree
 Patch5000:     kernel-apparmor.patch
 
 # for rescuecd
@@ -265,16 +253,16 @@ BuildRequires:    gcc >= 5:3.2
 BuildRequires: xz >= 1:4.999.7
 AutoReqProv:   no
 BuildRequires: hostname
-BuildRequires: kmod
+BuildRequires: kmod >= 12-2
 BuildRequires: perl-base
 BuildRequires: rpm-build >= 4.5-24
-BuildRequires: rpmbuild(macros) >= 1.652
+BuildRequires: rpmbuild(macros) >= 1.707
 Requires(post):        coreutils
-Requires(post):        geninitrd >= 10000-3
+Requires(post):        geninitrd >= 12749
 Requires(post):        kmod >= 12-2
 Requires:      /sbin/depmod
 Requires:      coreutils
-Requires:      geninitrd >= 10000-3
+Requires:      geninitrd >= 12749
 Requires:      kmod >= 12-2
 %if %{with pae}
 %ifarch i686 athlon pentium3 pentium4
@@ -285,7 +273,11 @@ 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
@@ -323,11 +315,17 @@ Conflicts:        udev < 1:081
 Conflicts:     util-linux < 2.10o
 Conflicts:     util-vserver < 0.30.216
 Conflicts:     xfsprogs < 2.6.0
-ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
+%if %{without pae}
+ExclusiveArch: i686 pentium3 pentium4 athlon
+%else
+ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} x32 alpha arm ia64 ppc ppc64 sparc sparc64
+%endif
 ExclusiveOS:   Linux
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%ifarch %{ix86} %{x8664}
+%define                kmod_compress_cmd       %{__xz}
+
+%ifarch %{ix86} %{x8664} x32
 %define                target_arch_dir         x86
 %endif
 %ifarch ppc ppc64
@@ -336,7 +334,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %ifarch sparc sparc64
 %define                target_arch_dir         sparc
 %endif
-%ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
+%ifnarch %{ix86} %{x8664} x32 ppc ppc64 sparc sparc64
 %define                target_arch_dir         %{_target_base_arch}
 %endif
 
@@ -398,6 +396,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %{!?with_vserver:WARNING: VSERVER IS DISABLED IN THIS KERNEL BUILD!}\
 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
 %{?with_nfsroot:Root on NFS - enabled}\
+%{?with_vserver:Linux-VServer - %{vserver_patch}}\
 
 %define Features %(echo "%{__features}" | sed '/^$/d')
 
@@ -572,7 +571,7 @@ Summary(pl.UTF-8):  Pliki służące do budowania modułów jądra
 Group:         Development/Building
 Requires:      %{name}-headers = %{epoch}:%{version}-%{release}
 Requires:      make
-Conflicts:     rpmbuild(macros) < 1.652
+Conflicts:     rpmbuild(macros) < 1.704
 AutoReqProv:   no
 
 %description module-build
@@ -658,7 +657,6 @@ cd linux-%{basever}
 %if %{with fbcondecor}
 %patch3 -p1
 %endif
-%patch4 -p1
 %patch6 -p1
 
 ## netfilter
@@ -705,22 +703,17 @@ cd linux-%{basever}
 %patch101 -p1
 %endif
 
-%patch110 -p1
-%patch111 -p1
-%patch112 -p1
-%patch113 -p1
-%patch114 -p1
-%patch115 -p1
-%patch116 -p1
-%patch117 -p1
-%patch118 -p1
-
 # aufs3
 %patch145 -p1
 %if %{with vserver}
 %patch146 -p1
 %endif
 
+# UKSM
+%if %{with uksm}
+%patch150 -p1
+%endif
+
 %if %{with rescuecd}
 %patch7000 -p1
 %endif
@@ -733,25 +726,13 @@ cd linux-%{basever}
 # virtio-gl
 %patch400 -p1
 
-# parallel dm-crypt
-%if %{with padmcrypt}
-%patch500 -p1
-%patch501 -p1
-%patch502 -p1
-%patch503 -p1
-%patch504 -p1
-%patch505 -p1
-%patch506 -p1
-%patch507 -p1
-%patch508 -p1
-%endif
-
 %endif # vanilla
 
 # Small fixes:
 %patch2000 -p1
 %patch2001 -p1
 #%patch2003 -p1
+%patch2004 -p1
 
 # Do not remove this, please!
 #%%patch50000 -p1
@@ -766,12 +747,12 @@ find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs
 install -d %{objdir}
 cat > %{targetobj}.mk <<'EOF'
 # generated by %{name}.spec
-KERNELSRC              := %{srcdir}
+KERNELSRC      := %{srcdir}
 KERNELOUTPUT   := %{objdir}
 
 SRCARCH                := %{target_arch_dir}
 ARCH           := %{_target_base_arch}
-Q                      := %{!?with_verbose:@}
+Q              := %{!?with_verbose:@}
 MAKE_OPTS      := %{MakeOpts}
 DEFCONFIG      := %{defconfig}
 EOF
@@ -941,6 +922,9 @@ EOCONFIG
 %if %{with imq}
                %{SOURCE55} \
 %endif
+%if %{with uksm}
+               %{SOURCE56} \
+%endif
 %if %{with vserver}
                %{SOURCE43} \
 %endif
@@ -971,10 +955,11 @@ cd -
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install firmware_install \
+%{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install %{?with_firmware:firmware_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}
@@ -1004,7 +989,7 @@ done
 install -d $RPM_BUILD_ROOT/boot
 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
 cp -aL %{objdir}/.config $RPM_BUILD_ROOT/boot/config-%{kernel_release}
-%ifarch %{ix86} %{x8664}
+%ifarch %{ix86} %{x8664} x32
        cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
        install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
 %endif
@@ -1181,7 +1166,7 @@ if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
        fi
 fi
 if [ -x /sbin/new-kernel-pkg ]; then
-       /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
+       /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/$initrd_file --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
 fi
 if [ -x /sbin/rc-boot ]; then
        /sbin/rc-boot 1>&2 || :
@@ -1266,7 +1251,9 @@ 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
@@ -1304,7 +1291,7 @@ fi
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
-%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
+%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/legacy/g_midi.ko*
 %endif
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
@@ -1340,7 +1327,7 @@ fi
 %ghost /lib/modules/%{kernel_release}/build
 %ghost /lib/modules/%{kernel_release}/source
 
-%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
+%ifarch alpha %{ix86} %{x8664} x32 ppc ppc64 sparc sparc64
 %files vmlinux
 %defattr(644,root,root,755)
 /boot/vmlinux-%{kernel_release}
@@ -1394,7 +1381,7 @@ fi
 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
 %endif
 %ifnarch sparc
-/lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
+/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*
@@ -1454,6 +1441,7 @@ fi
 %{_kernelsrcdir}/scripts/module-common.lds
 %attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
 %{_kernelsrcdir}/scripts/*.c
+%{_kernelsrcdir}/scripts/*.h
 %attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
 %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
@@ -1485,7 +1473,6 @@ fi
 %{_kernelsrcdir}/arch/m68k/install.sh
 %{_kernelsrcdir}/arch/parisc/install.sh
 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
-%{_kernelsrcdir}/arch/ia64/kvm
 %{_kernelsrcdir}/arch/powerpc/kvm
 %ifarch ppc ppc64
 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
@@ -1500,6 +1487,7 @@ fi
 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
 %exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
 %{_kernelsrcdir}/block
+%{_kernelsrcdir}/certs
 %{_kernelsrcdir}/crypto
 %{_kernelsrcdir}/drivers
 %{_kernelsrcdir}/firmware
@@ -1524,6 +1512,7 @@ fi
 %exclude %{_kernelsrcdir}/scripts/module-common.lds
 %exclude %{_kernelsrcdir}/scripts/setlocalversion
 %exclude %{_kernelsrcdir}/scripts/*.c
+%exclude %{_kernelsrcdir}/scripts/*.h
 %exclude %{_kernelsrcdir}/scripts/*.sh
 %exclude %dir %{_kernelsrcdir}/scripts/selinux
 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
This page took 0.096293 seconds and 4 git commands to generate.