First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 92748
Alias:
Product:
Component:
Status: RESOLVED
Resolution: UPSTREAM
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kerin Millar <kerframil@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
debianutils-1.16.7-r5.ebuild sys-apps/debianutils-1.16.7-r5.ebuild text/plain Kerin Millar 2005-05-15 18:20 0000 1.50 KB Details
debianutils-1.16.7-mkboot-nordev.patch debianutils-1.16.7-mkboot-nordev.patch patch Kerin Millar 2005-05-15 18:21 0000 347 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 92748 depends on: Show dependency tree
Show dependency graph
Bug 92748 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-05-15 18:18 0000
The /usr/sbin/mkboot script provided by sys-apps/debianutils uses the following
method to determine the root device:

rootpart=$(rdev | cut -d ' ' -f 1)

However, the rdev tool only seems to be provided when sys-apps/util-linux is
built upon "intel" (i.e. ia32/x86) platforms. That particular issue was touched
upon in bug 35902. I only became aware of this issue because I was privy to the
matter as raised by an amd64 user. I think that the method used is poor and
propose an alternative as follows:

rootpart=$(grep -o "root=[^ ]*" /proc/cmdline | cut -d= -f2)

I'm not sure whether that's the best way to go about it but it's certainly the
more "agnostic" approach. I'll attach the proposed ebuild and patch.

------- Comment #1 From Kerin Millar 2005-05-15 18:20:11 0000 -------
Created an attachment (id=58977) [edit]
sys-apps/debianutils-1.16.7-r5.ebuild

------- Comment #2 From Kerin Millar 2005-05-15 18:21:19 0000 -------
Created an attachment (id=58978) [edit]
debianutils-1.16.7-mkboot-nordev.patch

This patch implements the alternate method of determining the root device as
mentioned above.

------- Comment #3 From SpanKY 2005-06-16 17:09:58 0000 -------
debianutils-2.x has 'better' rdev handling ...

your rootpart grep looks pretty good, could you please e-mail that to the debian
bug site ?
http://www.debian.org/Bugs/Reporting

------- Comment #4 From Kerin Millar 2005-06-21 12:02:07 0000 -------
Thanks SpanKY. I've done exactly that; I'll post back here if anything comes of
it.

------- Comment #5 From Kerin Millar 2005-06-21 12:17:27 0000 -------
Here's the BTS link: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=315303

------- Comment #6 From Kerin Millar 2005-06-21 20:27:27 0000 -------
Clint Adams accepted a fix for the package upstream (thanks Clint!). Not sure
how it will propagate in terms of package versions/releases (should probably
read up on their policy one of these days). I presume that the fix will somewhat
resemble the suggestion I made:

if [ $(mount | grep -o "^proc") ] && [ -e /proc/cmdline ]; then
       rootpart=$(grep -o "root=[^ ]*" /proc/cmdline | cut -d = -f 2)
else
       which rdev >/dev/null && rootpart=$(rdev | cut -d ' ' -f 1)
fi

Thus, the existing behaviour is supported as a fallback in the case that it
doesn't appear possible to establish the root device from the /proc filesystem.

------- Comment #7 From SpanKY 2005-06-21 20:44:35 0000 -------
we watch http://packages.debian.org/unstable/base/debianutils.html

when that version gets updated, we update the ebuild

------- Comment #8 From Kerin Millar 2005-06-21 20:56:01 0000 -------
Sure thing, thanks. Damn, I just realised that it could have been made to work
in a chroot also:

[ $(mount | grep -Ec "^(none|proc) on /proc type proc") -gt 0 ] && [ -e
/proc/cmdline ]

------- Comment #9 From Kerin Millar 2005-07-02 09:11:47 0000 -------
Bump. It's fixed in >=debianutils-2.14 (where 2.14.1 is currently available).
So
this should be closed once it's in portage.

------- Comment #10 From SpanKY 2005-07-02 10:36:16 0000 -------
2.14.1 now in portage, thanks

First Last Prev Next    No search results available      Search page      Enter new bug