OBS User unknown 2008-09-13 08:14:36 +00:00 committed by Git OBS Bridge
parent cda1e21bf7
commit 99289ece9c
5 changed files with 266 additions and 2 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7281f5be8b419fbfd83405207a8d6721d2ae44a01749c0eb8b67823127d17ca9
size 12424

View File

@ -0,0 +1,233 @@
Index: 1.0.0.rc14/include/dmraid/lib_context.h
===================================================================
--- 1.0.0.rc14.orig/include/dmraid/lib_context.h 2005-09-21 13:46:53.000000000 +0200
+++ 1.0.0.rc14/include/dmraid/lib_context.h 2008-09-10 15:09:17.000000000 +0200
@@ -38,7 +38,12 @@
LC_VERBOSE,
LC_IGNORELOCKING,
LC_SEPARATOR,
- LC_DEVICES, /* Add new options below this one ! */
+ LC_DEVICES,
+ LC_PARTCHAR,
+ LC_CREATE,
+ LC_REBUILD_SET,
+ LC_REBUILD_DISK,
+ LC_HOT_SPARE_SET, /* Add new options below this one ! */
LC_OPTIONS_SIZE, /* Must be the last enumerator. */
};
@@ -62,6 +67,82 @@
#define OPT_STR_FORMAT(lc) OPT_STR(lc, LC_FORMAT)
#define OPT_STR_SEPARATOR(lc) OPT_STR(lc, LC_SEPARATOR)
+/* Options actions dmraid performs. */
+enum action {
+ UNDEF = 0x0,
+ ACTIVATE = 0x1,
+ DEACTIVATE = 0x2,
+ FORMAT = 0x4,
+#ifndef DMRAID_MINI
+ BLOCK_DEVICES = 0x8,
+ COLUMN = 0x10,
+ DBG = 0x20,
+ DUMP = 0x40,
+ DMERASE = 0x80,
+ GROUP = 0x100,
+#endif
+ HELP = 0x200,
+#ifndef DMRAID_MINI
+ LIST_FORMATS = 0x400,
+# ifdef DMRAID_NATIVE_LOG
+ NATIVE_LOG = 0x800,
+# endif
+#endif
+ NOPARTITIONS = 0x1000,
+#ifndef DMRAID_MINI
+ RAID_DEVICES = 0x2000,
+ RAID_SETS = 0x4000,
+ TEST = 0x8000,
+ VERBOSE = 0x10000,
+ ACTIVE = 0x20000,
+ INACTIVE = 0x40000,
+ SEPARATOR = 0x80000,
+#endif
+ VERSION = 0x100000,
+ IGNORELOCKING = 0x200000,
+#ifndef DMRAID_MINI
+ DEL_SETS = 0x400000,
+ CREATE = 0x800000,
+ REBUILD = 0x1000000,
+ SPARE = 0x2000000,
+ MEDIA = 0x4000000,
+ END_REBUILD = 0x8000000,
+ GET_MEMBERS = 0x10000000,
+ PARTCHAR = 0x20000000,
+
+#endif
+};
+
+enum metadata_need {
+ M_NONE = 0x00,
+ M_DEVICE = 0x01,
+ M_RAID = 0x02,
+ M_SET = 0x04,
+};
+
+enum id {
+ ROOT,
+ ANY_ID,
+};
+
+enum lock {
+ LOCK,
+ NO_LOCK,
+};
+
+/*
+ * Pre and Post functions to perform for an option.
+ */
+struct prepost {
+ enum action action;
+ enum metadata_need metadata;
+ enum id id;
+ enum lock lock;
+ int (*pre) (int arg);
+ int arg;
+ int (*post) (struct lib_context * lc, int arg);
+};
+
struct lib_version {
const char *text;
const char *date;
Index: 1.0.0.rc14/tools/commands.h
===================================================================
--- 1.0.0.rc14.orig/tools/commands.h 2005-09-27 15:39:44.000000000 +0200
+++ 1.0.0.rc14/tools/commands.h 2008-09-10 15:09:17.000000000 +0200
@@ -13,40 +13,6 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*a))
#define ARRAY_END(a) (a + ARRAY_SIZE(a))
-/* Options actions dmraid performs. */
-enum action {
- UNDEF = 0x0,
- ACTIVATE = 0x1,
- DEACTIVATE = 0x2,
- FORMAT = 0x4,
-#ifndef DMRAID_MINI
- BLOCK_DEVICES = 0x8,
- COLUMN = 0x10,
- DBG = 0x20,
- DUMP = 0x40,
- ERASE = 0x80,
- GROUP = 0x100,
-#endif
- HELP = 0x200,
-#ifndef DMRAID_MINI
- LIST_FORMATS = 0x400,
-# ifdef DMRAID_NATIVE_LOG
- NATIVE_LOG = 0x800,
-# endif
-#endif
- NOPARTITIONS = 0x1000,
-#ifndef DMRAID_MINI
- RAID_DEVICES = 0x2000,
- RAID_SETS = 0x4000,
- TEST = 0x8000,
- VERBOSE = 0x10000,
- ACTIVE = 0x20000,
- INACTIVE = 0x40000,
- SEPARATOR = 0x80000,
-#endif
- VERSION = 0x100000,
- IGNORELOCKING = 0x200000,
-};
#define ALL_FLAGS ((enum action) -1)
@@ -75,37 +41,6 @@
int arg; /* Argument for above function call */
};
-/* Define which metadata is needed before we can call post functions. */
-enum metadata_need {
- M_NONE = 0x00,
- M_DEVICE = 0x01,
- M_RAID = 0x02,
- M_SET = 0x04,
-};
-
-enum id {
- ROOT,
- ANY_ID,
-};
-
-enum lock {
- LOCK,
- NO_LOCK,
-};
-
-/*
- * Pre and Post functions to perform for an option.
- */
-struct prepost {
- enum action action;
- enum metadata_need metadata;
- enum id id;
- enum lock lock;
- int (*pre)(int arg);
- int arg;
- int (*post)(struct lib_context *lc, int arg);
-};
-
int handle_args(struct lib_context *lc, int argc, char ***argv);
int perform(struct lib_context *lc, char **argv);
Index: 1.0.0.rc14/tools/commands.c
===================================================================
--- 1.0.0.rc14.orig/tools/commands.c 2008-09-10 15:09:17.000000000 +0200
+++ 1.0.0.rc14/tools/commands.c 2008-09-10 15:09:39.000000000 +0200
@@ -243,7 +243,7 @@
|NATIVE_LOG
# endif
|RAID_DEVICES|RAID_SETS,
- ACTIVE|INACTIVE|COLUMN|DBG|DUMP|ERASE|GROUP|HELP|
+ ACTIVE|INACTIVE|COLUMN|DBG|DUMP|DMERASE|GROUP|HELP|
IGNORELOCKING|NOPARTITIONS|SEPARATOR|TEST|VERBOSE
#else
, UNDEF
@@ -314,7 +314,7 @@
/* Erase metadata option. */
{ 'E',
- ERASE,
+ DMERASE,
RAID_DEVICES,
COLUMN|DBG|FORMAT|HELP|IGNORELOCKING|SEPARATOR|VERBOSE,
ARGS,
@@ -381,7 +381,7 @@
{ 'r',
RAID_DEVICES,
UNDEF,
- COLUMN|DBG|DUMP|ERASE|FORMAT|HELP|IGNORELOCKING|SEPARATOR|VERBOSE,
+ COLUMN|DBG|DUMP|DMERASE|FORMAT|HELP|IGNORELOCKING|SEPARATOR|VERBOSE,
ARGS,
NULL,
0,
@@ -500,7 +500,7 @@
if ((action & (DBG|VERBOSE)) == action)
LOG_ERR(lc, 0, "More options needed with -d/-v");
- if (action & ERASE) {
+ if (action & DMERASE) {
action |= DUMP;
lc_inc_opt(lc, LC_DUMP);
}
@@ -697,7 +697,7 @@
},
/* Erase metadata. */
- { ERASE,
+ { DMERASE,
M_DEVICE|M_RAID,
ROOT,
LOCK,

View File

@ -1,3 +1,7 @@
Wed Sep 10 15:14:19 CEST 2008 - xwhu@novell.com
- Adding DSO for event-handling [fate#304214]
-------------------------------------------------------------------
Wed Sep 3 11:09:34 CEST 2008 - hare@suse.de

View File

@ -27,13 +27,15 @@ Group: System/Base
AutoReqProv: on
Summary: A Device-Mapper Software RAID Support Tool
Version: 1.0.0.rc14
Release: 88
Release: 92
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
Source1: sysconfig.dmraid
Source2: boot.dmraid
Source3: README.SuSE
Source4: mkinitrd-setup.sh
Source5: mkinitrd-boot.sh
Source6: libdmraid-events_DSO-1.0.0.rc4.tgz
Source7: dm_dso_reg_tool-1.0.0.rc2.tgz
Patch0: dmraid_fixup_paths3.diff
Patch1: dmraid-add_uuid.patch
Patch2: dmraid_fixup_nvidia.diff
@ -43,7 +45,9 @@ Patch5: dmraid-1.0.0.rc13-jm_termination.patch
Patch6: dmraid-1.0.0.rc13-fix_macro.patch
Patch7: dmraid-pdc_max_sectors.patch
Patch8: dmraid-1.0.0.rc14-ddf1_segfault.patch
Patch9: dmraid-move-type-definition.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: dmraid
PreReq: %fillup_prereq
%description
@ -73,7 +77,7 @@ Authors:
Heinz Mauelshagen
%prep
%setup -n dmraid/%{version}
%setup -a 6 -a 7 -n dmraid/%{version}
%patch0 -p2
%patch1 -p1
%patch2 -p2
@ -83,6 +87,7 @@ Authors:
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
cp %{SOURCE3} .
%build
@ -100,6 +105,13 @@ export CFLAGS="$RPM_OPT_FLAGS"
--with-user=`id -nu` --with-group=`id -ng` \
--enable-libselinux --enable-libsepol
make
pushd libdmraid-events
CPATH=../include LIBRARY_PATH=../lib make
ln -sf libdmraid-events.so.0 libdmraid-events.so
popd
pushd reg_tool
make
popd
%install
make install DESTDIR=$RPM_BUILD_ROOT
@ -112,6 +124,10 @@ install -m744 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/boot.dmraid
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
install -m 755 %{S:4} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-dmraid.sh
install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dmraid.sh
install -D -m755 libdmraid-events/libdmraid-events.so.0 $RPM_BUILD_ROOT/%{_lib}/libdmraid-events.so.0
cp -aL libdmraid-events/libdmraid-events.so $RPM_BUILD_ROOT/%{_lib}/libdmraid-events.so
install -D -m755 reg_tool/dm_dso_reg_tool $RPM_BUILD_ROOT/sbin/dm_dso_reg_tool
install -D -m644 reg_tool/dm_dso_reg_tool.8 $RPM_BUILD_ROOT/usr/share/man/man8/dm_dso_reg_tool.8
%post
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
@ -137,8 +153,13 @@ install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dmraid.sh
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-dmraid.sh
/lib/mkinitrd/scripts/boot-dmraid.sh
/%{_lib}/libdmraid-events.so.0
/%{_lib}/libdmraid-events.so
/sbin/dm_dso_reg_tool
%changelog
* Wed Sep 10 2008 xwhu@novell.com
- Adding DSO for event-handling [fate#304214]
* Wed Sep 03 2008 hare@suse.de
- Call mkinitrd_setup during %%post and %%postun (bnc#413709)
* Wed Aug 20 2008 mkoenig@suse.de

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03a20fce0539efd4a7ad2842083cb19e03553ba95fc09b4a29af3728037767bf
size 16371