Accepting request 31725 from Base:System
Copy from Base:System/dmraid based on submit request 31725 from user neilbrown OBS-URL: https://build.opensuse.org/request/show/31725 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dmraid?expand=0&rev=28
This commit is contained in:
commit
0be6e9b824
@ -1,21 +0,0 @@
|
||||
diff -Napur _libdmraid-events//Makefile libdmraid-events/Makefile
|
||||
--- _libdmraid-events//Makefile 2009-07-30 00:27:43.000000000 +0200
|
||||
+++ libdmraid-events/Makefile 2009-07-30 00:27:58.000000000 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
##########################################################################
|
||||
|
||||
CC=gcc
|
||||
-LDFLAGS +=-ldevmapper -ldevmapper-event
|
||||
+LDFLAGS +=-L../lib -ldevmapper -ldevmapper-event
|
||||
INSTALL =/usr/bin/install -c
|
||||
LIB_DIR=/usr/lib
|
||||
LD_CFG=/sbin/ldconfig
|
||||
@@ -39,7 +39,7 @@ GROUP =-g root
|
||||
|
||||
|
||||
libdmraid-events:
|
||||
- $(CC) $@.c -ldmraid -lm -g -fPIC -Wall -shared -Wl,-soname,$@.$(LIB_SUFFIX).$(LIB_VERSION) -o $@.$(LIB_SUFFIX).$(LIB_VERSION)
|
||||
+ $(CC) $@.c -L../lib -ldmraid -lm -g -fPIC -Wall -shared -Wl,-soname,$@.$(LIB_SUFFIX).$(LIB_VERSION) -o $@.$(LIB_SUFFIX).$(LIB_VERSION)
|
||||
|
||||
install:
|
||||
$(INSTALL) -D $(OWNER) $(GROUP) -m 755 libdmraid-events.$(LIB_SUFFIX).$(LIB_VERSION) \
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7281f5be8b419fbfd83405207a8d6721d2ae44a01749c0eb8b67823127d17ca9
|
||||
size 12424
|
@ -1,8 +1,10 @@
|
||||
Index: 1.0.0.rc15/lib/activate/devmapper.c
|
||||
===================================================================
|
||||
--- 1.0.0.rc15.orig/lib/activate/devmapper.c 2008-06-20 18:03:04.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/activate/devmapper.c 2008-09-24 16:20:58.000000000 +0200
|
||||
@@ -207,6 +207,82 @@ run_task(struct lib_context *lc, struct
|
||||
---
|
||||
lib/activate/devmapper.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 80 insertions(+)
|
||||
|
||||
--- 1.0.0.rc16.orig/lib/activate/devmapper.c
|
||||
+++ 1.0.0.rc16/lib/activate/devmapper.c
|
||||
@@ -207,6 +207,82 @@ run_task(struct lib_context *lc, struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -84,10 +86,10 @@ Index: 1.0.0.rc15/lib/activate/devmapper.c
|
||||
+
|
||||
/* Create a mapped device. */
|
||||
int
|
||||
dm_create(struct lib_context *lc, struct raid_set *rs, char *table)
|
||||
dm_create(struct lib_context *lc, struct raid_set *rs, char *table, char *name)
|
||||
@@ -216,6 +292,10 @@ dm_create(struct lib_context *lc, struct
|
||||
/* Create <dev_name> */
|
||||
ret = run_task(lc, rs, table, DM_DEVICE_CREATE);
|
||||
ret = run_task(lc, rs, table, DM_DEVICE_CREATE, name);
|
||||
|
||||
+ /* Set geometry */
|
||||
+ if (ret)
|
||||
|
@ -1,59 +0,0 @@
|
||||
Index: 1.0.0.rc15/lib/format/ddf/ddf1.c
|
||||
===================================================================
|
||||
--- 1.0.0.rc15.orig/lib/format/ddf/ddf1.c 2008-06-20 18:04:10.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/format/ddf/ddf1.c 2008-09-24 16:10:34.000000000 +0200
|
||||
@@ -40,6 +40,9 @@ static const char *handler = HANDLER;
|
||||
// #define PCI_VENDOR_ID_ADAPTEC 0x9004
|
||||
#define PCI_VENDOR_ID_ADAPTEC2 0x9005
|
||||
|
||||
+/* PCI IDs for LSI */
|
||||
+#define PCI_VENDOR_ID_LSI 0x1000
|
||||
+
|
||||
/* Map DDF1 disk status to dmraid status */
|
||||
static enum status
|
||||
disk_status(struct ddf1_phys_drive *disk)
|
||||
@@ -378,6 +381,13 @@ read_extended(struct lib_context *lc, st
|
||||
ddf1->adaptec_mode = 1;
|
||||
}
|
||||
|
||||
+ if (ddf1->adapter &&
|
||||
+ ddf1->adapter->pci_vendor == PCI_VENDOR_ID_LSI) {
|
||||
+ log_notice(lc, "%s: LSI mode discovered on %s",
|
||||
+ handler, di->path);
|
||||
+ ddf1->lsi_mode = 1;
|
||||
+ }
|
||||
+
|
||||
/* Read physical drive characteristic data */
|
||||
where = to_bytes(pri->primary_table_lba + pri->disk_data_offset);
|
||||
if (!(ddata = ddf1->disk_data =
|
||||
@@ -692,10 +702,14 @@ name(struct lib_context *lc, struct ddf1
|
||||
} else {
|
||||
char *b;
|
||||
|
||||
- for (b = buf + prefix, i = 0; i < 24; b += 8, i += 4)
|
||||
- sprintf(b, "%02x%02x%02x%02x",
|
||||
- vd->guid[i], vd->guid[i + 1],
|
||||
- vd->guid[i + 2], vd->guid[i + 3]);
|
||||
+ for (b = buf + prefix, i = 0; i < 24; b += 8, i += 4) {
|
||||
+ if (i == 16 && ddf1->lsi_mode)
|
||||
+ sprintf(b, "00000000");
|
||||
+ else
|
||||
+ sprintf(b, "%02x%02x%02x%02x",
|
||||
+ vd->guid[i], vd->guid[i+1],
|
||||
+ vd->guid[i+2], vd->guid[i+3]);
|
||||
+ }
|
||||
}
|
||||
|
||||
out:
|
||||
Index: 1.0.0.rc15/lib/format/ddf/ddf1.h
|
||||
===================================================================
|
||||
--- 1.0.0.rc15.orig/lib/format/ddf/ddf1.h 2008-06-12 12:54:32.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/format/ddf/ddf1.h 2008-09-24 16:03:52.000000000 +0200
|
||||
@@ -264,6 +264,7 @@ struct ddf1 {
|
||||
int disk_format;
|
||||
int in_cpu_format;
|
||||
int adaptec_mode;
|
||||
+ int lsi_mode;
|
||||
};
|
||||
|
||||
#endif /* FORMAT_HANDLER */
|
@ -1,15 +0,0 @@
|
||||
Index: 1.0.0.rc15/lib/internal.h
|
||||
===================================================================
|
||||
--- 1.0.0.rc15.orig/lib/internal.h 2008-06-12 12:54:32.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/internal.h 2008-09-25 15:41:37.000000000 +0200
|
||||
@@ -49,8 +49,8 @@
|
||||
#define u_int64_t uint64_t
|
||||
#endif
|
||||
|
||||
-#define min(a, b) (a) < (b) ? (a) : (b)
|
||||
-#define max(a, b) (a) > (b) ? (a) : (b)
|
||||
+#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
+#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*a))
|
||||
#define ARRAY_END(a) (a + ARRAY_SIZE(a))
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up 1.0.0.rc15/lib/format/ataraid/isw.c~ 1.0.0.rc15/lib/format/ataraid/isw.c
|
||||
--- 1.0.0.rc15/lib/format/ataraid/isw.c~ 2008-09-17 08:58:52.000000000 -0400
|
||||
+++ 1.0.0.rc15/lib/format/ataraid/isw.c 2009-02-05 07:04:35.576126020 -0500
|
||||
@@ -155,7 +155,7 @@ name(struct lib_context *lc, struct raid
|
||||
|
||||
while (i--) {
|
||||
if (disk == isw->disk + i) {
|
||||
- id = i % 2;
|
||||
+ id = i / 2;
|
||||
goto ok;
|
||||
}
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
diff -up 1.0.0.rc15/lib/format/ataraid/isw.c~ 1.0.0.rc15/lib/format/ataraid/isw.c
|
||||
--- 1.0.0.rc15/lib/format/ataraid/isw.c~ 2009-04-10 14:12:14.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/format/ataraid/isw.c 2009-04-10 14:38:56.000000000 +0200
|
||||
@@ -81,15 +81,43 @@ is_raid10(struct isw_dev *dev)
|
||||
}
|
||||
|
||||
/* Find a disk table slot by serial number. */
|
||||
+static const char *dev_info_serial_to_isw(const char *di_serial)
|
||||
+{
|
||||
+ static char isw_serial[1024];
|
||||
+
|
||||
+ int i, isw_serial_len = 0;
|
||||
+
|
||||
+ for (i = 0; di_serial[i] && isw_serial_len < 1023; i++) {
|
||||
+ if (((unsigned char)di_serial[i]) > 0x20) {
|
||||
+ /* ':' is reserved for use in placeholder serial
|
||||
+ * numbers for missing disks */
|
||||
+ if (di_serial[i] == ':')
|
||||
+ isw_serial[isw_serial_len] = ';';
|
||||
+ else
|
||||
+ isw_serial[isw_serial_len] = di_serial[i];
|
||||
+ isw_serial_len++;
|
||||
+ }
|
||||
+ }
|
||||
+ isw_serial[isw_serial_len] = 0;
|
||||
+
|
||||
+ if (isw_serial_len > MAX_RAID_SERIAL_LEN)
|
||||
+ memmove(isw_serial,
|
||||
+ isw_serial + (isw_serial_len - MAX_RAID_SERIAL_LEN),
|
||||
+ MAX_RAID_SERIAL_LEN);
|
||||
+
|
||||
+ return isw_serial;
|
||||
+}
|
||||
+
|
||||
static struct isw_disk *
|
||||
_get_disk(struct isw *isw, struct dev_info *di)
|
||||
{
|
||||
if (di->serial) {
|
||||
int i = isw->num_disks;
|
||||
struct isw_disk *disk = isw->disk;
|
||||
+ const char *isw_serial = dev_info_serial_to_isw(di->serial);
|
||||
|
||||
while (i--) {
|
||||
- if (!strncmp(di->serial, (const char *) disk[i].serial,
|
||||
+ if (!strncmp(isw_serial, (const char *) disk[i].serial,
|
||||
MAX_RAID_SERIAL_LEN))
|
||||
return disk + i;
|
||||
}
|
||||
@@ -866,7 +894,8 @@ rd_by_serial(struct raid_set *rs, const
|
||||
|
||||
list_for_each_entry(rd, &rs->devs, devs) {
|
||||
if (rd->di &&
|
||||
- !strncmp(rd->di->serial, serial, MAX_RAID_SERIAL_LEN))
|
||||
+ !strncmp(dev_info_serial_to_isw(rd->di->serial), serial,
|
||||
+ MAX_RAID_SERIAL_LEN))
|
||||
return rd;
|
||||
}
|
||||
|
||||
@@ -1297,7 +1326,8 @@ isw_config_disks(struct lib_context *lc,
|
||||
struct raid_dev *rd;
|
||||
|
||||
list_for_each_entry(rd, &rs->devs, devs) {
|
||||
- strncpy((char *) disk[i].serial, rd->di->serial,
|
||||
+ strncpy((char *) disk[i].serial,
|
||||
+ dev_info_serial_to_isw(rd->di->serial),
|
||||
MAX_RAID_SERIAL_LEN);
|
||||
disk[i].totalBlocks = rd->di->sectors;
|
||||
|
||||
@@ -2421,7 +2451,8 @@ update_metadata(struct lib_context *lc,
|
||||
while (i--) {
|
||||
/* Check if the disk is listed. */
|
||||
list_for_each_entry(di, LC_DI(lc), list) {
|
||||
- if (!strncmp(di->serial, (const char *) disk[i].serial,
|
||||
+ if (!strncmp(dev_info_serial_to_isw(di->serial),
|
||||
+ (const char *) disk[i].serial,
|
||||
MAX_RAID_SERIAL_LEN))
|
||||
goto goon;
|
||||
}
|
||||
@@ -2517,7 +2548,8 @@ update_metadata(struct lib_context *lc,
|
||||
new_disk->status = CONFIG_ON_DISK |
|
||||
DISK_SMART_EVENT_SUPPORTED |
|
||||
CLAIMED_DISK | DETECTED_DISK | USABLE_DISK | CONFIGURED_DISK;
|
||||
- strncpy((char *) new_disk->serial, di->serial, MAX_RAID_SERIAL_LEN);
|
||||
+ strncpy((char *) new_disk->serial, dev_info_serial_to_isw(di->serial),
|
||||
+ MAX_RAID_SERIAL_LEN);
|
||||
|
||||
/* build new isw_disk array */
|
||||
for (i = 0; i < isw->num_disks; i++) {
|
@ -1,222 +0,0 @@
|
||||
diff -up 1.0.0.rc15/include/dmraid/lib_context.h.rmparts 1.0.0.rc15/include/dmraid/lib_context.h
|
||||
--- 1.0.0.rc15/include/dmraid/lib_context.h.rmparts 2008-06-20 16:17:35.000000000 +0200
|
||||
+++ 1.0.0.rc15/include/dmraid/lib_context.h 2009-02-13 12:03:57.000000000 +0100
|
||||
@@ -169,6 +169,7 @@ enum action {
|
||||
PARTCHAR = 0x20000000,
|
||||
|
||||
#endif
|
||||
+ RMPARTITIONS = 0x40000000,
|
||||
};
|
||||
|
||||
/* Arguments allowed ? */
|
||||
diff -up 1.0.0.rc15/lib/Makefile.in.rmparts 1.0.0.rc15/lib/Makefile.in
|
||||
--- 1.0.0.rc15/lib/Makefile.in.rmparts 2008-06-11 15:07:04.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/Makefile.in 2009-02-13 12:03:57.000000000 +0100
|
||||
@@ -12,6 +12,7 @@ SOURCES=\
|
||||
activate/activate.c \
|
||||
activate/devmapper.c \
|
||||
device/ata.c \
|
||||
+ device/partition.c \
|
||||
device/scan.c \
|
||||
device/scsi.c \
|
||||
display/display.c \
|
||||
diff -up 1.0.0.rc15/lib/device/dev-io.h.rmparts 1.0.0.rc15/lib/device/dev-io.h
|
||||
--- 1.0.0.rc15/lib/device/dev-io.h.rmparts 2008-06-12 12:54:32.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/device/dev-io.h 2009-02-13 12:03:57.000000000 +0100
|
||||
@@ -19,5 +19,6 @@
|
||||
|
||||
int discover_devices(struct lib_context *lc, char **devnodes);
|
||||
int removable_device(struct lib_context *lc, char *dev_path);
|
||||
+int remove_device_partitions(struct lib_context *lc, void *rs, int dummy);
|
||||
|
||||
#endif
|
||||
diff -up /dev/null 1.0.0.rc15/lib/device/partition.c
|
||||
--- /dev/null 2009-02-13 08:38:43.364262886 +0100
|
||||
+++ 1.0.0.rc15/lib/device/partition.c 2009-02-13 12:03:57.000000000 +0100
|
||||
@@ -0,0 +1,59 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Hans de Goede <hdegoede@redhat.com>, Red Hat Inc.
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
+ * See file LICENSE at the top of this source tree for license information.
|
||||
+ */
|
||||
+#include <linux/blkpg.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <errno.h>
|
||||
+#include <fcntl.h>
|
||||
+#include "internal.h"
|
||||
+
|
||||
+static int
|
||||
+_remove_subset_partitions(struct lib_context *lc, struct raid_set *rs)
|
||||
+{
|
||||
+ struct raid_dev *rd;
|
||||
+ struct blkpg_partition part = { 0, };
|
||||
+ struct blkpg_ioctl_arg io = {
|
||||
+ .op = BLKPG_DEL_PARTITION,
|
||||
+ .datalen = sizeof(part),
|
||||
+ .data = &part,
|
||||
+ };
|
||||
+
|
||||
+ list_for_each_entry(rd, &rs->devs, devs) {
|
||||
+ int fd = open(rd->di->path, O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ LOG_ERR(lc, 0, "opening %s: %s\n", rd->di->path,
|
||||
+ strerror(errno));
|
||||
+
|
||||
+ /* There is no way to enumerate partitions */
|
||||
+ for (part.pno = 1; part.pno <= 256; part.pno++) {
|
||||
+ if (ioctl(fd, BLKPG, &io) < 0 && errno != ENXIO &&
|
||||
+ (part.pno < 16 || errno != EINVAL))
|
||||
+ LOG_ERR(lc, 0,
|
||||
+ "removing part %d from %s: %s\n",
|
||||
+ part.pno, rd->di->path,
|
||||
+ strerror(errno));
|
||||
+ }
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+/* Remove the partition block devices (ie sda1) from block devices (ie sda)
|
||||
+ used in the set, so that things like hal / blkid won't try to access the
|
||||
+ disks directly */
|
||||
+int
|
||||
+remove_device_partitions(struct lib_context *lc, void *v, int dummy)
|
||||
+{
|
||||
+ struct raid_set *subset, *rs = v;
|
||||
+
|
||||
+ /* Recursively walk down the chain of stacked RAID sets */
|
||||
+ list_for_each_entry(subset, &rs->sets, list) {
|
||||
+ /* Remove partitions from devices of set below this one */
|
||||
+ if (!T_GROUP(rs) && !remove_device_partitions(lc, subset, 0))
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return _remove_subset_partitions(lc, rs);
|
||||
+}
|
||||
diff -up 1.0.0.rc15/lib/metadata/metadata.c.rmparts 1.0.0.rc15/lib/metadata/metadata.c
|
||||
--- 1.0.0.rc15/lib/metadata/metadata.c.rmparts 2008-09-17 14:58:31.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/metadata/metadata.c 2009-02-13 12:03:57.000000000 +0100
|
||||
@@ -2147,6 +2147,9 @@ lib_perform(struct lib_context *lc, enum
|
||||
if (get_metadata(lc, action, p, argv))
|
||||
ret = p->post(lc, p->pre ? p->pre(p->arg) : p->arg);
|
||||
|
||||
+ if (ret && (RMPARTITIONS & action))
|
||||
+ process_sets(lc, remove_device_partitions, 0, SETS);
|
||||
+
|
||||
if (LOCK == p->lock)
|
||||
unlock_resource(lc, NULL);
|
||||
|
||||
diff -up 1.0.0.rc15/man/dmraid.8.rmparts 1.0.0.rc15/man/dmraid.8
|
||||
--- 1.0.0.rc15/man/dmraid.8.rmparts 2008-06-11 15:07:20.000000000 +0200
|
||||
+++ 1.0.0.rc15/man/dmraid.8 2009-02-13 12:10:11.000000000 +0100
|
||||
@@ -8,6 +8,7 @@ dmraid \- discover, configure and activa
|
||||
[-f|--format FORMAT[,FORMAT...]]
|
||||
[{-P|--partchar} CHAR]
|
||||
[-p|--no_partitions]
|
||||
+ [-Z|--rm_partitions]
|
||||
[--separator SEPARATOR]
|
||||
[-t|--test]
|
||||
[RAID-set...]
|
||||
@@ -110,7 +111,11 @@ In case metadata format handlers are cho
|
||||
Useful if devices have multiple metadata signatures.
|
||||
When activating RAID sets,
|
||||
.B -p
|
||||
-disables the activation of partitions on them.
|
||||
+disables the activation of partitions on them, and
|
||||
+.B -Z
|
||||
+will make dmraid tell the kernel to remove the partitions from the disks
|
||||
+underlying the set, ie if sda is part of the set, remove sda1, sda2, etc.
|
||||
+This prevents applications from directly accessiong the disks bypassing dmraid.
|
||||
RAID set names given on command line don't need to be fully specified
|
||||
(eg, "dmraid -ay sil" would activate all discovered Silicon Image Medley
|
||||
RAID sets).
|
||||
diff -up 1.0.0.rc15/tools/commands.c.rmparts 1.0.0.rc15/tools/commands.c
|
||||
--- 1.0.0.rc15/tools/commands.c.rmparts 2008-06-20 22:25:33.000000000 +0200
|
||||
+++ 1.0.0.rc15/tools/commands.c 2009-02-13 12:03:57.000000000 +0100
|
||||
@@ -38,7 +38,7 @@ static char const *short_opts = "a:hipP:
|
||||
#endif
|
||||
"rR:s::tv"
|
||||
#endif
|
||||
- "VC:S::";
|
||||
+ "VC:S::Z";
|
||||
|
||||
#ifdef HAVE_GETOPTLONG
|
||||
static struct option long_opts[] = {
|
||||
@@ -73,6 +73,7 @@ static struct option long_opts[] = {
|
||||
{"version", no_argument, NULL, 'V'},
|
||||
{"create", required_argument, NULL, 'C'},
|
||||
{"spare", optional_argument, NULL, 'S'},
|
||||
+ {"rm_partitions", no_argument, NULL, 'Z'},
|
||||
{NULL, no_argument, NULL, 0}
|
||||
};
|
||||
#endif /* #ifdef HAVE_GETOPTLONG */
|
||||
@@ -209,6 +210,7 @@ help(struct lib_context *lc, int arg)
|
||||
"\t[-f|--format FORMAT[,FORMAT...]]\n"
|
||||
"\t[-P|--partchar CHAR]\n"
|
||||
"\t[-p|--no_partitions]\n"
|
||||
+ "\t[-Z|--rm_partitions]\n"
|
||||
"\t[--separator SEPARATOR]\n" "\t[RAID-set...]\n", c);
|
||||
log_print(lc, "%s\t{-h|--help}\n", c);
|
||||
log_print(lc, "%s\t{-V/--version}\n", c);
|
||||
@@ -221,7 +223,7 @@ help(struct lib_context *lc, int arg)
|
||||
"\t[-f|--format FORMAT[,FORMAT...]]\n"
|
||||
"\t[-P|--partchar CHAR]\n" "\t[-p|--no_partitions]\n"
|
||||
"\t[--separator SEPARATOR]\n" "\t[-t|--test]\n"
|
||||
- "\t[RAID-set...]\n", c);
|
||||
+ "\t[-Z|--rm_partitions] [RAID-set...]\n", c);
|
||||
log_print(lc,
|
||||
"%s\t{-b|--block_devices} *\n"
|
||||
"\t[-c|--display_columns][FIELD[,FIELD...]]...\n"
|
||||
@@ -274,7 +276,7 @@ static struct actions actions[] = {
|
||||
UNDEF, /* Set in check_activate() by mandatory option argument. */
|
||||
UNDEF,
|
||||
ACTIVATE | DEACTIVATE | FORMAT | HELP | IGNORELOCKING | NOPARTITIONS |
|
||||
- SEPARATOR
|
||||
+ SEPARATOR | RMPARTITIONS
|
||||
#ifndef DMRAID_MINI
|
||||
| DBG | TEST | VERBOSE
|
||||
#endif
|
||||
@@ -293,7 +295,8 @@ static struct actions actions[] = {
|
||||
# endif
|
||||
| RAID_DEVICES | RAID_SETS,
|
||||
ACTIVE | INACTIVE | COLUMN | DBG | DUMP | DMERASE | GROUP | HELP |
|
||||
- IGNORELOCKING | NOPARTITIONS | SEPARATOR | TEST | VERBOSE
|
||||
+ IGNORELOCKING | NOPARTITIONS | SEPARATOR | TEST | VERBOSE |
|
||||
+ RMPARTITIONS
|
||||
#else
|
||||
, UNDEF
|
||||
#endif
|
||||
@@ -310,7 +313,7 @@ static struct actions actions[] = {
|
||||
{'P',
|
||||
PARTCHAR,
|
||||
ACTIVATE | DEACTIVATE,
|
||||
- FORMAT | HELP | IGNORELOCKING | SEPARATOR
|
||||
+ FORMAT | HELP | IGNORELOCKING | SEPARATOR | RMPARTITIONS
|
||||
#ifndef DMRAID_MINI
|
||||
| DBG | TEST | VERBOSE
|
||||
#endif
|
||||
@@ -323,7 +326,7 @@ static struct actions actions[] = {
|
||||
{'p',
|
||||
NOPARTITIONS,
|
||||
ACTIVATE | DEACTIVATE,
|
||||
- FORMAT | HELP | IGNORELOCKING | SEPARATOR
|
||||
+ FORMAT | HELP | IGNORELOCKING | SEPARATOR | RMPARTITIONS
|
||||
#ifndef DMRAID_MINI
|
||||
| DBG | TEST | VERBOSE
|
||||
#endif
|
||||
@@ -573,6 +576,15 @@ static struct actions actions[] = {
|
||||
check_spare_argument,
|
||||
LC_HOT_SPARE_SET,
|
||||
},
|
||||
+ {'Z',
|
||||
+ RMPARTITIONS,
|
||||
+ ACTIVATE, /* We cannot undo this on DEACTIVATE ! */
|
||||
+ DBG | FORMAT | HELP | IGNORELOCKING | NOPARTITIONS | VERBOSE |
|
||||
+ SEPARATOR,
|
||||
+ ARGS,
|
||||
+ NULL,
|
||||
+ 0,
|
||||
+ },
|
||||
};
|
||||
|
||||
/*
|
@ -1,16 +0,0 @@
|
||||
Index: 1.0.0.rc15/lib/device/scsi.c
|
||||
===================================================================
|
||||
--- 1.0.0.rc15.orig/lib/device/scsi.c 2008-09-17 15:20:33.000000000 +0200
|
||||
+++ 1.0.0.rc15/lib/device/scsi.c 2008-10-14 15:45:20.000000000 +0200
|
||||
@@ -110,7 +110,10 @@ get_scsi_serial(struct lib_context *lc,
|
||||
}
|
||||
|
||||
ret = ret &&
|
||||
- (di->serial = dbg_strdup((char *) &response[p->start + 1]));
|
||||
+ (di->serial =
|
||||
+ dbg_strdup(remove_white_space(lc,
|
||||
+ (char *) &response[p->start + 1],
|
||||
+ serial_len)));
|
||||
}
|
||||
|
||||
dbg_free(response);
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30847258b7f946ed908e79af4058bbf2c9a3791728b8231f7c490ca601566c05
|
||||
size 190475
|
6268
dmraid-1.0.0.rc16-cvs-2010-02-02.patch
Normal file
6268
dmraid-1.0.0.rc16-cvs-2010-02-02.patch
Normal file
File diff suppressed because it is too large
Load Diff
3
dmraid-1.0.0.rc16.tar.bz2
Normal file
3
dmraid-1.0.0.rc16.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f849c44d041f8891c61419ddf906e6e34b44948939ae9e550be662ffc2492255
|
||||
size 1042907
|
@ -1,41 +0,0 @@
|
||||
Index: libdmraid-events/libdmraid-events.c
|
||||
===================================================================
|
||||
--- libdmraid-events/libdmraid-events.c.orig 2008-07-18 23:30:05.000000000 +0200
|
||||
+++ libdmraid-events/libdmraid-events.c 2009-10-05 23:39:07.000000000 +0200
|
||||
@@ -180,6 +180,7 @@ static int _repopulate(const char* devic
|
||||
}
|
||||
fscanf(fd, "%s", curr->raid_mem[curr->num_sata_drives].major_minor);
|
||||
fclose(fd);
|
||||
+ closedir(dir);
|
||||
curr->raid_mem[curr->num_sata_drives].port_num = atoi(dir_ent[i]->d_name);
|
||||
syslog(LOG_INFO, "Added disk %s (%s) port=%i\n",
|
||||
disk, curr->raid_mem[curr->num_sata_drives].major_minor, curr->raid_mem[curr->num_sata_drives].port_num);
|
||||
@@ -969,6 +970,7 @@ int register_device(const char *device,
|
||||
}
|
||||
fscanf(fd, "%s", rv_next->raid_mem[m].major_minor);
|
||||
fclose(fd);
|
||||
+ closedir(dir);
|
||||
rv_next->raid_mem[m].port_num = atoi(dir_ent[j]->d_name);
|
||||
m++;
|
||||
break;
|
||||
Index: lib/device/partition.c
|
||||
===================================================================
|
||||
--- lib/device/partition.c.orig 2009-10-05 23:39:06.000000000 +0200
|
||||
+++ lib/device/partition.c 2009-10-06 00:19:12.000000000 +0200
|
||||
@@ -30,12 +30,15 @@ _remove_subset_partitions(struct lib_con
|
||||
/* There is no way to enumerate partitions */
|
||||
for (part.pno = 1; part.pno <= 256; part.pno++) {
|
||||
if (ioctl(fd, BLKPG, &io) < 0 && errno != ENXIO &&
|
||||
- (part.pno < 16 || errno != EINVAL))
|
||||
+ (part.pno < 16 || errno != EINVAL)) {
|
||||
+ close(fd);
|
||||
LOG_ERR(lc, 0,
|
||||
"removing part %d from %s: %s\n",
|
||||
part.pno, rd->di->path,
|
||||
strerror(errno));
|
||||
+ }
|
||||
}
|
||||
+ close(fd);
|
||||
}
|
||||
return 1;
|
||||
}
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 2 03:46:18 UTC 2010 - nfbrown@novell.com
|
||||
|
||||
- new upstream version, including latest CVS updates.
|
||||
Both libdmraid-events and dm_dso_reg_tool are not
|
||||
in the main package.
|
||||
- dm_dso_reg_tool has been renamed to dmevent_tool in
|
||||
line with upstream change.
|
||||
bnc#528796 bnc#511329
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 5 22:19:52 UTC 2009 - crrodriguez@opensuse.org
|
||||
|
||||
|
115
dmraid.spec
115
dmraid.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package dmraid (Version 1.0.0.rc15)
|
||||
# spec file for package dmraid (Version 1.0.0.rc16)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -23,33 +23,21 @@ BuildRequires: device-mapper-devel zlib-devel
|
||||
BuildRequires: libselinux-devel
|
||||
Requires: kpartx
|
||||
Url: http://people.redhat.com/~heinzm/sw/dmraid/src/
|
||||
License: GPL v2 or later
|
||||
License: GPLv2+
|
||||
Group: System/Base
|
||||
AutoReqProv: on
|
||||
Summary: A Device-Mapper Software RAID Support Tool
|
||||
Version: 1.0.0.rc15
|
||||
Release: 9
|
||||
Version: 1.0.0.rc16
|
||||
Release: 1
|
||||
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
|
||||
Patch3: dmraid_duplicate_args.patch
|
||||
Patch4: dmraid-1.0.0.rc13-geometry.patch
|
||||
Patch6: dmraid-1.0.0.rc15-fix_macro.patch
|
||||
Patch10: dmraid-1.0.0.rc14-fixup_lsi1068e.patch
|
||||
Patch11: dmraid-1.0.0.rc15-scsi_serial_remove_ws.patch
|
||||
Patch13: dmraid-1.0.0.rc15-isw-raid10.patch
|
||||
Patch14: dmraid-1.0.0.rc15-rm_partitions.patch
|
||||
Patch15: dmraid-1.0.0.rc15-isw-serial.patch
|
||||
Patch16: dmraid-fdleak.patch
|
||||
Patch500: ARM_libdmraid_ldflags.diff
|
||||
# libdmraid-events
|
||||
Patch50: libdmraid-events.dif
|
||||
Patch1: dmraid-1.0.0.rc16-cvs-2010-02-02.patch
|
||||
Patch2: dmraid-1.0.0.rc13-geometry.patch
|
||||
Patch3: lib-install.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: %fillup_prereq
|
||||
|
||||
@ -75,57 +63,15 @@ The following ATARAID types are supported:
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Heinz Mauelshagen
|
||||
|
||||
%package -n libdmraid-events0
|
||||
License: GPL v2 or later
|
||||
Group: System/Base
|
||||
Summary: A Device-Mapper Software RAID Support Tool
|
||||
|
||||
%description -n libdmraid-events0
|
||||
This software discovers, activates, deactivates, and displays
|
||||
properties of software RAID sets, such as ATARAID, and contained DOS
|
||||
partitions.
|
||||
|
||||
dmraid uses libdevmapper and the device-mapper kernel runtime to create
|
||||
devices with respective mappings for the ATARAID sets discovered.
|
||||
|
||||
The following ATARAID types are supported:
|
||||
|
||||
- Highpoint HPT37X
|
||||
|
||||
- Highpoint HPT45X
|
||||
|
||||
- Intel Software RAID
|
||||
|
||||
- Promise FastTrak
|
||||
|
||||
- Silicon Image Medley
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Heinz Mauelshagen
|
||||
|
||||
%prep
|
||||
%setup -a 6 -a 7 -n dmraid/%{version}
|
||||
%patch0 -p2
|
||||
%setup -n dmraid/%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch6 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16
|
||||
pushd libdmraid*
|
||||
%patch50
|
||||
%patch500 -p1
|
||||
popd
|
||||
cp %{SOURCE3} .
|
||||
|
||||
%build
|
||||
@ -135,26 +81,21 @@ rm -r autom4te.cache
|
||||
# Update config.{guess,sub}
|
||||
%{?suse_update_config}
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
./configure --prefix=%{_prefix} \
|
||||
--infodir=%{_infodir} \
|
||||
--libdir=%{_libdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--sbindir=/sbin \
|
||||
./configure --prefix=$RPM_BUILD_ROOT%{_prefix} \
|
||||
--infodir=$RPM_BUILD_ROOT%{_infodir} \
|
||||
--libdir=$RPM_BUILD_ROOT/%_lib \
|
||||
--mandir=$RPM_BUILD_ROOT%{_mandir} \
|
||||
--includedir=$RPM_BUILD_ROOT%{_includedir} \
|
||||
--sbindir=$RPM_BUILD_ROOT/sbin \
|
||||
--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
|
||||
rm -rf $RPM_BUILD_ROOT/usr/include/dmraid
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/libdmraid.a
|
||||
rm $RPM_BUILD_ROOT/%_lib/libdmraid.a
|
||||
rm $RPM_BUILD_ROOT/%_lib/libdmraid.so
|
||||
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
install -m644 %{SOURCE1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.dmraid
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
@ -162,10 +103,6 @@ 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 -a 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
|
||||
@ -178,18 +115,14 @@ install -D -m644 reg_tool/dm_dso_reg_tool.8 $RPM_BUILD_ROOT/usr/share/man/man8/d
|
||||
%preun
|
||||
%stop_on_removal
|
||||
|
||||
%post -n libdmraid-events0 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libdmraid-events0 -p /sbin/ldconfig
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
|
||||
&& rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
#%{_libdir}/libdmraid.so
|
||||
/sbin/dmraid
|
||||
/sbin/dmevent_tool
|
||||
%{_mandir}/man8/*
|
||||
%doc LICENSE LICENSE_GPL LICENSE_LGPL README README.SuSE TODO doc/*
|
||||
/var/adm/fillup-templates/sysconfig.dmraid
|
||||
@ -198,11 +131,7 @@ install -D -m644 reg_tool/dm_dso_reg_tool.8 $RPM_BUILD_ROOT/usr/share/man/man8/d
|
||||
%dir /lib/mkinitrd/scripts
|
||||
/lib/mkinitrd/scripts/setup-dmraid.sh
|
||||
/lib/mkinitrd/scripts/boot-dmraid.sh
|
||||
/%{_lib}/libdmraid-events.so
|
||||
/sbin/dm_dso_reg_tool
|
||||
|
||||
%files -n libdmraid-events0
|
||||
%defattr(-, root, root)
|
||||
/%{_lib}/libdmraid-events.so.0
|
||||
/%{_lib}/libdmraid-events-isw.so
|
||||
/%{_lib}/libdmraid.so.1.0.0.rc16-3
|
||||
|
||||
%changelog
|
||||
|
@ -1,29 +0,0 @@
|
||||
Nur in 1.0.0.rc11/lib/misc: lib_context.c~.
|
||||
Nur in 1.0.0.rc11: TAGS.
|
||||
diff -pur 1.0.0.rc11.orig/tools/commands.c 1.0.0.rc11/tools/commands.c
|
||||
--- 1.0.0.rc11.orig/tools/commands.c 2006-03-21 10:49:28.000000000 +0100
|
||||
+++ 1.0.0.rc11/tools/commands.c 2006-08-29 10:06:00.000000000 +0200
|
||||
@@ -127,10 +127,18 @@ static int check_identifiers(struct lib_
|
||||
const char delim = *OPT_STR_SEPARATOR(lc);
|
||||
char *p = optarg;
|
||||
|
||||
- p = remove_white_space(lc, p, strlen(p));
|
||||
- p = collapse_delimiter(lc, p, strlen(p), delim);
|
||||
- if (!lc_strcat_opt(lc, o, p, delim))
|
||||
- return 0;
|
||||
+ if (o == LC_COLUMN) {
|
||||
+ while (p && *p == 'c') {
|
||||
+ lc_inc_opt(lc, o);
|
||||
+ p++;
|
||||
+ }
|
||||
+ }
|
||||
+ if (p && *p) {
|
||||
+ p = remove_white_space(lc, p, strlen(p));
|
||||
+ p = collapse_delimiter(lc, p, strlen(p), delim);
|
||||
+ if (!lc_strcat_opt(lc, o, p, delim))
|
||||
+ return 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
lc_inc_opt(lc, o);
|
||||
Nur in 1.0.0.rc11/tools: commands.c~.
|
@ -1,132 +0,0 @@
|
||||
diff -pur dmraid/1.0.0.rc10.orig/include/Makefile.in dmraid/1.0.0.rc10/include/Makefile.in
|
||||
--- dmraid/1.0.0.rc10.orig/include/Makefile.in 2006-02-17 17:19:25.000000000 +0100
|
||||
+++ dmraid/1.0.0.rc10/include/Makefile.in 2006-08-08 16:36:21.000000000 +0200
|
||||
@@ -17,14 +17,14 @@ include $(top_srcdir)/make.tmpl
|
||||
|
||||
install_dmraid_headers: $(HEADERS)
|
||||
@echo "Installing $(HEADERS) in $(includedir)/dmraid"
|
||||
- mkdir -p $(includedir)/dmraid
|
||||
- $(INSTALL) $(STRIP) $(HEADERS) $(includedir)/dmraid
|
||||
+ mkdir -p $(DESTDIR)$(includedir)/dmraid
|
||||
+ $(INSTALL) $(STRIP) $(HEADERS) $(DESTDIR)$(includedir)/dmraid
|
||||
|
||||
install: install_dmraid_headers
|
||||
|
||||
remove_dmraid_headers:
|
||||
@echo "Removing $(HEADERS) from $(includedir)/dmraid"
|
||||
- rm -f $(includedir)/dmraid
|
||||
+ rm -f $(DESTDIR)$(includedir)/dmraid
|
||||
|
||||
remove: remove_dmraid_headers
|
||||
|
||||
Nur in dmraid/1.0.0.rc10/lib/activate: activate.c~.
|
||||
diff -pur dmraid/1.0.0.rc10.orig/lib/Makefile.in dmraid/1.0.0.rc10/lib/Makefile.in
|
||||
--- dmraid/1.0.0.rc10.orig/lib/Makefile.in 2006-02-17 17:19:25.000000000 +0100
|
||||
+++ dmraid/1.0.0.rc10/lib/Makefile.in 2006-08-09 10:56:06.000000000 +0200
|
||||
@@ -62,16 +62,16 @@ include $(top_srcdir)/make.tmpl
|
||||
|
||||
install_dmraid_libs: $(INSTALL_TARGETS)
|
||||
@echo "Installing $(INSTALL_TARGETS) in $(libdir)"; \
|
||||
- mkdir -p $(libdir); \
|
||||
+ mkdir -p $(DESTDIR)$(libdir); \
|
||||
for f in $(INSTALL_TARGETS); \
|
||||
do \
|
||||
n=$$(basename $${f}) ; \
|
||||
if [[ "$$n" =~ '.so$$' ]]; then \
|
||||
$(INSTALL) -m 555 $(STRIP) \
|
||||
- $$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
|
||||
- $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \
|
||||
+ $$f $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
|
||||
+ $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(DESTDIR)$(libdir)/$${n}; \
|
||||
else \
|
||||
- $(INSTALL) -m 555 $(STRIP) $$f $(libdir)/$${n}; \
|
||||
+ $(INSTALL) -m 555 $(STRIP) $$f $(DESTDIR)$(libdir)/$${n}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
@@ -82,8 +82,8 @@ remove_dmraid_libs:
|
||||
for f in $(INSTALL_TARGETS); \
|
||||
do \
|
||||
n=$$(basename $${f}) ; \
|
||||
- rm -f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
|
||||
- rm -f $(libdir)/$${n}; \
|
||||
+ rm -f $(DESTDIR)$(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
|
||||
+ rm -f $(DESTDIR)$(libdir)/$${n}; \
|
||||
done
|
||||
|
||||
remove: remove_dmraid_libs
|
||||
Nur in dmraid/1.0.0.rc10/lib: Makefile.in~.
|
||||
diff -pur dmraid/1.0.0.rc10.orig/make.tmpl.in dmraid/1.0.0.rc10/make.tmpl.in
|
||||
--- dmraid/1.0.0.rc10.orig/make.tmpl.in 2006-02-17 17:18:27.000000000 +0100
|
||||
+++ dmraid/1.0.0.rc10/make.tmpl.in 2006-08-08 16:35:32.000000000 +0200
|
||||
@@ -21,8 +21,8 @@ LD_DEPS += @LD_DEPS@
|
||||
SOFLAG += @SOFLAG@
|
||||
|
||||
# Setup directory variables
|
||||
-prefix = $(DESTDIR)@prefix@
|
||||
-exec_prefix = $(DESTDIR)@exec_prefix@
|
||||
+prefix = @prefix@
|
||||
+exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
ifeq ("@KLIBC@", "no")
|
||||
libdir = @libdir@
|
||||
@@ -31,9 +31,9 @@ ifeq ("@KLIBC@", "no")
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
else
|
||||
- libdir = $(DESTDIR)@KLIBC_LIB_DIR@
|
||||
- sbindir = $(DESTDIR)@KLIBC_SBIN_DIR@
|
||||
- includedir = $(DESTDIR)@KLIBC_INCLUDE_DIR@
|
||||
+ libdir = @KLIBC_LIB_DIR@
|
||||
+ sbindir = @KLIBC_SBIN_DIR@
|
||||
+ includedir = @KLIBC_INCLUDE_DIR@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
endif
|
||||
diff -pur dmraid/1.0.0.rc10.orig/man/Makefile.in dmraid/1.0.0.rc10/man/Makefile.in
|
||||
--- dmraid/1.0.0.rc10.orig/man/Makefile.in 2006-02-17 17:19:25.000000000 +0100
|
||||
+++ dmraid/1.0.0.rc10/man/Makefile.in 2006-08-08 16:35:32.000000000 +0200
|
||||
@@ -20,8 +20,8 @@ install_dmraid_man:
|
||||
mkdir -p $(MAN8DIR); \
|
||||
for f in $(MAN8); \
|
||||
do \
|
||||
- $(RM) $(MAN8DIR)/$$f; \
|
||||
- @INSTALL@ -D -m 444 $$f $(MAN8DIR)/$$f; \
|
||||
+ $(RM) $(DESTDIR)$(MAN8DIR)/$$f; \
|
||||
+ @INSTALL@ -D -m 444 $$f $(DESTDIR)$(MAN8DIR)/$$f; \
|
||||
done
|
||||
|
||||
install: install_dmraid_man
|
||||
@@ -30,7 +30,7 @@ remove_dmraid_man:
|
||||
@echo "Removing $(MAN8) in $(MAN8DIR)"; \
|
||||
for f in $(MAN8); \
|
||||
do \
|
||||
- $(RM) $(MAN8DIR)/$$f; \
|
||||
+ $(RM) $(DESTDIR)$(MAN8DIR)/$$f; \
|
||||
done
|
||||
|
||||
remove: remove_dmraid_man
|
||||
diff -pur dmraid/1.0.0.rc10.orig/tools/Makefile.in dmraid/1.0.0.rc10/tools/Makefile.in
|
||||
--- dmraid/1.0.0.rc10.orig/tools/Makefile.in 2006-02-17 21:16:32.000000000 +0100
|
||||
+++ dmraid/1.0.0.rc10/tools/Makefile.in 2006-08-09 11:08:10.000000000 +0200
|
||||
@@ -60,8 +60,8 @@ dmraid: $(OBJECTS) $(top_srcdir)/lib/lib
|
||||
|
||||
install_dmraid_tools: $(TARGETS)
|
||||
@echo "Installing $(TARGETS) in $(sbindir)"; \
|
||||
- mkdir -p $(sbindir); \
|
||||
- $(INSTALL) $(STRIP) $(TARGETS) $(sbindir)
|
||||
+ mkdir -p $(DESTDIR)$(sbindir); \
|
||||
+ $(INSTALL) $(STRIP) $(TARGETS) $(DESTDIR)$(sbindir)
|
||||
|
||||
install: install_dmraid_tools
|
||||
|
||||
@@ -69,7 +69,7 @@ remove_dmraid_tools:
|
||||
@echo "Removing $(TARGETS) from $(sbindir)"; \
|
||||
for f in $(TARGETS); \
|
||||
do \
|
||||
- rm -f $(sbindir)/$$f; \
|
||||
+ rm -f $(DESTDIR)$(sbindir)/$$f; \
|
||||
done
|
||||
|
||||
remove: remove_dmraid_tools
|
||||
Nur in dmraid/1.0.0.rc10/tools: Makefile.in~.
|
30
lib-install.patch
Normal file
30
lib-install.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Fix two issues with installing shared libraries.
|
||||
|
||||
1/ the [[ =~ ]] operator only treats the RHS as a regular expression
|
||||
if it isn't quoted. So we need to remove the quotes.
|
||||
|
||||
2/ The libdmraid-event-* library is not a shared library in the regular
|
||||
sense. i.e. programs are not linked against it and so do not have the
|
||||
library version number encoded in them.
|
||||
Rather, this is a shared-object that is explicitly loaded by dmeventd
|
||||
on request from dmraid. dmraid asks for "libdmraid-event-ism.so", so
|
||||
that is the only name that the shared object should be stored under.
|
||||
Providing a name with a trailing version number just makes it look like
|
||||
something that it is not.
|
||||
|
||||
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
---
|
||||
lib/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- dmraid.orig/lib/Makefile.in
|
||||
+++ dmraid/lib/Makefile.in
|
||||
@@ -82,7 +82,7 @@ install_dmraid_libs: $(INSTALL_TARGETS)
|
||||
for f in $(INSTALL_TARGETS); \
|
||||
do \
|
||||
n=$$(basename $${f}) ; \
|
||||
- if [[ "$$n" =~ '.so$$' ]]; then \
|
||||
+ if [[ "$$n" =~ .so$$ && ! "$$n" =~ libdmraid-events-.* ]]; then \
|
||||
$(INSTALL) -m 555 $(STRIP) \
|
||||
$$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \
|
||||
$(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \
|
@ -1,11 +0,0 @@
|
||||
--- Makefile
|
||||
+++ Makefile 2008/09/15 11:42:03
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
libdmraid-events:
|
||||
- $(CC) $@.c -ldmraid -lm -g -fPIC -Wall -shared -Wl,-soname,@.$(LIB_SUFFIX).$(LIB_VERSION) -o $@.$(LIB_SUFFIX).$(LIB_VERSION)
|
||||
+ $(CC) $@.c -ldmraid -lm -g -fPIC -Wall -shared -Wl,-soname,$@.$(LIB_SUFFIX).$(LIB_VERSION) -o $@.$(LIB_SUFFIX).$(LIB_VERSION)
|
||||
|
||||
install:
|
||||
$(INSTALL) -D $(OWNER) $(GROUP) -m 755 libdmraid-events.$(LIB_SUFFIX).$(LIB_VERSION) \
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:03a20fce0539efd4a7ad2842083cb19e03553ba95fc09b4a29af3728037767bf
|
||||
size 16371
|
Loading…
Reference in New Issue
Block a user