commit: d0f800b52b7057edb28fc70db6664b70ab36f5fc Author: Rahil Bhimjiani <me <AT> rahil <DOT> rocks> AuthorDate: Fri Jan 5 13:50:30 2024 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Jan 6 05:25:43 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0f800b5
app-containers/conmon: add 2.1.10 * Remove GIT_COMMIT as it is should not be there in non-live versions according to upstream's build instructions [1] * make use of usex instead of if..else * Improve the patch with credits and upstream PR mentions [1] https://github.com/containers/conmon/ Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks> Closes: https://github.com/gentoo/gentoo/pull/34658 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> app-containers/conmon/Manifest | 1 + .../{conmon-9999.ebuild => conmon-2.1.10.ebuild} | 28 +++--------- app-containers/conmon/conmon-9999.ebuild | 28 +++--------- .../conmon/files/conmon-2.1.8-Makefile.patch | 53 ++++++++++++++++++++-- 4 files changed, 64 insertions(+), 46 deletions(-) diff --git a/app-containers/conmon/Manifest b/app-containers/conmon/Manifest index 389a6dcbce8c..a091bde18e70 100644 --- a/app-containers/conmon/Manifest +++ b/app-containers/conmon/Manifest @@ -1 +1,2 @@ +DIST conmon-2.1.10.tar.gz 121047 BLAKE2B 14b4c2d541607eac0af6b335f35bd506c9a6c3d2b4e4e3ad79f32550385e90b6f7533f505565f90fb4bb1f42d528c41e9ddc7ec275c16ee982a6d0afe1c65bff SHA512 ecf1a961f431b005b54faa68b5c1bcf31d448f994ca66a56f13002216074dba79b53b52a377d4f8dab08141d6c6cf44467352fbff37175135d3da84081b27a18 DIST conmon-2.1.8.tar.gz 120541 BLAKE2B 8ae12e674edf49f233f7423f2566a1ddea793bd4fc888618a8903a84309cb4aacea9d200bb0f8e0895c96796dca9bc2e6e73c9c8a7dcc5f2c540b05f7a73a21e SHA512 a277de8f8adf001c3e3ef6ef19d4bade36d48c5395a624ee99cb22708ea26a9954df76362006a1331efc06265cb790883b43e84f0006f80c1725a7470ff244c3 diff --git a/app-containers/conmon/conmon-9999.ebuild b/app-containers/conmon/conmon-2.1.10.ebuild similarity index 52% copy from app-containers/conmon/conmon-9999.ebuild copy to app-containers/conmon/conmon-2.1.10.ebuild index 073e0db942c9..c41813b997a1 100644 --- a/app-containers/conmon/conmon-9999.ebuild +++ b/app-containers/conmon/conmon-2.1.10.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,13 +8,12 @@ inherit toolchain-funcs DESCRIPTION="An OCI container runtime monitor" HOMEPAGE="https://github.com/containers/conmon" -if [[ ${PV} == *9999* ]]; then +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" @@ -33,31 +32,18 @@ PATCHES=( 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 + sed -i -e "s|shell.*--exists libsystemd.* && echo \"0\"|shell echo $(usex systemd 0 1)|g;" Makefile || die + echo -e "#!/usr/bin/env bash\necho $(usex seccomp 0 1)" > hack/seccomp-notify.sh || die } src_compile() { tc-export CC PKG_CONFIG - export PREFIX=${EPREFIX}/usr GOMD2MAN=go-md2man - if [[ ${PV} == *9999* ]]; then - default - else - emake GIT_COMMIT="${GIT_COMMIT}" - fi + export PREFIX="${EPREFIX}/usr" GOMD2MAN=go-md2man + default } src_install() { default dodir /usr/libexec/podman - dosym ../../bin/"${PN}" /usr/libexec/podman/conmon + dosym ../../bin/"${PN}" /usr/libexec/podman/"${PN}" } diff --git a/app-containers/conmon/conmon-9999.ebuild b/app-containers/conmon/conmon-9999.ebuild index 073e0db942c9..c41813b997a1 100644 --- a/app-containers/conmon/conmon-9999.ebuild +++ b/app-containers/conmon/conmon-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,13 +8,12 @@ inherit toolchain-funcs DESCRIPTION="An OCI container runtime monitor" HOMEPAGE="https://github.com/containers/conmon" -if [[ ${PV} == *9999* ]]; then +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" @@ -33,31 +32,18 @@ PATCHES=( 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 + sed -i -e "s|shell.*--exists libsystemd.* && echo \"0\"|shell echo $(usex systemd 0 1)|g;" Makefile || die + echo -e "#!/usr/bin/env bash\necho $(usex seccomp 0 1)" > hack/seccomp-notify.sh || die } src_compile() { tc-export CC PKG_CONFIG - export PREFIX=${EPREFIX}/usr GOMD2MAN=go-md2man - if [[ ${PV} == *9999* ]]; then - default - else - emake GIT_COMMIT="${GIT_COMMIT}" - fi + export PREFIX="${EPREFIX}/usr" GOMD2MAN=go-md2man + default } src_install() { default dodir /usr/libexec/podman - dosym ../../bin/"${PN}" /usr/libexec/podman/conmon + dosym ../../bin/"${PN}" /usr/libexec/podman/"${PN}" } diff --git a/app-containers/conmon/files/conmon-2.1.8-Makefile.patch b/app-containers/conmon/files/conmon-2.1.8-Makefile.patch index 3c3aa0def57f..8730f4cde59c 100644 --- a/app-containers/conmon/files/conmon-2.1.8-Makefile.patch +++ b/app-containers/conmon/files/conmon-2.1.8-Makefile.patch @@ -1,15 +1,60 @@ +# https://github.com/containers/conmon/pull/482 +# https://github.com/containers/conmon/pull/456 +From 26f8263a2e5c7bff1e2d5985a8a3d5f07ab3b0b0 Mon Sep 17 00:00:00 2001 +From: Rahil Bhimjiani <[email protected]> +Date: Tue, 26 Sep 2023 03:21:49 +0530 +Subject: [PATCH] Remove checks for (long)deprecated libsystemd-journal in + favor of libsystemd + +https://bugzilla.redhat.com/show_bug.cgi?id=1350301#c2 + +Signed-off-by: Rahil Bhimjiani <[email protected]> +--- + Makefile | 5 +---- + meson.build | 5 +---- + 2 files changed, 2 insertions(+), 8 deletions(-) + +diff --git a/Makefile b/Makefile +index 5e6c0d39..40df8e3d 100644 --- a/Makefile +++ b/Makefile -@@ -41,4 +41 @@ +@@ -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) -@@ -127 +123,0 @@ -- $(MAKE) -C tools + override LIBS += $(shell $(PKG_CONFIG) --libs libsystemd) + override CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) -D USE_JOURNALD=1 + endif +diff --git a/meson.build b/meson.build +index 336e48f3..b454e349 100644 +--- a/meson.build ++++ b/meson.build +@@ -47,10 +47,7 @@ else + libdl = cc.find_library('dl') + endif + +-sd_journal = dependency('libsystemd-journal', required : false) +-if not sd_journal.found() +- sd_journal = dependency('libsystemd', required : false) +-endif ++sd_journal = dependency('libsystemd', required : false) + if sd_journal.found() + add_project_arguments('-DUSE_JOURNALD=1', language : 'c') + endif +diff --git a/docs/Makefile b/docs/Makefile +index af20d2b8..25987664 100644 --- a/docs/Makefile +++ b/docs/Makefile -@@ -4 +4 @@ +@@ -1,6 +1,6 @@ + PREFIX ?= /usr/local + DATADIR := ${PREFIX}/share + MANDIR := $(DATADIR)/man -GOMD2MAN = ../tools/build/go-md2man +GOMD2MAN ?= ../tools/build/go-md2man + + docs: $(patsubst %.md,%,$(wildcard *.8.md))
