[Pkg-dkms-commits] [SCM] Dynamic Kernel Module Support branch, master, updated. debian/2.1.0.1-4-3-gac6fb91
Giuseppe Iuculano
iuculano at debian.org
Mon Dec 14 19:59:13 UTC 2009
The following commit has been merged in the master branch:
commit ac6fb91af08bc7e034b1631d655daaa0e903cd76
Author: Giuseppe Iuculano <iuculano at debian.org>
Date: Mon Dec 14 20:58:58 2009 +0100
Removed patches applied in upstream
diff --git a/debian/patches/01_init.patch b/debian/patches/01_init.patch
deleted file mode 100644
index 8eac785..0000000
--- a/debian/patches/01_init.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Added dkms_autoinstaller in Provides and fixed init.d-script-does-not-provide-itself lintian warning
---- a/dkms_autoinstaller
-+++ b/dkms_autoinstaller
-@@ -6,7 +6,7 @@
- # description: An autoinstaller bootup service for DKMS
- #
- ### BEGIN INIT INFO
--# Provides: dkms
-+# Provides: dkms_autoinstaller dkms
- # Default-Start: 2 3 4 5
- # Default-Stop:
- # Required-Start: $local_fs
diff --git a/debian/patches/02-improve_error_message.patch b/debian/patches/02-improve_error_message.patch
deleted file mode 100644
index 698a4e0..0000000
--- a/debian/patches/02-improve_error_message.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: David Paleino <d.paleino at gmail.com>
-Subject: Improve error message, and add Debian/Ubuntu specific changes
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553600
-Forwarded: no
-
----
- dkms | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
---- dkms.orig/dkms
-+++ dkms/dkms
-@@ -1055,9 +1055,17 @@ function prepare_kernel()
- # Check that kernel-source exists
- if ! [ -e "$kernel_source_dir/include" ]; then
- echo $"" >&2
-- echo $"Error! Your kernel source for kernel $1 cannot be found at" >&2
-+ echo $"Error! Your kernel headers for kernel $1 cannot be found at" >&2
- echo $"/lib/modules/$1/build or /lib/modules/$1/source." >&2
-- echo $"You can use the --kernelsourcedir option to tell DKMS where it's located."
-+ echo -n $"You can use the --kernelsourcedir option to tell DKMS where it's located"
-+ case "$running_distribution" in
-+ Debian* | Ubuntu* )
-+ echo $", or you could install the linux-headers-$1 package."
-+ ;;
-+ * )
-+ echo $"."
-+ ;;
-+ esac
- exit 1
- fi
-
diff --git a/debian/patches/03_nobody.patch b/debian/patches/03_nobody.patch
deleted file mode 100644
index 59d668b..0000000
--- a/debian/patches/03_nobody.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Do not build as a nobody user and don't chown the build directory, no files should be owned by nobody (Closes: #554168)
---- a/dkms
-+++ b/dkms
-@@ -1529,13 +1529,6 @@ function do_build()
- echo $"`date`" >> "$dkms_tree/$module/$module_version/build/make.log"
- local the_make_command=`echo $make_command | sed "s/^make/make KERNELRELEASE=${kernelver_array[0]}/"`
-
-- #if we're root, try to run as a user instead
-- if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && su nobody -c "/bin/true" 1>/dev/null; then
-- the_make_command="su nobody -c \"$the_make_command\""
-- chmod +x $dkms_tree/$module/$module_version/build
-- chown -R nobody $dkms_tree/$module/$module_version/build
-- fi
--
- invoke_command "$the_make_command >> $dkms_tree/$module/$module_version/build/make.log 2>&1" "$the_make_command" background
-
- # Make sure good return status
diff --git a/debian/patches/04_optimize_init.patch b/debian/patches/04_optimize_init.patch
deleted file mode 100644
index 35708b5..0000000
--- a/debian/patches/04_optimize_init.patch
+++ /dev/null
@@ -1,321 +0,0 @@
-optimize with a single find call instead of multiple
-loops with ls.
-port to POSIX sh and drop the /bin/bash from the
-shebang.
-drop localization of the usage message - this is
-inconsistent with all other init scripts on the system.
-use case instead of grep for string matching
-LP: #484386
----
- dkms_autoinstaller | 80 ++++++++++++++++++++++-------------------------------
- 1 file changed, 34 insertions(+), 46 deletions(-)
-
---- a/dkms_autoinstaller
-+++ b/dkms_autoinstaller
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- #
- # dkms_autoinstaller A service to automatically install DKMS modules
- # for new kernels.
-@@ -15,195 +15,138 @@
- # Description: A service to automatically install DKMS modules for new kernels.
- ### END INIT INFO
-
--#use LSB functions for logging on Debian/Ubuntu
-+test -f /usr/sbin/dkms || exit 0
-+
-+#We only have these functions on debian/ubuntu
-+# so on other distros just stub them out
- if [ -f /lib/lsb/init-functions ]; then
- . /lib/lsb/init-functions
-- if [ -f /etc/debian_version ]; then
-- DEBIAN_STYLE_LOGGING="yes"
-+ if [ ! -f /etc/debian_version ]; then
-+ alias log_daemon_msg=echo
-+ log_end_msg() { if [ "$1" = "0" ]; then echo " Done. "; else echo " Failed. "; fi }
-+ alias log_action_begin_msg=log_daemon_msg
-+ alias log_action_end_msg=log_end_msg
- fi
- fi
-
--test -f /usr/sbin/dkms || exit 0
--
--function invoke_command ()
-+invoke_command ()
- {
- local exitval=0
- local exitval_file=`mktemp /tmp/dkms.XXXXXX`
-- [ -z "$verbose" ] && echo -en "$2..." >>$output_loc || echo -e "$1" >>$output_loc
-- if [ "$3" == background ] && [ -z "$verbose" ]; then
-- (eval $1 >/dev/null 2>&1; echo "exitval=$?" >> "$exitval_file") &
-- while [ -e "$exitval_file" ] && ! [ -s "$exitval_file" ]; do
-- sleep 3
-- echo -en "." >>$output_loc
-- done
-- . "$exitval_file"
-+ if [ "$3" = background ] && [ -z "$verbose" ]; then
-+ (eval $1 >/dev/null 2>&1; echo "exitval=$?" >> "$exitval_file") &
-+ while [ -e "$exitval_file" ] && ! [ -s "$exitval_file" ]; do
-+ sleep 3
-+ done
-+ . "$exitval_file"
- else
-- eval $1; exitval=$?
-+ eval $1; exitval=$?
- fi
-- [ $exitval -gt 0 ] && echo -en "(bad exit status: $exitval)" >>$output_loc
-+ [ $exitval -gt 0 ] && logger -t dkms_autoinstaller "(bad exit status: $exitval)"
- rm -f "$exitval_file"
-- echo -en "\n" >>$output_loc
- return $exitval
- }
-
-
- # Set Variables
--output_loc="/var/log/dkms_autoinstaller"
--[ -n "$2" ] && kernel=$2 && output_loc="/dev/stdout" || kernel=`uname -r`
--kernelver_rpm=`rpm -qf "/lib/modules/$kernel" 2>/dev/null | grep -v "not owned by any package" | grep kernel | head -1`
--if ! arch=`rpm -q --queryformat "%{ARCH}" "$kernelver_rpm" 2>/dev/null`; then
-- [ `uname -m` == "x86_64" ] && [ `cat /proc/cpuinfo | grep -c "Intel"` -gt 0 ] && [ `ls $install_tree/$kernel/build/configs 2>/dev/null | grep -c "ia32e"` -gt 0 ] && arch="ia32e" || arch=`uname -m`
--fi
-+uname=`uname -mr`
-+[ -n "$2" ] && kernel=$2 || kernel=${uname% *}
-+arch=${uname#* }
- kernel_preparation_done=""
- dkms_tree="/var/lib/dkms"
- . /etc/dkms/framework.conf 2>/dev/null
--
- # See how we were called.
- case "$1" in
- start)
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_daemon_msg "Running DKMS auto installation service for kernel $kernel"
-+ log_daemon_msg "Running DKMS auto installation service for kernel $kernel"
-+
-+ # Iterate over the modules
-+ for modulepath in $(find "$dkms_tree" -maxdepth 1 -mindepth 1 -type d); do
-+
-+ module_in_tree=${modulepath##*/}
-+ # Determine which versions to show status for
-+ do_autoinstall=""
-+ version_count=0
-+ already_installed=""
-+ already_installed_version=""
-+ for versioned_path in $(find "$modulepath" -maxdepth 1 -mindepth 1 -type d -a -not -name original_module); do
-+ version_count=$(($version_count + 1))
-+ version_in_tree="${versioned_path##*/}"
-+
-+ if [ -f $versioned_path/source/dkms.conf ]; then
-+ do_autoinstall=$(sed -n -e 's/^\(str *\)\?AUTOINSTALL=\(.*\)$/\2/gp;' $versioned_path/source/dkms.conf)
-+ else
-+ current_state="broken"
-+ continue
-+ fi
-+
-+ # Get the current state
-+ # a mod can be both built and installed-weak (stupid, but could be)
-+ # but installed-weak comes last, so use tail
-+ current_state=`dkms status -m $module_in_tree -v $version_in_tree -k $kernel -a $arch 2>/dev/null | awk {'print $5'} | tail -n 1`
-+ [ "$current_state" = "installed" -o "$current_state" = "installed-weak" ] && already_installed="true" && already_installed_version=$version_in_tree
-+ done
-+
-+ log_action_begin_msg " $module_in_tree ($version_in_tree)"
-+
-+ # Based on what we know, either do it or not
-+ if [ "$current_state" = "broken" ]; then
-+ logger -t dkms_autoinstaller "$module_in_tree ($version_in_tree): Unable to locate $versioned_path/source/dkms.conf"
-+ logger -t dkms_autoinstaller " DKMS tree must be manually fixed"
-+ log_action_end_msg 1
-+ continue
-+ elif [ -n "$already_installed" ]; then
-+ log_action_end_msg 0
-+ elif [ -z "$do_autoinstall" ]; then
-+ logger -t dkms_autoinstaller "$module_in_tree ($version_in_tree): AUTOINSTALL not set in its dkms.conf."
-+ log_action_end_msg 0
-+ elif [ -n "$do_autoinstall" ] && [ "$version_count" -gt 1 ]; then
-+ logger -t dkms_autoinstaller "$module_in_tree: Multiple versions in DKMS. Unsure what to do. Resolve manually."
-+ log_action_end_msg 1
- else
-- echo "Running DKMS auto installation service for kernel $kernel"
-- fi
-- echo "" >>$output_loc
--
-- for filename in `ls "$dkms_tree"`; do
-- if [ -d "$dkms_tree/$filename" ] && ! [ -h "$dkms_tree/$filename" ]; then
-- modules_needing_status="$modules_needing_status $filename"
-- fi
-- done
--
-- # Iterate over the modules
-- for module_in_tree in $modules_needing_status; do
--
-- # Make sure its in the tree
-- if [ -d "$dkms_tree/$module_in_tree" ]; then
--
-- # Determine which versions to show status for
-- do_autoinstall=""
-- version_count=0
-- already_installed=""
-- already_installed_version=""
-- for filename in `ls "$dkms_tree/$module_in_tree"`; do
-- if [ -d "$dkms_tree/$module_in_tree/$filename" ] && ! [ -h "$dkms_tree/$module_in_tree/$filename" ] && [ "$filename" != "original_module" ]; then
-- version_count=$(($version_count + 1))
-- version_in_tree="$filename"
--
-- # Source in its dkms.conf to see if we should autoinstall
-- AUTOINSTALL=""
-- if [ -f $dkms_tree/$module_in_tree/$version_in_tree/source/dkms.conf ]; then
-- . $dkms_tree/$module_in_tree/$version_in_tree/source/dkms.conf
-- else
-- current_state="broken"
-- continue
-- fi
-- [ `echo "$AUTOINSTALL" | grep -ic "^y"` -gt 0 ] && do_autoinstall="yes"
--
-- # Get the current state
-- # a mod can be both built and installed-weak (stupid, but could be)
-- # but installed-weak comes last, so use tail
-- current_state=`dkms status -m $module_in_tree -v $version_in_tree -k $kernel -a $arch 2>/dev/null | awk {'print $5'} | tail -n 1`
-- [ "$current_state" == "installed" -o "$current_state" == "installed-weak" ] && already_installed="true" && already_installed_version=$version_in_tree
-- fi
-- done
--
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_begin_msg " $module_in_tree ($version_in_tree)"
-- fi
--
-- # Based on what we know, either do it or not
-- if [ "$current_state" = "broken" ]; then
-- echo "$module_in_tree ($version_in_tree): Unable to locate $dkms_tree/$module_in_tree/$version_in_tree/source/dkms.conf" >>$output_loc
-- echo -e "\tDKMS tree must be manually fixed." >>$output_loc
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_end_msg 1
-- fi
-- continue
-- elif [ -n "$already_installed" ]; then
-- echo "$module_in_tree ($already_installed_version): Already installed on this kernel." >>$output_loc
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_end_msg 0
-- fi
-- elif [ -z "$do_autoinstall" ]; then
-- echo "$module_in_tree ($version_in_tree): AUTOINSTALL not set in its dkms.conf." >>$output_loc
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_end_msg 0
-- fi
-- elif [ -n "$do_autoinstall" ] && [ "$version_count" -gt 1 ]; then
-- echo "$module_in_tree: Multiple versions in DKMS. Unsure what to do. Resolve manually." >>$output_loc
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_end_msg 1
-- fi
-- else
-- echo "$module_in_tree ($version_in_tree): Installing module." >>$output_loc
-- if [ "$current_state" != "built" ] && ! [ -e /lib/modules/$kernel/build/include ]; then
-- echo " Kernel headers for $kernel are not installed. Cannot install this module." >>$output_loc
-- echo " Try installing linux-headers-$kernel or equivalent." >>$output_loc
-- log_action_end_msg 1
-- elif [ "$current_state" != "built" ] && [ -e /lib/modules/$kernel/build/include ]; then
-- return_status=""
-- if [ -z "$kernel_preparation_done" ]; then
-- invoke_command "dkms build -m $module_in_tree -v $version_in_tree -k $kernel -a $arch -q --no-clean-kernel >>$output_loc" "." background
-- return_status="$?"
-- kernel_preparation_done="true"
-- else
-- invoke_command "dkms build -m $module_in_tree -v $version_in_tree -k $kernel -a $arch --no-prepare-kernel --no-clean-kernel -q >>$output_loc" "." background
-- return_status="$?"
-- fi
-- if [ "$return_status" -eq 0 ]; then
-- invoke_command "dkms install -m $module_in_tree -v $version_in_tree -k $kernel -a $arch -q >>$output_loc" "." background
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_end_msg 0
-- else
-- echo "Done"
-- fi
-- else
-- echo " Build failed. Installation skipped." >>$output_loc
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_action_end_msg 1
-- else
-- echo " Failed."
-- fi
-- fi
-- else
-- invoke_command "dkms install -m $module_in_tree -v $version_in_tree -k $kernel -a $arch -q >>$output_loc" "." background
-- return_status=$?
-- if [ "$return_status" -eq 101 ]; then
-- echo " A newer module version than this already exists in this kernel." >>$output_loc
-- echo " Skipping install... (you can manually install later with --force)" >>$output_loc
-- elif [ "$return_status" -ne 0 ]; then
-- echo " Installation failed!" >>$output_loc
-- fi
-- fi
-- fi
-- fi
-- done
-- if [ -z "$modules_needing_status" ]; then
-- if [ ! -z "$DEBIAN_STYLE_LOGGING" ]; then
-- log_end_msg 0
-+ logger -t dkms_autoinstaller "$module_in_tree ($version_in_tree): Installing module on kernel $kernel."
-+ if [ "$current_state" != "built" ] && ! [ -e /lib/modules/$kernel/build/include ]; then
-+ logger -t dkms_autoinstaller " Kernel headers for $kernel are not installed. Cannot install this module."
-+ logger -t dkms_autoinstaller " Try installing linux-headers-$kernel or equivalent."
-+ log_action_end_msg 1
-+ elif [ "$current_state" != "built" ] && [ -e /lib/modules/$kernel/build/include ]; then
-+ return_status=""
-+ if [ -z "$kernel_preparation_done" ]; then
-+ invoke_command "dkms build -m $module_in_tree -v $version_in_tree -k $kernel -a $arch -q --no-clean-kernel" "." background
-+ return_status="$?"
-+ kernel_preparation_done="true"
-+ else
-+ invoke_command "dkms build -m $module_in_tree -v $version_in_tree -k $kernel -a $arch --no-prepare-kernel --no-clean-kernel -q" "." background
-+ return_status="$?"
-+ fi
-+ if [ "$return_status" -eq 0 ]; then
-+ invoke_command "dkms install -m $module_in_tree -v $version_in_tree -k $kernel -a $arch" "." background
-+ log_action_end_msg 0
-+ else
-+ logger -t dkms_autoinstaller " Build failed. Installation skipped."
-+ log_action_end_msg 1
-+ fi
- else
-- echo -n "."
-+ invoke_command "dkms install -m $module_in_tree -v $version_in_tree -k $kernel -a $arch -q" "." background
-+ return_status=$?
-+ if [ "$return_status" -eq 101 ]; then
-+ logger -t dkms_autoinstaller " A newer module version than this already exists in kernel."
-+ logger -t dkms_autoinstaller " Skipping install... (you can manually install later with --force)"
-+ elif [ "$return_status" -ne 0 ]; then
-+ logger -t dkms_autoinstaller " Installation failed!"
-+ fi
- fi
- fi
-- ;;
-- stop)
-- # ignore
-- ;;
-- restart)
-- # ignore
-- ;;
-- force-reload)
-- # ignore
-- ;;
-- status)
-- # ignore
-- ;;
-- reload)
-- exit 0
-- ;;
-+ done
-+ if [ -z "$modules_needing_status" ]; then
-+ log_end_msg 0
-+ fi
-+ ;;
-+ stop|restart|force-reload|status|reload)
-+ # ignore
-+ ;;
- *)
-- echo $"Usage: $0 {start|stop}"
-+ echo "Usage: $0 {start}"
- esac
-
- exit 0
diff --git a/debian/patches/series b/debian/patches/series
index 721d082..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +0,0 @@
-01_init.patch
-02-improve_error_message.patch
-03_nobody.patch
-04_optimize_init.patch
--
Dynamic Kernel Module Support
More information about the Pkg-dkms-commits
mailing list