SPECS (hawk-LINUX_2_6): kernel.spec - killed %{alt_kernel} macro -...
hawk
hawk at pld-linux.org
Sat Jan 27 15:05:43 CET 2007
Author: hawk Date: Sat Jan 27 14:05:43 2007 GMT
Module: SPECS Tag: hawk-LINUX_2_6
---- Log message:
- killed %{alt_kernel} macro
- added patches to spec, but not added/adjusted in CVS yet
---- Files affected:
SPECS:
kernel.spec (1.441.2.1701.2.1 -> 1.441.2.1701.2.2)
---- Diffs:
================================================================
Index: SPECS/kernel.spec
diff -u SPECS/kernel.spec:1.441.2.1701.2.1 SPECS/kernel.spec:1.441.2.1701.2.2
--- SPECS/kernel.spec:1.441.2.1701.2.1 Sat Jan 27 13:56:28 2007
+++ SPECS/kernel.spec Sat Jan 27 15:05:37 2007
@@ -6,13 +6,30 @@
%bcond_without source # don't build kernel-source package
%bcond_with vserver # build with vserver support
-%bcond_with grsec_minimal # build minimal grsecurity subset (proc,link,fifo,shm)
+%bcond_without grsecurity # build with grsecurity support
+
+%bcond_without grsec_minimal # build minimal grsecurity subset (proc,link,fifo,shm)
%bcond_with grsec_full # build full grsecurity
%bcond_with verbose # verbose build (V=1)
%bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
%bcond_with preempt-nort # build preemptable no realtime kernel
+%if %{without grsecurity}
+%undefine with_grsec_full
+%undefine with_grsec_minimal
+%endif
+
+%if %{with grsec_full}
+%undefine with_grsec_minimal
+%define with_grsecurity 1
+%endif
+
+%if %{with grsec_minimal}
+%undefine with_grsec_full
+%define with_grsecurity 1
+%endif
+
%{?debug:%define with_verbose 1}
%ifnarch %{ix86}
@@ -61,7 +78,7 @@
Summary(de): Der Linux-Kernel (Kern des Linux-Betriebssystems)
Summary(fr): Le Kernel-Linux (La partie centrale du systeme)
Summary(pl): Jądro Linuksa
-Name: kernel-%{alt_kernel}
+Name: kernel
Version: %{_basever}%{_postver}
Release: %{_rel}
Epoch: 3
@@ -95,6 +112,16 @@
Source41: kernel-no-preempt-nort.config
Source42: kernel-netfilter.config
+# http://vserver.13thfloor.at/Experimental/patch-2.6.19.2-vs2.3.0.7.diff
+Patch100: linux-2.6-vs2.3.patch
+Patch101: linux-2.6-vs2.1-128IPs.patch
+
+# from http://www.grsecurity.net/grsecurity-2.1.10-2.6.19.2-200701222307.patch.gz
+Patch200: grsecurity-2.1.10-2.6.19.2-200701222307.patch
+Patch201: grsecurity-vs-2.1.10-2.6.19.2-200701222307.patch
+Patch202: linux-2.6-grsec-minimal.patch
+Patch203: linux-2.6-grsec-vs-minimal.patch
+
URL: http://www.kernel.org/
BuildRequires: binutils >= 3:2.14.90.0.7
%ifarch sparc sparc64
@@ -146,8 +173,8 @@
# modules will be looked from /lib/modules/%{kernel_release}%{?smp}
# _localversion is just that without version for "> localversion"
%define _localversion %{release}
-%define kernel_release %{version}_%{alt_kernel}-%{_localversion}
-%define _kernelsrcdir /usr/src/linux-%{version}_%{alt_kernel}
+%define kernel_release %{version}-%{_localversion}
+%define _kernelsrcdir /usr/src/linux-%{version}
%define CommonOpts HOSTCC="%{__cc}" HOSTCFLAGS="-Wall -Wstrict-prototypes %{rpmcflags} -fomit-frame-pointer"
%if "%{_target_base_arch}" != "%{_arch}"
@@ -561,8 +588,30 @@
%{__bzip2} -dc %{SOURCE1} | %{__patch} -p1 -s
%endif
-# Fix EXTRAVERSION in main Makefile
-sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}_%{alt_kernel}#g' Makefile
+# conditional vserver/grsecurity patching
+%if %{with vserver}
+%patch100 -p1
+%patch101 -p1
+
+# vserver enabled, patch with modified grsecurity
+%if %{with grsec_full}
+%patch201 -p1
+%endif
+%if %{with grsec_minimal}
+%patch203 -p1
+%endif
+
+%else
+
+# vserver disabled, patch with original grsecurity
+%if %{with grsec_full}
+%patch200 -p1
+%endif
+%if %{with grsec_minimal}
+%patch202 -p1
+%endif
+
+%endif
sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
@@ -851,24 +900,24 @@
fi
%post
-mv -f /boot/vmlinuz-%{alt_kernel} /boot/vmlinuz-%{alt_kernel}.old 2> /dev/null > /dev/null
-mv -f /boot/System.map-%{alt_kernel} /boot/System.map-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz-%{alt_kernel}
-ln -sf System.map-%{kernel_release} /boot/System.map-%{alt_kernel}
+mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
+mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
+ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
+ln -sf System.map-%{kernel_release} /boot/System.map
if [ ! -e /boot/vmlinuz ]; then
mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
- ln -sf System.map-%{alt_kernel} /boot/System.map
+ ln -sf System.map /boot/System.map
mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old 2> /dev/null > /dev/null
- ln -sf initrd-%{alt_kernel} %{initrd_dir}/initrd
+ ln -sf initrd %{initrd_dir}/initrd
fi
%depmod %{kernel_release}
/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
-mv -f %{initrd_dir}/initrd-%{alt_kernel} %{initrd_dir}/initrd-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd-%{alt_kernel}
+mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old 2> /dev/null > /dev/null
+ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
if [ -x /sbin/new-kernel-pkg ]; then
if [ -f %{_sysconfdir}/pld-release ]; then
@@ -877,7 +926,7 @@
title='PLD Linux'
fi
- title="$title %{alt_kernel}"
+ title="$title"
/sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
elif [ -x /sbin/rc-boot ]; then
@@ -885,8 +934,8 @@
fi
%post vmlinux
-mv -f /boot/vmlinux-%{alt_kernel} /boot/vmlinux-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}
+mv -f /boot/vmlinux /boot/vmlinux.old 2> /dev/null > /dev/null
+ln -sf vmlinux-%{kernel_release} /boot/vmlinux
%post drm
%depmod %{kernel_release}
@@ -919,24 +968,24 @@
fi
%post smp
-mv -f /boot/vmlinuz-%{alt_kernel} /boot/vmlinuz.old-%{alt_kernel} 2> /dev/null > /dev/null
-mv -f /boot/System.map-%{alt_kernel} /boot/System.map.old-%{alt_kernel} 2> /dev/null > /dev/null
-ln -sf vmlinuz-%{kernel_release}smp /boot/vmlinuz-%{alt_kernel}
-ln -sf System.map-%{kernel_release}smp /boot/System.map-%{alt_kernel}
+mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
+mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
+ln -sf vmlinuz-%{kernel_release}smp /boot/vmlinuz
+ln -sf System.map-%{kernel_release}smp /boot/System.map
if [ ! -e /boot/vmlinuz ]; then
mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
ln -sf System.map-%{kernel_release} /boot/System.map
mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old 2> /dev/null > /dev/null
- ln -sf initrd-%{alt_kernel} %{initrd_dir}/initrd
+ ln -sf initrd %{initrd_dir}/initrd
fi
%depmod %{kernel_release}smp
/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}smp.gz %{kernel_release}smp
-mv -f %{initrd_dir}/initrd-%{alt_kernel} %{initrd_dir}/initrd.old-%{alt_kernel} 2> /dev/null > /dev/null
-ln -sf initrd-%{kernel_release}smp.gz %{initrd_dir}/initrd-%{alt_kernel}
+mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old 2> /dev/null > /dev/null
+ln -sf initrd-%{kernel_release}smp.gz %{initrd_dir}/initrd
if [ -x /sbin/new-kernel-pkg ]; then
if [ -f %{_sysconfdir}/pld-release ]; then
@@ -945,7 +994,7 @@
title='PLD Linux'
fi
- title="$title %{alt_kernel}"
+ title="$title"
/sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}smp.gz --install %{kernel_release}smp --banner "$title"
elif [ -x /sbin/rc-boot ]; then
@@ -953,8 +1002,8 @@
fi
%post smp-vmlinux
-mv -f /boot/vmlinux-%{alt_kernel} /boot/vmlinux.old-%{alt_kernel} 2> /dev/null > /dev/null
-ln -sf vmlinux-%{kernel_release}smp /boot/vmlinux-%{alt_kernel}
+mv -f /boot/vmlinux /boot/vmlinux.old 2> /dev/null > /dev/null
+ln -sf vmlinux-%{kernel_release}smp /boot/vmlinux
%post smp-drm
%depmod %{kernel_release}smp
@@ -981,14 +1030,14 @@
%depmod %{kernel_release}smp
%post headers
-rm -f %{_kernelsrcdir}-%{alt_kernel}
-ln -snf %{basename:%{_kernelsrcdir}} %{_kernelsrcdir}-%{alt_kernel}
+rm -f %{_kernelsrcdir}
+ln -snf %{basename:%{_kernelsrcdir}} %{_kernelsrcdir}
%postun headers
if [ "$1" = "0" ]; then
- if [ -L %{_kernelsrcdir}-%{alt_kernel} ]; then
- if [ "$(readlink %{_kernelsrcdir}-%{alt_kernel})" = "linux-%{version}_%{alt_kernel}" ]; then
- rm -f %{_kernelsrcdir}-%{alt_kernel}
+ if [ -L %{_kernelsrcdir} ]; then
+ if [ "$(readlink %{_kernelsrcdir})" = "linux-%{version}" ]; then
+ rm -f %{_kernelsrcdir}
fi
fi
fi
@@ -1278,6 +1327,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.441.2.1701.2.2 2007/01/27 14:05:37 hawk
+- killed %{alt_kernel} macro
+- added patches to spec, but not added/adjusted in CVS yet
+
Revision 1.441.2.1701.2.1 2007/01/27 12:56:28 hawk
- started my own kernel.spec (our official ones are too bloated for me),
based on kernel-vanilla.spec, will have optional vserver and/or grsecurity
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/kernel.spec?r1=1.441.2.1701.2.1&r2=1.441.2.1701.2.2&f=u
More information about the pld-cvs-commit
mailing list