Source: git-core Version: 1.5.5.1-1 Severity: wishlist Tags: patch From: Jonathan Nieder <[EMAIL PROTECTED]> Subject: [PATCH] prepare to move git-commands to /usr/lib
Moving the "git-<command>" binaries into /usr/lib/git-core would result in a less cluttered /usr/bin and reveal programs that use the hyphenated form of commands unnecessarily (the hyphenated forms are supposed to disappear in the far future). I don't think that Debian should make this move yet, but the changes in debian/rules needed to support the move can happen now. Most uses of usr/bin in debian/rules are replaced with the variable $(GIT_EXEC). The assumption is that git and gitk go in usr/bin and everything else goes in the GIT_EXEC directory. No effort has been made to avoid supplying the same filename twice to dpkg-shlibdeps or to avoid stripping programs twice. Buyer beware. Signed-off-by: Jonathan Nieder <[EMAIL PROTECTED]> --- I have been building git locally to put the hyphenated binaries in /usr/lib for a few weeks now, and it generally works pretty well. It occured to me that some day the same changes might occur in the Debian packages, so I thought I should send this patch to avoid duplication of effort and (selfishly) to avoid future merge conflicts. This patch applies on top of the commit tagged as debian-1.5.5.1-1. I hope it is of some use. Please let me know if you have any suggestions on how to improve it. In particular, I am not sure how to provide a "git-am"-ready patch as a Debian bugreport, but I would like to. And thanks for packaging git! I am amazed at how quickly after each upstream release a new version of the Debian git-core package appears. Jonathan Nieder debian/rules | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) diff --git a/debian/rules b/debian/rules index 6aad24d..a96a625 100755 --- a/debian/rules +++ b/debian/rules @@ -2,12 +2,16 @@ ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH) +# when ready, put usr/lib/git-core here +GIT_EXEC ?=usr/bin + CC =gcc CFLAGS =-g -Wall STRIP =strip TEST =test -OPTS =NO_OPENSSL=1 prefix=/usr mandir=/usr/share/man INSTALLDIRS=vendor \ - WITH_P4IMPORT=1 PYTHON_PATH=/usr/bin/python TCLTK_PATH=/usr/bin/wish8.5 +OPTS =NO_OPENSSL=1 prefix=/usr mandir=/usr/share/man gitexecdir=/$(GIT_EXEC) \ + INSTALLDIRS=vendor WITH_P4IMPORT=1 PYTHON_PATH=/usr/bin/python \ + TCLTK_PATH=/usr/bin/wish8.5 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP =: strip @@ -81,14 +85,15 @@ install-arch: deb-checkdir deb-checkuid build-arch-stamp install -d -m0755 '$(GIT)'-core/var/cache/git rm -f '$(GIT)'-core/usr/share/perl5/Error.pm rm -f '$(GIT)'-core/usr/share/man/man3/private-Error.3pm - rm -rf '$(GIT)'-core/usr/lib + rm -rf '$(GIT)'-core/usr/lib/perl + rmdir --ignore-fail-on-non-empty '$(GIT)'-core/usr/lib chmod 644 '$(GIT)'-core/usr/share/perl5/Git.pm # don't include arch, cvs, svn, email, gui tools, and gitk program for i in git-archimport git-cvs git-svn git-send-email gitk \ git-gui git-citool; do \ - rm -f '$(GIT)'-core/usr/bin/$$i*; \ + rm -f '$(GIT)'-core/$(GIT_EXEC)/$$i*; \ done - for i in '$(GIT)'-core/usr/bin/*; do \ + for i in '$(GIT)'-core/$(GIT_EXEC)/* '$(GIT)'-core/usr/bin/git; do \ test "`head -c2 $$i`" = '#!' || $(STRIP) -R .comment -R .note $$i; \ done # don't include git-gui's lib @@ -132,8 +137,8 @@ install-indep: build-arch-stamp build-indep-stamp # git-cvs, git-svn for i in cvs svn; do \ rm -rf '$(GIT)'-$$i && \ - install -d -m0755 '$(GIT)'-$$i/usr/bin && \ - install -m0755 '$(TMP)'/usr/bin/git-$$i* '$(GIT)'-$$i/usr/bin/ && \ + install -d -m0755 '$(GIT)'-$$i/$(GIT_EXEC) && \ + install -m0755 '$(TMP)'/$(GIT_EXEC)/git-$$i* '$(GIT)'-$$i/$(GIT_EXEC)/ && \ install -d -m0755 '$(GIT)'-$$i/usr/share/man/man1 && \ install -m0644 '$(TMP)'/usr/share/man/man1/git-$$i* \ '$(GIT)'-$$i/usr/share/man/man1/ && \ @@ -141,16 +146,16 @@ install-indep: build-arch-stamp build-indep-stamp done # git-arch rm -rf '$(GIT)'-arch - install -d -m0755 '$(GIT)'-arch/usr/bin - install -m0755 '$(TMP)'/usr/bin/git-archimport '$(GIT)'-arch/usr/bin/ + install -d -m0755 '$(GIT)'-arch/$(GIT_EXEC) + install -m0755 '$(TMP)'/$(GIT_EXEC)/git-archimport '$(GIT)'-arch/$(GIT_EXEC)/ install -d -m0755 '$(GIT)'-arch/usr/share/man/man1 install -m0644 '$(TMP)'/usr/share/man/man1/git-archimport.1 \ '$(GIT)'-arch/usr/share/man/man1/ gzip -9 '$(GIT)'-arch/usr/share/man/man1/*.1 # git-email rm -rf '$(GIT)'-email - install -d -m0755 '$(GIT)'-email/usr/bin - install -m0755 '$(TMP)'/usr/bin/git-send-email '$(GIT)'-email/usr/bin/ + install -d -m0755 '$(GIT)'-email/$(GIT_EXEC) + install -m0755 '$(TMP)'/$(GIT_EXEC)/git-send-email '$(GIT)'-email/$(GIT_EXEC)/ install -d -m0755 '$(GIT)'-email/usr/share/man/man1 install -m0644 '$(TMP)'/usr/share/man/man1/git-send-email.1 \ '$(GIT)'-email/usr/share/man/man1/ @@ -166,9 +171,9 @@ install-indep: build-arch-stamp build-indep-stamp ln -s /usr/bin/sv '$(GIT)'-daemon-run/etc/init.d/git-daemon # git-gui rm -rf '$(GIT)'-gui - install -d -m0755 '$(GIT)'-gui/usr/bin - install -m0755 '$(TMP)'/usr/bin/git-gui '$(GIT)'-gui/usr/bin/ - install -m0755 '$(TMP)'/usr/bin/git-citool '$(GIT)'-gui/usr/bin/ + install -d -m0755 '$(GIT)'-gui/$(GIT_EXEC) + install -m0755 '$(TMP)'/$(GIT_EXEC)/git-gui '$(GIT)'-gui/$(GIT_EXEC)/ + install -m0755 '$(TMP)'/$(GIT_EXEC)/git-citool '$(GIT)'-gui/$(GIT_EXEC)/ install -d -m0755 '$(GIT)'-gui/usr/share/man/man1 for i in gui citool; do \ install -m0644 '$(TMP)'/usr/share/man/man1/git-$$i* \ @@ -205,7 +210,7 @@ install-indep: build-arch-stamp build-indep-stamp binary: binary-arch binary-indep binary-arch: install-arch git-core.deb rm -f debian/substvars - dpkg-shlibdeps '$(GIT)'-core/usr/bin/* + dpkg-shlibdeps '$(GIT)'-core/$(GIT_EXEC)/* '$(GIT)'-core/usr/bin/git dpkg-gencontrol -isp -pgit-core -P'$(GIT)'-core dpkg -b '$(GIT)'-core .. binary-indep: install-indep git-doc.deb git-arch.deb git-cvs.deb git-svn.deb \ -- debian.1.5.5.1.1.234.g654af -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]