PackagingDrafts/Symlinks

From FedoraProject

Jump to: navigation, search

Contents

Symlinks

There are two ways of making a symlink, either as a relative link or an absolute link. In Fedora, neither method is required. Packagers should use their best judgement when deciding which method of symlink creation is appropriate.

Relative Symlinks

A relative symlink is a symlink which points to a file or directory relative to the position of the symlink. For example, this command would create a relative symlink:

ln -s ../..%{_bindir}/foo %{buildroot}/bin/foo

Pros:

Cons:

Absolute Symlinks

An absolute symlink is a symlink which points to an absolute file or directory path. For example, this command would create an absolute symlink:

ln -s %{_bindir}/foo %{buildroot}/bin/foo

Pros:

Cons:

Discussion

See Talk:PackagingDrafts/Symlinks for discussion