dmraid: add recipe
PATCH v2 1/1 dmraid: add recipe
There is no update anymore since 2010, but is still supported by some distro such as Ubuntu(trusty 14.04LTS).
--- .../dmraid/dmraid/01_fix_broken_linking.patch | 121 +++++++++ .../dmraid/dmraid/02_disable_dmreg.patch | 133 ++++++++++ .../dmraid/03_fix_hyphen-used-as-minus-sign.patch | 291 +++++++++++++++++++++ .../dmraid/dmraid/04_promise-add-offsets.patch | 13 + .../dmraid/dmraid/05_exit_code.patch | 22 ++ .../dmraid/dmraid/06_support_virtio_devices.patch | 13 + .../dmraid/dmraid/07_isw-probe-hpa.patch | 144 ++++++++++ .../dmraid/08_activate_multiple_raid_sets.patch | 12 + .../dmraid/dmraid/09_pdc_raid10_failure..patch | 14 + .../dmraid/10_ddf1_lsi_persistent_name.patch | 20 ++ .../dmraid/11_fix_isw_sectors_calculation.patch | 14 + .../dmraid/dmraid/12_jmicron_namefix.patch | 20 ++ .../dmraid/dmraid/13_fix_testing.patch | 23 ++ .../dmraid/14_pdc_dump_extended_metadata.patch | 147 +++++++++++ .../15_drop_p_for_partition_conditional.patch | 31 +++ .../dmraid/dmraid/16_change-uuid.patch | 76 ++++++ .../dmraid/17_convert-dmraid45-to-dmraid.patch | 273 +++++++++++++++++++ .../dmraid/18_ignore-too-small-devices.patch | 39 +++ .../dmraid/19_compile-dmraid-in-subdir-tools.patch | 20 ++ .../20_specifies-install-dir-by-DESTDIR.patch | 123 +++++++++ .../recipes-extended/dmraid/dmraid_1.0.0.rc16.bb | 55 ++++ 21 files changed, 1604 insertions(+) create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/03_fix_hyphen-used-as-minus-sign.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/04_promise-add-offsets.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/05_exit_code.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/06_support_virtio_devices.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/07_isw-probe-hpa.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/08_activate_multiple_raid_sets.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/09_pdc_raid10_failure..patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/10_ddf1_lsi_persistent_name.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/11_fix_isw_sectors_calculation.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/12_jmicron_namefix.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/13_fix_testing.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/14_pdc_dump_extended_metadata.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/15_drop_p_for_partition_conditional.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/16_change-uuid.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/17_convert-dmraid45-to-dmraid.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/18_ignore-too-small-devices.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/19_compile-dmraid-in-subdir-tools.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/20_specifies-install-dir-by-DESTDIR.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid_1.0.0.rc16.bb
meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patch new file +121 -0
@@ -0,0 +1,121 @@ +Author: Luke Yelavich <[email protected]> +Description: Fix library symbolic link creation and library linking. +--- 1.0.0.rc16.orig/configure ++++ 1.0.0.rc16/configure +@@ -693,6 +693,7 @@ DEBUG_MALLOC + DMRAID_TEST + DMRAID_VERSION + DMRAID_LIB_VERSION ++DMRAID_LIB_MAJOR_VERSION + DIETLIBC + GROUP + JOBS +@@ -5767,8 +5768,10 @@ fi + + if test "-f lib/version.h"; then + DMRAID_LIB_VERSION="`sed --quiet 's/^.*\(DMRAID_LIB_VERSION\)[^_].*"\(.*\)"/\2/p' lib/version.h`" ++ DMRAID_LIB_MAJOR_VERSION="`grep DMRAID_LIB_MAJOR_VERSION lib/version.h | tr '\t' ' ' | cut -f 3 -d ' '`" + else + DMRAID_LIB_VERSION="Unknown" ++ DMRAID_LIB_MAJOR_VERSION="Unknown" + fi + + +--- 1.0.0.rc16.orig/configure.in ++++ 1.0.0.rc16/configure.in +@@ -178,7 +178,7 @@ if test x$DEBUG_MALLOC = xyes; then + fi + + dnl Mess with default exec_prefix +-if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; ++if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]; + then exec_prefix=""; + fi; + +@@ -220,8 +220,10 @@ fi + + if test "-f lib/version.h"; then + DMRAID_LIB_VERSION="`sed --quiet 's/^.*\(DMRAID_LIB_VERSION\)[[^_]].*"\(.*\)"/\2/p' lib/version.h`" ++ DMRAID_LIB_MAJOR_VERSION="`grep DMRAID_LIB_MAJOR_VERSION lib/version.h | tr '\t' ' ' | cut -f 3 -d ' '`" + else + DMRAID_LIB_VERSION="Unknown" ++ DMRAID_LIB_MAJOR_VERSION="Unknown" + fi + + AC_SUBST(CC) +@@ -232,6 +234,7 @@ AC_SUBST(DEBUG_MALLOC) + AC_SUBST(DMRAID_TEST) + AC_SUBST(DMRAID_VERSION) + AC_SUBST(DMRAID_LIB_VERSION) ++AC_SUBST(DMRAID_LIB_MAJOR_VERSION) + AC_SUBST(DIETLIBC) + AC_SUBST(GROUP) + AC_SUBST(JOBS) +--- 1.0.0.rc16.orig/lib/Makefile.in ++++ 1.0.0.rc16/lib/Makefile.in +@@ -65,6 +65,11 @@ ifeq ("@KLIBC@", "no") + LIB_EVENTS_SHARED=$(top_srcdir)/lib/$(LIB_EVENTS_NAME).so + TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) + INSTALL_TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) ++ ifeq ("@DIETLIBC@", "yes") ++ LIBDMRAIDLIBS += -ldevmapper_dietc ++ else ++ LIBDMRAIDLIBS += -ldevmapper ++ endif + endif + endif + +@@ -82,10 +87,11 @@ install_dmraid_libs: $(INSTALL_TARGETS) + for f in $(INSTALL_TARGETS); \ + do \ + n=$$(basename $${f}) ; \ +- if [[ "$$n" =~ '.so$$' ]]; then \ ++ if echo "$$n" | grep -q '.so$$'; then \ + $(INSTALL) -m 555 $(STRIP) \ + $$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \ +- $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \ ++ mkdir -p $(prefix)/lib; \ ++ cd $(prefix)/lib/ && $(LN_S) -f /lib/$${n}.@DMRAID_LIB_VERSION@ $${n}; \ + else \ + $(INSTALL) -m 555 $(STRIP) $$f $(libdir)/$${n}; \ + fi \ +--- 1.0.0.rc16.orig/make.tmpl.in ++++ 1.0.0.rc16/make.tmpl.in +@@ -44,6 +44,7 @@ endif + OWNER = @OWNER@ + GROUP = @GROUP@ + DMRAID_LIB_VERSION = @DMRAID_LIB_VERSION@ ++DMRAID_LIB_MAJOR_VERSION = @DMRAID_LIB_MAJOR_VERSION@ + + # The number of jobs to run, if blank, defaults to the make standard + ifndef MAKEFLAGS +@@ -136,7 +137,7 @@ $(TARGETS): $(OBJECTS) + + %.so: $(OBJECTS) + $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \ +- -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event ++ -Wl,--version-script,.export.sym $(OBJECTS) $(LIBDMRAIDLIBS) -o $@ -ldevmapper-event + + $(LIB_STATIC): $(OBJECTS) + $(RM) $@ +--- 1.0.0.rc16.orig/tools/Makefile.in ++++ 1.0.0.rc16/tools/Makefile.in +@@ -34,12 +34,16 @@ ifeq ("@KLIBC@", "yes") + DMRAIDLIBS += -ldevmapper_klibc + else + ifeq ("@DIETLIBC@", "yes") +- DMRAIDLIBS += -ldevmapper_dietc ++ ifeq ("@LIB_SO@", "no") ++ DMRAIDLIBS += -ldevmapper_dietc ++ endif + ifeq ("@STATIC_LINK@", "no") + DMEVENTTOOLLIBS = -ldevmapper-event_dietc + endif + else +- DMRAIDLIBS += -ldevmapper ++ ifeq ("@LIB_SO@", "no") ++ DMRAIDLIBS += -ldevmapper ++ endif + ifeq ("@STATIC_LINK@", "no") + DMEVENTTOOLLIBS = -ldevmapper-event + endif
meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch new file +71 -0
71 lines not on this page · raw message
+ dso_end_rebuild;
+ hot_spare_add;
+ dso_get_members;
+- dm_register_device;
+- dm_unregister_device;
+ dm_all_monitored;
+ local:
+ *;
+--- 1.0.0.rc16.orig/lib/activate/activate.c
++++ 1.0.0.rc16/lib/activate/activate.c
+@@ -849,18 +849,12 @@ enum dm_what { DM_ACTIVATE, DM_REGISTER
+ static int
+ dm_register_for_event(char *dev_name, char *lib_name)
+ {
+-#ifdef DMRAID_AUTOREGISTER +- dm_register_device(dev_name, lib_name); +-#endif
+ return 1;
+ }
+
+ static int
+ dm_unregister_for_event(char *dev_name, char *lib_name)
+ {
+-#ifdef DMRAID_AUTOREGISTER +- dm_unregister_device(dev_name, lib_name); +-#endif
+ return 1;
+ }
+
+@@ -874,6 +868,8 @@ do_device(struct lib_context *lc, struct
+ if (OPT_TEST(lc))
+ return 1;
+
++ return 1;
++
+ struct dmraid_format *fmt = get_format(rs);
+
+ if (fmt->name != NULL) {
+--- 1.0.0.rc16.orig/lib/metadata/reconfig.c
++++ 1.0.0.rc16/lib/metadata/reconfig.c
+@@ -242,20 +242,16 @@ add_dev_to_raid(struct lib_context *lc,
+ * metadata on disks to OK state.
+ */
+ /* Create lib-events library name */
+- if (fmt->name) {
++ /*if (fmt->name) {
+ strncpy(lib_name, "libdmraid-events-", LIB_NAME_LENGTH);
+ strncat(lib_name, fmt->name,
+ LIB_NAME_LENGTH-strlen(fmt->name)-3);
+ strncat(lib_name, ".so", 3);
+ } else
+ goto err;
+-
+- /* Check registration */
+- if (!dm_monitored_events(&pending, sub_rs->name, lib_name)) {
+- /* If NOT registered update metadata to OK state. */++*/
+ if (check_rd->fmt->metadata_handler)
+ check_rd->fmt->metadata_handler(lc, UPDATE_REBUILD_STATE, NULL, (void *) rs);
+- }
+ }
+ #endif
meta-oe/recipes-extended/dmraid/dmraid/03_fix_hyphen-used-as-minus-sign.patch new file +291 -0
291 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/04_promise-add-offsets.patch new file +13 -0
@@ -0,0 +1,13 @@ +Author: Luke Yelavich <[email protected]> +Description: Add extra offsets where promise metadata can be found. +--- 1.0.0.rc16.orig/lib/format/ataraid/pdc.h ++++ 1.0.0.rc16/lib/format/ataraid/pdc.h +@@ -13,7 +13,7 @@ + + #include <stdint.h> + +-#define PDC_CONFIGOFFSETS 63,255,256,16,399,591,675,735,974,991 ++#define PDC_CONFIGOFFSETS 63,255,256,16,399,591,675,735,974,991,911,951 + #define PDC_DATAOFFSET 0 + + /*
meta-oe/recipes-extended/dmraid/dmraid/05_exit_code.patch new file +22 -0
@@ -0,0 +1,22 @@ +Author: Giuseppe Iuculano <[email protected]> +Description: Fix exit-code for "No RAID disks" and "no block devices found" errors (LP: #300825) +--- 1.0.0.rc16.orig/lib/metadata/metadata.c ++++ 1.0.0.rc16/lib/metadata/metadata.c +@@ -2096,7 +2096,7 @@ get_metadata(struct lib_context *lc, enu + + if (!count_devices(lc, DEVICE)) { + log_print(lc, "no block devices found"); +- return 1; ++ return 0; + } + + if (!(M_RAID & p->metadata)) +@@ -2118,7 +2118,7 @@ get_metadata(struct lib_context *lc, enu + if (!OPT_HOT_SPARE_SET(lc) && !OPT_CREATE(lc) + && !count_devices(lc, RAID)) { + format_error(lc, "disks", argv); +- return 1; ++ return 0; + } + + if (M_SET & p->metadata) {
meta-oe/recipes-extended/dmraid/dmraid/06_support_virtio_devices.patch new file +13 -0
@@ -0,0 +1,13 @@ +Author: Luke Yelavich <[email protected]> +Description: Support for checking virtio devices for dmraid metadata. +--- 1.0.0.rc16.orig/lib/device/scan.c ++++ 1.0.0.rc16/lib/device/scan.c +@@ -174,7 +174,7 @@ interested(struct lib_context *lc, char + * Whole IDE and SCSI disks only. + */ + return (!isdigit(name[strlen(name) - 1]) && +- (*(name + 1) == 'd' && (*name == 'h' || *name == 's'))) ++ (*(name + 1) == 'd' && (*name == 'h' || *name == 's' || *name == 'v'))) + #ifdef DMRAID_TEST + /* + * Include dm devices for testing.
meta-oe/recipes-extended/dmraid/dmraid/07_isw-probe-hpa.patch new file +144 -0
144 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/08_activate_multiple_raid_sets.patch new file +12 -0
@@ -0,0 +1,12 @@ +Continue onto all raid sets instead of returning after processing the first. (LP: #401713) +--- 1.0.0.rc16.orig/lib/metadata/metadata.c ++++ 1.0.0.rc16/lib/metadata/metadata.c +@@ -839,7 +839,7 @@ _discover_partitions(struct lib_context + */ + if (T_GROUP(rs)) { + _discover_partitions(lc, &rs->sets); +- return; ++ continue; + } + + /*
meta-oe/recipes-extended/dmraid/dmraid/09_pdc_raid10_failure..patch new file +14 -0
@@ -0,0 +1,14 @@ +fix pdc metadata format handler to report the proper number of devices in a subset +--- 1.0.0.rc16.orig/lib/format/ataraid/pdc.c ++++ 1.0.0.rc16/lib/format/ataraid/pdc.c +@@ -490,7 +490,9 @@ devices(struct raid_dev *rd, void *conte + if (context && pdc->raid.type != PDC_T_SPAN) + *((uint64_t *) context) += rd->sectors; + +- return pdc->raid.total_disks; ++ return is_raid10(pdc) ? ++ pdc->raid.total_disks / 2 : ++ pdc->raid.total_disks; + } + + static int
meta-oe/recipes-extended/dmraid/dmraid/10_ddf1_lsi_persistent_name.patch new file +20 -0
@@ -0,0 +1,20 @@ +Using a dummy string for the timestamp in the LSI metadata +--- 1.0.0.rc16.orig/lib/format/ddf/ddf1.c ++++ 1.0.0.rc16/lib/format/ddf/ddf1.c +@@ -696,6 +696,16 @@ name(struct lib_context *lc, struct ddf1 + sprintf(b, "%02x%02x%02x%02x", + vd->guid[i], vd->guid[i + 1], + vd->guid[i + 2], vd->guid[i + 3]); ++ ++ /* ++ * Because the LSI bios changes the timestamp in the ++ * metadata on every boot, we have to neutralize it ++ * in order to allow for persistent names. ++ * ++ * Using a dummy string "47114711" for that. ++ */ ++ if (!strncmp((char *) vd->guid, "LSI", 3)) ++ strncpy(buf + prefix + 32, "47114711", 8); + } + + out:
meta-oe/recipes-extended/dmraid/dmraid/11_fix_isw_sectors_calculation.patch new file +14 -0
@@ -0,0 +1,14 @@ +Fix isw raid0 incorrect sectors calculation, thanks to Valentin Pavlyuchenko +--- 1.0.0.rc16.orig/lib/format/ataraid/isw.c ++++ 1.0.0.rc16/lib/format/ataraid/isw.c +@@ -776,7 +776,9 @@ _create_rd(struct lib_context *lc, + r->di = rd->di; + r->fmt = rd->fmt; + r->offset = dev->vol.map[0].pba_of_lba0; +- if ((r->sectors = dev->vol.map[0].blocks_per_member - RAID_DS_JOURNAL)) ++ //fix bugs on ICH10R ++ //if ((r->sectors = dev->vol.map[0].blocks_per_member - RAID_DS_JOURNAL)) ++ if ((r->sectors = dev->vol.map[0].blocks_per_member)) + goto out; + + log_zero_sectors(lc, rd->di->path, handler);
meta-oe/recipes-extended/dmraid/dmraid/12_jmicron_namefix.patch new file +20 -0
@@ -0,0 +1,20 @@ +From: Phillip Susi <[email protected]> +Author: Danny Wood <[email protected]> +Subject: Fix jmicron names again +Bug-Ubuntu: http://launchpad.net/bugs/576289 +Last-Update: 2011-03-08 +Description: Uninitialized variable prevented code from working + as intended. +Index: 1.0.0.rc16/lib/format/ataraid/jm.c +=================================================================== +--- 1.0.0.rc16.orig/lib/format/ataraid/jm.c ++++ 1.0.0.rc16/lib/format/ataraid/jm.c +@@ -25,7 +25,7 @@ + static char * + name(struct lib_context *lc, struct raid_dev *rd, unsigned int subset) + { +- size_t i, len; ++ size_t i = JM_NAME_LEN - 1, len; + struct jm *jm = META(rd, jm); + char *ret, *name = (char *) jm->name; + char buf[JM_NAME_LEN + 1] = { '\0' };
meta-oe/recipes-extended/dmraid/dmraid/13_fix_testing.patch new file +23 -0
@@ -0,0 +1,23 @@ +From: Phillip Susi <[email protected]> +Last-Update: 2011-03-08 +Forwarded: yes +Description: Testing with dm devices was failing on Ubuntu because + /dev/dm-X is the actual device node, but the code wanted it to be + a symlink. Fixed dm_test_device() to test that the file ( or node + it points to ) is a block device, which seems a much more + appropriate test. + +Index: 1.0.0.rc16/lib/device/scan.c +=================================================================== +--- 1.0.0.rc16.orig/lib/device/scan.c ++++ 1.0.0.rc16/lib/device/scan.c +@@ -86,8 +86,8 @@ + { + struct stat s; + +- return !lstat(path, &s) && +- S_ISLNK(s.st_mode) && ++ return !stat(path, &s) && ++ S_ISBLK(s.st_mode) && + !strncmp(get_basename(lc, path), "dm-", 3); + }
meta-oe/recipes-extended/dmraid/dmraid/14_pdc_dump_extended_metadata.patch new file +147 -0
147 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/15_drop_p_for_partition_conditional.patch new file +31 -0
@@ -0,0 +1,31 @@ +From: Phillip Susi <[email protected]> +Last-Update: 2011-03-08 +Description: dmraid was changed at one point to insert a 'p' between + the base device name and the partition number. For some time + debian and ubuntu reversed this change. This patch modifies the + behavior to add the 'p' iff the last character of the base name is + a digit. This makes dmraid comply with the behavior used by + kpartx and "by linux since the dawn of time". +Forwarded: Yes + +Index: 1.0.0.rc16/lib/format/partition/dos.c +=================================================================== +--- 1.0.0.rc16.orig/lib/format/partition/dos.c ++++ 1.0.0.rc16/lib/format/partition/dos.c +@@ -31,8 +31,14 @@ + { + const char *base = get_basename(lc, rd->di->path); + +- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc), +- partition) : snprintf(str, len, "%s", base); ++ if (type) ++ { ++ if (isdigit(base[strlen(base) - 1])) ++ return snprintf(str, len, "%s%s%u", base, ++ OPT_STR_PARTCHAR(lc), partition); ++ else return snprintf(str, len, "%s%u", base, partition); ++ } ++ else return snprintf(str, len, "%s", base); + } + + static char *
meta-oe/recipes-extended/dmraid/dmraid/16_change-uuid.patch new file +76 -0
76 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/17_convert-dmraid45-to-dmraid.patch new file +273 -0
273 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/18_ignore-too-small-devices.patch new file +39 -0
@@ -0,0 +1,39 @@ +From: Stefan Bader <[email protected]> +Date: Tue, 14 Jan 2014 15:26:50 +0100 +Subject: Avoid meaningless error messages while probing for meta-data + +This happens as device-mapper volumes are checked and kpartx creates +a 2 sector mapping if a device contains an extended partition. +Offsetting from the last sector backwards some probes overflow and +end up trying to seek to a very large offset (which fails and emits +a visible error message during device scanning). +This message is useless as such a small device would be pointless as +a RAID set anyway. +To fix this without larger changes, pragmatically ignore devices smaller +than 8 sectors (4K). + +Signed-off-by: Stefan Bader <[email protected]> + +Index: 1.0.0.rc16/lib/format/format.c +=================================================================== +--- 1.0.0.rc16.orig/lib/format/format.c 2014-01-14 15:50:17.554952405 +0100 ++++ 1.0.0.rc16/lib/format/format.c 2014-01-14 15:50:35.319039242 +0100 +@@ -533,6 +533,18 @@ read_raid_dev(struct lib_context *lc, + union read_info info; + + /* ++ * Kpartx will create a mapping for extended partitions which only ++ * covers 2 sectors. That leads to error messages when looking for ++ * meta-data as moving back from the last sector results in huge ++ * offsets. Quick hack here to ignore any device smaller than 4K. ++ */ ++ if (di->sectors < 8) { ++ log_dbg(lc, "%s: Ignore device smaller than 4K (%s)", ++ handler, di->path); ++ return NULL; ++ } ++ ++ /* + * In case the metadata format handler provides a special + * metadata read function, use that. If not, allocate and + * read size from offset.
meta-oe/recipes-extended/dmraid/dmraid/19_compile-dmraid-in-subdir-tools.patch new file +20 -0
@@ -0,0 +1,20 @@ +Compile dmraid in subdir tools to avoid error as follows + + | tools/dmraid.c:12:27: fatal error: dmraid/dmraid.h: No such file or directory + | #include <dmraid/dmraid.h> + | ^ + +Signed-off-by: Bian Naimeng <[email protected]> + +diff -Nurp 1.0.0.rc16.orig/Makefile.in 1.0.0.rc16/Makefile.in +--- 1.0.0.rc16.orig/Makefile.in 2009-09-16 16:55:23.000000000 +0800 ++++ 1.0.0.rc16/Makefile.in 2014-11-26 16:39:54.087815059 +0800 +@@ -10,8 +10,6 @@ VPATH = @srcdir@ + + SUBDIRS = include lib man tools + +-TARGETS = tools/dmraid +- + include make.tmpl + + tools: lib
meta-oe/recipes-extended/dmraid/dmraid/20_specifies-install-dir-by-DESTDIR.patch new file +123 -0
123 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid_1.0.0.rc16.bb new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
1.9.1
Quoted 2 lines · Bian Naimeng
There is no update anymore since 2010, but is still supported by some distro such as Ubuntu(trusty 14.04LTS).
Still doesn't apply, probably mangled by your e-mail client
OE @ ~/meta-openembedded $ pwam 84213
2014-12-03 18:54:27 URL:http://patchwork.openembedded.org/patch/84213/mbox/ [67143] -> "pw-am-84213.patch" [1]
Applying: dmraid: add recipe /OE/meta-openembedded/.git/rebase-apply/patch:65: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:73: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:74: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:79: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:85: trailing whitespace.
fatal: corrupt patch at line 319
Patch failed at 0001 dmraid: add recipe
The copy of the patch that failed is found in:
/OE/meta-openembedded/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
OE @ ~/meta-openembedded $ patch -p1 < pw-am-84213.patch
patching file meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patch patching file meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch
patch: **** malformed patch at line 265:
Quoted 7 lines
+--- 1.0.0.rc16.orig/lib/.export.sym
++++ 1.0.0.rc16/lib/.export.sym
+@@ -52,8 +52,6 @@ Base {(quoted diff) +2
-0+ dso_end_rebuild; + hot_spare_add;
Review
Quoted 10 lines
(quoted diff) +6
-0+ dso_get_members; +- dm_register_device; +- dm_unregister_device; + dm_all_monitored; + local: + *;
This is the broken part, and indeed there are strange blank lines in it, maybe mixing dos and linux line ends in different files?
I'm very sorry. I have not addressed what's wrong with my e-mail client. Let me send the patch as attachment instead.
And --keep-cr is necessary for git-am when applying this patch.
Thanks
Bian
Quoted 54 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Jansa
Sent: Thursday, December 04, 2014 1:59 AM
To: [email protected]
Subject: Re: [oe] [PATCH] [Patch V2][meta-oe]dmraid: add recipeQuoted 2 lines · Bian Naimeng
There is no update anymore since 2010, but is still supported by some distro such as Ubuntu(trusty 14.04LTS).
Still doesn't apply, probably mangled by your e-mail client
OE @ ~/meta-openembedded $ pwam 84213
2014-12-03 18:54:27 URL:http://patchwork.openembedded.org/patch/84213/mbox/[67143] -> "pw-am-84213.patch" [1]
Applying: dmraid: add recipe /OE/meta-openembedded/.git/rebase-apply/patch:65: trailing whitespace./OE/meta-openembedded/.git/rebase-apply/patch:73: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:74: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:79: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:85: trailing whitespace.
fatal: corrupt patch at line 319
Patch failed at 0001 dmraid: add recipe
The copy of the patch that failed is found in:
/OE/meta-openembedded/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".OE @ ~/meta-openembedded $ patch -p1 < pw-am-84213.patch patching file
meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patchpatching filemeta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch
patch: **** malformed patch at line 265:Quoted 12 lines
+--- 1.0.0.rc16.orig/lib/.export.sym
++++ 1.0.0.rc16/lib/.export.sym
+@@ -52,8 +52,6 @@ Base {(quoted diff) +4
-0+ dso_end_rebuild; + hot_spare_add; + dso_get_members; +- dm_register_device;
Quoted 8 lines
Review
Quoted 5 lines
+-
dm_unregister_device;(quoted diff) +3
-0+ dm_all_monitored; + local: + *;This is the broken part, and indeed there are strange blank lines in it, maybe mixing dos and linux line ends in different files?
From acd1d90b62636bb7c7a6f3dda9522453a03104b1 Mon Sep 17 00:00:00 2001
From: Bian Naimeng <[email protected]>
Date: Tue, 2 Dec 2014 11:39:40 +0800
Subject: [PATCH] [Patch V2][meta-oe]dmraid: add recipe
There is no update anymore since 2010, but is still supported by some distro such as Ubuntu(trusty 14.04LTS).
--- .../dmraid/dmraid/01_fix_broken_linking.patch | 121 +++++++++ .../dmraid/dmraid/02_disable_dmreg.patch | 133 ++++++++++ .../dmraid/03_fix_hyphen-used-as-minus-sign.patch | 291 +++++++++++++++++++++ .../dmraid/dmraid/04_promise-add-offsets.patch | 13 + .../dmraid/dmraid/05_exit_code.patch | 22 ++ .../dmraid/dmraid/06_support_virtio_devices.patch | 13 + .../dmraid/dmraid/07_isw-probe-hpa.patch | 144 ++++++++++ .../dmraid/08_activate_multiple_raid_sets.patch | 12 + .../dmraid/dmraid/09_pdc_raid10_failure..patch | 14 + .../dmraid/10_ddf1_lsi_persistent_name.patch | 20 ++ .../dmraid/11_fix_isw_sectors_calculation.patch | 14 + .../dmraid/dmraid/12_jmicron_namefix.patch | 20 ++ .../dmraid/dmraid/13_fix_testing.patch | 23 ++ .../dmraid/14_pdc_dump_extended_metadata.patch | 147 +++++++++++ .../15_drop_p_for_partition_conditional.patch | 31 +++ .../dmraid/dmraid/16_change-uuid.patch | 76 ++++++ .../dmraid/17_convert-dmraid45-to-dmraid.patch | 273 +++++++++++++++++++ .../dmraid/18_ignore-too-small-devices.patch | 39 +++ .../dmraid/19_compile-dmraid-in-subdir-tools.patch | 20 ++ .../20_specifies-install-dir-by-DESTDIR.patch | 123 +++++++++ .../recipes-extended/dmraid/dmraid_1.0.0.rc16.bb | 55 ++++ 21 files changed, 1604 insertions(+) create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/03_fix_hyphen-used-as-minus-sign.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/04_promise-add-offsets.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/05_exit_code.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/06_support_virtio_devices.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/07_isw-probe-hpa.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/08_activate_multiple_raid_sets.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/09_pdc_raid10_failure..patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/10_ddf1_lsi_persistent_name.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/11_fix_isw_sectors_calculation.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/12_jmicron_namefix.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/13_fix_testing.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/14_pdc_dump_extended_metadata.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/15_drop_p_for_partition_conditional.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/16_change-uuid.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/17_convert-dmraid45-to-dmraid.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/18_ignore-too-small-devices.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/19_compile-dmraid-in-subdir-tools.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid/20_specifies-install-dir-by-DESTDIR.patch create mode 100644 meta-oe/recipes-extended/dmraid/dmraid_1.0.0.rc16.bb
meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patch new file +121 -0
@@ -0,0 +1,121 @@ +Author: Luke Yelavich <[email protected]> +Description: Fix library symbolic link creation and library linking. +--- 1.0.0.rc16.orig/configure ++++ 1.0.0.rc16/configure +@@ -693,6 +693,7 @@ DEBUG_MALLOC + DMRAID_TEST + DMRAID_VERSION + DMRAID_LIB_VERSION ++DMRAID_LIB_MAJOR_VERSION + DIETLIBC + GROUP + JOBS +@@ -5767,8 +5768,10 @@ fi + + if test "-f lib/version.h"; then + DMRAID_LIB_VERSION="`sed --quiet 's/^.*\(DMRAID_LIB_VERSION\)[^_].*"\(.*\)"/\2/p' lib/version.h`" ++ DMRAID_LIB_MAJOR_VERSION="`grep DMRAID_LIB_MAJOR_VERSION lib/version.h | tr '\t' ' ' | cut -f 3 -d ' '`" + else + DMRAID_LIB_VERSION="Unknown" ++ DMRAID_LIB_MAJOR_VERSION="Unknown" + fi + + +--- 1.0.0.rc16.orig/configure.in ++++ 1.0.0.rc16/configure.in +@@ -178,7 +178,7 @@ if test x$DEBUG_MALLOC = xyes; then + fi + + dnl Mess with default exec_prefix +-if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; ++if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]; + then exec_prefix=""; + fi; + +@@ -220,8 +220,10 @@ fi + + if test "-f lib/version.h"; then + DMRAID_LIB_VERSION="`sed --quiet 's/^.*\(DMRAID_LIB_VERSION\)[[^_]].*"\(.*\)"/\2/p' lib/version.h`" ++ DMRAID_LIB_MAJOR_VERSION="`grep DMRAID_LIB_MAJOR_VERSION lib/version.h | tr '\t' ' ' | cut -f 3 -d ' '`" + else + DMRAID_LIB_VERSION="Unknown" ++ DMRAID_LIB_MAJOR_VERSION="Unknown" + fi + + AC_SUBST(CC) +@@ -232,6 +234,7 @@ AC_SUBST(DEBUG_MALLOC) + AC_SUBST(DMRAID_TEST) + AC_SUBST(DMRAID_VERSION) + AC_SUBST(DMRAID_LIB_VERSION) ++AC_SUBST(DMRAID_LIB_MAJOR_VERSION) + AC_SUBST(DIETLIBC) + AC_SUBST(GROUP) + AC_SUBST(JOBS) +--- 1.0.0.rc16.orig/lib/Makefile.in ++++ 1.0.0.rc16/lib/Makefile.in +@@ -65,6 +65,11 @@ ifeq ("@KLIBC@", "no") + LIB_EVENTS_SHARED=$(top_srcdir)/lib/$(LIB_EVENTS_NAME).so + TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) + INSTALL_TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED) ++ ifeq ("@DIETLIBC@", "yes") ++ LIBDMRAIDLIBS += -ldevmapper_dietc ++ else ++ LIBDMRAIDLIBS += -ldevmapper ++ endif + endif + endif + +@@ -82,10 +87,11 @@ install_dmraid_libs: $(INSTALL_TARGETS) + for f in $(INSTALL_TARGETS); \ + do \ + n=$$(basename $${f}) ; \ +- if [[ "$$n" =~ '.so$$' ]]; then \ ++ if echo "$$n" | grep -q '.so$$'; then \ + $(INSTALL) -m 555 $(STRIP) \ + $$f $(libdir)/$${n}.@DMRAID_LIB_VERSION@; \ +- $(LN_S) -f $${n}.@DMRAID_LIB_VERSION@ $(libdir)/$${n}; \ ++ mkdir -p $(prefix)/lib; \ ++ cd $(prefix)/lib/ && $(LN_S) -f /lib/$${n}.@DMRAID_LIB_VERSION@ $${n}; \ + else \ + $(INSTALL) -m 555 $(STRIP) $$f $(libdir)/$${n}; \ + fi \ +--- 1.0.0.rc16.orig/make.tmpl.in ++++ 1.0.0.rc16/make.tmpl.in +@@ -44,6 +44,7 @@ endif + OWNER = @OWNER@ + GROUP = @GROUP@ + DMRAID_LIB_VERSION = @DMRAID_LIB_VERSION@ ++DMRAID_LIB_MAJOR_VERSION = @DMRAID_LIB_MAJOR_VERSION@ + + # The number of jobs to run, if blank, defaults to the make standard + ifndef MAKEFLAGS +@@ -136,7 +137,7 @@ $(TARGETS): $(OBJECTS) + + %.so: $(OBJECTS) + $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \ +- -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event ++ -Wl,--version-script,.export.sym $(OBJECTS) $(LIBDMRAIDLIBS) -o $@ -ldevmapper-event + + $(LIB_STATIC): $(OBJECTS) + $(RM) $@ +--- 1.0.0.rc16.orig/tools/Makefile.in ++++ 1.0.0.rc16/tools/Makefile.in +@@ -34,12 +34,16 @@ ifeq ("@KLIBC@", "yes") + DMRAIDLIBS += -ldevmapper_klibc + else + ifeq ("@DIETLIBC@", "yes") +- DMRAIDLIBS += -ldevmapper_dietc ++ ifeq ("@LIB_SO@", "no") ++ DMRAIDLIBS += -ldevmapper_dietc ++ endif + ifeq ("@STATIC_LINK@", "no") + DMEVENTTOOLLIBS = -ldevmapper-event_dietc + endif + else +- DMRAIDLIBS += -ldevmapper ++ ifeq ("@LIB_SO@", "no") ++ DMRAIDLIBS += -ldevmapper ++ endif + ifeq ("@STATIC_LINK@", "no") + DMEVENTTOOLLIBS = -ldevmapper-event + endif
meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch new file +133 -0
133 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/03_fix_hyphen-used-as-minus-sign.patch new file +291 -0
291 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/04_promise-add-offsets.patch new file +13 -0
@@ -0,0 +1,13 @@ +Author: Luke Yelavich <[email protected]> +Description: Add extra offsets where promise metadata can be found. +--- 1.0.0.rc16.orig/lib/format/ataraid/pdc.h ++++ 1.0.0.rc16/lib/format/ataraid/pdc.h +@@ -13,7 +13,7 @@ + + #include <stdint.h> + +-#define PDC_CONFIGOFFSETS 63,255,256,16,399,591,675,735,974,991 ++#define PDC_CONFIGOFFSETS 63,255,256,16,399,591,675,735,974,991,911,951 + #define PDC_DATAOFFSET 0 + + /*
meta-oe/recipes-extended/dmraid/dmraid/05_exit_code.patch new file +22 -0
@@ -0,0 +1,22 @@ +Author: Giuseppe Iuculano <[email protected]> +Description: Fix exit-code for "No RAID disks" and "no block devices found" errors (LP: #300825) +--- 1.0.0.rc16.orig/lib/metadata/metadata.c ++++ 1.0.0.rc16/lib/metadata/metadata.c +@@ -2096,7 +2096,7 @@ get_metadata(struct lib_context *lc, enu + + if (!count_devices(lc, DEVICE)) { + log_print(lc, "no block devices found"); +- return 1; ++ return 0; + } + + if (!(M_RAID & p->metadata)) +@@ -2118,7 +2118,7 @@ get_metadata(struct lib_context *lc, enu + if (!OPT_HOT_SPARE_SET(lc) && !OPT_CREATE(lc) + && !count_devices(lc, RAID)) { + format_error(lc, "disks", argv); +- return 1; ++ return 0; + } + + if (M_SET & p->metadata) {
meta-oe/recipes-extended/dmraid/dmraid/06_support_virtio_devices.patch new file +13 -0
@@ -0,0 +1,13 @@ +Author: Luke Yelavich <[email protected]> +Description: Support for checking virtio devices for dmraid metadata. +--- 1.0.0.rc16.orig/lib/device/scan.c ++++ 1.0.0.rc16/lib/device/scan.c +@@ -174,7 +174,7 @@ interested(struct lib_context *lc, char + * Whole IDE and SCSI disks only. + */ + return (!isdigit(name[strlen(name) - 1]) && +- (*(name + 1) == 'd' && (*name == 'h' || *name == 's'))) ++ (*(name + 1) == 'd' && (*name == 'h' || *name == 's' || *name == 'v'))) + #ifdef DMRAID_TEST + /* + * Include dm devices for testing.
meta-oe/recipes-extended/dmraid/dmraid/07_isw-probe-hpa.patch new file +144 -0
144 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/08_activate_multiple_raid_sets.patch new file +12 -0
@@ -0,0 +1,12 @@ +Continue onto all raid sets instead of returning after processing the first. (LP: #401713) +--- 1.0.0.rc16.orig/lib/metadata/metadata.c ++++ 1.0.0.rc16/lib/metadata/metadata.c +@@ -839,7 +839,7 @@ _discover_partitions(struct lib_context + */ + if (T_GROUP(rs)) { + _discover_partitions(lc, &rs->sets); +- return; ++ continue; + } + + /*
meta-oe/recipes-extended/dmraid/dmraid/09_pdc_raid10_failure..patch new file +14 -0
@@ -0,0 +1,14 @@ +fix pdc metadata format handler to report the proper number of devices in a subset +--- 1.0.0.rc16.orig/lib/format/ataraid/pdc.c ++++ 1.0.0.rc16/lib/format/ataraid/pdc.c +@@ -490,7 +490,9 @@ devices(struct raid_dev *rd, void *conte + if (context && pdc->raid.type != PDC_T_SPAN) + *((uint64_t *) context) += rd->sectors; + +- return pdc->raid.total_disks; ++ return is_raid10(pdc) ? ++ pdc->raid.total_disks / 2 : ++ pdc->raid.total_disks; + } + + static int
meta-oe/recipes-extended/dmraid/dmraid/10_ddf1_lsi_persistent_name.patch new file +20 -0
@@ -0,0 +1,20 @@ +Using a dummy string for the timestamp in the LSI metadata +--- 1.0.0.rc16.orig/lib/format/ddf/ddf1.c ++++ 1.0.0.rc16/lib/format/ddf/ddf1.c +@@ -696,6 +696,16 @@ name(struct lib_context *lc, struct ddf1 + sprintf(b, "%02x%02x%02x%02x", + vd->guid[i], vd->guid[i + 1], + vd->guid[i + 2], vd->guid[i + 3]); ++ ++ /* ++ * Because the LSI bios changes the timestamp in the ++ * metadata on every boot, we have to neutralize it ++ * in order to allow for persistent names. ++ * ++ * Using a dummy string "47114711" for that. ++ */ ++ if (!strncmp((char *) vd->guid, "LSI", 3)) ++ strncpy(buf + prefix + 32, "47114711", 8); + } + + out:
meta-oe/recipes-extended/dmraid/dmraid/11_fix_isw_sectors_calculation.patch new file +14 -0
@@ -0,0 +1,14 @@ +Fix isw raid0 incorrect sectors calculation, thanks to Valentin Pavlyuchenko +--- 1.0.0.rc16.orig/lib/format/ataraid/isw.c ++++ 1.0.0.rc16/lib/format/ataraid/isw.c +@@ -776,7 +776,9 @@ _create_rd(struct lib_context *lc, + r->di = rd->di; + r->fmt = rd->fmt; + r->offset = dev->vol.map[0].pba_of_lba0; +- if ((r->sectors = dev->vol.map[0].blocks_per_member - RAID_DS_JOURNAL)) ++ //fix bugs on ICH10R ++ //if ((r->sectors = dev->vol.map[0].blocks_per_member - RAID_DS_JOURNAL)) ++ if ((r->sectors = dev->vol.map[0].blocks_per_member)) + goto out; + + log_zero_sectors(lc, rd->di->path, handler);
meta-oe/recipes-extended/dmraid/dmraid/12_jmicron_namefix.patch new file +20 -0
@@ -0,0 +1,20 @@ +From: Phillip Susi <[email protected]> +Author: Danny Wood <[email protected]> +Subject: Fix jmicron names again +Bug-Ubuntu: http://launchpad.net/bugs/576289 +Last-Update: 2011-03-08 +Description: Uninitialized variable prevented code from working + as intended. +Index: 1.0.0.rc16/lib/format/ataraid/jm.c +=================================================================== +--- 1.0.0.rc16.orig/lib/format/ataraid/jm.c ++++ 1.0.0.rc16/lib/format/ataraid/jm.c +@@ -25,7 +25,7 @@ + static char * + name(struct lib_context *lc, struct raid_dev *rd, unsigned int subset) + { +- size_t i, len; ++ size_t i = JM_NAME_LEN - 1, len; + struct jm *jm = META(rd, jm); + char *ret, *name = (char *) jm->name; + char buf[JM_NAME_LEN + 1] = { '\0' };
meta-oe/recipes-extended/dmraid/dmraid/13_fix_testing.patch new file +23 -0
@@ -0,0 +1,23 @@ +From: Phillip Susi <[email protected]> +Last-Update: 2011-03-08 +Forwarded: yes +Description: Testing with dm devices was failing on Ubuntu because + /dev/dm-X is the actual device node, but the code wanted it to be + a symlink. Fixed dm_test_device() to test that the file ( or node + it points to ) is a block device, which seems a much more + appropriate test. + +Index: 1.0.0.rc16/lib/device/scan.c +=================================================================== +--- 1.0.0.rc16.orig/lib/device/scan.c ++++ 1.0.0.rc16/lib/device/scan.c +@@ -86,8 +86,8 @@ + { + struct stat s; + +- return !lstat(path, &s) && +- S_ISLNK(s.st_mode) && ++ return !stat(path, &s) && ++ S_ISBLK(s.st_mode) && + !strncmp(get_basename(lc, path), "dm-", 3); + }
meta-oe/recipes-extended/dmraid/dmraid/14_pdc_dump_extended_metadata.patch new file +147 -0
147 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/15_drop_p_for_partition_conditional.patch new file +31 -0
@@ -0,0 +1,31 @@ +From: Phillip Susi <[email protected]> +Last-Update: 2011-03-08 +Description: dmraid was changed at one point to insert a 'p' between + the base device name and the partition number. For some time + debian and ubuntu reversed this change. This patch modifies the + behavior to add the 'p' iff the last character of the base name is + a digit. This makes dmraid comply with the behavior used by + kpartx and "by linux since the dawn of time". +Forwarded: Yes + +Index: 1.0.0.rc16/lib/format/partition/dos.c +=================================================================== +--- 1.0.0.rc16.orig/lib/format/partition/dos.c ++++ 1.0.0.rc16/lib/format/partition/dos.c +@@ -31,8 +31,14 @@ + { + const char *base = get_basename(lc, rd->di->path); + +- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc), +- partition) : snprintf(str, len, "%s", base); ++ if (type) ++ { ++ if (isdigit(base[strlen(base) - 1])) ++ return snprintf(str, len, "%s%s%u", base, ++ OPT_STR_PARTCHAR(lc), partition); ++ else return snprintf(str, len, "%s%u", base, partition); ++ } ++ else return snprintf(str, len, "%s", base); + } + + static char *
meta-oe/recipes-extended/dmraid/dmraid/16_change-uuid.patch new file +76 -0
76 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/17_convert-dmraid45-to-dmraid.patch new file +273 -0
273 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid/18_ignore-too-small-devices.patch new file +39 -0
@@ -0,0 +1,39 @@ +From: Stefan Bader <[email protected]> +Date: Tue, 14 Jan 2014 15:26:50 +0100 +Subject: Avoid meaningless error messages while probing for meta-data + +This happens as device-mapper volumes are checked and kpartx creates +a 2 sector mapping if a device contains an extended partition. +Offsetting from the last sector backwards some probes overflow and +end up trying to seek to a very large offset (which fails and emits +a visible error message during device scanning). +This message is useless as such a small device would be pointless as +a RAID set anyway. +To fix this without larger changes, pragmatically ignore devices smaller +than 8 sectors (4K). + +Signed-off-by: Stefan Bader <[email protected]> + +Index: 1.0.0.rc16/lib/format/format.c +=================================================================== +--- 1.0.0.rc16.orig/lib/format/format.c 2014-01-14 15:50:17.554952405 +0100 ++++ 1.0.0.rc16/lib/format/format.c 2014-01-14 15:50:35.319039242 +0100 +@@ -533,6 +533,18 @@ read_raid_dev(struct lib_context *lc, + union read_info info; + + /* ++ * Kpartx will create a mapping for extended partitions which only ++ * covers 2 sectors. That leads to error messages when looking for ++ * meta-data as moving back from the last sector results in huge ++ * offsets. Quick hack here to ignore any device smaller than 4K. ++ */ ++ if (di->sectors < 8) { ++ log_dbg(lc, "%s: Ignore device smaller than 4K (%s)", ++ handler, di->path); ++ return NULL; ++ } ++ ++ /* + * In case the metadata format handler provides a special + * metadata read function, use that. If not, allocate and + * read size from offset.
meta-oe/recipes-extended/dmraid/dmraid/19_compile-dmraid-in-subdir-tools.patch new file +20 -0
@@ -0,0 +1,20 @@ +Compile dmraid in subdir tools to avoid error as follows + + | tools/dmraid.c:12:27: fatal error: dmraid/dmraid.h: No such file or directory + | #include <dmraid/dmraid.h> + | ^ + +Signed-off-by: Bian Naimeng <[email protected]> + +diff -Nurp 1.0.0.rc16.orig/Makefile.in 1.0.0.rc16/Makefile.in +--- 1.0.0.rc16.orig/Makefile.in 2009-09-16 16:55:23.000000000 +0800 ++++ 1.0.0.rc16/Makefile.in 2014-11-26 16:39:54.087815059 +0800 +@@ -10,8 +10,6 @@ VPATH = @srcdir@ + + SUBDIRS = include lib man tools + +-TARGETS = tools/dmraid +- + include make.tmpl + + tools: lib
meta-oe/recipes-extended/dmraid/dmraid/20_specifies-install-dir-by-DESTDIR.patch new file +123 -0
123 lines not on this page · raw message
meta-oe/recipes-extended/dmraid/dmraid_1.0.0.rc16.bb new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
1.9.1
Quoted 3 lines · Naimeng
I'm very sorry. I have not addressed what's wrong with my e-mail client. Let me send the patch as attachment instead.
And --keep-cr is necessary for git-am when applying this patch.
You can also push it to some public repo and I'll fetch it from there, that's the safest option for weird line endings or binary blobs.
Thanks
Quoted 74 lines
Thanks
BianQuoted 62 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Jansa
Sent: Thursday, December 04, 2014 1:59 AM
To: [email protected]
Subject: Re: [oe] [PATCH] [Patch V2][meta-oe]dmraid: add recipeQuoted 2 lines · Bian Naimeng
There is no update anymore since 2010, but is still supported by some distro such as Ubuntu(trusty 14.04LTS).
Still doesn't apply, probably mangled by your e-mail client
OE @ ‾/meta-openembedded $ pwam 84213
2014-12-03 18:54:27 URL:http://patchwork.openembedded.org/patch/84213/mbox/[67143] -> "pw-am-84213.patch" [1]
Applying: dmraid: add recipe /OE/meta-openembedded/.git/rebase-apply/patch:65: trailing whitespace./OE/meta-openembedded/.git/rebase-apply/patch:73: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:74: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:79: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:85: trailing whitespace.
fatal: corrupt patch at line 319
Patch failed at 0001 dmraid: add recipe
The copy of the patch that failed is found in:
/OE/meta-openembedded/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".OE @ ‾/meta-openembedded $ patch -p1 < pw-am-84213.patch patching file
meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patchpatching filemeta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch
patch: **** malformed patch at line 265:Quoted 7 lines
+--- 1.0.0.rc16.orig/lib/.export.sym
++++ 1.0.0.rc16/lib/.export.sym
+@@ -52,8 +52,6 @@ Base {meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch new file +2
-0+ dso_end_rebuild; + hot_spare_add;meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch line 79
Quoted 10 lines
meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch new file +6
-0+ dso_get_members; +- dm_register_device; +- dm_unregister_device; + dm_all_monitored; + local: + *;This is the broken part, and indeed there are strange blank lines in it, maybe mixing dos and linux line ends in different files?
Signature · 4 lines
_______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Jansa
Sent: Thursday, December 04, 2014 8:16 PM
To: [email protected]
Subject: Re: [oe] [PATCH] [Patch V2][meta-oe]dmraid: add recipe
Quoted 8 lines
Quoted 3 lines · Naimeng
I'm very sorry. I have not addressed what's wrong with my e-mail client. Let me send the patch as attachment instead.
And --keep-cr is necessary for git-am when applying this patch.You can also push it to some public repo and I'll fetch it from there, that's the safest option for weird line endings or binary blobs.
Oh, it's pretty good advice, thanks. ^_^ Please fetch this patch from the following repo.
- URL: https://github.com/bendaaron/meta-oe-dev.git
- Branch: develop
- Commit: 9f3059ac98476f341298c86397810cacc6f3177e
Thanks
Bian
Quoted 83 lines
Thanks
Quoted 72 lines
Thanks
BianQuoted 57 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Jansa
Sent: Thursday, December 04, 2014 1:59 AM
To: [email protected]
Subject: Re: [oe] [PATCH] [Patch V2][meta-oe]dmraid: add recipeQuoted 2 lines · Bian Naimeng
There is no update anymore since 2010, but is still supported by some distro such as Ubuntu(trusty 14.04LTS).
Still doesn't apply, probably mangled by your e-mail client
OE @ ‾/meta-openembedded $ pwam 84213
2014-12-03 18:54:27 URL:http://patchwork.openembedded.org/patch/84213/mbox/ [67143] -> "pw-am-84213.patch" [1]
Applying: dmraid: add recipe /OE/meta-openembedded/.git/rebase-apply/patch:65: trailing whitespace./OE/meta-openembedded/.git/rebase-apply/patch:73: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:74: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:79: trailing whitespace.
/OE/meta-openembedded/.git/rebase-apply/patch:85: trailing whitespace.
fatal: corrupt patch at line 319
Patch failed at 0001 dmraid: add recipe The copy of the patch that failed is found in:
/OE/meta-openembedded/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".OE @ ‾/meta-openembedded $ patch -p1 < pw-am-84213.patch patching file
meta-oe/recipes-extended/dmraid/dmraid/01_fix_broken_linking.patchpatching filemeta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch
patch: **** malformed patch at line 265:Quoted 12 lines
+--- 1.0.0.rc16.orig/lib/.export.sym
++++ 1.0.0.rc16/lib/.export.sym
+@@ -52,8 +52,6 @@ Base {meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch new file +4
-0+ dso_end_rebuild; + hot_spare_add; + dso_get_members; +- dm_register_device;Quoted 8 lines
meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch line 79
Quoted 5 lines
+-
dm_unregister_device;meta-oe/recipes-extended/dmraid/dmraid/02_disable_dmreg.patch new file +3
-0+ dm_all_monitored; + local: + *;This is the broken part, and indeed there are strange blank lines in it, maybe mixing dos and linux line ends in different files?
Quoted 5 lines
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
Martin 'JaMa' Jansa jabber: [email protected]