Skip to content

libnvme/registry: substitute RUNDIR into the registry udev rule#3539

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
martin-belanger:registry-rundir
Jul 3, 2026
Merged

libnvme/registry: substitute RUNDIR into the registry udev rule#3539
igaw merged 1 commit into
linux-nvme:masterfrom
martin-belanger:registry-rundir

Conversation

@martin-belanger

Copy link
Copy Markdown

Follow-up to #3523 (the round-6 RUNDIR change to REGISTRY_DIR_DEFAULT). The library now derives the registry path from the build's rundir setting (RUNDIR "/nvme/registry"), but the udev cleanup rule still hardcoded /run/nvme/registry — the rule file was installed as static text, so a build that relocates rundir left udev cleaning a directory the library no longer writes.

Fix: the rule becomes a 70-nvmf-registry.rules.in template with @RUNDIR@ in the RUN+= line, generated via configure_file(configuration: substs) — the same pattern libnvme.spec.in already uses two stanzas above. Both sides of the registry (library and rule) now derive the path from the single meson setting.

No behavior change for a default build: the generated rule is identical modulo the prefix the build already applies everywhere else.

REGISTRY_DIR_DEFAULT follows the build's rundir setting
(RUNDIR "/nvme/registry"), but the udev cleanup rule still hardcoded
/run/nvme/registry, so a build that relocates rundir left the rule and
the library pointing at different directories.  Generate the rule from
a template so both sides derive the path from the same meson setting.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@igaw igaw merged commit a4217c8 into linux-nvme:master Jul 3, 2026
32 checks passed
@igaw

igaw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@martin-belanger martin-belanger deleted the registry-rundir branch July 3, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants