commit:     6ad9d5eecbece1b3c148ed43d89eb236eb753501
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu May  9 10:49:55 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu May  9 10:49:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad9d5ee

sys-apps/azure-nvme-utils: Bump to 0.1.3, drop 0.1.2, fix -Werror + udev reload

Closes: https://bugs.gentoo.org/931110
Closes: https://bugs.gentoo.org/931111
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 sys-apps/azure-nvme-utils/Manifest                 |  2 +-
 ...240502.ebuild => azure-nvme-utils-0.1.3.ebuild} | 17 +++++++++---
 .../files/azure-nvme-utils-werror.patch            | 31 ++++++++++++++++++++++
 3 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/sys-apps/azure-nvme-utils/Manifest 
b/sys-apps/azure-nvme-utils/Manifest
index d391813cb9b9..d89ee9e88c4f 100644
--- a/sys-apps/azure-nvme-utils/Manifest
+++ b/sys-apps/azure-nvme-utils/Manifest
@@ -1 +1 @@
-DIST azure-nvme-utils-0.1.2_p20240502.tar.gz 11362 BLAKE2B 
593a1670af3d01e400afb4cf21e9cb3a6456da3ad7914d020462fb50950a8e6d8255ad14fcb8708d44f55f3170a72f824e0fae942a560bf69c6d9770c4da1d2b
 SHA512 
e4d0f3a400e16dc119b1562ec2abfb1e520ef58de46a36fccd4fd9db773c95ad218cc38a406cb644188ca6c66c7e84292cbcae3dad5f1e4b2c3ae0b24aa5077d
+DIST azure-nvme-utils-0.1.3.tar.gz 11365 BLAKE2B 
97b040a6cdacdd1e8eede89b16722a8e870c6027f0318ce0700ce4087f93fb2df7b25ab3154567548a1704cd9585a4f0cda3cf2bdde408990a715b96639225b4
 SHA512 
42b6ada9ec2db9d53e4b7f9b4a4dc581a06af2954c0da94a5851ed88b66cc2d349c3b6b3a7d4bcf73a68094620df4cd9d480dde31edaf9b80d5235129b634fa8

diff --git a/sys-apps/azure-nvme-utils/azure-nvme-utils-0.1.2_p20240502.ebuild 
b/sys-apps/azure-nvme-utils/azure-nvme-utils-0.1.3.ebuild
similarity index 72%
rename from sys-apps/azure-nvme-utils/azure-nvme-utils-0.1.2_p20240502.ebuild
rename to sys-apps/azure-nvme-utils/azure-nvme-utils-0.1.3.ebuild
index b7583d7e80d4..0eaa5b559aab 100644
--- a/sys-apps/azure-nvme-utils/azure-nvme-utils-0.1.2_p20240502.ebuild
+++ b/sys-apps/azure-nvme-utils/azure-nvme-utils-0.1.3.ebuild
@@ -5,12 +5,9 @@ EAPI=8
 
 inherit cmake udev
 
-COMMIT="cbf8c65d0d792b7dfc02dcaa55d5ec3077464ee6"
 DESCRIPTION="Utility to help identify Azure NVMe devices"
 HOMEPAGE="https://github.com/Azure/azure-nvme-utils";
-#SRC_URI="https://github.com/Azure/${PN}/archive/refs/tags/v${PV}/${P}.tar.gz";
-SRC_URI="https://github.com/Azure/${PN}/archive/${COMMIT}/${P}.tar.gz";
-S="${WORKDIR}/${PN}-${COMMIT}"
+SRC_URI="https://github.com/Azure/${PN}/archive/refs/tags/v${PV}/${P}.tar.gz";
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64"
@@ -20,6 +17,10 @@ BDEPEND="
        doc? ( app-text/pandoc )
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-werror.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                -DAZURE_LUN_CALCULATION_BY_NSID_ENABLED=$(usex lun-fallback)
@@ -28,3 +29,11 @@ src_configure() {
        )
        cmake_src_configure
 }
+
+pkg_postinst() {
+       udev_reload
+}
+
+pkg_postrm() {
+       udev_reload
+}

diff --git a/sys-apps/azure-nvme-utils/files/azure-nvme-utils-werror.patch 
b/sys-apps/azure-nvme-utils/files/azure-nvme-utils-werror.patch
new file mode 100644
index 000000000000..928dcb099e4e
--- /dev/null
+++ b/sys-apps/azure-nvme-utils/files/azure-nvme-utils-werror.patch
@@ -0,0 +1,31 @@
+From d4afc19a9432e1b7c25269732d18143263f87404 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Fri, 3 May 2024 12:52:04 +0100
+Subject: [PATCH] cmake: Only enable -Werror for debug builds
+
+-Werror is very unhelpful for distributions and end users as different
+(usually newer) compilers will raise warnings that the maintainers may
+not see. The warnings should get reported upstream, but they shouldn't
+block users from using the software.
+
+Signed-off-by: James Le Cuirot <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d3cd4b..75db578 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,7 +17,7 @@ include(cmake/doc.cmake)
+ include(CTest)
+ enable_testing()
+ 
+-add_compile_options(-Wextra -Wall -Werror -std=gnu11 -D_GNU_SOURCE=1)
++add_compile_options(-Wextra -Wall $<$<CONFIG:Debug>:-Werror> -std=gnu11 
-D_GNU_SOURCE=1)
+ add_executable(azure-nvme-id src/main.c)
+ 
+ set(AZURE_NVME_ID_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+-- 
+2.44.0
+

Reply via email to