summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/udisks
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/udisks
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/udisks')
-rw-r--r--meta-oe/recipes-support/udisks/udisks/add-systemd-support.patch112
-rw-r--r--meta-oe/recipes-support/udisks/udisks/optional-depends.patch484
-rw-r--r--meta-oe/recipes-support/udisks/udisks_1.0.4.bb39
3 files changed, 635 insertions, 0 deletions
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 000000000..29df8a4da
--- /dev/null
+++ b/meta-oe/recipes-support/udisks/udisks/add-systemd-support.patch
@@ -0,0 +1,112 @@
1From 7a485d491697906b445020dfcb37fe91806d7134 Mon Sep 17 00:00:00 2001
2From: Lennart Poettering <lennart@poettering.net>
3Date: Thu, 22 Jul 2010 02:20:22 +0200
4Subject: [PATCH] systemd: install systemd unit files
5Upstream-Status: ?
6Based on: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=29205
7---
8 Makefile.am | 5 ++++-
9 configure.ac | 9 +++++++++
10 data/.gitignore | 1 +
11 data/Makefile.am | 11 ++++++++++-
12 data/org.freedesktop.UDisks.service.in | 2 +-
13 data/udisks-daemon.service.in | 12 ++++++++++++
14 6 files changed, 37 insertions(+), 3 deletions(-)
15 create mode 100644 data/udisks-daemon.service.in
16
17diff --git a/Makefile.am b/Makefile.am
18index 588f05d..c3aaeea 100644
19--- a/Makefile.am
20+++ b/Makefile.am
21@@ -24,7 +24,10 @@ EXTRA_DIST = \
22 ChangeLog
23
24 # xsltproc barfs on 'make distcheck'; disable for now
25-DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages --disable-gtk-doc
26+DISTCHECK_CONFIGURE_FLAGS = \
27+ --disable-man-pages \
28+ --disable-gtk-doc \
29+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
30
31 clean-local :
32 rm -f *~
33diff --git a/configure.ac b/configure.ac
34index a9141bf..39bbd7a 100644
35--- a/configure.ac
36+++ b/configure.ac
37@@ -232,6 +232,15 @@ AC_SUBST([GETTEXT_PACKAGE])
38 AM_GLIB_GNU_GETTEXT
39 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])
40
41+# systemd
42+
43+AC_ARG_WITH([systemdsystemunitdir],
44+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
45+ [],
46+ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
47+AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
48+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
49+
50 AC_OUTPUT([
51 Makefile
52 data/Makefile
53diff --git a/data/Makefile.am b/data/Makefile.am
54index ca6d8ac..bf5c1a7 100644
55--- a/data/Makefile.am
56+++ b/data/Makefile.am
57@@ -35,6 +35,14 @@ avahiservicedir = $(sysconfdir)/avahi/services
58 avahiservice_DATA = udisks.service
59 endif # REMOTE_ACCESS_ENABLED
60
61+if HAVE_SYSTEMD
62+systemdsystemunit_DATA = \
63+ udisks-daemon.service
64+
65+udisks-daemon.service: udisks-daemon.service.in
66+ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
67+endif
68+
69 EXTRA_DIST = \
70 80-udisks.rules \
71 $(dbusif_DATA) \
72@@ -42,7 +50,8 @@ EXTRA_DIST = \
73 $(dbusconf_in_files) \
74 udisks.pc.in \
75 udisks.service \
76+ udisks-daemon.service.in \
77 $(NULL)
78
79 clean-local :
80- rm -f *~ $(service_DATA) $(dbusconf_DATA)
81+ rm -f *~ $(service_DATA) $(dbusconf_DATA) udisks-daemon.service
82diff --git a/data/org.freedesktop.UDisks.service.in b/data/org.freedesktop.UDisks.service.in
83index b3606a6..6ba2cd0 100644
84--- a/data/org.freedesktop.UDisks.service.in
85+++ b/data/org.freedesktop.UDisks.service.in
86@@ -2,4 +2,4 @@
87 Name=org.freedesktop.UDisks
88 Exec=@libexecdir@/udisks-daemon
89 User=root
90-
91+SystemdService=udisks-daemon.service
92diff --git a/data/udisks-daemon.service.in b/data/udisks-daemon.service.in
93new file mode 100644
94index 0000000..78379b2
95--- /dev/null
96+++ b/data/udisks-daemon.service.in
97@@ -0,0 +1,12 @@
98+[Unit]
99+Description=Disk Manager
100+After=syslog.target
101+
102+[Service]
103+Type=dbus
104+BusName=org.freedesktop.UDisks
105+ExecStart=@libexecdir@/udisks-daemon
106+StandardOutput=syslog
107+
108+[Install]
109+WantedBy=graphical.target
110--
1111.7.0.1
112
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 000000000..613170192
--- /dev/null
+++ b/meta-oe/recipes-support/udisks/udisks/optional-depends.patch
@@ -0,0 +1,484 @@
1From 1b70b7a798eeeec554ab5aa9fcfff96a22e91774 Mon Sep 17 00:00:00 2001
2From: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
3Date: Thu, 26 May 2011 17:30:04 -0300
4Subject: [PATCH] Allow disabling atasmart, lvm2 and devicemapper support.
5
6https://bugs.freedesktop.org/show_bug.cgi?id=37647
7
8diff --git a/configure.ac b/configure.ac
9index 62cc35d..b664135 100644
10--- a/configure.ac
11+++ b/configure.ac
12@@ -155,13 +155,33 @@ PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.97])
13 AC_SUBST(POLKIT_GOBJECT_1_CFLAGS)
14 AC_SUBST(POLKIT_GOBJECT_1_LIBS)
15
16-PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8])
17-AC_SUBST(LIBPARTED_CFLAGS)
18-AC_SUBST(LIBPARTED_LIBS)
19-
20-PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02])
21-AC_SUBST(DEVMAPPER_CFLAGS)
22-AC_SUBST(DEVMAPPER_LIBS)
23+have_parted=no
24+AC_ARG_ENABLE(parted, AS_HELP_STRING([--disable-parted], [disable disk partitioning]))
25+if test "x$enable_parted" != "xno"; then
26+ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8],
27+ [AC_DEFINE(USE_PARTED, 1, [Define if parted should be used]) have_parted=yes],
28+ have_parted=no)
29+ AC_SUBST(LIBPARTED_CFLAGS)
30+ AC_SUBST(LIBPARTED_LIBS)
31+ if test "x$have_parted" = xno -a "x$enable_parted" = xyes; then
32+ AC_MSG_ERROR([parted support requested but libraries not found])
33+ fi
34+fi
35+AM_CONDITIONAL(HAVE_PARTED, [test "$have_parted" = "yes"])
36+
37+have_devmapper=no
38+AC_ARG_ENABLE(devmapper, AS_HELP_STRING([--disable-devmapper], [disable device mapper support]))
39+if test "x$enable_devmapper" != "xno"; then
40+ PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02],
41+ [AC_DEFINE(HAVE_DEVMAPPER, 1, [Define if device mapper is available]) have_devmapper=yes],
42+ have_devmapper=no)
43+ AC_SUBST(DEVMAPPER_CFLAGS)
44+ AC_SUBST(DEVMAPPER_LIBS)
45+ if test "x$have_devmapper" = xno -a "x$enable_devmapper" = xyes; then
46+ AC_MSG_ERROR([devmapper support requested but libraries not found])
47+ fi
48+fi
49+AM_CONDITIONAL(HAVE_DEVMAPPER, [test "$have_devmapper" = "yes"])
50
51 have_lvm2=no
52 AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--disable-lvm2], [disable LVM2 support]))
53@@ -185,9 +205,19 @@ if test "x$enable_dmmp" != "xno"; then
54 fi
55 AM_CONDITIONAL(HAVE_DMMP, [test "$have_dmmp" = "yes"])
56
57-PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14])
58-AC_SUBST(LIBATASMART_CFLAGS)
59-AC_SUBST(LIBATASMART_LIBS)
60+have_libatasmart=no
61+AC_ARG_ENABLE(libatasmart, AS_HELP_STRING([--disable-libatasmart], [disable libatasmart support]))
62+if test "x$enable_libatasmart" != "xno"; then
63+ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14],
64+ [AC_DEFINE(HAVE_LIBATASMART, 1, [Define if libatasmart is available]) have_libatasmart=yes],
65+ have_libatasmart=no)
66+ AC_SUBST(LIBATASMART_CFLAGS)
67+ AC_SUBST(LIBATASMART_LIBS)
68+ if test "x$have_libatasmart" = xno -a "x$enable_libatasmart" = xyes; then
69+ AC_MSG_ERROR([libatasmart support requested but libraries not found])
70+ fi
71+fi
72+AM_CONDITIONAL(HAVE_LIBATASMART, [test "$have_libatasmart" = "yes"])
73
74 PKG_CHECK_MODULES(LIBUDEV, [libudev >= 143])
75 AC_SUBST(LIBUDEV_CFLAGS)
76@@ -267,9 +297,12 @@ echo "
77 cppflags: ${CPPFLAGS}
78 xsltproc: ${XSLTPROC}
79
80+ Parted support: ${have_parted}
81+ Device Mapper support: ${have_devmapper}
82 LVM2 support: ${have_lvm2}
83 dm-multipath: ${have_dmmp}
84 Remote Access: ${remote_access}
85+ libatasmart support: ${have_libatasmart}
86
87 Maintainer mode: ${USE_MAINTAINER_MODE}
88 Profiling: ${enable_profiling}
89diff --git a/src/adapter-private.h b/src/adapter-private.h
90index 3409e21..ef584e3 100644
91--- a/src/adapter-private.h
92+++ b/src/adapter-private.h
93@@ -23,7 +23,6 @@
94
95 #include <dbus/dbus-glib.h>
96 #include <gudev/gudev.h>
97-#include <atasmart.h>
98
99 #include "types.h"
100
101diff --git a/src/adapter.c b/src/adapter.c
102index b85a0ef..802420b 100644
103--- a/src/adapter.c
104+++ b/src/adapter.c
105@@ -30,7 +30,6 @@
106 #include <dbus/dbus-glib.h>
107 #include <dbus/dbus-glib-lowlevel.h>
108 #include <gudev/gudev.h>
109-#include <atasmart.h>
110
111 #include "daemon.h"
112 #include "adapter.h"
113diff --git a/src/daemon.c b/src/daemon.c
114index 6072502..d043cb0 100644
115--- a/src/daemon.c
116+++ b/src/daemon.c
117@@ -1745,6 +1745,7 @@ mdstat_changed_event (GIOChannel *channel,
118 return TRUE;
119 }
120
121+#ifdef HAVE_LIBATASMART
122 static gboolean
123 refresh_ata_smart_data (Daemon *daemon)
124 {
125@@ -1773,6 +1774,7 @@ refresh_ata_smart_data (Daemon *daemon)
126
127 return FALSE;
128 }
129+#endif
130
131 static gboolean
132 register_disks_daemon (Daemon *daemon)
133@@ -1984,12 +1986,14 @@ daemon_new (void)
134 mount_file_clean_stale (l);
135 g_list_free (l);
136
137+#ifdef HAVE_LIBATASMART
138 /* set up timer for refreshing ATA SMART data - we don't want to refresh immediately because
139 * when adding a device we also do this...
140 */
141 daemon->priv->ata_smart_refresh_timer_id = g_timeout_add_seconds (ATA_SMART_REFRESH_INTERVAL_SECONDS,
142 (GSourceFunc) refresh_ata_smart_data,
143 daemon);
144+#endif
145
146 PROFILE ("daemon_new(): end");
147 return daemon;
148diff --git a/src/device-private.c b/src/device-private.c
149index 22a0d35..fb96525 100644
150--- a/src/device-private.c
151+++ b/src/device-private.c
152@@ -1378,7 +1378,7 @@ device_set_drive_ata_smart_time_collected (Device *device,
153
154 void
155 device_set_drive_ata_smart_status (Device *device,
156- SkSmartOverall value)
157+ guint value)
158 {
159 if (G_UNLIKELY (device->priv->drive_ata_smart_status != value))
160 {
161diff --git a/src/device-private.h b/src/device-private.h
162index a6db7f2..71473a6 100644
163--- a/src/device-private.h
164+++ b/src/device-private.h
165@@ -23,7 +23,6 @@
166
167 #include <dbus/dbus-glib.h>
168 #include <gudev/gudev.h>
169-#include <atasmart.h>
170
171 #include "types.h"
172
173@@ -224,7 +223,7 @@ struct DevicePrivate
174
175 gboolean drive_ata_smart_is_available;
176 guint64 drive_ata_smart_time_collected;
177- SkSmartOverall drive_ata_smart_status;
178+ guint drive_ata_smart_status;
179 void *drive_ata_smart_blob;
180 gsize drive_ata_smart_blob_size;
181
182@@ -391,7 +390,7 @@ void device_set_holders_objpath (Device *device, GStrv value);
183
184 void device_set_drive_ata_smart_is_available (Device *device, gboolean value);
185 void device_set_drive_ata_smart_time_collected (Device *device, guint64 value);
186-void device_set_drive_ata_smart_status (Device *device, SkSmartOverall value);
187+void device_set_drive_ata_smart_status (Device *device, guint value);
188 void device_set_drive_ata_smart_blob_steal (Device *device, gchar *blob, gsize blob_size);
189
190 G_END_DECLS
191diff --git a/src/device.c b/src/device.c
192index 6a34940..7a5a4a9 100644
193--- a/src/device.c
194+++ b/src/device.c
195@@ -50,7 +50,9 @@
196 #include <dbus/dbus-glib.h>
197 #include <dbus/dbus-glib-lowlevel.h>
198 #include <gudev/gudev.h>
199+#ifdef HAVE_LIBATASMART
200 #include <atasmart.h>
201+#endif
202
203 #include "daemon.h"
204 #include "device.h"
205@@ -659,10 +661,14 @@ get_property (GObject *object,
206 case PROP_DRIVE_ATA_SMART_STATUS:
207 {
208 const gchar *status;
209- if (device->priv->drive_ata_smart_status == (SkSmartOverall) - 1)
210+#ifdef HAVE_LIBATASMART
211+ if (device->priv->drive_ata_smart_status == (guint) - 1)
212 status = "";
213 else
214 status = sk_smart_overall_to_string (device->priv->drive_ata_smart_status);
215+#else
216+ status = "";
217+#endif
218 g_value_set_string (value, status);
219 }
220 break;
221@@ -5114,6 +5120,7 @@ device_new (Daemon *daemon,
222 goto out;
223 }
224
225+#ifdef HAVE_LIBATASMART
226 /* if just added, update the smart data if applicable */
227 if (device->priv->drive_ata_smart_is_available)
228 {
229@@ -5121,6 +5128,7 @@ device_new (Daemon *daemon,
230 gchar *ata_smart_refresh_data_options[] = { NULL };
231 device_drive_ata_smart_refresh_data (device, ata_smart_refresh_data_options, NULL);
232 }
233+#endif
234
235 PROFILE ("device_new(native_path=%s): end", native_path);
236 out:
237@@ -9794,16 +9802,18 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
238 const char *stdout,
239 gpointer user_data)
240 {
241+#ifdef HAVE_LIBATASMART
242 gint rc;
243- SkDisk *d;
244+ SkDisk *d = NULL;
245+ SkSmartOverall overall;
246 gchar *blob;
247 gsize blob_size;
248 time_t time_collected;
249- SkSmartOverall overall;
250+#endif
251
252 PROFILE ("drive_ata_smart_refresh_data_completed_cb(device=%s) start", device->priv->native_path);
253
254- d = NULL;
255+#ifdef HAVE_LIBATASMART
256 blob = NULL;
257
258 if (job_was_cancelled || stdout == NULL)
259@@ -9907,6 +9917,11 @@ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
260 g_free (blob);
261 if (d != NULL)
262 sk_disk_free (d);
263+
264+#else
265+ throw_error (context, ERROR_FAILED, "libatasmart support disabled");
266+#endif
267+
268 PROFILE ("drive_ata_smart_refresh_data_completed_cb(device=%s) end", device->priv->native_path);
269 }
270
271diff --git a/src/expander-private.h b/src/expander-private.h
272index ef4f440..98a8300 100644
273--- a/src/expander-private.h
274+++ b/src/expander-private.h
275@@ -23,7 +23,6 @@
276
277 #include <dbus/dbus-glib.h>
278 #include <gudev/gudev.h>
279-#include <atasmart.h>
280
281 #include "types.h"
282
283diff --git a/src/expander.c b/src/expander.c
284index 734ec0a..e799f13 100644
285--- a/src/expander.c
286+++ b/src/expander.c
287@@ -34,7 +34,6 @@
288 #include <dbus/dbus-glib.h>
289 #include <dbus/dbus-glib-lowlevel.h>
290 #include <gudev/gudev.h>
291-#include <atasmart.h>
292 #include <stdlib.h>
293
294 #include "daemon.h"
295diff --git a/src/helpers/Makefile.am b/src/helpers/Makefile.am
296index 4b863c0..d3ec4e9 100644
297--- a/src/helpers/Makefile.am
298+++ b/src/helpers/Makefile.am
299@@ -19,15 +19,9 @@ INCLUDES = \
300
301 libexec_PROGRAMS = \
302 udisks-helper-mkfs \
303- udisks-helper-delete-partition \
304- udisks-helper-create-partition \
305- udisks-helper-modify-partition \
306- udisks-helper-create-partition-table \
307 udisks-helper-change-filesystem-label \
308 udisks-helper-linux-md-remove-component \
309 udisks-helper-fstab-mounter \
310- udisks-helper-ata-smart-collect \
311- udisks-helper-ata-smart-selftest \
312 udisks-helper-drive-detach \
313 udisks-helper-drive-poll \
314 udisks-helper-linux-md-check \
315@@ -48,6 +42,13 @@ udisks_helper_mkfs_SOURCES = job-shared.h job-mkfs.c
316 udisks_helper_mkfs_CPPFLAGS = $(AM_CPPFLAGS)
317 udisks_helper_mkfs_LDADD = $(GLIB_LIBS)
318
319+if HAVE_PARTED
320+libexec_PROGRAMS += \
321+ udisks-helper-delete-partition \
322+ udisks-helper-create-partition \
323+ udisks-helper-modify-partition \
324+ udisks-helper-create-partition-table
325+
326 udisks_helper_delete_partition_SOURCES = job-shared.h job-delete-partition.c
327 udisks_helper_delete_partition_CPPFLAGS = $(AM_CPPFLAGS)
328 udisks_helper_delete_partition_LDADD = $(GLIB_LIBS) libpartutil.la
329@@ -63,11 +64,17 @@ udisks_helper_modify_partition_LDADD = $(GLIB_LIBS) libpartutil.la
330 udisks_helper_create_partition_table_SOURCES = job-shared.h job-create-partition-table.c
331 udisks_helper_create_partition_table_CPPFLAGS = $(AM_CPPFLAGS)
332 udisks_helper_create_partition_table_LDADD = $(GLIB_LIBS) libpartutil.la
333+endif
334
335 udisks_helper_change_filesystem_label_SOURCES = job-shared.h job-change-filesystem-label.c
336 udisks_helper_change_filesystem_label_CPPFLAGS = $(AM_CPPFLAGS)
337 udisks_helper_change_filesystem_label_LDADD = $(GLIB_LIBS)
338
339+if HAVE_LIBATASMART
340+libexec_PROGRAMS += \
341+ udisks-helper-ata-smart-collect \
342+ udisks-helper-ata-smart-selftest
343+
344 udisks_helper_ata_smart_selftest_SOURCES = job-shared.h job-ata-smart-selftest.c
345 udisks_helper_ata_smart_selftest_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS)
346 udisks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS)
347@@ -75,6 +82,7 @@ udisks_helper_ata_smart_selftest_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS)
348 udisks_helper_ata_smart_collect_SOURCES = job-ata-smart-collect.c
349 udisks_helper_ata_smart_collect_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS) $(GLIB_CFLAGS)
350 udisks_helper_ata_smart_collect_LDADD = $(LIBATASMART_LIBS) $(GLIB_LIBS)
351+endif
352
353 udisks_helper_linux_md_remove_component_SOURCES = job-shared.h job-linux-md-remove-component.c
354 udisks_helper_linux_md_remove_component_CPPFLAGS = $(AM_CPPFLAGS)
355diff --git a/src/helpers/partutil.c b/src/helpers/partutil.c
356index 72a8fe3..8893a39 100644
357--- a/src/helpers/partutil.c
358+++ b/src/helpers/partutil.c
359@@ -62,7 +62,6 @@ DEBUG (const gchar *format,
360 # include <config.h>
361 #endif
362
363-#define USE_PARTED
364 #ifdef USE_PARTED
365 #include <parted/parted.h>
366 #endif
367@@ -928,6 +927,7 @@ part_table_parse_apple (int fd,
368 return p;
369 }
370
371+#ifdef USE_PARTED
372 static PartitionTable *
373 part_table_load_from_disk_from_file (char *device_file)
374 {
375@@ -948,6 +948,7 @@ part_table_load_from_disk_from_file (char *device_file)
376 out:
377 return ret;
378 }
379+#endif
380
381 PartitionTable *
382 part_table_load_from_disk (int fd)
383diff --git a/src/port-private.h b/src/port-private.h
384index cc48376..a91532f 100644
385--- a/src/port-private.h
386+++ b/src/port-private.h
387@@ -23,7 +23,6 @@
388
389 #include <dbus/dbus-glib.h>
390 #include <gudev/gudev.h>
391-#include <atasmart.h>
392
393 #include "types.h"
394
395diff --git a/src/probers/Makefile.am b/src/probers/Makefile.am
396index 06bb566..01c693b 100644
397--- a/src/probers/Makefile.am
398+++ b/src/probers/Makefile.am
399@@ -22,8 +22,6 @@ INCLUDES = \
400
401 udevhelperdir = $(slashlibdir)/udev
402 udevhelper_PROGRAMS = udisks-part-id \
403- udisks-dm-export \
404- udisks-probe-ata-smart \
405 udisks-probe-sas-expander \
406 $(NULL)
407
408@@ -35,17 +33,23 @@ udisks_part_id_SOURCES = part-id.c
409 udisks_part_id_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUDEV_CFLAGS)
410 udisks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) $(top_builddir)/src/helpers/libpartutil.la
411
412+if HAVE_DEVMAPPER
413+udevhelper_PROGRAMS += udisks-dm-export
414 udisks_dm_export_SOURCES = udisks-dm-export.c
415 udisks_dm_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) $(GLIB_CFLAGS)
416 udisks_dm_export_LDADD = $(DEVMAPPER_LIBS) $(GLIB_LIBS)
417+endif
418
419 udisks_lvm_pv_export_SOURCES = udisks-lvm-pv-export.c
420 udisks_lvm_pv_export_CPPFLAGS = $(AM_CPPFLAGS) $(DEVMAPPER_CFLAGS) $(LVM2_CFLAGS) $(GLIB_CFLAGS)
421 udisks_lvm_pv_export_LDADD = $(DEVMAPPER_LIBS) $(LVM2_LIBS) $(GLIB_LIBS)
422
423+if HAVE_LIBATASMART
424+udevhelper_PROGRAMS += udisks-probe-ata-smart
425 udisks_probe_ata_smart_SOURCES = udisks-probe-ata-smart.c
426 udisks_probe_ata_smart_CPPFLAGS = $(AM_CPPFLAGS) $(LIBATASMART_CFLAGS)
427 udisks_probe_ata_smart_LDADD = $(LIBATASMART_LIBS)
428+endif
429
430 udisks_probe_sas_expander_SOURCES = udisks-probe-sas-expander.c
431 udisks_probe_sas_expander_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
432diff --git a/tools/udisks.c b/tools/udisks.c
433index 6fbd6a6..e0c4fbb 100644
434--- a/tools/udisks.c
435+++ b/tools/udisks.c
436@@ -43,7 +43,9 @@
437 #include <dbus/dbus-glib.h>
438 #include <dbus/dbus-glib-lowlevel.h>
439
440+#ifdef HAVE_LIBATASMART
441 #include <atasmart.h>
442+#endif
443
444 #include "udisks-daemon-glue.h"
445 #include "udisks-device-glue.h"
446@@ -979,6 +981,7 @@ end_highlight (void)
447 g_print ("\x1B[0m");
448 }
449
450+#ifdef HAVE_LIBATASMART
451 static const gchar *
452 ata_smart_status_to_desc (const gchar *status,
453 gboolean *out_highlight)
454@@ -1159,6 +1162,7 @@ print_ata_smart_attr (SkDisk *d,
455 g_free (threshold_str);
456 g_free (pretty);
457 }
458+#endif
459
460 static void
461 do_show_info (const char *object_path)
462@@ -1440,7 +1444,7 @@ do_show_info (const char *object_path)
463 g_print (" if speed: %" G_GINT64_FORMAT " bits/s\n", props->drive_connection_speed);
464
465 /* ------------------------------------------------------------------------------------------------- */
466-
467+#ifdef HAVE_LIBATASMART
468 if (!props->drive_ata_smart_is_available)
469 {
470 g_print (" ATA SMART: not available\n");
471@@ -1493,7 +1497,9 @@ do_show_info (const char *object_path)
472 }
473
474 }
475-
476+#else
477+ g_print (" ATA SMART: not supported\n");
478+#endif
479 /* ------------------------------------------------------------------------------------------------- */
480
481 }
482--
4831.7.5.rc3
484
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 000000000..e306e8999
--- /dev/null
+++ b/meta-oe/recipes-support/udisks/udisks_1.0.4.bb
@@ -0,0 +1,39 @@
1DESCRIPTION = "A storage daemon that implements well-defined D-Bus interfaces that can be used to query and manipulate storage devices."
2LICENSE = "GPLv2+"
3LIC_FILES_CHKSUM = "file://COPYING;md5=73d83aebe7e4b62346afde80e0e94273"
4
5DEPENDS = "libatasmart sg3-utils polkit udev dbus-glib glib-2.0 intltool-native"
6# optional dependencies: device-mapper parted
7
8DEPENDS += "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
9
10SRC_URI = "http://hal.freedesktop.org/releases/${BPN}-${PV}.tar.gz;name=${BPN} \
11 file://optional-depends.patch"
12
13SRC_URI += "${@base_contains('DISTRO_FEATURES', 'systemd', 'file://add-systemd-support.patch', '', d)}"
14
15SRC_URI[udisks.md5sum] = "86c63b2b5484f2060499a052b5b6256b"
16SRC_URI[udisks.sha256sum] = "854b89368733b9c3a577101b761ad5397ae75a05110c8698ac5b29de9a8bf8f5"
17
18PR = "r9"
19
20inherit autotools systemd gtk-doc
21
22PACKAGECONFIG ??= ""
23PACKAGECONFIG[parted] = "--enable-parted,--disable-parted,parted"
24
25EXTRA_OECONF = "--disable-man-pages"
26
27FILES_${PN} += "${libdir}/polkit-1/extensions/*.so \
28 ${datadir}/dbus-1/ \
29 ${datadir}/polkit-1 \
30 ${base_libdir}/udev/* \
31"
32
33FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
34
35RPROVIDES_${PN} += "${PN}-systemd"
36RREPLACES_${PN} += "${PN}-systemd"
37RCONFLICTS_${PN} += "${PN}-systemd"
38SYSTEMD_SERVICE_${PN} = "udisks-daemon.service"
39SYSTEMD_AUTO_ENABLE = "disable"