オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Contents of /trunk/1.8.x/ccs-patch/specs/build-c6-2.6.32.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4165 - (show annotations) (download) (as text)
Wed Nov 24 01:33:23 2010 UTC (13 years, 6 months ago) by kumaneko
File MIME type: text/x-sh
File size: 2938 byte(s)


1 #! /bin/sh
2 #
3 # This is a kernel build script for CentOS 6.0's 2.6.32 kernel.
4 #
5
6 die () {
7 echo $1
8 exit 1
9 }
10
11 cd /tmp/ || die "Can't chdir to /tmp/ ."
12
13 if [ ! -r kernel-2.6.32-71.7.1.el6.src.rpm ]
14 then
15 wget http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/kernel-2.6.32-71.7.1.el6.src.rpm || die "Can't download source package."
16 fi
17 rpm --checksig kernel-2.6.32-71.7.1.el6.src.rpm || die "Can't verify signature."
18 rpm -ivh kernel-2.6.32-71.7.1.el6.src.rpm || die "Can't install source package."
19
20 cd /root/rpmbuild/SOURCES/ || die "Can't chdir to /root/rpmbuild/SOURCES/ ."
21 if [ ! -r ccs-patch-1.8.0-20101122.tar.gz ]
22 then
23 wget -O ccs-patch-1.8.0-20101122.tar.gz 'http://sourceforge.jp/frs/redir.php?f=/tomoyo/49684/ccs-patch-1.8.0-20101122.tar.gz' || die "Can't download patch."
24 fi
25
26 cd /root/rpmbuild/SPECS/ || die "Can't chdir to /root/rpmbuild/SPECS/ ."
27 cp -p kernel.spec ccs-kernel.spec || die "Can't copy spec file."
28 patch << "EOF" || die "Can't patch spec file."
29 --- ccs-kernel.spec
30 +++ ccs-kernel.spec
31 @@ -14,7 +14,7 @@
32 # that the kernel isn't the stock distribution kernel, for example,
33 # by setting the define to ".local" or ".bz123456"
34 #
35 -# % define buildid .local
36 +%define buildid _tomoyo_1.8.0
37
38 %define rhel 1
39 %if %{rhel}
40 @@ -488,7 +488,7 @@
41 AutoProv: yes\
42 %{nil}
43
44 -Name: kernel%{?variant}
45 +Name: ccs-kernel%{?variant}
46 Group: System Environment/Kernel
47 License: GPLv2
48 URL: http://www.kernel.org/
49 @@ -712,7 +712,7 @@
50 Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\
51 AutoReqProv: no\
52 Requires(pre): /usr/bin/find\
53 -%description -n kernel%{?variant}%{?1:-%{1}}-devel\
54 +%description -n ccs-kernel%{?variant}%{?1:-%{1}}-devel\
55 This package provides kernel headers and makefiles sufficient to build modules\
56 against the %{?2:%{2} }kernel package.\
57 %{nil}
58 @@ -878,6 +878,10 @@
59
60 ApplyOptionalPatch linux-kernel-test.patch
61
62 +# TOMOYO Linux
63 +tar -zxf %_sourcedir/ccs-patch-1.8.0-20101122.tar.gz
64 +patch -sp1 < patches/ccs-patch-2.6.32-centos-6.0.diff
65 +
66 # Any further pre-build tree manipulations happen here.
67
68 chmod +x scripts/checkpatch.pl
69 @@ -902,6 +906,9 @@
70 for i in *.config
71 do
72 mv $i .config
73 + # TOMOYO Linux
74 + cat config.ccs >> .config
75 + sed -i -e "s/CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/" -- .config
76 Arch=`head -1 .config | cut -b 3-`
77 make ARCH=$Arch %{oldconfig_target} > /dev/null
78 echo "# $Arch" > configs/$i
79 EOF
80 echo ""
81 echo ""
82 echo ""
83 echo "Edit /root/rpmbuild/SPECS/ccs-kernel.spec if needed, and run"
84 echo "rpmbuild -bb /root/rpmbuild/SPECS/ccs-kernel.spec"
85 echo "to build kernel rpm packages."
86 echo ""
87 ARCH=`uname -m`
88 echo "I'll start 'rpmbuild -bb --target $ARCH --with baseonly --without debug --without debuginfo /root/rpmbuild/SPECS/ccs-kernel.spec' in 30 seconds. Press Ctrl-C to stop."
89 sleep 30
90 exec rpmbuild -bb --target $ARCH --with baseonly --without debug --without debuginfo /root/rpmbuild/SPECS/ccs-kernel.spec
91 exit 0

Properties

Name Value
svn:executable *

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26