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

Subversion リポジトリの参照

Contents of /branches/build-f13-2.6.33.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6417 - (show annotations) (download) (as text)
Tue May 5 12:35:21 2015 UTC (9 years ago) by kumaneko
File MIME type: text/x-sh
File size: 3776 byte(s)


1 #! /bin/sh
2 #
3 # This is a kernel build script for Fedora 13's 2.6.33 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.33.3-85.fc13.src.rpm ]
14 then
15 wget ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/releases/13/Fedora/source/SRPMS/kernel-2.6.33.3-85.fc13.src.rpm || die "Can't download source package."
16 fi
17 rpm --checksig kernel-2.6.33.3-85.fc13.src.rpm || die "Can't verify signature."
18 rpm -ivh kernel-2.6.33.3-85.fc13.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.4-20150505.tar.gz ]
22 then
23 wget -O ccs-patch-1.8.4-20150505.tar.gz 'http://sourceforge.jp/frs/redir.php?f=/tomoyo/49684/ccs-patch-1.8.4-20150505.tar.gz' || die "Can't download patch."
24 fi
25
26 if [ ! -r ccs-patch-2.6.33-fedora-13-20110614.diff ]
27 then
28 wget -O ccs-patch-2.6.33-fedora-13-20110614.diff 'http://sourceforge.jp/projects/tomoyo/svn/view/branches/ccs-patch-2.6.33-fedora-13.diff?revision=5185&root=tomoyo' || die "Can't download patch."
29 fi
30
31 cd /root/rpmbuild/SPECS/ || die "Can't chdir to /root/rpmbuild/SPECS/ ."
32 cp -p kernel.spec ccs-kernel.spec || die "Can't copy spec file."
33 patch << "EOF" || die "Can't patch spec file."
34 --- ccs-kernel.spec
35 +++ ccs-kernel.spec
36 @@ -23,7 +23,7 @@
37 #
38 # (Uncomment the '#' and both spaces below to set the buildid.)
39 #
40 -# % define buildid .local
41 +%define buildid _tomoyo_1.8.4
42 ###################################################################
43
44 # buildid can also be specified on the rpmbuild command line
45 @@ -431,6 +431,11 @@
46 # to versions below the minimum
47 #
48
49 +# TOMOYO Linux
50 +%define with_modsign 0
51 +%define _enable_debug_packages 0
52 +%define with_debuginfo 0
53 +
54 #
55 # First the general kernel 2.6 required versions as per
56 # Documentation/Changes
57 @@ -507,7 +512,7 @@
58 AutoProv: yes\
59 %{nil}
60
61 -Name: kernel%{?variant}
62 +Name: ccs-kernel%{?variant}
63 Group: System Environment/Kernel
64 License: GPLv2
65 URL: http://www.kernel.org/
66 @@ -949,7 +954,7 @@
67 Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\
68 AutoReqProv: no\
69 Requires(pre): /usr/bin/find\
70 -%description -n kernel%{?variant}%{?1:-%{1}}-devel\
71 +%description -n ccs-kernel%{?variant}%{?1:-%{1}}-devel\
72 This package provides kernel headers and makefiles sufficient to build modules\
73 against the %{?2:%{2} }kernel package.\
74 %{nil}
75 @@ -1544,6 +1549,10 @@
76
77 # END OF PATCH APPLICATIONS
78
79 +# TOMOYO Linux
80 +tar -zxf %_sourcedir/ccs-patch-1.8.4-20150505.tar.gz
81 +patch -sp1 < %_sourcedir/ccs-patch-2.6.33-fedora-13-20110614.diff
82 +
83 %endif
84
85 # Any further pre-build tree manipulations happen here.
86 @@ -1570,6 +1579,9 @@
87 for i in *.config
88 do
89 mv $i .config
90 + # TOMOYO Linux
91 + cat config.ccs >> .config
92 + sed -i -e 's:CONFIG_DEBUG_INFO=.*:# CONFIG_DEBUG_INFO is not set:' -- .config
93 Arch=`head -1 .config | cut -b 3-`
94 make ARCH=$Arch %{oldconfig_target} > /dev/null
95 echo "# $Arch" > configs/$i
96 EOF
97 echo ""
98 echo ""
99 echo ""
100 echo "Edit /root/rpmbuild/SPECS/ccs-kernel.spec if needed, and run"
101 echo "rpmbuild -bb /root/rpmbuild/SPECS/ccs-kernel.spec"
102 echo "to build kernel rpm packages."
103 echo ""
104 ARCH=`uname -m`
105 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."
106 sleep 30
107 if /bin/false
108 then
109 patch << "EOF" || die "Can't patch spec file."
110 --- /root/rpmbuild/SPECS/ccs-kernel.spec
111 +++ /root/rpmbuild/SPECS/ccs-kernel.spec
112 @@ -221,7 +221,7 @@
113
114 # kernel-PAE is only built on i686.
115 %ifarch i686
116 -%define with_pae 1
117 +%define with_pae 0
118 %else
119 %define with_pae 0
120 %endif
121 EOF
122 fi
123 exec rpmbuild -bb --target $ARCH --with baseonly --without debug --without debuginfo /root/rpmbuild/SPECS/ccs-kernel.spec
124 exit 0

Properties

Name Value
svn:executable *

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