[arch-commits] Commit in (9 files)

Sébastien Luttringer seblu at archlinux.org
Thu Feb 25 08:33:24 UTC 2016


    Date: Thursday, February 25, 2016 @ 09:33:24
  Author: seblu
Revision: 260239

community2extra: Moving dkms from community to extra

Added:
  dkms/
  dkms/repos/
  dkms/trunk/
  dkms/trunk/02-no-kernel-hook.patch
  dkms/trunk/PKGBUILD
  dkms/trunk/dkms.install
  dkms/trunk/hook.install
  dkms/trunk/hook.remove
  dkms/trunk/hook.sh

-------------------------+
 02-no-kernel-hook.patch |   13 +++++++++
 PKGBUILD                |   60 ++++++++++++++++++++++++++++++++++++++++++++++
 dkms.install            |   13 +++++++++
 hook.install            |   13 +++++++++
 hook.remove             |   13 +++++++++
 hook.sh                 |   60 ++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 172 insertions(+)

Added: dkms/trunk/02-no-kernel-hook.patch
===================================================================
--- dkms/trunk/02-no-kernel-hook.patch	                        (rev 0)
+++ dkms/trunk/02-no-kernel-hook.patch	2016-02-25 08:33:24 UTC (rev 260239)
@@ -0,0 +1,13 @@
+# Author: Sébastien Luttringer <seblu at seblu.net>
+--- a/Makefile	2011-12-07 19:23:51.000000000 +0100
++++ b/Makefile	2013-05-13 00:48:19.620000000 +0200
+@@ -46,9 +46,6 @@
+ 	gzip -c -9 dkms.8 > $(MAN)/dkms.8.gz
+ 	chmod 0644 $(MAN)/dkms.8.gz
+ 	touch --reference=dkms.8 $(MAN)/dkms.8.gz
+-	mkdir   -p -m 0755 $(KCONF)/prerm.d $(KCONF)/postinst.d
+-	install -p -m 0755 kernel_prerm.d_dkms  $(KCONF)/prerm.d/dkms
+-	install -p -m 0755 kernel_postinst.d_dkms $(KCONF)/postinst.d/dkms
+ 
+ DOCFILES=sample.spec sample.conf AUTHORS COPYING README.dkms sample-suse-9-mkkmp.spec sample-suse-10-mkkmp.spec
+ 

Added: dkms/trunk/PKGBUILD
===================================================================
--- dkms/trunk/PKGBUILD	                        (rev 0)
+++ dkms/trunk/PKGBUILD	2016-02-25 08:33:24 UTC (rev 260239)
@@ -0,0 +1,60 @@
+# $Id$
+# Maintainer: Sébastien Luttringer
+# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
+
+pkgname=dkms
+pkgver=2.2.0.3+git151023
+pkgrel=5
+pkgdesc='Dynamic Kernel Modules System'
+arch=('any')
+url='http://linux.dell.com/dkms/'
+license=('GPL2')
+depends=('bash' 'kmod' 'gcc' 'make' 'patch')
+makedepends=('git')
+optdepends=('linux-headers: build modules against Arch kernel'
+            'linux-lts-headers: build modules against LTS Arch kernel')
+backup=('etc/dkms/framework.conf')
+install=$pkgname.install
+source=('git+git://linux.dell.com/dkms.git#commit=7b6e78f'
+        '02-no-kernel-hook.patch'
+        'hook.install'
+        'hook.remove'
+        'hook.sh')
+md5sums=('SKIP'
+         '82d520c39c99c34977e48b313a189c6c'
+         '8fe2064106958bcfd386e83494c8959a'
+         '41fcecb1c2dfc59a4b648fddcd8b462f'
+         '7fdc44f8ecdd0ac0dc5e6bcf02901681')
+
+prepare() {
+  cd dkms
+  # patching
+  patches=("$srcdir"/*.patch)
+  if (( ${#patches[*]} > 0 )); then
+    for p in "${patches[@]}"; do
+      msg2 "Apply patch: ${p##*/}"
+      patch -p1 -i "$p"
+    done
+  fi
+  # /usr move
+  msg2 '/usr move patching'
+  for i in dkms{,_framework.conf,.bash-completion,.8,_common.postinst}; do
+    sed -ri 's,/lib/modules,/usr/lib/modules,g' "$i"
+  done
+}
+
+package() {
+  # 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 \
+    DESTDIR="$pkgdir" \
+    SBIN="$pkgdir/usr/bin" \
+    BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
+    install
+}
+
+# vim:set ts=2 sw=2 et:


Property changes on: dkms/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: dkms/trunk/dkms.install
===================================================================
--- dkms/trunk/dkms.install	                        (rev 0)
+++ dkms/trunk/dkms.install	2016-02-25 08:33:24 UTC (rev 260239)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  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
+}
+
+# vim:set ts=2 sw=2 ft=sh et:

Added: dkms/trunk/hook.install
===================================================================
--- dkms/trunk/hook.install	                        (rev 0)
+++ dkms/trunk/hook.install	2016-02-25 08:33:24 UTC (rev 260239)
@@ -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: dkms/trunk/hook.remove
===================================================================
--- dkms/trunk/hook.remove	                        (rev 0)
+++ dkms/trunk/hook.remove	2016-02-25 08:33:24 UTC (rev 260239)
@@ -0,0 +1,13 @@
+[Trigger]
+Operation = Upgrade
+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: dkms/trunk/hook.sh
===================================================================
--- dkms/trunk/hook.sh	                        (rev 0)
+++ dkms/trunk/hook.sh	2016-02-25 08:33:24 UTC (rev 260239)
@@ -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