libnvme/registry: substitute RUNDIR into the registry udev rule#3539
Merged
Conversation
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>
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3523 (the round-6
RUNDIRchange toREGISTRY_DIR_DEFAULT). The library now derives the registry path from the build'srundirsetting (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 relocatesrundirleft udev cleaning a directory the library no longer writes.Fix: the rule becomes a
70-nvmf-registry.rules.intemplate with@RUNDIR@in theRUN+=line, generated viaconfigure_file(configuration: substs)— the same patternlibnvme.spec.inalready 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.