commit:     dea7603af7d03c0f314a9f423b9392cd8058035f
Author:     Rahil Bhimjiani <rahil3108 <AT> gmail <DOT> com>
AuthorDate: Mon Sep 25 21:09:31 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Sep 26 02:15:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dea7603a

app-containers/conmon: add live, 2.1.8 & proxy-maint

improved ebuild & possibly closing a bug

Closes: https://github.com/gentoo/gentoo/pull/33059
Bug: https://bugs.gentoo.org/901481
Signed-off-by: Rahil Bhimjiani <rahil3108 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-containers/conmon/Manifest                     |  1 +
 app-containers/conmon/conmon-2.1.8.ebuild          | 62 ++++++++++++++++++++++
 app-containers/conmon/conmon-9999.ebuild           | 62 ++++++++++++++++++++++
 app-containers/conmon/files/001-conmon-basic.patch | 45 ++++++++++++++++
 app-containers/conmon/metadata.xml                 | 10 ++++
 5 files changed, 180 insertions(+)

diff --git a/app-containers/conmon/Manifest b/app-containers/conmon/Manifest
index 2f575ec77f3b..f6313ea4694f 100644
--- a/app-containers/conmon/Manifest
+++ b/app-containers/conmon/Manifest
@@ -1,2 +1,3 @@
 DIST conmon-2.1.6.tar.gz 157838 BLAKE2B 
319a170ab048c14f3be998391da403799171c5d0e342ac4214a6456398ab872cb6a77cb4d67dbb97a0bc47008c6fa657ba2a166eea4c56ee65db545b08e032bd
 SHA512 
0b5d7f33745766f4f1646e79554e16e1d6c977fd08c5a86c72068aec9f28110b5981c38972134741281c8470c295b6195843f3dbb78e1e9da34b8d577ea41d65
 DIST conmon-2.1.7.tar.gz 158201 BLAKE2B 
2f159177cfa78ecafef0217d21c9c56942c5498022d3777368d8caf81c2503aafabf002c0f9ec0537936eca34c156ed9bdd037b5543eca1edd5489d9bc1ac215
 SHA512 
95d394b399a19a62b894cdd03937ab79b81051eea1db461b1bf957ddd7626d6ca4aa108b8319ed8c08adbdf99fd960c5ba29146e8b0673b5c920708912a72973
+DIST conmon-2.1.8.tar.gz 120541 BLAKE2B 
8ae12e674edf49f233f7423f2566a1ddea793bd4fc888618a8903a84309cb4aacea9d200bb0f8e0895c96796dca9bc2e6e73c9c8a7dcc5f2c540b05f7a73a21e
 SHA512 
a277de8f8adf001c3e3ef6ef19d4bade36d48c5395a624ee99cb22708ea26a9954df76362006a1331efc06265cb790883b43e84f0006f80c1725a7470ff244c3

diff --git a/app-containers/conmon/conmon-2.1.8.ebuild 
b/app-containers/conmon/conmon-2.1.8.ebuild
new file mode 100644
index 000000000000..1f642d767a63
--- /dev/null
+++ b/app-containers/conmon/conmon-2.1.8.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="An OCI container runtime monitor"
+HOMEPAGE="https://github.com/containers/conmon";
+
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/containers/conmon.git";
+else
+       SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+       GIT_COMMIT="00e08f4a9ca5420de733bf542b930ad58e1a7e7d"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="+seccomp systemd"
+RESTRICT="test"
+
+RDEPEND="dev-libs/glib:=
+       seccomp? ( sys-libs/libseccomp )
+       systemd? ( sys-apps/systemd:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-go/go-md2man"
+PATCHES=(
+       "${FILESDIR}/001-conmon-basic.patch"
+)
+
+src_prepare() {
+       default
+       if use systemd; then
+               sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo 
"0"|shell echo "0"|g;' Makefile || die
+       else
+               sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo 
"0"|shell echo "1"|g;' Makefile || die
+       fi
+
+       if use seccomp; then
+               echo -e '#!/usr/bin/env bash\necho "0"' > 
hack/seccomp-notify.sh || die
+       else
+               echo -e '#!/usr/bin/env bash\necho "1"' > 
hack/seccomp-notify.sh || die
+       fi
+}
+
+src_compile() {
+       tc-export CC PKG_CONFIG
+       if [[ ${PV} == *9999* ]]; then
+               default
+       else
+               emake GIT_COMMIT="${GIT_COMMIT}"
+       fi
+}
+
+src_install() {
+       default
+       dodir /usr/libexec/podman
+       dosym ../../bin/"${PN}" /usr/libexec/podman/conmon
+}

diff --git a/app-containers/conmon/conmon-9999.ebuild 
b/app-containers/conmon/conmon-9999.ebuild
new file mode 100644
index 000000000000..1f642d767a63
--- /dev/null
+++ b/app-containers/conmon/conmon-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="An OCI container runtime monitor"
+HOMEPAGE="https://github.com/containers/conmon";
+
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/containers/conmon.git";
+else
+       SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+       GIT_COMMIT="00e08f4a9ca5420de733bf542b930ad58e1a7e7d"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="+seccomp systemd"
+RESTRICT="test"
+
+RDEPEND="dev-libs/glib:=
+       seccomp? ( sys-libs/libseccomp )
+       systemd? ( sys-apps/systemd:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-go/go-md2man"
+PATCHES=(
+       "${FILESDIR}/001-conmon-basic.patch"
+)
+
+src_prepare() {
+       default
+       if use systemd; then
+               sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo 
"0"|shell echo "0"|g;' Makefile || die
+       else
+               sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo 
"0"|shell echo "1"|g;' Makefile || die
+       fi
+
+       if use seccomp; then
+               echo -e '#!/usr/bin/env bash\necho "0"' > 
hack/seccomp-notify.sh || die
+       else
+               echo -e '#!/usr/bin/env bash\necho "1"' > 
hack/seccomp-notify.sh || die
+       fi
+}
+
+src_compile() {
+       tc-export CC PKG_CONFIG
+       if [[ ${PV} == *9999* ]]; then
+               default
+       else
+               emake GIT_COMMIT="${GIT_COMMIT}"
+       fi
+}
+
+src_install() {
+       default
+       dodir /usr/libexec/podman
+       dosym ../../bin/"${PN}" /usr/libexec/podman/conmon
+}

diff --git a/app-containers/conmon/files/001-conmon-basic.patch 
b/app-containers/conmon/files/001-conmon-basic.patch
new file mode 100644
index 000000000000..27e31cb8e0ed
--- /dev/null
+++ b/app-containers/conmon/files/001-conmon-basic.patch
@@ -0,0 +1,45 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ VERSION := $(shell cat VERSION)
+-PREFIX ?= /usr/local
++PREFIX ?= /usr
+ BINDIR ?= ${PREFIX}/bin
+ LIBEXECDIR ?= ${PREFIX}/libexec
+ GO ?= go
+@@ -124,7 +124,6 @@ install.podman: bin/conmon
+       install ${SELINUXOPT} -m 755 bin/conmon 
$(DESTDIR)$(LIBEXECDIR)/podman/conmon
+ 
+ install.tools:
+-      $(MAKE) -C tools
+ 
+ .PHONY: fmt
+ fmt:
+--- a/docs/Makefile
++++ b/docs/Makefile
+@@ -1,7 +1,7 @@
+-PREFIX ?= /usr/local
++PREFIX ?= /usr
+ DATADIR := ${PREFIX}/share
+ MANDIR := $(DATADIR)/man
+-GOMD2MAN = ../tools/build/go-md2man
++GOMD2MAN = go-md2man
+ 
+ docs: $(patsubst %.md,%,$(wildcard *.8.md))
+ 
+diff --git a/Makefile b/Makefile
+index f36dfb4..6f383b8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -38,10 +38,7 @@ override CFLAGS += $(shell $(PKG_CONFIG) --cflags glib-2.0) 
-DVERSION=\"$(VERSIO
+ # "pkg-config --exists" will error if the package doesn't exist. Make can 
only compare
+ # output of commands, so the echo commands are to allow pkg-config to error 
out, make to catch it,
+ # and allow the compilation to complete.
+-ifeq ($(shell $(PKG_CONFIG) --exists libsystemd-journal && echo "0"), 0)
+-      override LIBS += $(shell $(PKG_CONFIG) --libs libsystemd-journal)
+-      override CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd-journal) 
-D USE_JOURNALD=1
+-else ifeq ($(shell $(PKG_CONFIG) --exists libsystemd && echo "0"), 0)
++ifeq ($(shell $(PKG_CONFIG) --exists libsystemd && echo "0"), 0)
+       override LIBS += $(shell $(PKG_CONFIG) --libs libsystemd)
+       override CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) -D 
USE_JOURNALD=1
+ endif

diff --git a/app-containers/conmon/metadata.xml 
b/app-containers/conmon/metadata.xml
index b4e9640c5697..b38c7b074e2e 100644
--- a/app-containers/conmon/metadata.xml
+++ b/app-containers/conmon/metadata.xml
@@ -5,7 +5,17 @@
                <email>[email protected]</email>
                <name>Zac Medico</name>
        </maintainer>
+       <maintainer type="project" proxied="proxy">
+               <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <maintainer type="person" proxied="yes">
+               <email>[email protected]</email>
+               <name>Rahil Bhimjiani</name>
+       </maintainer>
        <upstream>
                <remote-id type="github">containers/conmon</remote-id>
+               <bugs-to>https://github.com/containers/conmon/issues</bugs-to>
+               
<doc>https://github.com/containers/conmon/blob/main/README.md</doc>
        </upstream>
 </pkgmetadata>

Reply via email to