Robert P. J. Day wrote:
>   i'm curious about RH packaging policy that dictates that some
> command variants are packaged for fedora to install with symlinks
> and others with hardlinks.
>   trivial example in /usr/bin on my fedora 27 system:
>   -rwsr-xr-x.   1 root root        52984 Aug  2  2017 at
>   lrwxrwxrwx.   1 root root            2 Aug  2  2017 atq -> at
>   lrwxrwxrwx.   1 root root            2 Aug  2  2017 atrm -> at
> so even though all of those "commands" are in the very same directory,
> atq and atrm are supported via symlinks, not hardlinks.

I would bet that often the use of symlink or hardlink is
part of the upstream install scripts.  Unless there is a
strong reason to change that, the packaging should just
follow upstream.

>   OTOH, consider the "git" command, also in /usr/bin:
>   -rwxr-xr-x. 116 root root 2273360 Feb 16 15:03 git
> as you can see, there are 116 hardlinks to that executable, pretty
> much all of them in /usr/libexec/git-core:
>   -rwxr-xr-x. 116 root root 2273360 Feb 16 15:03 git
>   -rwxr-xr-x. 116 root root 2273360 Feb 16 15:03 git-add
>   -rwxr-xr-x.   1 root root   41441 Feb 16 15:03 git-add--interactive
>   -rwxr-xr-x.   3 root root 2273360 Feb 16 15:03 git-am
>   -rwxr-xr-x. 116 root root 2273360 Feb 16 15:03 git-annotate
>   -rwxr-xr-x. 116 root root 2273360 Feb 16 15:03 git-apply
>   -rwxr-xr-x. 116 root root 2273360 Feb 16 15:03 git-archive
>   ... big snip ...

> is there a reason that "at" uses symlinks, while "git" installs with
> hardlinks? one would imagine that it would be the other way around --
> given that the "at" variations are all in the same directory,
> hardlinks would seem to be the better choice since there is no
> possibility of crossing filesystem boundaries.
>   also, what if i manually partitioned while installing, and put
> /usr/bin and /usr/libexec in separate partitions? (yes, i realize
> that's not the standard these days -- all of /usr defaults to a single
> partition -- but i'm assuming i still have the freedom to do something
> that unwise.) would git then switch to symlinks to support all those
> command name variants?
>   just curious about how decisions like this are made WRT to
> packaging.

The git package uses hardlinks and includes some duplication
of binaries precisely to avoid cross-directory hardlinks.
That allows /usr/bin and /usr/libexec to be mounted on
different file systems.  It's not all that common to do
that, I'm sure.

But rpmlint warns about such cross-directory hardlinks.
While working on the git packaging I used the support in
upstream git's Makefile (NO_CROSS_DIRECTORY_HARDLINKS):

That change was made in the master (rawhide) branch.  It
will be part of Fedora 28.  It's not a change worth applying
to other releases by itself, so I don't expect to see it
pushed to the current Fedora 26/27 releases.

Ideally such changes are reasonably described in the commit
message.  I strive to write detailed commit messages so
future maintainers or anyone curious can see why a given
change was made.  Not every packager does this, of course.
And I'm sure that despite my best efforts, I might not
always describe the reasoning for a change in a way that
answers all the questions someone may have in the future.

I think it's worth poking through the git history of the
packages you're curious about.  There may be some answers
about the others in the commit logs.  The git repositories
for all Fedora packages can be found at:

When you make a mistake, make amends immediately.  It's easier to eat
crow while it's still warm.

Attachment: signature.asc
Description: PGP signature

users mailing list --
To unsubscribe send an email to

Reply via email to