drbd-module.patch
author Tomas Zeman <tzeman@volny.cz>
Thu, 05 Jun 2008 16:15:42 +0200
changeset 29 bb8dbd2d57f5
parent 21 8f7c8cb144bc
permissions -rw-r--r--
diet-qmail-autoresponder: 0.96.2 -> 0.97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
     1
drbd-module-0.7
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     2
diff --git a/source/custom/drbd-module/FrugalBuild b/source/custom/drbd-module/FrugalBuild
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     3
new file mode 100644
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
     4
index 0000000..49eaf89
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     5
--- /dev/null
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     6
+++ b/source/custom/drbd-module/FrugalBuild
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
     7
@@ -0,0 +1,36 @@
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     8
+# Maintainer: Tomas Zeman <tzeman@volny.cz>
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     9
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    10
+pkgorig=drbd
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    11
+pkgname=$pkgorig-module
12
f88bf9dd05ce drbd-module: downgrade 8.0 -> 0.7.25
Tomas Zeman <tzeman@volny.cz>
parents: 1
diff changeset
    12
+pkgver=0.7.25
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    13
+pkgrel=2
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    14
+pkgdesc="block device mirroring a whole block device via network; network raid-1 implementation"
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    15
+url="http://www.drbd.org"
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    16
+license="GPL"
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    17
+depends=(kernel-source gcc make "kernel=2.6.24")
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    18
+archs=(i686)
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    19
+install=drbd.install
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    20
+_F_scm_type="git"
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    21
+_F_scm_url="git://git.drbd.org/drbd-0.7.git"
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    22
+_F_scm_tag="fe0c05db16a4dbdc6cfcb20c68b2f61a7793df1a"
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    23
+Finclude scm
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    24
+
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    25
+#up2date="lynx -dump -nolist http://oss.linbit.com/drbd/|grep drbd-0.7|grep tar.gz|head -1|sed -e 's/^.*drbd-\(.*\)\.tar\.gz.*$/\1/'"
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    26
+#source=(http://oss.linbit.com/drbd/0.7/$pkgorig-$pkgver.tar.gz 'http://git.drbd.org/?p=drbd-0.7.git;a=commitdiff_plain;h=fe0c05db16a4dbdc6cfcb20c68b2f61a7793df1a')
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    27
+#sha1sums=('9f507ffd41306409357e1eb4e6f73e3671acad28')
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    28
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    29
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    30
+build() {
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    31
+	Funpack_scm
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    32
+	#Fcd $pkgorig-$pkgver
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    33
+	#mkdir -p $startdir/pkg/usr/src/$pkgname
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    34
+	#cp -aR drbd $startdir/pkg/usr/src/$pkgname
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    35
+	#cp -aR scripts $startdir/pkg/usr/src/$pkgname
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    36
+	Fcd || Fdie
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    37
+	cd drbd
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    38
+	make clean
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    39
+	make KDIR=/usr/src/linux-`uname -r` || Fdie
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    40
+	make install PREFIX=$startdir/pkg || Fdie
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    41
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    42
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    43
+# vim: ft=sh
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    44
diff --git a/source/custom/drbd-module/drbd.install b/source/custom/drbd-module/drbd.install
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    45
new file mode 100644
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    46
index 0000000..06437f2
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    47
--- /dev/null
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    48
+++ b/source/custom/drbd-module/drbd.install
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    49
@@ -0,0 +1,41 @@
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    50
+
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    51
+# This is a default template for a post-install scriptlet.  You can
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    52
+# remove any functions you don't need (and this header).
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    53
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    54
+# arg 1:  the new package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    55
+pre_install() {
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    56
+  /bin/true
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    57
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    58
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    59
+# arg 1:  the new package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    60
+post_install() {
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    61
+  post_upgrade $1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    62
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    63
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    64
+# arg 1:  the new package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    65
+# arg 2:  the old package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    66
+pre_upgrade() {
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    67
+  /bin/true
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    68
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    69
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    70
+# arg 1:  the new package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    71
+# arg 2:  the old package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    72
+post_upgrade() {
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    73
+  DRBD_OBJ=/lib/modules/`uname -r`/kernel/drivers/block/drbd.ko
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    74
+  /sbin/depmod -a || /sbin/depmod -e $DRBD_OBJ
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    75
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    76
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    77
+# arg 1:  the old package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    78
+pre_remove() {
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    79
+  /bin/true
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    80
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    81
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    82
+# arg 1:  the old package version
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    83
+post_remove() {
21
8f7c8cb144bc drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents: 12
diff changeset
    84
+  /sbin/depmod -a
1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    85
+}
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    86
+
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    87
+op=$1
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    88
+shift
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    89
+$op $*
32f160a66da4 Imported patches of my packages
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    90
+