-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake_release.sh
More file actions
executable file
·81 lines (64 loc) · 1.88 KB
/
make_release.sh
File metadata and controls
executable file
·81 lines (64 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
DATE=`date +%Y-%m-%d`
KERNEL_MAJOR_VERSION=4.14
KERNEL_VERSION=4.14.11
echo "Setting up release directory..."
mkdir release
cd release
echo "Uncompressing fresh kernel..."
tar -xf ../kernel/linux-$KERNEL_MAJOR_VERSION.tar.xz
if [ -z $KERNEL_VERSION ];
then
echo "No minor patches being applied, skipping..."
else
echo "Uncompressing fresh kernel subpatches..."
unxz -k ../kernel/patch-$KERNEL_VERSION.xz
fi
cd linux-$KERNEL_MAJOR_VERSION
echo "Creating fresh git repo..."
git init
echo "Adding files to new git repo..."
git add *
echo "First commit of major kernel..."
git commit -m "baseline" >> ../../release.log
if [ -z $KERNEL_VERSION ];
then
echo "No minor patches being applied, skipping..."
else
echo "Patching minor kernel version..."
patch -F 0 -p1 < ../../kernel/patch-$KERNEL_VERSION >> ../../release.log
echo "Committing minor kernel changes..."
git add *
git commit -m "update" >> ../../release.log
fi
echo "Creating new branch..."
git checkout -b dappersec
echo "Patching Dapper Secure Kernel Patches..."
patch -F 0 -p1 < ../../dapper-secure-kernel-patchset-test.patch >> ../../release.log
echo "Committing Dapper Secure Kernel Patches..."
git add *
if [ -z $KERNEL_VERSION ];
then
git commit -m "Dapper Secure Kernel Patchset $KERNEL_MAJOR_VERSION" >> ../../release.log
else
git commit -m "Dapper Secure Kernel Patchset $KERNEL_VERSION" >> ../../release.log
fi
echo "Running format-patch..."
git format-patch master
if [ -z $KERNEL_VERSION ];
then
echo "Moving and renaming patch..."
mv 000* ../../dapper-secure-kernel-patchset-$KERNEL_MAJOR_VERSION-$DATE.patch
else
echo "Moving and renaming patch..."
mv 000* ../../dapper-secure-kernel-patchset-$KERNEL_VERSION-$DATE.patch
fi
if [ -z $KERNEL_VERSION ];
then
echo "No minor patches being applied, skipping..."
else
echo "Tidying up.."
rm ../../kernel/patch-$KERNEL_VERSION
fi
cd ../..
echo "Removing release directory..."
rm -rf release