Ticket #1913 (closed defect: fixed)

Opened 2 years ago

Last modified 7 months ago

coreutils: readlink should probably be in /bin

Reported by: Bryan Kadzban Assigned to: matthew@linuxfromscratch.org
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

11/09/06 20:24:16 changed by Bryan Kadzban

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.

02/08/07 13:21:22 changed by matthew@linuxfromscratch.org

  • milestone set to 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?

02/08/07 14:56:04 changed by dnicholson@linuxfromscratch.org

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

02/08/07 15:48:00 changed by Bryan Kadzban

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.

02/08/07 16:22:21 changed by matthew@linuxfromscratch.org

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.

02/09/07 13:43:43 changed by matthew@linuxfromscratch.org

  • owner changed from lfs-book@linuxfromscratch.org to matthew@linuxfromscratch.org.
  • status changed from new to assigned.

02/09/07 14:04:12 changed by matthew@linuxfromscratch.org

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in r1719.

10/05/07 07:53:16 changed by jhuntwork@linuxfromscratch.org

  • milestone deleted.

Milestone 6.3 deleted