Debian Bug report logs -
#295246
partconf-find-partitions: /dev/discs symlink handling breaks with udev
Reported by: Colin Watson <cjwatson@debian.org>
Date: Mon, 14 Feb 2005 17:33:11 UTC
Severity: normal
Tags: patch
Found in version 1.07
Fixed in version partconf/1.08
Done: Colin Watson <cjwatson@ubuntu.com>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#295246; Package partconf-find-partitions.
(full text, mbox, link).
Acknowledgement sent to Colin Watson <cjwatson@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: partconf-find-partitions
Version: 1.07
Severity: normal
Tags: patch
The /dev/discs symlink handling in find-parts.c:get_all_partitions() is
partly broken. In particular, it breaks when using udev. On my test
system, neither /dev/discs nor /dev/discs/disc0 is a symlink, and
/dev/discs/disc0/ looks like this:
lrwxrwxrwx 1 root root 39 Feb 14 17:22 disc -> ../../scsi/host0/bus0/target0/lun0/disc
lrwxrwxrwx 1 root root 40 Feb 14 17:22 part1 -> ../../scsi/host0/bus0/target0/lun0/part1
lrwxrwxrwx 1 root root 40 Feb 14 17:22 part2 -> ../../scsi/host0/bus0/target0/lun0/part2
lrwxrwxrwx 1 root root 40 Feb 14 17:22 part5 -> ../../scsi/host0/bus0/target0/lun0/part5
lrwxrwxrwx 1 root root 40 Feb 14 17:22 part6 -> ../../scsi/host0/bus0/target0/lun0/part6
lrwxrwxrwx 1 root root 40 Feb 14 17:22 part7 -> ../../scsi/host0/bus0/target0/lun0/part7
get_all_partitions() decides to look at
/dev/../../scsi/host0/bus0/target0/lun0/disc/disc for this, which
obviously doesn't work too well.
I initially started to produce a small patch to fix the existing symlink
handling code, but it didn't really seem worth the effort. Instead,
noting that find-parts.c is already _GNU_SOURCE, I decided to replace it
with use of canonicalize_file_name(), which makes the code a lot more
readable. If somebody objects to the GNUism, there's a
canonicalize_file_name() implementation in the gnulib package which
could be used conditionally.
Note that I've only tested this patch in Ubuntu's installer, which uses
udev, not in Debian's devfs installer.
http://patches.ubuntulinux.org/patches/partconf.canonicalize.diff
Cheers,
--
Colin Watson [cjwatson@debian.org]
Reply sent
to Colin Watson <cjwatson@ubuntu.com>:
You have taken responsibility.
(Wed, 16 Mar 2011 18:21:03 GMT) (full text, mbox, link).
Notification sent
to Colin Watson <cjwatson@debian.org>:
Bug acknowledged by developer.
(Wed, 16 Mar 2011 18:21:03 GMT) (full text, mbox, link).
Message #10 received at 295246-done@bugs.debian.org (full text, mbox, reply):
Source: partconf
Source-Version: 1.08
On Mon, Feb 14, 2005 at 05:30:19PM +0000, Colin Watson wrote:
> The /dev/discs symlink handling in find-parts.c:get_all_partitions() is
> partly broken. In particular, it breaks when using udev.
I applied this patch in partconf 1.08 (and shortly thereafter replaced
it entirely with code based on libparted).
partconf (1.08) unstable; urgency=low
* Christian Perrier
- Add a comment about the Choices length for translators
in the debconf templates file
* Colin Watson
- get_all_partitions()'s symlink handling in /dev/discs was incorrect in
places, and broke when using udev. Replace it with use of
canonicalize_file_name().
- Use getopt_long() for find-partitions option parsing. Support -i as
short version of --ignore-fstype.
- Add find-partitions -c/--colons output mode, which is easier to parse
from shell.
- Add find-partitions -f/--flag option to display only partitions with a
given parted flag set.
* Updated translations:
- Bulgarian (bg.po) by Ognyan Kulev
- Catalan (ca.po) by Guillem Jover
- Czech (cs.po) by Miroslav Kure
- German (de.po) by Herbert Straub
- Greek, Modern (1453-) (el.po) by Kostas Papadimas
- Spanish (es.po) by Enrique Matias Sanchez
- Gallegan (gl.po) by Jacobo Tarrio
- Hebrew (he.po) by Lior Kaplan
- Portuguese (pt.po) by Miguel Figueiredo
- Portuguese (Brazil) (pt_BR.po) by Carlos Eduardo Pedroza Santiviago
- Turkish (tr.po) by Recai Oktaş
- Ukrainian (uk.po) by Eugeniy Meshcheryakov
- Traditional Chinese (zh_TW.po) by Tetralet
-- Colin Watson <cjwatson@debian.org> Wed, 11 May 2005 11:30:37 +0100
--
Colin Watson [cjwatson@ubuntu.com]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 14 Apr 2011 07:35:50 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Oct 11 12:06:14 2017;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.