Re: Allow bootstrap from git repository
Ralf Wildenhues wrote: > * Peter O'Gorman wrote on Tue, Apr 15, 2008 at 07:40:54AM CEST: > >> Could do a count of ChangeLog* files, and use that as the first digit, I >> suppose. Not tonight though, need some sleep :) > > Sounds like a possible plan. I looked again, and at first counted all the lines in all the changelogs, but then it seemed better to count only what looked like dates. Ok? Peter -- Peter O'Gorman http://pogma.com >From 1faad4199ac85a135f8455a10497aa1825f8c736 Mon Sep 17 00:00:00 2001 From: Peter O'Gorman <[EMAIL PROTECTED]> Date: Tue, 15 Apr 2008 09:35:38 -0500 Subject: [PATCH] Allow bootstrap from git repository. * Makefile.am: Pass srcdir as an argument to mkstamp and expect only 2 fields in mkstamps output. * clcommit.m4sh: Ditto. * configure.ac: Ditto. * libltdl/config/mkstamp: return a revision and date based on the number of lines which look like dates in all the ChangeLog* files in the directory we got as arg 1. --- ChangeLog | 11 +++ Makefile.am|4 ++-- clcommit.m4sh |2 +- configure.ac |2 +- libltdl/config/mkstamp | 31 +-- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4fac02..97dc1d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-04-14 Peter O'Gorman <[EMAIL PROTECTED]> + + Allow bootstrap from git repository. + * Makefile.am: Pass srcdir as an argument to mkstamp and expect + only 2 fields in mkstamps output. + * clcommit.m4sh: Ditto. + * configure.ac: Ditto. + * libltdl/config/mkstamp: return a revision and date based on + the number of lines which look like dates in all the ChangeLog* + files in the directory we got as arg 1. + 2008-04-11 Eric Blake <[EMAIL PROTECTED]> Fix usage of setmode without declaration on cygwin. diff --git a/Makefile.am b/Makefile.am index 0168a41..480b647 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,9 +50,9 @@ lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd MKSTAMP = $(SHELL) $(srcdir)/$(auxdir)/mkstamp -timestamp = set dummy `$(MKSTAMP) < $(srcdir)/ChangeLog`; shift; \ +timestamp = set dummy `$(MKSTAMP) $(srcdir)`; shift; \ case $(VERSION) in \ - *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2 $$3" ;; \ + *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2" ;; \ *) TIMESTAMP="" ;; \ esac diff --git a/clcommit.m4sh b/clcommit.m4sh index 3439dae..7fe9d2d 100644 --- a/clcommit.m4sh +++ b/clcommit.m4sh @@ -444,7 +444,7 @@ func_mailnotify () test -f CVS/Root && echo "CVSROOT: `$SED -e 's,.*:,,g' CVS/Root`" test -f $MKSTAMP && - echo "TIMESTAMP: `$SHELL $MKSTAMP < ./ChangeLog`" + echo "TIMESTAMP: `$SHELL $MKSTAMP .`" test -f CVS/Repository && echo "Module name: `cat CVS/Repository`" test -f CVS/Tag && diff --git a/configure.ac b/configure.ac index 6f49016..4660a67 100644 --- a/configure.ac +++ b/configure.ac @@ -103,7 +103,7 @@ AC_SUBST([LASTRELEASE]) # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool # versions (i.e. "odd" letters) and not actual alpha releases. -TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog` +TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp ${srcdir}` package_revision=`( set $TIMESTAMP; echo $1; )` case $lt_alpha in [[bdfhjlnprtvxz]]) diff --git a/libltdl/config/mkstamp b/libltdl/config/mkstamp index 8d8e7d8..d11599a 100755 --- a/libltdl/config/mkstamp +++ b/libltdl/config/mkstamp @@ -23,15 +23,26 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# This script expects to find a line containing both Revision and Date -# tags, and it edits this line so that it looks like ` $rev $date' +# This script takes a directory as an argument and generates a +# revision and date based upon the ChangeLog files in that directory. -# Command-line arguments are passed down to sed; additional -e cmd -# arguments are acceptable. Input is from from stdin. The original -# version of this script accepted input from a named file or stdin. +# Generate a revision that looks similar to CVS revision by using 1. +# then the number of lines in the ChangeLogs starting with dates (an +# approximation of the number of commits) + 1000. +# For those pulling from the savannah git repository it should be +# possible to go from this revision number to the git revision fairly +# easily. The number will also always increase. -tr -d "\015" | sed -e ' - s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% \1 \2% - t end - d - : end' ${1+"$@"} +awk 'BEGIN { + cocount=0; +} +/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] / { +if (cocount== 0) { +datestr=$1 +} + cocount++; +} +END { + cocount = cocount + 1000; +print "1." cocount " " datestr; +}' $1/ChangeLog $1/ChangeLog.* -- 1.5.3.7
Re: add cegcc support
On Mon, 14 Apr 2008, Ralf Wildenhues wrote: Against CVS HEAD is just fine, sorry for the confusion. The important thing is that we see how the testsuite fares in order to get an idea how well the port works, and can fix simple issues that were overlooked. I had to change config.sub for cegcc (as it's not supported yet). I run configure with the following command: ./configure --host=arm-wince-cegcc There is one failure and 45 skipped. See the complete log below. The failing test is tests/demo-make.test. What should I do to debug it ? Also, do you want the configure output ? thank you Vincent Torri PASS: tests/link.test PASS: tests/link-2.test PASS: tests/nomode.test PASS: tests/objectlist.test PASS: tests/quote.test PASS: tests/sh.test PASS: tests/suffix.test PASS: tests/tagtrace.test PASS: tests/cdemo-static.test PASS: tests/cdemo-make.test SKIP: tests/cdemo-exec.test PASS: tests/demo-static.test PASS: tests/demo-make.test SKIP: tests/demo-exec.test PASS: tests/demo-inst.test PASS: tests/demo-unst.test PASS: tests/depdemo-static.test PASS: tests/depdemo-make.test SKIP: tests/depdemo-exec.test PASS: tests/depdemo-inst.test PASS: tests/depdemo-unst.test PASS: tests/mdemo-static.test PASS: tests/mdemo-make.test SKIP: tests/mdemo-exec.test PASS: tests/mdemo-inst.test PASS: tests/mdemo-unst.test PASS: tests/cdemo-conf.test PASS: tests/cdemo-make.test SKIP: tests/cdemo-exec.test PASS: tests/demo-conf.test PASS: tests/demo-make.test SKIP: tests/demo-exec.test SKIP: tests/demo-inst.test SKIP: tests/demo-unst.test SKIP: tests/demo-deplibs.test PASS: tests/depdemo-conf.test PASS: tests/depdemo-make.test SKIP: tests/depdemo-exec.test SKIP: tests/depdemo-inst.test SKIP: tests/depdemo-unst.test PASS: tests/mdemo-conf.test PASS: tests/mdemo-make.test SKIP: tests/mdemo-exec.test SKIP: tests/mdemo-inst.test SKIP: tests/mdemo-unst.test PASS: tests/mdemo-dryrun.test PASS: tests/mdemo2-conf.test PASS: tests/mdemo2-make.test SKIP: tests/mdemo2-exec.test PASS: tests/pdemo-conf.test PASS: tests/pdemo-make.test SKIP: tests/pdemo-exec.test SKIP: tests/pdemo-inst.test PASS: tests/demo-nofast.test PASS: tests/demo-make.test SKIP: tests/demo-exec.test SKIP: tests/demo-inst.test SKIP: tests/demo-unst.test PASS: tests/depdemo-nofast.test PASS: tests/depdemo-make.test SKIP: tests/depdemo-exec.test SKIP: tests/depdemo-inst.test SKIP: tests/depdemo-unst.test PASS: tests/demo-pic.test PASS: tests/demo-make.test SKIP: tests/demo-exec.test PASS: tests/demo-nopic.test PASS: tests/demo-make.test SKIP: tests/demo-exec.test PASS: tests/cdemo-shared.test PASS: tests/cdemo-make.test SKIP: tests/cdemo-exec.test PASS: tests/demo-shared.test FAIL: tests/demo-make.test SKIP: tests/demo-exec.test SKIP: tests/demo-inst.test SKIP: tests/demo-hardcode.test SKIP: tests/demo-relink.test SKIP: tests/demo-noinst-link.test SKIP: tests/demo-unst.test PASS: tests/depdemo-shared.test PASS: tests/depdemo-make.test SKIP: tests/depdemo-exec.test SKIP: tests/depdemo-inst.test SKIP: tests/depdemo-relink.test SKIP: tests/depdemo-unst.test PASS: tests/mdemo-shared.test PASS: tests/mdemo-make.test SKIP: tests/mdemo-exec.test SKIP: tests/mdemo-inst.test SKIP: tests/mdemo-unst.test PASS: tests/cdemo-undef.test PASS: tests/cdemo-make.test SKIP: tests/cdemo-exec.test PASS: tests/tagdemo-static.test PASS: tests/tagdemo-make.test SKIP: tests/tagdemo-exec.test PASS: tests/tagdemo-conf.test PASS: tests/tagdemo-make.test SKIP: tests/tagdemo-exec.test PASS: tests/tagdemo-shared.test PASS: tests/tagdemo-make.test SKIP: tests/tagdemo-exec.test PASS: tests/tagdemo-undef.test PASS: tests/tagdemo-make.test SKIP: tests/tagdemo-exec.test 1 of 61 tests failed (45 tests were not run) Please report to [EMAIL PROTECTED]
Re: Allow bootstrap from git repository
Hi Peter, * Peter O'Gorman wrote on Tue, Apr 15, 2008 at 04:54:10PM CEST: > > I looked again, and at first counted all the lines in all the > changelogs, but then it seemed better to count only what looked like dates. Better. I don't mind that multiple commits like this count as one: 2008-xx-xx User * foo: Foo. * bar: Bar. > --- a/libltdl/config/mkstamp > +++ b/libltdl/config/mkstamp > +awk 'BEGIN { > + cocount=0; > +} > +/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] / { > +if (cocount== 0) { > +datestr=$1 > +} > + cocount++; > +} > +END { > + cocount = cocount + 1000; > +print "1." cocount " " datestr; > +}' $1/ChangeLog $1/ChangeLog.* Please make the latter be $1/ChangeLog.[12][0-9][0-9][0-9] so backup files don't count (I tend to cp foo foo.bak at times). OK with that change. Thanks, Ralf
Re: Allow bootstrap from git repository
If we need an increasing serial number, can't we obtain one from git? Does git offer the ability to update an RCS-style string in a text file each time it is modified? If that is the case, then we would just need to arrange to modify that file each time there is a commit to git. Of course since git uses distributed repositories, this might become tricky. We don't want to force someone to have to use git to do a 'make dist' but since git is necessary in order to submit changes, it is reasonable to make full use of it at that time. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: Allow bootstrap from git repository
* Bob Friesenhahn wrote on Tue, Apr 15, 2008 at 08:15:45PM CEST: > If we need an increasing serial number, can't we obtain one from git? > Does git offer the ability to update an RCS-style string in a text file > each time it is modified? If that is the case, then we would just need > to arrange to modify that file each time there is a commit to git. Of > course since git uses distributed repositories, this might become tricky. > > We don't want to force someone to have to use git to do a 'make dist' > but since git is necessary in order to submit changes, it is reasonable > to make full use of it at that time. Bob, of course it is possible to do with git. All that is needed is git describe and one prior signed tag. This is what Autoconf does, for example. I think Peter invested the time to do this in order to allow bootstrapping without having git available. If you're now OK with needing git for bootstrapping, then we can go similar to Autoconf. Cheers, Ralf
Re: add cegcc support
* Vincent Torri wrote on Tue, Apr 15, 2008 at 06:34:11PM CEST: > > > On Mon, 14 Apr 2008, Ralf Wildenhues wrote: >> Against CVS HEAD is just fine, sorry for the confusion. The important >> thing is that we see how the testsuite fares in order to get an idea how >> well the port works, and can fix simple issues that were overlooked. > > I had to change config.sub for cegcc (as it's not supported yet). I run > configure with the following command: > > ./configure --host=arm-wince-cegcc You may also want to provide --build > There is one failure and 45 skipped. See the complete log below. > > The failing test is tests/demo-make.test. What should I do to debug it ? > Also, do you want the configure output ? The README file explains it: run make check VERBOSE=yes TESTS="tests/demo-shared.test tests/demo-make.test tests/demo-exec.test" Also, please run the other half of the tests (the new testsuite) using make check-local and post tests/testsuite.log, please. You can run both with "make -k check". Thanks, Ralf
Re: Allow bootstrap from git repository
On Tue, 15 Apr 2008, Ralf Wildenhues wrote: bootstrapping without having git available. If you're now OK with needing git for bootstrapping, then we can go similar to Autoconf. No, that is not ok for me. :-) I had a different idea but now I realize that it was unworkable. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: Allow bootstrap from git repository
Ralf Wildenhues wrote: > Please make the latter be $1/ChangeLog.[12][0-9][0-9][0-9] so backup > files don't count (I tend to cp foo foo.bak at times). OK with that > change. git push fails for me with: [EMAIL PROTECTED] libtool]$ git push updating 'refs/heads/master' from 484680fe022563c93a37dad3b1bca46028b1e866 to 3528106688e06c4be785e17966b2ad3067250fec Also local refs/remotes/origin/master Generating pack... Done counting 9 objects. Deltifying 9 objects... 100% (9/9) done Writing 9 objects... 100% (9/9) done Total 9 (delta 0), reused 0 (delta 0) error: Unable to append to logs/refs/heads/master: Permission denied ng refs/heads/master failed to write error: failed to push to 'ssh://[EMAIL PROTECTED]/srv/git/libtool.git' Since it it the first time I have ever done a 'git push', I'll assume it's me. Help? Peter -- Peter O'Gorman http://pogma.com