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

Bug#361147: marked as done (partman-base: add dm-crypt detection support)



Your message dated Sun, 09 Apr 2006 14:03:05 -0700
with message-id <E1FSh3p-00064u-IK@spohr.debian.org>
and subject line Bug#361147: fixed in partman-base 81
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: partman-base
Version: 80
Severity: wishlist
Tags: patch

Hi,

the attached patch is necessary in order to show decent descriptions for encrypted volumes when using partman-crypt. Without the patch, everything under /dev/mapper is listed as a lvm lv.

Regards,
David Härdeman

Index: partman-base/debian/partman-base.templates
===================================================================
--- partman-base.orig/debian/partman-base.templates	2006-03-23 23:40:53.000000000 +0100
+++ partman-base/debian/partman-base.templates	2006-04-06 22:27:20.000000000 +0200
@@ -252,6 +252,10 @@
 Type: text
 _Description: RAID%s device #%s
 
+Template: partman/text/dmcrypt_volume
+Type: text
+_Description: Encrypted volume (%s)
+
 Template: partman/text/lvm_lv
 Type: text
 _Description: LVM VG %s, LV %s
Index: partman-base/definitions.sh
===================================================================
--- partman-base.orig/definitions.sh	2006-04-04 22:37:04.000000000 +0200
+++ partman-base/definitions.sh	2006-04-06 23:54:46.000000000 +0200
@@ -633,17 +633,29 @@
 	    printf "$RET" ${type} ${device}
 	    ;;
 	/dev/mapper/*)
-	    # LVM2 devices are found as /dev/mapper/<vg>-<lv>.  If the vg
-	    # or lv contains a dash, the dash is replaced by two dashes.
-	    # In order to decode this into vg and lv, first find the
-	    # occurance of one single dash to split the string into vg and
-	    # lv, and then replace two dashes next to each other with one.
-	    vglv=${1#/dev/mapper/}
-	    vglv=`echo "$vglv" | sed -e 's/\([^-]\)-\([^-]\)/\1 \2/' | sed -e 's/--/-/g'`
-	    vg=`echo "$vglv" | cut -d" " -f1`
-	    lv=`echo "$vglv" | cut -d" " -f2`
-	    db_metaget partman/text/lvm_lv description
-	    printf "$RET" $vg $lv
+        # First of all, check if this is a dm-crypt device
+        type=""
+        if [ -x /sbin/dmsetup ]; then
+            type=$(/sbin/dmsetup table $swap | head -1 | cut -d " " -f3)
+        fi
+
+        if [ $type = crypt ]; then
+            mapping=${1#/dev/mapper/}
+            db_metaget partman/text/dmcrypt_volume description
+            printf "$RET" $mapping
+        else
+            # LVM2 devices are found as /dev/mapper/<vg>-<lv>.  If the vg
+            # or lv contains a dash, the dash is replaced by two dashes.
+            # In order to decode this into vg and lv, first find the
+            # occurance of one single dash to split the string into vg and
+            # lv, and then replace two dashes next to each other with one.
+            vglv=${1#/dev/mapper/}
+            vglv=`echo "$vglv" | sed -e 's/\([^-]\)-\([^-]\)/\1 \2/' | sed -e 's/--/-/g'`
+            vg=`echo "$vglv" | cut -d" " -f1`
+            lv=`echo "$vglv" | cut -d" " -f2`
+            db_metaget partman/text/lvm_lv description
+            printf "$RET" $vg $lv
+        fi
 	    ;;
 	/dev/loop/*)
 	    n=${1#/dev/loop/}

--- End Message ---
--- Begin Message ---
Source: partman-base
Source-Version: 81

We believe that the bug you reported is fixed in the latest version of
partman-base, which is due to be installed in the Debian FTP archive:

partman-base_81.dsc
  to pool/main/p/partman-base/partman-base_81.dsc
partman-base_81.tar.gz
  to pool/main/p/partman-base/partman-base_81.tar.gz
partman-base_81_i386.udeb
  to pool/main/p/partman-base/partman-base_81_i386.udeb



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 361147@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Frans Pop <fjp@debian.org> (supplier of updated partman-base 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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun,  9 Apr 2006 22:51:05 +0200
Source: partman-base
Binary: partman-base
Architecture: source i386
Version: 81
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Frans Pop <fjp@debian.org>
Description: 
 partman-base - Partition the storage devices (partman) (udeb)
Closes: 290929 361147
Changes: 
 partman-base (81) unstable; urgency=low
 .
   [ Anton Zinoviev ]
   * Some insignificant polishing (comments, indent).
   * Raise the Debconf priority of the messages of libparted -- give the
     errors at critical priority (was high), warnings at high (was medium)
     and information at medium (was low).  Thanks to Joey Hess,
     closes: #290929.
 .
   [ Max Vozeler ]
   * definitions.sh (humandev): Handle dm-crypt volumes. Thanks to
     David Härdemann <david@2gen.com>, closes: #361147.
 .
   [ Frans Pop ]
   * Add myself to uploaders.
 .
   [ Updated translations ]
   * Bulgarian (bg.po) by Ognyan Kulev
   * Bosnian (bs.po) by Safir Secerovic
   * Catalan (ca.po) by Jordi Mallach
   * Czech (cs.po) by Miroslav Kure
   * Danish (da.po) by Claus Hindsgaul
   * German (de.po) by Jens Seidel
   * Esperanto (eo.po) by Serge Leblanc
   * Spanish (es.po) by Javier Fernández-Sanguino Peña
   * Basque (eu.po) by Piarres Beobide
   * French (fr.po) by Christian Perrier
   * Irish (ga.po) by Kevin Patrick Scannell
   * Galician (gl.po) by Jacobo Tarrio
   * Indonesian (id.po) by Parlin Imanuel Toh
   * Italian (it.po) by Giuseppe Sacco
   * Japanese (ja.po) by Kenshi Muto
   * Khmer (km.po) by hok kakada
   * Macedonian (mk.po) by Georgi Stanojevski
   * Bokmål, Norwegian (nb.po) by Bjørn Steensrud
   * Dutch (nl.po) by Bart Cornelis
   * Polish (pl.po) by Bartosz Fenski
   * Portuguese (Brazil) (pt_BR.po) by André Luís Lopes
   * Portuguese (pt.po) by Miguel Figueiredo
   * Romanian (ro.po) by Eddy PetriÅ?or
   * Russian (ru.po) by Yuri Kozlov
   * Northern Sami (se.po) by Børre Gaup
   * Slovak (sk.po) by Peter Mann
   * Slovenian (sl.po) by Jure Cuhalev
   * Swedish (sv.po) by Daniel Nylander
   * Tamil (ta.po) by Damodharan Rajalingam
   * Tagalog (tl.po) by Eric Pareja
   * Turkish (tr.po) by Recai OktaÅ?
   * Ukrainian (uk.po) by Eugeniy Meshcheryakov
   * Simplified Chinese (zh_CN.po) by Carlos Z.F. Liu
Files: 
 4367e5939ecc0b6ac5120c7cb10e3bba 694 debian-installer standard partman-base_81.dsc
 fc4c747eaba32a01148fcca85e64171b 152541 debian-installer standard partman-base_81.tar.gz
 ba4997c7c42b1dacdd4b5767ff4ea635 133368 debian-installer standard partman-base_81_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEOXR3gm/Kwh6ICoQRAnP0AKCWLcxD8uRqHohwvszva+Ne7xX2QQCbB036
/t4HHbIZDW3Y8fz739Br3us=
=V9kz
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: