Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704406 - sys-apps/nvme-cli-1.9 installs systemd units and udev rules to wrong dir
Summary: sys-apps/nvme-cli-1.9 installs systemd units and udev rules to wrong dir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-31 22:00 UTC by Georgy Yakovlev
Modified: 2020-01-07 20:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Install systemd and udev files in the right place (0001-sys-apps-nvme-cli-install-systemd-and-udev-files-in-.patch,1.35 KB, patch)
2019-12-31 22:55 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2019-12-31 22:00:53 UTC
files should be in /lib/systemd/system

qfile /usr/lib/systemd/system
sys-apps/nvme-cli: /usr/lib/systemd/system

tree /usr/lib/systemd/system
/usr/lib/systemd/system
├── nvmefc-boot-connections.service
├── nvmf-connect@.service
└── nvmf-connect.target

0 directories, 3 files


from makefile I see it uses

LIBDIR ?= $(PREFIX)/lib
SYSTEMDDIR ?= $(LIBDIR)/systemd

and 

install-systemd:
	$(INSTALL) -d $(DESTDIR)$(SYSTEMDDIR)/system
	$(INSTALL) -m 644 ./nvmf-autoconnect/systemd/* $(DESTDIR)$(SYSTEMDDIR)/system
Comment 1 Mike Gilbert gentoo-dev 2019-12-31 22:43:03 UTC
The same think happens on systems running systemd.

The udev rules are installed in the wrong place as well.
Comment 2 Mike Gilbert gentoo-dev 2019-12-31 22:55:16 UTC
Created attachment 602146 [details, diff]
Install systemd and udev files in the right place
Comment 3 Georgy Yakovlev archtester gentoo-dev 2019-12-31 23:00:24 UTC
systemd_get_systemunitdir returns /lib/systemd/system

and makefile installs to /lib/systemd/system

with the patch units will end up in /lib/systemd/system/system

├── lib
│   ├── systemd
│   │   └── system
│   │       └── system
│   │           ├── nvmefc-boot-connections.service
│   │           ├── nvmf-connect@.service
│   │           └── nvmf-connect.target
│   └── udev
│       └── rules.d
│           └── 70-nvmf-autoconnect.rules
Comment 4 Georgy Yakovlev archtester gentoo-dev 2019-12-31 23:04:03 UTC
need to either patch makefile or
local unitdir="$(systemd_get_systemunitdir)"
export SYSTEMDDIR="${unitdir%system/}"
Comment 5 Larry the Git Cow gentoo-dev 2019-12-31 23:04:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52cfe1d3cf67f43859a9944f4fcd5f4874f1ed2

commit f52cfe1d3cf67f43859a9944f4fcd5f4874f1ed2
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-12-31 22:53:30 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-12-31 23:03:30 +0000

    sys-apps/nvme-cli: install systemd and udev files in the right place
    
    Closes: https://bugs.gentoo.org/704406
    Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/nvme-cli/{nvme-cli-1.9.ebuild => nvme-cli-1.9-r1.ebuild} | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 6 Zac Medico gentoo-dev 2019-12-31 23:05:27 UTC
Thanks guys!
Comment 7 Larry the Git Cow gentoo-dev 2019-12-31 23:11:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6ee38095605592f04aee5c351057afa0bbd8e35

commit f6ee38095605592f04aee5c351057afa0bbd8e35
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-12-31 23:11:18 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-12-31 23:11:18 +0000

    sys-apps/nvme-cli: trim "/system" from SYSTEMDDIR
    
    Bug: https://bugs.gentoo.org/704406
    Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/nvme-cli/{nvme-cli-1.9-r1.ebuild => nvme-cli-1.9-r2.ebuild} | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 8 Mike Gilbert gentoo-dev 2019-12-31 23:12:08 UTC
(In reply to Georgy Yakovlev from comment #3)

Good catch.
Comment 9 Georgy Yakovlev archtester gentoo-dev 2019-12-31 23:18:30 UTC
quickest fix eva! =) thanks.
good catch with udev as well, totally missed it.