Re: For a cross-compiling toolchain, does it matter if /usr/bin/* links are symbolic or hard?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/2015 10:11 AM, Jonathan Dieter wrote:
I'm reviewing nacl-binutils (https://bugzilla.redhat.com/show_bug.cgi?i
d=1270355), which has hard links from /usr/x86_64-nacl/* to
/usr/bin/x86_64-nacl-*.  According to https://fedoraproject.org/wiki/Pa
ckaging_Cross_Compiling_Toolchains, these should be symlinks, and
rpmlint complains about cross-directory-hard-links.  Is there any
reason to convert these to symlinks or can we just leave them as hard
links?

IIRC, the only purpose of these "duplicate" binaries, is to support non-canonicalized and canonicalized style of invoking these binaries[1] (/usr/bin/$target-* vs. /usr/$target/bin/*). I am not sure, but AFAICT, it doesn't matter to the GNU-toolchain, whether these links are hardlinks or symlinks.


However, whether they are hardlinks or symlinks matters to rpm. GNU-toolchain packages using hardlinks will fail to install, if /usr/$target and /usr/bin are on different partitions [2].

I doubt this is an actual problem, because we already have several such packages in Fedora, and at least I do not recall anybody ever having complained about it (Probably nobody is putting /usr/bin and /usr/$target on separate partitions)

So, when being pedantic, one would have to enforce symlinks, but when being pragmatic, these hard links should not be much of a real world issue.

Ralf


[1] "canonicalized" == "target-tuple-prefixed" binaries,
e.g. "$target-as", typically installed to /usr/bin/.

"non-canonicalized" == "non-target-tuple-prefixed" binaries.
e.g. "as", typically installed to /usr/$target/bin/ar


[2] e.g. the mingw{32,64}- toolchains.
When putting /usr/i686-w64-mingw32 or /usr/x86_64-w64-mingw32 on a separate partition, installing these toolchain's binutils/gccs will fail miserably.

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux