]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel.spec
restore lost tabs
[packages/kernel.git] / kernel.spec
index 8d487ff24030eae5a6b9579be9017d7ddea43783..5e56c245fc4afdb843d2c2e92b73c6ee7d3dcd9b 100644 (file)
@@ -20,7 +20,6 @@
 %bcond_without pcmcia          # don't build pcmcia
 
 %bcond_with    verbose         # verbose build (V=1)
-%bcond_with    reiser4         # support for reiser4 fs (experimental)
 
 %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
@@ -29,8 +28,9 @@
 %bcond_without imq             # imq support
 %bcond_without esfq            # esfq support
 %bcond_without ipv6            # ipv6 support
+%bcond_without padmcrypt       # parallel dm-crypt
 
-%bcond_without vserver         # support for VServer (enabled by default)
+%bcond_without vserver         # support for VServer
 
 %bcond_with    vanilla         # don't include any patches
 %bcond_with    rescuecd        # build kernel for our rescue
 %endif
 
 %define                rel             1
-%define                basever         3.7
-%define                postver         .5
+%define                basever         3.13
+%define                postver         .4
+
+# define this to '-%{basever}' for longterm branch
+%define                versuffix       %{nil}
 
 # __alt_kernel is list of features, empty string if none set
 # _alt kernel is defined as: %{nil}%{?alt_kernel:-%{?alt_kernel}} (defined in rpm.macros)
@@ -101,18 +104,19 @@ Summary(de.UTF-8):        Der Linux-Kernel (Kern des Linux-Betriebssystems)
 Summary(et.UTF-8):     Linuxi kernel (ehk operatsioonisüsteemi tuum)
 Summary(fr.UTF-8):     Le Kernel-Linux (La partie centrale du systeme)
 Summary(pl.UTF-8):     JÄ…dro Linuksa
-Name:          kernel%{_alt_kernel}
+Name:          kernel%{versuffix}%{_alt_kernel}
 Version:       %{basever}%{postver}
 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: 21223369d682bcf44bcdfe1521095983
+# Source0-md5: 0ecbaf65c00374eb4a826c2f9f37606f
 %if "%{postver}" != ".0"
-Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
-# Patch0-md5:  0bb3a5b1c5ee7ae694e3db58b2b69a8d
+Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
+# Patch0-md5:  77ca721ea0e8373f58f596fe0d9b1b47
 %endif
+Source1:       kernel.sysconfig
 
 Source3:       kernel-autoconf.h
 Source4:       kernel-config.h
@@ -134,7 +138,6 @@ Source41:   kernel-patches.config
 Source43:      kernel-vserver.config
 
 Source55:      kernel-imq.config
-Source56:      kernel-reiser4.config
 
 Source58:      kernel-inittmpfs.config
 
@@ -142,6 +145,7 @@ Source58:   kernel-inittmpfs.config
 Patch3:                kernel-fbcondecor.patch
 Patch4:                kernel-fbcon-margins.patch
 Patch5:                linux-wistron-amilo8210.patch
+Patch6:                linux-wistron-nx.patch
 
 # netfilter related stuff mostly based on patch-o-matic-ng
 # snapshot 20070806 with some fixes. Some modules
@@ -161,12 +165,9 @@ Patch40:   kernel-layer7.patch
 # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
 Patch49:       kernel-zph.patch
 
-# http://www.linuximq.net/patches/patch-imqmq-3.5.diff.xz
+# http://www.linuximq.net
 Patch50:       kernel-imq.patch
 
-Patch51:       http://downloads.sourceforge.net/reiser4/reiser4-for-3.6.4.patch.gz
-# Patch51-md5: 4128aa3bd062d0289117dda6775a7f20
-
 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
 Patch53:       kernel-esfq.patch
 
@@ -182,7 +183,10 @@ 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.7.1-vs2.3.5.5.diff
+# http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI#Patch
+Patch90:       kernel-technisat-combo-hd-ci.patch
+
+# http://vserver.13thfloor.at/Experimental/patch-3.13.1-vs2.3.6.10.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)
@@ -193,23 +197,19 @@ Patch101: kernel-vserver-fixes.patch
 # 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-introduce-clone_private_mount.patch
-Patch113:      ovl04-overlay-filesystem.patch
-Patch114:      ovl05-overlayfs-add-statfs-support.patch
-Patch115:      ovl06-overlayfs-implement-show_options.patch
-Patch116:      ovl07-overlay-overlay-filesystem-documentation.patch
-Patch117:      ovl08-fs-limit-filesystem-stacking-depth.patch
-Patch118:      ovl09-overlayfs-fix-possible-leak-in-ovl_new_inode.patch
-Patch119:      ovl10-overlayfs-create-new-inode-in-ovl_link.patch
-Patch120:      ovl11-vfs-export-__inode_permission-to-modules.patch
-Patch121:      ovl12-ovl-switch-to-__inode_permission.patch
-Patch122:      ovl13-overlayfs-copy-up-i_uid-i_gid-from-the-underlying-in.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
 # Patch creation:
 # git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git
 # cd aufs3-standalone
-# git checkout -b aufs3.7 origin/aufs3.7
+# git checkout -b aufs3.13 origin/aufs3.13
 # cat aufs3-kbuild.patch aufs3-base.patch aufs3-standalone.patch > ~/rpm/packages/kernel/kernel-aufs3.patch
 # mkdir linux
 # cp -a Documentation fs include linux
@@ -217,6 +217,7 @@ Patch122:   ovl13-overlayfs-copy-up-i_uid-i_gid-from-the-underlying-in.patch
 # drop hunk at the end of patch (hunk is patching include/linux/Kbuild with single line change)
 #
 Patch145:      kernel-aufs3.patch
+Patch146:      kernel-aufs3+vserver.patch
 
 # Show normal colors in menuconfig with ncurses ABI 6
 Patch250:      kernel-fix_256colors_menuconfig.patch
@@ -224,11 +225,20 @@ 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:      dm-crypt-unbound-workqueue.patch
+Patch502:      dm-crypt-dont-allocate-partial-pages.patch
+Patch503:      dm-crypt-fix-allocation-deadlock.patch
+Patch504:      dm-crypt-offload-writes-to-thread.patch
+Patch505:      dm-crypt-sort-requests.patch
+
 Patch2000:     kernel-small_fixes.patch
 Patch2001:     kernel-pwc-uncompress.patch
 Patch2003:     kernel-regressions.patch
 
-# http://git.kernel.org/?p=linux/kernel/git/jj/linux-apparmor.git;a=shortlog;h=refs/heads/v3.5-aa2.8
+# bzr co lp:apparmor
+# ls apparmor/kernel-patches/3.12
 Patch5000:     kernel-apparmor.patch
 
 # for rescuecd
@@ -240,6 +250,7 @@ Patch7000:  kernel-inittmpfs.patch
 #Patch50000:   kernel-usb_reset.patch
 
 URL:           http://www.kernel.org/
+BuildRequires: bc
 BuildRequires: binutils >= 3:2.18
 %ifarch sparc sparc64
 BuildRequires: elftoaout
@@ -268,6 +279,7 @@ Requires:   kmod >= 12-2
 Requires:      cpuinfo(pae)
 %endif
 %endif
+Suggests:      crda
 Suggests:      dracut
 Suggests:      keyutils
 Suggests:      linux-firmware
@@ -293,6 +305,7 @@ Obsoletes:  kernel-smp
 Conflicts:     e2fsprogs < 1.29
 Conflicts:     isdn4k-utils < 3.1pre1
 Conflicts:     jfsutils < 1.1.3
+Conflicts:     libusb < 1.0.9
 Conflicts:     linux-firmware < 20120720
 Conflicts:     lvm2 < 2.02.40
 Conflicts:     module-init-tools < 3.16
@@ -301,14 +314,13 @@ Conflicts:        oprofile < 0.9
 Conflicts:     ppp < 1:2.4.0
 Conflicts:     procps < 3.2.0
 Conflicts:     quota-tools < 3.09
-%{?with_reiserfs4:Conflicts:   reiser4progs < 1.0.0}
 Conflicts:     reiserfsprogs < 3.6.3
 Conflicts:     rpm < 4.4.2-0.2
 Conflicts:     udev < 1:081
 Conflicts:     util-linux < 2.10o
 Conflicts:     util-vserver < 0.30.216
 Conflicts:     xfsprogs < 2.6.0
-ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
+ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
 ExclusiveOS:   Linux
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -341,9 +353,9 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                topdir          %{_builddir}/%{name}-%{version}
 %define                srcdir          %{topdir}/linux-%{basever}
 %define                objdir          %{topdir}/%{targetobj}
-%define                targetobj       %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
+%define                targetobj       %{_target_base_arch}-gcc-%(%{__cc} -dumpversion)
 
-%define                _kernelsrcdir   /usr/src/linux%{_alt_kernel}-%{version}
+%define                _kernelsrcdir   /usr/src/linux%{versuffix}%{_alt_kernel}-%{version}
 
 %if "%{_target_base_arch}" != "%{_host_base_arch}"
        %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
@@ -375,9 +387,12 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
        %endif
        %define DepMod /sbin/depmod
 %endif
-%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
+# use 64-bit offsets for fixdeps to work with 64-bit inodes
+%define MakeOpts %{CrossOpts} HOSTCC="%{__cc} -D_FILE_OFFSET_BITS=64"
 
 %define __features \
+%{?with_vserver:Vserver - enabled}\
+%{!?with_vserver:WARNING: VSERVER IS DISABLED IN THIS KERNEL BUILD!}\
 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
 %{?with_nfsroot:Root on NFS - enabled}\
 
@@ -623,6 +638,7 @@ cd linux-%{basever}
 %endif
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 ## netfilter
 #
@@ -648,11 +664,6 @@ cd linux-%{basever}
 %patch50 -p1
 %endif
 
-# reiser4
-%if %{with reiser4}
-%patch51 -p1
-%endif
-
 # esfq
 %if %{with esfq}
 %patch53 -p1
@@ -667,6 +678,9 @@ cd linux-%{basever}
 # hostap enhancements from/for aircrack-ng
 %patch85 -p1
 
+# TechniSat_CableStar_Combo_HD_CI
+%patch90 -p1
+
 # vserver
 %if %{with vserver}
 %patch100 -p1
@@ -682,13 +696,12 @@ cd linux-%{basever}
 %patch116 -p1
 %patch117 -p1
 %patch118 -p1
-%patch119 -p1
-%patch120 -p1
-%patch121 -p1
-%patch122 -p1
 
 # aufs3
 %patch145 -p1
+%if %{with vserver}
+%patch146 -p1
+%endif
 
 %if %{with rescuecd}
 %patch7000 -p1
@@ -702,6 +715,16 @@ 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
+%endif
+
 %endif # vanilla
 
 # Small fixes:
@@ -729,7 +752,7 @@ SRCARCH             := %{target_arch_dir}
 ARCH           := %{_target_base_arch}
 Q                      := %{!?with_verbose:@}
 MAKE_OPTS      := %{MakeOpts}
-DEFCONFIG   := %{defconfig}
+DEFCONFIG      := %{defconfig}
 EOF
 
 RescueConfig() {
@@ -743,7 +766,6 @@ RescueConfig() {
                # CONFIG_DVB_CORE is not set
                # CONFIG_HAMRADIO is not set
                # CONFIG_ARCNET is not set
-               # CONFIG_FB is not set
                # CONFIG_DRM is not set
                # CONFIG_WATCHDOG is not set
                # CONFIG_INPUT_JOYSTICK is not set
@@ -758,6 +780,63 @@ RescueConfig() {
                # CONFIG_PHONE is not set
                # CONFIG_STRICT_DEVMEM is not set
                # CONFIG_IMA is not set
+               # CONFIG_MEDIA_SUPPORT is not set
+               # CONFIG_UWB is not set
+               # CONFIG_PWM is not set
+               # CONFIG_COMEDI_NI_LABPC_ISA is not set
+               # CONFIG_FB_SYS_FILLRECT is not set
+               # CONFIG_FB_SYS_COPYAREA is not set
+               # CONFIG_FB_SYS_IMAGEBLIT is not set
+               # CONFIG_FB_SYS_FOPS is not set
+               # CONFIG_FB_HECUBA is not set
+               # CONFIG_FB_SVGALIB is not set
+               # CONFIG_FB_CIRRUS is not set
+               # CONFIG_FB_PM2 is not set
+               # CONFIG_FB_CYBER2000 is not set
+               # CONFIG_FB_ARC is not set
+               # CONFIG_FB_ASILIANT is not set
+               # CONFIG_FB_IMSTT is not set
+               # CONFIG_FB_VGA16 is not set
+               # CONFIG_FB_UVESA is not set
+               # CONFIG_FB_N411 is not set
+               # CONFIG_FB_HGA is not set
+               # CONFIG_FB_S1D13XXX is not set
+               # CONFIG_FB_NVIDIA is not set
+               # CONFIG_FB_RIVA is not set
+               # CONFIG_FB_I740 is not set
+               # CONFIG_FB_LE80578 is not set
+               # CONFIG_FB_CARILLO_RANCH is not set
+               # CONFIG_FB_MATROX is not set
+               # CONFIG_FB_RADEON is not set
+               # CONFIG_FB_ATY128 is not set
+               # CONFIG_FB_ATY is not set
+               # CONFIG_FB_S3 is not set
+               # CONFIG_FB_SAVAGE is not set
+               # CONFIG_FB_SIS is not set
+               # CONFIG_FB_VIA is not set
+               # CONFIG_FB_NEOMAGIC is not set
+               # CONFIG_FB_KYRO is not set
+               # CONFIG_FB_3DFX is not set
+               # CONFIG_FB_VOODOO1 is not set
+               # CONFIG_FB_VT8623 is not set
+               # CONFIG_FB_TRIDENT is not set
+               # CONFIG_FB_ARK is not set
+               # CONFIG_FB_PM3 is not set
+               # CONFIG_FB_CARMINE is not set
+               # CONFIG_FB_GEODE is not set
+               # CONFIG_FB_TMIO is not set
+               # CONFIG_FB_SM501 is not set
+               # CONFIG_FB_SMSCUFX is not set
+               # CONFIG_FB_UDL is not set
+               # CONFIG_FB_GOLDFISH is not set
+               # CONFIG_XEN_FBDEV_FRONTEND is not set
+               # CONFIG_FB_METRONOME is not set
+               # CONFIG_FB_MB862XX is not set
+               # CONFIG_FB_BROADSHEET is not set
+               # CONFIG_FB_AUO_K190X is not set
+               # CONFIG_FB_AUO_K1900 is not set
+               # CONFIG_FB_AUO_K1901 is not set
+               # CONFIG_FB_HYPERV is not set
                CONFIG_AUFS=y
                CONFIG_AUFS_FS=y
                CONFIG_AUFS_BR_RAMFS=y
@@ -766,6 +845,9 @@ RescueConfig() {
                CONFIG_ISO9660_FS=y
                CONFIG_NLS_UTF8=y
                CONFIG_SQUASHFS=y
+               CONFIG_FB=y
+               CONFIG_FB_EFI=y
+               CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
 EOCONFIG
 
        return 0
@@ -794,12 +876,12 @@ BuildConfig() {
 %endif
 
 %ifarch i686 athlon pentium3 pentium4
-  %if %{with pae}
+       %if %{with pae}
                CONFIG_HIGHMEM4G=n
                CONFIG_HIGHMEM64G=y
                CONFIG_X86_PAE=y
                CONFIG_NUMA=n
-  %endif
+       %endif
 %endif
 
 %if %{without pcmcia}
@@ -835,9 +917,6 @@ EOCONFIG
                rescue.config \
 %endif
                \
-%if %{with reiser4}
-               %{SOURCE56} \
-%endif
 %if %{with imq}
                %{SOURCE55} \
 %endif
@@ -903,6 +982,7 @@ done
 # /boot
 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}
        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}
@@ -944,6 +1024,9 @@ touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
 # /etc/modrobe.d
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
 
+install -d $RPM_BUILD_ROOT/etc/sysconfig
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/kernel
+
 # /usr/src/linux
 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
 
@@ -1010,34 +1093,64 @@ if [ -x /sbin/new-kernel-pkg ]; then
 fi
 
 %post
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [[ "$CREATE_SYMLINKS" != [Nn][Oo] ]]; then
 %ifarch ia64
-mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
-ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
-%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
-%endif
-mv -f /boot/vmlinuz{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
-mv -f /boot/System.map{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
-ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
-%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
-ln -sf System.map-%{kernel_release} /boot/System.map
-%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
+       mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
+       ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
+%if 0%{?alt_kernel:1}
+       mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null
+       ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}
+%endif
+%endif
+       mv -f /boot/vmlinuz{,.old} 2> /dev/null
+       mv -f /boot/System.map{,.old} 2> /dev/null
+       ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
+       ln -sf System.map-%{kernel_release} /boot/System.map
+%if 0%{?alt_kernel:1}
+       mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null
+       mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null
+       ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}
+       ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}
+%endif
+fi
 
 %depmod %{kernel_release}
 
+%if %{without vserver}
+%banner -e -a kernel <<EOF
+
+WARNING: Vserver support is DISABLED in this kernel build!
+
+EOF
+%endif
+
 %posttrans
-# generate initrd after all dependant modules are installed
-/sbin/geninitrd -f --initrdfs=initramfs %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
-mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
-%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
-ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
-%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
+# use posttrans to generate initrd after all dependant module packages (-drm, etc) are installed
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+initrd_file=""
+if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then
+       /sbin/geninitrd -f --initrdfs=initramfs %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release} || :
+       initrd_file="initrd-%{kernel_release}.gz"
+fi
 
 # if dracut is present then generate full-featured initramfs
-if [ -x /sbin/dracut ]; then
+if [[ "$USE_DRACUT" != [Nn][Oo] ]] && [ -x /sbin/dracut ]; then
        /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
+       [ -n "$initrd_file" ] || initrd_file="initramfs-%{kernel_release}.img"
+fi
+
+if [[ "$CREATE_SYMLINKS" != [Nn][Oo] ]]; then
+       mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
+       if [ -n "$initrd_file" ] ; then
+               ln -sf "$initrd_file" %{initrd_dir}/initrd
+       fi
+%if 0%{?alt_kernel:1}
+       mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null
+       if [ -n "$initrd_file" ] ; then
+               ln -sf "$initrd_file" %{initrd_dir}/initrd%{_alt_kernel}
+       fi
+%endif
 fi
 
 # update boot loaders when old package files are gone from filesystem
@@ -1052,12 +1165,20 @@ fi
 if [ -x /sbin/rc-boot ]; then
        /sbin/rc-boot 1>&2 || :
 fi
+if [ -x /sbin/efi-boot-update ]; then
+       /sbin/efi-boot-update --auto || :
+fi
 
 %post vmlinux
-mv -f /boot/vmlinux{,.old} 2> /dev/null
-%{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
-ln -sf vmlinux-%{kernel_release} /boot/vmlinux
-%{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [[ "$CREATE_SYMLINKS" != [Nn][Oo] ]]; then
+       mv -f /boot/vmlinux{,.old} 2> /dev/null
+       ln -sf vmlinux-%{kernel_release} /boot/vmlinux
+%if 0%{?alt_kernel:1}
+       mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null
+       ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}
+%endif
+fi
 
 %post drm
 %depmod %{kernel_release}
@@ -1084,13 +1205,13 @@ ln -sf vmlinux-%{kernel_release} /boot/vmlinux
 %depmod %{kernel_release}
 
 %post headers
-ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
+ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
 
 %postun headers
 if [ "$1" = "0" ]; then
-       if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
-               if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
-                       rm -f %{_prefix}/src/linux%{_alt_kernel}
+       if [ -L %{_prefix}/src/linux%{versuffix}%{_alt_kernel} ]; then
+               if [ "$(readlink %{_prefix}/src/linux%{versuffix}%{_alt_kernel})" = "linux%{versuffix}%{_alt_kernel}-%{version}" ]; then
+                       rm -f %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
                fi
        fi
 fi
@@ -1106,6 +1227,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kernel
 %ifarch sparc sparc64
 /boot/vmlinux.aout-%{kernel_release}
 %endif
@@ -1114,6 +1236,7 @@ fi
 %endif
 /boot/vmlinuz-%{kernel_release}
 /boot/System.map-%{kernel_release}
+/boot/config-%{kernel_release}
 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
 %ghost %{initrd_dir}/initramfs-%{kernel_release}.img
 /lib/firmware/%{kernel_release}
@@ -1151,7 +1274,6 @@ 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/staging/telephony/ixj_pcmcia.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
 %endif
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
@@ -1210,9 +1332,8 @@ fi
 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
-/lib/modules/%{kernel_release}/kernel/drivers/staging/telephony/ixj_pcmcia.ko*
-%endif
 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
+%endif
 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
@@ -1288,7 +1409,7 @@ fi
 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
 %{_kernelsrcdir}/scripts/kconfig/lxdialog
 %{_kernelsrcdir}/scripts/mod/*.c
-%{_kernelsrcdir}/scripts/mod/[^e]*.h
+%{_kernelsrcdir}/scripts/mod/modpost.h
 %attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
 %{_kernelsrcdir}/scripts/mkmakefile
 %{_kernelsrcdir}/scripts/module-common.lds
@@ -1330,6 +1451,9 @@ fi
 %ifarch ppc ppc64
 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
 %endif
+%{_kernelsrcdir}/arch/arm/kvm
+%{_kernelsrcdir}/arch/arm64/kvm
+%{_kernelsrcdir}/arch/mips/kvm
 %{_kernelsrcdir}/arch/s390/kvm
 %{_kernelsrcdir}/arch/x86/kvm
 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
This page took 0.050633 seconds and 4 git commands to generate.