Fix: make Arch be able to use _configfile (#239)

* prepare: fix custom _configfile usage for Arch

* Remove yes from localmodconfig make call

* customization.cfg: tell that modprobed-db can prompt the user

* prepare: reset LOCALVERSION in .config to empty string

Using a kernelconfig.new with a LOCALVERSION set makes the script
set it twice in the package name.
This commit is contained in:
Adel Kara Slimane
2021-05-17 16:42:40 +02:00
committed by GitHub
parent cd76e7e1e3
commit 54c74a72c3
2 changed files with 18 additions and 14 deletions

View File

@@ -42,6 +42,7 @@ _force_all_threads="true"
_noccache="false" _noccache="false"
# Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably. Requires root - https://wiki.archlinux.org/index.php/Modprobed-db # Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably. Requires root - https://wiki.archlinux.org/index.php/Modprobed-db
# Using this option can trigger user prompts if the config doesn't go smoothly.
# !!!! Make sure to have a well populated db !!!! - Leave empty to be asked about it at build time # !!!! Make sure to have a well populated db !!!! - Leave empty to be asked about it at build time
_modprobeddb="false" _modprobeddb="false"

View File

@@ -362,6 +362,8 @@ _tkg_srcprep() {
scripts/setlocalversion --save-scmversion scripts/setlocalversion --save-scmversion
if [ "${_distro}" = "Arch" ]; then if [ "${_distro}" = "Arch" ]; then
# Reset local version string if ever it's in the .config file
scripts/config --set-str localversion ""
echo "-$pkgrel-tkg-${_cpusched}${_compiler_name}" > localversion.10-pkgrel echo "-$pkgrel-tkg-${_cpusched}${_compiler_name}" > localversion.10-pkgrel
echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/prepare.log echo -e "Version tail set to \"-$pkgrel-tkg-${_cpusched}${_compiler_name}\"\n" > "$_where"/prepare.log
@@ -534,17 +536,18 @@ _tkg_srcprep() {
cat "${srcdir}"/config.x86_64 > ./.config cat "${srcdir}"/config.x86_64 > ./.config
else else
if [ -f /boot/config-`uname -r` ];then if [ -f /boot/config-`uname -r` ];then
_msg="Using /boot/config-`uname -r` as config file" msg2 "Using /boot/config-`uname -r` as config file"
cp /boot/config-`uname -r` .config cp /boot/config-`uname -r` .config
elif [ -f /proc/config.gz ];then elif [ -f /proc/config.gz ];then
_msg="Using /proc/config.gz as config file" msg2 "Using /proc/config.gz as config file"
zcat --verbose /proc/config.gz > .config zcat --verbose /proc/config.gz > .config
else else
_msg="Current kernel config not found! Falling back to default..." msg2 "Current kernel config not found! Falling back to default..."
fi fi
fi fi
else else
cat "${srcdir}/${_configfile}" > ./.config msg2 "Using user-provided config file in ${_where}/${_configfile}"
cat "${_where}/${_configfile}" > ./.config
fi fi
if [ -z $_debug ]; then if [ -z $_debug ]; then
@@ -1325,7 +1328,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n
msg2 "modprobed-db database not found" msg2 "modprobed-db database not found"
exit 1 exit 1
fi fi
yes "" | make LSMOD=$_modprobeddb_db_path localmodconfig ${llvm_opt} make LSMOD=$_modprobeddb_db_path localmodconfig ${llvm_opt}
fi fi
if [ true = "$_config_fragments" ]; then if [ true = "$_config_fragments" ]; then