summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2007-08-26 14:06:14 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2007-08-26 14:06:14 +0000
commit4c6c53f9e2208c7c6b71a49c3afd62e530d9258f (patch)
tree2796cd6fd8e22d55e36742857169643d062d57a4 /sys-fs/device-mapper
parentVersion bump. Fixes bug #190014. (diff)
downloadhistorical-4c6c53f9e2208c7c6b71a49c3afd62e530d9258f.tar.gz
historical-4c6c53f9e2208c7c6b71a49c3afd62e530d9258f.tar.bz2
historical-4c6c53f9e2208c7c6b71a49c3afd62e530d9258f.zip
Version bumped. Added patch for option info --export, and updated udev-rules to use these. That should solve bug #189404.
Package-Manager: portage-2.1.3.7
Diffstat (limited to 'sys-fs/device-mapper')
-rw-r--r--sys-fs/device-mapper/ChangeLog11
-rw-r--r--sys-fs/device-mapper/Manifest32
-rw-r--r--sys-fs/device-mapper/device-mapper-1.02.22.ebuild64
-rw-r--r--sys-fs/device-mapper/files/64-device-mapper.rules-1.02.2225
-rw-r--r--sys-fs/device-mapper/files/device-mapper-1.02.22-export-format.diff295
-rw-r--r--sys-fs/device-mapper/files/digest-device-mapper-1.02.223
6 files changed, 421 insertions, 9 deletions
diff --git a/sys-fs/device-mapper/ChangeLog b/sys-fs/device-mapper/ChangeLog
index 287c045fe3f7..d64a948c26ed 100644
--- a/sys-fs/device-mapper/ChangeLog
+++ b/sys-fs/device-mapper/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-fs/device-mapper
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/ChangeLog,v 1.81 2007/08/24 14:07:36 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/ChangeLog,v 1.82 2007/08/26 14:06:14 zzam Exp $
+
+*device-mapper-1.02.22 (26 Aug 2007)
+
+ 26 Aug 2007; Matthias Schwarzott <zzam@gentoo.org>
+ +files/64-device-mapper.rules-1.02.22,
+ +files/device-mapper-1.02.22-export-format.diff,
+ +device-mapper-1.02.22.ebuild:
+ Version bumped. Added patch for option info --export, and updated udev-rules
+ to use these. That should solve bug #189404.
24 Aug 2007; Raúl Porcel <armin76@gentoo.org>
device-mapper-1.02.19-r1.ebuild:
diff --git a/sys-fs/device-mapper/Manifest b/sys-fs/device-mapper/Manifest
index adaa3ac59528..022744407ea1 100644
--- a/sys-fs/device-mapper/Manifest
+++ b/sys-fs/device-mapper/Manifest
@@ -5,6 +5,14 @@ AUX 64-device-mapper.rules-1.02.19 1247 RMD160 2fc15996575c44ffb5a12c16236e22115
MD5 c0cfef18ae631c9ff6809ff40130116f files/64-device-mapper.rules-1.02.19 1247
RMD160 2fc15996575c44ffb5a12c16236e221157ff15e6 files/64-device-mapper.rules-1.02.19 1247
SHA256 b8a7570321c735b06cfa97cff10a8edffcf508d4e54bd6730e482cb7bdd25347 files/64-device-mapper.rules-1.02.19 1247
+AUX 64-device-mapper.rules-1.02.22 999 RMD160 e29014e213c2d41ae360419c038d5644cd931021 SHA1 f3542c4294dcf4e2c4f50d3421b5399f5ab06975 SHA256 84544cac9d4de6cfc44cec816836f194f5f69fbb74cbdd07073f96dae427c0ed
+MD5 307bdee766d6398e55306f4b2de1bbbf files/64-device-mapper.rules-1.02.22 999
+RMD160 e29014e213c2d41ae360419c038d5644cd931021 files/64-device-mapper.rules-1.02.22 999
+SHA256 84544cac9d4de6cfc44cec816836f194f5f69fbb74cbdd07073f96dae427c0ed files/64-device-mapper.rules-1.02.22 999
+AUX device-mapper-1.02.22-export-format.diff 11410 RMD160 dac695aa0eef0adfa1dafea428a8c7412d96ebee SHA1 d46b4c791a4f53c932d3664362e123eecf2c39cc SHA256 e7ded5533a0a6409be967e259ecea39395e783686431567112744743d3b9e553
+MD5 760a01d7927c1def3db115e16572aaed files/device-mapper-1.02.22-export-format.diff 11410
+RMD160 dac695aa0eef0adfa1dafea428a8c7412d96ebee files/device-mapper-1.02.22-export-format.diff 11410
+SHA256 e7ded5533a0a6409be967e259ecea39395e783686431567112744743d3b9e553 files/device-mapper-1.02.22-export-format.diff 11410
AUX device-mapper.rc 607 RMD160 1f794b58d5f137b4f84d1fd5e672802726b16adc SHA1 f72e076c7205dfd836f6d0621fe759b1533987c9 SHA256 8f2e3837ec52c24f07fffbbda53f8141f2dc634aa58cdc6c32edf841bbfa76ae
MD5 a215c687a34d701d64e599f795252160 files/device-mapper.rc 607
RMD160 1f794b58d5f137b4f84d1fd5e672802726b16adc files/device-mapper.rc 607
@@ -22,6 +30,7 @@ DIST device-mapper.1.02.10.tgz 926142 RMD160 e3e74f7745d6da547272c597ee2b99e57cc
DIST device-mapper.1.02.12.tgz 162634 RMD160 ac9605e9b3587685ddc075a0eadb899e10ea1af6 SHA1 e1188ea7ddc4976e3614000a492e30fb019de2d6 SHA256 2ced9a96554b966b4cd63ecf26a3782a2ff75773751bcf0055f6c5d388b148bb
DIST device-mapper.1.02.18.tgz 177940 RMD160 528425ce04de13f9be754d408738b4d3ee744cfe SHA1 61fb505bf634b7c026551d98030fe7fc004367fb SHA256 d9a4f7674a728c6ccccd68d29eecb3903b660621def1ae3eccf1b7d8547b4c88
DIST device-mapper.1.02.19.tgz 183064 RMD160 00b584c67856ab18323bcc2918aed5ac4198cb65 SHA1 8b779c24a63630065fca97cca14d5630ccb9ad9d SHA256 4723a4ba55e10c58a4e1bd7551e1e7d90ce43d3fcdabfd78285d39c2d33cdead
+DIST device-mapper.1.02.22.tgz 189726 RMD160 8bf9986536c49f53c398d6a2180e21e1235bea18 SHA1 a4533872c32951a1b549bb9207a13b7e4dae0701 SHA256 ff833a6cd6246686f5b3f5692fd6597f1ffbc60f08929e5fe68304cdafb61595
EBUILD device-mapper-1.02.07.ebuild 1378 RMD160 5d7273e6b8e7350255bbade54c11972ea6bf3555 SHA1 bccac2e342cf3569acde01f726a62d9a7e3ae62c SHA256 27337864ccdacbfeb32c9b830bc144f2ad925e68cfc323bf5353e6bc0edf9663
MD5 1b794f95232f420292d6249c00ed7ace device-mapper-1.02.07.ebuild 1378
RMD160 5d7273e6b8e7350255bbade54c11972ea6bf3555 device-mapper-1.02.07.ebuild 1378
@@ -50,10 +59,14 @@ EBUILD device-mapper-1.02.19.ebuild 1629 RMD160 d85e80682480ac8bc20dcef4169fc271
MD5 1bbb5b3f3f068b2b0bdec42d3cc3bfd2 device-mapper-1.02.19.ebuild 1629
RMD160 d85e80682480ac8bc20dcef4169fc271dced3b86 device-mapper-1.02.19.ebuild 1629
SHA256 69965618657f5abcd825efeb2e495681e41b84aad73bb39f3663da1957e26ec1 device-mapper-1.02.19.ebuild 1629
-MISC ChangeLog 14668 RMD160 0cd4227f8b46b1dbdf611cbfed900b2c8a840824 SHA1 1a42c42607a2944540dd734e61a77f46384934a1 SHA256 940d0fc7c9680084e5eac8ef615fe47433bee99e2c4b9b5c1965db017c240776
-MD5 e4e49fe5b1c57485722225ea1ea7dd18 ChangeLog 14668
-RMD160 0cd4227f8b46b1dbdf611cbfed900b2c8a840824 ChangeLog 14668
-SHA256 940d0fc7c9680084e5eac8ef615fe47433bee99e2c4b9b5c1965db017c240776 ChangeLog 14668
+EBUILD device-mapper-1.02.22.ebuild 1848 RMD160 098e47d914b5cb485bd902e7e5a55e2727c91394 SHA1 684b05c5beda0c88409138613dbd2638fafcc14d SHA256 532681352ee40387b55f48da1453a503cb30c259e08ea7ef36a35f080421b124
+MD5 e0373d8214e4cb960d57776a1b052e74 device-mapper-1.02.22.ebuild 1848
+RMD160 098e47d914b5cb485bd902e7e5a55e2727c91394 device-mapper-1.02.22.ebuild 1848
+SHA256 532681352ee40387b55f48da1453a503cb30c259e08ea7ef36a35f080421b124 device-mapper-1.02.22.ebuild 1848
+MISC ChangeLog 15008 RMD160 168e16e624cd8b4d4f49e18f806733d6bee22161 SHA1 ab20df1b5640061d09bc9b6e4d22891d388a53b4 SHA256 7aa6e2ac821a85fc90cb75cdc9980359e3d5555dbb0d8d2066a61e10b8993c1c
+MD5 386ec38828dabd86b155a4511cadbc4c ChangeLog 15008
+RMD160 168e16e624cd8b4d4f49e18f806733d6bee22161 ChangeLog 15008
+SHA256 7aa6e2ac821a85fc90cb75cdc9980359e3d5555dbb0d8d2066a61e10b8993c1c ChangeLog 15008
MISC metadata.xml 300 RMD160 ede7eb0cde3ab4e83a90578f08e068486a2a59cd SHA1 2f199ce422f4fad87bcbdcb681d8197620bae236 SHA256 4f6e65a7f6e72548a3d0c35a34f7a119dc7f5c13dfc0820939bc8d1b72b75a4d
MD5 80dc99dec1aed7022edd3fe784b02759 metadata.xml 300
RMD160 ede7eb0cde3ab4e83a90578f08e068486a2a59cd metadata.xml 300
@@ -79,10 +92,13 @@ SHA256 e6fe45a5e6b53426101ef858d9c530568c03b72c256296fc43ca7b16b7f34a4f files/di
MD5 c8deb900fc9337496d60815cd1a87c2a files/digest-device-mapper-1.02.19-r1 256
RMD160 e13dcfbaf0f42288e47c4d246248445e9dcc0e2c files/digest-device-mapper-1.02.19-r1 256
SHA256 e6fe45a5e6b53426101ef858d9c530568c03b72c256296fc43ca7b16b7f34a4f files/digest-device-mapper-1.02.19-r1 256
+MD5 62e7d71d52d2cb211d70a2551fefab8b files/digest-device-mapper-1.02.22 256
+RMD160 496d0beb23a751b928d81fb40be062cc1db7ec3f files/digest-device-mapper-1.02.22 256
+SHA256 207b1f7f3f2ca78603fe601fc4341f8ecffed55fb15d0389038a56be628dcd3f files/digest-device-mapper-1.02.22 256
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.5 (GNU/Linux)
+Version: GnuPG v2.0.6 (GNU/Linux)
-iD8DBQFG0EBdp/wUKkr7RBoRAjWBAJ9TXG1kgC3SAvXm1bxODyKzf4sj0gCgvQcE
-20JCPBh2NCVocgjOCanZdaU=
-=Xbdj
+iD8DBQFG0Yjtt2vP6XvVdOcRAg6dAKDQr10Kz07bpej0hoB36sjxOVy9DACgk+MD
+zMCVxwxoYhqIed7OKOZ/S5s=
+=YU3l
-----END PGP SIGNATURE-----
diff --git a/sys-fs/device-mapper/device-mapper-1.02.22.ebuild b/sys-fs/device-mapper/device-mapper-1.02.22.ebuild
new file mode 100644
index 000000000000..f69fe30642b9
--- /dev/null
+++ b/sys-fs/device-mapper/device-mapper-1.02.22.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/device-mapper-1.02.22.ebuild,v 1.1 2007/08/26 14:06:14 zzam Exp $
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Device mapper ioctl library for use with LVM2 utilities"
+HOMEPAGE="http://sources.redhat.com/dm/"
+SRC_URI="ftp://sources.redhat.com/pub/dm/${PN}.${PV}.tgz
+ ftp://sources.redhat.com/pub/dm/old/${PN}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="selinux"
+
+DEPEND="selinux? ( sys-libs/libselinux )"
+
+S=${WORKDIR}/${PN}.${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch ${FILESDIR}/device-mapper-1.02.22-export-format.diff
+}
+
+src_compile() {
+ econf --sbindir=/sbin $(use_enable selinux) || die "econf failed"
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+
+ # move shared libs to /
+ mv "${D}"/usr/$(get_libdir) "${D}"/ || die "move libdir"
+ dolib.a lib/ioctl/libdevmapper.a || die "dolib.a"
+ gen_usr_ldscript libdevmapper.so
+
+ insinto /etc
+ doins "${FILESDIR}"/dmtab
+ insinto /lib/rcscripts/addons
+ doins "${FILESDIR}"/dm-start.sh
+
+ newinitd "${FILESDIR}"/device-mapper.rc device-mapper || die
+
+ insinto /etc/udev/rules.d/
+ newins "${FILESDIR}"/64-device-mapper.rules-1.02.22 64-device-mapper.rules
+
+ dodoc INSTALL INTRO README VERSION WHATS_NEW
+}
+
+pkg_preinst() {
+ local l=${ROOT}/$(get_libdir)/libdevmapper.so.1.01
+ [[ -e ${l} ]] && cp "${l}" "${D}"/$(get_libdir)/
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /$(get_libdir)/libdevmapper.so.1.01
+
+ elog "device-mapper volumes are no longer automatically created for"
+ elog "baselayout-2 users. If you are using baselayout-2, be sure to"
+ elog "run: # rc-update add device-mapper boot"
+}
diff --git a/sys-fs/device-mapper/files/64-device-mapper.rules-1.02.22 b/sys-fs/device-mapper/files/64-device-mapper.rules-1.02.22
new file mode 100644
index 000000000000..a0087e057f97
--- /dev/null
+++ b/sys-fs/device-mapper/files/64-device-mapper.rules-1.02.22
@@ -0,0 +1,25 @@
+# do not edit this file, it will be overwritten on update
+
+KERNEL=="device-mapper", SYMLINK+="mapper/control"
+
+KERNEL!="dm-*", GOTO="device_mapper_end"
+ACTION!="add|change", GOTO="device_mapper_end"
+
+IMPORT{program}="/sbin/dmsetup info --export -j%M -m%m"
+ENV{DM_NAME}!="?*", GOTO="device_mapper_end"
+SYMLINK+="mapper/$env{DM_NAME}"
+
+SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
+ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
+
+ENV{DM_SUSPENDED}=="1", GOTO="device_mapper_end"
+ENV{DM_EXISTS}=="0", GOTO="device_mapper_end"
+ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end"
+
+IMPORT{program}="vol_id --export $tempnode"
+OPTIONS="link_priority=-100"
+ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS="link_priority=-90"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+
+LABEL="device_mapper_end"
diff --git a/sys-fs/device-mapper/files/device-mapper-1.02.22-export-format.diff b/sys-fs/device-mapper/files/device-mapper-1.02.22-export-format.diff
new file mode 100644
index 000000000000..5291120f3986
--- /dev/null
+++ b/sys-fs/device-mapper/files/device-mapper-1.02.22-export-format.diff
@@ -0,0 +1,295 @@
+Index: device-mapper.1.02.22/lib/libdm-report.c
+===================================================================
+--- device-mapper.1.02.22.orig/lib/libdm-report.c
++++ device-mapper.1.02.22/lib/libdm-report.c
+@@ -776,6 +776,8 @@ int dm_report_output(struct dm_report *r
+ char buf[4096];
+ int32_t width;
+ uint32_t align;
++ const char *fname;
++ char tmp_char;
+
+ if (list_empty(&rh->rows))
+ return 1;
+@@ -800,6 +802,25 @@ int dm_report_output(struct dm_report *r
+ if (field->props->flags & FLD_HIDDEN)
+ continue;
+
++ if (rh->flags & DM_REPORT_OUTPUT_EXPORT) {
++ fname = rh->fields[field->props->field_num].id;
++ if (!dm_pool_grow_object(rh->mem, "DM_", strlen("DM_"))) {
++ log_error("dm_report: Unable to extend output line");
++ goto bad;
++ }
++ while (fname && fname[0]) {
++ tmp_char = toupper(fname[0]);
++ if (!dm_pool_grow_object(rh->mem, &tmp_char, 1)) {
++ log_error("dm_report: Unable to extend output line");
++ goto bad;
++ }
++ fname++;
++ }
++ if (!dm_pool_grow_object(rh->mem, "=", strlen("="))) {
++ log_error("dm_report: Unable to extend output line");
++ goto bad;
++ }
++ }
+ repstr = field->report_string;
+ width = field->props->width;
+ if (!(rh->flags & DM_REPORT_OUTPUT_ALIGNED)) {
+Index: device-mapper.1.02.22/dmsetup/dmsetup.c
+===================================================================
+--- device-mapper.1.02.22.orig/dmsetup/dmsetup.c
++++ device-mapper.1.02.22/dmsetup/dmsetup.c
+@@ -107,6 +107,7 @@ extern char *optarg;
+ enum {
+ READ_ONLY = 0,
+ COLS_ARG,
++ EXPORT_ARG,
+ EXEC_ARG,
+ FORCE_ARG,
+ GID_ARG,
+@@ -137,7 +138,8 @@ typedef enum {
+ DR_TASK = 1,
+ DR_INFO = 2,
+ DR_DEPS = 4,
+- DR_TREE = 8 /* Complete dependency tree required */
++ DR_TREE = 8, /* Complete dependency tree required */
++ DR_TABLE = 0x10, /* table is required, not just info */
+ } report_type_t;
+
+ static int _switches[NUM_SWITCHES];
+@@ -1105,8 +1107,13 @@ static int _info(int argc, char **argv,
+ name = argv[1];
+ }
+
+- if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
+- return 0;
++ if (_report_type & DR_TABLE ) {
++ if (!(dmt = dm_task_create(DM_DEVICE_TABLE)))
++ return 0;
++ } else {
++ if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
++ return 0;
++ }
+
+ if (!_set_task_device(dmt, name, 0))
+ goto out;
+@@ -1570,6 +1577,16 @@ static int _uint32_disp(struct dm_report
+ return dm_report_field_uint32(rh, field, &value);
+ }
+
++static int _int_disp(struct dm_report *rh,
++ struct dm_pool *mem __attribute((unused)),
++ struct dm_report_field *field, const void *data,
++ void *private __attribute((unused)))
++{
++ const int value = *(const int *)data;
++
++ return dm_report_field_int(rh, field, &value);
++}
++
+ static int _dm_name_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute((unused)),
+ struct dm_report_field *field, const void *data,
+@@ -1611,6 +1628,66 @@ static int _dm_info_status_disp(struct d
+ return dm_report_field_string(rh, field, &s);
+ }
+
++static int _dm_info_cleartext_status_disp(struct dm_report *rh,
++ struct dm_pool *mem __attribute((unused)),
++ struct dm_report_field *field, const void *data,
++ void *private __attribute((unused)))
++{
++ const char *buf = "NOTPRESENT";
++ const struct dm_info *info = data;
++
++ if (info->exists) {
++ if (info->suspended)
++ buf = "SUSPENDED";
++ else
++ buf = info->read_only ? " READONLY" : "ACTIVE";
++ }
++
++ return dm_report_field_string(rh, field, &buf);
++}
++
++static int _dm_info_target_types_disp(struct dm_report *rh,
++ struct dm_pool *mem __attribute((unused)),
++ struct dm_report_field *field, const void *data,
++ void *private __attribute((unused)))
++{
++ char buf[1024];
++ char *dest = buf;
++ int remains = sizeof(buf);
++ int written;
++ const char *s = buf;
++ struct dm_task *dmt = (struct dm_task *) data;
++ void *next = NULL;
++ uint64_t start, length;
++ char *target_type = NULL;
++ char *params;
++
++
++ buf[0] = '\0';
++
++ next = dm_get_next_target(dmt, next, &start, &length,
++ &target_type, &params);
++ if (target_type) {
++ written = snprintf(dest, remains, "%s", target_type);
++ dest += written;
++ remains -= written;
++
++ while (remains > 0 && next) {
++ next = dm_get_next_target(dmt, next, &start, &length,
++ &target_type, &params);
++ if (target_type) {
++ written = snprintf(dest, remains, ",%s", target_type);
++ dest += written;
++ remains -= written;
++ }
++ }
++ }
++
++ buf[sizeof(buf)-1] = '\0';
++
++ return dm_report_field_string(rh, field, &s);
++}
++
+ static int _dm_info_devno_disp(struct dm_report *rh, struct dm_pool *mem,
+ struct dm_report_field *field, const void *data,
+ void *private)
+@@ -1834,11 +1911,12 @@ static const struct dm_report_object_typ
+ { DR_INFO, "Mapped Device Information", "", _info_get_obj },
+ { DR_DEPS, "Mapped Device Relationship Information", "", _deps_get_obj },
+ { DR_TREE, "Mapped Device Relationship Information", "", _tree_get_obj },
++ { DR_TABLE, "Mapped Device Table", "", _task_get_obj },
+ { 0, "", "", NULL },
+ };
+
+ /* Column definitions */
+-#define OFFSET_OF(strct, field) ((unsigned int) &((struct strct *)NULL)->field)
++#define OFFSET_OF(strct, field) ((unsigned long) &((struct strct *)NULL)->field)
+ #define STR (DM_REPORT_FIELD_TYPE_STRING)
+ #define NUM (DM_REPORT_FIELD_TYPE_NUMBER)
+ #define FIELD_O(type, strct, sorttype, head, field, width, func, id, desc) {DR_ ## type, sorttype, OFFSET_OF(strct, field), width, id, head, &_ ## func ## _disp, desc},
+@@ -1849,6 +1927,7 @@ static const struct dm_report_field_type
+ FIELD_F(TASK, STR, "Name", 16, dm_name, "name", "Name of mapped device.")
+ FIELD_F(TASK, STR, "UUID", 32, dm_uuid, "uuid", "Unique (optional) identifier for mapped device.")
+ FIELD_F(INFO, STR, "Stat", 4, dm_info_status, "attr", "(L)ive, (I)nactive, (s)uspended, (r)ead-only, read-(w)rite.")
++FIELD_F(INFO, STR, "State", 1, dm_info_cleartext_status, "status", "State as cleartext.")
+ FIELD_F(INFO, STR, "DevNo", 5, dm_info_devno, "devno", "Device major and minor numbers")
+ FIELD_O(INFO, dm_info, NUM, "Maj", major, 3, int32, "major", "Block device major number.")
+ FIELD_O(INFO, dm_info, NUM, "Min", minor, 3, int32, "minor", "Block device minor number.")
+@@ -1856,6 +1935,11 @@ FIELD_O(INFO, dm_info, NUM, "Open", open
+ FIELD_O(INFO, dm_info, NUM, "Targ", target_count, 4, int32, "segments", "Number of segments in live table, if present.")
+ FIELD_O(INFO, dm_info, NUM, "Event", event_nr, 6, uint32, "events", "Number of most recent event.")
+
++FIELD_O(INFO, dm_info, NUM, "RO", read_only, 2, int, "read_only", "Read only.")
++FIELD_O(INFO, dm_info, NUM, "Ex", exists, 2, int, "exists", "Exists.")
++FIELD_O(INFO, dm_info, NUM, "Susp", suspended, 4, int, "suspended", "Suspended.")
++FIELD_O(INFO, dm_info, NUM, "tab_live", live_table, 8, int, "table_live", "Live table.")
++FIELD_O(INFO, dm_info, NUM, "tab_inact", inactive_table, 9, int, "table_inactive", "Inactive table.")
+ FIELD_O(DEPS, dm_deps, NUM, "#Devs", count, 5, int32, "device_count", "Number of devices used by this one.")
+ FIELD_F(TREE, STR, "DevNames", 8, dm_deps_names, "devs_used", "List of names of mapped devices used by this one.")
+ FIELD_F(DEPS, STR, "DevNos", 6, dm_deps, "devnos_used", "List of device numbers of devices used by this one.")
+@@ -1863,6 +1947,7 @@ FIELD_F(DEPS, STR, "DevNos", 6, dm_deps,
+ FIELD_F(TREE, NUM, "#Refs", 5, dm_tree_parents_count, "device_ref_count", "Number of mapped devices referencing this one.")
+ FIELD_F(TREE, STR, "RefNames", 8, dm_tree_parents_names, "names_using_dev", "List of names of mapped devices using this one.")
+ FIELD_F(TREE, STR, "RefDevNos", 9, dm_tree_parents_devs, "devnos_using_dev", "List of device numbers of mapped devices using this one.")
++FIELD_F(TABLE, STR, "Targettypes", 32, dm_info_target_types, "target_types", "Used target types.")
+ {0, 0, 0, 0, "", "", NULL, NULL},
+ /* *INDENT-ON* */
+ };
+@@ -1873,13 +1958,15 @@ FIELD_F(TREE, STR, "RefDevNos", 9, dm_tr
+ #undef FIELD_F
+
+ static const char *default_report_options = "name,major,minor,attr,open,segments,events,uuid";
++static const char *default_export_options = "name,major,minor,status,read_only,exists,suspended,table_live,table_inactive,open,segments,events,uuid,target_types";
+
+ static int _report_init(struct command *c)
+ {
+- char *options = (char *) default_report_options;
++ char *default_options = (char *) default_report_options;
++ char *options;
+ const char *keys = "";
+ const char *separator = " ";
+- int aligned = 1, headings = 1, buffered = 1;
++ int aligned = 1, headings = 1, buffered = 1, export = 0;
+ uint32_t flags = 0;
+ size_t len = 0;
+ int r = 0;
+@@ -1894,6 +1981,15 @@ static int _report_init(struct command *
+ if (_switches[UNBUFFERED_ARG])
+ buffered = 0;
+
++ if (_switches[EXPORT_ARG]) {
++ default_options = (char *) default_export_options;
++ separator = "\n";
++ aligned = 0;
++ headings = 0;
++ export = 1;
++ }
++
++ options = default_options;
+ if (_switches[OPTIONS_ARG] && _string_args[OPTIONS_ARG]) {
+ if (*_string_args[OPTIONS_ARG] != '+')
+ options = _string_args[OPTIONS_ARG];
+@@ -1936,6 +2032,9 @@ static int _report_init(struct command *
+ if (headings)
+ flags |= DM_REPORT_OUTPUT_HEADINGS;
+
++ if (export)
++ flags |= DM_REPORT_OUTPUT_EXPORT;
++
+ if (!(_report = dm_report_init(&_report_type,
+ _report_types, _report_fields,
+ options, separator, flags, keys, NULL)))
+@@ -2010,7 +2109,8 @@ static void _usage(FILE *out)
+ fprintf(out, "Usage:\n\n");
+ fprintf(out, "dmsetup [--version] [-v|--verbose [-v|--verbose ...]]\n"
+ " [-r|--readonly] [--noopencount] [--nolockfs]\n"
+- " [-c|-C|--columns] [-o <fields>] [-O|--sort <sort_fields>]\n"
++ " [-c|-C|--columns] [-e|--export]\n"
++ " [-o <fields>] [-O|--sort <sort_fields>]\n"
+ " [--noheadings] [--separator <separator>]\n\n");
+ for (i = 0; _commands[i].name; i++)
+ fprintf(out, "\t%s %s\n", _commands[i].name, _commands[i].help);
+@@ -2354,6 +2454,7 @@ static int _process_switches(int *argc,
+ static struct option long_options[] = {
+ {"readonly", 0, &ind, READ_ONLY},
+ {"columns", 0, &ind, COLS_ARG},
++ {"export", 0, &ind, EXPORT_ARG},
+ {"exec", 1, &ind, EXEC_ARG},
+ {"force", 0, &ind, FORCE_ARG},
+ {"gid", 1, &ind, GID_ARG},
+@@ -2431,12 +2532,16 @@ static int _process_switches(int *argc,
+
+ optarg = 0;
+ optind = OPTIND_INIT;
+- while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfGj:m:Mno:O:ru:Uv",
++ while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCefGj:m:Mno:O:ru:Uv",
+ long_options, NULL)) != -1) {
+ if (c == ':' || c == '?')
+ return 0;
+ if (c == 'c' || c == 'C' || ind == COLS_ARG)
+ _switches[COLS_ARG]++;
++ if (c == 'e' || ind == EXPORT_ARG) {
++ _switches[EXPORT_ARG]++;
++ _switches[COLS_ARG]++;
++ }
+ if (c == 'f' || ind == FORCE_ARG)
+ _switches[FORCE_ARG]++;
+ if (c == 'r' || ind == READ_ONLY)
+Index: device-mapper.1.02.22/lib/libdevmapper.h
+===================================================================
+--- device-mapper.1.02.22.orig/lib/libdevmapper.h
++++ device-mapper.1.02.22/lib/libdevmapper.h
+@@ -715,6 +715,7 @@ struct dm_report_field_type {
+ #define DM_REPORT_OUTPUT_ALIGNED 0x00000001
+ #define DM_REPORT_OUTPUT_BUFFERED 0x00000002
+ #define DM_REPORT_OUTPUT_HEADINGS 0x00000004
++#define DM_REPORT_OUTPUT_EXPORT 0x00000008
+
+ struct dm_report *dm_report_init(uint32_t *report_types,
+ const struct dm_report_object_type *types,
diff --git a/sys-fs/device-mapper/files/digest-device-mapper-1.02.22 b/sys-fs/device-mapper/files/digest-device-mapper-1.02.22
new file mode 100644
index 000000000000..9b8f6a284ce3
--- /dev/null
+++ b/sys-fs/device-mapper/files/digest-device-mapper-1.02.22
@@ -0,0 +1,3 @@
+MD5 6b94db57cdc9022af1583b3f2acb91cd device-mapper.1.02.22.tgz 189726
+RMD160 8bf9986536c49f53c398d6a2180e21e1235bea18 device-mapper.1.02.22.tgz 189726
+SHA256 ff833a6cd6246686f5b3f5692fd6597f1ffbc60f08929e5fe68304cdafb61595 device-mapper.1.02.22.tgz 189726