[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#868848: marked as done (debian-installer-utils: "list-devices partition" should report LVM logical volumes too)



Your message dated Thu, 30 Nov 2017 05:03:40 +0000
with message-id <E1eKH0e-000GsE-Ku@fasolo.debian.org>
and subject line Bug#868848: fixed in debian-installer-utils 1.122
has caused the Debian Bug report #868848,
regarding debian-installer-utils: "list-devices partition" should report LVM logical volumes too
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
868848: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868848
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: debian-installer-utils
Version: 1.119
Severity: normal
Tags: patch
User: devel@kali.org
Usertags: origin-kali kali-patch

Just like "list-devices partition" reports back RAID partitions, it should
also report LVM logical volumes. The attached patch does this.

My goal is to extend the "hd-media" image to be able to find the ISO image
within an LVM logical volume too. This is a preliminary step in this
project.

Currently, I'm not hiding the partitions used by the various volume
groups. This is unlike what has been done for RAID partitions. But
I don't know all the places where list-devices is used and I'm not
convinced that it's really required either (it's not a requirement
for iso-scan at least). I'm ccing Colin, he might have some insight to
share on this.

Let me know if anybody has any objection against this patch.

Raphaël.

-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
>From 6a3ece02614a1d729c5438f4192aed8a399e27cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>
Date: Tue, 18 Jul 2017 16:41:46 +0200
Subject: [PATCH] Fix "list-devices partition" to also report LVM logical
 volumes

---
 debian/changelog   |  6 ++++++
 list-devices-linux | 20 ++++++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8026b68..9181908 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debian-installer-utils (1.120) UNRELEASED; urgency=medium
+
+  * Fix "list-devices partition" to also report LVM logical volumes.
+
+ -- Raphaël Hertzog <hertzog@debian.org>  Tue, 18 Jul 2017 16:39:00 +0200
+
 debian-installer-utils (1.119) unstable; urgency=medium
 
   * fix: propagate dot-containing options to target kernel cmdline
diff --git a/list-devices-linux b/list-devices-linux
index 9eb3c71..fa9596c 100755
--- a/list-devices-linux
+++ b/list-devices-linux
@@ -38,6 +38,10 @@ device_name () {
 	echo "/dev/$name"
 }
 
+is_lvm() {
+	grep -qs ^LVM- "$1/dm/uuid"
+}
+
 is_sataraid () {
 	grep -qs ^DMRAID- "$1/dm/uuid"
 }
@@ -79,7 +83,13 @@ case $TYPE in
 	done
 	for x in /sys/block/dm-*; do
 		[ -d "$x" ] || continue
-		(is_sataraid "$x" && is_sataraid_partition "$x") || continue
+		if is_lvm "$x"; then
+			: # Keep LVM logical volumes
+		elif is_sataraid "$x" && is_sataraid_partition "$x"; then
+			: # Keep dmraid partitions
+		else
+			continue  # Skip unknown entries
+		fi
 		syspaths="${syspaths:+$syspaths }$x"
 	done
 	TYPE=disk
@@ -100,6 +110,9 @@ case $TYPE in
 			if is_sataraid "$x" && is_sataraid_partition "$x"; then
 				continue
 			fi
+			if is_lvm "$x"; then
+				continue
+			fi
 			;;
 		    *)
 			name="$(device_name "$x")"
@@ -141,10 +154,13 @@ for x in $syspaths; do
 			match=:
 			;;
 		    /block/dm-*)
-			# for now, we only understand dmraid
+			# for now, we only understand dmraid and LVM
 			if is_sataraid "/sys$devpath"; then
 				match=:
 			fi
+			if is_lvm "/sys$devpath"; then
+				match=:
+			fi
 			;;
 		esac
 	fi
-- 
2.13.3


--- End Message ---
--- Begin Message ---
Source: debian-installer-utils
Source-Version: 1.122

We believe that the bug you reported is fixed in the latest version of
debian-installer-utils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 868848@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated debian-installer-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 29 Nov 2017 22:03:57 +0100
Source: debian-installer-utils
Binary: di-utils-shell di-utils-reboot di-utils-exit-installer di-utils di-utils-mapdevfs di-utils-terminfo
Architecture: source
Version: 1.122
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description:
 di-utils   - Miscellaneous utilities for the debian installer (udeb)
 di-utils-exit-installer - Exit installer (udeb)
 di-utils-mapdevfs - mapdevfs utility for the debian installer (udeb)
 di-utils-reboot - Reboot (udeb)
 di-utils-shell - Execute a shell (udeb)
 di-utils-terminfo - Terminfo entries needed by newt/slang in debian installer (udeb)
Closes: 868848
Changes:
 debian-installer-utils (1.122) unstable; urgency=medium
 .
   [ Raphaël Hertzog ]
   * Fix "list-devices partition" to also report LVM logical volumes.
     (Closes: #868848)
 .
   [ Updated translations ]
   * Lithuanian (lt.po) by Rimas Kudelis
   * Norwegian Nynorsk (nn.po) by Allan Nordhøy
Checksums-Sha1:
 b2db6c6a6949d053b68308fd2e943c74c5d4a411 2234 debian-installer-utils_1.122.dsc
 97a76967e8eb3ebe70e2228e8b964225ce474636 98068 debian-installer-utils_1.122.tar.xz
Checksums-Sha256:
 f7a3502f1c45c82ce324dd08fa237d276a03861b7739051c58591fb34a2989b9 2234 debian-installer-utils_1.122.dsc
 02885a73377c8d09388d370b4648fa5be5b5be274cf28e75f1c4d642e72d218c 98068 debian-installer-utils_1.122.tar.xz
Files:
 58202273303d780bd73c47d4079a2064 2234 debian-installer standard debian-installer-utils_1.122.dsc
 b2e5f9549eae91ee7189d48f0428ebf0 98068 debian-installer standard debian-installer-utils_1.122.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1cL5v8oSi7oip3IYhy9wLE1uJagFAlofjT0ACgkQhy9wLE1u
Jagcbg/9FE/fUAySHJ+LP5Lt8RBfWTrq84cWDhVAUxqS3UMOepEZyOQ5MZHVvBto
Lv4yHvGZ0+FjJ8d8f2ZGLxrbPv/XnleqzmUgQlHUMLr1EjndJ2woBeTf7NFHPLOv
d68DuX7CDV20axcE8gdFeHElGB36/XiHnlrwX35cQPQU2A6lNlKR+CBqLgoiLmUf
9CY2iroYycoa+3sJd/+t/Ez+DdDaFMGAYIUHa6DsQ71Aa8TF/afuM1FRpo8sarR/
nydDLoTJr4E07W6gdkSW5wHjWDC9MwDgf7VOCHkncemnNbmt/0blS+5wxrBP+3Pa
/Uui3Lly0XPpfDuPQI0lcVLgVWME4gvtYgfrTryQ2DChdwg3xe7KYuFuZmSdkRtt
gxdC8DKkmoFx0SrfqH6Kc9S7iWSTH5zoSs5TumVPHvKLf+pblZiTLdO87DorDcW+
nQlvKL+yK5GVWHbc1lD4JLdGZb1BDBU9v2DFtleMJThKlH1WaaRTyEK87+U+HnM3
EJnMaaFfeYDrUsiOHq9roS2gXeYpr2WX5RSFCJK453y7G45pY50M1NKHeQTp8pUR
yZF2qa++hDYJ2Pr8BACwUS+gnC3q8kFwQK8FzGR9qu1qWU4ulKNkYgYhoh2/3fIF
mD+GYWX5eE3W13x1DCNdla8z8JQysyAPGXMakgafIT62CHtyZd4=
=5zLE
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: