Skip to content

Commit

Permalink
git: remove hard and soft links
Browse files Browse the repository at this point in the history
Disable hard links, they do not work on AFS and APT fails to install
git RPM to AFS location.

Signed-off-by: David Abdurachmanov <[email protected]>
  • Loading branch information
David Abdurachmanov authored and David Abdurachmanov committed Jun 12, 2013
1 parent 8dc52f0 commit 2c7ba14
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
53 changes: 53 additions & 0 deletions git-1.8.3.1-no-symlink.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
diff --git a/Makefile b/Makefile
index 0f931a2..db0d69e 100644
--- a/Makefile
+++ b/Makefile
@@ -1705,8 +1705,6 @@ version.sp version.s version.o: EXTRA_CPPFLAGS = \

$(BUILT_INS): git$X
$(QUIET_BUILT_IN)$(RM) $@ && \
- ln git$X $@ 2>/dev/null || \
- ln -s git$X $@ 2>/dev/null || \
cp git$X $@

common-cmds.h: ./generate-cmdlist.sh command-list.txt
@@ -2026,8 +2024,6 @@ git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)

$(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)
$(QUIET_LNCP)$(RM) $@ && \
- ln $< $@ 2>/dev/null || \
- ln -s $< $@ 2>/dev/null || \
cp $< $@

$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS)
@@ -2326,30 +2322,23 @@ endif
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
done; \
} && \
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
$(RM) "$$bindir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
- ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
done && \
for p in $(BUILT_INS); do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
- ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
done && \
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
for p in $$remote_curl_aliases; do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
- ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
- ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
done && \
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
2 changes: 2 additions & 0 deletions git.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
%define isDarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac)

Source: https://github.com/git/git/archive/v%{realversion}.tar.gz
Patch1: git-1.8.3.1-no-symlink

Requires: curl expat openssl zlib pcre

%prep
%setup -n %{n}-%{realversion}
%patch1 -p1

%build
make prefix=%{i} \
Expand Down

0 comments on commit 2c7ba14

Please sign in to comment.