Multiple postmaster + RPM + locale issues
Hi,
I have almost finished working on multiple rpm + postmaster issue today.
The spec file and patches in pgsqlrpms cvs work almost as expected and
does some preliminary work about multiple postmaster installation issue
(we can build the rpms and they are installed correctly).
I have a question about locale files. AFAICS, our configure script has
hardcoded localedir value:
# Note: share/locale is always the default, independent of $datadir
localedir='${prefix}/share/locale'
However, I think we need to install locale files of each major releases
to different directory. I can patch the line above in spec file; however
I'm not sure where to install those locale files.
The question is:
- Is it a good idea to add a new --localedir parameter to configure
script so that the localedir will be configurable?
- If not, where should I install locale specific files?
- ... or should I do something different?
Thanks.
Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Devrim GUNDUZ wrote:
However, I think we need to install locale files of each major
releases to different directory.
No, you should rename the locale files, like psql-8.1.po.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
Hi, Devrim,
Devrim GUNDUZ wrote:
I have almost finished working on multiple rpm + postmaster issue today.
The spec file and patches in pgsqlrpms cvs work almost as expected and
does some preliminary work about multiple postmaster installation issue
(we can build the rpms and they are installed correctly).
Did you look at how the debian guys handle this?
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
Am Freitag, 20. Oktober 2006 15:19 schrieb Markus Schaber:
Devrim GUNDUZ wrote:
I have almost finished working on multiple rpm + postmaster issue today.
The spec file and patches in pgsqlrpms cvs work almost as expected and
does some preliminary work about multiple postmaster installation issue
(we can build the rpms and they are installed correctly).Did you look at how the debian guys handle this?
pei@bell:~$ ls -1 /usr/share/locale/de/LC_MESSAGES/p*
/usr/share/locale/de/LC_MESSAGES/pg_controldata-8.1.mo
/usr/share/locale/de/LC_MESSAGES/pg_ctl-8.1.mo
/usr/share/locale/de/LC_MESSAGES/pg_dump-8.1.mo
/usr/share/locale/de/LC_MESSAGES/pg_resetxlog-8.1.mo
/usr/share/locale/de/LC_MESSAGES/pgscripts-8.1.mo
/usr/share/locale/de/LC_MESSAGES/pitchablespeed.mo
/usr/share/locale/de/LC_MESSAGES/pmount.mo
/usr/share/locale/de/LC_MESSAGES/popt.mo
/usr/share/locale/de/LC_MESSAGES/postgres-8.1.mo
/usr/share/locale/de/LC_MESSAGES/ppdtranslations.mo
/usr/share/locale/de/LC_MESSAGES/privacy.mo
/usr/share/locale/de/LC_MESSAGES/psmisc.mo
/usr/share/locale/de/LC_MESSAGES/psql-8.1.mo
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
Hi Markus,
On Fri, 2006-10-20 at 15:19 +0200, Markus Schaber wrote:
Did you look at how the debian guys handle this?
No, but I believe what Peter wrote two days before was a solution of
Debian guys.
Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Hi Peter,
On Fri, 2006-10-20 at 15:37 +0200, Peter Eisentraut wrote:
Did you look at how the debian guys handle this?
pei@bell:~$ ls -1 /usr/share/locale/de/LC_MESSAGES/p*
<snip>
Quick question: Could you please point me a way to change the names
of .mo files and make each PostgreSQL release see its own locale
directory?
Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Devrim GUNDUZ wrote:
Hi Peter,
On Fri, 2006-10-20 at 15:37 +0200, Peter Eisentraut wrote:
Did you look at how the debian guys handle this?
pei@bell:~$ ls -1 /usr/share/locale/de/LC_MESSAGES/p*
<snip>
Quick question: Could you please point me a way to change the names
of .mo files and make each PostgreSQL release see its own locale
directory?
The package files are here:
http://packages.debian.org/unstable/misc/postgresql-8.1
you can find the patch Debian applies following a link below (the
diff.gz), on which you see the method for doing this.
ISTM these parts of that patch should be applied to our code:
+--- postgresql-8.1beta3-old/src/bin/pg_controldata/pg_controldata.c 2005-10-03 02:28:41.000000000 +0200
++++ postgresql-8.1beta3/src/bin/pg_controldata/pg_controldata.c 2005-10-13 18:00:42.000000000 +0200
+@@ -73,7 +73,7 @@
+ char *strftime_fmt = "%c";
+ const char *progname;
+
+- set_pglocale_pgservice(argv[0], "pg_controldata");
++ set_pglocale_pgservice(argv[0], "pg_controldata-8.1");
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Hi Alvaro,
On Fri, 2006-10-20 at 10:53 -0300, Alvaro Herrera wrote:
The package files are here:
http://packages.debian.org/unstable/misc/postgresql-8.1
you can find the patch Debian applies following a link below (the
diff.gz), on which you see the method for doing this.
Thanks. Let me finish it this weekend.
Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Am Freitag, 20. Oktober 2006 15:53 schrieb Alvaro Herrera:
ISTM these parts of that patch should be applied to our code:
+--- postgresql-8.1beta3-old/src/bin/pg_controldata/pg_controldata.c 2005-10-03 02:28:41.000000000 +0200 ++++ postgresql-8.1beta3/src/bin/pg_controldata/pg_controldata.c 2005-10-13 18:00:42.000000000 +0200 +@@ -73,7 +73,7 @@ + char *strftime_fmt = "%c"; + const char *progname; + +- set_pglocale_pgservice(argv[0], "pg_controldata"); ++ set_pglocale_pgservice(argv[0], "pg_controldata-8.1");
Once the RPM crowd has figured out their needs, I'm all in favor of taking the
common pieces from the Debs and RPMs and turning them into built-in build
features.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
Alvaro Herrera <alvherre@commandprompt.com> writes:
ISTM these parts of that patch should be applied to our code:
+--- postgresql-8.1beta3-old/src/bin/pg_controldata/pg_controldata.c 2005-10-03 02:28:41.000000000 +0200 ++++ postgresql-8.1beta3/src/bin/pg_controldata/pg_controldata.c 2005-10-13 18:00:42.000000000 +0200 +@@ -73,7 +73,7 @@ + char *strftime_fmt = "%c"; + const char *progname; + +- set_pglocale_pgservice(argv[0], "pg_controldata"); ++ set_pglocale_pgservice(argv[0], "pg_controldata-8.1");
Egad. What an ugly, unmaintainable crock.
regards, tom lane
Tom Lane wrote:
Alvaro Herrera <alvherre@commandprompt.com> writes:
ISTM these parts of that patch should be applied to our code:
+--- postgresql-8.1beta3-old/src/bin/pg_controldata/pg_controldata.c 2005-10-03 02:28:41.000000000 +0200 ++++ postgresql-8.1beta3/src/bin/pg_controldata/pg_controldata.c 2005-10-13 18:00:42.000000000 +0200 +@@ -73,7 +73,7 @@ + char *strftime_fmt = "%c"; + const char *progname; + +- set_pglocale_pgservice(argv[0], "pg_controldata"); ++ set_pglocale_pgservice(argv[0], "pg_controldata-8.1");Egad. What an ugly, unmaintainable crock.
Well, we could certainly not use it in the same form, but with a macro,
making it more future-proof.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Hi,
On Fri, 2006-10-20 at 10:25 -0400, Tom Lane wrote:
Egad. What an ugly, unmaintainable crock.
I want to second this. I would not make this in RPM spec file.
What about changing
localedir='${prefix}/share/locale'
line (in configure) to
localedir='${prefix}/share/locale/pgsql/$PGMAJORVERSION'
or so?
Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Tom Lane wrote:
Egad. What an ugly, unmaintainable crock.
There is one major PostgreSQL release per year, so even the time
thinking about an alternative solution is longer than just taking the
existing solution.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
Devrim GUNDUZ wrote:
localedir='${prefix}/share/locale/pgsql/$PGMAJORVERSION'
It's probably better not to create nonstandard directories
below /usr/share/locale, because that's not your directory. If you
want to go with nonstandard paths, create one
in /usr/share/postgresql/.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/