[oe-commits] : ivman: new recipe in oe

OE GIT Trial gittrial at amethyst.openembedded.net
Sun Oct 12 19:51:48 UTC 2008


Module: org.openembedded.dev.git
Branch: org.openembedded.dev
Commit: 4a74edb0f78b05beccb2a83c64033a2ecb02ff36
URL:    http://gitweb.openembedded.net/?p=org.openembedded.dev.git&a=commit;h=4a74edb0f78b05beccb2a83c64033a2ecb02ff36

Author:  <woglinde2 at openembedded.org>
Date:   Sat Oct 11 08:00:24 2008 +0000

ivman: new recipe in oe
* patch was provided by Kalev Lember
* closes bug 4600

---

 packages/ivman/files/ivman-0.6-hotpluggable.patch |   80 +++++++++++++++++++++
 packages/ivman/files/ivman-launch.patch           |   30 ++++++++
 packages/ivman/ivman_0.6.14.bb                    |   62 ++++++++++++++++
 3 files changed, 172 insertions(+), 0 deletions(-)

diff --git a/packages/ivman/.mtn2git_empty b/packages/ivman/.mtn2git_empty
new file mode 100644
index 0000000..e69de29
diff --git a/packages/ivman/files/.mtn2git_empty b/packages/ivman/files/.mtn2git_empty
new file mode 100644
index 0000000..e69de29
diff --git a/packages/ivman/files/ivman-0.6-hotpluggable.patch b/packages/ivman/files/ivman-0.6-hotpluggable.patch
new file mode 100644
index 0000000..1be1953
--- /dev/null
+++ b/packages/ivman/files/ivman-0.6-hotpluggable.patch
@@ -0,0 +1,80 @@
+http://bugs.gentoo.org/show_bug.cgi?id=169593
+  	 iulica at box.co.uk
+This patch tests also for a storage if it is hotpluggable and mounts it
+automatically. A reason of creating the patch can be found here:
+http://lists.freedesktop.org/archives/hal/2005-October/003441.html
+
+--- a/src/IvmConfig/IvmConfigCommon.c.old	2007-03-05 15:28:49.000000000 +0100
++++ b/src/IvmConfig/IvmConfigCommon.c		2007-03-05 15:34:36.000000000 +0100
+@@ -146,7 +146,9 @@
+                volume.policy.should_mount does not exist
+                AND { storage.policy.should_mount == TRUE on block.storage_device
+                      OR { storage.policy.should_mount does not exist on
+-                          block.storage_device AND storage.removable == TRUE on
++                          block.storage_device AND { storage.removable == TRUE 
++                                                     OR storage.hotpluggable == TRUE 
++                                                   } on
+                           block.storage_device
+                         }
+                    }
+@@ -216,14 +218,16 @@
+         {
+ 	    ivm_check_dbus_error(&dbus_error);
+             // OK, so no storage policy was specified anywhere.  Now we'll mount
+-            // if parent device is removable.
++            // if parent device is removable or hotpluggable.
+             if (
+-              !libhal_device_property_exists( hal_ctx, new_udi, "storage.removable", NULL ) ||
+-              !libhal_device_get_property_bool( hal_ctx, new_udi, "storage.removable", NULL )
++              (!libhal_device_property_exists( hal_ctx, new_udi, "storage.removable", NULL ) ||
++              !libhal_device_get_property_bool( hal_ctx, new_udi, "storage.removable", NULL )) &&
++              (!libhal_device_property_exists( hal_ctx, new_udi, "storage.hotpluggable", NULL ) ||
++              !libhal_device_get_property_bool( hal_ctx, new_udi, "storage.hotpluggable", NULL ))
+             ) {
+                 DEBUG(_("\
+ Device %s won't be mounted because no mount policy was specified on \
+-volume or storage device and storage device does not appear to be removable"), device
++volume or storage device and storage device does not appear to be removable or hotpluggable"), device
+                 );
+                 libhal_free_string( device );
+                 libhal_free_string( new_udi );
+http://bugs.gentoo.org/show_bug.cgi?id=169593
+  	 iulica at box.co.uk
+This patch tests also for a storage if it is hotpluggable and mounts it
+automatically. A reason of creating the patch can be found here:
+http://lists.freedesktop.org/archives/hal/2005-October/003441.html
+
+--- a/src/IvmConfig/IvmConfigCommon.c.old	2007-03-05 15:28:49.000000000 +0100
++++ b/src/IvmConfig/IvmConfigCommon.c		2007-03-05 15:34:36.000000000 +0100
+@@ -146,7 +146,9 @@
+                volume.policy.should_mount does not exist
+                AND { storage.policy.should_mount == TRUE on block.storage_device
+                      OR { storage.policy.should_mount does not exist on
+-                          block.storage_device AND storage.removable == TRUE on
++                          block.storage_device AND { storage.removable == TRUE 
++                                                     OR storage.hotpluggable == TRUE 
++                                                   } on
+                           block.storage_device
+                         }
+                    }
+@@ -216,14 +218,16 @@
+         {
+ 	    ivm_check_dbus_error(&dbus_error);
+             // OK, so no storage policy was specified anywhere.  Now we'll mount
+-            // if parent device is removable.
++            // if parent device is removable or hotpluggable.
+             if (
+-              !libhal_device_property_exists( hal_ctx, new_udi, "storage.removable", NULL ) ||
+-              !libhal_device_get_property_bool( hal_ctx, new_udi, "storage.removable", NULL )
++              (!libhal_device_property_exists( hal_ctx, new_udi, "storage.removable", NULL ) ||
++              !libhal_device_get_property_bool( hal_ctx, new_udi, "storage.removable", NULL )) &&
++              (!libhal_device_property_exists( hal_ctx, new_udi, "storage.hotpluggable", NULL ) ||
++              !libhal_device_get_property_bool( hal_ctx, new_udi, "storage.hotpluggable", NULL ))
+             ) {
+                 DEBUG(_("\
+ Device %s won't be mounted because no mount policy was specified on \
+-volume or storage device and storage device does not appear to be removable"), device
++volume or storage device and storage device does not appear to be removable or hotpluggable"), device
+                 );
+                 libhal_free_string( device );
+                 libhal_free_string( new_udi );
diff --git a/packages/ivman/files/ivman-launch.patch b/packages/ivman/files/ivman-launch.patch
new file mode 100644
index 0000000..7c3176a
--- /dev/null
+++ b/packages/ivman/files/ivman-launch.patch
@@ -0,0 +1,30 @@
+--- ivman-0.6.14/ivman-launch.orig	2008-09-29 11:58:49.000000000 +0300
++++ ivman-0.6.14/ivman-launch	2008-09-29 12:02:17.000000000 +0300
+@@ -1,11 +1,10 @@
+-#!/bin/bash
++#!/bin/sh
+ # This script was written by Daniele Favara <danjele at gmail.com>
+ # 
+ CMD=ivman
+ CONFDIR=  # the config dir | null
+ EXITWITH=
+ SESSION=
+-set -x
+ while [ ! -z "$1" ];do
+     case "$1" in
+       --help|-h)
+--- ivman-0.6.14/ivman-launch.orig	2008-09-29 11:58:49.000000000 +0300
++++ ivman-0.6.14/ivman-launch	2008-09-29 12:02:17.000000000 +0300
+@@ -1,11 +1,10 @@
+-#!/bin/bash
++#!/bin/sh
+ # This script was written by Daniele Favara <danjele at gmail.com>
+ # 
+ CMD=ivman
+ CONFDIR=  # the config dir | null
+ EXITWITH=
+ SESSION=
+-set -x
+ while [ ! -z "$1" ];do
+     case "$1" in
+       --help|-h)
diff --git a/packages/ivman/ivman_0.6.14.bb b/packages/ivman/ivman_0.6.14.bb
new file mode 100644
index 0000000..8ee4a02
--- /dev/null
+++ b/packages/ivman/ivman_0.6.14.bb
@@ -0,0 +1,62 @@
+DESCRIPTION = "Daemon to mount/unmount devices, based on info from HAL"
+HOMEPAGE = "http://ivman.sf.net"
+LICENSE = "GPLv2"
+PR = "r0"
+
+DEPENDS = "hal libxml2"
+RDEPENDS = "hal pmount-hal"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ivman/${P}.tar.bz2 \
+           file://ivman-0.6-hotpluggable.patch;patch=1 \
+           file://ivman-launch.patch;patch=1 "
+
+inherit autotools
+
+# Add user ivman into group plugdev
+pkg_postinst_${PN} () {
+        # can't do this offline
+        if [ "x$D" != "x" ]; then
+                exit 1
+        fi
+
+        grep "^ivman:" /etc/passwd > /dev/null || \
+             adduser --disabled-password --system --home /dev/null \
+                     --no-create-home --ingroup plugdev -s /bin/false \
+                     -g "IVMAN" ivman
+        /etc/init.d/populate-volatile.sh update
+}
+
+pkg_postrm_${PN} () {
+        deluser ivman || true
+}
+DESCRIPTION = "Daemon to mount/unmount devices, based on info from HAL"
+HOMEPAGE = "http://ivman.sf.net"
+LICENSE = "GPLv2"
+PR = "r0"
+
+DEPENDS = "hal libxml2"
+RDEPENDS = "hal pmount-hal"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ivman/${P}.tar.bz2 \
+           file://ivman-0.6-hotpluggable.patch;patch=1 \
+           file://ivman-launch.patch;patch=1 "
+
+inherit autotools
+
+# Add user ivman into group plugdev
+pkg_postinst_${PN} () {
+        # can't do this offline
+        if [ "x$D" != "x" ]; then
+                exit 1
+        fi
+
+        grep "^ivman:" /etc/passwd > /dev/null || \
+             adduser --disabled-password --system --home /dev/null \
+                     --no-create-home --ingroup plugdev -s /bin/false \
+                     -g "IVMAN" ivman
+        /etc/init.d/populate-volatile.sh update
+}
+
+pkg_postrm_${PN} () {
+        deluser ivman || true
+}





More information about the Openembedded-commits mailing list