Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Wed, 2013-11-20 at 01:08 +0200, Oskari Saarenmaa wrote: Agreed. Attached an updated patch, or you can grab it from https://github.com/saaros/postgres/compare/extra-version Committed. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Fri, Dec 13, 2013 at 12:03 PM, Peter Eisentraut pete...@gmx.net wrote: On Wed, 2013-11-20 at 01:08 +0200, Oskari Saarenmaa wrote: Agreed. Attached an updated patch, or you can grab it from https://github.com/saaros/postgres/compare/extra-version Committed. Thanks. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Wed, 2013-11-20 at 22:41 +0900, Michael Paquier wrote: Here are a couple of comments about the patch: 1) I think that you should regenerate ./configure as well with this patch to include all the changes together (someone correct me if I am wrong here!) Doesn't matter either way. 2) This new option should be added in the section ## Command line options in configure.in Yes. 3) PG_VERSION is not a variable name adapted IMO, as it might contain custom information. Something like PG_VERSION_TOTAL perhaps? I don't think it's necessary to split this up further. We have PG_VERSION and PG_MAJORVERSION. What's the use for one more level? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Wed, Nov 20, 2013 at 8:08 AM, Oskari Saarenmaa o...@ohmu.fi wrote: On Mon, Nov 18, 2013 at 08:48:13PM -0500, Peter Eisentraut wrote: On Tue, 2013-11-05 at 18:29 +0200, Oskari Saarenmaa wrote: This can be used to tag custom built packages with an extra version string such as the git describe id or distribution package release version. I think this is a reasonable feature, and the implementation is OK, but I don't see why the format of the extra version information needs to be exactly PG_VERSION=$PACKAGE_VERSION ($withval) I'd imagine, for example, that someone will want to do -something or +something. So I'd just make this PG_VERSION=$PACKAGE_VERSION$withval Comments? Sounds reasonable. +# Allow adding a custom string to PG_VERSION +PGAC_ARG_REQ(with, extra-version, [NAME], [extra version information], +[PG_VERSION=$PACKAGE_VERSION ($withval)], [PG_VERSION=$PACKAGE_VERSION]) This could be indented better. It was a bit confusing at first. Agreed. Attached an updated patch, or you can grab it from https://github.com/saaros/postgres/compare/extra-version Here are a couple of comments about the patch: 1) I think that you should regenerate ./configure as well with this patch to include all the changes together (someone correct me if I am wrong here!) 2) This new option should be added in the section ## Command line options in configure.in 3) PG_VERSION is not a variable name adapted IMO, as it might contain custom information. Something like PG_VERSION_TOTAL perhaps? regards, -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Mon, Nov 18, 2013 at 08:48:13PM -0500, Peter Eisentraut wrote: On Tue, 2013-11-05 at 18:29 +0200, Oskari Saarenmaa wrote: This can be used to tag custom built packages with an extra version string such as the git describe id or distribution package release version. I think this is a reasonable feature, and the implementation is OK, but I don't see why the format of the extra version information needs to be exactly PG_VERSION=$PACKAGE_VERSION ($withval) I'd imagine, for example, that someone will want to do -something or +something. So I'd just make this PG_VERSION=$PACKAGE_VERSION$withval Comments? Sounds reasonable. +# Allow adding a custom string to PG_VERSION +PGAC_ARG_REQ(with, extra-version, [NAME], [extra version information], +[PG_VERSION=$PACKAGE_VERSION ($withval)], [PG_VERSION=$PACKAGE_VERSION]) This could be indented better. It was a bit confusing at first. Agreed. Attached an updated patch, or you can grab it from https://github.com/saaros/postgres/compare/extra-version Thanks, Oskari From 00ca6c31db06edee0a6b5b5417eac71c274d7876 Mon Sep 17 00:00:00 2001 From: Oskari Saarenmaa o...@ohmu.fi Date: Wed, 20 Nov 2013 01:01:58 +0200 Subject: [PATCH] configure: allow adding a custom string to PG_VERSION This can be used to tag custom built packages with an extra version string such as the git describe id or distribution package release version. Signed-off-by: Oskari Saarenmaa o...@ohmu.fi --- configure.in | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 304399e..1f2f135 100644 --- a/configure.in +++ b/configure.in @@ -29,11 +29,16 @@ AC_CONFIG_AUX_DIR(config) AC_PREFIX_DEFAULT(/usr/local/pgsql) AC_SUBST(configure_args, [$ac_configure_args]) -AC_DEFINE_UNQUOTED(PG_VERSION, $PACKAGE_VERSION, [PostgreSQL version as a string]) [PG_MAJORVERSION=`expr $PACKAGE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\)'`] AC_SUBST(PG_MAJORVERSION) AC_DEFINE_UNQUOTED(PG_MAJORVERSION, $PG_MAJORVERSION, [PostgreSQL major version as a string]) +# Allow adding a custom string to PG_VERSION +PGAC_ARG_REQ(with, extra-version, [NAME], [extra version information], + [PG_VERSION=$PACKAGE_VERSION$withval], + [PG_VERSION=$PACKAGE_VERSION]) +AC_DEFINE_UNQUOTED(PG_VERSION, $PG_VERSION, [PostgreSQL version as a string]) + AC_CANONICAL_HOST template= @@ -1920,7 +1925,7 @@ else fi AC_DEFINE_UNQUOTED(PG_VERSION_STR, - [PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit], + [PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit], [A string containing the version number, platform, and C compiler]) # Supply a numeric version string for use by 3rd party add-ons -- 1.8.4.2 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Tue, 2013-11-05 at 18:29 +0200, Oskari Saarenmaa wrote: This can be used to tag custom built packages with an extra version string such as the git describe id or distribution package release version. I think this is a reasonable feature, and the implementation is OK, but I don't see why the format of the extra version information needs to be exactly PG_VERSION=$PACKAGE_VERSION ($withval) I'd imagine, for example, that someone will want to do -something or +something. So I'd just make this PG_VERSION=$PACKAGE_VERSION$withval Comments? +# Allow adding a custom string to PG_VERSION +PGAC_ARG_REQ(with, extra-version, [NAME], [extra version information], +[PG_VERSION=$PACKAGE_VERSION ($withval)], [PG_VERSION=$PACKAGE_VERSION]) This could be indented better. It was a bit confusing at first. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Tue, Nov 19, 2013 at 10:48 AM, Peter Eisentraut pete...@gmx.net wrote: I think this is a reasonable feature, and the implementation is OK, but I don't see why the format of the extra version information needs to be exactly PG_VERSION=$PACKAGE_VERSION ($withval) I'd imagine, for example, that someone will want to do -something or +something. So I'd just make this PG_VERSION=$PACKAGE_VERSION$withval Comments? It makes sense and brings more flexibility. So +1 for this modification. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] [PATCH] configure: allow adding a custom string to PG_VERSION
On Tue, Nov 5, 2013 at 4:29 PM, Oskari Saarenmaa o...@ohmu.fi wrote: This can be used to tag custom built packages with an extra version string such as the git describe id or distribution package release version. Could you attach a proper patch to your email and register it to the next commit fest? Typically here: https://commitfest.postgresql.org/action/commitfest_view?id=20 This idea is more adaptable than your latest proposition, so some other people might be interested to review it. At least I like this idea. Regards, -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers