From 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:20:04 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../udisks/udisks/add-systemd-support.patch | 112 +++++ .../udisks/udisks/optional-depends.patch | 484 +++++++++++++++++++++ meta-oe/recipes-support/udisks/udisks_1.0.4.bb | 39 ++ 3 files changed, 635 insertions(+) create mode 100644 meta-oe/recipes-support/udisks/udisks/add-systemd-support.patch create mode 100644 meta-oe/recipes-support/udisks/udisks/optional-depends.patch create mode 100644 meta-oe/recipes-support/udisks/udisks_1.0.4.bb (limited to 'meta-oe/recipes-support/udisks') diff --git a/meta-oe/recipes-support/udisks/udisks/add-systemd-support.patch b/meta-oe/recipes-support/udisks/udisks/add-systemd-support.patch new file mode 100644 index 0000000000..29df8a4da4 --- /dev/null +++ b/meta-oe/recipes-support/udisks/udisks/add-systemd-support.patch @@ -0,0 +1,112 @@ +From 7a485d491697906b445020dfcb37fe91806d7134 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 22 Jul 2010 02:20:22 +0200 +Subject: [PATCH] systemd: install systemd unit files +Upstream-Status: ? +Based on: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=29205 +--- + Makefile.am | 5 ++++- + configure.ac | 9 +++++++++ + data/.gitignore | 1 + + data/Makefile.am | 11 ++++++++++- + data/org.freedesktop.UDisks.service.in | 2 +- + data/udisks-daemon.service.in | 12 ++++++++++++ + 6 files changed, 37 insertions(+), 3 deletions(-) + create mode 100644 data/udisks-daemon.service.in + +diff --git a/Makefile.am b/Makefile.am +index 588f05d..c3aaeea 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -24,7 +24,10 @@ EXTRA_DIST = \ + ChangeLog + + # xsltproc barfs on 'make distcheck'; disable for now +-DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages --disable-gtk-doc ++DISTCHECK_CONFIGURE_FLAGS = \ ++ --disable-man-pages \ ++ --disable-gtk-doc \ ++ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + + clean-local : + rm -f *~ +diff --git a/configure.ac b/configure.ac +index a9141bf..39bbd7a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -232,6 +232,15 @@ AC_SUBST([GETTEXT_PACKAGE]) + AM_GLIB_GNU_GETTEXT + AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain]) + ++# systemd ++ ++AC_ARG_WITH([systemdsystemunitdir], ++ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), ++ [], ++ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) ++AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ++AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"]) ++ + AC_OUTPUT([ + Makefile + data/Makefile +diff --git a/data/Makefile.am b/data/Makefile.am +index ca6d8ac..bf5c1a7 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -35,6 +35,14 @@ avahiservicedir = $(sysconfdir)/avahi/services + avahiservice_DATA = udisks.service + endif # REMOTE_ACCESS_ENABLED + ++if HAVE_SYSTEMD ++systemdsystemunit_DATA = \ ++ udisks-daemon.service ++ ++udisks-daemon.service: udisks-daemon.service.in ++ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ ++endif ++ + EXTRA_DIST = \ + 80-udisks.rules \ + $(dbusif_DATA) \ +@@ -42,7 +50,8 @@ EXTRA_DIST = \ + $(dbusconf_in_files) \ + udisks.pc.in \ + udisks.service \ ++ udisks-daemon.service.in \ + $(NULL) + + clean-local : +- rm -f *~ $(service_DATA) $(dbusconf_DATA) ++ rm -f *~ $(service_DATA) $(dbusconf_DATA) udisks-daemon.service +diff --git a/data/org.freedesktop.UDisks.service.in b/data/org.freedesktop.UDisks.service.in +index b3606a6..6ba2cd0 100644 +--- a/data/org.freedesktop.UDisks.service.in ++++ b/data/org.freedesktop.UDisks.service.in +@@ -2,4 +2,4 @@ + Name=org.freedesktop.UDisks + Exec=@libexecdir@/udisks-daemon + User=root +- ++SystemdService=udisks-daemon.service +diff --git a/data/udisks-daemon.service.in b/data/udisks-daemon.service.in +new file mode 100644 +index 0000000..78379b2 +--- /dev/null ++++ b/data/udisks-daemon.service.in +@@ -0,0 +1,12 @@ ++[Unit] ++Description=Disk Manager ++After=syslog.target ++ ++[Service] ++Type=dbus ++BusName=org.freedesktop.UDisks ++ExecStart=@libexecdir@/udisks-daemon ++StandardOutput=syslog ++ ++[Install] ++WantedBy=graphical.target +-- +1.7.0.1 + diff --git a/meta-oe/recipes-support/udisks/udisks/optional-depends.patch b/meta-oe/recipes-support/udisks/udisks/optional-depends.patch new file mode 100644 index 0000000000..6131701928 --- /dev/null +++ b/meta-oe/recipes-support/udisks/udisks/optional-depends.patch @@ -0,0 +1,484 @@ +From 1b70b7a798eeeec554ab5aa9fcfff96a22e91774 Mon Sep 17 00:00:00 2001 +From: Gustavo Sverzut Barbieri +Date: Thu, 26 May 2011 17:30:04 -0300 +Subject: [PATCH] Allow disabling atasmart, lvm2 and devicemapper support. + +https://bugs.freedesktop.org/show_bug.cgi?id=37647 + +diff --git a/configure.ac b/configure.ac +index 62cc35d..b664135 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -155,13 +155,33 @@ PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.97]) + AC_SUBST(POLKIT_GOBJECT_1_CFLAGS) + AC_SUBST(POLKIT_GOBJECT_1_LIBS) + +-PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8]) +-AC_SUBST(LIBPARTED_CFLAGS) +-AC_SUBST(LIBPARTED_LIBS) +- +-PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02]) +-AC_SUBST(DEVMAPPER_CFLAGS) +-AC_SUBST(DEVMAPPER_LIBS) ++have_parted=no ++AC_ARG_ENABLE(parted, AS_HELP_STRING([--disable-parted], [disable disk partitioning])) ++if test "x$enable_parted" != "xno"; then ++ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8], ++ [AC_DEFINE(USE_PARTED, 1, [Define if parted should be used]) have_parted=yes], ++ have_parted=no) ++ AC_SUBST(LIBPARTED_CFLAGS) ++ AC_SUBST(LIBPARTED_LIBS) ++ if test "x$have_parted" = xno -a "x$enable_parted" = xyes; then ++ AC_MSG_ERROR([parted support requested but libraries not found]) ++ fi ++fi ++AM_CONDITIONAL(HAVE_PARTED, [test "$have_parted" = "yes"]) ++ ++have_devmapper=no ++AC_ARG_ENABLE(devmapper, AS_HELP_STRING([--disable-devmapper], [disable device mapper support])) ++if test "x$enable_devmapper" != "xno"; then ++ PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02], ++ [AC_DEFINE(HAVE_DEVMAPPER, 1, [Define if device mapper is available]) have_devmapper=yes], ++ have_devmapper=no) ++ AC_SUBST(DEVMAPPER_CFLAGS) ++ AC_SUBST(DEVMAPPER_LIBS) ++ if test "x$have_devmapper" = xno -a "x$enable_devmapper" = xyes; then ++ AC_MSG_ERROR([devmapper support requested but libraries not found]) ++ fi ++fi ++AM_CONDITIONAL(HAVE_DEVMAPPER, [test "$have_devmapper" = "yes"]) + + have_lvm2=no + AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--disable-lvm2], [disable LVM2 support])) +@@ -185,9 +205,19 @@ if test "x$enable_dmmp" != "xno"; then + fi + AM_CONDITIONAL(HAVE_DMMP, [test "$have_dmmp" = "yes"]) + +-PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14]) +-AC_SUBST(LIBATASMART_CFLAGS) +-AC_SUBST(LIBATASMART_LIBS) ++have_libatasmart=no ++AC_ARG_ENABLE(libatasmart, AS_HELP_STRING([--disable-libatasmart], [disable libatasmart support])) ++if test "x$enable_libatasmart" != "xno"; then ++ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14], ++ [AC_DEFINE(HAVE_LIBATASMART, 1, [Define if libatasmart is available]) have_libatasmart=yes], ++ have_libatasmart=no) ++ AC_SUBST(LIBATASMART_CFLAGS) ++ AC_SUBST(LIBATASMART_LIBS) ++ if test "x$have_libatasmart" = xno -a "x$enable_libatasmart" = xyes; then ++ AC_MSG_ERROR([libatasmart support requested but libraries not found]) ++ fi ++fi ++AM_CONDITIONAL(HAVE_LIBATASMART, [test "$have_libatasmart" = "yes"]) + + PKG_CHECK_MODULES(LIBUDEV, [libudev >= 143]) + AC_SUBST(LIBUDEV_CFLAGS) +@@ -267,9 +297,12 @@ echo " + cppflags: ${CPPFLAGS} + xsltproc: ${XSLTPROC} + ++ Parted support: ${have_parted} ++ Device Mapper support: ${have_devmapper} + LVM2 support: ${have_lvm2} + dm-multipath: ${have_dmmp} + Remote Access: ${remote_access} ++ libatasmart support: ${have_libatasmart} + + Maintainer mode: ${USE_MAINTAINER_MODE} + Profiling: ${enable_profiling} +diff --git a/src/adapter-private.h b/src/adapter-private.h +index 3409e21..ef584e3 100644 +--- a/src/adapter-private.h ++++ b/src/adapter-private.h +@@ -23,7 +23,6 @@ + + #include + #include +-#include + + #include "types.h" + +diff --git a/src/adapter.c b/src/adapter.c +index b85a0ef..802420b 100644 +--- a/src/adapter.c ++++ b/src/adapter.c +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + + #include "daemon.h" + #include "adapter.h" +diff --git a/src/daemon.c b/src/daemon.c +index 6072502..d043cb0 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -1745,6 +1745,7 @@ mdstat_changed_event (GIOChannel *channel, + return TRUE; + } + ++#ifdef HAVE_LIBATASMART + static gboolean + refresh_ata_smart_data (Daemon *daemon) + { +@@ -1773,6 +1774,7 @@ refresh_ata_smart_data (Daemon *daemon) + + return FALSE; + } ++#endif + + static gboolean + register_disks_daemon (Daemon *daemon) +@@ -1984,12 +1986,14 @@ daemon_new (void) + mount_file_clean_stale (l); + g_list_free (l); + ++#ifdef HAVE_LIBATASMART + /* set up timer for refreshing ATA SMART data - we don't want to refresh immediately because + * when adding a device we also do this... + */ + daemon->priv->ata_smart_refresh_timer_id = g_timeout_add_seconds (ATA_SMART_REFRESH_INTERVAL_SECONDS, + (GSourceFunc) refresh_ata_smart_data, + daemon); ++#endif + + PROFILE ("daemon_new(): end"); + return daemon; +diff --git a/src/device-private.c b/src/device-private.c +index 22a0d35..fb96525 100644 +--- a/src/device-private.c ++++ b/src/device-private.c +@@ -1378,7 +1378,7 @@ device_set_drive_ata_smart_time_collected (Device *device, + + void + device_set_drive_ata_smart_status (Device *device, +- SkSmartOverall value) ++ guint value) + { + if (G_UNLIKELY (device->priv->drive_ata_smart_status != value)) + { +diff --git a/src/device-private.h b/src/device-private.h +index a6db7f2..71473a6 100644 +--- a/src/device-private.h ++++ b/src/device-private.h +@@ -23,7 +23,6 @@ + + #include + #include +-#include + + #include "types.h" + +@@ -224,7 +223,7 @@ struct DevicePrivate + + gboolean drive_ata_smart_is_available; + guint64 drive_ata_smart_time_collected; +- SkSmartOverall drive_ata_smart_status; ++ guint drive_ata_smart_status; + void *drive_ata_smart_blob; + gsize drive_ata_smart_blob_size; + +@@ -391,7 +390,7 @@ void device_set_holders_objpath (Device *device, GStrv value); + + void device_set_drive_ata_smart_is_available (Device *device, gboolean value); + void device_set_drive_ata_smart_time_collected (Device *device, guint64 value); +-void device_set_drive_ata_smart_status (Device *device, SkSmartOverall value); ++void device_set_drive_ata_smart_status (Device *device, guint value); + void device_set_drive_ata_smart_blob_steal (Device *device, gchar *blob, gsize blob_size); + + G_END_DECLS +diff --git a/src/device.c b/src/device.c +index 6a34940..7a5a4a9 100644 +--- a/src/device.c ++++ b/src/device.c +@@ -50,7 +50,9 @@ + #include + #include + #include ++#ifdef HAVE_LIBATASMART + #include ++#endif + + #include "daemon.h" + #include "device.h" +@@ -659,10 +661,14 @@ get_property (GObject *object, + case PROP_DRIVE_ATA_SMART_STATUS: + { + const gchar *status; +- if (device->priv->drive_ata_smart_status == (SkSmartOverall) - 1) ++#ifdef HAVE_LIBATASMART ++ if (device->priv->drive_ata_smart_status == (guint) - 1) + status = ""; + else + status = sk_smart_overall_to_string (device->priv->drive_ata_smart_status); ++#else ++ status = ""; ++#endif + g_value_set_string (value, status); + } + break; +@@ -5114,6 +5120,7 @@ device_new (Daemon *daemon, + goto out; + } + ++#ifdef HAVE_LIBATASMART + /* if just added, update the smart data if applicable */ + if (device->priv->drive_ata_smart_is_available) + { +@@ -5121,6 +5128,7 @@ device_new (Daemon *daemon, + gchar *ata_smart_refresh_data_options[] = { NULL }; + device_drive_ata_smart_refresh_data (device, ata_smart_refresh_data_options, NULL); + } ++#endif + + PROFILE ("device_new(native_path=%s): end", native_path); + out: +@@ -9794,16 +9802,18 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context, + const char *stdout, + gpointer user_data) + { ++#ifdef HAVE_LIBATASMART + gint rc; +- SkDisk *d; ++ SkDisk *d = NULL; ++ SkSmartOverall overall; + gchar *blob; + gsize blob_size; + time_t time_collected; +- SkSmartOverall overall; ++#endif + + PROFILE ("drive_ata_smart_refresh_data_completed_cb(device=%s) start", device->priv->native_path); + +- d = NULL; ++#ifdef HAVE_LIBATASMART + blob = NULL; + + if (job_was_cancelled || stdout == NULL) +@@ -9907,6 +9917,11 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context, + g_free (blob); + if (d != NULL) + sk_disk_free (d); ++ ++#else ++ throw_error (context, ERROR_FAILED, "libatasmart support disabled"); ++#endif ++ + PROFILE ("drive_ata_smart_refresh_data_completed_cb(device=%s) end", device->priv->native_path); + } + +diff --git a/src/expander-private.h b/src/expander-private.h +index ef4f440..98a8300 100644 +--- a/src/expander-private.h ++++ b/src/expander-private.h +@@ -23,7 +23,6 @@ + + #include + #include +-#include + + #include "types.h" + +diff --git a/src/expander.c b/src/expander.c +index 734ec0a..e799f13 100644 +--- a/src/expander.c ++++ b/src/expander.c +@@ -34,7 +34,6 @@ + #include + #include + #include +-#include + #include + + #include "daemon.h" +diff --git a/src/helpers/Makefile.am b/src/helpers/Makefile.am +index 4b863c0..d3ec4e9 100644 +--- a/src/helpers/Makefile.am ++++ b/src/helpers/Makefile.am +@@ -19,15 +19,9 @@ INCLUDES = \ + + libexec_PROGRAMS = \ + udisks-helper-mkfs \ +- udisks-helper-delete-partition \ +- udisks-helper-create-partition \ +- udisks-helper-modify-partition \ +- udisks-helper-create-partition-table \ + udisks-helper-change-filesystem-label \ + udisks-helper-linux-md-remove-component \ + udisks-helper-fstab-mounter \ +- udisks-helper-ata-smart-collect \ +- udisks-helper-ata-smart-selftest \ + udisks-helper-drive-detach \ + udisks-helper-drive-poll \ + udisks-helper-linux-md-check \ +@@ -48,6 +42,13 @@ udisks_helper_mkfs_SOURCES = job-shared.h job-mkfs.c + udisks_helper_mkfs_CPPFLAGS = $(AM_CPPFLAGS) + udisks_helper_mkfs_LDADD = $(GLIB_LIBS) + ++if HAVE_PARTED ++libexec_PROGRAMS += \ ++ udisks-helper-delete-partition \ ++ udisks-helper-create-partition \ ++ udisks-helper-modify-partition \ ++ udisks-helper-create-partition-table ++ + udisks_helper_delete_partition_SOURCES = job-shared.h job-delete-partition.c + udisks_helper_delete_partition_CPPFLAGS = $(AM_CPPFLAGS) + udisks_helper_delete_partition_LDADD = $(GLIB_LIBS) libpartutil.la +@@ -63,11 +64,17 @@ udisks_helper_modify_partition_LDADD = $(GLIB_LIBS) libpartutil.la + udisks_helper_create_partition_table_SOURCES = job-shared.h job-create-partition-table.c + udisks_helper_create_partition_table_CPPFLAGS = $(AM_CPPFLAGS) + udisks_helper_create_partition_table_LDADD = $(GLIB_LIBS) libpartutil.la ++endif + + udisks_helper_change_filesystem_label_SOURCES = job-shared.h job-change-filesystem-label.c + udisks_helper_change_filesystem_label_CPPFLAGS = $(AM_CPPFLAGS) + udisks_helper_change_filesystem_label_LDADD = $(GLIB_LIBS) + ++if HAVE_LIBATASMART ++libexec_PROGRAMS += \ ++ udisks-helper-ata-smart-collect \ ++ udisks-helper-ata-smart-selftest ++ + udisks_helper_ata_smart_selftest_SOURCES = job-shared.h job-ata-smart-selftest.c + udisks_helper_ata_smart_selftest_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS) + udisks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) +@@ -75,6 +82,7 @@ udisks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) + udisks_helper_ata_smart_collect_SOURCES = job-ata-smart-collect.c + udisks_helper_ata_smart_collect_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS) + udisks_helper_ata_smart_collect_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS) ++endif + + udisks_helper_linux_md_remove_component_SOURCES = job-shared.h job-linux-md-remove-component.c + udisks_helper_linux_md_remove_component_CPPFLAGS = $(AM_CPPFLAGS) +diff --git a/src/helpers/partutil.c b/src/helpers/partutil.c +index 72a8fe3..8893a39 100644 +--- a/src/helpers/partutil.c ++++ b/src/helpers/partutil.c +@@ -62,7 +62,6 @@ DEBUG (const gchar *format, + # include + #endif + +-#define USE_PARTED + #ifdef USE_PARTED + #include + #endif +@@ -928,6 +927,7 @@ part_table_parse_apple (int fd, + return p; + } + ++#ifdef USE_PARTED + static PartitionTable * + part_table_load_from_disk_from_file (char *device_file) + { +@@ -948,6 +948,7 @@ part_table_load_from_disk_from_file (char *device_file) + out: + return ret; + } ++#endif + + PartitionTable * + part_table_load_from_disk (int fd) +diff --git a/src/port-private.h b/src/port-private.h +index cc48376..a91532f 100644 +--- a/src/port-private.h ++++ b/src/port-private.h +@@ -23,7 +23,6 @@ + + #include + #include +-#include + + #include "types.h" + +diff --git a/src/probers/Makefile.am b/src/probers/Makefile.am +index 06bb566..01c693b 100644 +--- a/src/probers/Makefile.am ++++ b/src/probers/Makefile.am +@@ -22,8 +22,6 @@ INCLUDES = \ + + udevhelperdir = $(slashlibdir)/udev + udevhelper_PROGRAMS = udisks-part-id \ +- udisks-dm-export \ +- udisks-probe-ata-smart \ + udisks-probe-sas-expander \ + $(NULL) + +@@ -35,17 +33,23 @@ udisks_part_id_SOURCES = part-id.c + udisks_part_id_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUDEV_CFLAGS) + udisks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) $(top_builddir)/src/helpers/libpartutil.la + ++if HAVE_DEVMAPPER ++udevhelper_PROGRAMS += udisks-dm-export + udisks_dm_export_SOURCES = udisks-dm-export.c + udisks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) $(GLIB_CFLAGS) + udisks_dm_export_LDADD = $(DEVMAPPER_LIBS) $(GLIB_LIBS) ++endif + + udisks_lvm_pv_export_SOURCES = udisks-lvm-pv-export.c + udisks_lvm_pv_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) $(LVM2_CFLAGS) $(GLIB_CFLAGS) + udisks_lvm_pv_export_LDADD = $(DEVMAPPER_LIBS) $(LVM2_LIBS) $(GLIB_LIBS) + ++if HAVE_LIBATASMART ++udevhelper_PROGRAMS += udisks-probe-ata-smart + udisks_probe_ata_smart_SOURCES = udisks-probe-ata-smart.c + udisks_probe_ata_smart_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) + udisks_probe_ata_smart_LDADD = $(LIBATASMART_LIBS) ++endif + + udisks_probe_sas_expander_SOURCES = udisks-probe-sas-expander.c + udisks_probe_sas_expander_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) +diff --git a/tools/udisks.c b/tools/udisks.c +index 6fbd6a6..e0c4fbb 100644 +--- a/tools/udisks.c ++++ b/tools/udisks.c +@@ -43,7 +43,9 @@ + #include + #include + ++#ifdef HAVE_LIBATASMART + #include ++#endif + + #include "udisks-daemon-glue.h" + #include "udisks-device-glue.h" +@@ -979,6 +981,7 @@ end_highlight (void) + g_print ("\x1B[0m"); + } + ++#ifdef HAVE_LIBATASMART + static const gchar * + ata_smart_status_to_desc (const gchar *status, + gboolean *out_highlight) +@@ -1159,6 +1162,7 @@ print_ata_smart_attr (SkDisk *d, + g_free (threshold_str); + g_free (pretty); + } ++#endif + + static void + do_show_info (const char *object_path) +@@ -1440,7 +1444,7 @@ do_show_info (const char *object_path) + g_print (" if speed: %" G_GINT64_FORMAT " bits/s\n", props->drive_connection_speed); + + /* ------------------------------------------------------------------------------------------------- */ +- ++#ifdef HAVE_LIBATASMART + if (!props->drive_ata_smart_is_available) + { + g_print (" ATA SMART: not available\n"); +@@ -1493,7 +1497,9 @@ do_show_info (const char *object_path) + } + + } +- ++#else ++ g_print (" ATA SMART: not supported\n"); ++#endif + /* ------------------------------------------------------------------------------------------------- */ + + } +-- +1.7.5.rc3 + diff --git a/meta-oe/recipes-support/udisks/udisks_1.0.4.bb b/meta-oe/recipes-support/udisks/udisks_1.0.4.bb new file mode 100644 index 0000000000..32f0c110f5 --- /dev/null +++ b/meta-oe/recipes-support/udisks/udisks_1.0.4.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "A storage daemon that implements well-defined D-Bus interfaces that can be used to query and manipulate storage devices." +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=73d83aebe7e4b62346afde80e0e94273" + +DEPENDS = "libatasmart sg3-utils polkit udev dbus-glib glib-2.0" +# optional dependencies: device-mapper parted + +DEPENDS += "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" + +SRC_URI = "http://hal.freedesktop.org/releases/${BPN}-${PV}.tar.gz;name=${BPN} \ + file://optional-depends.patch" + +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'systemd', 'file://add-systemd-support.patch', '', d)}" + +SRC_URI[udisks.md5sum] = "86c63b2b5484f2060499a052b5b6256b" +SRC_URI[udisks.sha256sum] = "854b89368733b9c3a577101b761ad5397ae75a05110c8698ac5b29de9a8bf8f5" + +PR = "r9" + +inherit autotools systemd + +PACKAGECONFIG ??= "" +PACKAGECONFIG[parted] = "--enable-parted,--disable-parted,parted" + +EXTRA_OECONF = "--disable-man-pages" + +FILES_${PN} += "${libdir}/polkit-1/extensions/*.so \ + ${datadir}/dbus-1/ \ + ${datadir}/polkit-1 \ + ${base_libdir}/udev/* \ +" + +FILES_${PN}-dbg += "${base_libdir}/udev/.debug" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "udisks-daemon.service" +SYSTEMD_AUTO_ENABLE = "disable" -- cgit v1.2.3-54-g00ecf