Compare commits

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

8 commits

Author SHA1 Message Date
David Zeuthen
cdbe25a03b * Mon Aug 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-4%{?dist}
- Add BRs for autoreconf
2010-08-09 15:54:23 -04:00
David Zeuthen
e1c1701de5 * Mon Aug 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-3%{?dist}
- Do autoreconf to guarantee that we build against a recent enough liblvm2
2010-08-09 15:43:51 -04:00
David Zeuthen
225e850a13 * Mon Aug 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-2%{?dist}
- Add patch to work with latest liblvm2 API (See #622385)
2010-08-09 15:28:22 -04:00
Fedora Release Engineering
cc31a3e62f dist-git conversion 2010-07-29 14:39:07 +00:00
David Zeuthen
4a9710b9c2 - Update to release 1.0.1 (CVE-2010-1149 ,fdo #27494) 2010-04-09 16:00:19 +00:00
David Zeuthen
d690685968 - Update to release 1.0.0 2010-03-15 23:46:31 +00:00
David Zeuthen
7782df37a3 - Update to new git snapshot 2010-02-23 18:37:24 +00:00
Jesse Keating
d388602a81 Initialize branch F-13 for udisks 2010-02-17 03:22:57 +00:00
6 changed files with 159 additions and 101 deletions

View file

@ -2,3 +2,6 @@ udisks.spec
udisks-1.0.0.git20091202.tar.gz
udisks-1.0.0.git20100115.tar.gz
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

View file

@ -1,71 +0,0 @@
From 61ddf6fee803a9d3ad275f36e623cf9e9d11a189 Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Tue, 16 Feb 2010 14:24:27 -0500
Subject: [PATCH] Update for new liblvm2app library
Several things changed in liblvm2app
- sizes are now reported in bytes instead of sectors
- a couple of new functions were added
You will need lvm2 version 2.02.61 or later (on Fedora Rawhide, this
is available as lvm2-2.02.61-1.fc13.x86_64). Unfortunately the liblvm2
pc version number is stuck at 2.1 so we can't require this version in
configure.in. I've asked the LVM team to fix that.
---
src/probers/udisks-lvm-pv-export.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/probers/udisks-lvm-pv-export.c b/src/probers/udisks-lvm-pv-export.c
index 6ab9625..5675fb8 100644
--- a/src/probers/udisks-lvm-pv-export.c
+++ b/src/probers/udisks-lvm-pv-export.c
@@ -85,9 +85,9 @@ print_vg (vg_t vg)
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);
- g_print ("UDISKS_LVM2_PV_VG_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_size (vg) * 512); /* TODO */
- g_print ("UDISKS_LVM2_PV_VG_FREE_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_free_size (vg) * 512); /* TODO */
- g_print ("UDISKS_LVM2_PV_VG_EXTENT_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_extent_size (vg) * 512); /* TODO */
+ 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));
g_print ("UDISKS_LVM2_PV_VG_EXTENT_COUNT=%" G_GUINT64_FORMAT "\n", lvm_vg_get_extent_count (vg));
g_print ("UDISKS_LVM2_PV_VG_SEQNUM=%" G_GUINT64_FORMAT "\n", lvm_vg_get_seqno (vg));
@@ -118,15 +118,22 @@ print_vg (vg_t vg)
dm_list_iterate_items (pv_list, pvs)
{
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);
- g_string_append_c (str, ' ');
dm_free (uuid);
}
+ size = lvm_pv_get_size (pv);
+ g_string_append_printf (str, ";size=%" G_GUINT64_FORMAT, size);
+ free_size = lvm_pv_get_free (pv);
+ g_string_append_printf (str, ";allocated_size=%" G_GUINT64_FORMAT, size - free_size);
+
+ g_string_append_c (str, ' ');
}
g_print ("UDISKS_LVM2_PV_VG_PV_LIST=%s\n", str->str);
g_string_free (str, TRUE);
@@ -174,7 +181,7 @@ print_vg (vg_t vg)
uuid = lvm_lv_get_uuid (lv);
name = lvm_lv_get_name (lv);
- size = lvm_lv_get_size (lv) * 512;
+ size = lvm_lv_get_size (lv);
is_active = lvm_lv_is_active (lv) != 0 ? 1 : 0;
if (uuid != NULL && name != NULL)
--
1.6.6.1

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: udisks
# $Id$
NAME := udisks
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1 +1 @@
8c3c20ef2a15e67770e1f0ad4bf68b6c udisks-1.0.0.git20100215.tar.gz
3654d994eb43b80c8c2d04fe03da30c4 udisks-1.0.1.tar.gz

View file

@ -0,0 +1,124 @@
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.0
Release: 0.git20100215.3%{?dist}
Version: 1.0.1
Release: 4%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.freedesktop.org/wiki/Software/udisks
# TODO: when fd.o #22578 is resolved, update URL to proper location
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.git20100215.tar.gz
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}
@ -57,8 +56,6 @@ Requires: mtools
Requires: ntfsprogs
%endif
Patch0: 0001-Update-for-new-liblvm2app-library.patch
# for /proc/self/mountinfo, only available in 2.6.26 or higher
Conflicts: kernel < 2.6.26
@ -74,6 +71,13 @@ Requires: lvm2-libs >= %{lvm2_version}
Obsoletes: DeviceKit-disks <= 009
Provides: DeviceKit-disks = 010
Patch0: udisks-1.0.1-Update-to-latest-LVM2-API.patch
# needed for autoreconf
Buildrequires: libtool
Buildrequires: autoconf
Buildrequires: automake
Buildrequires: gtk-doc
%description
udisks provides a daemon, D-Bus API and command line tools
for managing disks and storage devices.
@ -94,10 +98,11 @@ D-Bus interface definitions and documentation for udisks.
%prep
%setup -q
%patch0 -p1 -b .lvm2app-additions
%patch0 -p1 -b .latest-lvm2-api
%build
%configure --enable-gtk-doc
autoreconf
%configure --enable-gtk-doc --enable-lvm2
make
%install
@ -169,6 +174,24 @@ rm -rf $RPM_BUILD_ROOT
# Note: please don't forget the %{?dist} in the changelog. Thanks
#
%changelog
* Mon Aug 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-4%{?dist}
- Add BRs for autoreconf
* Mon Aug 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-3%{?dist}
- Do autoreconf to guarantee that we build against a recent enough liblvm2
* Mon Aug 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-2%{?dist}
- Add patch to work with latest liblvm2 API (See #622385)
* Fri Apr 09 2010 David Zeuthen <davidz@redhat.com> - 1.0.1-1%{?dist}
- Update to release 1.0.1 (CVE-2010-1149 ,fdo #27494)
* Mon Mar 15 2010 David Zeuthen <davidz@redhat.com> - 1.0.0-1%{?dist}
- Update to release 1.0.0
* Tue Feb 23 2010 David Zeuthen <davidz@redhat.com> - 1.0.0-0.git20100223.1%{?dist}
- Update to new git snapshot
* Tue Feb 16 2010 David Zeuthen <davidz@redhat.com> - 1.0.0-0.git20100215.3%{?dist}
- Require lvm2-libs >= 2.02.61 to get the right ABI for liblvm2app