{"thread":{"id":"236","subject":"[PATCH] git-pasky spec file","startedAt":"2005-04-22T01:55:21Z","lastAt":"2005-04-25T22:21:51Z","messageCount":8,"participants":["Chris Wright","Petr Baudis","David A. Wheeler","Kevin Smith","Paul Dickson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"1230","messageId":"20050422015521.GK493@shell0.pdx.osdl.net","threadId":"236","inReplyTo":null,"subject":"[PATCH] git-pasky spec file","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-04-22T01:55:21Z","receivedAt":"2005-04-22T01:55:21Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"Here's a simple spec file to do rpm builds.  It's against the\nlatest Makefile (which has the s/BINDIR/bindir/ change).  I've used\nDESTDIR, although it's not clear it's meant to stay in the Makefile.\nFor now, there's no dynamic (git.spec.in, for example) update to the\nVersion, so it's set against 0.6.3 (expecting it to be forthcoming\nshortly).  It installs to /usr/local/bin, and expects the tarball to be\nnamed git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems\nfine since Linus' isn't likely to be packaged directly.  Enjoy.\n\nSigned-off-by: Chris Wright <chrisw@osdl.org>\n\n--- /dev/null\t1969-12-31 16:00:00.000000000 -0800\n+++ git-pasky-0.6.3/git.spec\t2005-04-21 18:42:18.000000000 -0700\n@@ -0,0 +1,43 @@\n+Name: \t\tgit\n+Version: \t0.6.3\n+Release: \t1\n+Vendor: \tPetr Baudis <pasky@ucw.cz>\n+Summary:  \tGit core and tools\n+License: \tGPL\n+Group: \t\tDevelopment/Tools\n+URL: \t\thttp://pasky.or.cz/~pasky/dev/git/\n+Source: \thttp://pasky.or.cz/~pasky/dev/git/%{name}-pasky-%{version}.tar.bz2\n+Provides: \tgit = %{version}\n+BuildRequires:\tzlib-devel openssl-devel\n+BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n+Prereq: \tsh-utils diffutils\n+\n+%description\n+GIT comes in two layers. The bottom layer is merely an extremely fast\n+and flexible filesystem-based database designed to store directory trees\n+with regard to their history. The top layer is a SCM-like tool which\n+enables human beings to work with the database in a manner to a degree\n+similar to other SCM tools (like CVS, BitKeeper or Monotone).\n+\n+%prep\n+%setup -q -n %{name}-pasky-%{version}\n+\n+%build\n+\n+make\n+\n+%install\n+rm -rf $RPM_BUILD_ROOT\n+make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install\n+\n+%clean\n+rm -rf $RPM_BUILD_ROOT\n+\n+%files\n+%defattr(-,root,root)\n+/usr/local/bin/*\n+#%{_mandir}/*/*\n+\n+%changelog\n+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1\n+- Initial rpm build\n"},{"id":"1232","messageId":"20050422024010.GE7443@pasky.ji.cz","threadId":"236","inReplyTo":"20050422015521.GK493@shell0.pdx.osdl.net","subject":"Re: [PATCH] git-pasky spec file","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-22T02:40:10Z","receivedAt":"2005-04-22T02:40:10Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter\nwhere Chris Wright <chrisw@osdl.org> told me that...\n> Here's a simple spec file to do rpm builds.  It's against the\n> latest Makefile (which has the s/BINDIR/bindir/ change).  I've used\n> DESTDIR, although it's not clear it's meant to stay in the Makefile.\n> For now, there's no dynamic (git.spec.in, for example) update to the\n> Version, so it's set against 0.6.3 (expecting it to be forthcoming\n> shortly).  It installs to /usr/local/bin, and expects the tarball to be\n> named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems\n> fine since Linus' isn't likely to be packaged directly.  Enjoy.\n\nThanks, applied. I'll gladly yet you maintain this file, but...\n\n> --- /dev/null\t1969-12-31 16:00:00.000000000 -0800\n> +++ git-pasky-0.6.3/git.spec\t2005-04-21 18:42:18.000000000 -0700\n> @@ -0,0 +1,43 @@\n> +%install\n> +rm -rf $RPM_BUILD_ROOT\n> +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install\n\nI doubt this is actually what you want. I suppose you want\n\nmake DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install\n\ninstead. This may not matter now, but might well in future when we stuff\nsome of the helper/library scripts to some lib/ or share/ directory, and\nwill actually rewrite some paths somewhere based on $prefix during make\ninstall.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"1233","messageId":"20050422024834.GM493@shell0.pdx.osdl.net","threadId":"236","inReplyTo":"20050422024010.GE7443@pasky.ji.cz","subject":"Re: [PATCH] git-pasky spec file","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-04-22T02:48:34Z","receivedAt":"2005-04-22T02:48:34Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"* Petr Baudis (pasky@ucw.cz) wrote:\n> Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter\n> where Chris Wright <chrisw@osdl.org> told me that...\n> > Here's a simple spec file to do rpm builds.  It's against the\n> > latest Makefile (which has the s/BINDIR/bindir/ change).  I've used\n> > DESTDIR, although it's not clear it's meant to stay in the Makefile.\n> > For now, there's no dynamic (git.spec.in, for example) update to the\n> > Version, so it's set against 0.6.3 (expecting it to be forthcoming\n> > shortly).  It installs to /usr/local/bin, and expects the tarball to be\n> > named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems\n> > fine since Linus' isn't likely to be packaged directly.  Enjoy.\n> \n> Thanks, applied. I'll gladly yet you maintain this file, but...\n\nNo problem...\n\n> > --- /dev/null\t1969-12-31 16:00:00.000000000 -0800\n> > +++ git-pasky-0.6.3/git.spec\t2005-04-21 18:42:18.000000000 -0700\n> > @@ -0,0 +1,43 @@\n> > +%install\n> > +rm -rf $RPM_BUILD_ROOT\n> > +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install\n> \n> I doubt this is actually what you want. I suppose you want\n> \n> make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install\n\nYup, that makes more sense.  Feel free to update if you're so inclined.\n\nthanks,\n-chris\n-- \nLinux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net\n"},{"id":"1235","messageId":"42686BBC.9050703@dwheeler.com","threadId":"236","inReplyTo":"20050422024010.GE7443@pasky.ji.cz","subject":"[PATCH] Eliminate use of mktemp's \"-t\" option","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2005-04-22T03:13:00Z","receivedAt":"2005-04-22T03:13:00Z","isPatch":true,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"It turns out that mktemp's \"-t\" option, while useful, isn't\navailable on many systems (Mandrake & Red Hat Linux 9 at least,\nand probably piles of others).  So, here's a portability\npatch that removes all use of mktemp's \"-t\" option.\nUnlike the quick hack I posted earlier, this should be\n\"clean everywhere\" (assuming you have mktemp).\n\nThis is a patch against git-pasky 0.6.3.\n\nThis is my first attempt to _post_ a patch using git itself,\nand I'm not entirely sure how you want it.   Let me know\nif you have a problem with it!\n\n--- David A. Wheeler\n\n\n\n\ncommit 5f926b684025b83e34386bf8e4ef30a97e2ae5ec\ntree 61059575269ed1027cfb66543251e182f87d1064\nparent dd69ca5f806c8b10bb29ecb8d77c88be007c981c\nauthor David A. Wheeler <dwheeler@dwheeler.com> 1114138972 -0400\ncommitter David A. Wheeler <dwheeler@dwheeler.com> 1114138972 -0400\n\n    Eliminated use of mktemp's \"-t\" option; older mktemps don't support it.\n\nIndex: README\n===================================================================\n--- 6a612d42afdba20fd2150e319a689ed451b010e4/README  (mode:100644 sha1:a71b5fbdbdac0bf2e2d021e422b9f49dd5481165)\n+++ 61059575269ed1027cfb66543251e182f87d1064/README  (mode:100644 sha1:80952e2f67b28f64c10cfb913df375a5dd244cd9)\n@@ -141,7 +141,7 @@\n \tC compiler\n \tbash\n \tbasic shell environment (sed, grep, textutils, ...)\n-\tmktemp 1.5+ (Mandrake users beware!)\n+\tmktemp\n \tdiff, patch\n \tlibssl\n \trsync\nIndex: gitapply.sh\n===================================================================\n--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitapply.sh  (mode:100755 sha1:7703809dc0743c6e4c1fa5b7d922a4efc16b4276)\n+++ 61059575269ed1027cfb66543251e182f87d1064/gitapply.sh  (mode:100755 sha1:14a13ff23cff2a80f9a44c053002f837fec13e2c)\n@@ -8,9 +8,13 @@\n #\n # Takes the diff on stdin.\n \n-gonefile=$(mktemp -t gitapply.XXXXXX)\n-todo=$(mktemp -t gitapply.XXXXXX)\n-patchfifo=$(mktemp -t gitapply.XXXXXX)\n+if [ -z \"$TMPDIR\"]; then\n+\tTMPDIR=/tmp\n+fi\n+\n+gonefile=$(mktemp \"$TMPDIR/gitapply.XXXXXX\")\n+todo=$(mktemp \"$TMPDIR/gitapply.XXXXXX\")\n+patchfifo=$(mktemp \"$TMPDIR/gitapply.XXXXXX\")\n rm $patchfifo && mkfifo -m 600 $patchfifo\n \n show-files --deleted >$gonefile\nIndex: gitcommit.sh\n===================================================================\n--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitcommit.sh  (mode:100755 sha1:a13bef2c84492ed75679d7d52bb710df35544f8a)\n+++ 61059575269ed1027cfb66543251e182f87d1064/gitcommit.sh  (mode:100755 sha1:ee777605dccdc9737cf743f4f8c96b9bacd97f10)\n@@ -16,6 +16,9 @@\n \texit 1\n }\n \n+if [ -z \"$TMPDIR\"]; then\n+\tTMPDIR=/tmp\n+fi\n \n [ -s .git/blocked ] && die \"committing blocked: $(cat .git/blocked)\"\n \n@@ -67,7 +70,7 @@\n fi\n \n echo \"Enter commit message, terminated by ctrl-D on a separate line:\"\n-LOGMSG=$(mktemp -t gitci.XXXXXX)\n+LOGMSG=$(mktemp \"$TMPDIR/gitci.XXXXXX\")\n if [ \"$merging\" ]; then\n \techo -n 'Merge with ' >>$LOGMSG\n \techo -n 'Merge with '\n@@ -111,7 +114,7 @@\n if [ ! \"$customfiles\" ]; then\n \trm -f .git/add-queue .git/rm-queue\n else\n-\tgreptmp=$(mktemp -t gitci.XXXXXX)\n+\tgreptmp=$(mktemp \"$TMPDIR/gitci.XXXXXX\")\n \tfor file in $customfiles; do\n \t\tif [ -s .git/add-queue ]; then\n \t\t\tfgrep -vx \"$file\" .git/add-queue >$greptmp\nIndex: gitdiff-do\n===================================================================\n--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitdiff-do  (mode:100755 sha1:218dfabeb4a5dcbd2cf58bd6f672f385690ec397)\n+++ 61059575269ed1027cfb66543251e182f87d1064/gitdiff-do  (mode:100755 sha1:caf20ae034b8dc9f88922ee9f82809bb32a56231)\n@@ -32,7 +32,11 @@\n \t[ \"$labelapp\" ] && label=\"$label  ($labelapp)\"\n }\n \n-diffdir=$(mktemp -d -t gitdiff.XXXXXX)\n+if [ -z \"$TMPDIR\"]; then\n+\tTMPDIR=/tmp\n+fi\n+\n+diffdir=$(mktemp -d \"$TMPDIR/gitdiff.XXXXXX\")\n diffdir1=\"$diffdir/$id1\"\n diffdir2=\"$diffdir/$id2\"\n mkdir \"$diffdir1\" \"$diffdir2\"\nIndex: gitdiff.sh\n===================================================================\n--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitdiff.sh  (mode:100755 sha1:195c3b9962c764855ec6168a78babf5867ea3046)\n+++ 61059575269ed1027cfb66543251e182f87d1064/gitdiff.sh  (mode:100755 sha1:278511a3f491ed7d5e41bbd642acfd9b5a1d8257)\n@@ -80,6 +80,10 @@\n \tshift\n fi\n \n+if [ -z \"$TMPDIR\"]; then\n+\tTMPDIR=/tmp\n+fi\n+\n if [ \"$parent\" ]; then\n \tid2=\"$id1\"\n \tid1=$(parent-id \"$id2\" | head -n 1)\n@@ -88,7 +92,7 @@\n \n if [ \"$id2\" = \" \" ]; then\n \tif [ \"$id1\" != \" \" ]; then\n-\t\texport GIT_INDEX_FILE=$(mktemp -t gitdiff.XXXXXX)\n+\t\texport GIT_INDEX_FILE=$(mktemp \"$TMPDIR/gitdiff.XXXXXX\")\n \t\tread-tree $(gitXnormid.sh \"$id1\")\n \t\tupdate-cache --refresh\n \tfi\nIndex: gitmerge.sh\n===================================================================\n--- 6a612d42afdba20fd2150e319a689ed451b010e4/gitmerge.sh  (mode:100755 sha1:683755729b6f689ea43c692712fad6e51eeac354)\n+++ 61059575269ed1027cfb66543251e182f87d1064/gitmerge.sh  (mode:100755 sha1:1c733bbdb9fe54c41787d962d0f55bb5f67d4c63)\n@@ -19,6 +19,10 @@\n \texit 1\n }\n \n+if [ -z \"$TMPDIR\"]; then\n+\tTMPDIR=/tmp\n+fi\n+\n head=$(commit-id)\n \n \n@@ -58,7 +62,7 @@\n \techo \"Fast-forwarding $base -> $branch\" >&2\n \techo -e \"\\ton top of $head...\" >&2\n \n-\tpatchfile=$(mktemp -t gitmerge.XXXXXX)\n+\tpatchfile=$(mktemp \"$TMPDIR/gitmerge.XXXXXX\")\n \tgitdiff.sh >$patchfile\n \n \tread-tree -m $(tree-id $branch)\n"},{"id":"1273","messageId":"4269073C.1080802@qualitycode.com","threadId":"236","inReplyTo":"20050422015521.GK493@shell0.pdx.osdl.net","subject":"Re: [PATCH] git-pasky spec file","fromName":"Kevin Smith","fromEmail":"yarcs@qualitycode.com","sentAt":"2005-04-22T14:16:28Z","receivedAt":"2005-04-22T14:16:28Z","isPatch":true,"sender":{"key":"yarcs@qualitycode.com","avatar":null},"body":"Chris Wright wrote:\n> Here's a simple spec file to do rpm builds.\n\n(snip)\n\n> Creates a package named git, which seems\n> fine since Linus' isn't likely to be packaged directly.  \n\nUm. Really? I can't imagine why Linus's git wouldn't be packaged\ndirectly. He has strongly indicated that folks who want to build on top\nof it should not expect to see libgit any time soon, so git will be an\nimportant independent tool.\n\nBut presumably you'll change the name of this package to cogito soon\nanyway, as soon as git-pasky itself is renamed.\n\nKevin\n"},{"id":"1281","messageId":"20050422152146.GN493@shell0.pdx.osdl.net","threadId":"236","inReplyTo":"4269073C.1080802@qualitycode.com","subject":"Re: [PATCH] git-pasky spec file","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-04-22T15:21:46Z","receivedAt":"2005-04-22T15:21:46Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"* Kevin Smith (yarcs@qualitycode.com) wrote:\n> But presumably you'll change the name of this package to cogito soon\n> anyway, as soon as git-pasky itself is renamed.\n\nthat's the plan.\n\nthanks,\n-chris\n-- \nLinux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net\n"},{"id":"1653","messageId":"20050425142411.1849a5db.paul@permanentmail.com","threadId":"236","inReplyTo":"20050422024834.GM493@shell0.pdx.osdl.net","subject":"Re: [PATCH] git-pasky spec file","fromName":"Paul Dickson","fromEmail":"paul@permanentmail.com","sentAt":"2005-04-25T21:24:11Z","receivedAt":"2005-04-25T21:24:11Z","isPatch":true,"sender":{"key":"paul@permanentmail.com","avatar":null},"body":"On Thu, 21 Apr 2005 19:48:34 -0700, Chris Wright wrote:\n\n> * Petr Baudis (pasky@ucw.cz) wrote:\n> > Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter\n> > where Chris Wright <chrisw@osdl.org> told me that...\n> > > Here's a simple spec file to do rpm builds.  It's against the\n> > > latest Makefile (which has the s/BINDIR/bindir/ change).  I've used\n> > > DESTDIR, although it's not clear it's meant to stay in the Makefile.\n> > > For now, there's no dynamic (git.spec.in, for example) update to the\n> > > Version, so it's set against 0.6.3 (expecting it to be forthcoming\n> > > shortly).  It installs to /usr/local/bin, and expects the tarball to be\n> > > named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems\n> > > fine since Linus' isn't likely to be packaged directly.  Enjoy.\n> > \n> > Thanks, applied. I'll gladly yet you maintain this file, but...\n> \n> No problem...\n> \n> > > --- /dev/null\t1969-12-31 16:00:00.000000000 -0800\n> > > +++ git-pasky-0.6.3/git.spec\t2005-04-21 18:42:18.000000000 -0700\n> > > @@ -0,0 +1,43 @@\n> > > +%install\n> > > +rm -rf $RPM_BUILD_ROOT\n> > > +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install\n> > \n> > I doubt this is actually what you want. I suppose you want\n> > \n> > make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install\n> \n> Yup, that makes more sense.  Feel free to update if you're so inclined.\n\nIf you're building an RPM, it should go in /usr not /usr/local.  /usr/local\nis for unmanaged (non-RPM) installs.\n\n\t-Paul\n\n"},{"id":"1667","messageId":"20050425222151.GM493@shell0.pdx.osdl.net","threadId":"236","inReplyTo":"20050425142411.1849a5db.paul@permanentmail.com","subject":"Re: [PATCH] git-pasky spec file","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-04-25T22:21:51Z","receivedAt":"2005-04-25T22:21:51Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"* Paul Dickson (paul@permanentmail.com) wrote:\n> On Thu, 21 Apr 2005 19:48:34 -0700, Chris Wright wrote:\n> \n> > * Petr Baudis (pasky@ucw.cz) wrote:\n> > > Dear diary, on Fri, Apr 22, 2005 at 03:55:21AM CEST, I got a letter\n> > > where Chris Wright <chrisw@osdl.org> told me that...\n> > > > Here's a simple spec file to do rpm builds.  It's against the\n> > > > latest Makefile (which has the s/BINDIR/bindir/ change).  I've used\n> > > > DESTDIR, although it's not clear it's meant to stay in the Makefile.\n> > > > For now, there's no dynamic (git.spec.in, for example) update to the\n> > > > Version, so it's set against 0.6.3 (expecting it to be forthcoming\n> > > > shortly).  It installs to /usr/local/bin, and expects the tarball to be\n> > > > named git-pasky-0.6.3.tar.bz2.  Creates a package named git, which seems\n> > > > fine since Linus' isn't likely to be packaged directly.  Enjoy.\n> > > \n> > > Thanks, applied. I'll gladly yet you maintain this file, but...\n> > \n> > No problem...\n> > \n> > > > --- /dev/null\t1969-12-31 16:00:00.000000000 -0800\n> > > > +++ git-pasky-0.6.3/git.spec\t2005-04-21 18:42:18.000000000 -0700\n> > > > @@ -0,0 +1,43 @@\n> > > > +%install\n> > > > +rm -rf $RPM_BUILD_ROOT\n> > > > +make DESTDIR=$RPM_BUILD_ROOT/usr/local/ bindir=bin/ install\n> > > \n> > > I doubt this is actually what you want. I suppose you want\n> > > \n> > > make DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local install\n> > \n> > Yup, that makes more sense.  Feel free to update if you're so inclined.\n> \n> If you're building an RPM, it should go in /usr not /usr/local.  /usr/local\n> is for unmanaged (non-RPM) installs.\n\nThat's not quite the definition for FHS, but I don't mind putting into\n/usr/bin.  I had planned upon doing a /usr/bin/git and helpers in\nanother directory, but with new command name (ala cg-$cmd) then I think\nthey'll all just go in /usr/bin.  Other opinions?\n\nthanks,\n-chris\n"}]}