Mailinglist Archive: opensuse-factory (379 mails)

< Previous Next >
Re: [opensuse-factory] git symlink jungle
At Tue, 26 Apr 2011 05:44:01 -0700,
Greg KH wrote:

On Tue, Apr 26, 2011 at 11:17:30AM +0200, Takashi Iwai wrote:
At Fri, 22 Apr 2011 17:03:06 -0700,
Greg KH wrote:

On Sat, Apr 23, 2011 at 01:45:07AM +0200, richard -rw- weinberger wrote:
Hi,

I'm using git-1.7.4.2-5.1 from Tumbleweed.
Can somebody please explain me this symlink jungle?

---cut---
rw@raccoon:~> which git
/usr/bin/git
rw@raccoon:~> ls -l /usr/bin/git
lrwxrwxrwx 1 root root 18 22. Apr 14:05 /usr/bin/git ->
../lib/git/git-add
rw@raccoon:~> ls -l /usr/lib/git/git-add
lrwxrwxrwx 1 root root 3 22. Apr 14:05 /usr/lib/git/git-add -> git
rw@raccoon:~> ls -l /usr/lib/git/git
lrwxrwxrwx 1 root root 26 22. Apr 14:05 /usr/lib/git/git ->
../../bin/git-receive-pack
rw@raccoon:~> ls -l /usr/bin/git-receive-pack
-rwxr-xr-x 1 root root 1235872 22. Apr 03:25 /usr/bin/git-receive-pack
---cut---

Is this mess OpenSUSE specific and/or intended?

Heh, I think it's intended, but I don't quite know. Care to file a bug
and assign it to the git package owner and take it from there?

It's a historical ugly reason. For AppArmor profile, it has to be
linked to an existing binary in the earlier packaging.
(The use of symlink instead of hardlink is intentional, BTW.)

The fix would be to remove the following snippet

================================================================
%if %{dist_has_fdupes}
# create predictable symlinks to make apparmor profile work
for i in git git-upload-archive; do
rm $RPM_BUILD_ROOT%{_bindir}/$i
ln -s %{gitexecdir}/git-add $RPM_BUILD_ROOT%{_bindir}/$i
done
================================================================

or use below

ln -s %{gitexecdir}/git $RPM_BUILD_ROOT%{_bindir}/$i

Can't we just fix the apparmor profile instead of being forced to carry
this around for forever?

I guess the above isn't needed any more for now. But someone needs to
check it before actually removing...


Takashi
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups