-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fwupd: split daemon again #79371
fwupd: split daemon again #79371
Conversation
Looks like we need to disable the |
Marked as a blocker because I forgot to disable the invalid plug-in in the previous PR. |
# We do not want to place the daemon into lib | ||
"--libexecdir=${placeholder "out"}/libexec" | ||
# Our builder only adds $lib/lib into rpath | ||
"-Dc_link_args=-Wl,-rpath,${placeholder "out"}/lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else I think I understand here, but would you mind explaining this for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Nix does not have /usr/lib
, every library a program depends on must have path for finding it listed in DT_RUNPATH
entry in the ELF file. Our generic builder populates the entry for us but apparently only with lib
outputs. Because the libfwupdplugin
is in out
its location is not included so we need to add it manually.
I believe the builder adds every /lib
directory to entry of every[citation needed] ELF file but superfluous paths (those not containing libraries listed in DT_NEEDED
entries) are stripped by[citation needed] strip
setup-hook so there is no cycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improved the comments slightly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot 👍 All clear here.
In 1.3.5, fwupdprivate library was made into a shared fwupdplugin library. This library is considered semi-private and is used by fwupd daemon and fwupd plug-ins and now possibly third party plug-ins. The fwupdplugin library refers to the plug-in directory in fwupd.out causing a dependency cycle. For that reason we need to move it to out.
invalid test was introduced in fwupd/fwupd@297d159 and it is disabled in the shipped daemon.conf. I forgot to reflect that in the module, which caused the daemon to print the following on start-up: FuEngine invalid has incorrect built version invalid and the command to warn: WARNING: The daemon has loaded 3rd party code and is no longer supported by the upstream developers! To reduce the change of this happening in the future, I moved the list of default disabled plug-ins to the package expression. I also set the value of the NixOS module option in the config section of the module instead of the default value used previously, which will allow users to not care about these plug-ins.
@GrahamcOfBorg test installed-tests.fwupd |
fwupd: split daemon again (cherry picked from commit 07281f2)
In 1.3.5, fwupdprivate library was made into a shared fwupdplugin library. This library is considered semi-private and is used by fwupd daemon and fwupd plug-ins and now possibly third party plug-ins.
The fwupdplugin library refers to the plug-in directory in fwupd.out causing a dependency cycle. For that reason we need to move it to out.
tests.fwupd
succeeded.fwupdmgr get-devices
prints devices