Merge remote-tracking branch 'upstream/master' into openssl-1.1

This commit is contained in:
Robin Gloster
2019-08-21 14:25:13 +02:00
1739 changed files with 138818 additions and 193118 deletions
@@ -0,0 +1,12 @@
diff --git a/libmariadb/plugins/auth/CMakeLists.txt b/libmariadb/plugins/auth/CMakeLists.txt
index aa599418..7a51f73b 100644
--- a/libmariadb/plugins/auth/CMakeLists.txt
+++ b/libmariadb/plugins/auth/CMakeLists.txt
@@ -50,6 +50,7 @@ IF(WITH_SSL)
${REF10_SOURCES}
${CRYPT_SOURCE}
INCLUDES ${REF10_DIR}
+ LIBRARIES ${ED25519_LIBS}
COMPILE_OPTIONS -DMYSQL_CLIENT=1)
IF(MSVC)
# Silence conversion (integer truncantion) warnings from reference code
@@ -0,0 +1,21 @@
diff --git a/libmariadb/mariadb_config/mariadb_config.c.in b/libmariadb/mariadb_config/mariadb_config.c.in
index 703c9466..c6d3f1bc 100644
--- a/libmariadb/mariadb_config/mariadb_config.c.in
+++ b/libmariadb/mariadb_config/mariadb_config.c.in
@@ -5,13 +5,13 @@
static char *mariadb_progname;
-#define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
-#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb"
+#define INCLUDE "-I@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_INCLUDEDIR@/mysql"
+#define LIBS "-L@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_LIBDIR@/ -lmariadb"
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
#define CFLAGS INCLUDE
#define VERSION "@MARIADB_CLIENT_VERSION@"
#define CC_VERSION "@CPACK_PACKAGE_VERSION@"
-#define PLUGIN_DIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@"
+#define PLUGIN_DIR "@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_PLUGINDIR@"
#define SOCKET "@MARIADB_UNIX_ADDR@"
#define PORT "@MARIADB_PORT@"
#define TLS_LIBRARY_VERSION "@TLS_LIBRARY_VERSION@"
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ea7c1df..b0face0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,6 +176,10 @@ ELSE()
SET (SKIP_COMPONENTS "N-O-N-E")
ENDIF()
+IF (WITHOUT_CLIENT)
+ SET (SKIP_COMPONENTS "Client|ClientPlugins|ManPagesClient")
+ENDIF()
+
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
INCLUDE(check_compiler_flag)
+62 -40
View File
@@ -4,6 +4,7 @@
, fixDarwinDylibNames, cctools, CoreServices
, asio, buildEnv, check, scons
, less
, withoutClient ? false
}:
with stdenv.lib;
@@ -14,9 +15,9 @@ libExt = stdenv.hostPlatform.extensions.sharedLibrary;
mytopEnv = perl.withPackages (p: with p; [ DataDumper DBDmysql DBI TermReadKey ]);
mariadb = everything // {
inherit client; # libmysqlclient.so in .out, necessary headers in .dev and utils in .bin
server = everything; # a full single-output build, including everything in `client` again
mariadb = server // {
inherit client; # MariaDB Client
server = server; # MariaDB Server
inherit connector-c; # libmysqlclient.so
inherit galera;
};
@@ -27,14 +28,14 @@ galeraLibs = buildEnv {
};
common = rec { # attributes common to both builds
version = "10.3.15";
version = "10.3.17";
src = fetchurl {
urls = [
"https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz"
"https://downloads.mariadb.com/MariaDB/mariadb-${version}/source/mariadb-${version}.tar.gz"
];
sha256 = "0s399nxk2z8fgdr527p64y74zwjc3gpv7psf1n2r6ksl9njr3wr7";
sha256 = "15vh15az16932q42y9dxpzwxldmh0x4hvzrar3f8kblsqm7ym890";
name = "mariadb-${version}.tar.gz";
};
@@ -42,19 +43,18 @@ common = rec { # attributes common to both builds
buildInputs = [
ncurses openssl zlib pcre jemalloc libiconv
] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd libkrb5 ]
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
] ++ optionals stdenv.isLinux [ libaio systemd libkrb5 ]
++ optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
prePatch = ''
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
'';
patches = [ ./cmake-includedir.patch ]
++ optionals stdenv.isDarwin [
# Derived from "Fixed c++11 narrowing error"
# https://github.com/MariaDB/server/commit/a0dfefb0f8a47145e599a5f1b0dc576fa7634b92
./fix-c++11-narrowing-error.patch
];
patches = [
./cmake-includedir.patch
./cmake-libmariadb-includedir.patch
./cmake-fix-crypt-libs.patch
];
cmakeFlags = [
"-DBUILD_CONFIG=mysql_release"
@@ -68,6 +68,8 @@ common = rec { # attributes common to both builds
"-DINSTALL_DOCDIR=share/doc/mysql"
"-DINSTALL_DOCREADMEDIR=share/doc/mysql"
"-DINSTALL_INCLUDEDIR=include/mysql"
"-DINSTALL_LIBDIR=lib/mysql"
"-DINSTALL_PLUGINDIR=lib/mysql/plugin"
"-DINSTALL_INFODIR=share/mysql/docs"
"-DINSTALL_MANDIR=share/man"
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
@@ -80,20 +82,30 @@ common = rec { # attributes common to both builds
"-DWITH_SSL=system"
"-DWITH_PCRE=system"
"-DWITH_SAFEMALLOC=OFF"
"-DWITH_UNIT_TESTS=OFF"
"-DEMBEDDED_LIBRARY=OFF"
] ++ optional stdenv.isDarwin [
] ++ optionals stdenv.isDarwin [
# On Darwin without sandbox, CMake will find the system java and attempt to build with java support, but
# then it will fail during the actual build. Let's just disable the flag explicitly until someone decides
# to pass in java explicitly.
"-DCONNECT_WITH_JDBC=OFF"
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
] ++ optional stdenv.hostPlatform.isMusl [
] ++ optionals stdenv.hostPlatform.isMusl [
"-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
];
postInstall = ''
rm "$out"/lib/mysql/plugin/daemon_example.ini
mkdir -p "$dev"/bin && mv "$out"/bin/{mariadb_config,mysql_config} "$dev"/bin
mkdir -p "$dev"/lib/mysql && mv "$out"/lib/mysql/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib/mysql
mkdir -p "$dev"/lib/mysql/plugin && mv "$out"/lib/mysql/plugin/{caching_sha2_password.so,dialog.so,mysql_clear_password.so,sha256_password.so} "$dev"/lib/mysql/plugin
'';
enableParallelBuilding = true;
passthru.mysqlVersion = "5.7";
meta = with stdenv.lib; {
meta = {
description = "An enhanced, drop-in replacement for MySQL";
homepage = https://mariadb.org/;
license = licenses.gpl2;
@@ -103,36 +115,40 @@ common = rec { # attributes common to both builds
};
client = stdenv.mkDerivation (common // {
name = "mariadb-client-${common.version}";
pname = "mariadb-client";
outputs = [ "out" "dev" "man" ];
propagatedBuildInputs = [ openssl zlib ]; # required from mariadb.pc
patches = [ ./cmake-plugin-includedir.patch ];
patches = common.patches ++ [
./cmake-plugin-includedir.patch
];
cmakeFlags = common.cmakeFlags ++ [
"-DWITHOUT_SERVER=ON"
"-DWITH_WSREP=OFF"
"-DINSTALL_MYSQLSHAREDIR=share/mysql-client"
];
postInstall = ''
rm -r "$out"/share/mysql
rm -r "$out"/share/doc
rm "$out"/bin/{msql2mysql,mysql_plugin,mytop,wsrep_sst_rsync_wan,mysql_config,mariadb_config}
rm "$out"/lib/plugin/{daemon_example.ini,dialog.so,mysql_clear_password.so,sha256_password.so}
libmysqlclient_path=$(readlink -f $out/lib/libmysqlclient${libExt})
rm "$out"/lib/{libmariadb${libExt},libmysqlclient${libExt},libmysqlclient_r${libExt}}
mv "$libmysqlclient_path" "$out"/lib/libmysqlclient${libExt}
ln -sv libmysqlclient${libExt} "$out"/lib/libmysqlclient_r${libExt}
mkdir -p "$dev"/lib && mv "$out"/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib
preConfigure = ''
cmakeFlags="$cmakeFlags \
-DCMAKE_INSTALL_PREFIX_DEV=$dev"
'';
enableParallelBuilding = true; # the client should be OK
postInstall = common.postInstall + ''
rm -r "$out"/share/doc
rm "$out"/bin/{mysqltest,mytop,wsrep_sst_rsync_wan}
libmysqlclient_path=$(readlink -f $out/lib/mysql/libmysqlclient${libExt})
rm "$out"/lib/mysql/{libmariadb${libExt},libmysqlclient${libExt},libmysqlclient_r${libExt}}
mv "$libmysqlclient_path" "$out"/lib/mysql/libmysqlclient${libExt}
ln -sv libmysqlclient${libExt} "$out"/lib/mysql/libmysqlclient_r${libExt}
'';
});
everything = stdenv.mkDerivation (common // {
name = "mariadb-${common.version}";
server = stdenv.mkDerivation (common // {
pname = "mariadb-server";
outputs = [ "out" "dev" "man" ];
@@ -144,6 +160,10 @@ everything = stdenv.mkDerivation (common // {
] ++ optional (stdenv.isLinux && !stdenv.isAarch32) numactl
++ optional (!stdenv.isDarwin) mytopEnv;
patches = common.patches ++ [
./cmake-without-client.patch
];
cmakeFlags = common.cmakeFlags ++ [
"-DMYSQL_DATADIR=/var/lib/mysql"
"-DINSTALL_PLUGINDIR=lib/mysql/plugin"
@@ -156,6 +176,8 @@ everything = stdenv.mkDerivation (common // {
"-DWITH_INNODB_DISALLOW_WRITES=ON"
"-DWITHOUT_EXAMPLE=1"
"-DWITHOUT_FEDERATED=1"
] ++ stdenv.lib.optionals withoutClient [
"-DWITHOUT_CLIENT=ON"
] ++ stdenv.lib.optionals stdenv.isDarwin [
"-DWITHOUT_OQGRAPH=1"
"-DWITHOUT_TOKUDB=1"
@@ -163,27 +185,27 @@ everything = stdenv.mkDerivation (common // {
preConfigure = ''
cmakeFlags="$cmakeFlags \
-DCMAKE_INSTALL_PREFIX_DEV=$dev
-DINSTALL_SHAREDIR=$dev/share/mysql
-DINSTALL_SUPPORTFILESDIR=$dev/share/mysql"
'' + optionalString (!stdenv.isDarwin) ''
patchShebangs scripts/mytop.sh
'';
postInstall = ''
postInstall = common.postInstall + ''
chmod +x "$out"/bin/wsrep_sst_common
rm "$out"/bin/mysql_client_test
rm -r "$out"/data # Don't need testing data
rm "$out"/bin/{mysql_find_rows,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck}
rm "$out"/bin/{mysqldump,mysqlhotcopy,mysqlimport,mysqlshow,mysqlslap,mysqltest}
rm "$out"/lib/mysql/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
'' + optionalString withoutClient ''
${ # We don't build with GSSAPI on Darwin
optionalString (! stdenv.isDarwin) ''
optionalString (!stdenv.isDarwin) ''
rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
''
}
rm "$out"/lib/mysql/plugin/{client_ed25519.so,daemon_example.ini}
rm "$out"/lib/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
mkdir -p "$dev"/lib && mv "$out"/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib
'' + optionalString (! stdenv.isDarwin) ''
rm "$out"/lib/mysql/plugin/client_ed25519.so
'' + optionalString (!stdenv.isDarwin) ''
sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
'';
@@ -1,13 +0,0 @@
diff --git a/sql/table.cc b/sql/table.cc
index e46af771507..9bef21a1da2 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -8814,7 +8814,7 @@ bool TR_table::update(ulonglong start_id, ulonglong end_id)
store(FLD_BEGIN_TS, thd->transaction_time());
thd->set_time();
- timeval end_time= {thd->query_start(), long(thd->query_start_sec_part())};
+ timeval end_time= {thd->query_start(), int(thd->query_start_sec_part())};
store(FLD_TRX_ID, start_id);
store(FLD_COMMIT_ID, end_id);
store(FLD_COMMIT_TS, end_time);
+7 -9
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, bison
{ stdenv, fetchurl, cmake, bison, pkgconfig
, boost, libedit, libevent, lz4, ncurses, openssl, protobuf, readline, zlib, perl
, cctools, CoreServices, developer_cmds }:
@@ -6,12 +6,12 @@
let
self = stdenv.mkDerivation rec {
name = "mysql-${version}";
version = "5.7.25";
pname = "mysql";
version = "5.7.27";
src = fetchurl {
url = "mirror://mysql/MySQL-5.7/${name}.tar.gz";
sha256 = "0gvjcdnba7nf2dx3fbqk1qyg49zclfvaihb78l8h6qc08di1qxak";
url = "mirror://mysql/MySQL-5.7/${pname}-${version}.tar.gz";
sha256 = "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq";
};
preConfigure = stdenv.lib.optional stdenv.isDarwin ''
@@ -19,13 +19,11 @@ self = stdenv.mkDerivation rec {
export PATH=$PATH:$TMPDIR
'';
nativeBuildInputs = [ cmake bison ];
nativeBuildInputs = [ cmake bison pkgconfig ];
buildInputs = [ boost libedit libevent lz4 ncurses openssl protobuf readline zlib ]
++ stdenv.lib.optionals stdenv.isDarwin [ perl cctools CoreServices developer_cmds ];
enableParallelBuilding = true;
outputs = [ "out" "static" ];
cmakeFlags = [
@@ -76,7 +74,7 @@ self = stdenv.mkDerivation rec {
};
meta = with stdenv.lib; {
homepage = https://www.mysql.com/;
homepage = "https://www.mysql.com/";
description = "The world's most popular open source database";
platforms = platforms.unix;
license = with licenses; [
+73
View File
@@ -0,0 +1,73 @@
{ lib, stdenv, fetchurl, bison, cmake, pkgconfig
, boost, icu, libedit, libevent, lz4, ncurses, openssl, protobuf, re2, readline, zlib
, numactl, perl, cctools, CoreServices, developer_cmds
}:
let
self = stdenv.mkDerivation rec {
name = "mysql-8.0.17";
src = fetchurl {
url = "https://dev.mysql.com/get/Downloads/MySQL-${self.mysqlVersion}/${name}.tar.gz";
sha256 = "1mjrlxn8vigi69r0r674j2dibdnkaar01ji5965gsyx7k60z7qy6";
};
patches = [
./abi-check.patch
./libutils.patch
];
nativeBuildInputs = [ bison cmake pkgconfig ];
buildInputs = [
boost icu libedit libevent lz4 ncurses openssl protobuf re2 readline zlib
] ++ lib.optionals stdenv.isLinux [
numactl
] ++ lib.optionals stdenv.isDarwin [
cctools CoreServices developer_cmds
];
outputs = [ "out" "static" ];
cmakeFlags = [
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12" # For std::shared_timed_mutex.
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # To run libmysql/libmysql_api_test during build.
"-DFORCE_UNSUPPORTED_COMPILER=1" # To configure on Darwin.
"-DWITH_ROUTER=OFF" # It may be packaged separately.
"-DWITH_SYSTEM_LIBS=ON"
"-DWITH_UNIT_TESTS=OFF"
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
"-DMYSQL_DATADIR=/var/lib/mysql"
"-DINSTALL_INFODIR=share/mysql/docs"
"-DINSTALL_MANDIR=share/man"
"-DINSTALL_PLUGINDIR=lib/mysql/plugin"
"-DINSTALL_INCLUDEDIR=include/mysql"
"-DINSTALL_DOCREADMEDIR=share/mysql"
"-DINSTALL_SUPPORTFILESDIR=share/mysql"
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
"-DINSTALL_MYSQLTESTDIR="
"-DINSTALL_DOCDIR=share/mysql/docs"
"-DINSTALL_SHAREDIR=share/mysql"
];
postInstall = ''
moveToOutput "lib/*.a" $static
so=${stdenv.hostPlatform.extensions.sharedLibrary}
ln -s libmysqlclient$so $out/lib/libmysqlclient_r$so
'';
passthru = {
client = self;
connector-c = self;
server = self;
mysqlVersion = "8.0";
};
meta = with lib; {
homepage = "https://www.mysql.com/";
description = "The world's most popular open source database";
license = licenses.gpl2;
maintainers = with maintainers; [ orivej ];
platforms = platforms.unix;
};
}; in self
+18
View File
@@ -0,0 +1,18 @@
MySQL ABI check assumes that with -nostdinc any standard #include terminates
preprocessing, but we do not provide that:
https://github.com/NixOS/nixpkgs/issues/44530
"#error" does not terminate preprocessing, so we #include a non-existent file instead.
--- a/cmake/do_abi_check.cmake
+++ b/cmake/do_abi_check.cmake
@@ -68,1 +68,1 @@ FOREACH(file ${ABI_HEADERS})
- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
+ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include/nostdinc -I${SOURCE_DIR}/include
@@ -74,1 +74,1 @@ FOREACH(file ${ABI_HEADERS})
- COMMAND sed -e "/^# /d"
+ COMMAND sed -e "/^# /d" -e "/^#include <-nostdinc>$/d"
--- /dev/null
+++ b/include/nostdinc/stdint.h
@@ -0,0 +1,1 @@
+#include <-nostdinc>
+5
View File
@@ -0,0 +1,5 @@
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -345 +345 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
- COMMAND /usr/bin/libtool -static -o $<TARGET_FILE:${TARGET}>
+ COMMAND libtool -static -o $<TARGET_FILE:${TARGET}>
+3 -3
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, openssl, libevent }:
{ stdenv, fetchurl, openssl, libevent, c-ares, pkg-config }:
stdenv.mkDerivation rec {
name = "pgbouncer-${version}";
@@ -9,12 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "1m8vsxyna5grs5p0vnxf3fxxnkk9aqjf3qmr2bbkpkhlzr11986q";
};
buildInputs = [ libevent openssl ];
buildInputs = [ libevent openssl c-ares pkg-config ];
meta = with stdenv.lib; {
homepage = https://pgbouncer.github.io;
description = "Lightweight connection pooler for PostgreSQL";
license = licenses.isc;
platforms = platforms.linux;
platforms = platforms.all;
};
}
+5 -3
View File
@@ -1,15 +1,17 @@
{ stdenv, fetchurl, postgresql, openssl, pam ? null, libmemcached ? null }:
stdenv.mkDerivation rec {
name = "pgpool-II-3.4.14";
pname = "pgpool-II";
version = "4.0.6";
name = "${pname}-${version}";
src = fetchurl {
name = "${name}.tar.gz";
url = "http://www.pgpool.net/download.php?f=${name}.tar.gz";
sha256 = "1paak83f4lv48xckmf2znryrvhmdz86w4v97mcw2gxm50hcl74sw";
sha256 = "0blmbqczyrgzykby2z3xzmhzd8kgij9izxv50n5cjn5azf7dn8g5";
};
patches = [ ./pgpool-II-3.4.14-glibc-2.26.patch ];
patches = [ ./pgpool.patch ];
buildInputs = [ postgresql openssl pam libmemcached ];
@@ -1,12 +0,0 @@
diff --git a/src/watchdog/wd_lifecheck.c b/src/watchdog/wd_lifecheck.c
index 1e72307..5cf68a3 100644
--- a/src/watchdog/wd_lifecheck.c
+++ b/src/watchdog/wd_lifecheck.c
@@ -26,6 +26,7 @@
#include <ctype.h>
#include <time.h>
#include <string.h>
+#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
+23
View File
@@ -0,0 +1,23 @@
diff --git a/src/main/main.c b/src/main/main.c
index eec3c3e4..4169112b 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -337,10 +337,14 @@ main(int argc, char **argv)
char dirnamebuf[POOLMAXPATHLEN + 1];
char *dirp;
- strlcpy(dirnamebuf, conf_file, sizeof(dirnamebuf));
- dirp = dirname(dirnamebuf);
- snprintf(pool_passwd, sizeof(pool_passwd), "%s/%s",
- dirp, pool_config->pool_passwd);
+ if (pool_config->pool_passwd[0] != '/') {
+ strlcpy(dirnamebuf, conf_file, sizeof(dirnamebuf));
+ dirp = dirname(dirnamebuf);
+ snprintf(pool_passwd, sizeof(pool_passwd), "%s/%s",
+ dirp, pool_config->pool_passwd);
+ } else
+ strlcpy(pool_passwd, pool_config->pool_passwd,
+ sizeof(pool_passwd));
pool_init_pool_passwd(pool_passwd, POOL_PASSWD_R);
}
+11 -11
View File
@@ -134,7 +134,7 @@ let
homepage = https://www.postgresql.org;
description = "A powerful, open source object-relational database system";
license = licenses.postgresql;
maintainers = with maintainers; [ ocharles thoughtpolice danbst ];
maintainers = with maintainers; [ ocharles thoughtpolice danbst globin ];
platforms = platforms.unix;
knownVulnerabilities = optional (!atLeast "9.4")
"PostgreSQL versions older than 9.4 are not maintained anymore!";
@@ -169,41 +169,41 @@ let
in self: {
postgresql_9_4 = self.callPackage generic {
version = "9.4.23";
version = "9.4.24";
psqlSchema = "9.4";
sha256 = "16qx4gfq7i2nnxm0i3zxpb3z1mmzx05a3fsh95414ay8n049q00d";
sha256 = "0acl1wmah3r1a0qjjmpc256glccrjnzq4pkwklx4d9s6vmkks9aj";
this = self.postgresql_9_4;
inherit self;
};
postgresql_9_5 = self.callPackage generic {
version = "9.5.18";
version = "9.5.19";
psqlSchema = "9.5";
sha256 = "1pgkz794wmp4f40843sbin49k5lgl59jvl6nazvdbb6mgr441jfz";
sha256 = "1cqvbsyfs9048wbvdv0vhhaksjyjqv2vvh6ij4vqmjibc4kal34n";
this = self.postgresql_9_5;
inherit self;
};
postgresql_9_6 = self.callPackage generic {
version = "9.6.14";
version = "9.6.15";
psqlSchema = "9.6";
sha256 = "08hsqczy1ixkjyf2vr3s9x69agfz9yr8lh31fir4z0dfr5jw421z";
sha256 = "02hp69h2p02asfblkaahblzdz2zmawd2r11h6237y5j7yadgxn9w";
this = self.postgresql_9_6;
inherit self;
};
postgresql_10 = self.callPackage generic {
version = "10.9";
version = "10.10";
psqlSchema = "10.0"; # should be 10, but changing it is invasive
sha256 = "0m0gbf7nwgag6a1z5f9xszwzgf2xhx0ncakyxwxlzs87n1zk32wm";
sha256 = "0lzj46dwd9cw94gnqm36bxd7jlhfdyqjrfzr3c4xd3prfn2rnkxd";
this = self.postgresql_10;
inherit self;
};
postgresql_11 = self.callPackage generic {
version = "11.4";
version = "11.5";
psqlSchema = "11.1"; # should be 11, but changing it is invasive
sha256 = "12ycjlqncijgmd5z078ybwda8ilas96lc7nxxmdq140mzpgjv002";
sha256 = "106ikalvrilihlvhq7xj7snq98hgbgq6qsgjrd252wgw1c327pvz";
this = self.postgresql_11;
inherit self;
};
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
};
installPhase = ''
mkdir -p $out/{lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension
@@ -1,20 +1,17 @@
{ stdenv, fetchFromGitHub, postgresql, openssl }:
{ stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
if stdenv.lib.versionOlder postgresql.version "10"
then throw "pg_auto_failover not supported for PostgreSQL ${postgresql.version}"
else
stdenv.mkDerivation rec {
pname = "pg_auto_failover";
version = "1.0.2";
version = "1.0.3";
src = fetchFromGitHub {
owner = "citusdata";
repo = pname;
rev = "v${version}";
sha256 = "1296zk143y9fvmcg2hjbrjdjfhi5rrd0clh16vblkghcvxrzfyvy";
sha256 = "0mggf5h6gh2mck75dmz5w63gi7d10pqs58fdp2jdpv3am75picll";
};
buildInputs = [ postgresql openssl ];
buildInputs = [ postgresql openssl zlib readline ];
installPhase = ''
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
@@ -29,5 +26,6 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.marsam ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
broken = versionOlder postgresql.version "10";
};
}
+1 -1
View File
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
mkdir -p $out/{lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension
+1 -1
View File
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
};
installPhase = ''
mkdir -p $out/{lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension
+1 -1
View File
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
};
installPhase = ''
mkdir -p $out/{lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension
@@ -14,8 +14,7 @@ stdenv.mkDerivation rec {
};
installPhase = ''
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
mkdir -p $out/{lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp src/*.so $out/lib
cp updates/* $out/share/postgresql/extension
+1 -1
View File
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
};
installPhase = ''
mkdir -p $out/{lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension
@@ -1,8 +1,5 @@
{ stdenv, fetchFromGitHub, postgresql, zeromq, openssl }:
if stdenv.lib.versionOlder postgresql.version "10"
then throw "PipelineDB not supported for PostgreSQL ${postgresql.version}"
else
stdenv.mkDerivation rec {
pname = "pipelinedb";
version = "1.0.0-13";
@@ -35,5 +32,6 @@ stdenv.mkDerivation rec {
license = licenses.asl20;
platforms = postgresql.meta.platforms;
maintainers = [ maintainers.marsam ];
broken = versionOlder postgresql.version "10";
};
}
+11 -5
View File
@@ -10,6 +10,7 @@
, pkgconfig
, file
, protobufc
, libiconv
}:
stdenv.mkDerivation rec {
name = "postgis-${version}";
@@ -22,7 +23,8 @@ stdenv.mkDerivation rec {
sha256 = "0pnva72f2w4jcgnl1y7nw5rdly4ipx3hji4c9yc9s0hna1n2ijxn";
};
buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ];
buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ]
++ stdenv.lib.optional stdenv.isDarwin libiconv;
nativeBuildInputs = [ perl pkgconfig ];
dontDisableStatic = true;
@@ -43,14 +45,18 @@ stdenv.mkDerivation rec {
sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
" \
"raster/scripts/python/Makefile";
'';
preInstall = ''
mkdir -p $out/bin
# postgis' build system assumes it is being installed to the same place as postgresql, and looks
# for the postgres binary relative to $PREFIX. We gently support this system using an illusion.
ln -s ${postgresql}/bin/postgres $out/bin/postgres
'';
# create aliases for all commands adding version information
postInstall = ''
# Teardown the illusory postgres used for building; see postConfigure.
rm $out/bin/postgres
for prog in $out/bin/*; do # */
ln -s $prog $prog-${version}
done
@@ -64,6 +70,6 @@ stdenv.mkDerivation rec {
homepage = https://postgis.net/;
license = licenses.gpl2;
maintainers = [ maintainers.marcweber ];
platforms = platforms.linux;
inherit (postgresql.meta) platforms;
};
}
@@ -25,5 +25,6 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.steve-chavez ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
broken = versionAtLeast postgresql.version "11.0";
};
}
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
};
installPhase = ''
mkdir -p $out/{bin,lib,share/extension}
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension