aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-11-04 22:23:15 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-11-04 23:29:17 +0100
commitd67ceb66a1ca9e1899071c9ef09fffba29fa0417 (patch)
treec0fb8f23864311c67c1ad04554a186609fe65bdb
parent26892ae1589a429eba33f402597fe1ad901ee3f9 (diff)
downloadaports-d67ceb66a1ca9e1899071c9ef09fffba29fa0417.tar.bz2
aports-d67ceb66a1ca9e1899071c9ef09fffba29fa0417.tar.xz
main/postgresql: upgrade to 10.0
-rw-r--r--main/postgresql/APKBUILD32
-rw-r--r--main/postgresql/disable-broken-tests.patch119
-rw-r--r--main/postgresql/initdb.patch16
3 files changed, 137 insertions, 30 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index bd300a17d8..052e840da0 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -2,8 +2,8 @@
# Contributor: G.J.R. Timmer <gjr.timmer@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql
-pkgver=9.6.5
-pkgrel=1
+pkgver=10.0
+pkgrel=0
pkgdesc="A sophisticated object-relational DBMS"
url="http://www.postgresql.org/"
arch="all"
@@ -25,6 +25,7 @@ source="https://ftp.postgresql.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2
initdb.patch
perl-rpath.patch
conf-unix_socket_directories.patch
+ disable-broken-tests.patch
$pkgname.initd
$pkgname.confd
pg-restore.initd
@@ -52,13 +53,6 @@ prepare() {
sed "s|@VERSION@|${pkgver%.*}|" "$srcdir"/$file > $file
done
- # XXX: Disable dblink and postgres_fdw tests. The tests fail due to
- # some linking issue, but there's no problem in runtime. I have no
- # clue what's wrong here.
- sed -Ei 's/^(REGRESS)/#\1/' \
- contrib/dblink/Makefile \
- contrib/postgres_fdw/Makefile
-
cp -al "$builddir" "$builddir"~py3
}
@@ -114,9 +108,7 @@ check() {
_run_tests src/test
_run_tests src/pl
-
- # Note: test_decoding fails when running in parallel.
- _run_tests contrib -j1
+ _run_tests contrib
}
package() {
@@ -165,16 +157,14 @@ client() {
mkdir -p "$subpkgdir"/usr/bin
mv clusterdb \
createdb \
- createlang \
createuser \
dropdb \
- droplang \
dropuser \
pg_basebackup \
pg_dump \
pg_dumpall \
pg_isready \
- pg_receivexlog \
+ pg_receivewal \
pg_recvlogical \
pg_restore \
psql \
@@ -206,9 +196,7 @@ pltcl() {
pkgdesc="PL/Tcl procedural language for PostgreSQL"
depends="pgtcl"
- _submv usr/bin/pltcl* \
- usr/lib/postgresql/pltcl.so \
- usr/share/postgresql/unknown.pltcl \
+ _submv usr/lib/postgresql/pltcl.so \
usr/share/postgresql/extension/pltcl*
install -m 644 "$srcdir"/pltcl_create_tables.sql \
@@ -279,7 +267,8 @@ _run_tests() {
local path="$1"; shift
msg "Running test suite at $path..."
- make -k -C "$path" $@ check MAX_CONNECTIONS=5 || {
+ # Note: some tests fail when running in parallel.
+ make -k -j 1 -C "$path" $@ check MAX_CONNECTIONS=5 || {
printf "\n%s\n\n" "Trying to find all regression.diffs files in build directory..." >&2
find "$path" -name regression.diffs | while read file; do
echo "=== test failure: $file ===" >&2
@@ -296,10 +285,11 @@ _submv() {
done
}
-sha512sums="ad35c27ea55b18005ea61b49d6994718df86519b3f99addd0ecb17ece1f1c34764eb5194f8961c45cfa75703d810baf54433f8538cfd43a70bd908e1e5878df9 postgresql-9.6.5.tar.bz2
-0b88eee78380ed6cf543c851ac1cea5fc50bb6ef1bb51e03694003f43d2bf4e117ff06657f958d0e9c00ace3b8a6bab6ed0bd017d23f80cfd203dab33da81d46 initdb.patch
+sha512sums="88295af13db77a85a604c925aa627d383fdac62c1185119bba87753ce4167a13aed0f055a7a1329b3051f8757c6ba7529baed00a564ef0cfbee685720f282678 postgresql-10.0.tar.bz2
+1f8e7dc58f5b0a12427cf2fd904ffa898a34f23f3332c8382b94e0d991c007289e7913a69e04498f3d93fc5701855796c207b4b1cc4a0b366f586050124d7fcc initdb.patch
5f9d8bb4957194069d01af8ab3abc6d4d83a7e7f8bd7ebe1caae5361d621a3e58f91b14b952958138a794e0a80bc154fbb7e3e78d211e2a95b9b7901335de854 perl-rpath.patch
8439a6fdfdea0a4867daeb8bc23d6c825f30c00d91d4c39f48653f5ee77341f23282ce03a77aad94b5369700f11d2cb28d5aee360e59138352a9ab331a9f9d0f conf-unix_socket_directories.patch
+1966b2a3971f56fbecd8daa45965236d487683e13300e5c000e595bbadbbe9d0e1301fbbfa034f452abe8a4e4a427781f772370b9ff392bb03fc11ee43c9dee7 disable-broken-tests.patch
224e80f9e62843fd248e625abdd0d9fe477729ff3f9a64fc5c86dd37bb7176d3504107fbed7ce578e3a1db7f60b8cf2abf5fe4862c81f76b6d026e29ca495cfc postgresql.initd
a6d9cba5c7270484b3a22083b2b37742faefb01b6643040050c92235840c601b2e206ebda32804937b729c6cf42c79a558b921900e52fc420df2a03b5f29e1f7 postgresql.confd
f5a1cba051e7d846c2d16703514601cb25729ed96b677c9bd0c199d64552120a8b14b238af01917fdb87106681e12dee6fff7447558155ba273e4f96be5e2892 pg-restore.initd
diff --git a/main/postgresql/disable-broken-tests.patch b/main/postgresql/disable-broken-tests.patch
new file mode 100644
index 0000000000..0bb5b03fa4
--- /dev/null
+++ b/main/postgresql/disable-broken-tests.patch
@@ -0,0 +1,119 @@
+These tests fail due to some really weird linking issue like:
+
+ ERROR: could not load library "<builddir>/tmp_install/usr/lib/postgresql/libpqwalreceiver.so": Error loading shared library libpq.so.5: No such file or directory (needed by <builddir>/tmp_install/usr/lib/postgresql/libpqwalreceiver.so)
+
+psql dynamically loads libpq and libpqwalreceiver libs using pg_dlopen()
+which is an alias for dlopen() on Linux. The above message comes from
+src/backend/utils/fmgr/dfmgr.c. The part "Error loading ..." is from
+pg_dlerror() which is alias for dlerror().
+
+LD_LIBRARY_PATH is set and passed correctly. However, the error
+disappeared when I've copied libpq.so* to /usr/lib...
+
+Also:
+
+ $ LD_LIBRARY_PATH=$(pwd) ldd postgresql/libpqwalreceiver.so
+ ldd (0x280d565e000)
+ libpq.so.5 => <builddir>/tmp_install/usr/lib/libpq.so.5 (0x280d520d000)
+ libc.musl-x86_64.so.1 => ldd (0x280d565e000)
+ libssl.so.43 => /lib/libssl.so.43 (0x280d4fc2000)
+ libcrypto.so.41 => /lib/libcrypto.so.41 (0x280d4c1c000)
+ libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x280d49d6000)
+ liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x280d47c9000)
+ libsasl2.so.3 => /usr/lib/libsasl2.so.3 (0x280d45b0000)
+ Error relocating postgresql/libpqwalreceiver.so: appendStringInfoChar: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: MyLatch: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: MemoryContextDelete: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: errstart: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: pg_atoi: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: TupleDescGetAttInMetadata: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: WalReceiverFunctions: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: WaitLatchOrSocket: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: MemoryContextReset: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: pfree: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: errmsg: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: tuplestore_puttuple: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: pchomp: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: appendStringInfoString: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: errfinish: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: pstrdup: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: palloc0: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: errdetail: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: ResetLatch: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: work_mem: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: AllocSetContextCreate: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: CurrentMemoryContext: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: tuplestore_begin_heap: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: BuildTupleFromCStrings: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: errcode: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: MyDatabaseId: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: GetDatabaseEncodingName: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: palloc: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: pg_lsn_in: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: ProcessInterrupts: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: elog_start: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: DirectFunctionCall1Coll: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: elog_finish: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: CreateTemplateTupleDesc: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: InterruptPending: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: TupleDescInitEntry: symbol not found
+ Error relocating postgresql/libpqwalreceiver.so: initStringInfo: symbol not found w
+
+These symbols are really not provided by libpq.
+
+I wasted one day trying to figure out what's going on here, but still
+have no idea. :(
+
+--- a/src/test/regress/parallel_schedule
++++ b/src/test/regress/parallel_schedule
+@@ -84,7 +84,7 @@
+ # ----------
+ # Another group of parallel tests
+ # ----------
+-test: brin gin gist spgist privileges init_privs security_label collate matview lock replica_identity rowsecurity object_address tablesample groupingsets drop_operator password
++test: brin gin gist spgist privileges init_privs security_label collate matview lock replica_identity rowsecurity tablesample groupingsets drop_operator password
+
+ # ----------
+ # Another group of parallel tests
+@@ -98,7 +98,7 @@
+ test: select_parallel
+
+ # no relation related tests can be put in this group
+-test: publication subscription
++test: publication
+
+ # ----------
+ # Another group of parallel tests
+--- a/src/test/modules/dummy_seclabel/Makefile
++++ b/src/test/modules/dummy_seclabel/Makefile
+@@ -6,7 +6,7 @@
+ EXTENSION = dummy_seclabel
+ DATA = dummy_seclabel--1.0.sql
+
+-REGRESS = dummy_seclabel
++#REGRESS = dummy_seclabel
+
+ ifdef USE_PGXS
+ PG_CONFIG = pg_config
+--- a/contrib/postgres_fdw/Makefile
++++ b/contrib/postgres_fdw/Makefile
+@@ -10,7 +10,7 @@
+ EXTENSION = postgres_fdw
+ DATA = postgres_fdw--1.0.sql
+
+-REGRESS = postgres_fdw
++#REGRESS = postgres_fdw
+
+ ifdef USE_PGXS
+ PG_CONFIG = pg_config
+--- a/contrib/dblink/Makefile
++++ b/contrib/dblink/Makefile
+@@ -10,7 +10,7 @@
+ dblink--unpackaged--1.0.sql
+ PGFILEDESC = "dblink - connect to other PostgreSQL databases"
+
+-REGRESS = paths dblink
++#REGRESS = paths dblink
+ REGRESS_OPTS = --dlpath=$(top_builddir)/src/test/regress
+ EXTRA_CLEAN = sql/paths.sql expected/paths.out
+
diff --git a/main/postgresql/initdb.patch b/main/postgresql/initdb.patch
index 8edf7db1e5..59a872a499 100644
--- a/main/postgresql/initdb.patch
+++ b/main/postgresql/initdb.patch
@@ -1,16 +1,14 @@
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
-index feeff9e..e6a4536 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
-@@ -3641,10 +3641,7 @@ main(int argc, char *argv[])
- strlcpy(bin_dir, argv[0], sizeof(bin_dir));
- get_parent_directory(bin_dir);
+@@ -3259,9 +3259,7 @@
+ /* translator: This is a placeholder in a shell command. */
+ appendPQExpBuffer(start_db_cmd, " -l %s start", _("logfile"));
- printf(_("\nSuccess. You can now start the database server using:\n\n"
-- " %s%s%spg_ctl%s -D %s%s%s -l logfile start\n\n"),
-- QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
-- QUOTE_PATH, pgdata_native, QUOTE_PATH);
+- " %s\n\n"),
+- start_db_cmd->data);
+ printf(_("\nSuccess.\n\n"));
- return 0;
- }
+ destroyPQExpBuffer(start_db_cmd);
+