Ebuild for net-misc/zabbix-5.0.3 with new agent2 use flag to enable zabbix-agent2 (This also depends on dev-lang/go and dev-lang/go-bootstrap). Unfortunately, during the compile phase the make process wants to download several go packages which fail with "go: github.com/alimy/mc/v2@v2.0.3: Get "https://proxy.golang.org/github.com/alimy/mc/v2/@v/v2.0.3.mod":cannot connect to host." I'm not sure what to put into the ebuild file the download these files beforehand nor to make them available to the ebuild. Maybe someone else can finish this or give some help. Reproducible: Always
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(+)