{"thread":{"id":"465","subject":"[PATCH] release tarball make targets","startedAt":"2005-05-03T21:15:27Z","lastAt":"2005-05-04T15:27:09Z","messageCount":5,"participants":["Mark Allen","Petr Baudis","Chris Wright","H. Peter Anvin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2523","messageId":"20050503211527.42339.qmail@web41208.mail.yahoo.com","threadId":"465","inReplyTo":null,"subject":"[PATCH] release tarball make targets","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-05-03T21:15:27Z","receivedAt":"2005-05-03T21:15:27Z","isPatch":true,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"This patch is to support automating RPM and spec file generation.\n\nCheers,\n\n--Mark\n\nSigned-off-by: Mark Allen <mrallen1@yahoo.com>\n\nIndex: Makefile\n===================================================================\n--- aa6233be6d1b8bf42797c409a7c23b50593afc99/Makefile  (mode:100644\nsha1:6ae0afa0208a8f755d383281a6d049a4ef90fe63)\n+++ uncommitted/Makefile  (mode:100644 sha1:181aa6d6c34fb771671a7ee8038f9cf18972713a)\n@@ -55,6 +55,10 @@\n \n VERSION= VERSION\n \n+DIRS=mozilla-sha1 contrib ppc\n+\n+DOCS=README README.reference\n+\n LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \\\n \t tag.o date.o\n LIB_FILE=libgit.a\n@@ -136,3 +140,11 @@\n \n backup: clean\n \tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+release-tar-gzip: clean\n+\ttar czf $(shell cat $(VERSION)).tar.gz *.c *.h git.spec Makefile $(DOCS) $(DIRS)\n$(SCRIPTS) $(SCRIPT) \n+\n+release-tar-bzip2: clean\n+\ttar cjf $(shell cat $(VERSION)).tar.bz2 *.c *.h git.spec Makefile $(DOCS) $(DIRS)\n$(SCRIPTS) $(SCRIPT) \n+\n+release-tarballs: release-tar-gzip release-tar-bzip2\n\n"},{"id":"2531","messageId":"20050503214401.GE15995@pasky.ji.cz","threadId":"465","inReplyTo":"20050503211527.42339.qmail@web41208.mail.yahoo.com","subject":"Re: [PATCH 0/3] cogito spec file updates","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-03T21:44:01Z","receivedAt":"2005-05-03T21:44:01Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, May 03, 2005 at 11:32:16PM CEST, I got a letter\nwhere Chris Wright <chrisw@osdl.org> told me that...\n> * Petr Baudis (pasky@ucw.cz) wrote:\n> > I might however have some private mkrelease.sh script which would do\n> > \n> > \techo \"$1\" >VERSION\n> > \tupdate-spec-file\n> > \techo \"$1\" | cg-commit\n> > \tcg-tag \"$1\"\n> > \n> > or something.\n> \n> If you had a Makefile target like the one Mark Allen just posted, would\n> you use that?\n\nNo, I definitively won't use that:\n\n(i)  The created tarball is Evil. It does not contain everything in a\nsubdirectory.\n\n(ii) I don't want to have yet another place which I'm supposed to keep\nup to date with regard to what should be packaged. That's one of the\nthings the SCM is for, and it already records precisely this\ninformation, so I'd actually use it. cg-export foo.tar.gz is the perfect\ntool for this.\n\n> I'd simply add a git.spec: rule, and have git.spec built\n> as a dependency for tarball.\n\nI wouldn't accept this neither. If git.spec is already version\ncontrolled, it should be up-to-date in the version control. Therefore,\nyou need to update it at the time of release, not at the time of\ngenerating the tarball.\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":"2542","messageId":"20050503230152.GX18917@shell0.pdx.osdl.net","threadId":"465","inReplyTo":"20050503214401.GE15995@pasky.ji.cz","subject":"Re: [PATCH 0/3] cogito spec file updates","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-05-03T23:01:52Z","receivedAt":"2005-05-03T23:01:52Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"* Petr Baudis (pasky@ucw.cz) wrote:\n> I wouldn't accept this neither. If git.spec is already version\n> controlled, it should be up-to-date in the version control. Therefore,\n> you need to update it at the time of release, not at the time of\n> generating the tarball.\n\n*shrug*\n\nWell, it's guaranteed to be one step out of sync, but I'll just keep\ndoing what I've been doing.  Build rpm after you release, and send\npatch ex-post-facto.\n\nthanks,\n-chris\n"},{"id":"2571","messageId":"4278DE7D.3000005@zytor.com","threadId":"465","inReplyTo":"20050503214401.GE15995@pasky.ji.cz","subject":"Re: [PATCH 0/3] cogito spec file updates","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-04T14:38:53Z","receivedAt":"2005-05-04T14:38:53Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Petr Baudis wrote:\n> \n> I wouldn't accept this neither. If git.spec is already version\n> controlled, it should be up-to-date in the version control. Therefore,\n> you need to update it at the time of release, not at the time of\n> generating the tarball.\n> \n\nWhat I usually do is to have a *.spec.in file, and have my release \nscript generate the *.spec file.  I usually have a \"version\" file \nchecked into the SCM from which all version information derives, \nincluding what to put in the *.spec file as well as what to name the \nsubdirectory.\n\nThe release script then ends up being some variant on:\n\n#!/bin/sh -xe\nPACKAGE=pkgname\nVERSION=`cat version`\nscm-of-choice tag --force $PACKAGE-$VERSION\nmkdir /var/tmp/$PACKAGE-$VERSION\ncd /var/tmp/$PACKAGE-$VERSION\nscm-of-choice export -r $PACKAGE-$VERSION\nmake release\ncd ..\ntar cvvfz $PACKAGE-$VERSION.tar.gz $PACKAGE-$VERSION\nrm -rf $PACKAGE-$VERSION\n\n... where \"make release\" creates the specfile and anything else that \nneeds to be created (like autoconf files.)\n\n\t-hpa\n\n"},{"id":"2575","messageId":"20050504152709.GG5324@shell0.pdx.osdl.net","threadId":"465","inReplyTo":"4278DE7D.3000005@zytor.com","subject":"Re: [PATCH 0/3] cogito spec file updates","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-05-04T15:27:09Z","receivedAt":"2005-05-04T15:27:09Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"* H. Peter Anvin (hpa@zytor.com) wrote:\n> What I usually do is to have a *.spec.in file, and have my release \n> script generate the *.spec file.  I usually have a \"version\" file \n> checked into the SCM from which all version information derives, \n> including what to put in the *.spec file as well as what to name the \n> subdirectory.\n> \n> The release script then ends up being some variant on:\n> \n> #!/bin/sh -xe\n> PACKAGE=pkgname\n> VERSION=`cat version`\n> scm-of-choice tag --force $PACKAGE-$VERSION\n> mkdir /var/tmp/$PACKAGE-$VERSION\n> cd /var/tmp/$PACKAGE-$VERSION\n> scm-of-choice export -r $PACKAGE-$VERSION\n> make release\n> cd ..\n> tar cvvfz $PACKAGE-$VERSION.tar.gz $PACKAGE-$VERSION\n> rm -rf $PACKAGE-$VERSION\n> \n> ... where \"make release\" creates the specfile and anything else that \n> needs to be created (like autoconf files.)\n\nYup, that's precisely what I was thinking.  I cobbled up an add-on to\nMark Allen's patch yesterday, but didn't send it since Pasky didn't seem\ntoo interested in the idea.  Anyway, here it is to demonstrate the idea.\nThe current setup is definitely workable, just means each release tarball\nwill build a bogus package with rpmbuild -ta.  So I just fix up the spec\nand then build...\n\nthanks,\n-chris\n--\n\n\n\nAutogen git.spec from git.spec.in.  Needs patch from Mark Allen.\n\nSigned-off-by: Chris Wright <chrisw@osdl.org>\n\n--- cogito/Makefile~orig\t2005-05-03 14:41:50.000000000 -0700\n+++ cogito/Makefile\t2005-05-03 15:53:36.000000000 -0700\n@@ -126,6 +126,8 @@\n \t@chmod +x $@\n endif\n \n+git.spec: git.spec.in $(VERSION) \n+\tsed -e 's/@@VERSION@@/$(shell cat $(VERSION) | cut -d\"-\" -f2)/g' < $< > $@\n \n install: $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT)\n \tinstall -m755 -d $(DESTDIR)$(bindir)\n@@ -141,10 +143,10 @@\n backup: clean\n \tcd .. ; tar czvf dircache.tar.gz dir-cache\n \n-release-tar-gzip: clean\n+release-tar-gzip: clean git.spec\n \ttar czf $(shell cat $(VERSION)).tar.gz *.c *.h git.spec Makefile $(DOCS) $(DIRS) $(SCRIPTS) $(SCRIPT) \n \n-release-tar-bzip2: clean\n+release-tar-bzip2: clean git.spec\n \ttar cjf $(shell cat $(VERSION)).tar.bz2 *.c *.h git.spec Makefile $(DOCS) $(DIRS) $(SCRIPTS) $(SCRIPT) \n \n release-tarballs: release-tar-gzip release-tar-bzip2\n--- cogito/git.spec~orig\t2005-05-03 14:41:59.000000000 -0700\n+++ cogito/git.spec\t2005-05-03 14:42:55.000000000 -0700\n@@ -1,55 +0,0 @@\n-Name: \t\tcogito\n-Version: \t0.8\n-Release: \t2\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://kernel.org/pub/software/scm/cogito/\n-Source: \thttp://kernel.org/pub/software/scm/cogito/%{name}-%{version}.tar.bz2\n-Provides: \tcogito = %{version}\n-Obsoletes:\tgit\n-BuildRequires:\tzlib-devel, openssl-devel, curl-devel\n-BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n-Prereq: \tsh-utils, diffutils, rsync, rcs, mktemp >= 1.5\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-\n-%build\n-\n-make\n-\n-%install\n-rm -rf $RPM_BUILD_ROOT\n-make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install\n-\n-%clean\n-rm -rf $RPM_BUILD_ROOT\n-\n-%files\n-%defattr(-,root,root)\n-/usr/bin/*\n-%doc README README.reference COPYING Changelog\n-\n-%changelog\n-* Wed Apr 27 2005 Terje Rosten <terje.rosten@ntnu.no> 0.8-2\n-- Doc files\n-- Use %%{_prefix} macro\n-- Drop -n option to %%setup macro\n-\n-* Mon Apr 25 2005 Chris Wright <chrisw@osdl.org> 0.8-1\n-- Update to cogito, rename package, move to /usr/bin, update prereqs\n-\n-* Mon Apr 25 2005 Chris Wright <chrisw@osdl.org> 0.7-1\n-- Update to 0.7\n-\n-* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1\n-- Initial rpm build\n--- cogito/git.spec.in~orig\t2005-05-03 14:42:20.000000000 -0700\n+++ cogito/git.spec.in\t2005-05-03 14:44:19.000000000 -0700\n@@ -0,0 +1,58 @@\n+Name: \t\tcogito\n+Version: \t@@VERSION@@\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://kernel.org/pub/software/scm/cogito/\n+Source: \thttp://kernel.org/pub/software/scm/cogito/%{name}-%{version}.tar.bz2\n+Provides: \tcogito = %{version}\n+Obsoletes:\tgit\n+BuildRequires:\tzlib-devel, openssl-devel, curl-devel\n+BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n+Prereq: \tsh-utils, diffutils, rsync, rcs, mktemp >= 1.5\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+\n+%build\n+\n+make\n+\n+%install\n+rm -rf $RPM_BUILD_ROOT\n+make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install\n+\n+%clean\n+rm -rf $RPM_BUILD_ROOT\n+\n+%files\n+%defattr(-,root,root)\n+/usr/bin/*\n+%doc README README.reference COPYING Changelog\n+\n+%changelog\n+* Tue May 3 2005 Chris Wright <chrisw@osdl.org>\n+- Auto build from git.spec.in\n+\n+* Wed Apr 27 2005 Terje Rosten <terje.rosten@ntnu.no> 0.8-2\n+- Doc files\n+- Use %%{_prefix} macro\n+- Drop -n option to %%setup macro\n+\n+* Mon Apr 25 2005 Chris Wright <chrisw@osdl.org> 0.8-1\n+- Update to cogito, rename package, move to /usr/bin, update prereqs\n+\n+* Mon Apr 25 2005 Chris Wright <chrisw@osdl.org> 0.7-1\n+- Update to 0.7\n+\n+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1\n+- Initial rpm build\n"}]}