Re: Automating our version-stamping a bit better

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-core(at)postgreSQL(dot)org
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Automating our version-stamping a bit better
Date: 2008-06-09 01:12:05
Message-ID: 26433.1212973925@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

So while tagging the upcoming releases, I got annoyed once again about
what a tedious, error-prone bit of donkeywork it is. You've got to find
and update the sub-version numbers, and *not* any chance occurrence of
the same strings (eg s/20/21/g for version 7.4.21 would've mangled some
copyright dates). And the changes tend to move around a little bit in
each back branch, making it even easier to blow it. ISTM we should get
the machine to do it for us.

I propose to write a little perl script to be used like this:

cd top-level-of-tree
sh src/tools/version_stamp 22
cvs commit -m "Stamp release 7.4.22"

The script takes just one argument, which could be "devel", "betaN",
"rcN", or just a minor version number "N". Note the assumption that the
script knows the major version. Since we expect to adjust the script
from time to time for version changes anyway, I don't see why we
shouldn't have the major version stored right in the script. Tagging a
new development branch after a release is split off would then look like

cd src/tools
edit version_stamp, update a variable assignment at its head
cvs commit -m "Update version_stamp for 8.5"
cd ../..
sh src/tools/version_stamp devel
cvs commit -m "Stamp CVS HEAD as 8.5devel"

Note that this is not all that helpful if we just do it in CVS HEAD.
I propose adding the script to all active branches back to 7.4, with
suitable adjustments for each branch as needed.

I think we should probably include configure.in in the set of files
that this script updates, and get rid of the current two-step
arrangement where Marc stamps configure.in/configure after somebody
else stamps everything else. Marc's tarball-wrapping process would
thus look roughly like

sh src/tools/version_stamp 4
autoconf
cvs commit -m "Stamp release 8.3.4"
cvs tag REL8_3_4
... build tarball ...

I'm tempted to suggest letting the script invoke autoconf, too,
but that would require standardizing where to find the correct
version of autoconf for each branch; so it might not be such a
great idea.

Thoughts, objections?

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-core(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Automating our version-stamping a bit better
Date: 2008-06-09 01:20:12
Message-ID: 484C854C.8050403@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
>
> I'm tempted to suggest letting the script invoke autoconf, too,
> but that would require standardizing where to find the correct
> version of autoconf for each branch; so it might not be such a
> great idea.
>
>

Unfortunately that's true. Maybe we could agree on using an alias for
the right version of autoconf, but it seems likely to be error prone.

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-core(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Automating our version-stamping a bit better
Date: 2008-06-09 01:27:03
Message-ID: 26771.1212974823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> I'm tempted to suggest letting the script invoke autoconf, too,
>> but that would require standardizing where to find the correct
>> version of autoconf for each branch; so it might not be such a
>> great idea.

> Unfortunately that's true. Maybe we could agree on using an alias for
> the right version of autoconf, but it seems likely to be error prone.

Actually, the way I do things is that my setup script for working
with each particular version tree includes adjusting $PATH so that
the right autoconf gets found just by saying "autoconf". If everyone
who might tag releases wanted to do it the same way, then we could
just let the script say "autoconf". But I'm not sure anybody else
likes that plan. What I was thinking was just to have the script
print out something like

Tagged tree as 8.3.4
Don't forget to run autoconf 2.59 before committing

regards, tom lane


From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-core(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [CORE] Automating our version-stamping a bit better
Date: 2008-06-09 02:03:47
Message-ID: DD35B4B823318BF65511A230@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Sunday, June 08, 2008 21:27:03 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> Tom Lane wrote:
>>> I'm tempted to suggest letting the script invoke autoconf, too,
>>> but that would require standardizing where to find the correct
>>> version of autoconf for each branch; so it might not be such a
>>> great idea.
>
>> Unfortunately that's true. Maybe we could agree on using an alias for
>> the right version of autoconf, but it seems likely to be error prone.
>
> Actually, the way I do things is that my setup script for working
> with each particular version tree includes adjusting $PATH so that
> the right autoconf gets found just by saying "autoconf". If everyone
> who might tag releases wanted to do it the same way, then we could
> just let the script say "autoconf". But I'm not sure anybody else
> likes that plan. What I was thinking was just to have the script
> print out something like
>
> Tagged tree as 8.3.4
> Don't forget to run autoconf 2.59 before committing

I like that one ...

- --
Marc G. Fournier Hub.Org Hosting Solutions S.A. (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkhMj4MACgkQ4QvfyHIvDvNWAACfeEuX8PCwbPgZLutpya859T+5
sDYAoKgTnLoypgDOwr4TSYVd+G5Dn+kn
=Cl6d
-----END PGP SIGNATURE-----


From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-core(at)postgreSQL(dot)org>, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Automating our version-stamping a bit better
Date: 2008-06-09 07:52:46
Message-ID: 484CE14E.8010001@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:
> Tom Lane wrote:
>>
>> I'm tempted to suggest letting the script invoke autoconf, too,
>> but that would require standardizing where to find the correct
>> version of autoconf for each branch; so it might not be such a
>> great idea.
>
> Unfortunately that's true. Maybe we could agree on using an alias for
> the right version of autoconf, but it seems likely to be error prone.

Or we could sidestep the issue by not running autoconf, but
search-replace the version strings in configure directly with the perl
script.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-core(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [CORE] Automating our version-stamping a bit better
Date: 2008-06-10 18:13:38
Message-ID: 21710.1213121618@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> Tom Lane wrote:
>> What I was thinking was just to have the script
>> print out something like
>>
>> Tagged tree as 8.3.4
>> Don't forget to run autoconf 2.59 before committing

> I like that one ...

I've checked in a script to do this --- executing
src/tools/version_stamp.pl N
at the top level of the tree should stamp everything needed, and remind
you which autoconf version to run.

Marc, you'll presumably be the primary user of this script, so would you
please try it out and make sure (a) it works for you, and (b) you like
the way it works? I don't think I used any unportable perl or sed
constructs, but let's find the problems now, not when we're trying to
wrap a release ...

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-core(at)postgresql(dot)org
Subject: Re: Automating our version-stamping a bit better
Date: 2008-06-10 20:52:19
Message-ID: 200806102252.20562.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Am Monday, 9. June 2008 schrieb Tom Lane:
> So while tagging the upcoming releases, I got annoyed once again about
> what a tedious, error-prone bit of donkeywork it is.

Could you explain what the problem is? Your script sounds like an ad hoc
workaround for some problem, but I haven't seen the problem actually defined.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-core(at)postgresql(dot)org
Subject: Re: Automating our version-stamping a bit better
Date: 2008-06-10 21:15:39
Message-ID: 24817.1213132539@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Am Monday, 9. June 2008 schrieb Tom Lane:
>> So while tagging the upcoming releases, I got annoyed once again about
>> what a tedious, error-prone bit of donkeywork it is.

> Could you explain what the problem is? Your script sounds like an ad hoc
> workaround for some problem, but I haven't seen the problem actually defined.

The problem is having to manually insert the version number into half a
dozen different files, in half a dozen different formats, while
preparing an update release. (And multiply that by several back
branches, with several slightly different sets of changes to make.)
This is not only tedious but quite error-prone --- if you check the CVS
logs for the affected files you'll note we have missed changes more than
once. I don't think we've yet wrapped a mis-labeled tarball, but it's
going to happen sooner or later if we keep doing this manually.

I suspect you are wondering why we don't use the makefile infrastructure
to fix the numbers instead. I think the reason is that most of the
files in question are for Windows and we can't assume very much about
the available tools for fixing them at build time. In any case, I'd
be hesitant to back-patch such a fix. Doing it this way means that the
script only has to work on our own machines, not in any weird build
environment someone might have, so it seems a lot safer to drop into
the back branches.

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql-core(at)postgresql(dot)org
Subject: Re: [CORE] Automating our version-stamping a bit better
Date: 2008-06-12 15:54:42
Message-ID: 200806121554.m5CFsg613297@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Am Monday, 9. June 2008 schrieb Tom Lane:
> >> So while tagging the upcoming releases, I got annoyed once again about
> >> what a tedious, error-prone bit of donkeywork it is.
>
> > Could you explain what the problem is? Your script sounds like an ad hoc
> > workaround for some problem, but I haven't seen the problem actually defined.
>
> The problem is having to manually insert the version number into half a
> dozen different files, in half a dozen different formats, while
> preparing an update release. (And multiply that by several back
> branches, with several slightly different sets of changes to make.)
> This is not only tedious but quite error-prone --- if you check the CVS
> logs for the affected files you'll note we have missed changes more than
> once. I don't think we've yet wrapped a mis-labeled tarball, but it's
> going to happen sooner or later if we keep doing this manually.
>
> I suspect you are wondering why we don't use the makefile infrastructure
> to fix the numbers instead. I think the reason is that most of the
> files in question are for Windows and we can't assume very much about
> the available tools for fixing them at build time. In any case, I'd
> be hesitant to back-patch such a fix. Doing it this way means that the
> script only has to work on our own machines, not in any weird build
> environment someone might have, so it seems a lot safer to drop into
> the back branches.

Yes, I like the idea of automating this.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +