SPECS (LINUX_2_6_19): kernel.spec - xen up to 3.0.4 - grsecurity b...

alucard alucard at pld-linux.org
Sat Feb 10 19:25:52 CET 2007


Author: alucard                      Date: Sat Feb 10 18:25:52 2007 GMT
Module: SPECS                         Tag: LINUX_2_6_19
---- Log message:
- xen up to 3.0.4
- grsecurity builds now

---- Files affected:
SPECS:
   kernel.spec (1.441.2.1700 -> 1.441.2.1700.2.1) 

---- Diffs:

================================================================
Index: SPECS/kernel.spec
diff -u SPECS/kernel.spec:1.441.2.1700 SPECS/kernel.spec:1.441.2.1700.2.1
--- SPECS/kernel.spec:1.441.2.1700	Fri Jan 12 11:18:51 2007
+++ SPECS/kernel.spec	Sat Feb 10 19:25:47 2007
@@ -2,10 +2,6 @@
 #
 # TODO 2.6.19:
 #
-# - grsecurity patch update for 2.6.19.2 - 1 hunk failed in:
-#	arch/i386/kernel/smpboot.c
-#	drivers/char/mem.c
-#	scripts/Kbuild.include
 # - p4 fbsplash - needs update (bcond off)
 # - p200 linux-2.6-ppc-ICE-hacks.patch - untested - ppc needed
 # - separate PaX and grsecurity support - future
@@ -23,7 +19,6 @@
 #
 # FUTURE:
 # - separate PaX and grsecurity support - future
-# - update xen patch for 2.6.19 
 # - wanpipe
 # - Linux ABI
 #
@@ -139,7 +134,22 @@
 %define		squashfs_version	3.1
 %define		suspend_version		2.2.9
 
-%define		xen_version		3.0.2
+%define		xen_version		3.0.4
+
+%if %{with xen0}
+%define		xen	xen0
+%define		dashxen	\-xen0
+%define		pae	1
+%else
+%if %{with xenU}
+%define		xen	xenU
+%define		dashxen	\-xenU
+%define		pae	1
+%else
+%define		xen	%{nil}
+%define		dashxen	%{nil}
+%endif
+%endif
 
 Summary:	The Linux kernel (the core of the Linux operating system)
 Summary(de):	Der Linux-Kernel (Kern des Linux-Betriebssystems)
@@ -196,9 +206,7 @@
 Source43:	kernel-vserver.config
 Source44:	kernel-vesafb-tng.config
 Source45:	kernel-grsec.config
-Source46:	kernel-xen0.config
-Source47:	kernel-xenU.config
-
+Source46:	kernel-xen.config
 Source49:	kernel-pax.config
 Source50:	kernel-no-pax.config
 Source55:	kernel-imq.config
@@ -342,7 +350,7 @@
 Patch102:	linux-2.6-vs2.1-128IPs.patch
 
 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
-#Patch120:	xen-3.0-2.6.16.patch
+Patch120:	xen-3.0.4-2.6.19.patch
 
 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
 # Fix verified for that kernel version.
@@ -385,8 +393,8 @@
 Provides:	kernel(netfilter) = %{_netfilter_snap}
 Provides:	kernel(nf-hipac) = %{_nf_hipac_ver}
 Provides:	kernel(realtime-lsm) = 0.1.1
-%if %{with xen0} || %{with xenU}
-Provides:	kernel(xen) = %{_xen_version}
+%if %{with xen0}
+Provides:	kernel(xen0) = %{xen_version}
 %endif
 Provides:	kernel-misc-fuse
 Provides:	kernel-net-hostap = 0.4.4
@@ -416,7 +424,7 @@
 Conflicts:	vserver-packages
 Conflicts:	xfsprogs < %{_xfsprogs_ver}
 %if %{with xen0} || %{with xenU}
-ExclusiveArch:	%{ix86}
+ExclusiveArch:	%{ix86} %{x8664}
 %else
 ExclusiveArch:	%{ix86} alpha %{x8664} ia64 ppc ppc64 sparc sparc64 arm
 %endif
@@ -435,7 +443,7 @@
 # kernel release (used in filesystem and eventually in uname -r)
 # modules will be looked from /lib/modules/%{kernel_release}%{?smp}
 # _localversion is just that without version for "> localversion"
-%define		_localversion %{release}
+%define		_localversion %{release}%{xen}
 %define		kernel_release %{version}-%{_localversion}
 %define		_kernelsrcdir	/usr/src/linux-%{version}
 
@@ -627,8 +635,8 @@
 Provides:	kernel(netfilter) = %{_netfilter_snap}
 Provides:	kernel(nf-hipac) = %{_nf_hipac_ver}
 Provides:	kernel(realtime-lsm) = 0.1.1
-%if %{with xen0} || %{with xenU}
-Provides:	kernel(xen) = %{_xen_version}
+%if %{with xen0}
+Provides:	kernel(xen0) = %{xen_version}
 %endif
 Provides:	kernel-smp-misc-fuse
 Provides:	kernel-smp-net-hostap = 0.4.4
@@ -1020,11 +1028,11 @@
 %endif
 %patch102 -p1
 
-#%if %{with xen0} || %{with xenU}
-#%ifarch %{ix86} %{x8664} ia64
-#%patch120 -p1
-#%endif
-#%endif
+%if %{with xen0} || %{with xenU}
+%ifarch %{ix86} %{x8664}
+%patch120 -p1
+%endif
+%endif
 
 # forcedeth:
 %patch130 -p1
@@ -1192,13 +1200,24 @@
 	echo "CONFIG_BLK_DEV_IDEACPI=y" >> arch/%{_target_base_arch}/defconfig
 %endif
 
+%if %{with xen0} || %{with xenU}
+	sed -i "s:CONFIG_X86_PC=y:# CONFIG_X86_PC is not set:" arch/%{_target_base_arch}/defconfig
+	sed -i "s:CONFIG_RIO=[ym]:# CONFIG_RIO is not set:" arch/%{_target_base_arch}/defconfig
+	sed -i "s:CONFIG_SOUND_PAS=[ym]:# CONFIG_SOUND_PAS is not set:" arch/%{_target_base_arch}/defconfig
+
+	# framebuffer devices generally don't work with xen
+	# and kernel will crash on boot if vesafb-tng is compiled in (even if off by default)
+	sed -i "s:CONFIG_FB=y:# CONFIG_FB is not set:" arch/%{_target_base_arch}/defconfig
 
-%if %{with xen0}
 	cat %{SOURCE46} >> arch/%{_target_base_arch}/defconfig
 %endif
 
+%if %{with xen0}
+	sed -i "s:# CONFIG_XEN_PRIVILEGED_GUEST is not set:CONFIG_XEN_PRIVILEGED_GUEST=y:" arch/%{_target_base_arch}/defconfig
+%endif
+
 %if %{with xenU}
-	cat %{SOURCE47} >> arch/%{_target_base_arch}/defconfig
+	sed -i "s:# CONFIG_XEN_UNPRIVILEGED_GUEST is not set:CONFIG_XEN_UNPRIVILEGED_GUEST=y:" arch/%{_target_base_arch}/defconfig
 %endif
 
 	# fbsplash && bootsplash
@@ -1275,6 +1294,9 @@
 %endif
 %else
 	%{__make} %CrossOpts \
+%if %{with xen0} || %{with xenU}
+		SHELL=/bin/bash \
+%endif
 		%{?with_verbose:V=1}
 %endif
 }
@@ -1292,7 +1314,11 @@
 	mkdir -p $KERNEL_INSTALL_DIR/boot
 	install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
 %ifarch %{ix86} %{x8664}
+%if %{with xen0} || %{with xenU}
+	install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
+%else
 	install arch/%{_target_base_arch}/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
+%endif
 	install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
 %endif
 %ifarch alpha sparc sparc64
@@ -1458,8 +1484,8 @@
 %ifarch ia64
 mv -f /boot/efi/vmlinuz /boot/efi/vmlinuz.old 2> /dev/null > /dev/null
 %endif
-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
+mv -f /boot/vmlinuz%{dashxen} /boot/vmlinuz%{dashxen}.old 2> /dev/null > /dev/null
+mv -f /boot/System.map%{dashxen} /boot/System.map%{dashxen}.old 2> /dev/null > /dev/null
 %ifarch ia64
 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
 %endif
@@ -1468,9 +1494,10 @@
 
 %depmod %{kernel_release}
 
+%if !%{with xenU}
 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
-mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old 2> /dev/null > /dev/null
-ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
+mv -f %{initrd_dir}/initrd%{dashxen} %{initrd_dir}/initrd%{dashxen}.old 2> /dev/null > /dev/null
+ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{dashxen}
 
 if [ -x /sbin/new-kernel-pkg ]; then
 	if [ -f /etc/pld-release ]; then
@@ -1488,10 +1515,11 @@
 elif [ -x /sbin/rc-boot ]; then
 	/sbin/rc-boot 1>&2 || :
 fi
+%endif
 
 %post vmlinux
-mv -f /boot/vmlinux /boot/vmlinux.old 2> /dev/null > /dev/null
-ln -sf vmlinux-%{kernel_release} /boot/vmlinux
+mv -f /boot/vmlinux%{dashxen} /boot/vmlinux%{dashxen}.old 2> /dev/null > /dev/null
+ln -sf vmlinux-%{kernel_release} /boot/vmlinux%{dashxen}
 
 %post libs
 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
@@ -1530,19 +1558,20 @@
 %ifarch ia64
 mv -f /boot/efi/vmlinuz /boot/efi/vmlinuz.old 2> /dev/null > /dev/null
 %endif
-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
+mv -f /boot/vmlinuz%{dashxen} /boot/vmlinuz%{dashxen}.old 2> /dev/null > /dev/null
+mv -f /boot/System.map%{dashxen} /boot/System.map%{dashxen}.old 2> /dev/null > /dev/null
 %ifarch ia64
 ln -sf vmlinuz-%{kernel_release}smp /boot/efi/vmlinuz
 %endif
-ln -sf vmlinuz-%{kernel_release}smp /boot/vmlinuz
-ln -sf System.map-%{kernel_release}smp /boot/System.map
+ln -sf vmlinuz-%{kernel_release}smp /boot/vmlinuz%{dashxen}
+ln -sf System.map-%{kernel_release}smp /boot/System.map%{dashxen}
 
 %depmod %{kernel_release}smp
 
+%if !%{with xenU}
 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}smp.gz %{kernel_release}smp
-mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old 2> /dev/null > /dev/null
-ln -sf initrd-%{kernel_release}smp.gz %{initrd_dir}/initrd
+mv -f %{initrd_dir}/initrd%{dashxen} %{initrd_dir}/initrd%{dashxen}.old 2> /dev/null > /dev/null
+ln -sf initrd-%{kernel_release}smp.gz %{initrd_dir}/initrd%{dashxen}
 
 if [ -x /sbin/new-kernel-pkg ]; then
 	if [ -f /etc/pld-release ]; then
@@ -1560,10 +1589,11 @@
 elif [ -x /sbin/rc-boot ]; then
 	/sbin/rc-boot 1>&2 || :
 fi
+%endif
 
 %post smp-vmlinux
-mv -f /boot/vmlinux /boot/vmlinux.old 2> /dev/null > /dev/null
-ln -sf vmlinux-%{kernel_release}smp /boot/vmlinux
+mv -f /boot/vmlinux%{dashxen} /boot/vmlinux%{dashxen}.old 2> /dev/null > /dev/null
+ln -sf vmlinux-%{kernel_release}smp /boot/vmlinux%{dashxen}
 
 %post smp-libs
 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release}smp %{kernel_release}smp
@@ -1910,6 +1940,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.441.2.1700.2.1  2007/02/10 18:25:47  alucard
+- xen up to 3.0.4
+- grsecurity builds now
+
 Revision 1.441.2.1700  2007/01/12 10:18:51  mguevara
 - moved p300 from http://.. routes... (and tagged it in the cvs)
 - aded status update for grsecurity after 2.6.19.2 update
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel.spec?r1=1.441.2.1700&r2=1.441.2.1700.2.1&f=u



More information about the pld-cvs-commit mailing list