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

Subversion リポジトリの参照

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5729 by kumaneko, Thu Dec 22 01:39:17 2011 UTC revision 6184 by kumaneko, Thu Jan 17 14:04:43 2013 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2  #  #
3  # This is a kernel build script for CentOS 6.2's 2.6.32 kernel.  # This is a kernel build script for CentOS 6.3's 2.6.32 kernel.
4  #  #
5    
6  die () {  die () {
# Line 10  die () { Line 10  die () {
10    
11  cd /tmp/ || die "Can't chdir to /tmp/ ."  cd /tmp/ || die "Can't chdir to /tmp/ ."
12    
13  if [ ! -r kernel-2.6.32-220.el6.src.rpm ]  if [ ! -r kernel-2.6.32-279.19.1.el6.src.rpm ]
14  then  then
15      wget http://vault.centos.org/6.2/os/Source/SPackages/kernel-2.6.32-220.el6.src.rpm || die "Can't download source package."      wget http://vault.centos.org/6.3/updates/Source/SPackages/kernel-2.6.32-279.19.1.el6.src.rpm || die "Can't download source package."
16  fi  fi
17  rpm --checksig kernel-2.6.32-220.el6.src.rpm || die "Can't verify signature."  rpm --checksig kernel-2.6.32-279.19.1.el6.src.rpm || die "Can't verify signature."
18  rpm -ivh kernel-2.6.32-220.el6.src.rpm || die "Can't install source package."  rpm -ivh kernel-2.6.32-279.19.1.el6.src.rpm || die "Can't install source package."
19  # sed -i -e 's@--keyring \./kernel\.pub Red@--keyring ./kernel.pub CentOS@' -- /root/rpmbuild/SPECS/kernel.spec || die "Can't update spec file"  # sed -i -e 's@--keyring \./kernel\.pub Red@--keyring ./kernel.pub CentOS@' -- /root/rpmbuild/SPECS/kernel.spec || die "Can't update spec file"
20  # sed -i -e 's@Red Hat, Inc\.@CentOS@' -- /root/rpmbuild/SOURCES/genkey || die "Can't patch file"  # sed -i -e 's@Red Hat, Inc\.@CentOS@' -- /root/rpmbuild/SOURCES/genkey || die "Can't patch file"
21    
22  cd /root/rpmbuild/SOURCES/ || die "Can't chdir to /root/rpmbuild/SOURCES/ ."  cd /root/rpmbuild/SOURCES/ || die "Can't chdir to /root/rpmbuild/SOURCES/ ."
23  if [ ! -r ccs-patch-1.8.3-20111213.tar.gz ]  if [ ! -r ccs-patch-1.8.3-20130117.tar.gz ]
24  then  then
25      wget -O ccs-patch-1.8.3-20111213.tar.gz 'http://sourceforge.jp/frs/redir.php?f=/tomoyo/49684/ccs-patch-1.8.3-20111213.tar.gz' || die "Can't download patch."      wget -O ccs-patch-1.8.3-20130117.tar.gz 'http://sourceforge.jp/frs/redir.php?f=/tomoyo/49684/ccs-patch-1.8.3-20130117.tar.gz' || die "Can't download patch."
26  fi  fi
27    
28  cd /root/rpmbuild/SPECS/ || die "Can't chdir to /root/rpmbuild/SPECS/ ."  cd /root/rpmbuild/SPECS/ || die "Can't chdir to /root/rpmbuild/SPECS/ ."
# Line 30  cp -p kernel.spec ccs-kernel.spec || die Line 30  cp -p kernel.spec ccs-kernel.spec || die
30  patch << "EOF" || die "Can't patch spec file."  patch << "EOF" || die "Can't patch spec file."
31  --- ccs-kernel.spec  --- ccs-kernel.spec
32  +++ ccs-kernel.spec  +++ ccs-kernel.spec
33  @@ -14,7 +14,7 @@  @@ -15,7 +15,7 @@
34   # that the kernel isn't the stock distribution kernel, for example,   # that the kernel isn't the stock distribution kernel, for example,
35   # by setting the define to ".local" or ".bz123456"   # by setting the define to ".local" or ".bz123456"
36   #   #
37  -# % define buildid .local  -# % define buildid .local
38  +%define buildid _tomoyo_1.8.3p4  +%define buildid _tomoyo_1.8.3p7
39    
40   %define rhel 1   %define rhel 1
41   %if %{rhel}   %if %{rhel}
42  @@ -450,7 +450,7 @@  @@ -451,7 +451,7 @@
43   # Packages that need to be installed before the kernel is, because the %post   # Packages that need to be installed before the kernel is, because the %post
44   # scripts use them.   # scripts use them.
45   #   #
# Line 48  patch << "EOF" || die "Can't patch spec Line 48  patch << "EOF" || die "Can't patch spec
48   %if %{with_dracut}   %if %{with_dracut}
49   %define initrd_prereq  dracut-kernel >= 002-18.git413bcf78   %define initrd_prereq  dracut-kernel >= 002-18.git413bcf78
50   %else   %else
51  @@ -486,7 +486,7 @@  @@ -487,7 +487,7 @@
52   AutoProv: yes\   AutoProv: yes\
53   %{nil}   %{nil}
54    
# Line 57  patch << "EOF" || die "Can't patch spec Line 57  patch << "EOF" || die "Can't patch spec
57   Group: System Environment/Kernel   Group: System Environment/Kernel
58   License: GPLv2   License: GPLv2
59   URL: http://www.kernel.org/   URL: http://www.kernel.org/
60  @@ -736,7 +736,7 @@  @@ -755,7 +755,7 @@
61   Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\   Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\
62   AutoReqProv: no\   AutoReqProv: no\
63   Requires(pre): /usr/bin/find\   Requires(pre): /usr/bin/find\
# Line 66  patch << "EOF" || die "Can't patch spec Line 66  patch << "EOF" || die "Can't patch spec
66   This package provides kernel headers and makefiles sufficient to build modules\   This package provides kernel headers and makefiles sufficient to build modules\
67   against the %{?2:%{2} }kernel package.\   against the %{?2:%{2} }kernel package.\
68   %{nil}   %{nil}
69  @@ -902,6 +902,10 @@  @@ -921,6 +921,10 @@
70    
71   ApplyOptionalPatch linux-kernel-test.patch   ApplyOptionalPatch linux-kernel-test.patch
72    
73  +# TOMOYO Linux  +# TOMOYO Linux
74  +tar -zxf %_sourcedir/ccs-patch-1.8.3-20111213.tar.gz  +tar -zxf %_sourcedir/ccs-patch-1.8.3-20130117.tar.gz
75  +patch -sp1 < patches/ccs-patch-2.6.32-centos-6.2.diff  +patch -sp1 < patches/ccs-patch-2.6.32-centos-6.3.diff
76  +  +
77   # Any further pre-build tree manipulations happen here.   # Any further pre-build tree manipulations happen here.
78    
79   chmod +x scripts/checkpatch.pl   chmod +x scripts/checkpatch.pl
80  @@ -926,6 +930,9 @@  @@ -945,6 +949,9 @@
81   for i in *.config   for i in *.config
82   do   do
83     mv $i .config     mv $i .config

Legend:
Removed from v.5729  
changed lines
  Added in v.6184

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