Author: zbyniu                       Date: Wed Mar 12 02:00:43 2008 GMT
Module: SPECS                         Tag: LINUX_2_6
---- Log message:
- idea: build kernel for rescuecd from this spec (as rescuecd bcond)
- first steps, builds, not tested

---- Files affected:
SPECS:
   kernel.spec (1.441.2.1847 -> 1.441.2.1848) 

---- Diffs:

================================================================
Index: SPECS/kernel.spec
diff -u SPECS/kernel.spec:1.441.2.1847 SPECS/kernel.spec:1.441.2.1848
--- SPECS/kernel.spec:1.441.2.1847      Thu Feb 28 14:11:56 2008
+++ SPECS/kernel.spec   Wed Mar 12 03:00:38 2008
@@ -50,6 +50,8 @@
 
 %bcond_with    vs22            # use vserver 2.2 instead of 2.3 (see comment 
near patch 102)
 
+%bcond_with    rescuecd        # build kernel for our rescue
+
 %{?debug:%define with_verbose 1}
 
 %if %{without grsecurity}
@@ -85,6 +87,14 @@
 %define                have_oss        1
 %define                have_sound      1
 
+%if %{with rescuecd}
+%undefine      with_grsec_full
+%undefine      with_pax
+%undefine      with_pax_full
+%define                have_drm        0
+%define                have_sound      0
+%endif
+
 %ifarch %{ix86} alpha ppc
 %define                have_isa        1
 %else
@@ -103,7 +113,7 @@
 %define                _pre_rc                 %{nil}
 %define                _rc                     %{nil}
 %define                _rel                    0.1
-%define                subname                 
%{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}
+%define                subname                 
%{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}%{?with_rescuecd:-rescuecd}
 
 %define                _enable_debug_packages                  0
 
@@ -179,6 +189,7 @@
 Source55:      kernel-imq.config
 Source56:      kernel-reiser4.config
 Source57:      kernel-wrr.config
+Source58:      kernel-inittmpfs.config
 
 ###
 #      Patches
@@ -338,6 +349,10 @@
 Patch5000:     apparmor-2.6.20.3-v405-fullseries.diff
 Patch5001:     linux-2.6-apparmor-caps.patch
 
+# for rescuecd
+# http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
+Patch7000:     kernel-inittmpfs.patch
+
 # not ready yet
 Patch9997:     pax_selinux_hooks-2.6.20.patch
 
@@ -891,6 +906,10 @@
 # %patch5000 -p1
 # %patch5001 -p1
 
+%if %{with rescuecd}
+%patch7000 -p1
+%endif
+
 # grsecurity & pax stuff
 #
 
@@ -1032,9 +1051,9 @@
        # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings 
via hooks
 
        %if %{with grsec_full}
-               # Hardening grsec options if with pax 
+               # Hardening grsec options if with pax
                sed -i "s:# CONFIG_GRKERNSEC_PROC_MEMMAP is not 
set:CONFIG_GRKERNSEC_PROC_MEMMAP=y:" $1
-               # almost rational (see HIDESYM help) 
+               # almost rational (see HIDESYM help)
                sed -i "s:# CONFIG_GRKERNSEC_HIDESYM is not 
set:CONFIG_GRKERNSEC_HIDESYM=y:" $1
 
                # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from 
the kernel-pax.config
@@ -1047,6 +1066,28 @@
        return 0
 }
 
+RescueConfig() {
+       set -x
+       cat %{SOURCE58} >> $1
+       sed -i "s:CONFIG_SOUND=.:# CONFIG_SOUND is not set:" $1
+       sed -i "s:CONFIG_AUDIT=.:# CONFIG_AUDIT is not set:" $1
+       sed -i "s:CONFIG_TR=.:# CONFIG_TR is not set:" $1
+       sed -i "s:CONFIG_BT=.:# CONFIG_BT is not set:" $1
+       sed -i "s:CONFIG_VIDEO_DEV=.:# CONFIG_VIDEO_DEV is not set:" $1
+       sed -i "s:CONFIG_DVB_CORE=.:# CONFIG_DVB_CORE is not set:" $1
+       sed -i "s:CONFIG_HAMRADIO=.:# CONFIG_HAMRADIO is not set:" $1
+       sed -i "s:CONFIG_ARCNET=.:# CONFIG_ARCNET is not set:" $1
+       sed -i "s:CONFIG_FB=.:# CONFIG_FB is not set:" $1
+       sed -i "s:CONFIG_WATCHDOG=.:# CONFIG_WATCHDOG is not set:" $1
+       sed -i "s:CONFIG_INPUT_JOYSTICK=.:# CONFIG_INPUT_JOYSTICK is not set:" 
$1
+       sed -i "s:CONFIG_DEBUG_KERNEL=.:# CONFIG_DEBUG_KERNEL is not set:" $1
+       sed -i "s:CONFIG_ISDN=.:# CONFIG_ISDN is not set:" $1
+       sed -i "s:CONFIG_AGP\(.*\)=.:# CONFIG_AGP\1 is not set:" $1
+       sed -i "s:CONFIG_GRKERNSEC=.:# CONFIG_GRKERNSEC is not set:" $1
+       sed -i "s:CONFIG_VSERVER\(.*\)=.:# CONFIG_VSERVER\1 is not set:" $1
+       sed -i "s:CONFIG_SECURITY=.:# CONFIG_SECURITY is not set:" $1
+}
+
 BuildConfig() {
        %{?debug:set -x}
        # is this a special kernel we want to build?
@@ -1155,6 +1196,10 @@
 %endif
 %endif
 
+%if %{with rescuecd}
+       RescueConfig arch/%{target_arch_dir}/defconfig
+%endif
+
 %{?debug:sed -i "s:# CONFIG_DEBUG_SLAB is not set:CONFIG_DEBUG_SLAB=y:" 
arch/%{target_arch_dir}/defconfig}
 %{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" 
arch/%{target_arch_dir}/defconfig}
 %{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not 
set:CONFIG_RT_DEADLOCK_DETECT=y:" arch/%{target_arch_dir}/defconfig}
@@ -1449,9 +1494,11 @@
 %if %{with pcmcia}
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
+%if %{without rescuecd}
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
-%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
 %exclude 
/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
+%endif
+%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
 %exclude 
/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
@@ -1479,9 +1526,11 @@
 %defattr(644,root,root,755)
 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
+%if %{without rescuecd}
 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
-/lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
+%endif
+/lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
@@ -1522,7 +1571,7 @@
 %defattr(644,root,root,755)
 /lib/modules/%{kernel_release}/kernel/sound/oss
 %endif
-%endif                 # %%{have_sound}
+%endif
 
 %files headers
 %defattr(644,root,root,755)
@@ -1606,6 +1655,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.441.2.1848  2008-03-12 02:00:38  zbyniu
+- idea: build kernel for rescuecd from this spec (as rescuecd bcond)
+- first steps, builds, not tested
+
 Revision 1.441.2.1847  2008-02-28 13:11:56  zbyniu
 - up to 2.6.24.3, kernel-if_addrlabel.h.patch reverts one small part
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kernel.spec?r1=1.441.2.1847&r2=1.441.2.1848&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to