git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-pasky spec file
@ 2005-04-22  1:55 Chris Wright
  2005-04-22  2:40 ` Petr Baudis
  2005-04-22 14:16 ` [PATCH] git-pasky spec file Kevin Smith
  0 siblings, 2 replies; 8+ messages in thread
From: Chris Wright @ 2005-04-22  1:55 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

Here's a simple spec file to do rpm builds.  It's against the
latest Makefile (which has the s/BINDIR/bindir/ change).  I've used
DESTDIR, although it's not clear it's meant to stay in the Makefile.
For now, there's no dynamic (git.spec.in, for example) update to the
Version, so it's set against 0.6.3 (expecting it to be forthcoming
shortly).  It installs to /usr/local/bin, and expects the tarball to be
named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems
fine since Linus' isn't likely to be packaged directly.  Enjoy.

Signed-off-by: Chris Wright <chrisw@osdl.org>

--- /dev/null	1969-12-31 16:00:00.000000000 -0800
+++ git-pasky-0.6.3/git.spec	2005-04-21 18:42:18.000000000 -0700
@@ -0,0 +1,43 @@
+Name: 		git
+Version: 	0.6.3
+Release: 	1
+Vendor: 	Petr Baudis <pasky@ucw.cz>
+Summary:  	Git core and tools
+License: 	GPL
+Group: 		Development/Tools
+URL: 		http://pasky.or.cz/~pasky/dev/git/
+Source: 	http://pasky.or.cz/~pasky/dev/git/%{name}-pasky-%{version}.tar.bz2
+Provides: 	git = %{version}
+BuildRequires:	zlib-devel openssl-devel
+BuildRoot:	%{_tmppath}/%{name}-%{version}-root
+Prereq: 	sh-utils diffutils
+
+%description
+GIT comes in two layers. The bottom layer is merely an extremely fast
+and flexible filesystem-based database designed to store directory trees
+with regard to their history. The top layer is a SCM-like tool which
+enables human beings to work with the database in a manner to a degree
+similar to other SCM tools (like CVS, BitKeeper or Monotone).
+
+%prep
+%setup -q -n %{name}-pasky-%{version}
+
+%build
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/local/bin/*
+#%{_mandir}/*/*
+
+%changelog
+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1
+- Initial rpm build

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] git-pasky spec file
  2005-04-22  1:55 [PATCH] git-pasky spec file Chris Wright
@ 2005-04-22  2:40 ` Petr Baudis
  2005-04-22  2:48   ` Chris Wright
  2005-04-22  3:13   ` [PATCH] Eliminate use of mktemp's "-t" option David A. Wheeler
  2005-04-22 14:16 ` [PATCH] git-pasky spec file Kevin Smith
  1 sibling, 2 replies; 8+ messages in thread
From: Petr Baudis @ 2005-04-22  2:40 UTC (permalink / raw)
  To: Chris Wright; +Cc: git

Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter
where Chris Wright <chrisw@osdl.org> told me that...
> Here's a simple spec file to do rpm builds.  It's against the
> latest Makefile (which has the s/BINDIR/bindir/ change).  I've used
> DESTDIR, although it's not clear it's meant to stay in the Makefile.
> For now, there's no dynamic (git.spec.in, for example) update to the
> Version, so it's set against 0.6.3 (expecting it to be forthcoming
> shortly).  It installs to /usr/local/bin, and expects the tarball to be
> named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems
> fine since Linus' isn't likely to be packaged directly.  Enjoy.

Thanks, applied. I'll gladly yet you maintain this file, but...

> --- /dev/null	1969-12-31 16:00:00.000000000 -0800
> +++ git-pasky-0.6.3/git.spec	2005-04-21 18:42:18.000000000 -0700
> @@ -0,0 +1,43 @@
> +%install
> +rm -rf $RPM_BUILD_ROOT
> +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install

I doubt this is actually what you want. I suppose you want

make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install

instead. This may not matter now, but might well in future when we stuff
some of the helper/library scripts to some lib/ or share/ directory, and
will actually rewrite some paths somewhere based on $prefix during make
install.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] git-pasky spec file
  2005-04-22  2:40 ` Petr Baudis
@ 2005-04-22  2:48   ` Chris Wright
  2005-04-25 21:24     ` Paul Dickson
  2005-04-22  3:13   ` [PATCH] Eliminate use of mktemp's "-t" option David A. Wheeler
  1 sibling, 1 reply; 8+ messages in thread
From: Chris Wright @ 2005-04-22  2:48 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Chris Wright, git

* Petr Baudis (pasky@ucw.cz) wrote:
> Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter
> where Chris Wright <chrisw@osdl.org> told me that...
> > Here's a simple spec file to do rpm builds.  It's against the
> > latest Makefile (which has the s/BINDIR/bindir/ change).  I've used
> > DESTDIR, although it's not clear it's meant to stay in the Makefile.
> > For now, there's no dynamic (git.spec.in, for example) update to the
> > Version, so it's set against 0.6.3 (expecting it to be forthcoming
> > shortly).  It installs to /usr/local/bin, and expects the tarball to be
> > named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems
> > fine since Linus' isn't likely to be packaged directly.  Enjoy.
> 
> Thanks, applied. I'll gladly yet you maintain this file, but...

No problem...

> > --- /dev/null	1969-12-31 16:00:00.000000000 -0800
> > +++ git-pasky-0.6.3/git.spec	2005-04-21 18:42:18.000000000 -0700
> > @@ -0,0 +1,43 @@
> > +%install
> > +rm -rf $RPM_BUILD_ROOT
> > +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install
> 
> I doubt this is actually what you want. I suppose you want
> 
> make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install

Yup, that makes more sense.  Feel free to update if you're so inclined.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Eliminate use of mktemp's "-t" option
  2005-04-22  2:40 ` Petr Baudis
  2005-04-22  2:48   ` Chris Wright
@ 2005-04-22  3:13   ` David A. Wheeler
  1 sibling, 0 replies; 8+ messages in thread
From: David A. Wheeler @ 2005-04-22  3:13 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

It turns out that mktemp's "-t" option, while useful, isn't
available on many systems (Mandrake & Red Hat Linux 9 at least,
and probably piles of others).  So, here's a portability
patch that removes all use of mktemp's "-t" option.
Unlike the quick hack I posted earlier, this should be
"clean everywhere" (assuming you have mktemp).

This is a patch against git-pasky 0.6.3.

This is my first attempt to _post_ a patch using git itself,
and I'm not entirely sure how you want it.   Let me know
if you have a problem with it!

--- David A. Wheeler



[-- Attachment #2: rm-mktemp-dash-t.patch --]
[-- Type: text/plain, Size: 4612 bytes --]

commit 5f926b684025b83e34386bf8e4ef30a97e2ae5ec
tree 61059575269ed1027cfb66543251e182f87d1064
parent dd69ca5f806c8b10bb29ecb8d77c88be007c981c
author David A. Wheeler <dwheeler@dwheeler.com> 1114138972 -0400
committer David A. Wheeler <dwheeler@dwheeler.com> 1114138972 -0400

    Eliminated use of mktemp's "-t" option; older mktemps don't support it.

Index: README
===================================================================
--- 6a612d42afdba20fd2150e319a689ed451b010e4/README  (mode:100644 sha1:a71b5fbdbdac0bf2e2d021e422b9f49dd5481165)
+++ 61059575269ed1027cfb66543251e182f87d1064/README  (mode:100644 sha1:80952e2f67b28f64c10cfb913df375a5dd244cd9)
@@ -141,7 +141,7 @@
 	C compiler
 	bash
 	basic shell environment (sed, grep, textutils, ...)
-	mktemp 1.5+ (Mandrake users beware!)
+	mktemp
 	diff, patch
 	libssl
 	rsync
Index: gitapply.sh
===================================================================
--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitapply.sh  (mode:100755 sha1:7703809dc0743c6e4c1fa5b7d922a4efc16b4276)
+++ 61059575269ed1027cfb66543251e182f87d1064/gitapply.sh  (mode:100755 sha1:14a13ff23cff2a80f9a44c053002f837fec13e2c)
@@ -8,9 +8,13 @@
 #
 # Takes the diff on stdin.
 
-gonefile=$(mktemp -t gitapply.XXXXXX)
-todo=$(mktemp -t gitapply.XXXXXX)
-patchfifo=$(mktemp -t gitapply.XXXXXX)
+if [ -z "$TMPDIR"]; then
+	TMPDIR=/tmp
+fi
+
+gonefile=$(mktemp "$TMPDIR/gitapply.XXXXXX")
+todo=$(mktemp "$TMPDIR/gitapply.XXXXXX")
+patchfifo=$(mktemp "$TMPDIR/gitapply.XXXXXX")
 rm $patchfifo && mkfifo -m 600 $patchfifo
 
 show-files --deleted >$gonefile
Index: gitcommit.sh
===================================================================
--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitcommit.sh  (mode:100755 sha1:a13bef2c84492ed75679d7d52bb710df35544f8a)
+++ 61059575269ed1027cfb66543251e182f87d1064/gitcommit.sh  (mode:100755 sha1:ee777605dccdc9737cf743f4f8c96b9bacd97f10)
@@ -16,6 +16,9 @@
 	exit 1
 }
 
+if [ -z "$TMPDIR"]; then
+	TMPDIR=/tmp
+fi
 
 [ -s .git/blocked ] && die "committing blocked: $(cat .git/blocked)"
 
@@ -67,7 +70,7 @@
 fi
 
 echo "Enter commit message, terminated by ctrl-D on a separate line:"
-LOGMSG=$(mktemp -t gitci.XXXXXX)
+LOGMSG=$(mktemp "$TMPDIR/gitci.XXXXXX")
 if [ "$merging" ]; then
 	echo -n 'Merge with ' >>$LOGMSG
 	echo -n 'Merge with '
@@ -111,7 +114,7 @@
 if [ ! "$customfiles" ]; then
 	rm -f .git/add-queue .git/rm-queue
 else
-	greptmp=$(mktemp -t gitci.XXXXXX)
+	greptmp=$(mktemp "$TMPDIR/gitci.XXXXXX")
 	for file in $customfiles; do
 		if [ -s .git/add-queue ]; then
 			fgrep -vx "$file" .git/add-queue >$greptmp
Index: gitdiff-do
===================================================================
--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitdiff-do  (mode:100755 sha1:218dfabeb4a5dcbd2cf58bd6f672f385690ec397)
+++ 61059575269ed1027cfb66543251e182f87d1064/gitdiff-do  (mode:100755 sha1:caf20ae034b8dc9f88922ee9f82809bb32a56231)
@@ -32,7 +32,11 @@
 	[ "$labelapp" ] && label="$label  ($labelapp)"
 }
 
-diffdir=$(mktemp -d -t gitdiff.XXXXXX)
+if [ -z "$TMPDIR"]; then
+	TMPDIR=/tmp
+fi
+
+diffdir=$(mktemp -d "$TMPDIR/gitdiff.XXXXXX")
 diffdir1="$diffdir/$id1"
 diffdir2="$diffdir/$id2"
 mkdir "$diffdir1" "$diffdir2"
Index: gitdiff.sh
===================================================================
--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitdiff.sh  (mode:100755 sha1:195c3b9962c764855ec6168a78babf5867ea3046)
+++ 61059575269ed1027cfb66543251e182f87d1064/gitdiff.sh  (mode:100755 sha1:278511a3f491ed7d5e41bbd642acfd9b5a1d8257)
@@ -80,6 +80,10 @@
 	shift
 fi
 
+if [ -z "$TMPDIR"]; then
+	TMPDIR=/tmp
+fi
+
 if [ "$parent" ]; then
 	id2="$id1"
 	id1=$(parent-id "$id2" | head -n 1)
@@ -88,7 +92,7 @@
 
 if [ "$id2" = " " ]; then
 	if [ "$id1" != " " ]; then
-		export GIT_INDEX_FILE=$(mktemp -t gitdiff.XXXXXX)
+		export GIT_INDEX_FILE=$(mktemp "$TMPDIR/gitdiff.XXXXXX")
 		read-tree $(gitXnormid.sh "$id1")
 		update-cache --refresh
 	fi
Index: gitmerge.sh
===================================================================
--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitmerge.sh  (mode:100755 sha1:683755729b6f689ea43c692712fad6e51eeac354)
+++ 61059575269ed1027cfb66543251e182f87d1064/gitmerge.sh  (mode:100755 sha1:1c733bbdb9fe54c41787d962d0f55bb5f67d4c63)
@@ -19,6 +19,10 @@
 	exit 1
 }
 
+if [ -z "$TMPDIR"]; then
+	TMPDIR=/tmp
+fi
+
 head=$(commit-id)
 
 
@@ -58,7 +62,7 @@
 	echo "Fast-forwarding $base -> $branch" >&2
 	echo -e "\ton top of $head..." >&2
 
-	patchfile=$(mktemp -t gitmerge.XXXXXX)
+	patchfile=$(mktemp "$TMPDIR/gitmerge.XXXXXX")
 	gitdiff.sh >$patchfile
 
 	read-tree -m $(tree-id $branch)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] git-pasky spec file
  2005-04-22  1:55 [PATCH] git-pasky spec file Chris Wright
  2005-04-22  2:40 ` Petr Baudis
@ 2005-04-22 14:16 ` Kevin Smith
  2005-04-22 15:21   ` Chris Wright
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Smith @ 2005-04-22 14:16 UTC (permalink / raw)
  To: Chris Wright; +Cc: git

Chris Wright wrote:
> Here's a simple spec file to do rpm builds.

(snip)

> Creates a package named git, which seems
> fine since Linus' isn't likely to be packaged directly.  

Um. Really? I can't imagine why Linus's git wouldn't be packaged
directly. He has strongly indicated that folks who want to build on top
of it should not expect to see libgit any time soon, so git will be an
important independent tool.

But presumably you'll change the name of this package to cogito soon
anyway, as soon as git-pasky itself is renamed.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] git-pasky spec file
  2005-04-22 14:16 ` [PATCH] git-pasky spec file Kevin Smith
@ 2005-04-22 15:21   ` Chris Wright
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wright @ 2005-04-22 15:21 UTC (permalink / raw)
  To: Kevin Smith; +Cc: Chris Wright, git

* Kevin Smith (yarcs@qualitycode.com) wrote:
> But presumably you'll change the name of this package to cogito soon
> anyway, as soon as git-pasky itself is renamed.

that's the plan.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] git-pasky spec file
  2005-04-22  2:48   ` Chris Wright
@ 2005-04-25 21:24     ` Paul Dickson
  2005-04-25 22:21       ` Chris Wright
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Dickson @ 2005-04-25 21:24 UTC (permalink / raw)
  To: Chris Wright; +Cc: pasky, git

On Thu, 21 Apr 2005 19:48:34 -0700, Chris Wright wrote:

> * Petr Baudis (pasky@ucw.cz) wrote:
> > Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter
> > where Chris Wright <chrisw@osdl.org> told me that...
> > > Here's a simple spec file to do rpm builds.  It's against the
> > > latest Makefile (which has the s/BINDIR/bindir/ change).  I've used
> > > DESTDIR, although it's not clear it's meant to stay in the Makefile.
> > > For now, there's no dynamic (git.spec.in, for example) update to the
> > > Version, so it's set against 0.6.3 (expecting it to be forthcoming
> > > shortly).  It installs to /usr/local/bin, and expects the tarball to be
> > > named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems
> > > fine since Linus' isn't likely to be packaged directly.  Enjoy.
> > 
> > Thanks, applied. I'll gladly yet you maintain this file, but...
> 
> No problem...
> 
> > > --- /dev/null	1969-12-31 16:00:00.000000000 -0800
> > > +++ git-pasky-0.6.3/git.spec	2005-04-21 18:42:18.000000000 -0700
> > > @@ -0,0 +1,43 @@
> > > +%install
> > > +rm -rf $RPM_BUILD_ROOT
> > > +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install
> > 
> > I doubt this is actually what you want. I suppose you want
> > 
> > make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install
> 
> Yup, that makes more sense.  Feel free to update if you're so inclined.

If you're building an RPM, it should go in /usr not /usr/local.  /usr/local
is for unmanaged (non-RPM) installs.

	-Paul


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] git-pasky spec file
  2005-04-25 21:24     ` Paul Dickson
@ 2005-04-25 22:21       ` Chris Wright
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wright @ 2005-04-25 22:21 UTC (permalink / raw)
  To: Paul Dickson; +Cc: Chris Wright, pasky, git

* Paul Dickson (paul@permanentmail.com) wrote:
> On Thu, 21 Apr 2005 19:48:34 -0700, Chris Wright wrote:
> 
> > * Petr Baudis (pasky@ucw.cz) wrote:
> > > Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter
> > > where Chris Wright <chrisw@osdl.org> told me that...
> > > > Here's a simple spec file to do rpm builds.  It's against the
> > > > latest Makefile (which has the s/BINDIR/bindir/ change).  I've used
> > > > DESTDIR, although it's not clear it's meant to stay in the Makefile.
> > > > For now, there's no dynamic (git.spec.in, for example) update to the
> > > > Version, so it's set against 0.6.3 (expecting it to be forthcoming
> > > > shortly).  It installs to /usr/local/bin, and expects the tarball to be
> > > > named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems
> > > > fine since Linus' isn't likely to be packaged directly.  Enjoy.
> > > 
> > > Thanks, applied. I'll gladly yet you maintain this file, but...
> > 
> > No problem...
> > 
> > > > --- /dev/null	1969-12-31 16:00:00.000000000 -0800
> > > > +++ git-pasky-0.6.3/git.spec	2005-04-21 18:42:18.000000000 -0700
> > > > @@ -0,0 +1,43 @@
> > > > +%install
> > > > +rm -rf $RPM_BUILD_ROOT
> > > > +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install
> > > 
> > > I doubt this is actually what you want. I suppose you want
> > > 
> > > make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install
> > 
> > Yup, that makes more sense.  Feel free to update if you're so inclined.
> 
> If you're building an RPM, it should go in /usr not /usr/local.  /usr/local
> is for unmanaged (non-RPM) installs.

That's not quite the definition for FHS, but I don't mind putting into
/usr/bin.  I had planned upon doing a /usr/bin/git and helpers in
another directory, but with new command name (ala cg-$cmd) then I think
they'll all just go in /usr/bin.  Other opinions?

thanks,
-chris

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-04-25 22:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22  1:55 [PATCH] git-pasky spec file Chris Wright
2005-04-22  2:40 ` Petr Baudis
2005-04-22  2:48   ` Chris Wright
2005-04-25 21:24     ` Paul Dickson
2005-04-25 22:21       ` Chris Wright
2005-04-22  3:13   ` [PATCH] Eliminate use of mktemp's "-t" option David A. Wheeler
2005-04-22 14:16 ` [PATCH] git-pasky spec file Kevin Smith
2005-04-22 15:21   ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).