Summary: | net-analyzer/zabbix-5.0.3: add USE=agent2 to enable support for zabbix-agent2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Chris Paras <chris> |
Component: | Current packages | Assignee: | Miroslav Šulc <fordfrog> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alicef, patrick, public, williamh |
Priority: | Normal | Keywords: | EBUILD, PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/19653 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
zabbix-5.0.3 ebuild with agent2 USE flag (INCOMPLETE)
zabbix-5.2.4 ebuild with agent2 useflag systemd tmpfiles for zabbix-agent2 systemd service for zabbix-agent2 openrc file for zabbix-agent2 |
Description
Chris Paras
2020-10-15 22:26:35 UTC
Created attachment 665942 [details]
zabbix-5.0.3 ebuild with agent2 USE flag (INCOMPLETE)
William, could you please give us some guidance? i found we could use go-module.eclass but that works only in case go.mod and go.sum are at the top directory and the whole project is go based which this one isn't, it's just single executable using go and only built when use flag is on. i'm really not sure how to handle this. the only idea that came to my mind was to package it separately, but maybe there is a better way. Created attachment 687690 [details]
zabbix-5.2.4 ebuild with agent2 useflag
I am definitely not an expert on anything having to do with go, but the ebuild from attachment produces zabbix agent2 that appears to work. The key difference was adding inheritance from "go-module" and listing the lines from 'go.sum' inside zabbix sources in "EGO_SUM" variable.
I have also made a couple of minor edits with quotation marks, mostly so that shellcheck would be happy.
The service files for agent2 are in the next attachments. The openrc seems to work, but I currently cannot test the systemd ones.
If it would be more convenient, I'd gladly make a pull request through github.
Created attachment 687693 [details]
systemd tmpfiles for zabbix-agent2
Created attachment 687696 [details]
systemd service for zabbix-agent2
Created attachment 687699 [details]
openrc file for zabbix-agent2
(In reply to Vladimir Timofeenko from comment #3) > Created attachment 687690 [details] > zabbix-5.2.4 ebuild with agent2 useflag > > I am definitely not an expert on anything having to do with go, but the > ebuild from attachment produces zabbix agent2 that appears to work. The key > difference was adding inheritance from "go-module" and listing the lines > from 'go.sum' inside zabbix sources in "EGO_SUM" variable. > > I have also made a couple of minor edits with quotation marks, mostly so > that shellcheck would be happy. > > The service files for agent2 are in the next attachments. The openrc seems > to work, but I currently cannot test the systemd ones. > > If it would be more convenient, I'd gladly make a pull request through > github. thank you Vladimir. could you please create the pull request? also, i'm just going to bump zabbix to the latest versions so it would be better doing it after the bump. thanks! (In reply to Miroslav Šulc from comment #7) > thank you Vladimir. could you please create the pull request? also, i'm just > going to bump zabbix to the latest versions so it would be better doing it > after the bump. thanks! Saw the bump landing in the main tree. I'll make a pull request with a link to this bug. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1240da9a7c32a0f285a627c7a4b711dee7dfba30 commit 1240da9a7c32a0f285a627c7a4b711dee7dfba30 Author: Vladimir Timofeenko <id@vtimofeenko.com> AuthorDate: 2021-02-25 17:42:53 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2021-03-09 08:00:07 +0000 net-analyzer/zabbix: added agent2 useflag Implements the useflag to build zabbix-agent2, a go-based Zabbix agent. The agent2 service files provided in files/ directory were tested on openrc and systemd-based systems. Cleaned up some minor formatting in the original ebuild. Signed-off-by: Vladimir Timofeenko <id@vtimofeenko.com> Closes: https://bugs.gentoo.org/749351 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> net-analyzer/zabbix/Manifest | 231 +++++++++ net-analyzer/zabbix/files/zabbix-agent2.init | 20 + net-analyzer/zabbix/files/zabbix-agent2.service | 12 + net-analyzer/zabbix/files/zabbix-agent2.tmpfiles | 1 + net-analyzer/zabbix/metadata.xml | 1 + net-analyzer/zabbix/zabbix-5.2.5-r1.ebuild | 601 +++++++++++++++++++++++ 6 files changed, 866 insertions(+) |