From c28357d92341aa71b4eb6ebb23e0e57244c826c3 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 14 Dec 2019 17:34:54 +0100 Subject: [PATCH 1/6] dnsdist: add missing lmdb dep Currently dnsdist is failing at packaging stage when lmdb is in staging: make[4]: Leaving directory '/builder/shared-workdir/build/sdk/build_dir/target-x86_64_musl/dnsdist-1.4.0' Package dnsdist is missing dependencies for the following libraries: liblmdb.so Makefile:109: recipe for target '/builder/shared-workdir/build/sdk/bin/packages/x86_64/packages/dnsdist_1.4.0-2_x86_64.ipk' failed Signed-off-by: Sebastian Kemper --- net/dnsdist/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile index d0196125b..0ec409b38 100644 --- a/net/dnsdist/Makefile +++ b/net/dnsdist/Makefile @@ -66,7 +66,7 @@ define Package/dnsdist CATEGORY:=Network SUBMENU:=IP Addresses and Names TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer - DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libcap +libedit +libfstrm +lua +boost +libnetsnmp +libatomic +libsodium +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop + DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libcap +libedit +libfstrm +lmdb +lua +boost +libnetsnmp +libatomic +libsodium +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop URL:=https://dnsdist.org/ endef From 6374c7d921fbe5a223c5178908f2c2e62e6dd008 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 14 Dec 2019 17:37:56 +0100 Subject: [PATCH 2/6] dnsdist: add missing build dep on protoc The build needs protoc, otherwise it fails. checking if we need to link in protobuf... yes checking for PROTOBUF... yes checking for protoc... no configure: error: Protobuf requested but the protobuf compiler was not found Signed-off-by: Sebastian Kemper --- net/dnsdist/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile index 0ec409b38..53a94f658 100644 --- a/net/dnsdist/Makefile +++ b/net/dnsdist/Makefile @@ -15,6 +15,8 @@ PKG_CPE_ID:=cpe:/a:powerdns:dnsdist PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=protobuf/host + PKG_CONFIG_DEPENDS:= \ CONFIG_DNSDIST_GNUTLS \ CONFIG_DNSDIST_OPENSSL From a99af740ea5cbbb8677899f61d6275f95fa2d8a4 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 15 Dec 2019 10:39:00 +0100 Subject: [PATCH 3/6] tinycdb: use OpenWrt flags Currently tinycdb doesn't use {C,CPP,LD}FLAGS. This commit adds MAKE_FLAGS to address this. Before: make[3]: Entering directory '/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/tinycdb-0.78' ccache_cc -O -D_FILE_OFFSET_BITS=64 -c cdb_init.c cc1: note: someone does not honour COPTS correctly, passed 0 times ccache_cc -O -D_FILE_OFFSET_BITS=64 -c cdb_find.c ... Signed-off-by: Sebastian Kemper --- libs/tinycdb/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/tinycdb/Makefile b/libs/tinycdb/Makefile index c633c62ab..067844d54 100644 --- a/libs/tinycdb/Makefile +++ b/libs/tinycdb/Makefile @@ -19,6 +19,14 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz include $(INCLUDE_DIR)/package.mk +# Pass CPPFLAGS in the CFLAGS as otherwise the build system will +# ignore them. +TARGET_CFLAGS+=$(TARGET_CPPFLAGS) + +MAKE_FLAGS+= \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + define Package/tinycdb SECTION:=libs CATEGORY:=Libraries From 6c4336eb195de570903627b6738d63910b0fa834 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 15 Dec 2019 10:44:05 +0100 Subject: [PATCH 4/6] tinycdb: install shared lib and pic archive dnsdist picks up cdb.h but can't link in the static archive. /home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt-linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: /home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libcdb.a(cdb_init.o): relocation R_MIPS_26 against `fstat' can not be used when making a shared object; recompile with -fPIC This commit extends the tinycdb Makefile to build and install as well the shared library as well as the pic archive. dnsdist will then pick the shared library. Signed-off-by: Sebastian Kemper --- libs/tinycdb/Makefile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/libs/tinycdb/Makefile b/libs/tinycdb/Makefile index 067844d54..05d56ca04 100644 --- a/libs/tinycdb/Makefile +++ b/libs/tinycdb/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tinycdb -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.corpit.ru/mjt/tinycdb/ PKG_VERSION:=0.78 PKG_HASH:=50678f432d8ada8d69f728ec11c3140e151813a7847cf30a62d86f3a720ed63c @@ -17,6 +17,8 @@ PKG_LICENSE:=NLPL PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk # Pass CPPFLAGS in the CFLAGS as otherwise the build system will @@ -27,21 +29,35 @@ MAKE_FLAGS+= \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" +CDB_INST_STRING:=prefix=/usr install install-sharedlib install-piclib + define Package/tinycdb SECTION:=libs CATEGORY:=Libraries TITLE:=a Constant DataBase URL:=http://www.corpit.ru/mjt/tinycdb.html + ABI_VERSION=1 endef define Package/tinycdb/description TinyCDB is a very fast and simple package for creating and reading constant data bases endef -define Build/InstallDev - cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) prefix=/usr install +define Package/tinycdb/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcdb.so.$(ABI_VERSION) $(1)/usr/lib +endef + +define Build/Compile + $(call Build/Compile/Default,shared staticlib piclib) endef +define Build/Install + $(call Build/Install/Default,$(CDB_INST_STRING)) +endef +define Build/InstallDev + cd $(PKG_BUILD_DIR); $(MAKE) DESTDIR=$(1) $(CDB_INST_STRING) +endef $(eval $(call BuildPackage,tinycdb)) From e5b967aa511960f59be1cd436976e78c717276b5 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 15 Dec 2019 10:49:20 +0100 Subject: [PATCH 5/6] dnsdist: add dependency on tinycdb If libcdb from tinycdb is available dnsdist will link to it. This commit adds the dependency. Signed-off-by: Sebastian Kemper --- net/dnsdist/Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile index 53a94f658..217c978de 100644 --- a/net/dnsdist/Makefile +++ b/net/dnsdist/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsdist PKG_VERSION:=1.4.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://downloads.powerdns.com/releases/ @@ -68,7 +68,22 @@ define Package/dnsdist CATEGORY:=Network SUBMENU:=IP Addresses and Names TITLE:=dnsdist DNS-, DOS- and abuse-aware loadbalancer - DEPENDS:=+DNSDIST_OPENSSL:libopenssl +DNSDIST_GNUTLS:libgnutls +protobuf +re2 +libcap +libedit +libfstrm +lmdb +lua +boost +libnetsnmp +libatomic +libsodium +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop + DEPENDS:= \ + +DNSDIST_DNS_OVER_HTTPS:libh2o-evloop \ + +DNSDIST_GNUTLS:libgnutls \ + +DNSDIST_OPENSSL:libopenssl \ + +boost \ + +libatomic \ + +libcap \ + +libedit \ + +libfstrm \ + +libnetsnmp \ + +libsodium \ + +lmdb \ + +lua \ + +protobuf \ + +re2 \ + +tinycdb URL:=https://dnsdist.org/ endef From 3872e13cc3e828fb0cdd8fda01d31e41a38f43f2 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 15 Dec 2019 10:51:12 +0100 Subject: [PATCH 6/6] postfix: update tinycdb dependency tinycdb now installs a shared lib alongside the static archive. postfix will use the shared lib, hence this commit updates the dependency. Signed-off-by: Sebastian Kemper --- mail/postfix/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index df562be71..9ab509f6e 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postfix -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_VERSION:=3.4.6 PKG_SOURCE_URL:= \ https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \ @@ -21,7 +21,6 @@ PKG_LICENSE:=IPL-1.0 PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:postfix:postfix -PKG_BUILD_DEPENDS:=POSTFIX_CDB:tinycdb PKG_CONFIG_DEPENDS:= \ CONFIG_POSTFIX_TLS \ CONFIG_POSTFIX_SASL \ @@ -44,7 +43,7 @@ define Package/postfix postfix=25:postfix=25 \ postdrop=26:postdrop=26 URL:=http://www.postfix.org/ - DEPENDS:=+POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_MYSQL:libmysqlclient +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre + DEPENDS:=+POSTFIX_CDB:tinycdb +POSTFIX_TLS:libopenssl +POSTFIX_SASL:libsasl2 +POSTFIX_LDAP:libopenldap +POSTFIX_DB:libdb47 +POSTFIX_SQLITE:libsqlite3 +POSTFIX_MYSQL:libmysqlclient +POSTFIX_PGSQL:libpq +POSTFIX_EAI:icu +POSTFIX_PCRE:libpcre endef define Package/postfix/description