[arch-commits] Commit in dkms/trunk (7 files)
Sébastien Luttringer
seblu at archlinux.org
Sat Feb 20 21:05:11 UTC 2016
Date: Saturday, February 20, 2016 @ 22:05:10
Author: seblu
Revision: 162893
upgpkg: dkms 2.2.0.3+git151023-4
https://lists.archlinux.org/pipermail/arch-dev-public/2016-February/027770.html
Added:
dkms/trunk/hook.install
(from rev 162892, dkms/trunk/dkms.hook)
dkms/trunk/hook.remove
dkms/trunk/hook.sh
Modified:
dkms/trunk/PKGBUILD
dkms/trunk/dkms.install
Deleted:
dkms/trunk/alpm-hook
dkms/trunk/dkms.hook
--------------+
PKGBUILD | 17 +++++++++-------
alpm-hook | 29 ---------------------------
dkms.hook | 11 ----------
dkms.install | 8 +------
hook.install | 13 ++++++++++++
hook.remove | 12 +++++++++++
hook.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 97 insertions(+), 53 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-02-20 21:01:53 UTC (rev 162892)
+++ PKGBUILD 2016-02-20 21:05:10 UTC (rev 162893)
@@ -4,7 +4,7 @@
pkgname=dkms
pkgver=2.2.0.3+git151023
-pkgrel=3
+pkgrel=4
pkgdesc='Dynamic Kernel Modules System'
arch=('any')
url='http://linux.dell.com/dkms/'
@@ -17,12 +17,14 @@
install=$pkgname.install
source=('git+git://linux.dell.com/dkms.git#commit=7b6e78f'
'02-no-kernel-hook.patch'
- 'alpm-hook'
- "$pkgname.hook")
+ 'hook.install'
+ 'hook.remove'
+ 'hook.sh')
md5sums=('SKIP'
'82d520c39c99c34977e48b313a189c6c'
- '87715a4b2f8520eb85b380fa5509ac10'
- '579ec5e7d91acbf75eaf0ed154864a05')
+ '8fe2064106958bcfd386e83494c8959a'
+ '78eaff5c38c5282c4c766d2a9923c207'
+ '7fdc44f8ecdd0ac0dc5e6bcf02901681')
prepare() {
cd dkms
@@ -43,8 +45,9 @@
package() {
# alpm hook
- install -D -m 644 dkms.hook "$pkgdir/usr/share/libalpm/hooks/70-dkms.hook"
- install -D -m 755 alpm-hook "$pkgdir/usr/lib/dkms/alpm-hook"
+ install -D -m 644 hook.install "$pkgdir/usr/share/libalpm/hooks/70-dkms-install.hook"
+ install -D -m 644 hook.remove "$pkgdir/usr/share/libalpm/hooks/70-dkms-remove.hook"
+ install -D -m 755 hook.sh "$pkgdir/usr/lib/dkms/alpm-hook"
# upstream installer
cd dkms
make \
Deleted: alpm-hook
===================================================================
--- alpm-hook 2016-02-20 21:01:53 UTC (rev 162892)
+++ alpm-hook 2016-02-20 21:05:10 UTC (rev 162893)
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# Copyright © Sébastien Luttringer
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-if (( EUID )); then
- echo 'You must be root to use this hook' >&2
- exit 1
-fi
-
-# build modules for all kernels
-cd /usr/lib/modules
-for buildpath in */build; do
- [[ -d "$buildpath" ]] || continue
- dkms autoinstall -k "${buildpath%/*}"
-done
Deleted: dkms.hook
===================================================================
--- dkms.hook 2016-02-20 21:01:53 UTC (rev 162892)
+++ dkms.hook 2016-02-20 21:05:10 UTC (rev 162893)
@@ -1,11 +0,0 @@
-[Trigger]
-Operation = Install
-Operation = Upgrade
-Type = Package
-Target = *-dkms
-
-[Action]
-Description = Build required modules
-Depends = dkms
-When = PostTransaction
-Exec = /usr/lib/dkms/alpm-hook
Modified: dkms.install
===================================================================
--- dkms.install 2016-02-20 21:01:53 UTC (rev 162892)
+++ dkms.install 2016-02-20 21:05:10 UTC (rev 162893)
@@ -3,12 +3,8 @@
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
- if (( "$(vercmp $2 2.2.0.3-12)" <= 0 )); then
- echo '===> dkms startup config file moved to /etc/default/dkms'
- fi
-
- if (( "$(vercmp $2 '2.2.0.3+git151023-2')" <= 0 )); then
- echo '===> dkms systemd service has been removed'
+ if (( "$(vercmp $2 '2.2.0.3+git151023-2')" < 0 )); then
+ echo '===> dkms systemd startup service has been removed'
echo '===> modules building is now handled by alpm hooks at install time'
echo '===> startup modules loading must be done via modules-load.d'
fi
Copied: dkms/trunk/hook.install (from rev 162892, dkms/trunk/dkms.hook)
===================================================================
--- hook.install (rev 0)
+++ hook.install 2016-02-20 21:05:10 UTC (rev 162893)
@@ -0,0 +1,13 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = File
+Target = usr/src/*/dkms.conf
+Target = usr/lib/modules/*/build/include/
+
+[Action]
+Description = Install DKMS modules
+Depends = dkms
+When = PostTransaction
+Exec = /usr/lib/dkms/alpm-hook install
+NeedsTargets
Added: hook.remove
===================================================================
--- hook.remove (rev 0)
+++ hook.remove 2016-02-20 21:05:10 UTC (rev 162893)
@@ -0,0 +1,12 @@
+[Trigger]
+Operation = Remove
+Type = File
+Target = usr/src/*/dkms.conf
+Target = usr/lib/modules/*/build/include/
+
+[Action]
+Description = Remove DKMS modules
+Depends = dkms
+When = PreTransaction
+Exec = /usr/lib/dkms/alpm-hook remove -q
+NeedsTargets
Added: hook.sh
===================================================================
--- hook.sh (rev 0)
+++ hook.sh 2016-02-20 21:05:10 UTC (rev 162893)
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+#
+# Copyright © 2016 Sébastien Luttringer
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# prevent to have all each dkms call to fail
+if (( EUID )); then
+ echo 'You must be root to use this hook' >&2
+ exit 1
+fi
+
+# check args count
+if (( $# < 1 )); then
+ echo "usage: ${0##*/} dkms-arguments" >&2
+ exit 1
+fi
+
+# dkms path from framework config
+# note: the alpm hooks which trigger this script use static path
+source_tree='/usr/src'
+dkms_tree='/var/lib/dkms'
+install_tree='/usr/lib/modules'
+source /etc/dkms/framework.conf
+
+shopt -s nullglob
+
+# parse stdin path to guess what do do
+while read -r path; do
+ if [[ "/$path" =~ ^$source_tree/([^/]+)-([^/]+)/dkms\.conf$ ]]; then
+ # do $@ for each kernel with headers
+ pushd "$install_tree" >/dev/null
+ for incpath in */build/include; do
+ dkms "$@" -m "${BASH_REMATCH[1]}" -v "${BASH_REMATCH[2]}" -k "${incpath%%/*}"
+ done
+ popd >/dev/null
+ elif [[ "/$path" =~ ^$install_tree/([^/]+)/ ]]; then
+ # do $@ once for each registered dkms module
+ pushd "$dkms_tree" >/dev/null
+ for mod in */*/source; do
+ dkms "$@" -m "${mod%/source}" -k "${BASH_REMATCH[1]}"
+ done
+ popd >/dev/null
+ else
+ echo "Skipping invalid path: $path" >&2
+ fi
+done
Property changes on: dkms/trunk/hook.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
More information about the arch-commits
mailing list