Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
David Zeuthen
9922e07f0d - Nuke generated D-Bus code to force regeneration and avoid potential
dbus-glib bug. Credit goes to Tomáš Trnka <tomastrnka@gmx.com> for
  figuring this out (#673544 comment 15)
2011-02-01 09:32:38 -05:00
David Zeuthen
4b65e5a719 - Rebuild 2011-01-31 17:39:35 -05:00
David Zeuthen
e15f9b154e - Require gtk-doc for building 2011-01-24 14:12:49 -05:00
David Zeuthen
5d1a63104b - Update to release 1.0.2
- Drop patch that was committed upstream
2011-01-24 14:03:34 -05:00
Matthias Clasen
3185dd12c7 drop gtk-doc dep 2010-08-23 16:01:10 -04:00
4 changed files with 27 additions and 140 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ udisks-1.0.0.git20100215.tar.gz
udisks-1.0.0-0.git20100223_1311.tar.gz
udisks-1.0.0.tar.gz
udisks-1.0.1.tar.gz
/udisks-1.0.2.tar.gz

View file

@ -1 +1 @@
3654d994eb43b80c8c2d04fe03da30c4 udisks-1.0.1.tar.gz
f630eefa51b95d6485eb3246bc1bea9a udisks-1.0.2.tar.gz

View file

@ -1,124 +0,0 @@
From 2b2fcf80841972b70ad695a5a1ed74487d4fd37a Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Wed, 19 May 2010 13:01:31 -0400
Subject: [PATCH] Update to latest LVM2 API
See
http://lists.freedesktop.org/archives/devkit-devel/2010-April/000783.html
---
configure.ac | 2 +-
src/probers/udisks-lvm-pv-export.c | 30 ++++++++++--------------------
2 files changed, 11 insertions(+), 21 deletions(-)
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
--
1.7.0.1

View file

@ -13,13 +13,12 @@
Summary: Storage Management Service
Name: udisks
Version: 1.0.1
Version: 1.0.2
Release: 4%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.freedesktop.org/wiki/Software/udisks
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
@ -32,6 +31,7 @@ BuildRequires: libgudev1-devel >= %{udev_version}
BuildRequires: libudev-devel >= %{udev_version}
BuildRequires: sg3_utils-devel >= %{sg3_utils_version}
BuildRequires: lvm2-devel >= %{lvm2_version}
BuildRequires: gtk-doc
# needed to pull in the system bus daemon
Requires: dbus >= %{dbus_version}
# needed to pull in the udev daemon
@ -71,8 +71,6 @@ Requires: lvm2-libs >= %{lvm2_version}
Obsoletes: DeviceKit-disks <= 009
Provides: DeviceKit-disks = 010
Patch0: udisks-1.0.1-Update-to-latest-LVM2-API.patch
%description
udisks provides a daemon, D-Bus API and command line tools
for managing disks and storage devices.
@ -81,7 +79,6 @@ for managing disks and storage devices.
Summary: D-Bus interface definitions for udisks
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk-doc
# See comment above
#
@ -93,15 +90,14 @@ D-Bus interface definitions and documentation for udisks.
%prep
%setup -q
%patch0 -p1 -b .latest-lvm2-api
# https://bugzilla.redhat.com/show_bug.cgi?id=673544#c15
rm -f src/*-glue.h tools/*-glue.h
%build
%configure --enable-gtk-doc
make
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
@ -120,9 +116,6 @@ chmod 0644 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/udisks-bash-completion.sh
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root,-)
@ -161,20 +154,37 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/dbus-1/interfaces/*.xml
%{_datadir}/pkgconfig/udisks.pc
%dir %{_datadir}/gtk-doc/html/udisks
%{_datadir}/gtk-doc/html/udisks/*
%{_datadir}/gtk-doc
# Note: please don't forget the %{?dist} in the changelog. Thanks
#
%changelog
* Tue Feb 01 2011 David Zeuthen <davidz@redhat.com> - 1.0.2-4%{?dist}
- Nuke generated D-Bus code to force regeneration and avoid potential
dbus-glib bug. Credit goes to Tomáš Trnka <tomastrnka@gmx.com> for
figuring this out (#673544 comment 15)
* Mon Jan 31 2011 David Zeuthen <davidz@redhat.com> - 1.0.2-3%{?dist}
- Rebuild
* Mon Jan 24 2011 David Zeuthen <davidz@redhat.com> - 1.0.2-2%{?dist}
- Require gtk-doc for building
* Mon Jan 24 2011 David Zeuthen <davidz@redhat.com> - 1.0.2-1%{?dist}
- Update to release 1.0.2
- Drop patch that was committed upstream
* Mon Aug 23 2010 Matthias Clasen <mclasen@redhat.com> - 1.0.1-5%{?dist}
- Co-own /usr/share/gtk-doc (#604420)
- Some other packaging cleanups
* Wed May 19 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-4%{?dist}
- Actually make udisks work with latest liblvm2app
* Mon May 05 2010 Adam Tkac <atkac redhat com> - 1.0.1-3%{?dist}
- rebuilt against new lvm2 libraries
* Tue Apr 13 2010 Dan Horák <dan@danny.cz> - 1.0.1-2%{?dist}
* Tue Apr 13 2010 Dan Horák <dan@danny.cz> - 1.0.1-2%{?dist}
- rebuilt for sg3_utils 1.29
* Fri Apr 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-1%{?dist}