aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2010-09-26 11:16:41 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2010-09-27 12:23:23 +0000
commit1ede63229bc0cd4ad08b39b6d9906abd0a7337f9 (patch)
tree4738d4ef9b0568fefd962ae2b242be00b26aae4f
parent9ec3b96eefd2b16ea74dd96eb0e21c607b409e84 (diff)
downloadaports-1ede63229bc0cd4ad08b39b6d9906abd0a7337f9.tar.bz2
aports-1ede63229bc0cd4ad08b39b6d9906abd0a7337f9.tar.xz
main/udisks: new apkbuild
(cherry picked from commit bcd4f6f505ca3c95fc7d3a41930623dd036c345a)
-rw-r--r--main/udisks/APKBUILD46
-rw-r--r--main/udisks/lvm.patch120
-rw-r--r--main/udisks/no-floppy.patch31
3 files changed, 197 insertions, 0 deletions
diff --git a/main/udisks/APKBUILD b/main/udisks/APKBUILD
new file mode 100644
index 0000000000..40dd1b60c5
--- /dev/null
+++ b/main/udisks/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Carlo Landmeter
+# Maintainer:
+pkgname=udisks
+pkgver=1.0.1
+pkgrel=0
+pkgdesc="Disk Management Service"
+url="http://www.freedesktop.org/wiki/Software/udisks"
+license="GPL"
+depends=""
+makedepends="glib-dev polkit-dev parted-dev udev-dev sg3_utils-dev
+ dbus-dev dbus-glib-dev lvm2-dev pkgconfig libatasmart-dev
+ intltool eggdbus-dev expat-dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://hal.freedesktop.org/releases/$pkgname-$pkgver.tar.gz
+ lvm.patch
+ no-floppy.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ patch -p1 -i "$srcdir"/lvm.patch || return 1
+ patch -p1 -i "$srcdir"/no-floppy.patch || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --libexecdir=/usr/lib/udisks \
+ --disable-static \
+ --disable-nls
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="3654d994eb43b80c8c2d04fe03da30c4 udisks-1.0.1.tar.gz
+d626d05508648cda8afdae71ee46e9e0 lvm.patch
+f5a22eca24ec82a87dfa2374e4524b09 no-floppy.patch"
diff --git a/main/udisks/lvm.patch b/main/udisks/lvm.patch
new file mode 100644
index 0000000000..52d417d756
--- /dev/null
+++ b/main/udisks/lvm.patch
@@ -0,0 +1,120 @@
+From 2b2fcf80841972b70ad695a5a1ed74487d4fd37a Mon Sep 17 00:00:00 2001
+From: David Zeuthen <davidz@redhat.com>
+Date: Wed, 19 May 2010 17:01:31 +0000
+Subject: Update to latest LVM2 API
+
+See
+
+ http://lists.freedesktop.org/archives/devkit-devel/2010-April/000783.html
+---
+diff --git a/configure.ac b/configure.ac
+index 469be5f..a9141bf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -170,7 +170,7 @@ AC_SUBST(DEVMAPPER_LIBS)
+ have_lvm2=no
+ AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--disable-lvm2], [disable LVM2 support]))
+ if test "x$enable_lvm2" != "xno"; then
+- PKG_CHECK_MODULES(LVM2, lvm2app >= 2.1,
++ PKG_CHECK_MODULES(LVM2, lvm2app >= 2.2,
+ [AC_DEFINE(HAVE_LVM2, 1, [Define if LVM2 is available]) have_lvm2=yes],
+ have_lvm2=no)
+ AC_SUBST(LVM2_CFLAGS)
+diff --git a/src/probers/udisks-lvm-pv-export.c b/src/probers/udisks-lvm-pv-export.c
+index 5675fb8..ee6d8ed 100644
+--- a/src/probers/udisks-lvm-pv-export.c
++++ b/src/probers/udisks-lvm-pv-export.c
+@@ -47,7 +47,7 @@ find_vg_for_pv_uuid (lvm_t lvm_ctx,
+ struct lvm_pv_list *pv_list;
+ dm_list_iterate_items (pv_list, pvs)
+ {
+- char *uuid;
++ const char *uuid;
+ pv_t pv = pv_list->pv;
+
+ uuid = lvm_pv_get_uuid (pv);
+@@ -58,10 +58,8 @@ find_vg_for_pv_uuid (lvm_t lvm_ctx,
+ if (out_pv != NULL)
+ *out_pv = pv;
+ ret = vg;
+- dm_free (uuid);
+ goto out;
+ }
+- dm_free (uuid);
+ }
+ }
+ }
+@@ -79,12 +77,12 @@ find_vg_for_pv_uuid (lvm_t lvm_ctx,
+ static void
+ print_vg (vg_t vg)
+ {
+- char *s;
++ const char *s;
+ struct dm_list *pvs;
+ struct dm_list *lvs;
+
+- s = lvm_vg_get_uuid (vg); g_print ("UDISKS_LVM2_PV_VG_UUID=%s\n", s); dm_free (s);
+- s = lvm_vg_get_name (vg); g_print ("UDISKS_LVM2_PV_VG_NAME=%s\n", s); dm_free (s);
++ s = lvm_vg_get_uuid (vg); g_print ("UDISKS_LVM2_PV_VG_UUID=%s\n", s);
++ s = lvm_vg_get_name (vg); g_print ("UDISKS_LVM2_PV_VG_NAME=%s\n", s);
+ g_print ("UDISKS_LVM2_PV_VG_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_size (vg));
+ g_print ("UDISKS_LVM2_PV_VG_FREE_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_free_size (vg));
+ g_print ("UDISKS_LVM2_PV_VG_EXTENT_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_extent_size (vg));
+@@ -117,17 +115,14 @@ print_vg (vg_t vg)
+ str = g_string_new (NULL);
+ dm_list_iterate_items (pv_list, pvs)
+ {
+- char *uuid;
++ const char *uuid;
+ guint64 size;
+ guint64 free_size;
+ pv_t pv = pv_list->pv;
+
+ uuid = lvm_pv_get_uuid (pv);
+ if (uuid != NULL)
+- {
+- g_string_append_printf (str, "uuid=%s", uuid);
+- dm_free (uuid);
+- }
++ g_string_append_printf (str, "uuid=%s", uuid);
+ size = lvm_pv_get_size (pv);
+ g_string_append_printf (str, ";size=%" G_GUINT64_FORMAT, size);
+ free_size = lvm_pv_get_free (pv);
+@@ -173,8 +168,8 @@ print_vg (vg_t vg)
+ str = g_string_new (NULL);
+ dm_list_iterate_items (lv_list, lvs)
+ {
+- char *uuid;
+- char *name;
++ const char *uuid;
++ const char *name;
+ gboolean is_active;
+ guint64 size;
+ lv_t lv = lv_list->lv;
+@@ -195,11 +190,6 @@ print_vg (vg_t vg)
+ g_string_append_printf (str, "active=%d", is_active);
+ g_string_append_c (str, ' ');
+ }
+-
+- if (uuid != NULL)
+- dm_free (uuid);
+- if (name != NULL)
+- dm_free (name);
+ }
+ g_print ("UDISKS_LVM2_PV_VG_LV_LIST=%s\n", str->str);
+ g_string_free (str, TRUE);
+@@ -212,9 +202,9 @@ print_vg (vg_t vg)
+ static void
+ print_pv (pv_t pv)
+ {
+- char *s;
++ const char *s;
+
+- s = lvm_pv_get_uuid (pv); g_print ("UDISKS_LVM2_PV_UUID=%s\n", s); dm_free (s);
++ s = lvm_pv_get_uuid (pv); g_print ("UDISKS_LVM2_PV_UUID=%s\n", s);
+ g_print ("UDISKS_LVM2_PV_NUM_MDA=%" G_GUINT64_FORMAT "\n", lvm_pv_get_mda_count (pv));
+
+ /* TODO: ask for more API in liblvm - pvdisplay(8) suggests more information
+--
+cgit v0.8.3-6-g21f6
+
diff --git a/main/udisks/no-floppy.patch b/main/udisks/no-floppy.patch
new file mode 100644
index 0000000000..3d01dac7ac
--- /dev/null
+++ b/main/udisks/no-floppy.patch
@@ -0,0 +1,31 @@
+From ca93d4e2d9e7f483b2fde1725da086e2cca44164 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed, 02 Jun 2010 13:56:07 +0000
+Subject: Fix long hangs on probing nonexistant floppy drives
+
+A lot of modern machines do not have a floppy drive any more, but still have a
+floppy controller somewhere (or at least the BIOS pretends to). Trying to
+open(/dev/fd0) on these machines causes long hangs, which lead to long desktop
+startup times.
+
+To fix this, avoid probing floppies for media in update_info().
+
+https://launchpad.net/bugs/539515
+---
+diff --git a/src/device.c b/src/device.c
+index 763385c..0e87f1d 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -4471,7 +4471,8 @@ update_info (Device *device)
+ {
+ media_available = FALSE;
+
+- if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM"))
++ if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM") &&
++ !g_udev_device_get_property_as_boolean (device->priv->d, "ID_DRIVE_FLOPPY"))
+ {
+ int fd;
+ fd = open (device->priv->device_file, O_RDONLY);
+--
+cgit v0.8.3-6-g21f6
+