pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zabbix50-server: Cleanup libssh build and regen configure
Module Name: pkgsrc-wip
Committed By: Juraj Lutter <otis%NetBSD.org@localhost>
Pushed By: otis
Date: Thu Sep 17 17:16:44 2020 +0000
Changeset: 6c7e9c93175cac69f0690ffdab1c9f7cab9ca949
Modified Files:
zabbix50-server/Makefile
zabbix50-server/PLIST
zabbix50-server/distinfo
zabbix50-server/options.mk
Added Files:
zabbix50-server/patches/patch-m4_ax__lib__mysql.m4
zabbix50-server/patches/patch-m4_libssh.m4
zabbix50-server/patches/patch-src_zabbix__server_Makefile.am
Removed Files:
zabbix50-server/patches/patch-configure
zabbix50-server/patches/patch-src_zabbix__server_Makefile.in
Log Message:
zabbix50-server: Cleanup libssh build and regen configure
This commit brings more changes:
- In order to properly detect libssh >= 0.9.5, change the
logic directly in libssh.m4
- While here, also fix the bashism for mysql
- configure patch is not needed any longer
- Call autoconf, automake and aclocal before build in order
to regenerate the apropriate configure and Makefile files
after m4 patches.
- Change share directory and examples directory component
from "zabbix" to "zabbix-server". Similar change will be
applied also for -proxy and -agent when needed. This allows
to have server and proxy installed at once, without filename
clashes.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6c7e9c93175cac69f0690ffdab1c9f7cab9ca949
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
zabbix50-server/Makefile | 24 ++++++++++---
zabbix50-server/PLIST | 16 ++++-----
zabbix50-server/distinfo | 5 +--
zabbix50-server/options.mk | 7 +++-
zabbix50-server/patches/patch-configure | 15 --------
zabbix50-server/patches/patch-m4_ax__lib__mysql.m4 | 15 ++++++++
zabbix50-server/patches/patch-m4_libssh.m4 | 40 ++++++++++++++++++++++
.../patches/patch-src_zabbix__server_Makefile.am | 10 ++++++
.../patches/patch-src_zabbix__server_Makefile.in | 15 --------
9 files changed, 101 insertions(+), 46 deletions(-)
diffs:
diff --git a/zabbix50-server/Makefile b/zabbix50-server/Makefile
index fe6fe0fdcf..4f44352d36 100644
--- a/zabbix50-server/Makefile
+++ b/zabbix50-server/Makefile
@@ -7,14 +7,16 @@
PKGNAME= ${DISTNAME:S/-/-server-/}
COMMENT= Enterprise-class Monitoring Solution for Everyone
+CONFLICTS+= zabbix-[0-9]*
CONFLICTS+= zabbix-server-[0-9]*
DEPENDS+= fping-[0-9]*:../../net/fping
-USE_TOOLS+= pax pkg-config
+USE_TOOLS+= autoreconf autoconf automake pax pkg-config
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-server
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/${PKGBASE}
CONFIGURE_ARGS+= --with-iconv=${BUILDLINK_PREFIX.iconv}
CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap-client}
CONFIGURE_ARGS+= --with-libcurl
@@ -24,12 +26,12 @@ CONFIGURE_ARGS+= --with-libxml2
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib}
-EGDIR= share/examples/zabbix
+EGDIR= share/examples/${PKGBASE}
CONF_FILES+= ${EGDIR}/zabbix_server.conf ${PKG_SYSCONFDIR}/zabbix_server.conf
RCD_SCRIPTS= zabbix_server
-INSTALLATION_DIRS+= ${EGDIR} share/zabbix
+INSTALLATION_DIRS+= ${EGDIR} share/${PKGBASE}
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= pre-configure
@@ -38,14 +40,26 @@ SUBST_FILES.fix-paths= conf/*.conf
SUBST_FILES.fix-paths+= man/*.man
SUBST_SED.fix-paths= -e 's,/usr/local/etc,${PKG_SYSCONFDIR},g'
+SUBST_CLASSES+= fix-pkgbase
+SUBST_STAGE.fix-pkgbase= post-patch
+SUBST_MESSAGE.fix-pkgbase= Fixing PKGBASE.
+SUBST_FILES.fix-pkgbase= src/zabbix_server/Makefile.am
+SUBST_SED.fix-pkgbase= -e 's,%%PKGBASE%%,${PKGBASE},g'
+
+PLIST_SUBST+= PKGBASE=${PKGBASE}
+
CFLAGS.SunOS+= -DDUK_USE_BYTEORDER=1
.include "../../mk/bsd.prefs.mk"
+pre-configure:
+ set -e; cd ${WRKSRC}; \
+ aclocal -I m4 ; automake -ai --foreign; autoconf -I m4
+
post-install:
cd ${WRKSRC}/database/${ZABBIX_DB_TYPE}; \
- ${PAX} -rw . ${DESTDIR}${PREFIX}/share/zabbix/
- rm ${DESTDIR}${PREFIX}/share/zabbix/Makefile*
+ ${PAX} -rw . ${DESTDIR}${PREFIX}/share/${PKGBASE}/
+ ${RM} ${DESTDIR}${PREFIX}/share/${PKGBASE}/Makefile*
.include "options.mk"
diff --git a/zabbix50-server/PLIST b/zabbix50-server/PLIST
index 33f9b829a4..0110da495f 100644
--- a/zabbix50-server/PLIST
+++ b/zabbix50-server/PLIST
@@ -2,13 +2,13 @@
bin/zabbix_js
man/man8/zabbix_server.8
sbin/zabbix_server
-share/examples/zabbix/zabbix_server.conf
-share/zabbix/data.sql
-share/zabbix/double.sql
-share/zabbix/images.sql
-share/zabbix/schema.sql
-${PLIST.pgsql}share/zabbix/timescaledb.sql
-@pkgdir share/zabbix/externalscripts
-@pkgdir share/zabbix/alertscripts
+share/examples/${PKGBASE}/zabbix_server.conf
+share/${PKGBASE}/data.sql
+share/${PKGBASE}/double.sql
+share/${PKGBASE}/images.sql
+share/${PKGBASE}/schema.sql
+${PLIST.pgsql}share/${PKGBASE}/timescaledb.sql
+@pkgdir share/${PKGBASE}/externalscripts
+@pkgdir share/${PKGBASE}/alertscripts
@pkgdir lib/modules
@pkgdir etc/zabbix_server.conf.d
diff --git a/zabbix50-server/distinfo b/zabbix50-server/distinfo
index 512878fe08..8fc07d95fd 100644
--- a/zabbix50-server/distinfo
+++ b/zabbix50-server/distinfo
@@ -4,6 +4,7 @@ SHA1 (zabbix-5.0.3.tar.gz) = 77923e72cc33109e129c61994008f29cc5c14191
RMD160 (zabbix-5.0.3.tar.gz) = a1d122b71549a230f21f9d85dbc28042b40ec7ea
SHA512 (zabbix-5.0.3.tar.gz) = d08a031b334f531320f6b695af3ed7e3514c802ea28e0cec75040c518409e16ab4c591b389091aa12c07129f9b758d050c958967e3e86e725f4595f3b3a90d97
Size (zabbix-5.0.3.tar.gz) = 18893485 bytes
-SHA1 (patch-configure) = cf647b9ee52a96882d31f8783ac19b66e3e65105
+SHA1 (patch-m4_ax__lib__mysql.m4) = 9786c6bff3d22334263921c201bf241a207a46bc
+SHA1 (patch-m4_libssh.m4) = 8b4ac3964caf94bb0e4939d265dcefc08a07a0df
SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 468f2112a3d65b0a73f371194ae15ce0df0ad71c
-SHA1 (patch-src_zabbix__server_Makefile.in) = b4375c322e4d683fc8cd98e94d8f769e7592605e
+SHA1 (patch-src_zabbix__server_Makefile.am) = 43e1ef3632bb049be1f757e703bd3714db0bbb17
diff --git a/zabbix50-server/options.mk b/zabbix50-server/options.mk
index a4e8fc3725..3bc17d518f 100644
--- a/zabbix50-server/options.mk
+++ b/zabbix50-server/options.mk
@@ -1,7 +1,7 @@
# $NetBSD: options.mk,v 1.1 2017/05/21 17:30:03 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.zabbix50-server
-PKG_SUPPORTED_OPTIONS+= inet6 libssh2 snmp
+PKG_SUPPORTED_OPTIONS+= inet6 libssh libssh2 snmp
PKG_OPTIONS_OPTIONAL_GROUPS= database
PKG_OPTIONS_GROUP.database= mysql pgsql
PKG_SUGGESTED_OPTIONS+= libssh2 snmp pgsql
@@ -18,6 +18,11 @@ PLIST_VARS+= pgsql
CONFIGURE_ARGS+= --enable-ipv6
.endif
+.if !empty(PKG_OPTIONS:Mlibssh)
+CONFIGURE_ARGS+= --with-ssh=${BUILDLINK_PREFIX.libssh}
+.include "../../security/libssh/buildlink3.mk"
+.endif
+
.if !empty(PKG_OPTIONS:Mlibssh2)
CONFIGURE_ARGS+= --with-ssh2=${BUILDLINK_PREFIX.libssh2}
.include "../../security/libssh2/buildlink3.mk"
diff --git a/zabbix50-server/patches/patch-configure b/zabbix50-server/patches/patch-configure
deleted file mode 100644
index 4573979279..0000000000
--- a/zabbix50-server/patches/patch-configure
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-ism.
-
---- configure.orig 2020-07-13 07:56:36.000000000 +0000
-+++ configure
-@@ -8494,7 +8494,7 @@ fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-- if test "$found_mysql_tls" == "yes"; then
-+ if test "$found_mysql_tls" = "yes"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS ciphersuites in MySQL library" >&5
- $as_echo_n "checking for TLS ciphersuites in MySQL library... " >&6; }
diff --git a/zabbix50-server/patches/patch-m4_ax__lib__mysql.m4 b/zabbix50-server/patches/patch-m4_ax__lib__mysql.m4
new file mode 100644
index 0000000000..a976cde4c8
--- /dev/null
+++ b/zabbix50-server/patches/patch-m4_ax__lib__mysql.m4
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix bash-ism.
+
+--- m4/ax_lib_mysql.m4.orig 2020-08-24 09:42:55.000000000 +0000
++++ m4/ax_lib_mysql.m4
+@@ -236,7 +236,7 @@ AC_DEFUN([AX_LIB_MYSQL],
+ LDFLAGS="${LDFLAGS} ${MYSQL_LDFLAGS}"
+ LIBS="${LIBS} ${MYSQL_LIBS}"
+ LIBMYSQL_TLS_TRY_LINK([no])
+- if test "$found_mysql_tls" == "yes"; then
++ if test "$found_mysql_tls" = "yes"; then
+ LIBMYSQL_TLS_CIPHERS_TRY_LINK([no])
+ else
+ LIBMARIADB_TLS_TRY_LINK([no])
diff --git a/zabbix50-server/patches/patch-m4_libssh.m4 b/zabbix50-server/patches/patch-m4_libssh.m4
new file mode 100644
index 0000000000..d7791453ce
--- /dev/null
+++ b/zabbix50-server/patches/patch-m4_libssh.m4
@@ -0,0 +1,40 @@
+$NetBSD$
+
+Fix libssh >= 0.9.5 detection.
+
+--- m4/libssh.m4.orig 2020-05-10 17:36:06.000000000 +0000
++++ m4/libssh.m4
+@@ -83,13 +83,19 @@ AC_HELP_STRING([--with-ssh@<:@=DIR@:>@],
+ SSH_LDFLAGS=-L/usr/lib
+ SSH_LIBS="-lssh"
+ found_ssh="yes"
+- LIBSSH_ACCEPT_VERSION([/usr/include/libssh/libssh.h])
++ LIBSSH_ACCEPT_VERSION([/usr/include/libssh/libssh_version.h])
++ if test "x$accept_ssh_version" = "xno"; then
++ LIBSSH_ACCEPT_VERSION([/usr/include/libssh/libssh.h])
++ fi
+ elif test -f /usr/local/include/libssh/libssh.h; then
+ SSH_CFLAGS=-I/usr/local/include
+ SSH_LDFLAGS=-L/usr/local/lib
+ SSH_LIBS="-lssh"
+ found_ssh="yes"
+- LIBSSH_ACCEPT_VERSION([/usr/local/include/libssh/libssh.h])
++ LIBSSH_ACCEPT_VERSION([/usr/local/include/libssh/libssh_version.h])
++ if test "x$accept_ssh_version" = "xno"; then
++ LIBSSH_ACCEPT_VERSION([/usr/local/include/libssh/libssh.h])
++ fi
+ else #libraries are not found in default directories
+ found_ssh="no"
+ AC_MSG_RESULT(no)
+@@ -100,7 +106,10 @@ AC_HELP_STRING([--with-ssh@<:@=DIR@:>@],
+ SSH_LDFLAGS=-L$_libssh_dir/lib
+ SSH_LIBS="-lssh"
+ found_ssh="yes"
+- LIBSSH_ACCEPT_VERSION([$_libssh_dir/include/libssh/libssh.h])
++ LIBSSH_ACCEPT_VERSION([$_libssh_dir/include/libssh/libssh_version.h])
++ if test "x$accept_ssh_version" = "xno"; then
++ LIBSSH_ACCEPT_VERSION([$_libssh_dir/include/libssh/libssh.h])
++ fi
+ else #if test -f $_libssh_dir/include/libssh/libssh.h; then
+ found_ssh="no"
+ AC_MSG_RESULT(no)
diff --git a/zabbix50-server/patches/patch-src_zabbix__server_Makefile.am b/zabbix50-server/patches/patch-src_zabbix__server_Makefile.am
new file mode 100644
index 0000000000..53d2f9a0fa
--- /dev/null
+++ b/zabbix50-server/patches/patch-src_zabbix__server_Makefile.am
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- src/zabbix_server/Makefile.am.orig 2020-08-24 09:42:55.000000000 +0000
++++ src/zabbix_server/Makefile.am
+@@ -121,4 +121,4 @@ install-data-hook:
+ $(MKDIR_P) "$(DESTDIR)$(EXTERNAL_SCRIPTS_PATH)"
+ $(MKDIR_P) "$(DESTDIR)$(ALERT_SCRIPTS_PATH)"
+ $(MKDIR_P) "$(DESTDIR)$(LOAD_MODULE_PATH)"
+- test -f "$(DESTDIR)$(SERVER_CONFIG_FILE)" || cp "../../conf/zabbix_server.conf" "$(DESTDIR)$(SERVER_CONFIG_FILE)"
++ $(INSTALL_DATA) "../../conf/zabbix_server.conf" "$(DESTDIR)/${PREFIX}/share/examples/%%PKGBASE%%"
diff --git a/zabbix50-server/patches/patch-src_zabbix__server_Makefile.in b/zabbix50-server/patches/patch-src_zabbix__server_Makefile.in
deleted file mode 100644
index 7afae8ad6e..0000000000
--- a/zabbix50-server/patches/patch-src_zabbix__server_Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_zabbix__server_Makefile.in,v 1.2 2018/11/12 10:51:34 he Exp $
-
-Install config file in example directory.
-
---- src/zabbix_server/Makefile.in.orig 2020-07-13 07:56:40.000000000 +0000
-+++ src/zabbix_server/Makefile.in
-@@ -1072,7 +1072,7 @@ install-data-hook:
- $(MKDIR_P) "$(DESTDIR)$(EXTERNAL_SCRIPTS_PATH)"
- $(MKDIR_P) "$(DESTDIR)$(ALERT_SCRIPTS_PATH)"
- $(MKDIR_P) "$(DESTDIR)$(LOAD_MODULE_PATH)"
-- test -f "$(DESTDIR)$(SERVER_CONFIG_FILE)" || cp "../../conf/zabbix_server.conf" "$(DESTDIR)$(SERVER_CONFIG_FILE)"
-+ cp "../../conf/zabbix_server.conf" "$(DESTDIR)/${PREFIX}/share/examples/zabbix"
-
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
Home |
Main Index |
Thread Index |
Old Index