[arch-commits] Commit in dkms/repos/extra-any (11 files)

Sébastien Luttringer seblu at archlinux.org
Sat Jan 14 15:39:14 UTC 2017


    Date: Saturday, January 14, 2017 @ 15:39:13
  Author: seblu
Revision: 286366

archrelease: copy trunk to extra-any

Added:
  dkms/repos/extra-any/PKGBUILD
    (from rev 286365, dkms/trunk/PKGBUILD)
  dkms/repos/extra-any/dkms.install
    (from rev 286365, dkms/trunk/dkms.install)
  dkms/repos/extra-any/hook.install
    (from rev 286365, dkms/trunk/hook.install)
  dkms/repos/extra-any/hook.remove
    (from rev 286365, dkms/trunk/hook.remove)
  dkms/repos/extra-any/hook.sh
    (from rev 286365, dkms/trunk/hook.sh)
Deleted:
  dkms/repos/extra-any/02-no-kernel-hook.patch
  dkms/repos/extra-any/PKGBUILD
  dkms/repos/extra-any/dkms.install
  dkms/repos/extra-any/hook.install
  dkms/repos/extra-any/hook.remove
  dkms/repos/extra-any/hook.sh

-------------------------+
 02-no-kernel-hook.patch |   13 --
 PKGBUILD                |  128 +++++++++++-----------
 dkms.install            |   26 ++--
 hook.install            |   28 ++--
 hook.remove             |   32 ++---
 hook.sh                 |  266 +++++++++++++++++++++++-----------------------
 6 files changed, 240 insertions(+), 253 deletions(-)

Deleted: 02-no-kernel-hook.patch
===================================================================
--- 02-no-kernel-hook.patch	2017-01-14 15:38:49 UTC (rev 286365)
+++ 02-no-kernel-hook.patch	2017-01-14 15:39:13 UTC (rev 286366)
@@ -1,13 +0,0 @@
-# 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
- 

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-01-14 15:38:49 UTC (rev 286365)
+++ PKGBUILD	2017-01-14 15:39:13 UTC (rev 286366)
@@ -1,64 +0,0 @@
-# $Id$
-# Maintainer: Sébastien Luttringer
-# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
-
-pkgname=dkms
-pkgver=2.3
-pkgrel=1
-pkgdesc='Dynamic Kernel Modules System'
-arch=('any')
-url='https://github.com/dell/dkms'
-license=('GPL2')
-depends=('bash' 'kmod' 'gcc' 'make' 'patch')
-makedepends=('git')
-optdepends=('linux-headers: build modules against the Arch kernel'
-            'linux-lts-headers: build modules against the LTS kernel'
-            'linux-zen-headers: build modules against the ZEN kernel'
-            'linux-grsec-headers: build modules against the GRSEC kernel')
-backup=('etc/dkms/framework.conf')
-install=$pkgname.install
-source=("git+https://github.com/dell/dkms.git#tag=$pkgver"
-        '02-no-kernel-hook.patch'
-        'hook.install'
-        'hook.remove'
-        'hook.sh')
-md5sums=('SKIP'
-         '82d520c39c99c34977e48b313a189c6c'
-         '2dfc9905738199bf1fdbaa08d306e265'
-         '4d959fdd4f168b5a6921712404066566'
-         'c3971151a2945e5491b786579810cd15')
-
-prepare() {
-  cd dkms
-
-  # apply patch from the source array (should be a pacman feature)
-  local filename
-  for filename in "${source[@]}"; do
-    if [[ "$filename" =~ \.patch$ ]]; then
-      msg2 "Applying patch ${filename##*/}"
-      patch -p1 -N -i "$srcdir/${filename##*/}"
-    fi
-  done
-
-  # /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:

Copied: dkms/repos/extra-any/PKGBUILD (from rev 286365, dkms/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-01-14 15:39:13 UTC (rev 286366)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Sébastien Luttringer
+# Contributor: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
+
+pkgname=dkms
+pkgver=2.3
+pkgrel=2
+pkgdesc='Dynamic Kernel Modules System'
+arch=('any')
+url='https://github.com/dell/dkms'
+license=('GPL2')
+depends=('bash' 'kmod' 'gcc' 'make' 'patch')
+makedepends=('git')
+optdepends=('linux-headers: build modules against the Arch kernel'
+            'linux-lts-headers: build modules against the LTS kernel'
+            'linux-zen-headers: build modules against the ZEN kernel'
+            'linux-grsec-headers: build modules against the GRSEC kernel')
+backup=('etc/dkms/framework.conf')
+install=$pkgname.install
+source=("git+https://github.com/dell/dkms.git#tag=$pkgver"
+        'hook.install'
+        'hook.remove'
+        'hook.sh')
+md5sums=('SKIP'
+         '2dfc9905738199bf1fdbaa08d306e265'
+         '4d959fdd4f168b5a6921712404066566'
+         'f1ea074ef22d1afe855a1eb63233566b')
+
+prepare() {
+  cd dkms
+
+  # apply patch from the source array (should be a pacman feature)
+  local filename
+  for filename in "${source[@]}"; do
+    if [[ "$filename" =~ \.patch$ ]]; then
+      msg2 "Applying patch ${filename##*/}"
+      patch -p1 -N -i "$srcdir/${filename##*/}"
+    fi
+  done
+
+  # /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
+  # we don't need kconf files, so we install them outside $pkgdir
+  make \
+    DESTDIR="$pkgdir" \
+    SBIN="$pkgdir/usr/bin" \
+    BASHDIR="$pkgdir/usr/share/bash-completion/completions" \
+    KCONF="$srcdir"/kconf \
+    install
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: dkms.install
===================================================================
--- dkms.install	2017-01-14 15:38:49 UTC (rev 286365)
+++ dkms.install	2017-01-14 15:39:13 UTC (rev 286366)
@@ -1,13 +0,0 @@
-#!/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:

Copied: dkms/repos/extra-any/dkms.install (from rev 286365, dkms/trunk/dkms.install)
===================================================================
--- dkms.install	                        (rev 0)
+++ dkms.install	2017-01-14 15:39:13 UTC (rev 286366)
@@ -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:

Deleted: hook.install
===================================================================
--- hook.install	2017-01-14 15:38:49 UTC (rev 286365)
+++ hook.install	2017-01-14 15:39:13 UTC (rev 286366)
@@ -1,14 +0,0 @@
-[Trigger]
-Operation = Install
-Operation = Upgrade
-Type = File
-Target = usr/src/*/dkms.conf
-Target = usr/lib/modules/*/build/include/
-Target = usr/lib/modules/*/kernel/
-
-[Action]
-Description = Install DKMS modules
-Depends = dkms
-When = PostTransaction
-Exec = /usr/lib/dkms/alpm-hook install
-NeedsTargets

Copied: dkms/repos/extra-any/hook.install (from rev 286365, dkms/trunk/hook.install)
===================================================================
--- hook.install	                        (rev 0)
+++ hook.install	2017-01-14 15:39:13 UTC (rev 286366)
@@ -0,0 +1,14 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = File
+Target = usr/src/*/dkms.conf
+Target = usr/lib/modules/*/build/include/
+Target = usr/lib/modules/*/kernel/
+
+[Action]
+Description = Install DKMS modules
+Depends = dkms
+When = PostTransaction
+Exec = /usr/lib/dkms/alpm-hook install
+NeedsTargets

Deleted: hook.remove
===================================================================
--- hook.remove	2017-01-14 15:38:49 UTC (rev 286365)
+++ hook.remove	2017-01-14 15:39:13 UTC (rev 286366)
@@ -1,16 +0,0 @@
-[Trigger]
-Operation = Upgrade
-Operation = Remove
-Type = File
-Target = usr/src/*/dkms.conf
-Target = usr/lib/modules/*/build/include/
-Target = usr/lib/modules/*/kernel/
-
-[Action]
-Description = Remove DKMS modules
-Depends = dkms
-When = PreTransaction
-# SIGPIPE workaround. See FS#49816
-#Exec = /usr/lib/dkms/alpm-hook remove
-Exec = /usr/bin/perl -e "$SIG{PIPE}='DEFAULT'; exec('/usr/lib/dkms/alpm-hook', 'remove');"
-NeedsTargets

Copied: dkms/repos/extra-any/hook.remove (from rev 286365, dkms/trunk/hook.remove)
===================================================================
--- hook.remove	                        (rev 0)
+++ hook.remove	2017-01-14 15:39:13 UTC (rev 286366)
@@ -0,0 +1,16 @@
+[Trigger]
+Operation = Upgrade
+Operation = Remove
+Type = File
+Target = usr/src/*/dkms.conf
+Target = usr/lib/modules/*/build/include/
+Target = usr/lib/modules/*/kernel/
+
+[Action]
+Description = Remove DKMS modules
+Depends = dkms
+When = PreTransaction
+# SIGPIPE workaround. See FS#49816
+#Exec = /usr/lib/dkms/alpm-hook remove
+Exec = /usr/bin/perl -e "$SIG{PIPE}='DEFAULT'; exec('/usr/lib/dkms/alpm-hook', 'remove');"
+NeedsTargets

Deleted: hook.sh
===================================================================
--- hook.sh	2017-01-14 15:38:49 UTC (rev 286365)
+++ hook.sh	2017-01-14 15:39:13 UTC (rev 286366)
@@ -1,133 +0,0 @@
-#!/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.
-
-# display what to run and run it quietly
-run() {
-	echo "==> $*"
-	"$@" > /dev/null
-}
-
-# check kernel is valid for action
-# it means kernel and its headers are installed
-# $1: kernel version
-check_kernel() {
-	local kver="$1"; shift
-	if [[ ! -d "$install_tree/$kver/kernel" ]]; then
-		echo "==> No kernel $kver modules. You must install them to use DKMS!"
-		return 1
-	elif [[ ! -d "$install_tree/$kver/build/include" ]]; then
-		echo "==> No kernel $kver headers. You must install them to use DKMS!"
-		return 1
-	fi
-	return 0
-}
-
-# handle actions on module addition/upgrade/removal
-# $1: module name
-# $2: module version
-# $3: dkms action
-parse_module() {
-	pushd "$install_tree" >/dev/null
-	local path
-	for path in */build/; do
-		local kver="${path%%/*}"
-		dkms_register "$1" "$2" "$kver" "$3"
-	done
-	popd >/dev/null
-}
-
-# handle actions on kernel addition/upgrade/removal
-# $1: kernel version
-# $2: dkms action
-parse_kernel() {
-	local path
-	for path in "$source_tree"/*-*/dkms.conf; do
-		if [[ -f "$path" && "$path" =~ ^$source_tree/([^/]+)-([^/]+)/dkms\.conf$ ]]; then
-			dkms_register "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "$1" "$2"
-		fi
-	done
-}
-
-# register a dkms call
-# this function suppress echo call for a module
-# $1: module name, $2: module version, $3: kernel version, $4: action
-dkms_register() {
-	DKMS_ACTION["$1/$2/$3"]="$4"
-}
-
-# run registered dkms commands
-dkms_run() {
-	local modname modver kver args nvk
-	for nvk in "${!DKMS_ACTION[@]}"; do
-		mod=${nvk%/*}
-		kver=${nvk##*/}
-		check_kernel "$kver" || return
-		run dkms "${DKMS_ACTION[$nvk]}" "$mod" -k "$kver"
-	done
-}
-
-# emulated program entry point
-main() {
-	[[ -n "$DKMS_ALPM_HOOK_DEBUG" ]] && set -x
-
-	# 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'
-	install_tree='/usr/lib/modules'
-	source /etc/dkms/framework.conf
-
-	# check source_tree and install_tree exists
-	local path
-	for path in "$source_tree" "$install_tree"; do
-		if [[ ! -d "$path" ]]; then
-			echo "==> Missing mandatory directory: $path. Exiting!"
-			return 1
-		fi
-	done
-
-	# Storage for DKMS action to run
-	declare -A DKMS_ACTION
-
-	# parse stdin paths to guess what do do
-	while read -r path; do
-		if [[ "/$path" =~ ^$source_tree/([^/]+)-([^/]+)/dkms\.conf$ ]]; then
-			parse_module "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "$@"
-		elif [[ "/$path" =~ ^$install_tree/([^/]+)/ ]]; then
-			parse_kernel "${BASH_REMATCH[1]}" "$@"
-		fi
-	done
-
-	dkms_run
-
-	return 0
-}
-
-main "$@"

Copied: dkms/repos/extra-any/hook.sh (from rev 286365, dkms/trunk/hook.sh)
===================================================================
--- hook.sh	                        (rev 0)
+++ hook.sh	2017-01-14 15:39:13 UTC (rev 286366)
@@ -0,0 +1,133 @@
+#!/bin/bash
+
+#
+# Copyright © 2017 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.
+
+# display what to run and run it quietly
+run() {
+	echo "==> $*"
+	"$@" > /dev/null
+}
+
+# check kernel is valid for action
+# it means kernel and its headers are installed
+# $1: kernel version
+check_kernel() {
+	local kver="$1"; shift
+	if [[ ! -d "$install_tree/$kver/kernel" ]]; then
+		echo "==> No kernel $kver modules. You must install them to use DKMS!"
+		return 1
+	elif [[ ! -d "$install_tree/$kver/build/include" ]]; then
+		echo "==> No kernel $kver headers. You must install them to use DKMS!"
+		return 1
+	fi
+	return 0
+}
+
+# handle actions on module addition/upgrade/removal
+# $1: module name
+# $2: module version
+# $3: dkms action
+parse_module() {
+	pushd "$install_tree" >/dev/null
+	local path
+	for path in */build/; do
+		local kver="${path%%/*}"
+		dkms_register "$1" "$2" "$kver" "$3"
+	done
+	popd >/dev/null
+}
+
+# handle actions on kernel addition/upgrade/removal
+# $1: kernel version
+# $2: dkms action
+parse_kernel() {
+	local path
+	for path in "$source_tree"/*-*/dkms.conf; do
+		if [[ -f "$path" && "$path" =~ ^$source_tree/([^/]+)-([^/]+)/dkms\.conf$ ]]; then
+			dkms_register "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "$1" "$2"
+		fi
+	done
+}
+
+# register a dkms call
+# this function suppress echo call for a module
+# $1: module name, $2: module version, $3: kernel version, $4: action
+dkms_register() {
+	DKMS_ACTION["$1/$2/$3"]="$4"
+}
+
+# run registered dkms commands
+dkms_run() {
+	local nvk mod kver
+	for nvk in "${!DKMS_ACTION[@]}"; do
+		mod=${nvk%/*}
+		kver=${nvk##*/}
+		check_kernel "$kver" || continue
+		run dkms "${DKMS_ACTION[$nvk]}" "$mod" -k "$kver"
+	done
+}
+
+# emulated program entry point
+main() {
+	[[ -n "$DKMS_ALPM_HOOK_DEBUG" ]] && set -x
+
+	# 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'
+	install_tree='/usr/lib/modules'
+	source /etc/dkms/framework.conf
+
+	# check source_tree and install_tree exists
+	local path
+	for path in "$source_tree" "$install_tree"; do
+		if [[ ! -d "$path" ]]; then
+			echo "==> Missing mandatory directory: $path. Exiting!"
+			return 1
+		fi
+	done
+
+	# Storage for DKMS action to run
+	declare -A DKMS_ACTION
+
+	# parse stdin paths to guess what do do
+	while read -r path; do
+		if [[ "/$path" =~ ^$source_tree/([^/]+)-([^/]+)/dkms\.conf$ ]]; then
+			parse_module "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "$@"
+		elif [[ "/$path" =~ ^$install_tree/([^/]+)/ ]]; then
+			parse_kernel "${BASH_REMATCH[1]}" "$@"
+		fi
+	done
+
+	dkms_run
+
+	return 0
+}
+
+main "$@"



More information about the arch-commits mailing list