Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#1913 closed defect (fixed)

coreutils: readlink should probably be in /bin

Reported by: bryan@linuxfromscratch.org Owned by: Matthew Burgess
Priority: normal Milestone:
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

The Udev rule_generator.functions file has a "sysreadlink" function that uses the readlink binary. That functions file also sets PATH to /sbin:/bin (it was designed to be used before /usr is mounted), which means readlink needs to be in either /sbin or /bin.

Chapter 6 coreutils leaves it in /usr/bin (while moving many other programs). I think we should add readlink to the list of programs being moved to /bin.

As for other distros, at least Debian has it in /bin (I don't know about any others). See:

http://marc.theaimsgroup.com/?l=linux-hotplug-devel&m=116285351800962&w=2

Change History (8)

comment:1 by bryan@linuxfromscratch.org, 18 years ago

Looks like upstream might change sysreadlink to not use readlink (several other distros don't have readlink in /bin, and several iterations of a patch to use cd and "pwd -P" were posted -- "pwd -P" is what path_id already uses). Nothing has been committed to git yet, though, so I'll leave this open for a while longer.

But it's probably going to end up being a WONTFIX.

comment:2 by Matthew Burgess, 18 years ago

Milestone: 6.3

Bryan, I've a backlog of 115 emails from linux-hotplug-devel. Was there any upstream progress on this, or are we going to have to move `readlink' to /bin?

comment:3 by dnicholson@…, 18 years ago

I haven't heard anything about it since the original messages, and udev-104 still calls readlink in that particular functions file.

comment:4 by bryan@linuxfromscratch.org, 18 years ago

The discussion more or less died out without anything happening. However, no scripts that we use call into sysreadlink, either, so it won't hurt anyone unless they modify their scripts after installation.

I created this ticket because my first try at by-path persistence for NICs used sysreadlink, and it wasn't working. I have a newer patch that doesn't use sysreadlink anymore (it uses path_id instead), which I've also never heard anything about; I should probably either put that patch in the book (or at least submit to patches) or bring it up on linux-hotplug-devel again. Either of those should let us fix #1912 permanently.

comment:5 by Matthew Burgess, 18 years ago

Thanks for the update, Bryan. I'd like to see that patch head upstream, if you've got the time to push it. For now though, if you could commit it to the patches repo and have the book use it that'd be great.

Although, as you say, nothing currently calls into sysreadlink() in our scripts, there's nothing stopping someone from adding their own rules that will call it. I therefore think the only option we've got is to move readlink into /bin.

comment:6 by Matthew Burgess, 18 years ago

Owner: changed from lfs-book@… to Matthew Burgess
Status: newassigned

comment:7 by Matthew Burgess, 18 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r1719.

comment:8 by Jeremy Huntwork, 17 years ago

Milestone: 6.3

Milestone 6.3 deleted

Note: See TracTickets for help on using tickets.