rpms/dmraid/devel dmraid-1.0.0.rc14-UUID-Subsystemprefix.patch, NONE, 1.1 dmraid.spec, 1.84, 1.85
Ian Kent (iankent)
fedora-extras-commits at redhat.com
Wed Nov 21 01:51:42 UTC 2007
Author: iankent
Update of /cvs/pkgs/rpms/dmraid/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9476
Modified Files:
dmraid.spec
Added Files:
dmraid-1.0.0.rc14-UUID-Subsystemprefix.patch
Log Message:
* Wed Nov 21 2007 Ian Kent <ikent at redhat.com> - 1.0.0.rc14-6
- Bug 379911: dmraid needs to generate UUIDs for lib device-mapper
- add "DMRAID-" prefix to dmraid UUID string.
dmraid-1.0.0.rc14-UUID-Subsystemprefix.patch:
--- NEW FILE dmraid-1.0.0.rc14-UUID-Subsystemprefix.patch ---
--- current/lib/activate/devmapper.c.orig 2007-11-13 13:51:11.000000000 +0100
+++ current/lib/activate/devmapper.c 2007-11-16 12:42:14.000000000 +0100
@@ -151,13 +151,16 @@
/* Build a UUID for a dmraid device
* Return 1 for sucess; 0 for failure*/
-static int dmraid_uuid(char *uuid, struct lib_context *lc,
- struct raid_set *rs, uint uuid_len) {
+static int dmraid_uuid(struct lib_context *lc, struct raid_set *rs,
+ char *uuid, uint uuid_len) {
+ int r;
+
/* Clear garbage data from uuid string */
memset(uuid, 0, uuid_len);
-
- /* Insert volume name into string */
- return !!memcpy(uuid, rs->name, strlen(rs->name));
+
+ /* Create UUID string from subsystem prefix and RAID set name. */
+ r = snprintf(uuid, uuid_len, "DMRAID-%s", rs->name) < uuid_len;
+ return r < 0 ? 0 : (r < uuid_len);
}
/* Create a task, set its name and run it. */
@@ -178,12 +181,11 @@
if (ret && table)
ret = parse_table(lc, dmt, table);
- if (ret) {
- if (DM_DEVICE_CREATE == type &&
- dmraid_uuid(uuid, lc, rs, DM_UUID_LEN))
- dm_task_set_uuid(dmt, uuid);
- ret = dm_task_run(dmt);
- }
+ if (ret &&
+ DM_DEVICE_CREATE == type)
+ ret = dmraid_uuid(lc, rs, uuid, DM_UUID_LEN) &&
+ dm_task_set_uuid(dmt, uuid) &&
+ dm_task_run(dmt);
_exit_dm(dmt);
return ret;
Index: dmraid.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dmraid/devel/dmraid.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- dmraid.spec 14 Nov 2007 03:59:30 -0000 1.84
+++ dmraid.spec 21 Nov 2007 01:51:07 -0000 1.85
@@ -7,7 +7,7 @@
Summary: Device-mapper RAID tool and library.
Name: dmraid
Version: 1.0.0.rc14
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPL
Group: System Environment/Base
URL: http://people.redhat.com/heinzm/sw/dmraid
@@ -22,6 +22,7 @@
Patch1: dmraid-1.0.0.rc14-solitary-meta-block.patch
Patch2: dmraid-1.0.0.rc14-UUID.patch
Patch3: dmraid-1.0.0.rc14-ERROR.patch
+Patch4: dmraid-1.0.0.rc14-UUID-Subsystemprefix.patch
%description
DMRAID supports RAID device discovery, RAID set activation and display of
@@ -41,6 +42,7 @@
%patch1 -p1 -b .solitary-meta-block
%patch2 -p1 -b .UUID
%patch3 -p1 -b .ERROR
+%patch4 -p1 -b .UUID-Subsystemprefix
%build
%configure --prefix=${RPM_BUILD_ROOT}/usr --sbindir=${RPM_BUILD_ROOT}/sbin --libdir=${RPM_BUILD_ROOT}/%{_libdir} --mandir=${RPM_BUILD_ROOT}/%{_mandir} --includedir=${RPM_BUILD_ROOT}/%{_includedir} --enable-debug --enable-libselinux --enable-libsepol --enable-static_link
@@ -86,6 +88,10 @@
%{_libdir}/libdmraid.so
%changelog
+* Wed Nov 21 2007 Ian Kent <ikent at redhat.com> - 1.0.0.rc14-6
+- Bug 379911: dmraid needs to generate UUIDs for lib device-mapper
+ - add "DMRAID-" prefix to dmraid UUID string.
+
* Wed Nov 14 2007 Ian Kent <ikent at redhat.com> - 1.0.0.rc14-5
- Bug 379911: dmraid needs to generate UUIDs for lib device-mapper
- Bug 379951: dmraid needs to activate device-mapper mirror resynchronization error handling
More information about the fedora-extras-commits
mailing list