| 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-573.18.1.el6.src.rpm ] |
if [ ! -r kernel-2.6.32-573.22.1.el6.src.rpm ] |
| 14 |
then |
then |
| 15 |
wget http://vault.centos.org/6.7/updates/Source/SPackages/kernel-2.6.32-573.18.1.el6.src.rpm || die "Can't download source package." |
wget http://vault.centos.org/6.7/updates/Source/SPackages/kernel-2.6.32-573.22.1.el6.src.rpm || die "Can't download source package." |
| 16 |
fi |
fi |
| 17 |
LANG=C rpm --checksig kernel-2.6.32-573.18.1.el6.src.rpm | grep -F ': rsa sha1 (md5) pgp md5 OK' || die "Can't verify signature." |
LANG=C rpm --checksig kernel-2.6.32-573.22.1.el6.src.rpm | grep -F ': rsa sha1 (md5) pgp md5 OK' || die "Can't verify signature." |
| 18 |
rpm -ivh kernel-2.6.32-573.18.1.el6.src.rpm || die "Can't install source package." |
rpm -ivh kernel-2.6.32-573.22.1.el6.src.rpm || die "Can't install source package." |
| 19 |
|
|
| 20 |
cd /root/rpmbuild/SOURCES/ || die "Can't chdir to /root/rpmbuild/SOURCES/ ." |
cd /root/rpmbuild/SOURCES/ || die "Can't chdir to /root/rpmbuild/SOURCES/ ." |
| 21 |
if [ ! -r caitsith-patch-0.1-20160214.tar.gz ] |
if [ ! -r caitsith-patch-0.1-20160406.tar.gz ] |
| 22 |
then |
then |
| 23 |
wget -O caitsith-patch-0.1-20160214.tar.gz 'http://osdn.jp/frs/redir.php?f=/caitsith/55464/caitsith-patch-0.1-20160214.tar.gz' || die "Can't download patch." |
wget -O caitsith-patch-0.1-20160406.tar.gz 'http://osdn.jp/frs/redir.php?f=/caitsith/55464/caitsith-patch-0.1-20160406.tar.gz' || die "Can't download patch." |
| 24 |
fi |
fi |
| 25 |
|
|
| 26 |
cd /root/rpmbuild/SPECS/ || die "Can't chdir to /root/rpmbuild/SPECS/ ." |
cd /root/rpmbuild/SPECS/ || die "Can't chdir to /root/rpmbuild/SPECS/ ." |
| 35 |
-# % define buildid .local |
-# % define buildid .local |
| 36 |
+%define buildid _caitsith_0.1 |
+%define buildid _caitsith_0.1 |
| 37 |
|
|
| 38 |
%define distro_build 573.18.1 |
%define distro_build 573.22.1 |
| 39 |
%define signmodules 1 |
%define signmodules 1 |
| 40 |
@@ -437,7 +437,7 @@ |
@@ -437,7 +437,7 @@ |
| 41 |
# 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 |
| 69 |
ApplyOptionalPatch linux-kernel-test.patch |
ApplyOptionalPatch linux-kernel-test.patch |
| 70 |
|
|
| 71 |
+# CaitSith |
+# CaitSith |
| 72 |
+tar -zxf %_sourcedir/caitsith-patch-0.1-20160214.tar.gz |
+tar -zxf %_sourcedir/caitsith-patch-0.1-20160406.tar.gz |
| 73 |
+sed -i -e 's/CCSECURITY/CAITSITH/g' -e 's/ccsecurity/caitsith/g' -e 's/ccs_domain_info/cs_domain_info/g' -e 's/ccs_flags/cs_flags/g' patches/ccs-patch-*.diff |
+sed -i -e 's/CCSECURITY/CAITSITH/g' -e 's/ccsecurity/caitsith/g' -e 's/ccs_domain_info/cs_domain_info/g' -e 's/ccs_flags/cs_flags/g' patches/ccs-patch-*.diff |
| 74 |
+patch -sp1 < patches/ccs-patch-2.6.32-centos-6.diff |
+patch -sp1 < patches/ccs-patch-2.6.32-centos-6.diff |
| 75 |
# Any further pre-build tree manipulations happen here. |
# Any further pre-build tree manipulations happen here. |