From fd57b146564f3b15148c15aecb0db54d8b211773 Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Tue, 23 Dec 2014 13:14:18 +0100 Subject: [PATCH] update to 9.4.0 per release notes http://www.postgresql.org/docs/9.4/static/index.html --- .gitignore | 6 + postgresql-man.patch | 33 +++--- postgresql-upgrade-locale-spelling-2.patch | 40 ------- postgresql-upgrade-locale-spelling.patch | 129 --------------------- postgresql.spec | 62 +++++----- sources | 8 +- 6 files changed, 58 insertions(+), 220 deletions(-) delete mode 100644 postgresql-upgrade-locale-spelling-2.patch delete mode 100644 postgresql-upgrade-locale-spelling.patch diff --git a/.gitignore b/.gitignore index 29f1b53..393b256 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,9 @@ /postgresql-9.2.9.tar.bz2.sha256 /postgresql-9.3.5-US.pdf /postgresql-setup-1.0.0.tar.gz +/postgresql-9.3.5.tar.bz2 +/postgresql-9.3.5.tar.bz2.sha256 +/postgresql-9.4.0.tar.bz2 +/postgresql-9.4.0.tar.bz2.sha256 +/postgresql-9.4.0-US.pdf +/postgresql-setup-2.0.tar.gz diff --git a/postgresql-man.patch b/postgresql-man.patch index 94a34c6..8d3afe3 100644 --- a/postgresql-man.patch +++ b/postgresql-man.patch @@ -3,12 +3,10 @@ PostgreSQL ecpg/initdb manual page fixes This was generated based on automatic Red Hat manual page scan (private RHBZ#948933). -### ecpg ### - -diff -up postgresql-9.2.4/doc/src/sgml/man1/ecpg.1.broken postgresql-9.2.4/doc/src/sgml/man1/ecpg.1 ---- postgresql-9.2.4/doc/src/sgml/man1/ecpg.1.broken 2013-06-05 10:54:39.610443837 +0200 -+++ postgresql-9.2.4/doc/src/sgml/man1/ecpg.1 2013-06-05 10:59:24.115997253 +0200 -@@ -81,6 +81,11 @@ INFORMIX_SE\&. +diff -up ./doc/src/sgml/man1/ecpg.1.man948933 ./doc/src/sgml/man1/ecpg.1 +--- ./doc/src/sgml/man1/ecpg.1.man948933 2014-12-16 02:13:15.000000000 +0100 ++++ ./doc/src/sgml/man1/ecpg.1 2014-12-23 11:26:37.883644047 +0100 +@@ -80,6 +80,11 @@ INFORMIX_SE\&. Define a C preprocessor symbol\&. .RE .PP @@ -20,7 +18,7 @@ diff -up postgresql-9.2.4/doc/src/sgml/man1/ecpg.1.broken postgresql-9.2.4/doc/s \fB\-i\fR .RS 4 Parse system include files as well\&. -@@ -129,6 +134,11 @@ Allow question mark as placeholder for c +@@ -128,6 +133,11 @@ Allow question mark as placeholder for c .RE .RE .PP @@ -32,21 +30,20 @@ diff -up postgresql-9.2.4/doc/src/sgml/man1/ecpg.1.broken postgresql-9.2.4/doc/s \fB\-t\fR .RS 4 Turn on autocommit of transactions\&. In this mode, each SQL command is automatically committed unless it is inside an explicit transaction block\&. In the default mode, commands are committed only when - -### initdb ### - -diff -up postgresql-9.2.4/doc/src/sgml/man1/initdb.1.broken postgresql-9.2.4/doc/src/sgml/man1/initdb.1 ---- postgresql-9.2.4/doc/src/sgml/man1/initdb.1.broken 2013-06-06 10:26:48.405835762 +0200 -+++ postgresql-9.2.4/doc/src/sgml/man1/initdb.1 2013-06-06 10:29:46.084209958 +0200 -@@ -227,6 +227,11 @@ determines that an error prevented it fr +diff -up ./doc/src/sgml/man1/initdb.1.man948933 ./doc/src/sgml/man1/initdb.1 +--- ./doc/src/sgml/man1/initdb.1.man948933 2014-12-16 02:13:21.000000000 +0100 ++++ ./doc/src/sgml/man1/initdb.1 2014-12-23 11:26:37.883644047 +0100 +@@ -281,6 +281,13 @@ determines that an error prevented it fr .PP Other options: .PP -+\fB\-s\fR, \fB\-\-show\fR ++\fB\-s\fR ++.br ++\fB\-\-show\fR +.RS 4 +Print the internal settings, then exit\&. +.RE +.PP - \fB\-V\fR, \fB\-\-version\fR - .RS 4 - Print the + \fB\-V\fR + .br + \fB\-\-version\fR diff --git a/postgresql-upgrade-locale-spelling-2.patch b/postgresql-upgrade-locale-spelling-2.patch deleted file mode 100644 index 0e863b6..0000000 --- a/postgresql-upgrade-locale-spelling-2.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cd3e0071b8c9e082f5fe903a019d4e474be98e57 Mon Sep 17 00:00:00 2001 -From: Tom Lane -Date: Fri, 31 Jan 2014 02:03:30 -0500 -Subject: [PATCH] Allow unrecognized encoding names in locales, as long as - they're the same. - -The buildfarm says commit 58274728fb8e087049df67c0eee903d9743fdeda doesn't -work so well on Windows. This is because the encoding part of Windows -locale names can be just a code page number, eg "1252", which we don't -consider to be a valid encoding name. Add a check to accept encoding -parts that are case-insensitively string equal; this at least ensures -that the new code doesn't reject any cases that the old code allowed. ---- - contrib/pg_upgrade/check.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c -index 58c2d16..faeaff5 100644 ---- a/contrib/pg_upgrade/check.c -+++ b/contrib/pg_upgrade/check.c -@@ -447,8 +447,14 @@ equivalent_locale(const char *loca, const char *locb) - if (!chara || !charb) - return (pg_strcasecmp(loca, locb) == 0); - -- /* Compare the encoding parts. */ -- if (!equivalent_encoding(chara + 1, charb + 1)) -+ /* -+ * Compare the encoding parts. Windows tends to use code page numbers for -+ * the encoding part, which equivalent_encoding() won't like, so accept if -+ * the strings are case-insensitive equal; otherwise use -+ * equivalent_encoding() to compare. -+ */ -+ if (pg_strcasecmp(chara + 1, charb + 1) != 0 && -+ !equivalent_encoding(chara + 1, charb + 1)) - return false; - - /* --- -1.9.3 - diff --git a/postgresql-upgrade-locale-spelling.patch b/postgresql-upgrade-locale-spelling.patch deleted file mode 100644 index 239240b..0000000 --- a/postgresql-upgrade-locale-spelling.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 58274728fb8e087049df67c0eee903d9743fdeda Mon Sep 17 00:00:00 2001 -From: Tom Lane -Date: Thu, 30 Jan 2014 19:07:06 -0500 -Subject: [PATCH] Be forgiving of variant spellings of locale names in - pg_upgrade. - -Even though the server tries to canonicalize stored locale names, the -platform often doesn't cooperate, so it's entirely possible that one DB -thinks its locale is, say, "en_US.UTF-8" while the other has "en_US.utf8". -Rather than failing, we should try to allow this where it's clearly OK. - -There is already pretty robust encoding lookup in encnames.c, so make -use of that to compare the encoding parts of the names. The locale -identifier parts are just compared case-insensitively, which we were -already doing. The major problem known to exist in the field is variant -encoding-name spellings, so hopefully this will be Good Enough. If not, -we can try being even laxer. - -Pavel Raiskup, reviewed by Rushabh Lathia ---- - contrib/pg_upgrade/check.c | 66 +++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 63 insertions(+), 3 deletions(-) - -diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c -index 794d22c..58c2d16 100644 ---- a/contrib/pg_upgrade/check.c -+++ b/contrib/pg_upgrade/check.c -@@ -9,6 +9,7 @@ - - #include "postgres_fe.h" - -+#include "mb/pg_wchar.h" - #include "pg_upgrade.h" - - -@@ -16,6 +17,8 @@ static void set_locale_and_encoding(ClusterInfo *cluster); - static void check_new_cluster_is_empty(void); - static void check_locale_and_encoding(ControlData *oldctrl, - ControlData *newctrl); -+static bool equivalent_locale(const char *loca, const char *locb); -+static bool equivalent_encoding(const char *chara, const char *charb); - static void check_is_super_user(ClusterInfo *cluster); - static void check_for_prepared_transactions(ClusterInfo *cluster); - static void check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster); -@@ -412,21 +415,78 @@ check_locale_and_encoding(ControlData *oldctrl, - * They also often use inconsistent hyphenation, which we cannot fix, e.g. - * UTF-8 vs. UTF8, so at least we display the mismatching values. - */ -- if (pg_strcasecmp(oldctrl->lc_collate, newctrl->lc_collate) != 0) -+ if (!equivalent_locale(oldctrl->lc_collate, newctrl->lc_collate)) - pg_log(PG_FATAL, - "lc_collate cluster values do not match: old \"%s\", new \"%s\"\n", - oldctrl->lc_collate, newctrl->lc_collate); -- if (pg_strcasecmp(oldctrl->lc_ctype, newctrl->lc_ctype) != 0) -+ if (!equivalent_locale(oldctrl->lc_ctype, newctrl->lc_ctype)) - pg_log(PG_FATAL, - "lc_ctype cluster values do not match: old \"%s\", new \"%s\"\n", - oldctrl->lc_ctype, newctrl->lc_ctype); -- if (pg_strcasecmp(oldctrl->encoding, newctrl->encoding) != 0) -+ if (!equivalent_encoding(oldctrl->encoding, newctrl->encoding)) - pg_log(PG_FATAL, - "encoding cluster values do not match: old \"%s\", new \"%s\"\n", - oldctrl->encoding, newctrl->encoding); - } - - -+/* -+ * equivalent_locale() -+ * -+ * Best effort locale-name comparison. Return false if we are not 100% sure -+ * the locales are equivalent. -+ */ -+static bool -+equivalent_locale(const char *loca, const char *locb) -+{ -+ const char *chara = strrchr(loca, '.'); -+ const char *charb = strrchr(locb, '.'); -+ int lencmp; -+ -+ /* If they don't both contain an encoding part, just do strcasecmp(). */ -+ if (!chara || !charb) -+ return (pg_strcasecmp(loca, locb) == 0); -+ -+ /* Compare the encoding parts. */ -+ if (!equivalent_encoding(chara + 1, charb + 1)) -+ return false; -+ -+ /* -+ * OK, compare the locale identifiers (e.g. en_US part of en_US.utf8). -+ * -+ * It's tempting to ignore non-alphanumeric chars here, but for now it's -+ * not clear that that's necessary; just do case-insensitive comparison. -+ */ -+ lencmp = chara - loca; -+ if (lencmp != charb - locb) -+ return false; -+ -+ return (pg_strncasecmp(loca, locb, lencmp) == 0); -+} -+ -+/* -+ * equivalent_encoding() -+ * -+ * Best effort encoding-name comparison. Return true only if the encodings -+ * are valid server-side encodings and known equivalent. -+ * -+ * Because the lookup in pg_valid_server_encoding() does case folding and -+ * ignores non-alphanumeric characters, this will recognize many popular -+ * variant spellings as equivalent, eg "utf8" and "UTF-8" will match. -+ */ -+static bool -+equivalent_encoding(const char *chara, const char *charb) -+{ -+ int enca = pg_valid_server_encoding(chara); -+ int encb = pg_valid_server_encoding(charb); -+ -+ if (enca < 0 || encb < 0) -+ return false; -+ -+ return (enca == encb); -+} -+ -+ - static void - check_new_cluster_is_empty(void) - { --- -1.9.3 - diff --git a/postgresql.spec b/postgresql.spec index 8bee70d..8f5ee4e 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -65,9 +65,9 @@ Summary: PostgreSQL client programs Name: postgresql -%global majorversion 9.3 -Version: 9.3.5 -Release: 8%{?dist} +%global majorversion 9.4 +Version: 9.4.0 +Release: 1%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. @@ -82,10 +82,10 @@ Url: http://www.postgresql.org/ # in-place upgrade of an old database. In most cases it will not be critical # that this be kept up with the latest minor release of the previous series; # but update when bugs affecting pg_dump output are fixed. -%global prevversion 9.2.9 -%global prevmajorversion 9.2 +%global prevversion 9.3.5 +%global prevmajorversion 9.3 -%global setup_version 1.0.0 +%global setup_version 2.0 Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 # The PDF file is generated by generate-pdf.sh, which see for comments @@ -96,8 +96,6 @@ Source3: ftp://ftp.postgresql.org/pub/source/v%{prevversion}/postgresql-%{prevve Source4: Makefile.regress Source5: pg_config.h Source6: ecpg_config.h -Source7: initdb.sh -Source8: upgrade.sh Source9: postgresql.tmpfiles.d Source10: postgresql.pam Source11: postgresql-bashprofile @@ -119,8 +117,6 @@ Patch3: postgresql-perl-rpath.patch Patch4: postgresql-config-comment.patch Patch5: postgresql-var-run-socket.patch Patch6: postgresql-man.patch -Patch7: postgresql-upgrade-locale-spelling.patch -Patch8: postgresql-upgrade-locale-spelling-2.patch BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk help2man BuildRequires: perl(ExtUtils::Embed), perl-devel @@ -357,8 +353,6 @@ benchmarks. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 # We used to run autoconf here, but there's no longer any real need to, # since Postgres ships with a reasonably modern configure script. @@ -407,8 +401,10 @@ export POSTGRES_BIN=%{_bindir}/postgres \ PREVMAJORVERSION=%{prevmajorversion} \ PREVPGENGINE=%{_libdir}/pgsql/postgresql-%{prevmajorversion}/bin \ README_DIST=%{_pkgdocdir}/README.rpm-dist \ - PKGCONFIG_DIR=%{_sysconfdir}/postgresql -%configure + PKGCONFIG_DIR=%{_sysconfdir}/postgresql +%configure \ + --docdir=%{_pkgdocdir} + make %{?_smp_mflags} cd .. @@ -685,10 +681,6 @@ esac install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial cp -p src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial -install -d $RPM_BUILD_ROOT/usr/libexec/initscripts/legacy-actions/postgresql -install -m 755 %{SOURCE7} $RPM_BUILD_ROOT/usr/libexec/initscripts/legacy-actions/postgresql/initdb -install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/usr/libexec/initscripts/legacy-actions/postgresql/upgrade - %if %pam install -d $RPM_BUILD_ROOT/etc/pam.d install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/etc/pam.d/postgresql @@ -960,26 +952,28 @@ fi %{_datadir}/pgsql/extension/moddatetime* %{_datadir}/pgsql/extension/pageinspect* %{_datadir}/pgsql/extension/pg_buffercache* -%{_datadir}/pgsql/extension/pg_freespacemap* -%{_datadir}/pgsql/extension/pg_stat_statements* -%{_datadir}/pgsql/extension/pg_trgm* %{_datadir}/pgsql/extension/pgcrypto* +%{_datadir}/pgsql/extension/pg_freespacemap* +%{_datadir}/pgsql/extension/pg_prewarm* %{_datadir}/pgsql/extension/pgrowlocks* +%{_datadir}/pgsql/extension/pg_stat_statements* %{_datadir}/pgsql/extension/pgstattuple* +%{_datadir}/pgsql/extension/pg_trgm* %{_datadir}/pgsql/extension/postgres_fdw* %{_datadir}/pgsql/extension/refint* %{_datadir}/pgsql/extension/seg* %{_datadir}/pgsql/extension/tablefunc* %{_datadir}/pgsql/extension/tcn* %{_datadir}/pgsql/extension/test_parser* +%{_datadir}/pgsql/extension/test_shm_mq* %{_datadir}/pgsql/extension/timetravel* %{_datadir}/pgsql/extension/tsearch2* %{_datadir}/pgsql/extension/unaccent* -%{_libdir}/pgsql/_int.so +%{_datadir}/pgsql/extension/worker_spi* %{_libdir}/pgsql/adminpack.so %{_libdir}/pgsql/auth_delay.so -%{_libdir}/pgsql/autoinc.so %{_libdir}/pgsql/auto_explain.so +%{_libdir}/pgsql/autoinc.so %{_libdir}/pgsql/btree_gin.so %{_libdir}/pgsql/btree_gist.so %{_libdir}/pgsql/chkpass.so @@ -994,6 +988,7 @@ fi %{_libdir}/pgsql/fuzzystrmatch.so %{_libdir}/pgsql/hstore.so %{_libdir}/pgsql/insert_username.so +%{_libdir}/pgsql/_int.so %{_libdir}/pgsql/isn.so %{_libdir}/pgsql/lo.so %{_libdir}/pgsql/ltree.so @@ -1001,18 +996,20 @@ fi %{_libdir}/pgsql/pageinspect.so %{_libdir}/pgsql/passwordcheck.so %{_libdir}/pgsql/pg_buffercache.so -%{_libdir}/pgsql/pg_freespacemap.so -%{_libdir}/pgsql/pg_stat_statements.so -%{_libdir}/pgsql/pg_trgm.so %{_libdir}/pgsql/pgcrypto.so +%{_libdir}/pgsql/pg_freespacemap.so %{_libdir}/pgsql/pgrowlocks.so +%{_libdir}/pgsql/pg_stat_statements.so %{_libdir}/pgsql/pgstattuple.so +%{_libdir}/pgsql/pg_trgm.so %{_libdir}/pgsql/postgres_fdw.so %{_libdir}/pgsql/refint.so %{_libdir}/pgsql/seg.so %{_libdir}/pgsql/tablefunc.so %{_libdir}/pgsql/tcn.so +%{_libdir}/pgsql/test_decoding.so %{_libdir}/pgsql/test_parser.so +%{_libdir}/pgsql/test_shm_mq.so %{_libdir}/pgsql/timetravel.so %{_libdir}/pgsql/tsearch2.so %{_libdir}/pgsql/unaccent.so @@ -1043,11 +1040,12 @@ fi %{_bindir}/vacuumlo %{_mandir}/man1/oid2name.* %{_mandir}/man1/pg_archivecleanup.* +%{_mandir}/man1/pgbench.* +%{_mandir}/man1/pg_recvlogical.* %{_mandir}/man1/pg_standby.* %{_mandir}/man1/pg_test_fsync.* %{_mandir}/man1/pg_test_timing.* -%{_mandir}/man1/pg_xlogdump.1.gz -%{_mandir}/man1/pgbench.* +%{_mandir}/man1/pg_xlogdump.* %{_mandir}/man1/vacuumlo.* %{_mandir}/man3/dblink* %doc contrib/spi/*.example @@ -1072,10 +1070,11 @@ fi %{_bindir}/pg_controldata %{_bindir}/pg_ctl %{_bindir}/pg_receivexlog +%{_bindir}/pg_recvlogical %{_bindir}/pg_resetxlog %{_bindir}/postgres -%{_bindir}/postmaster %{_bindir}/postgresql-setup +%{_bindir}/postmaster %{_mandir}/man1/initdb.* %{_mandir}/man1/pg_basebackup.* %{_mandir}/man1/pg_controldata.* @@ -1093,6 +1092,7 @@ fi %{_datadir}/pgsql/timezonesets/ %{_datadir}/pgsql/tsearch_data/ %{_libdir}/pgsql/dict_snowball.so +%{_libdir}/pgsql/pg_prewarm.so %{_libdir}/pgsql/plpgsql.so %dir %{_datadir}/pgsql %dir %{_datadir}/pgsql/contrib @@ -1172,6 +1172,10 @@ fi %endif %changelog +* Tue Dec 23 2014 Jozef Mlich - 9.4.0-1 +- update to 9.4.0 per release notes + http://www.postgresql.org/docs/9.4/static/index.html + * Mon Nov 24 2014 Pavel Raiskup - 9.3.5-8 - print regression.diffs contents to stdout (#1118392) diff --git a/sources b/sources index c4d5161..6fee261 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ 5059857c7d7e6ad83b6d55893a121b59 postgresql-9.3.5.tar.bz2 60b858fb6c7e06bf05a9c5f4dc5a8932 postgresql-9.3.5.tar.bz2.sha256 -38b0937c86d537d5044c599273066cfc postgresql-9.2.9.tar.bz2 -08b4a99710e25d7004d058997cdb1ebc postgresql-9.2.9.tar.bz2.sha256 -5d8361190dd064a655b21f112daa91ec postgresql-9.3.5-US.pdf -2e601b008c98b991c38a8d7443b13e76 postgresql-setup-1.0.0.tar.gz +8cd6e33e1f8d4d2362c8c08bd0e8802b postgresql-9.4.0.tar.bz2 +79cca88e8a3932bfacda97253d893502 postgresql-9.4.0.tar.bz2.sha256 +c0d073b2c9d0ba587ba6f6634210ff5c postgresql-9.4.0-US.pdf +8323008e726a84d76c3153ed68357576 postgresql-setup-2.0.tar.gz