[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

DKMS support



FYI, DKMS supports Debian GNU/kFreeBSD now.

---------- Forwarded message ----------
From: Debian Bug Tracking System <owner@bugs.debian.org>
Date: 2011/7/15
Subject: Bug#631657 closed by Giuseppe Iuculano <iuculano@debian.org>
(Bug#631657: fixed in dkms 2.2.0.1-2)
To: Robert Millan <rmh@debian.org>


This is an automatic notification regarding your Bug report
which was filed against the dkms package:

#631657: GNU/kFreeBSD support

It has been closed by Giuseppe Iuculano <iuculano@debian.org>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Giuseppe Iuculano
<iuculano@debian.org> by
replying to this email.


--
631657: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631657
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems


---------- Missatge reenviat ----------
From: Giuseppe Iuculano <iuculano@debian.org>
To: 631657-close@bugs.debian.org
Date: Fri, 15 Jul 2011 14:47:24 +0000
Subject: Bug#631657: fixed in dkms 2.2.0.1-2
Source: dkms
Source-Version: 2.2.0.1-2

We believe that the bug you reported is fixed in the latest version of
dkms, which is due to be installed in the Debian FTP archive:

dkms_2.2.0.1-2.debian.tar.gz
 to main/d/dkms/dkms_2.2.0.1-2.debian.tar.gz
dkms_2.2.0.1-2.dsc
 to main/d/dkms/dkms_2.2.0.1-2.dsc
dkms_2.2.0.1-2_all.deb
 to main/d/dkms/dkms_2.2.0.1-2_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 631657@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Giuseppe Iuculano <iuculano@debian.org> (supplier of updated dkms package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 15 Jul 2011 16:00:05 +0200
Source: dkms
Binary: dkms
Architecture: source all
Version: 2.2.0.1-2
Distribution: unstable
Urgency: low
Maintainer: Dynamic Kernel Modules Support Team
<pkg-dkms-maint@lists.alioth.debian.org>
Changed-By: Giuseppe Iuculano <iuculano@debian.org>
Description:
 dkms       - Dynamic Kernel Module Support Framework
Closes: 631657
Changes:
 dkms (2.2.0.1-2) unstable; urgency=low
 .
  * [6b2d392] Run depmod command only in Linux.
    Thanks to Robert Millan (Closes: #631657)
Checksums-Sha1:
 2cbca0f35d680f660cd6c010bb8e424ab4dbd74a 1290 dkms_2.2.0.1-2.dsc
 0328fa5653bc8221b0d869cc99555e338386c5f8 14960 dkms_2.2.0.1-2.debian.tar.gz
 47db88e755312188d6e9588b57a6ea371630de5b 76954 dkms_2.2.0.1-2_all.deb
Checksums-Sha256:
 a8eca317539acdd14490d1f1b2132b141f336a5e99433006ec8f090e3090757c 1290
dkms_2.2.0.1-2.dsc
 b4fe24c4fafc7b5f863d41563b8d00750ee4b20aad9ec30ce5b35091bc81ca37
14960 dkms_2.2.0.1-2.debian.tar.gz
 88dda7bc0038a1e8066103b0cbeb4148189c5e1bb47679e53e79c8c49a3053bf
76954 dkms_2.2.0.1-2_all.deb
Files:
 d2323586c29b960297c0fc9ff3c1af97 1290 kernel optional dkms_2.2.0.1-2.dsc
 97439b48b12295d2561c00d90d5b309e 14960 kernel optional
dkms_2.2.0.1-2.debian.tar.gz
 6ee81c67ae86eed6b5682e1f4745ba82 76954 kernel optional dkms_2.2.0.1-2_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4gS+oACgkQNxpp46476aoOcACZAZKblYjgh4UWNmi/xvmKu1iK
0zUAnj4R7DRfHPC+2Nexeqnm/13hW+hk
=wCyK
-----END PGP SIGNATURE-----




---------- Missatge reenviat ----------
From: Robert Millan <rmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Date: Sat, 25 Jun 2011 22:08:54 +0200
Subject: GNU/kFreeBSD support
Package: dkms
Version: 2.1.1.2-7
Severity: wishlist
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

This patch adds GNU/kFreeBSD support to DKMS.  It can be tested with [1],
though it also needs fixes in glibc-bsd SVN which haven't been uploaded
to the archive yet.

[1] http://people.debian.org/~rmh/fuse/fuse-dkms_0.3.9~pre1.20080208-1_all.deb

-- System Information:
Debian Release: wheezy/sid
 APT prefers unstable
 APT policy: (500, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.2-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dkms depends on:
ii  build-essential               11.5       Informational list of build-essent
ii  coreutils                     8.5-1      GNU core utilities
ii  dpkg-dev                      1.16.0.3   Debian package development tools
ii  gcc                           4:4.6.0-6  GNU C compiler
ii  kldutils [module-init-tools]  8.2+ds1-1  tools for managing kFreeBSD module
ii  make                          3.81-8.1   An utility for Directing compilati
ii  patch                         2.6.1-2    Apply a diff file to an original

Versions of packages dkms recommends:
ii  fakeroot                      1.16-1     tool for simulating superuser priv
pn  linux-headers-2.6-686 | linux <none>     (no description available)
pn  linux-image                   <none>     (no description available)
ii  sudo                          1.7.4p6-1  Provide limited super user privile

dkms suggests no packages.

-- no debconf information




-- 
Robert Millan
--- a/dkms
+++ b/dkms
@@ -19,6 +19,27 @@
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
+uname_s=$(uname -s)
+
+function _get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+function _check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+       Linux)          test -e $DIR/build/include ;;
+       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+       *)              return 1 ;;
+    esac
+    return $?
+}
+
 function invoke_command ()
 {
     local exitval=0
@@ -98,8 +119,8 @@
 function set_kernel_source_dir ()
 {
     # $1 = the kernel to base the directory on
-    if [ -z "$kernel_source_dir" ] && [ -d "$install_tree/$1/build" ]; then
-        kernel_source_dir="$install_tree/$1/build"
+    if [ -z "$kernel_source_dir" ]; then
+        kernel_source_dir="$(_get_kernel_dir "$1")"
     fi
 }
 
@@ -416,6 +437,11 @@
     local orig_location="$1"
     [ -n "${addon_modules_dir}" ] && echo "/${addon_modules_dir}" && return
 
+    if [ "$uname_s" = "GNU/kFreeBSD" ] ; then
+	# Does not support subdirs, regardless of distribution
+	echo "" && return
+    fi
+
     case "$running_distribution" in
     fc[12345]) ;;
     el[1234]) ;;
@@ -1051,7 +1077,7 @@
     set_kernel_source_dir "$1"
 
     # Check that kernel-source exists
-    if ! [ -e "$kernel_source_dir/include" ]; then
+    if ! _check_kernel_dir "$1"; then
         echo $"" >&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
--- a/dkms_autoinstaller
+++ b/dkms_autoinstaller
@@ -17,6 +17,27 @@
 
 test -f /usr/sbin/dkms || exit 0
 
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+       Linux)          test -e $DIR/build/include ;;
+       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+       *)              return 1 ;;
+    esac
+    return $?
+}
+
 #We only have these functions on debian/ubuntu
 # so on other distros just stub them out
 if [ -f /lib/lsb/init-functions ]; then
@@ -115,11 +136,11 @@
             log_action_end_msg 1
         else
             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
+            if [ "$current_state" != "built" ] && ! _check_kernel_dir $kernel; 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
+            elif [ "$current_state" != "built" ] && _check_kernel_dir $kernel; 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
--- a/dkms_common.postinst
+++ b/dkms_common.postinst
@@ -6,6 +6,27 @@
 
 set -e
 
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+	Linux)		DIR="/lib/modules/$KVER" ;;
+	GNU/kFreeBSD)	DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+	Linux)		test -e $DIR/build/include ;;
+	GNU/kFreeBSD)	test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+	*)		return 1 ;;
+    esac
+    return $?
+}
+
 # Check the existence of a kernel named as $1
 _is_kernel_name_correct() {
     CORRECT="no"
@@ -242,7 +263,7 @@
             echo " since the package source was not provided"
             continue
         fi
-        if [ -e /lib/modules/$KERNEL/build/include ]; then
+        if _check_kernel_dir $KERNEL; then
             echo "Building initial module for $KERNEL"
             set +e
             dkms build -m $NAME -v $VERSION -k $KERNEL $ARCH > /dev/null
--- a/kernel_postinst.d_dkms
+++ b/kernel_postinst.d_dkms
@@ -3,11 +3,43 @@
 # We're passed the version of the kernel being installed
 inst_kern=$1
 
+uname_s=$(uname -s)
+
+_get_kernel_dir() {
+    KVER=$1
+    case ${uname_s} in
+       Linux)          DIR="/lib/modules/$KVER" ;;
+       GNU/kFreeBSD)   DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;;
+    esac
+    echo $DIR
+}
+
+_check_kernel_dir() {
+    DIR=$(_get_kernel_dir $1)
+    case ${uname_s} in
+       Linux)          test -e $DIR/build/include ;;
+       GNU/kFreeBSD)   test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;;
+       *)              return 1 ;;
+    esac
+    return $?
+}
+
+case "${uname_s}" in
+    Linux)
+        header_pkg="linux-headers-$inst_kern"
+        kernel="Linux"
+    ;;
+    GNU/kFreeBSD)
+        header_pkg="kfreebsd-headers-$inst_kern"
+        kernel="kFreeBSD"
+    ;;
+esac
+
 if [ -x /usr/lib/dkms/dkms_autoinstaller ]; then
     /usr/lib/dkms/dkms_autoinstaller start $inst_kern >&2
 fi
 
-if [ ! -e /lib/modules/$inst_kern/build/include ] ; then
-    echo "dkms: WARNING: linux headers are missing, which may explain the above failures." >&2
-    echo "      please install the linux-headers-$inst_kern package to fix this." >&2
+if ! _check_kernel_dir $inst_kern ; then
+    echo "dkms: WARNING: $kernel headers are missing, which may explain the above failures." >&2
+    echo "      please install the $header_pkg package to fix this." >&2
 fi

Reply to: