diff --git a/dkms.in b/dkms.in index 98ac8e5..28fc411 100644 --- a/dkms.in +++ b/dkms.in @@ -120,7 +120,7 @@ invoke_command() error() ( exec >&2 - echo $"" + echo "" echo -n $"Error! " for s in "$@"; do echo "$s"; done ) @@ -767,7 +767,7 @@ check_version_sanity() fi if ((obsolete == 1)); then - echo $"" >&2 + echo "" >&2 echo $"Module has been obsoleted due to being included" >&2 echo $"in kernel $3. We will avoid installing" >&2 echo $"for future kernels above $3." >&2 @@ -840,14 +840,14 @@ run_build_script() { esac run="$dkms_tree/$module/$module_version/$script_type/$2" if [[ -x ${run%% *} ]]; then - echo $"" + echo "" echo $"Running the $1 script:" ( cd "$dkms_tree/$module/$module_version/$script_type/" exec $run ) else - echo $"" + echo "" warn $"The $1 script is not executable." fi } @@ -1012,6 +1012,7 @@ prepare_signing() sign_file="$install_tree/$kernelver/build/scripts/sign-file" fi fi + echo "" echo "Sign command: $sign_file" if [[ ! -f ${sign_file} || ! -x ${sign_file} ]]; then @@ -1114,7 +1115,7 @@ actual_build() local -r build_dir="$dkms_tree/$module/$module_version/build" local -r build_log="$build_dir/make.log" - echo $"" + echo "" invoke_command "$clean" "Cleaning build area" '' background echo $"DKMS make.log for $module-$module_version for kernel $kernelver ($arch)" >> "$build_log" @@ -1267,7 +1268,7 @@ do_install() local any_module_installed local count - echo $"" + echo "" for ((count=0; count < ${#built_module_name[@]}; count++)); do # Check this version against what is already in the kernel check_version_sanity "$kernelver" "$arch" "$obsolete_by" "${dest_module_name[$count]}" || continue @@ -1326,8 +1327,6 @@ do_install() done - echo $"" - if ((${#built_module_name[@]} > 0)) && [[ ! "${any_module_installed}" ]]; then die 6 $"Installation aborted." fi @@ -1520,7 +1519,8 @@ do_uninstall() # $1 = kernel version # $2 = arch - echo $"Module $module-$module_version for kernel $1 ($2)." + echo "" + echo $"Module $module-$module_version for kernel $1 ($2):" set_module_suffix "$1" @@ -1539,7 +1539,6 @@ do_uninstall() fi fi - echo $"" for ((count=0; count < ${#built_module_name[@]}; count++)); do real_dest_module_location="$(find_actual_dest_module_location $module $count $1 $2)" @@ -1562,8 +1561,6 @@ do_uninstall() fi done rm -f "$dkms_tree/$module/kernel-$1-$2" - - echo $"" else echo $"This module version was INACTIVE for this kernel." fi @@ -1576,12 +1573,12 @@ do_uninstall() # Delete the original_module if nothing for this kernel is installed anymore if [[ $was_active && -d $dkms_tree/$module/original_module/$1/$2 && ! -d $dkms_tree/$module/original_module/$1/$2/collisions ]]; then - echo $"" + echo "" echo $"Removing original_module from DKMS tree for kernel $1 ($2)" rm -rf "$dkms_tree/$module/original_module/$1/$2" 2>/dev/null [[ $(find $dkms_tree/$module/original_module/$1/* -maxdepth 0 -type d 2>/dev/null) ]] || rm -rf "$dkms_tree/$module/original_module/$1" elif [[ $was_active && -d $dkms_tree/$module/original_module/$1/$2/collisions ]]; then - echo $"" + echo "" echo $"Keeping directory $dkms_tree/$module/original_module/$1/$2/collisions/" echo $"for your reference purposes. Your kernel originally contained multiple" echo $"same-named modules and this directory is now where these are located." @@ -1674,6 +1671,7 @@ remove_module() # Delete the $module_version part of the tree if no other $module_version/$kernel_version dirs exist if ! find $dkms_tree/$module/$module_version/* -maxdepth 0 -type d 2>/dev/null | grep -Eqv "(build|tarball|driver_disk|rpm|deb|source)$"; then + echo "" echo $"Deleting module $module-$module_version completely from the DKMS tree." rm -rf "$dkms_tree/$module/$module_version" fi @@ -1892,7 +1890,7 @@ make_tarball() if [[ $binaries_only ]]; then local -r binary_only_dir="$temp_dir_name/dkms_binaries_only" - echo $"" + echo "" echo $"Creating tarball structure to specifically accomodate binaries." mkdir "$binary_only_dir" @@ -1901,7 +1899,7 @@ make_tarball() [[ ! $conf ]] && conf="$source_dir/dkms.conf" cp -f $conf "$binary_only_dir/" 2>/dev/null else - echo $"" + echo "" echo $"Marking $source_dir for archiving..." mkdir -p $temp_dir_name/dkms_source_tree cp -rf $source_dir/* $temp_dir_name/dkms_source_tree @@ -1921,7 +1919,7 @@ make_tarball() fi fi - echo $"" + echo "" echo $"Tarball location: $tarball_dest/$tarball_name" if [[ ! -d $tarball_dest ]]; then @@ -2005,7 +2003,7 @@ load_tarball() done module="$PACKAGE_NAME"; module_version="$PACKAGE_VERSION" - echo $"" + echo "" echo $"Loading tarball for $module-$module_version" case $loc in dkms_source_tree) @@ -2076,13 +2074,13 @@ run_match() template_kernel_status=$(echo "$template_kernel_status" | grep "^$module,") fi - echo $"" + echo "" echo $"Matching modules in kernel: $kernelver ($arch)" echo $"to the configuration of kernel: $template_kernel ($arch)" # Prepare the kernel just once but only if there is actual work to do if [[ ! $template_kernel_status ]]; then - echo $"" + echo "" echo $"There is nothing to be done for this match." return 0 fi @@ -2321,20 +2319,20 @@ autoinstall() { done if (( ${#installed_modules[@]} > 0 )); then - echo "dkms autoinstall on $kernelver/$arch succeeded for ${installed_modules[@]}" + echo "Autoinstall on $kernelver succeeded for module(s) ${installed_modules[@]}." fi if (( ${#skipped_modules[@]} > 0 )); then - echo "dkms autoinstall on $kernelver/$arch was skipped for ${skipped_modules[@]}" + echo "Autoinstall on $kernelver was skipped for module(s) ${skipped_modules[@]}." fi if (( ${#failed_modules[@]} > 0 )); then - echo "dkms autoinstall on $kernelver/$arch failed for ${failed_modules[@]}" + echo "Autoinstall on $kernelver failed for module(s) ${failed_modules[@]}." fi for mv in "${to_install[@]}"; do IFS=/ read m v <<< "$mv" - echo "$m/$v autoinstall failed due to missing dependencies: ${build_depends[$m]}" + echo "$m/$v autoinstall failed due to missing dependencies: ${build_depends[$m]}." done if (( ${#failed_modules[@]} > 0 || ${#to_install[@]} > 0 )); then diff --git a/dkms_autoinstaller.in b/dkms_autoinstaller.in index 8dcfe82..31c382e 100755 --- a/dkms_autoinstaller.in +++ b/dkms_autoinstaller.in @@ -23,14 +23,6 @@ elif [ -f /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions fi -# We only have these functions on Debian/Ubuntu -# so on other distros just stub them out -if [ ! -f /etc/debian_version ]; then - alias log_daemon_msg='/bin/echo -n' - log_end_msg() { if [ "$1" = "0" ]; then echo " Done. "; else echo " Failed. "; fi; } - alias log_action_msg=/bin/echo -fi - exec="@SBINDIR@/dkms" prog=${exec##*/} @@ -67,15 +59,12 @@ case "$1" in kernel=$(uname -r) fi if [ -f /etc/dkms/no-autoinstall ]; then - log_action_msg "$prog: autoinstall for dkms modules has been disabled" + log_action_msg "Automatic installation of modules has been disabled." elif ! _check_kernel_dir $kernel; then - log_action_msg "$prog: autoinstall for kernel $kernel was skipped since the kernel headers for this kernel do not seem to be installed" + log_action_msg "Automatic installation of modules for kernel $kernel was skipped since the kernel headers for this kernel do not seem to be installed." else - log_action_msg "$prog: running auto installation service for kernel $kernel" dkms autoinstall --kernelver $kernel res=$? - log_daemon_msg "$prog: autoinstall for kernel" "$kernel" - log_end_msg $res fi ;; stop|restart|force-reload|status|reload) diff --git a/run_test.sh b/run_test.sh index b8fbb73..c8fec62 100755 --- a/run_test.sh +++ b/run_test.sh @@ -189,7 +189,10 @@ generalize_expected_output() { # Apport related error that can occur in the CI. Drop from the output to be more generic sed -i "/^python3: can't open file '\/usr\/share\/apport\/package-hooks\/dkms_packages.py'\: \[Errno 2\] No such file or directory$/d" ${output_log} sed -i "/^ERROR (dkms apport): /d" ${output_log} - + # Drop empty lines + sed -i "/^$/d" ${output_log} + # Gentoo complains there is not a .comment section in the built modules + sed -i "/^readelf: Warning: Section '.comment' was not dumped because it does not exist$/d" ${output_log} # Swap any CC/LD/... flags (if set) with a placeholder message sed -i "s|\(make -j1 KERNELRELEASE=${KERNEL_VER} all\).*|\1 |" ${output_log} } @@ -296,7 +299,6 @@ rm /etc/dkms/framework.conf.d/dkms_test_framework.conf echo 'Adding the test module by version (expected error)' run_with_expected_error 2 dkms add -m dkms_test -v 1.0 << EOF - Error! Could not find module source directory. Directory: /usr/src/dkms_test-1.0 does not exist. EOF @@ -315,14 +317,12 @@ fi echo 'Adding the test module again (expected error)' run_with_expected_error 3 dkms add test/dkms_test-1.0 << EOF - Error! DKMS tree already contains: dkms_test-1.0 You cannot add the same module/version combo more than once. EOF echo 'Adding the test module by version (expected error)' run_with_expected_error 3 dkms add -m dkms_test -v 1.0 << EOF - Error! DKMS tree already contains: dkms_test-1.0 You cannot add the same module/version combo more than once. EOF @@ -330,7 +330,6 @@ EOF echo 'Building the test module' set_signing_message "dkms_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -352,7 +351,6 @@ if (( NO_SIGNING_TOOL == 0 )); then cp test/framework/bad_sign_file_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF Binary /no/such/file not found, modules won't be signed - Cleaning build area... done. Building module(s)... done. Cleaning build area... done. @@ -362,7 +360,6 @@ EOF cp test/framework/bad_key_file_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF Key file /no/such/path.key not found and can't be generated, modules won't be signed - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -372,7 +369,6 @@ EOF cp test/framework/bad_cert_file_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF Certificate file /no/such/path.crt not found and can't be generated, modules won't be signed - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -383,7 +379,6 @@ EOF mkdir "/tmp/dkms_test_dir_${KERNEL_VER}/" cp test/framework/variables_in_path.conf /etc/dkms/framework.conf.d/dkms_test_framework.conf run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -408,7 +403,6 @@ EOF fi echo "CONFIG_MODULE_SIG_HASH=\"${ALTER_HASH}\"" > /tmp/dkms_test_kconfig run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --config /tmp/dkms_test_kconfig --force << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -426,7 +420,6 @@ cp test/framework/temp_key_cert.conf /etc/dkms/framework.conf.d/dkms_test_framew echo 'Building the test module again by force' run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -442,9 +435,7 @@ fi echo 'Installing the test module' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -465,15 +456,11 @@ fi echo 'Installing the test module again by force' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_test -v 1.0 --force << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -509,11 +496,9 @@ fi echo 'Uninstalling the test module' run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -580,13 +565,10 @@ EOF echo 'Installing the test module by version (combining add, build, install)' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF Creating symlink /var/lib/dkms/dkms_test/1.0/source -> /usr/src/dkms_test-1.0 - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -627,11 +609,9 @@ fi echo 'Removing the test module with --all' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. Deleting module dkms_test-1.0 completely from the DKMS tree. EOF @@ -648,7 +628,6 @@ rm -r /usr/src/dkms_test-1.0 echo 'Building the test module by config file (combining add, build)' run_with_expected_output dkms build -k "${KERNEL_VER}" test/dkms_test-1.0/dkms.conf << EOF Creating symlink /var/lib/dkms/dkms_test/1.0/source -> /usr/src/dkms_test-1.0 - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -659,11 +638,9 @@ EOF echo "Running dkms autoinstall" run_with_expected_output dkms autoinstall -k "${KERNEL_VER}" << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} succeeded for dkms_test +Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. EOF run_status_with_expected_output 'dkms_test' << EOF dkms_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed @@ -671,22 +648,18 @@ EOF echo "Running dkms autoinstall for a kernel without headers installed (expected error)" run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}-noheaders" << EOF - Error! Your kernel headers for kernel ${KERNEL_VER}-noheaders cannot be found at /lib/modules/${KERNEL_VER}-noheaders/build or /lib/modules/${KERNEL_VER}-noheaders/source. Please install the linux-headers-${KERNEL_VER}-noheaders package or use the --kernelsourcedir option to tell DKMS where it's located. -dkms autoinstall on ${KERNEL_VER}-noheaders/${KERNEL_ARCH} failed for dkms_test(1) - +Autoinstall on ${KERNEL_VER}-noheaders failed for module(s) dkms_test(1). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF echo 'Removing the test module with --all' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. Deleting module dkms_test-1.0 completely from the DKMS tree. EOF @@ -731,7 +704,6 @@ EOF echo 'Building the noautoinstall test module' set_signing_message "dkms_noautoinstall_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -742,9 +714,7 @@ EOF echo 'Installing the noautoinstall test module' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noautoinstall_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_noautoinstall_test' << EOF @@ -753,11 +723,9 @@ EOF echo 'Uninstalling the noautoinstall test module' run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_noautoinstall_test -v 1.0 << EOF -Module dkms_noautoinstall_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_noautoinstall_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_noautoinstall_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_noautoinstall_test' << EOF @@ -803,7 +771,6 @@ abspwd=$(readlink -f $(pwd)) echo 'Testing dkms add of source tree without dkms.conf (expected error)' run_with_expected_error 1 dkms add ${abspwd}/test/dkms_conf_test_no_conf << EOF - Error! Arguments and are not specified. Usage: add / or add -m / or @@ -815,7 +782,6 @@ run_with_expected_error 8 dkms add test/dkms_conf_test_empty << EOF dkms.conf: Error! No 'PACKAGE_NAME' directive specified. dkms.conf: Error! No 'PACKAGE_VERSION' directive specified. dkms.conf: Warning! Zero modules specified. - Error! Bad conf file. File: ${abspwd}/test/dkms_conf_test_empty/dkms.conf does not represent a valid dkms.conf file. EOF @@ -830,7 +796,6 @@ dkms.conf: Error! 'BUILT_MODULE_NAME' directive ends in '.o' or '.ko' in record dkms.conf: Error! No 'DEST_MODULE_LOCATION' directive specified for record #1. dkms.conf: Error! Directive 'DEST_MODULE_LOCATION' does not begin with '/kernel', '/updates', or '/extra' in record #1. - Error! Bad conf file. File: ${abspwd}/test/dkms_conf_test_invalid/dkms.conf does not represent a valid dkms.conf file. EOF @@ -855,12 +820,9 @@ echo 'Testing add/build/install of a test module building zero kernel modules' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF dkms.conf: Warning! Zero modules specified. Creating symlink /var/lib/dkms/dkms_conf_test/1.0/source -> /usr/src/dkms_conf_test-1.0 - Cleaning build area... done. Building module(s)... done. Cleaning build area... done. - - Running depmod... done. EOF run_status_with_expected_output 'dkms_conf_test' << EOF @@ -871,10 +833,8 @@ EOF run_with_expected_output dkms remove --all -m dkms_conf_test -v 1.0 << EOF dkms.conf: Warning! Zero modules specified. dkms.conf: Warning! Zero modules specified. -Module dkms_conf_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_conf_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - - Running depmod... done. Deleting module dkms_conf_test-1.0 completely from the DKMS tree. EOF @@ -889,7 +849,6 @@ EOF echo 'Building test module without source (expected error)' run_with_expected_error 8 dkms build -k "${KERNEL_VER}" -m dkms_conf_test -v 1.0 << EOF - Error! The directory /var/lib/dkms/dkms_conf_test/1.0/source does not appear to have module source located within it. Build halted. EOF @@ -937,7 +896,6 @@ fi echo 'Building the multiver test modules' set_signing_message "dkms_multiver_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -948,7 +906,6 @@ dkms_multiver_test/2.0: added EOF set_signing_message "dkms_multiver_test" "2.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -960,9 +917,7 @@ EOF echo 'Installing the multiver test modules' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_multiver_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -970,9 +925,7 @@ dkms_multiver_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built EOF run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_multiver_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -980,13 +933,9 @@ dkms_multiver_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF run_with_expected_error 6 dkms install -k "${KERNEL_VER}" -m dkms_multiver_test -v 1.0 << EOF - - Error! Module version 1.0 for dkms_multiver_test.ko${mod_compression_ext} is not newer than what is already found in kernel ${KERNEL_VER} (2.0). You may override by specifying --force. - - Error! Installation aborted. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -1003,11 +952,9 @@ dkms_multiver_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_multiver_test -v 2.0 << EOF -Module dkms_multiver_test-2.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_multiver_test-2.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_multiver_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_multiver_test' << EOF @@ -1087,7 +1034,6 @@ fi echo 'Building the nover/emptyver test modules' set_signing_message "dkms_nover_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -1097,7 +1043,6 @@ dkms_nover_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built EOF set_signing_message "dkms_emptyver_test" "1.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -1108,18 +1053,14 @@ EOF echo 'Installing the nover/emptyver test modules' run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_nover_test' << EOF dkms_nover_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_emptyver_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_emptyver_test' << EOF @@ -1128,11 +1069,9 @@ EOF echo 'Uninstalling the nover/emptyver test modules' run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_nover_test -v 1.0 << EOF -Module dkms_nover_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_nover_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_nover_test' << EOF @@ -1143,11 +1082,9 @@ if [[ -e "/lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_test.ko${mo exit 1 fi run_with_expected_output dkms uninstall -k "${KERNEL_VER}" -m dkms_emptyver_test -v 1.0 << EOF -Module dkms_emptyver_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_emptyver_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_emptyver_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_emptyver_test' << EOF @@ -1191,7 +1128,6 @@ EOF echo 'Removing /usr/src/dkms_nover_test-1.0 /usr/src/dkms_emptyver_test-1.0' rm -r /usr/src/dkms_nover_test-1.0 /usr/src/dkms_emptyver_test-1.0 - echo 'Adding the nover update test modules 1.0 by directory' run_with_expected_output dkms add test/dkms_nover_update_test/1.0 << EOF Creating symlink /var/lib/dkms/dkms_nover_update_test/1.0/source -> /usr/src/dkms_nover_update_test-1.0 @@ -1207,13 +1143,10 @@ fi echo 'Installing the nover update test 1.0 modules' set_signing_message "dkms_nover_update_test" "1.0" run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_nover_update_test -v 1.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_nover_update_test' << EOF @@ -1236,13 +1169,10 @@ fi echo 'Installing the nover update test 2.0 modules' set_signing_message "dkms_nover_update_test" "2.0" run_with_expected_output dkms install -k "${KERNEL_VER}" -m dkms_nover_update_test -v 2.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_nover_update_test' << EOF @@ -1267,7 +1197,6 @@ fi echo 'Building the nover update test 3.0 modules' set_signing_message "dkms_nover_update_test" "3.0" run_with_expected_output dkms build -k "${KERNEL_VER}" -m dkms_nover_update_test -v 3.0 << EOF - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -1287,10 +1216,7 @@ else echo ' Installing the nover update test 3.0 modules (expected error)' set_signing_message "dkms_nover_update_test" "3.0" run_with_expected_error 6 dkms install -k "${KERNEL_VER}" -m dkms_nover_update_test -v 3.0 << EOF - Module /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} already installed at version , override by specifying --force - - Error! Installation aborted. EOF run_status_with_expected_output 'dkms_nover_update_test' << EOF @@ -1306,11 +1232,9 @@ Module dkms_nover_update_test 3.0 is not installed for kernel ${KERNEL_VER} (${K Deleting module dkms_nover_update_test-3.0 completely from the DKMS tree. EOF run_with_expected_output dkms remove -k "${KERNEL_VER}" -m dkms_nover_update_test -v 2.0 << EOF -Module dkms_nover_update_test-2.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_nover_update_test-2.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_nover_update_test.ko${mod_compression_ext} - Running depmod... done. Deleting module dkms_nover_update_test-2.0 completely from the DKMS tree. EOF @@ -1339,15 +1263,13 @@ Creating symlink /var/lib/dkms/dkms_failing_test/1.0/source -> /usr/src/dkms_fai EOF echo 'Running autoinstall with failing test module (expected error)' run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}" << EOF - Cleaning build area... done. Building module(s)...(bad exit status: 2) Failed command: make -j1 KERNELRELEASE=${KERNEL_VER} all Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH}) Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} failed for dkms_failing_test(10) - +Autoinstall on ${KERNEL_VER} failed for module(s) dkms_failing_test(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1358,16 +1280,14 @@ Creating symlink /var/lib/dkms/dkms_dependencies_test/1.0/source -> /usr/src/dkm EOF echo 'Running autoinstall with failing test module and test module with dependencies on the failing module (expected error)' run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}" << EOF - Cleaning build area... done. Building module(s)...(bad exit status: 2) Failed command: make -j1 KERNELRELEASE=${KERNEL_VER} all Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH}) Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} failed for dkms_failing_test(10) -dkms_dependencies_test/1.0 autoinstall failed due to missing dependencies: dkms_failing_test - +Autoinstall on ${KERNEL_VER} failed for module(s) dkms_failing_test(10). +dkms_dependencies_test/1.0 autoinstall failed due to missing dependencies: dkms_failing_test. Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1383,8 +1303,7 @@ rm -r /usr/src/dkms_failing_test-1.0 echo 'Running autoinstall with test module with missing dependencies (expected error)' run_with_expected_error 11 dkms autoinstall -k "${KERNEL_VER}" << EOF -dkms_dependencies_test/1.0 autoinstall failed due to missing dependencies: dkms_failing_test - +dkms_dependencies_test/1.0 autoinstall failed due to missing dependencies: dkms_failing_test. Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1438,7 +1357,7 @@ Warning: The /var/lib/dkms/dkms_build_exclusive_test/1.0/${KERNEL_VER}/${KERNEL_ for module dkms_build_exclusive_test includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} was skipped for dkms_build_exclusive_test +Autoinstall on ${KERNEL_VER} was skipped for module(s) dkms_build_exclusive_test. EOF run_status_with_expected_output 'dkms_build_exclusive_test' << EOF dkms_build_exclusive_test/1.0: added @@ -1458,16 +1377,13 @@ Warning: The /var/lib/dkms/dkms_build_exclusive_test/1.0/${KERNEL_VER}/${KERNEL_ for module dkms_build_exclusive_test includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} succeeded for dkms_test -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} was skipped for dkms_build_exclusive_test +Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. +Autoinstall on ${KERNEL_VER} was skipped for module(s) dkms_build_exclusive_test. EOF run_status_with_expected_output 'dkms_build_exclusive_test' << EOF dkms_build_exclusive_test/1.0: added @@ -1478,11 +1394,9 @@ EOF echo 'Unbuilding the test module' run_with_expected_output dkms unbuild -k "${KERNEL_VER}" -m dkms_test -v 1.0 << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. EOF run_status_with_expected_output 'dkms_test' << EOF @@ -1500,25 +1414,20 @@ Warning: The /var/lib/dkms/dkms_build_exclusive_test/1.0/${KERNEL_VER}/${KERNEL_ for module dkms_build_exclusive_test includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. - Cleaning build area... done. Building module(s)...(bad exit status: 2) Failed command: make -j1 KERNELRELEASE=${KERNEL_VER} all Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH}) Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information. - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} succeeded for dkms_test -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} was skipped for dkms_build_exclusive_test -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} failed for dkms_failing_test(10) - +Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. +Autoinstall on ${KERNEL_VER} was skipped for module(s) dkms_build_exclusive_test. +Autoinstall on ${KERNEL_VER} failed for module(s) dkms_failing_test(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. EOF @@ -1534,11 +1443,9 @@ rm -r /usr/src/dkms_failing_test-1.0 echo 'Removing the test module' run_with_expected_output dkms remove --all -m dkms_test -v 1.0 << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. Deleting module dkms_test-1.0 completely from the DKMS tree. EOF @@ -1569,7 +1476,7 @@ Warning: The /var/lib/dkms/dkms_build_exclusive_dependencies_test/1.0/${KERNEL_V for module dkms_build_exclusive_dependencies_test includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config. This indicates that it should not be built. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} was skipped for dkms_build_exclusive_test dkms_build_exclusive_dependencies_test +Autoinstall on ${KERNEL_VER} was skipped for module(s) dkms_build_exclusive_test dkms_build_exclusive_dependencies_test. EOF run_status_with_expected_output 'dkms_build_exclusive_test' << EOF dkms_build_exclusive_test/1.0: added @@ -1628,7 +1535,6 @@ mv_osrelease "/usr/lib/os-release" "_usrlib-os-release" echo "Adding the dkms_test-1.0 module with no os-release files (expected error)" run_with_expected_error 4 dkms add test/dkms_test-1.0 << EOF - Error! System is missing os-release file. EOF @@ -1700,7 +1606,6 @@ rm /var/lib/dkms/dkms_test/1.0/source echo 'Checking broken status' run_with_expected_output dkms status dkms_test/1.0 << EOF dkms_test/1.0: broken - Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! EOF @@ -1715,7 +1620,6 @@ rm /var/lib/dkms/dkms_test/1.0/source echo 'Building broken test module (expected erorr)' run_with_expected_error 4 dkms build dkms_test/1.0 << EOF - Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -1723,7 +1627,6 @@ EOF echo 'Installing broken test module (expected erorr)' run_with_expected_error 4 dkms install dkms_test/1.0 << EOF - Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -1731,7 +1634,6 @@ EOF echo 'Unbuild broken test module (expected erorr)' run_with_expected_error 4 dkms unbuild dkms_test/1.0 << EOF - Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -1739,7 +1641,6 @@ EOF echo 'Uninstall broken test module (expected erorr)' run_with_expected_error 4 dkms uninstall dkms_test/1.0 << EOF - Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -1754,14 +1655,12 @@ echo 'Checking broken status' run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: added dkms_test/1.0: broken - Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! EOF echo 'Remove broken test module (expected erorr)' run_with_expected_error 4 dkms remove dkms_test/1.0 << EOF - Error! dkms_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! @@ -1779,7 +1678,6 @@ echo 'Checking broken status' run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: added dkms_test/1.0: broken - Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! EOF @@ -1794,7 +1692,6 @@ echo 'Adding and building the test module by directory' set_signing_message "dkms_test" "1.0" run_with_expected_output dkms build test/dkms_test-1.0 -k "${KERNEL_VER}" << EOF Creating symlink /var/lib/dkms/dkms_test/1.0/source -> /usr/src/dkms_test-1.0 - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -1804,7 +1701,6 @@ echo 'Adding and building the multiver test module 1.0 by directory' set_signing_message "dkms_multiver_test" "1.0" run_with_expected_output dkms build test/dkms_multiver_test/1.0 -k "${KERNEL_VER}" << EOF Creating symlink /var/lib/dkms/dkms_multiver_test/1.0/source -> /usr/src/dkms_multiver_test-1.0 - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -1817,7 +1713,6 @@ echo 'Adding and building the multiver test module 2.0 by directory' set_signing_message "dkms_multiver_test" "2.0" run_with_expected_output dkms build test/dkms_multiver_test/2.0 -k "${KERNEL_VER}" << EOF Creating symlink /var/lib/dkms/dkms_multiver_test/2.0/source -> /usr/src/dkms_multiver_test-2.0 - Cleaning build area... done. Building module(s)... done. ${SIGNING_MESSAGE}Cleaning build area... done. @@ -1825,18 +1720,14 @@ EOF echo 'Running dkms autoinstall' run_with_expected_output dkms autoinstall -k "${KERNEL_VER}" << EOF - Error! dkms_multiver_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. Manual intervention is required! - Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. -dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} succeeded for dkms_test +Autoinstall on ${KERNEL_VER} succeeded for module(s) dkms_test. EOF run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: broken - Error! dkms_multiver_test/1.0: Missing the module source directory or the symbolic link pointing to it. Manual intervention is required! dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built @@ -1846,11 +1737,9 @@ EOF echo 'Removing all modules' echo ' Removing the test module' run_with_expected_output dkms remove dkms_test/1.0 -k "${KERNEL_VER}" << EOF -Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}). +Module dkms_test-1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}): Before uninstall, this module version was ACTIVE on this kernel. - Deleting /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} - Running depmod... done. Deleting module dkms_test-1.0 completely from the DKMS tree. EOF