Bug 209893 - net-mgmt/zabbix3 (server/agent/proxy): Update to 3.0.4 and Fix PID
Summary: net-mgmt/zabbix3 (server/agent/proxy): Update to 3.0.4 and Fix PID
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords: patch, patch-ready
: 210152 210366 212460 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-31 14:25 UTC by pg
Modified: 2016-10-14 20:34 UTC (History)
10 users (show)

See Also:
pi: maintainer-feedback+
pi: merge-quarterly+


Attachments
patch to fix PID issue (10.14 KB, patch)
2016-05-31 14:25 UTC, pg
pg: maintainer-approval+
Details | Diff
patch to 3.0.3 (13.25 KB, patch)
2016-06-18 09:01 UTC, pg
pg: maintainer-approval+
Details | Diff
patch to 3.0.4 (45.92 KB, patch)
2016-08-03 13:27 UTC, pg
pg: maintainer-approval+
Details | Diff
patch to 3.0.4 (45.94 KB, patch)
2016-08-04 13:34 UTC, pg
pg: maintainer-approval+
Details | Diff
patch to 3.0.4 (46.24 KB, patch)
2016-08-05 21:14 UTC, pg
pg: maintainer-approval+
Details | Diff
patch to 3.0.4 (46.56 KB, patch)
2016-08-05 21:25 UTC, pg
pg: maintainer-approval+
Details | Diff
patch to 3.0.4 (14.88 KB, patch)
2016-09-15 23:40 UTC, pg
pg: maintainer-approval+
Details | Diff
Patch to fix database selection (738 bytes, patch)
2016-09-17 21:17 UTC, Christian Ullrich
no flags Details | Diff
Patch to fix database selection (535 bytes, patch)
2016-09-17 21:19 UTC, Christian Ullrich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pg 2016-05-31 14:25:39 UTC
Created attachment 170869 [details]
patch to fix PID issue

- Fix default path to PID 
- Fix rc.d scripts to correct use PID file
Comment 1 pg 2016-06-18 09:01:29 UTC
Created attachment 171538 [details]
patch to 3.0.3

- update to 3.0.3
Comment 2 pg 2016-06-18 09:04:18 UTC
# grep failure zabbix3-*-3.0.3.log       
#
Comment 3 pg 2016-06-18 09:05:48 UTC
poudriere log does not contain errors:
# grep failure zabbix3-*-3.0.3.log       
#
Comment 4 VK 2016-06-19 16:33:35 UTC
*** Bug 210366 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Zander freebsd_committer freebsd_triage 2016-06-30 19:38:08 UTC
There is now a USES=ssl. Could you update the port Makefile to use this?

Also, please re-generate the patches with "make makepatch". When introducing new patches, portlint should not complain.
Comment 6 pg 2016-08-03 13:27:29 UTC
Created attachment 173226 [details]
patch to 3.0.4

- Update to 3.0.4
- Fix default path to PID 
- Fix rc.d scripts to correct use PID file
- Fix some error on Makefile
- Fix OPENSSL_USE -> USES=ssl
- Fix WANT_PHP_WEB -> USES=php:web
- Change default options for -server and -frontend

poudriere log does not contain errors:
# grep failure zabbix3-*-3.0.4.log 
#

portlint: 0 fatal errors
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2016-08-03 15:35:12 UTC
In zabbix3-*/files/zabbix_*.in you have 'Location of the asterisk pid file' -> s/asterisk/zabbix/

Are there any reasons to not use FIND and REINPLACE_CMD to patch all the Makefile.in?
Comment 8 pg 2016-08-04 13:34:17 UTC
Created attachment 173279 [details]
patch to 3.0.4

fix comments in startup script
Comment 9 pg 2016-08-04 13:35:41 UTC
mikael, because patches are needed only for certain Makefile.in files.
Comment 10 pg 2016-08-05 21:14:24 UTC
Created attachment 173341 [details]
patch to 3.0.4

- Update to 3.0.4
- Fix default path to PID 
- Fix rc.d scripts to correct use PID file
- Fix some error on Makefile
- Fix OPENSSL_USE -> USES=ssl
- Fix WANT_PHP_WEB -> USES=php:web
- Fix MYSQL_USE -> USES+= mysql
- Fix PGSQL_USES -> USES+= pgsql
- Fix SQLITE_USES -> USES+= sqlite
- Change default options for -server and -frontend
Comment 11 pg 2016-08-05 21:25:02 UTC
Created attachment 173342 [details]
patch to 3.0.4

- Update to 3.0.4
- Fix default path to PID 
- Fix rc.d scripts to correct use PID file
- Fix some error on Makefile
- Fix OPENSSL_USE -> USES=ssl
- Fix WANT_PHP_WEB -> USES=php:web
- Fix MYSQL_USE -> USES+= mysql
- Fix PGSQL_USES -> USES+= pgsql
- Fix SQLITE_USES -> USES+= sqlite
- Change default options for -server and -frontend
- Fix CONFLICTS
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-31 18:23:25 UTC
testbuilds@work
Comment 13 Danny McGrath 2016-09-08 23:29:03 UTC
*** Bug 212460 has been marked as a duplicate of this bug. ***
Comment 14 Danny McGrath 2016-09-08 23:33:19 UTC
Just a friendly reminder that 3.0.2 is exploitable. A pkg audit is still missing afaict.
Comment 15 Ilmar 2016-09-12 21:06:42 UTC
When this update will be commited? POC of password hash leak exploit published about 3 weeks ago. And i'm receiving everyday email, that my packages are all ok and not vulnerable.
Is there anything that can speedup commit process?
Comment 16 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-13 19:00:05 UTC
Testbuilds done. Two questions:

1) net-mgmt/zabbix3-frontend
                                                       
has per default the MSYQL option -- in php7, there's only MYSQLI.

Would it be possible to set MYSQLI as the default ? This
would unbreak the build if php7 is the default.

2) net-mgmt/zabbix3-server

there are a lot of patches that add @LIBCURL_CFLAGS@
to the Makefile.in files.

It builds in poudriere without those flags, too. So why are those
patches needed ?
Comment 17 pg 2016-09-15 23:40:50 UTC
Created attachment 174819 [details]
patch to 3.0.4

+ change MYSQLI as the default 
and remove patches that add @LIBCURL_CFLAGS@
Comment 18 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-16 18:41:28 UTC
thanks, testbuilds@work. Btw, in the meantime, there was a small commit
to the tree for -server, see

https://lists.freebsd.org/pipermail/svn-ports-all/2016-September/131836.html

But I think this can be committed, stay tuned.
Comment 19 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-16 19:00:39 UTC
testbuilds are OK
Comment 20 commit-hook freebsd_committer freebsd_triage 2016-09-16 19:11:10 UTC
A commit references this bug:

Author: pi
Date: Fri Sep 16 19:10:50 UTC 2016
New revision: 422263
URL: https://svnweb.freebsd.org/changeset/ports/422263

Log:
  net-mgmt/zabbix3-{server|agent|proxy|frontend}: update to 3.0.4 and many fixes

  - Fix default path to PID
  - Fix rc.d scripts to correct use PID file
  - Fix some error in the Makefile
  - Fix OPENSSL_USE -> USES=ssl
  - Fix WANT_PHP_WEB -> USES=php:web
  - Fix MYSQL_USE -> USES+= mysql
  - Fix PGSQL_USES -> USES+= pgsql
  - Fix SQLITE_USES -> USES+= sqlite
  - Change default options for -server and -frontend
  - Fix CONFLICTS
  - fixed SQL injection vulnerability in "Latest data" page;
    thanks to 1N3 at Early Warning Services, LLC

  PR:		209893
  MFH:		2016Q3
  Security:	https://support.zabbix.com/browse/ZBX-11023
  Changes:	http://www.zabbix.com/rn3.0.4.php
  Submitted by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)

Changes:
  head/net-mgmt/zabbix3-frontend/Makefile
  head/net-mgmt/zabbix3-server/Makefile
  head/net-mgmt/zabbix3-server/distinfo
  head/net-mgmt/zabbix3-server/files/zabbix_agentd.in
  head/net-mgmt/zabbix3-server/files/zabbix_proxy.in
  head/net-mgmt/zabbix3-server/files/zabbix_server.in
  head/net-mgmt/zabbix3-server/pkg-plist.frontend
Comment 21 Christian Ullrich 2016-09-17 21:17:01 UTC
Created attachment 174890 [details]
Patch to fix database selection

The last update broke the database selection options; all databases are now declared as dependencies. At least it will still actually build with the selected option.
Comment 22 Christian Ullrich 2016-09-17 21:19:07 UTC
Created attachment 174891 [details]
Patch to fix database selection

Apologies, I should have left the keyword alone.
Comment 23 commit-hook freebsd_committer freebsd_triage 2016-09-18 12:58:20 UTC
A commit references this bug:

Author: pi
Date: Sun Sep 18 12:58:02 UTC 2016
New revision: 422386
URL: https://svnweb.freebsd.org/changeset/ports/422386

Log:
  net-mgmt/zabbix3-server: fix database selection

  - stop having all databases as dependencies all the time

  PR:		209893
  Submitted by:	chris@chrullrich.net

Changes:
  head/net-mgmt/zabbix3-server/Makefile
Comment 24 commit-hook freebsd_committer freebsd_triage 2016-09-19 15:28:23 UTC
A commit references this bug:

Author: pi
Date: Mon Sep 19 15:27:32 UTC 2016
New revision: 422446
URL: https://svnweb.freebsd.org/changeset/ports/422446

Log:
  net-mgmt/zabbix3-server: merge several changes to quarterly

  MFH: r422063 r422263 r422386

  - Simplify FreeBSD 9 SSL check, ignore LibreSSL

  - update to 3.0.4 and add many fixes

  PR:		209893
  Security:	https://support.zabbix.com/browse/ZBX-11023
  Changes:	http://www.zabbix.com/rn3.0.4.php
  Submitted by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer), chris@chrullrich.net
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net-mgmt/zabbix3-frontend/Makefile
  branches/2016Q3/net-mgmt/zabbix3-server/Makefile
  branches/2016Q3/net-mgmt/zabbix3-server/distinfo
  branches/2016Q3/net-mgmt/zabbix3-server/files/zabbix_agentd.in
  branches/2016Q3/net-mgmt/zabbix3-server/files/zabbix_proxy.in
  branches/2016Q3/net-mgmt/zabbix3-server/files/zabbix_server.in
  branches/2016Q3/net-mgmt/zabbix3-server/pkg-plist.frontend
Comment 25 Kevin Bowling freebsd_committer freebsd_triage 2016-09-20 04:00:55 UTC
Hi, you for some reason got rid of zabbix_agentd_paths in that patch, which is used for the search path of server/proxy externals and agent userparams.
Comment 26 commit-hook freebsd_committer freebsd_triage 2016-09-20 17:03:12 UTC
A commit references this bug:

Author: pi
Date: Tue Sep 20 17:02:54 UTC 2016
New revision: 422524
URL: https://svnweb.freebsd.org/changeset/ports/422524

Log:
  net-mgmt/zabbix3-server: unbreak build

  PR:		209893
  Submitted by:	antoine
  MFH:		2016Q3

Changes:
  head/net-mgmt/zabbix3-server/Makefile
Comment 27 commit-hook freebsd_committer freebsd_triage 2016-09-21 15:52:48 UTC
A commit references this bug:

Author: pi
Date: Wed Sep 21 15:52:17 UTC 2016
New revision: 422570
URL: https://svnweb.freebsd.org/changeset/ports/422570

Log:
  net-mgmt/zabbix3-server: unbreak build
  MFH: r422524

  PR:		209893
  Submitted by:	antoine
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net-mgmt/zabbix3-server/Makefile
Comment 28 Danny McGrath 2016-09-24 20:22:13 UTC
I updated my Q3 port to zabbix3-server-3.0.4 (agentd and frontend as well) and found that the ports init scripts are semi broken:

<pts/1|*****|FreeBSD|root|~ > service zabbix_server status
zabbix_server is not running.
<pts/1|*****|FreeBSD|root|~ > service zabbix_server start
Starting zabbix_server.
<pts/1|*****|FreeBSD|root|~ > service zabbix_server start
zabbix_server already running?  (pid=28747 28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774).
<pts/1|*****|FreeBSD|root|~ > service zabbix_server status
zabbix_server is not running.


For whatever reason, it does actually start then, but appears to be messing up with the PID check. I wasn't sure if this was just from Q3 missing the very latest patch? Any ideas?
Comment 29 pg 2016-09-24 21:34:08 UTC
Tomorrow I will fix this issue.
Comment 30 pg 2016-09-26 09:43:31 UTC
(In reply to Dan McGrath from comment #28)

This problem is because the patch (https://bz-attachments.freebsd.org/attachment.cgi?id=174819) does not fully applied (no files files/patch-src-zabbix_agent_zabbix_agentd.c, files/patch-src-zabbix_proxy_proxy.c,
files/patch-src-zabbix_server_server.c). As a workaround, you can set  PidFile in the zabbix_server.conf or fully apply the patches from this PR.

pi@ promised to fix this as the return from eurobsdcon.
Comment 31 commit-hook freebsd_committer freebsd_triage 2016-10-03 09:36:47 UTC
A commit references this bug:

Author: pi
Date: Mon Oct  3 09:36:20 UTC 2016
New revision: 423179
URL: https://svnweb.freebsd.org/changeset/ports/423179

Log:
  net-mgmt/zabbix3: add missing patches for the PID fix

  PR:		209893
  Pointy hat to:	pi
  Submitted by:	pg@pakhom.spb.ru (maintainer)
  MFH:		2016Q3

Changes:
  head/net-mgmt/zabbix3-server/Makefile
  head/net-mgmt/zabbix3-server/files/patch-src_zabbix_agent_zabbix_agentd.c
  head/net-mgmt/zabbix3-server/files/patch-src_zabbix_proxy_proxy.c
  head/net-mgmt/zabbix3-server/files/patch-src_zabbix_server_server.c
Comment 32 Kurt Jaeger freebsd_committer freebsd_triage 2016-10-14 20:34:08 UTC
*** Bug 210152 has been marked as a duplicate of this bug. ***