diff --git a/PKGBUILD b/PKGBUILD index 0c73c01..5775c47 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -130,16 +130,16 @@ prepare() { cd ${_srcname} ### Add upstream patches - echo ":: prepare: Adding upstream patches" + echo ":: prepare: adding upstream patches" patch -Np1 -i ../patch-${pkgver} || true ### Setting version - echo ":: prepare: setting version" + echo ":: prepare: updating version" echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname ### Add Clear Linux patches - echo ":: prepare: Patching kernel with Clear Linux patches" + echo ":: prepare: patching kernel with Clear Linux patches" for i in $(grep '^Patch' ${srcdir}/cl-linux/linux.spec |\ grep -Ev '^Patch0132|^Patch0118|^Patch0113|^Patch0138|^Patch0139' | sed -n 's/.*: //p'); do if [ -n "$_use_llvm_lto" ]; then @@ -147,16 +147,16 @@ prepare() { continue fi fi - echo ":: prepare: Applying patch ${i}..." + echo ":: prepare: applying patch ${i}..." patch -Np1 -i "$srcdir/cl-linux/${i}" || true done ### Copy config - echo ":: prepare: Copying kernel-optimized kconfig into kernel repository" + echo ":: prepare: copying kernel-optimized kconfig into kernel repository" cp -Tf "${startdir}/kconfig" ./.config if [ -n "$_use_llvm_lto" ]; then - echo ":: prepare: Enabling LLVM support" + echo ":: prepare: enabling LLVM support" scripts/config -d LTO_NONE \ -e LTO \ -e LTO_CLANG \ @@ -168,14 +168,14 @@ prepare() { fi if [ "$_debug" == "y" ]; then - echo ":: prepare: Enabling debugging features" + echo ":: prepare: enabling debugging features" scripts/config -e DEBUG_INFO \ -e DEBUG_INFO_BTF \ -e DEBUG_INFO_DWARF4 \ -e PAHOLE_HAS_SPLIT_BTF \ -e DEBUG_INFO_BTF_MODULES elif [ "$_debug" == "n" ]; then - echo ":: prepare: Disabling debugging features" + echo ":: prepare: disabling debugging features" scripts/config -d DEBUG_INFO \ -d DEBUG_INFO_BTF \ -d DEBUG_INFO_DWARF4 \ @@ -183,13 +183,13 @@ prepare() { -d DEBUG_INFO_BTF_MODULES fi - echo ":: prepare: Running olddefconfig" + echo ":: prepare: running olddefconfig" make ${BUILD_FLAGS[*]} olddefconfig diff -u $srcdir/cl-linux/config .config || : # https://github.com/graysky2/kernel_compiler_patch # make sure to apply after olddefconfig to allow the next section - echo ":: prepare: Patching kernel with kernel_compiler_patch" + echo ":: prepare: patching kernel with kernel_compiler_patch" patch -Np1 -i "$srcdir/kernel_compiler_patch-$_gcc_more_v/more-uarches-for-kernel-6.1.79-6.8-rc3.patch" if [ -n "$_subarch" ]; then @@ -206,30 +206,31 @@ prepare() { # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then if [ -e "$HOME/.config/modprobed.db" ]; then - echo ":: prepare: Executing localmodconfig" + echo ":: prepare: executing localmodconfig" make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig else - echo ":: prepare: error: No modprobed.db found at \"${HOME}/.config/modprobed.db\", skipping" + echo ":: prepare: error: no modprobed.db found at \"${HOME}/.config/modprobed.db\", skipping" fi fi - echo ":: prepare: Writing version" + echo ":: prepare: writing kernel version" make -s kernelrelease > version [[ -z "$_makexconfig" ]] || ( -echo ":: prepare: Executing xconfig" -make ${BUILD_FLAGS[*]} xconfig -) + echo ":: prepare: executing xconfig" + make ${BUILD_FLAGS[*]} xconfig + ) [[ -z "$_makenconfig" ]] || ( -echo ":: prepare: Executing nconfig" -make ${BUILD_FLAGS[*]} nconfig -) + echo ":: prepare: executing nconfig" + make ${BUILD_FLAGS[*]} nconfig + ) ### Save configuration for later reuse [[ -z "$_copyfinalconfig" ]] || ( -echo ":: prepare: Copying configuration file into kernel-optimized repository" -cp -Tf ./.config "${startdir}/finalconfig-${pkgver}-${pkgrel}${pkgbase#linux}" -) + echo ":: prepare: copying configuration file into kernel-optimized repository" + cp -Tf ./.config "${startdir}/finalconfig-${pkgver}-${pkgrel}${pkgbase#linux}" + ) + echo ":: prepare: prepare() finished" } build() { @@ -238,9 +239,12 @@ build() { cd ${_srcname} echo ":: build: starting compilation (make ${BUILD_FLAGS[*]} all)" make ${BUILD_FLAGS[*]} all + echo ":: build: build() finished" } _package() { + echo ":: _package: _package() called" + echo ":: _package: updating package information" pkgdesc="${pkgdesc} This package includes the kernel and compiled modules." depends=('coreutils' 'kmod' 'initramfs') optdepends=('wireless-regdb: to set the correct wireless channels of your country' @@ -249,11 +253,12 @@ _package() { provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE) install=linux.install + echo ":: _package: cding into \"${_srcname}\"" cd $_srcname local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname ### Add Clear Linux patches - echo ":: prepare: Patching kernel with Clear Linux patches" + echo ":: prepare: patching kernel with Clear Linux patches" for i in $(grep '^Patch' ${srcdir}/cl-linux/linux.spec |\ grep -Ev '^Patch0132|^Patch0118|^Patch0113|^Patch0138|^Patch0139' | sed -n 's/.*: //p'); do if [ -n "$_use_llvm_lto" ]; then @@ -63,16 +63,16 @@ prepare() { continue fi fi - echo ":: prepare: Applying patch ${i}..." + echo ":: prepare: applying patch ${i}..." patch -Np1 -i "$srcdir/cl-linux/${i}" || true done ### Copy config - echo ":: prepare: Copying kernel-optimized kconfig into kernel repository" + echo ":: prepare: copying kernel-optimized kconfig into kernel repository" cp -Tf "${startdir}/kconfig" ./.config if [ -n "$_use_llvm_lto" ]; then - echo ":: prepare: Enabling LLVM support" + echo ":: prepare: enabling LLVM support" scripts/config -d LTO_NONE \ -e LTO \ -e LTO_CLANG \ @@ -84,14 +84,14 @@ prepare() { fi if [ "$_debug" == "y" ]; then - echo ":: prepare: Enabling debugging features" + echo ":: prepare: enabling debugging features" scripts/config -e DEBUG_INFO \ -e DEBUG_INFO_BTF \ -e DEBUG_INFO_DWARF4 \ -e PAHOLE_HAS_SPLIT_BTF \ -e DEBUG_INFO_BTF_MODULES elif [ "$_debug" == "n" ]; then - echo ":: prepare: Disabling debugging features" + echo ":: prepare: disabling debugging features" scripts/config -d DEBUG_INFO \ -d DEBUG_INFO_BTF \ -d DEBUG_INFO_DWARF4 \ @@ -99,13 +99,13 @@ prepare() { -d DEBUG_INFO_BTF_MODULES fi - echo ":: prepare: Running olddefconfig" + echo ":: prepare: running olddefconfig" make ${BUILD_FLAGS[*]} olddefconfig diff -u $srcdir/cl-linux/config .config || : # https://github.com/graysky2/kernel_compiler_patch # make sure to apply after olddefconfig to allow the next section - echo ":: prepare: Patching kernel with kernel_compiler_patch" + echo ":: prepare: patching kernel with kernel_compiler_patch" patch -Np1 -i "$srcdir/kernel_compiler_patch-$_gcc_more_v/more-uarches-for-kernel-6.1.79-6.8-rc3.patch" if [ -n "$_subarch" ]; then @@ -122,30 +122,31 @@ prepare() { # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then if [ -e "$HOME/.config/modprobed.db" ]; then - echo ":: prepare: Executing localmodconfig" + echo ":: prepare: executing localmodconfig" make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig else - echo ":: prepare: error: No modprobed.db found at \"${HOME}/.config/modprobed.db\", skipping" + echo ":: prepare: error: no modprobed.db found at \"${HOME}/.config/modprobed.db\", skipping" fi fi - echo ":: prepare: Writing version" + echo ":: prepare: writing kernel version" make -s kernelrelease > version [[ -z "$_makexconfig" ]] || ( -echo ":: prepare: Executing xconfig" -make ${BUILD_FLAGS[*]} xconfig -) + echo ":: prepare: executing xconfig" + make ${BUILD_FLAGS[*]} xconfig + ) [[ -z "$_makenconfig" ]] || ( -echo ":: prepare: Executing nconfig" -make ${BUILD_FLAGS[*]} nconfig -) + echo ":: prepare: executing nconfig" + make ${BUILD_FLAGS[*]} nconfig + ) ### Save configuration for later reuse [[ -z "$_copyfinalconfig" ]] || ( -echo ":: prepare: Copying configuration file into kernel-optimized repository" -cp -Tf ./.config "${startdir}/finalconfig-${pkgver}-${pkgrel}${pkgbase#linux}" -) + echo ":: prepare: copying configuration file into kernel-optimized repository" + cp -Tf ./.config "${startdir}/finalconfig-${pkgver}-${pkgrel}${pkgbase#linux}" + ) + echo ":: prepare: prepare() finished" } build() { @@ -154,9 +155,12 @@ build() { cd ${_srcname} echo ":: build: starting compilation (make ${BUILD_FLAGS[*]} all)" make ${BUILD_FLAGS[*]} all + echo ":: build: build() finished" } _package() { + echo ":: _package: _package() called" + echo ":: _package: updating package information" pkgdesc="${pkgdesc} This package includes the kernel and compiled modules." depends=('coreutils' 'kmod' 'initramfs') optdepends=('wireless-regdb: to set the correct wireless channels of your country' @@ -165,11 +169,12 @@ _package() { provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE) install=linux.install + echo ":: _package: cding into \"${_srcname}\"" cd $_srcname local modulesdir="$pkgdir/usr/lib/modules/$(