-
Notifications
You must be signed in to change notification settings - Fork 1
/
Hydrunfile
executable file
·48 lines (36 loc) · 938 Bytes
/
Hydrunfile
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
#!/bin/bash
set -e
# Configure Git
git config --global --add safe.directory '*'
# Configure PGP
echo "${PGP_KEY_PASSWORD}" | base64 -d >'/tmp/pgp-pass'
mkdir -p "${HOME}/.gnupg"
cat >"${HOME}/.gnupg/gpg.conf" <<EOT
yes
passphrase-file /tmp/pgp-pass
pinentry-mode loopback
EOT
echo "${PGP_KEY}" | base64 -d >'/tmp/private.pgp'
gpg --import /tmp/private.pgp
# Configure RPM for PGP and multithreaded compression
echo "%_signature gpg
%_gpg_name $(echo ${PGP_KEY_ID} | base64 -d)
%_binary_payload w2T16.xzdio
%_source_payload w2T16.xzdio" >"${HOME}/.rpmmacros"
# Configure ccache
ccache -F 0
ccache -M 0
# Get ccache stats
ccache -s
# Get kernel source
make clone
# Patch and configure kernel
make "copy/${1}/${2}"
make "patch/${1}/${2}"
make "configure/${1}/${2}"
# Build kernel
make -j$(nproc) "build/${1}/${2}"
# Package kernel
make -j$(nproc) "package/${1}/${2}" PGP_KEY_ID="${PGP_KEY_ID}"
# Get ccache stats
ccache -s