Skip to content

Commit

Permalink
Sanity test. 'make oldconfig' should not modify '.config'."
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Schleizer committed Jan 22, 2020
1 parent 9871377 commit 330e67c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions usr/share/hardened-kernel/build
Expand Up @@ -56,6 +56,7 @@ MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
## Debugging.
whoami
env
true "CI: $CI"

## TODO: do not use networking as per https://forums.whonix.org/t/kernel-recompilation-for-better-hardening/7598/214
## https://forums.whonix.org/t/kernel-recompilation-for-better-hardening/7598/267
Expand Down Expand Up @@ -110,6 +111,13 @@ if [ "$debug" = "true" ]; then
fi
fi

if [ "$CI" = "true" ]; then
true "Sanity test. 'make oldconfig' should not modify '.config'."
true "https://forums.whonix.org/t/kernel-recompilation-for-better-hardening/7598/317"
make oldconfig -C "$extracted_linux_kernel_sources_folder"
diff "${MYDIR}/${kernel_config}" "$extracted_linux_kernel_sources_folder/.config"
fi

cat "${MYDIR}/debugging-config" >> "$extracted_linux_kernel_sources_folder/.config"
if [ "${kernel_config}" = "hardened-host-kernel" ]; then
cat "${MYDIR}/debugging-config-host" >> "$extracted_linux_kernel_sources_folder/.config"
Expand Down
1 change: 1 addition & 0 deletions usr/share/hardened-kernel/ci_test
Expand Up @@ -12,6 +12,7 @@ true "$0: start"
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

## travis.debian.net does not pass the CI environment variable to docker.
## build script reads CI variable.
CI=true
export CI

Expand Down

0 comments on commit 330e67c

Please sign in to comment.