diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD index 46a3843f..4d4a297b 100644 --- a/linux-cachyos-bore/PKGBUILD +++ b/linux-cachyos-bore/PKGBUILD @@ -145,12 +145,12 @@ _build_nvidia_open=${_build_nvidia_open-} _build_debug=${_build_debug-} if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then - pkgsuffix=cachyos-${_cpusched}-lto - pkgbase=linux-$pkgsuffix + _pkgsuffix="cachyos-${_cpusched}-lto" + pkgbase="linux-$_pkgsuffix" elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then - pkgsuffix=cachyos-${_cpusched} - pkgbase=linux-$pkgsuffix + _pkgsuffix="cachyos-${_cpusched}" + pkgbase="linux-$_pkgsuffix" fi _major=6.10 _minor=6 @@ -164,8 +164,8 @@ _srcname=linux-${_stable} #_srcname=linux-${_major} pkgdesc='Linux BORE + Cachy Sauce scheduler Kernel by CachyOS with other patches and improvements' pkgrel=2 -_kernver=$pkgver-$pkgrel -_kernuname="${pkgver}-${pkgsuffix}" +_kernver="$pkgver-$pkgrel" +_kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') @@ -255,14 +255,13 @@ case "$_cpusched" in esac export KBUILD_BUILD_HOST=cachyos -export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_USER="$pkgbase" export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" _die() { error "$@" ; exit; } prepare() { - - cd ${srcdir}/$_srcname + cd "$_srcname" echo "Setting version..." echo "-$pkgrel" > localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -299,7 +298,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -349,7 +348,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -495,19 +494,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -515,20 +513,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -548,8 +546,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -562,7 +560,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -575,7 +573,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -586,11 +584,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -604,7 +602,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -558,7 +556,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -571,7 +569,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -582,11 +580,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -600,7 +598,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -320,7 +319,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -368,7 +367,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|750|1000) @@ -560,19 +559,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -580,20 +578,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -613,8 +611,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -627,7 +625,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -640,7 +638,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -651,11 +649,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -669,7 +667,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -298,7 +297,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -348,7 +347,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -494,19 +493,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -514,20 +512,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -549,8 +547,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -563,7 +561,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -576,7 +574,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -587,11 +585,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -605,7 +603,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$( localversion.10-pkgrel @@ -296,7 +295,7 @@ prepare() { fi scripts/config -k -d CONFIG_GENERIC_CPU - scripts/config -k -e CONFIG_${MARCH2} + scripts/config -k -e "CONFIG_${MARCH2}" fi ### Use autooptimization @@ -346,7 +345,7 @@ prepare() { echo "Selecting '$_use_llvm_lto' LLVM level..." ### Select tick rate - [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again." + [ -z "$_HZ_ticks" ] && _die "The value is empty. Choose the correct one again." case "$_HZ_ticks" in 100|250|500|600|625|750|1000) @@ -492,19 +491,18 @@ prepare() { ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then - if [ -e $HOME/.config/modprobed.db ]; then + if [ -e "$HOME/.config/modprobed.db" ]; then echo "Running Steven Rostedt's make localmodconfig now" - make ${BUILD_FLAGS[*]} LSMOD=$HOME/.config/modprobed.db localmodconfig + make "${BUILD_FLAGS[@]}" LSMOD="$HOME/.config/modprobed.db" localmodconfig else - echo "No modprobed.db data found" - exit + _die "No modprobed.db data found" fi fi ### Rewrite configuration echo "Rewrite configuration..." - make ${BUILD_FLAGS[*]} prepare - yes "" | make ${BUILD_FLAGS[*]} config >/dev/null + make "${BUILD_FLAGS[@]}" prepare + yes "" | make "${BUILD_FLAGS[@]}" config >/dev/null diff -u ../config .config || : ### Prepared version @@ -512,20 +510,20 @@ prepare() { echo "Prepared $pkgbase version $( "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}" + cat .config > "${srcdir}/../config-${pkgver}-${pkgrel}${pkgbase#linux}" if [ -n "$_build_nvidia" ]; then cd "${srcdir}" @@ -545,8 +543,8 @@ prepare() { } build() { - cd ${srcdir}/${_srcname} - make ${BUILD_FLAGS[*]} -j$(nproc) all + cd "$_srcname" + make "${BUILD_FLAGS[@]}" -j"$(nproc)" all make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 if [ -n "$_build_nvidia" ]; then @@ -559,7 +557,7 @@ build() { ) cd "${srcdir}/${_nv_pkg}/kernel" - make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi @@ -572,7 +570,7 @@ build() { SYSSRC="${srcdir}/${_srcname}" SYSOUT="${srcdir}/${_srcname}" ) - CFLAGS= CXXFLAGS= LDFLAGS= make ${BUILD_FLAGS[*]} ${MODULE_FLAGS[*]} -j$(nproc) modules + CFLAGS= CXXFLAGS= LDFLAGS= make "${BUILD_FLAGS[@]}" "${MODULE_FLAGS[@]}" -j"$(nproc)" modules fi if [ -n "$_build_zfs" ]; then @@ -583,11 +581,11 @@ build() { ./autogen.sh sed -i "s|\$(uname -r)|${_kernuname}|g" configure - ./configure ${CONFIGURE_FLAGS[*]} --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ + ./configure "${CONFIGURE_FLAGS[@]}" --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \ --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \ --with-udevdir=/lib/udev --libexecdir=/usr/lib/zfs --with-config=kernel \ - --with-linux=${srcdir}/$_srcname - make ${BUILD_FLAGS[*]} + --with-linux="${srcdir}/$_srcname" + make "${BUILD_FLAGS[@]}" fi } @@ -601,7 +599,7 @@ _package() { 'uksmd: Userspace KSM helper daemon') provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN) - cd ${srcdir}/$_srcname + cd "$_srcname" local modulesdir="$pkgdir/usr/lib/modules/$(