From ccd5546d74d0f1e5787b6daaa0f2d4d41226670c Mon Sep 17 00:00:00 2001 From: Giuseppe Foti Date: Sun, 14 Sep 2025 11:56:40 +0200 Subject: [PATCH] net-analyzer/gvmd: fix C23 build on 24.1.0, only show update instructions on update Closes: https://bugs.gentoo.org/946583 Signed-off-by: Giuseppe Foti Part-of: https://github.com/gentoo/gentoo/pull/43780 Closes: https://github.com/gentoo/gentoo/pull/43780 Signed-off-by: Florian Schmaus --- net-analyzer/gvmd/gvmd-24.1.0.ebuild | 18 ++++++++++++------ net-analyzer/gvmd/gvmd-25.2.1.ebuild | 14 ++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/net-analyzer/gvmd/gvmd-24.1.0.ebuild b/net-analyzer/gvmd/gvmd-24.1.0.ebuild index 39db42e8767d..2f43e4d1c19c 100644 --- a/net-analyzer/gvmd/gvmd-24.1.0.ebuild +++ b/net-analyzer/gvmd/gvmd-24.1.0.ebuild @@ -49,6 +49,10 @@ BDEPEND=" ) test? ( dev-libs/cgreen ) " +PATCHES=( + # Closes #946583 + "${FILESDIR}/gvmd-25.2.1-fix-c23-build.patch" +) src_prepare() { cmake_src_prepare @@ -120,10 +124,12 @@ src_install() { } pkg_postinst() { - elog "If you are upgrading from a previous version, you need to update the database version." - elog "Please, create the running directory and give write permission to the database user" - elog "then run gvmd as the gvm user with --migrate option:" - elog "~# mkdir /run/gvmd" - elog "~# setfacl -m u:gvm:rwx /run/gvmd/" - elog "~# sudo -u gvm gvmd --migrate" + if [[ ${REPLACING_VERSIONS} ]]; then + elog "If you are upgrading from a previous version, you need to update the database version." + elog "Please, create the running directory and give write permission to the database user" + elog "then run gvmd as the gvm user with --migrate option:" + elog "~# mkdir /run/gvmd" + elog "~# setfacl -m u:gvm:rwx /run/gvmd/" + elog "~# sudo -u gvm gvmd --migrate" + fi } diff --git a/net-analyzer/gvmd/gvmd-25.2.1.ebuild b/net-analyzer/gvmd/gvmd-25.2.1.ebuild index 2af0cf5ab2f9..fcd4efa11f93 100644 --- a/net-analyzer/gvmd/gvmd-25.2.1.ebuild +++ b/net-analyzer/gvmd/gvmd-25.2.1.ebuild @@ -125,10 +125,12 @@ src_install() { } pkg_postinst() { - elog "If you are upgrading from a previous version, you need to update the database version." - elog "Please, create the running directory and give write permission to the database user" - elog "then run gvmd as the gvm user with --migrate option:" - elog "~# mkdir /run/gvmd" - elog "~# setfacl -m u:gvm:rwx /run/gvmd/" - elog "~# sudo -u gvm gvmd --migrate" + if [[ ${REPLACING_VERSIONS} ]]; then + elog "If you are upgrading from a previous version, you need to update the database version." + elog "Please, create the running directory and give write permission to the database user" + elog "then run gvmd as the gvm user with --migrate option:" + elog "~# mkdir /run/gvmd" + elog "~# setfacl -m u:gvm:rwx /run/gvmd/" + elog "~# sudo -u gvm gvmd --migrate" + fi }