Ensure that ldconfig-managed elf and elf32 hints always include the standard library paths that are known independently to rtld.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
libexec/rc/rc.d/ldconfig | ||
---|---|---|
6 | I suppose FILESYSTEMS makes /usr/bin available, am I right? | |
25 | I prefer the $() syntax, and I see no reason not to use it there. machine_arch below is assigned this way. | |
45 | Besides checking the arch, we need to check that /libexec/ld-elf32.so.1 is present and is executable. System might have been installed without compat32 userspace tools. |
libexec/rc/rc.d/ldconfig | ||
---|---|---|
6 | FILESYSTEMS is a "dummy" dependency that requires root, mountcritlocal, cleanvar, and tmp. The rc.d scripts that explicitly invoke tools in /usr/bin (in main as of just now) are bluetooth, iscsictl, jail, opensm, sendmail, and sshd. Four of the six also REQUIRE: FILESYSTEMS, and no other REQUIRE target is at least as common within that subset. mountcritlocal mounts everything except (nominally) NFS and SMB. Without further analysis/testing, evidence implies that /usr/bin is available to the ldconfig script. | |
25 | Four existing assignments use backticks (_files and ldconfig_paths in the initial loop, and _files_ and ldconfig32_paths in the "64" case). One existing assignment uses $(). I will be glad to use which ever style you think is best, and would appreciate any insight about what underlies each style and your preference. |
libexec/rc/rc.d/ldconfig | ||
---|---|---|
25 | $() is better than backticks because it allows to clearly parse the nesting, and clearly see the missed delimiter. Single \` could mean either missed starting backtick, or missed closed backtick. Also backticks cannot nest. I believe this was the reason why ksh added $(). |
Incorporated feedback.
- $() instead of backticks
- Test for presence and executability of ld-elf32.so.1
Please send me the git-formatted patch, with the metadata filled in. Most important, please set the author field to appropriate name/email.