package/timescaledb: new package
cover package/timescaledb: new package
This patch adds timescaledb v1.7.4:
TimescaleDB is an open-source database designed to make SQL scalable for time-series data. It is engineered up from PostgreSQL and packaged as a PostgreSQL extension, providing automatic partitioning across time and space (partitioning key), as well as full SQL support.
Maxim Kochetkov (2):
package/postgresql: add configure and includedir-server output to
pg_config
package/timescaledb: new package
package/Config.in | 1 + package/postgresql/pg_config | 8 +++++++- package/postgresql/postgresql.mk | 1 + package/timescaledb/Config.in | 11 +++++++++++ package/timescaledb/timescaledb.hash | 3 +++ package/timescaledb/timescaledb.mk | 22 ++++++++++++++++++++++ 6 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 package/timescaledb/Config.in create mode 100644 package/timescaledb/timescaledb.hash create mode 100644 package/timescaledb/timescaledb.mk
Signature · 1 line
2.27.0
PATCH 1/2 package/postgresql: add configure and includedir-server output to pg_config
Some external packages call pg_config to determine the installed PostgreSQL version. Add this output to Buildroots own pg_config, so these packages correctly compile.
--- package/postgresql/pg_config | 8 +++++++- package/postgresql/postgresql.mk | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)
package/postgresql/pg_config +7 -1
@@ -11,12 +11,18 @@ case "$1" in --includedir) echo "$prefix/include" ;; + --includedir-server) + echo "$prefix/include/postgresql/server" + ;; --libdir) echo "$prefix/lib" ;; --version) echo "PostgreSQL @POSTGRESQL_VERSION@" ;; + --configure) + echo "@POSTGRESQL_CONF_OPTIONS@" + ;; *) - echo "Usage: $0 {--includedir|--libdir|--version}" + echo "Usage: $0 {--includedir|--includedir-server|--libdir|--version|--configure}" esac
package/postgresql/postgresql.mk +1 -0
@@ -115,6 +115,7 @@ POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG $(INSTALL) -m 0755 -D package/postgresql/pg_config \ $(STAGING_DIR)/usr/bin/pg_config + $(SED) "s|@POSTGRESQL_CONF_OPTIONS@|$(POSTGRESQL_CONF_OPTS)|g" $(STAGING_DIR)/usr/bin/pg_config $(SED) "s|@POSTGRESQL_VERSION@|$(POSTGRESQL_VERSION)|g" $(STAGING_DIR)/usr/bin/pg_config endef
Signature · 1 line
2.27.0
Thomas Petazzoni
AppliedPATCH 1/2 package/postgresql: add configure and includedir-server output to pg_config
Quoted 9 lines · On Mon, 5 Oct 2020 13:19:50 +0300 Maxim Kochetkov <[email protected]> wrote:
Some external packages call
pg_configto determine the installed PostgreSQL version. Add this output to Buildroots ownpg_config, so these packages correctly compile.Signed-off-by Maxim Kochetkov <[email protected]>--- package/postgresql/pg_config | 8 +++++++- package/postgresql/postgresql.mk | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 package/postgresql: add configure and includedir-server output to pg_config
In reply to Maxim KochetkovQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Maxim" == Maxim Kochetkov <[email protected]> writes:
Some external packages call
pg_configto determine the installed PostgreSQL version. Add this output to Buildroots ownpg_config, so these packages correctly compile.Signed-off-by Maxim Kochetkov <[email protected]>
Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 package/timescaledb: new package
In reply to Maxim KochetkovTimescaleDB is an open-source database designed to make SQL scalable for time-series data. It is engineered up from PostgreSQL and packaged as a PostgreSQL extension, providing automatic partitioning across time and space (partitioning key), as well as full SQL support.
--- package/Config.in | 1 + package/timescaledb/Config.in | 11 +++++++++++ package/timescaledb/timescaledb.hash | 3 +++ package/timescaledb/timescaledb.mk | 22 ++++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 package/timescaledb/Config.in create mode 100644 package/timescaledb/timescaledb.hash create mode 100644 package/timescaledb/timescaledb.mk
package/Config.in +1 -0
@@ -1379,6 +1379,7 @@ menu "Database" source "package/mongodb/Config.in" source "package/mysql/Config.in" source "package/postgresql/Config.in" + source "package/timescaledb/Config.in" source "package/redis/Config.in" source "package/rocksdb/Config.in" source "package/sqlcipher/Config.in"
package/timescaledb/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_TIMESCALEDB + bool "timescaledb" + depends on BR2_PACKAGE_POSTGRESQL + help + TimescaleDB is an open-source database designed + to make SQL scalable for time-series data. + It is engineered up from PostgreSQL and packaged + as a PostgreSQL extension, providing automatic + partitioning across time and space (partitioning key), + as well as full SQL support. +
package/timescaledb/timescaledb.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 d0b7a153ff3e02ecf033a869ecdf4286f8610ea76140baa84928fc3a80223e99 timescaledb-1.7.4.tar.gz +sha256 0378e0948feefd85f579319c74d6e2b671194037f550c7176ef26649d94c895b LICENSE
package/timescaledb/timescaledb.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# timescaledb +# +################################################################################ + +TIMESCALEDB_VERSION = 1.7.4 +TIMESCALEDB_SITE = $(call github,timescale,timescaledb,$(TIMESCALEDB_VERSION)) +TIMESCALEDB_LICENSE = Apache-2.0 +TIMESCALEDB_LICENSE_FILES = LICENSE + +TIMESCALEDB_DEPENDENCIES = postgresql +TIMESCALEDB_CONF_OPTS += -DREGRESS_CHECKS=OFF +TIMESCALEDB_CONF_OPTS += -DPG_PKGLIBDIR=lib/postgresql +TIMESCALEDB_CONF_OPTS += -DPG_SHAREDIR=share/postgresql +TIMESCALEDB_CONF_OPTS += -DPG_BINDIR=bin +TIMESCALEDB_CONF_OPTS += -DPG_CPPFLAGS="$(POSTGRESQL_CPPFLAGS) " +TIMESCALEDB_CONF_OPTS += -DPG_CFLAGS="$(POSTGRESQL_CFLAGS) " +TIMESCALEDB_CONF_OPTS += -DPG_LDFLAGS="$(POSTGRESQL_LDFLAGS) " +TIMESCALEDB_CONF_OPTS += -DPG_LIBS=" " + +$(eval $(cmake-package))
Signature · 1 line
2.27.0
PATCH 2/2 package/timescaledb: new package
Hello Maxim,
Thanks for this contribution. I have applied it, but after doing a number of changes. See below.
Quoted 5 lines · On Mon, 5 Oct 2020 13:19:51 +0300 Maxim Kochetkov <[email protected]> wrote:
TimescaleDB is an open-source database designed to make SQL scalable for time-series data. It is engineered up from PostgreSQL and packaged as a PostgreSQL extension, providing automatic partitioning across time and space (partitioning key), as well as full SQL support.
Signed-off-by Maxim Kochetkov <[email protected]>
The lines of the commit log were too long, so I rewrapped them to 72 characters.
Quoted 6 lines
--- package/Config.in | 1 + package/timescaledb/Config.in | 11 +++++++++++ package/timescaledb/timescaledb.hash | 3 +++ package/timescaledb/timescaledb.mk | 22 ++++++++++++++++++++++ 4 files changed, 37 insertions(+)
You forgot to add an entry in the DEVELOPERS file for this package.
package/Config.in menu "Database" · line 1382
Quoted 13 lines
create mode 100644 package/timescaledb/Config.in create mode 100644 package/timescaledb/timescaledb.hash create mode 100644 package/timescaledb/timescaledb.mkpackage/Config.in +1
-0@@ -1379,6 +1379,7 @@ menu "Database" source "package/mongodb/Config.in" source "package/mysql/Config.in" source "package/postgresql/Config.in" + source "package/timescaledb/Config.in"
This should have been alphabetically sorted.
Quoted 10 lines
package/Config.in +0
-0source "package/redis/Config.in" source "package/rocksdb/Config.in" source "package/sqlcipher/Config.in"package/timescaledb/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_TIMESCALEDB
package/timescaledb/Config.in line 11
Quoted 10 lines
package/timescaledb/Config.in new file +10
-0+ bool "timescaledb" + depends on BR2_PACKAGE_POSTGRESQL + help + TimescaleDB is an open-source database designed + to make SQL scalable for time-series data. + It is engineered up from PostgreSQL and packaged + as a PostgreSQL extension, providing automatic + partitioning across time and space (partitioning key), + as well as full SQL support. +
We need the upstream URL of the project at the end of the Config.in help text. This is reported by "make check-package".
Quoted 16 lines
package/timescaledb/timescaledb.mk new file +10
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# timescaledb +# +################################################################################ + +TIMESCALEDB_VERSION = 1.7.4 +TIMESCALEDB_SITE = $(call github,timescale,timescaledb,$(TIMESCALEDB_VERSION)) +TIMESCALEDB_LICENSE = Apache-2.0 +TIMESCALEDB_LICENSE_FILES = LICENSE
package/timescaledb/timescaledb.mk line 20
Quoted 10 lines
package/timescaledb/timescaledb.mk new file +10
-0+ +TIMESCALEDB_DEPENDENCIES = postgresql +TIMESCALEDB_CONF_OPTS += -DREGRESS_CHECKS=OFF +TIMESCALEDB_CONF_OPTS += -DPG_PKGLIBDIR=lib/postgresql +TIMESCALEDB_CONF_OPTS += -DPG_SHAREDIR=share/postgresql +TIMESCALEDB_CONF_OPTS += -DPG_BINDIR=bin +TIMESCALEDB_CONF_OPTS += -DPG_CPPFLAGS="$(POSTGRESQL_CPPFLAGS) " +TIMESCALEDB_CONF_OPTS += -DPG_CFLAGS="$(POSTGRESQL_CFLAGS) " +TIMESCALEDB_CONF_OPTS += -DPG_LDFLAGS="$(POSTGRESQL_LDFLAGS) " +TIMESCALEDB_CONF_OPTS += -DPG_LIBS=" "
Several issues here:
- Only one TIMESCALEDB_CONF_OPTS assignment is needed, which can span multiple lines.
- Using POSTGRESQL_{CPPFLAGS,CFLAGS,LDFLAGS} is not recommended, as they are variables from another package. Instead, I've used TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_LDFLAGS.
- It was not obvious why you added a space at the end of those variables, but it was indeed necessary, so I've added a comment to explain why.
- My test build had OpenSSL disables, which requires passing -DUSE_OPENSSL=0, otherwise timescaledb CMake logic complains.
As said above, I fixed all those issues, and applied. Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com