Re: [PATCH] git-pasky debian dir
- From
- Chris Wright <chrisw@osdl.org>
- Date
- Apr 22, 2005, 16:16 UTC
- Message-ID
- <20050422161635.GA5324@shell0.pdx.osdl.net>
- In-Reply-To
- <200504220918.06977.jcorbin@wunjo.org>
* Joshua T. Corbin (jcorbin@wunjo.org) wrote:
Show 53 quoted lines
> After seeing the spec file, I had to do this: > > You can get the binary here: > http://node1.wunjo.org/~jcorbin/git-pasky_0.6.3-1_i386.deb > > alternatively you can pull from here: > rsync://node1.wunjo.org/git/git > > It's against b31d16fad0013b3f106b227232559e24daf36962. It installs > to /usr/bin, but I hacked things about so that *.sh goes > in /usr/share/git-pasky/scripts. Haven't had many people try it yet, but it > works for me; this isn't exactly my first debian package, but if anyone sees > any glaring issues with it, I'd love to hear about it. > > --- /dev/null > +++ 2f556bba4a059b3aaefb0bbacac64d60a14e127a/debian/scriptdir.diff > @@ -0,0 +1,82 @@ > +diff -u a/Makefile b/Makefile > +--- a/Makefile 2005-04-22 00:59:22.000000000 -0400 > ++++ b/Makefile 2005-04-22 00:59:43.000000000 -0400 > +@@ -18,6 +18,7 @@ > + prefix=$(HOME) > + > + bindir=$(prefix)/bin > ++scriptdir=$(prefix)/share/git-pasky/scripts > + > + CC=gcc > + AR=ar > +@@ -28,11 +29,11 @@ > + check-files ls-tree merge-base merge-cache unpack-file git-export \ > + diff-cache convert-cache > + > +-SCRIPT= parent-id tree-id git gitXnormid.sh gitadd.sh gitaddremote.sh \ > +- gitcommit.sh gitdiff-do gitdiff.sh gitlog.sh gitls.sh gitlsobj.sh \ > +- gitmerge.sh gitpull.sh gitrm.sh gittag.sh gittrack.sh gitexport.sh \ > +- gitapply.sh gitcancel.sh gitXlntree.sh commit-id gitlsremote.sh \ > +- gitfork.sh gitinit.sh gitseek.sh gitstatus.sh gitpatch.sh \ > ++BINSCRIPTS= parent-id tree-id git gitdiff-do commit-id > ++SCRIPT= gitXnormid.sh gitadd.sh gitaddremote.sh gitcommit.sh gitdiff.sh \ > ++ gitlog.sh gitls.sh gitlsobj.sh gitmerge.sh gitpull.sh gitrm.sh gittag.sh \ > ++ gittrack.sh gitexport.sh gitapply.sh gitcancel.sh gitXlntree.sh \ > ++ gitlsremote.sh gitfork.sh gitinit.sh gitseek.sh gitstatus.sh gitpatch.sh \ > + gitmerge-file.sh > + > + COMMON= read-cache.o > +@@ -80,7 +81,9 @@ > + > + install: $(PROG) $(GEN_SCRIPT) > + install -m755 -d $(DESTDIR)$(bindir) > +- install $(PROG) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir) > ++ install -m755 -d $(DESTDIR)$(scriptdir) > ++ install $(PROG) $(BINSCRIPTS) $(DESTDIR)$(bindir) > ++ install $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(scriptdir)
This whole bit should be formalized. Ideally, I'd like to do /usr/bin/git frontend, with all scripts in /usr/libexec/git/. However, this requires something more than hardcoding paths.
Show 11 quoted lines
> + clean: > + rm -f *.o mozilla-sha1/*.o $(PROG) $(GEN_SCRIPT) $(LIB_FILE) > +diff -u a/commit-id b/commit-id > +--- a/commit-id 2005-04-22 00:59:22.000000000 -0400 > ++++ b/commit-id 2005-04-22 01:02:40.000000000 -0400 > +@@ -5,4 +5,4 @@ > + # > + # Takes the appropriate ID, defaults to HEAD. > + > +-gitXnormid.sh -c $1 > ++/usr/share/git-pasky/scripts/gitXnormid.sh -c $1
like this...
Show 10 quoted lines
> +Common subdirectories: a/contrib and b/contrib > +Only in b: debian > +diff -u a/git b/git > +--- a/git 2005-04-22 00:59:22.000000000 -0400 > ++++ b/git 2005-04-22 01:01:43.000000000 -0400 > +@@ -17,6 +17,7 @@ > + exit 1 > + } > + > ++export PATH=/usr/share/git-pasky/scripts:$PATH
Or this...
Show 12 quoted lines
> + help () {
> + cat <<__END__
> +Common subdirectories: a/mozilla-sha1 and b/mozilla-sha1
> +diff -u a/parent-id b/parent-id
> +--- a/parent-id 2005-04-22 00:59:22.000000000 -0400
> ++++ b/parent-id 2005-04-22 01:02:01.000000000 -0400
> +@@ -7,6 +7,6 @@
> +
> + PARENT="^parent [A-Za-z0-9]{40}$"
> +
> +-id=$(gitXnormid.sh -c $1) || exit 1
> ++id=$(/usr/share/git-pasky/scripts/gitXnormid.sh -c $1) || exit 1ditto...
Show 10 quoted lines
> + cat-file commit $id | egrep "$PARENT" | cut -d ' ' -f 2 > +diff -u a/tree-id b/tree-id > +--- a/tree-id 2005-04-22 00:59:22.000000000 -0400 > ++++ b/tree-id 2005-04-22 01:00:40.000000000 -0400 > +@@ -5,4 +5,4 @@ > + # > + # Takes ID of the appropriate commit, defaults to HEAD. > + > +-gitXnormid.sh $1 > ++/usr/share/git-pasky/scripts/gitXnormid.sh $1
You get the idea ;-) I certainly see how it makes sense for a first run to get it going. But this will need fixing upstream.
thanks, -chris
-- Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net