From cdbf5273ad364cef1d9ccec94e40ceb0de334121 Mon Sep 17 00:00:00 2001 From: iWeaker4you <49424816+iWeaker4you@users.noreply.github.com> Date: Thu, 27 Aug 2020 04:44:41 -0700 Subject: [PATCH] Fix certificate issue on Debian (#55) * Fix certificate issue on Debian I only applied it in version 5.8 so that first you can see if it applies to all, or if my solution is viable. The problem is that every time it does the verification, it downloads the original configuration from github and does not maintain its own manual configuration that solves the certificate problem in Debian, it does not finish compiling for that reason. And when you give Install.sh the CONFIG_SYSTEM_TRUSTED_KEYS = "debian / certs / test-signing-certs.pem" is reset, regardless of whether you edited it. * Solution to certificate problem in Debian [Fixed] * Add Debian only support * Add Debian custom support * Oop! OR Conditional * Replace AND for OR Condition * OR ...... * Regression with OR.. --- linux58-tkg/customization.cfg | 2 +- linux58-tkg/install.sh | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/linux58-tkg/customization.cfg b/linux58-tkg/customization.cfg index bef5b07..ac629bd 100644 --- a/linux58-tkg/customization.cfg +++ b/linux58-tkg/customization.cfg @@ -1,6 +1,6 @@ # linux58-TkG config file -# Linux distribution you are using, options are "Arch" (default), "Ubuntu" +# Linux distribution you are using, options are "Arch" (default), "Debian" or "Ubuntu" _distro="Arch" #### MISC OPTIONS #### diff --git a/linux58-tkg/install.sh b/linux58-tkg/install.sh index 0be6a43..babe795 100755 --- a/linux58-tkg/install.sh +++ b/linux58-tkg/install.sh @@ -46,13 +46,13 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then source linux*-tkg-config/prepare - if [ $1 = "install" ] && [ "$_distro" != "Ubuntu" ]; then - msg2 "Variable \"_distro\" in \"customization.cfg\" hasn't been set to \"Ubuntu\"" + if [ $1 = "install" ] && [[ "$_distro" != "Ubuntu" && "$_distro" != "Debian" ]]; then + msg2 "Variable \"_distro\" in \"customization.cfg\" hasn't been set to \"Debian\" or \"Ubuntu\"" msg2 "This script can only install custom kernels for Ubuntu and Debian derivatives. Exiting..." exit 0 fi - if [ "$_distro" = "Ubuntu" ]; then + if [ "$_distro" = "Debian" ] || [ "$_distro" = "Ubuntu" ]; then msg2 "Installing dependencies" sudo apt install git build-essential kernel-package fakeroot libncurses5-dev libssl-dev ccache bison flex else @@ -105,6 +105,9 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then msg2 "Copying current kernel's config and running make oldconfig..." cp /boot/config-`uname -r` .config + if [ "$_distro" = "Debian" ]; then #Help Debian cert problem. + sed -i -e 's#CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/test-signing-certs.pem"#CONFIG_SYSTEM_TRUSTED_KEYS=""#g' .config + fi yes '' | make oldconfig msg2 "Done" @@ -132,7 +135,7 @@ if [ "$1" = "install" ]; then # ccache if [ "$_noccache" != "true" ]; then - if [ "$_distro" = "Ubuntu" ] && dpkg -l ccache > /dev/null; then + if [[ "$_distro" = "Ubuntu" || "$_distro" = "Debian" ]] && dpkg -l ccache > /dev/null; then export PATH="/usr/lib/ccache/bin/:$PATH" export CCACHE_SLOPPINESS="file_macro,locale,time_macros" export CCACHE_NOHASHDIR="true" @@ -145,7 +148,7 @@ if [ "$1" = "install" ]; then _kernel_flavor="tkg-${_cpusched}" fi - if [ "$_distro" = "Ubuntu" ]; then + if [ "$_distro" = "Ubuntu" ] || [ "$_distro" = "Debian" ]; then if make -j ${_thread_num} deb-pkg LOCALVERSION=-${_kernel_flavor}; then msg2 "Building successfully finished!" read -p "Do you want to install the new Kernel ? y/[n]: " _install