Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/caitsith-patch/specs/build-c8-4.18.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389 - (hide annotations) (download) (as text)
Mon Mar 18 11:09:57 2024 UTC (3 weeks, 3 days ago) by kumaneko
File MIME type: text/x-sh
File size: 2370 byte(s)


1 kumaneko 302 #! /bin/sh
2     #
3 kumaneko 365 # This is a kernel build script for CentOS Stream 8's 4.18 kernel.
4 kumaneko 302 #
5    
6     die () {
7     echo $1
8     exit 1
9     }
10    
11     cd /tmp/ || die "Can't chdir to /tmp/ ."
12    
13 kumaneko 375 if [ ! -r kernel-4.18.0-448.el8.src.rpm ]
14 kumaneko 302 then
15 kumaneko 375 wget https://vault.centos.org/centos/8-stream/BaseOS/Source/SPackages/kernel-4.18.0-448.el8.src.rpm || die "Can't download source package."
16 kumaneko 302 fi
17 kumaneko 375 LANG=C rpm --checksig kernel-4.18.0-448.el8.src.rpm | grep -F ': digests signatures OK' || die "Can't verify signature."
18     rpm -ivh kernel-4.18.0-448.el8.src.rpm || die "Can't install source package."
19 kumaneko 302
20     cd ~/rpmbuild/SOURCES/ || die "Can't chdir to ~/rpmbuild/SOURCES/ ."
21 kumaneko 387 if [ ! -r caitsith-patch-0.2-20231225.tar.gz ]
22 kumaneko 302 then
23 kumaneko 389 wget https://sourceforge.net/projects/tomoyo/files/caitsith-patch/0.2/caitsith-patch-0.2-20231225.tar.gz || die "Can't download patch."
24 kumaneko 302 fi
25    
26     cd ~/rpmbuild/SPECS/ || die "Can't chdir to ~/rpmbuild/SPECS/ ."
27     cp -p kernel.spec cs-kernel.spec || die "Can't copy spec file."
28     patch << "EOF" || die "Can't patch spec file."
29     --- cs-kernel.spec
30     +++ cs-kernel.spec
31 kumaneko 371 @@ -35,7 +35,7 @@
32 kumaneko 302 %global zipsed -e 's/\.ko$/\.ko.xz/'
33     %endif
34    
35     -# define buildid .local
36 kumaneko 378 +%define buildid _caitsith_0.2.11
37 kumaneko 302
38     %define rpmversion 4.18.0
39 kumaneko 375 %define pkgrelease 448.el8
40     @@ -1085,6 +1085,10 @@
41 kumaneko 302
42     # END OF PATCH APPLICATIONS
43    
44     +# CaitSith
45 kumaneko 387 +tar -zxf %_sourcedir/caitsith-patch-0.2-20231225.tar.gz
46 kumaneko 302 +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
47     +patch -sp1 < patches/ccs-patch-4.18-centos-8.diff
48     # Any further pre-build tree manipulations happen here.
49    
50 kumaneko 311 %if %{with_realtime}
51 kumaneko 375 @@ -1212,6 +1216,9 @@
52 kumaneko 314 cp %{SOURCE9} certs/.
53 kumaneko 302 %endif
54    
55     + # CaitSith
56     + sed -e 's@/sbin/init@/usr/lib/systemd/systemd@' -- config.caitsith >> .config
57     +
58     Arch=`head -1 .config | cut -b 3-`
59     echo USING ARCH=$Arch
60    
61     EOF
62     echo ""
63     echo ""
64     echo ""
65     echo "Edit ~/rpmbuild/SPECS/cs-kernel.spec if needed, and run"
66     echo "rpmbuild -bb ~/rpmbuild/SPECS/cs-kernel.spec"
67     echo "to build kernel rpm packages."
68     echo ""
69     ARCH=`uname -m`
70     echo "I'll start 'rpmbuild -bb --target $ARCH --with baseonly --without debug --without debuginfo ~/rpmbuild/SPECS/cs-kernel.spec' in 30 seconds. Press Ctrl-C to stop."
71     sleep 30
72     exec rpmbuild -bb --target $ARCH --with baseonly --without debug --without debuginfo ~/rpmbuild/SPECS/cs-kernel.spec
73     exit 0

Properties

Name Value
svn:executable *

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