commit:     9823529fb7f0247adf24c63696724b6ca4cdd934
Author:     Krzesimir Nowak <knowak <AT> microsoft <DOT> com>
AuthorDate: Thu May 25 14:24:36 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu May 25 15:14:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9823529f

sys-apps/nvme-cli: Install udev rules and systemd units in correct places

Udev rules should be installed in rules.d directory (so in
`/usr/lib/udev/rules.d`), currently they are installed in
`/usr/lib/udev`. This mistake probably comes from a build system
change, where for old build system (in version 1.16), UDEVDIR was
supposed to be specified, and the build system defined UDEVRULESDIR
based on the former (see
https://github.com/linux-nvme/nvme-cli/blob/v1.16/Makefile#L17-L18). The
new build system expects the udev rules directory to be passed as a
parameter.

Similar mistake happened for the systemd unit directory - the systemd
unit files are installed in `/usr/lib/systemd/system`, not in
`/usr/lib/systemd`. This one stems from a change in meaning of the
`systemddir` option in the build system - in the old build system it
meant to be `/usr/lib/systemd` and the `system` subdirectory was
appended by the old build system when installing the units (see
https://github.com/linux-nvme/nvme-cli/blob/v1.16/Makefile#L142-L144).
The new build system does not do it any more - it just installs the
units to `systemddir` (see
https://github.com/linux-nvme/nvme-cli/blob/v1.16/Makefile#L142-L144),
thus making the `systemddir` option name rather misleading - probably
should be named `systemdunitdir`, as `systemddir` is not used for
anything else (see
https://github.com/linux-nvme/nvme-cli/blob/v2.4/Makefile#L49).

Signed-off-by: Krzesimir Nowak <knowak <AT> microsoft.com>
Closes: https://github.com/gentoo/gentoo/pull/31159
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/nvme-cli/{nvme-cli-2.4-r1.ebuild => nvme-cli-2.4-r2.ebuild} | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys-apps/nvme-cli/nvme-cli-2.4-r1.ebuild 
b/sys-apps/nvme-cli/nvme-cli-2.4-r2.ebuild
similarity index 88%
rename from sys-apps/nvme-cli/nvme-cli-2.4-r1.ebuild
rename to sys-apps/nvme-cli/nvme-cli-2.4-r2.ebuild
index 6f0241ae96c5..8f6d78dffcbc 100644
--- a/sys-apps/nvme-cli/nvme-cli-2.4-r1.ebuild
+++ b/sys-apps/nvme-cli/nvme-cli-2.4-r2.ebuild
@@ -34,13 +34,12 @@ PATCHES=(
 )
 
 src_configure() {
-       local unitdir="$(systemd_get_systemunitdir)"
        local emesonargs=(
                -Dversion-tag="${PV}"
                -Ddocs=all
                -Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html"
-               -Dsystemddir="${unitdir%/system}"
-               -Dudevrulesdir="${EPREFIX}$(get_udevdir)"
+               -Dsystemddir="$(systemd_get_systemunitdir)"
+               -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
                $(meson_use hugepages)
                $(meson_feature json json-c)
        )

Reply via email to