ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] add comments
       [not found] <1280319036-17877-1-git-send-email-y>
@ 2010-07-28 12:10 ` y
  2010-07-28 16:58 ` [PATCH 1/2] add dkms support Sage Weil
  1 sibling, 0 replies; 7+ messages in thread
From: y @ 2010-07-28 12:10 UTC (permalink / raw)
  To: ceph-devel; +Cc: Thomas Mueller

From: Thomas Mueller <thomas@chaschperli.ch>

make the helper script executable and add some comment.

---
 dkms/add-to-dkms-and-build |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 dkms/add-to-dkms-and-build

diff --git a/dkms/add-to-dkms-and-build b/dkms/add-to-dkms-and-build
old mode 100644
new mode 100755
index ffea573..7a68923
--- a/dkms/add-to-dkms-and-build
+++ b/dkms/add-to-dkms-and-build
@@ -1,4 +1,7 @@
 #!/bin/sh
+# 
+# * copies files to /usr/src/ceph-$CEPH_VERSION (dkms fixed location "-c" switch did not work for me)
+# * adds the module to dkms and builds it
 
 if ! [ -f ./upstream_version.h ]
 then
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] add dkms support
       [not found] <1280319036-17877-1-git-send-email-y>
  2010-07-28 12:10 ` [PATCH 2/2] add comments y
@ 2010-07-28 16:58 ` Sage Weil
  2010-07-28 17:02   ` Sage Weil
  1 sibling, 1 reply; 7+ messages in thread
From: Sage Weil @ 2010-07-28 16:58 UTC (permalink / raw)
  To: y; +Cc: ceph-devel, Thomas Mueller

Applied these, and updated -standalone.git.  

sage


On Wed, 28 Jul 2010, y@vger.kernel.org wrote:

> From: Thomas Mueller <thomas@chaschperli.ch>
> 
> hi
> 
> saw that now the cpeh-client-standalone contains a version - this is the dkms patch updated. 
> 
> only dkms part - debian package parts follow some time later.
> 
> - Thomas
> 
> ---
>  Makefile                   |    3 ++-
>  dkms.conf                  |    7 +++++++
>  dkms/add-to-dkms-and-build |   15 +++++++++++++++
>  dkms/postremove.sh         |   34 ++++++++++++++++++++++++++++++++++
>  dkms/prebuild.sh           |   32 ++++++++++++++++++++++++++++++++
>  5 files changed, 90 insertions(+), 1 deletions(-)
>  create mode 100644 dkms.conf
>  create mode 100644 dkms/add-to-dkms-and-build
>  create mode 100644 dkms/postremove.sh
>  create mode 100644 dkms/prebuild.sh
> 
> diff --git a/Makefile b/Makefile
> index 6a660e6..4b8f6e7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -22,7 +22,8 @@ else
>  #Otherwise we were called directly from the command
>  # line; invoke the kernel build system.
>  
> -KERNELDIR ?= /lib/modules/$(shell uname -r)/build
> +KERNELRELEASE ?= $(shell uname -r)
> +KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
>  PWD := $(shell pwd)
>  
>  default: all
> diff --git a/dkms.conf b/dkms.conf
> new file mode 100644
> index 0000000..bbf607c
> --- /dev/null
> +++ b/dkms.conf
> @@ -0,0 +1,7 @@
> +PACKAGE_NAME="ceph"
> +PACKAGE_VERSION="1.0"
> +DEST_MODULE_LOCATION[0]="/updates/ceph"
> +BUILT_MODULE_NAME[0]="ceph"
> +AUTOINSTALL="yes"
> +PRE_BUILD="dkms/prebuild.sh ${kernelver}"
> +POST_REMOVE="dkms/postremove.sh ${kernelver}"
> diff --git a/dkms/add-to-dkms-and-build b/dkms/add-to-dkms-and-build
> new file mode 100644
> index 0000000..ffea573
> --- /dev/null
> +++ b/dkms/add-to-dkms-and-build
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +
> +if ! [ -f ./upstream_version.h ]
> +then
> +	echo "Failure: ./upstream_version.h not found. Did you call this script from ceph-client root?"
> +fi
> +
> +CEPH_VERSION=$(grep CEPH_VERSION upstream_version.h | egrep -o "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+[^\"]+")
> +
> +mkdir /usr/src/ceph-${CEPH_VERSION} || exit 1
> +cp -r ./ /usr/src/ceph-${CEPH_VERSION}
> +
> +dkms add -m ceph -v ${CEPH_VERSION} &&
> +dkms build -m ceph -v ${CEPH_VERSION} &&
> +dkms install -m ceph -v ${CEPH_VERSION}
> diff --git a/dkms/postremove.sh b/dkms/postremove.sh
> new file mode 100644
> index 0000000..8693fcf
> --- /dev/null
> +++ b/dkms/postremove.sh
> @@ -0,0 +1,34 @@
> +#!/bin/sh
> +
> +
> +if [ "$1" = "" ]
> +then
> +        echo "Usage: $0 <kernelver>"
> +        exit
> +fi
> +
> +MODROOT="/lib/modules/$1"
> +
> +if ! [ -f /etc/debian_version ]
> +then
> +        echo "Info: runs only on Debian and derivates"
> +        exit
> +fi
> +
> +
> +
> +if [ -d "$MODROOT" ]
> +then
> +        if [ -f "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" ]
> +        then
> +                if  ! [ -f "$MODROOT/kernel/fs/ceph/ceph.ko" ]
> +                then
> +                        dpkg-divert --rename --remove "$MODROOT/kernel/fs/ceph/ceph.ko"
> +                else
> +                        echo "Warning: $MODROOT/kernel/fs/ceph/ceph.ko  and diverted $MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms exist both!"
> +                fi
> +        fi
> +else
> +        echo "Warning: $MODROOT is not a directory"
> +fi
> +
> diff --git a/dkms/prebuild.sh b/dkms/prebuild.sh
> new file mode 100644
> index 0000000..1aee069
> --- /dev/null
> +++ b/dkms/prebuild.sh
> @@ -0,0 +1,32 @@
> +#!/bin/sh
> +
> +
> +if [ "$1" = "" ]
> +then
> +	echo "Usage: $0 <kernelver>"
> +	exit
> +fi
> +
> +MODROOT="/lib/modules/$1"
> +
> +if ! [ -f /etc/debian_version ]
> +then
> +	echo "Info: runs only on Debian and derivates"
> +	exit
> +fi
> +
> +
> +if [ -d "$MODROOT" ]
> +then
> +	if [ -f "$MODROOT/kernel/fs/ceph/ceph.ko" ] 
> +	then
> +		if  ! [ -f "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" ]
> +		then
> +			dpkg-divert --rename --package ceph-dkms --divert "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" --add "$MODROOT/kernel/fs/ceph/ceph.ko"
> +		else
> +			echo "Warning: $MODROOT/kernel/fs/ceph/ceph.ko  and diverted $MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms exist both!"
> +		fi
> +	fi
> +else 
> +	echo "Warning: $MODROOT is not a directory"
> +fi
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] add dkms support
  2010-07-28 16:58 ` [PATCH 1/2] add dkms support Sage Weil
@ 2010-07-28 17:02   ` Sage Weil
  2010-07-28 17:46     ` Thomas Mueller
  0 siblings, 1 reply; 7+ messages in thread
From: Sage Weil @ 2010-07-28 17:02 UTC (permalink / raw)
  To: Thomas Mueller; +Cc: ceph-devel

BTW, the Debian kernel guys would rather include the ceph module in the 
main kernel package than include a dkms package directly in Debian.  That 
means maintaining a backport branch specifically for 2.6.32 (the squeeze 
kernel).

(We should still have this dkms package available on the ceph site, of 
course!)

sage


On Wed, 28 Jul 2010, Sage Weil wrote:

> Applied these, and updated -standalone.git.  
> 
> sage
> 
> 
> On Wed, 28 Jul 2010, y@vger.kernel.org wrote:
> 
> > From: Thomas Mueller <thomas@chaschperli.ch>
> > 
> > hi
> > 
> > saw that now the cpeh-client-standalone contains a version - this is the dkms patch updated. 
> > 
> > only dkms part - debian package parts follow some time later.
> > 
> > - Thomas
> > 
> > ---
> >  Makefile                   |    3 ++-
> >  dkms.conf                  |    7 +++++++
> >  dkms/add-to-dkms-and-build |   15 +++++++++++++++
> >  dkms/postremove.sh         |   34 ++++++++++++++++++++++++++++++++++
> >  dkms/prebuild.sh           |   32 ++++++++++++++++++++++++++++++++
> >  5 files changed, 90 insertions(+), 1 deletions(-)
> >  create mode 100644 dkms.conf
> >  create mode 100644 dkms/add-to-dkms-and-build
> >  create mode 100644 dkms/postremove.sh
> >  create mode 100644 dkms/prebuild.sh
> > 
> > diff --git a/Makefile b/Makefile
> > index 6a660e6..4b8f6e7 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -22,7 +22,8 @@ else
> >  #Otherwise we were called directly from the command
> >  # line; invoke the kernel build system.
> >  
> > -KERNELDIR ?= /lib/modules/$(shell uname -r)/build
> > +KERNELRELEASE ?= $(shell uname -r)
> > +KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
> >  PWD := $(shell pwd)
> >  
> >  default: all
> > diff --git a/dkms.conf b/dkms.conf
> > new file mode 100644
> > index 0000000..bbf607c
> > --- /dev/null
> > +++ b/dkms.conf
> > @@ -0,0 +1,7 @@
> > +PACKAGE_NAME="ceph"
> > +PACKAGE_VERSION="1.0"
> > +DEST_MODULE_LOCATION[0]="/updates/ceph"
> > +BUILT_MODULE_NAME[0]="ceph"
> > +AUTOINSTALL="yes"
> > +PRE_BUILD="dkms/prebuild.sh ${kernelver}"
> > +POST_REMOVE="dkms/postremove.sh ${kernelver}"
> > diff --git a/dkms/add-to-dkms-and-build b/dkms/add-to-dkms-and-build
> > new file mode 100644
> > index 0000000..ffea573
> > --- /dev/null
> > +++ b/dkms/add-to-dkms-and-build
> > @@ -0,0 +1,15 @@
> > +#!/bin/sh
> > +
> > +if ! [ -f ./upstream_version.h ]
> > +then
> > +	echo "Failure: ./upstream_version.h not found. Did you call this script from ceph-client root?"
> > +fi
> > +
> > +CEPH_VERSION=$(grep CEPH_VERSION upstream_version.h | egrep -o "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+[^\"]+")
> > +
> > +mkdir /usr/src/ceph-${CEPH_VERSION} || exit 1
> > +cp -r ./ /usr/src/ceph-${CEPH_VERSION}
> > +
> > +dkms add -m ceph -v ${CEPH_VERSION} &&
> > +dkms build -m ceph -v ${CEPH_VERSION} &&
> > +dkms install -m ceph -v ${CEPH_VERSION}
> > diff --git a/dkms/postremove.sh b/dkms/postremove.sh
> > new file mode 100644
> > index 0000000..8693fcf
> > --- /dev/null
> > +++ b/dkms/postremove.sh
> > @@ -0,0 +1,34 @@
> > +#!/bin/sh
> > +
> > +
> > +if [ "$1" = "" ]
> > +then
> > +        echo "Usage: $0 <kernelver>"
> > +        exit
> > +fi
> > +
> > +MODROOT="/lib/modules/$1"
> > +
> > +if ! [ -f /etc/debian_version ]
> > +then
> > +        echo "Info: runs only on Debian and derivates"
> > +        exit
> > +fi
> > +
> > +
> > +
> > +if [ -d "$MODROOT" ]
> > +then
> > +        if [ -f "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" ]
> > +        then
> > +                if  ! [ -f "$MODROOT/kernel/fs/ceph/ceph.ko" ]
> > +                then
> > +                        dpkg-divert --rename --remove "$MODROOT/kernel/fs/ceph/ceph.ko"
> > +                else
> > +                        echo "Warning: $MODROOT/kernel/fs/ceph/ceph.ko  and diverted $MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms exist both!"
> > +                fi
> > +        fi
> > +else
> > +        echo "Warning: $MODROOT is not a directory"
> > +fi
> > +
> > diff --git a/dkms/prebuild.sh b/dkms/prebuild.sh
> > new file mode 100644
> > index 0000000..1aee069
> > --- /dev/null
> > +++ b/dkms/prebuild.sh
> > @@ -0,0 +1,32 @@
> > +#!/bin/sh
> > +
> > +
> > +if [ "$1" = "" ]
> > +then
> > +	echo "Usage: $0 <kernelver>"
> > +	exit
> > +fi
> > +
> > +MODROOT="/lib/modules/$1"
> > +
> > +if ! [ -f /etc/debian_version ]
> > +then
> > +	echo "Info: runs only on Debian and derivates"
> > +	exit
> > +fi
> > +
> > +
> > +if [ -d "$MODROOT" ]
> > +then
> > +	if [ -f "$MODROOT/kernel/fs/ceph/ceph.ko" ] 
> > +	then
> > +		if  ! [ -f "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" ]
> > +		then
> > +			dpkg-divert --rename --package ceph-dkms --divert "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" --add "$MODROOT/kernel/fs/ceph/ceph.ko"
> > +		else
> > +			echo "Warning: $MODROOT/kernel/fs/ceph/ceph.ko  and diverted $MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms exist both!"
> > +		fi
> > +	fi
> > +else 
> > +	echo "Warning: $MODROOT is not a directory"
> > +fi
> > -- 
> > 1.7.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] add dkms support
  2010-07-28 17:02   ` Sage Weil
@ 2010-07-28 17:46     ` Thomas Mueller
  2010-07-28 18:30       ` Sage Weil
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Mueller @ 2010-07-28 17:46 UTC (permalink / raw)
  To: ceph-devel

Am Wed, 28 Jul 2010 10:02:19 -0700 schrieb Sage Weil:

> BTW, the Debian kernel guys would rather include the ceph module in the
> main kernel package than include a dkms package directly in Debian. 
> That means maintaining a backport branch specifically for 2.6.32 (the
> squeeze kernel).
> 
> (We should still have this dkms package available on the ceph site, of
> course!)

would be cool if they included it in squeeze kernel. but i'm bit 
surprised. squeeze freeze is expected late august (http://
lists.debian.org/debian-devel-announce/2010/06/msg00002.html) and debian 
folks normaly don't bump versions and only do bugfixing after a release. 

so I would expect that squeeze has to include a stable ceph.ko and stable 
server side too. And as the freeze seems to be approaching fast this 
would be a tough schedule.

what leads me to my other question: when will ceph be considered 
"stable"? :)

- Thomas 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] add dkms support
  2010-07-28 17:46     ` Thomas Mueller
@ 2010-07-28 18:30       ` Sage Weil
  2010-07-29  6:01         ` Thomas Mueller
  0 siblings, 1 reply; 7+ messages in thread
From: Sage Weil @ 2010-07-28 18:30 UTC (permalink / raw)
  To: Thomas Mueller; +Cc: ceph-devel

On Wed, 28 Jul 2010, Thomas Mueller wrote:
> Am Wed, 28 Jul 2010 10:02:19 -0700 schrieb Sage Weil:
> 
> > BTW, the Debian kernel guys would rather include the ceph module in the
> > main kernel package than include a dkms package directly in Debian. 
> > That means maintaining a backport branch specifically for 2.6.32 (the
> > squeeze kernel).
> > 
> > (We should still have this dkms package available on the ceph site, of
> > course!)
> 
> would be cool if they included it in squeeze kernel. but i'm bit 
> surprised. squeeze freeze is expected late august (http://
> lists.debian.org/debian-devel-announce/2010/06/msg00002.html) and debian 
> folks normaly don't bump versions and only do bugfixing after a release. 
> 
> so I would expect that squeeze has to include a stable ceph.ko and stable 
> server side too. And as the freeze seems to be approaching fast this 
> would be a tough schedule.

I'm not sure what their criteria are there... the ceph-dkms ITP is 589562,

	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589562

> what leads me to my other question: when will ceph be considered 
> "stable"? :)

Soon?  :)  I'd be interested in hearing what you (or anyone else) expect 
from a "stable" v1.0 release.

See http://tracker.newdream.net/projects/ceph/roadmap.

sage

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] add dkms support
  2010-07-28 18:30       ` Sage Weil
@ 2010-07-29  6:01         ` Thomas Mueller
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Mueller @ 2010-07-29  6:01 UTC (permalink / raw)
  To: ceph-devel

Am Wed, 28 Jul 2010 11:30:02 -0700 schrieb Sage Weil:

> On Wed, 28 Jul 2010, Thomas Mueller wrote:
>> Am Wed, 28 Jul 2010 10:02:19 -0700 schrieb Sage Weil:
>> 
>> > BTW, the Debian kernel guys would rather include the ceph module in
>> > the main kernel package than include a dkms package directly in
>> > Debian. That means maintaining a backport branch specifically for
>> > 2.6.32 (the squeeze kernel).
>> > 
>> > (We should still have this dkms package available on the ceph site,
>> > of course!)
>> 
>> would be cool if they included it in squeeze kernel. but i'm bit
>> surprised. squeeze freeze is expected late august (http://
>> lists.debian.org/debian-devel-announce/2010/06/msg00002.html) and
>> debian folks normaly don't bump versions and only do bugfixing after a
>> release.
>> 
>> so I would expect that squeeze has to include a stable ceph.ko and
>> stable server side too. And as the freeze seems to be approaching fast
>> this would be a tough schedule.
> 
> I'm not sure what their criteria are there... the ceph-dkms ITP is
> 589562,
> 
> 	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589562

I could not find any policy manual about a debian stable series. 

if they do accept larger changes after a release it would be nice if they 
include it.

if they do not accept more than bugfixing I could imaging that the 
provided module may be sometime (think of squeeze-release+1year) 
incompatible/worthless with ceph server side?

pro ceph-dkms: if squeeze is released newer versions of ceph-dkms can be 
easyly provided by backports.org

as I see, server side is also on its way, cool!
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506040)

- Thomas


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] add dkms support
@ 2010-07-28 12:10 y
  0 siblings, 0 replies; 7+ messages in thread
From: y @ 2010-07-28 12:10 UTC (permalink / raw)
  To: ceph-devel; +Cc: Thomas Mueller

From: Thomas Mueller <thomas@chaschperli.ch>

hi

saw that now the cpeh-client-standalone contains a version - this is the dkms patch updated. 

only dkms part - debian package parts follow some time later.

- Thomas

---
 Makefile                   |    3 ++-
 dkms.conf                  |    7 +++++++
 dkms/add-to-dkms-and-build |   15 +++++++++++++++
 dkms/postremove.sh         |   34 ++++++++++++++++++++++++++++++++++
 dkms/prebuild.sh           |   32 ++++++++++++++++++++++++++++++++
 5 files changed, 90 insertions(+), 1 deletions(-)
 create mode 100644 dkms.conf
 create mode 100644 dkms/add-to-dkms-and-build
 create mode 100644 dkms/postremove.sh
 create mode 100644 dkms/prebuild.sh

diff --git a/Makefile b/Makefile
index 6a660e6..4b8f6e7 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,8 @@ else
 #Otherwise we were called directly from the command
 # line; invoke the kernel build system.
 
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+KERNELRELEASE ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
 PWD := $(shell pwd)
 
 default: all
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 0000000..bbf607c
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,7 @@
+PACKAGE_NAME="ceph"
+PACKAGE_VERSION="1.0"
+DEST_MODULE_LOCATION[0]="/updates/ceph"
+BUILT_MODULE_NAME[0]="ceph"
+AUTOINSTALL="yes"
+PRE_BUILD="dkms/prebuild.sh ${kernelver}"
+POST_REMOVE="dkms/postremove.sh ${kernelver}"
diff --git a/dkms/add-to-dkms-and-build b/dkms/add-to-dkms-and-build
new file mode 100644
index 0000000..ffea573
--- /dev/null
+++ b/dkms/add-to-dkms-and-build
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if ! [ -f ./upstream_version.h ]
+then
+	echo "Failure: ./upstream_version.h not found. Did you call this script from ceph-client root?"
+fi
+
+CEPH_VERSION=$(grep CEPH_VERSION upstream_version.h | egrep -o "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+[^\"]+")
+
+mkdir /usr/src/ceph-${CEPH_VERSION} || exit 1
+cp -r ./ /usr/src/ceph-${CEPH_VERSION}
+
+dkms add -m ceph -v ${CEPH_VERSION} &&
+dkms build -m ceph -v ${CEPH_VERSION} &&
+dkms install -m ceph -v ${CEPH_VERSION}
diff --git a/dkms/postremove.sh b/dkms/postremove.sh
new file mode 100644
index 0000000..8693fcf
--- /dev/null
+++ b/dkms/postremove.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+
+if [ "$1" = "" ]
+then
+        echo "Usage: $0 <kernelver>"
+        exit
+fi
+
+MODROOT="/lib/modules/$1"
+
+if ! [ -f /etc/debian_version ]
+then
+        echo "Info: runs only on Debian and derivates"
+        exit
+fi
+
+
+
+if [ -d "$MODROOT" ]
+then
+        if [ -f "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" ]
+        then
+                if  ! [ -f "$MODROOT/kernel/fs/ceph/ceph.ko" ]
+                then
+                        dpkg-divert --rename --remove "$MODROOT/kernel/fs/ceph/ceph.ko"
+                else
+                        echo "Warning: $MODROOT/kernel/fs/ceph/ceph.ko  and diverted $MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms exist both!"
+                fi
+        fi
+else
+        echo "Warning: $MODROOT is not a directory"
+fi
+
diff --git a/dkms/prebuild.sh b/dkms/prebuild.sh
new file mode 100644
index 0000000..1aee069
--- /dev/null
+++ b/dkms/prebuild.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+
+if [ "$1" = "" ]
+then
+	echo "Usage: $0 <kernelver>"
+	exit
+fi
+
+MODROOT="/lib/modules/$1"
+
+if ! [ -f /etc/debian_version ]
+then
+	echo "Info: runs only on Debian and derivates"
+	exit
+fi
+
+
+if [ -d "$MODROOT" ]
+then
+	if [ -f "$MODROOT/kernel/fs/ceph/ceph.ko" ] 
+	then
+		if  ! [ -f "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" ]
+		then
+			dpkg-divert --rename --package ceph-dkms --divert "$MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms" --add "$MODROOT/kernel/fs/ceph/ceph.ko"
+		else
+			echo "Warning: $MODROOT/kernel/fs/ceph/ceph.ko  and diverted $MODROOT/kernel/fs/ceph/ceph.ko.dpkg-divert-by-ceph-dkms exist both!"
+		fi
+	fi
+else 
+	echo "Warning: $MODROOT is not a directory"
+fi
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-29  6:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1280319036-17877-1-git-send-email-y>
2010-07-28 12:10 ` [PATCH 2/2] add comments y
2010-07-28 16:58 ` [PATCH 1/2] add dkms support Sage Weil
2010-07-28 17:02   ` Sage Weil
2010-07-28 17:46     ` Thomas Mueller
2010-07-28 18:30       ` Sage Weil
2010-07-29  6:01         ` Thomas Mueller
2010-07-28 12:10 y

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).