[Pkg-dkms-commits] [dkms] 04/06: Upstream post-release cherry-picks
Aron Xu
aron at debian.org
Wed Oct 26 15:08:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
aron pushed a commit to branch master
in repository dkms.
commit ea734db62baef635f4e6e060d69c9d683ce96a85
Author: Aron Xu <aron at debian.org>
Date: Wed Oct 26 14:24:14 2016 +0800
Upstream post-release cherry-picks
---
...ning-messages-to-start-Warning-instead-of.patch | 22 ++++++++++
...oke_command-Avoid-leaking-a-sleep-process.patch | 44 +++++++++++++++++++
...ly-report-fully-linked-weak-installations.patch | 50 ++++++++++++++++++++++
debian/patches/series | 3 ++
4 files changed, 119 insertions(+)
diff --git a/debian/patches/0005-Fix-warning-messages-to-start-Warning-instead-of.patch b/debian/patches/0005-Fix-warning-messages-to-start-Warning-instead-of.patch
new file mode 100644
index 0000000..dad9cd7
--- /dev/null
+++ b/debian/patches/0005-Fix-warning-messages-to-start-Warning-instead-of.patch
@@ -0,0 +1,22 @@
+From: Anders Kaseorg <andersk at mit.edu>
+Date: Thu, 13 Oct 2016 16:56:51 -0400
+Subject: Fix warning messages to start Warning: instead of :
+
+Signed-off-by: Anders Kaseorg <andersk at mit.edu>
+---
+ dkms | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dkms b/dkms
+index 51d380a..3949fef 100644
+--- a/dkms
++++ b/dkms
+@@ -100,7 +100,7 @@ error() (
+
+ warn() (
+ exec >&2
+- echo -n "$Warning: "
++ echo -n $"Warning: "
+ for s in "$@"; do echo "$s"; done
+ )
+
diff --git a/debian/patches/0006-invoke_command-Avoid-leaking-a-sleep-process.patch b/debian/patches/0006-invoke_command-Avoid-leaking-a-sleep-process.patch
new file mode 100644
index 0000000..af1cc51
--- /dev/null
+++ b/debian/patches/0006-invoke_command-Avoid-leaking-a-sleep-process.patch
@@ -0,0 +1,44 @@
+From: Anders Kaseorg <andersk at mit.edu>
+Date: Thu, 13 Oct 2016 19:18:03 -0400
+Subject: invoke_command: Avoid leaking a sleep process
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+‘kill $progresspid’ was killing the subshell running sleep 3 for each
+progress dot, but not killing the sleep itself. Although the leaked
+sleep process had no functional effect, it irritated the Debian piuparts
+testing tool (“ERROR: FAIL: Processes are running inside chroot”).
+
+Signed-off-by: Anders Kaseorg <andersk at mit.edu>
+---
+ dkms | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/dkms b/dkms
+index 3949fef..89f6dd3 100644
+--- a/dkms
++++ b/dkms
+@@ -76,10 +76,18 @@ invoke_command()
+ if [[ $3 = background && ! $verbose ]]; then
+ local pid progresspid
+ (eval "$1" >/dev/null 2>&1) & pid=$!
+- while [ -d /proc/$pid ]; do
+- sleep 3
+- echo -en "."
+- done & progresspid=$!
++ {
++ on_exit() {
++ kill $(jobs -p) 2>/dev/null
++ wait $(jobs -p) 2>/dev/null
++ }
++ trap on_exit EXIT
++ while [ -d /proc/$pid ]; do
++ sleep 3 &
++ wait $!
++ echo -en "."
++ done
++ } & progresspid=$!
+ wait $pid 2>/dev/null
+ exitval=$?
+ kill $progresspid 2>/dev/null
diff --git a/debian/patches/0007-Only-report-fully-linked-weak-installations.patch b/debian/patches/0007-Only-report-fully-linked-weak-installations.patch
new file mode 100644
index 0000000..1838de0
--- /dev/null
+++ b/debian/patches/0007-Only-report-fully-linked-weak-installations.patch
@@ -0,0 +1,50 @@
+From: Nathaniel Clark <Nathaniel.Clark at misrule.us>
+Date: Fri, 21 Oct 2016 10:59:17 -0400
+Subject: Only report fully linked weak installations
+
+Check to make sure each ko for a given module is present before
+reporting that the module is weak installed.
+
+Signed-off-by: Nathaniel Clark <Nathaniel.Clark at misrule.us>
+---
+ dkms | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/dkms b/dkms
+index 89f6dd3..b792950 100644
+--- a/dkms
++++ b/dkms
+@@ -1901,8 +1901,8 @@ module_status_weak() {
+ # $4 = kernel arch, $5 = kernel version built for
+ [ -z "$NO_WEAK_MODULES" ] || return 1
+ [[ $weak_modules ]] || return 1
+- local m v k a weak_ko mod installed_ko f ret=1 oifs=$IFS
+- local -a already_found
++ local m v k a kern weak_ko mod installed_ko f ret=1 oifs=$IFS
++ local -A already_found
+ for weak_ko in "$install_tree/"*/weak-updates/*; do
+ [[ -e $weak_ko ]] || continue
+ [[ -L $weak_ko ]] && installed_ko="$(readlink -f "$weak_ko")" || continue
+@@ -1910,12 +1910,17 @@ module_status_weak() {
+ kern=${weak_ko#$install_tree/}
+ kern=${kern%/weak-updates/*}
+ [[ $m = ${1:-*} && $v = ${2:-*} && $k = ${5:-*} && $a = ${4:-*} && $kern = ${3:-*} ]] || continue
++ already_found[$m/$v/$kern/$a/$k]+=${weak_ko##*/}" "
++ done
++ # Check to see that all ko's are present for each module
++ for mod in ${!already_found[@]}; do
++ IFS=/ read m v k a kern <<< "$mod"
++ # ensure each module is weak linked
++ for installed_ko in $(find $dkms_tree/$m/$v/$kern/$a/module -type f); do
++ [[ ${already_found[$mod]} != *"$installed_ko"* ]] && continue 2
++ done
+ ret=0
+- for f in "${already_found[@]}"; do
+- [[ $f = $m/$v/$kern/$a/$k ]] && continue 2
+- done
+- already_found[${#already_found[@]}]="$m/$v/$kern/$a/$k"
+- echo "installed-weak $m/$v/$kern/$a/$k"
++ echo "installed-weak $mod"
+ done
+ return $ret
+ }
diff --git a/debian/patches/series b/debian/patches/series
index e574e77..7257959 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,6 @@
0002-757758.patch
0003-Do-not-ignore-kernelsourcedir.patch
0004-mkbmdeb-support-for-lean-binary-package-with-only-th.patch
+0005-Fix-warning-messages-to-start-Warning-instead-of.patch
+0006-invoke_command-Avoid-leaking-a-sleep-process.patch
+0007-Only-report-fully-linked-weak-installations.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-dkms/dkms.git
More information about the Pkg-dkms-commits
mailing list