Conversation
7f7d25e to
4783dd7
Compare
There was a problem hiding this comment.
Any specific reason to disable tests?
There was a problem hiding this comment.
Just porting the configureFlags from before. I will try to make the tests run later but first we need to make /var and /etc work.
9c00bfa to
2fe87c6
Compare
|
The service now builds and runs but there are some errors in the journal: |
|
Not sure what else I can do about it. |
|
Not sure, but couldn't these messages just mean that some hardware or vendor-specific plugins can't be loaded because they don't correspond to the actual hardware? The only oddity is the first line, which may just mean that fwupdmgr is trying to load a database from a wrong location. On a related topic, I'd like to test this PR, but I don't know how. Do I need to fork nixpkgs, merge jtojnar's branch and somehow instruct NixOS to get nixpkgs from my fork? I'd appreciate pointers to relevant documentations, I don't know what to search for. Thanks! |
|
Yes, just fetch the branch and rebuild from the directory. |
|
Thanks @jtojnar ! I've just tried your branch at 3fb5702, |
|
@thblt Are there any updates when you list |
|
I haven't tested this. There was at least one possible updates, firmware to 1.5, which I ended up doing directly from the BIOS (sorry, it was a bit urgent, I would have waited otherwise). It appears in <component type="firmware">
<id>com.dell.uefi34578c72.firmware</id>
<name>XPS 15 9560/Precision 5520 System Update</name>
<summary>Firmware for the Dell XPS 15 9560/Precision 5520</summary>
<developer_name>Dell Inc.</developer_name>
<project_license>proprietary</project_license>
<description><p>Updating the system firmware improves performance.</p></description>
<url type="homepage">http://support.dell.com/</url>
<releases>
<release version="66816" timestamp="1504150320">
<size type="installed">10334313</size>
<size type="download">10051765</size>
<location>https://fwupd.org/downloads/e69073e5403ee433ddfdd40b53781e91074b07b2-firmware_XPS_9560_1_5_0.wu.cab</location>
<checksum filename="e69073e5403ee433ddfdd40b53781e91074b07b2-firmware_XPS_9560_1_5_0.wu.cab" target="container" type="sha1">dd472551e4c6f80c5cfd0ffcb3f477ef120fe358</checksum>
<checksum filename="firmware.bin" target="content" type="sha1">e05410c1cd3c96e0f5cafa5e29c59ab1f88f601b</checksum>
</release> |
|
Is @thblt test conclusive enough? |
|
I needed to use @jtojnar's work here and can confirm it has worked well for me. |
|
@GrahamcOfBorg build fwupd |
GrahamcOfBorg
left a comment
There was a problem hiding this comment.
Failure for system: x86_64-darwin
error: Package ‘fwupd-1.0.1’ in /tmp/nix-ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/30252/pkgs/os-specific/linux/firmware/fwupd/default.nix:10 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
GrahamcOfBorg
left a comment
There was a problem hiding this comment.
Success for system: x86_64-linux
shrinking /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib/fwupd-plugins-3/libfu_plugin_steelseries.so
shrinking /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib/fwupd-plugins-3/libfu_plugin_amt.so
shrinking /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib/fwupd-plugins-3/libfu_plugin_colorhug.so
shrinking /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib/fwupd-plugins-3/libfu_plugin_thunderbolt_power.so
shrinking /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib/fwupd-plugins-3/libfu_plugin_unifying.so
shrinking /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib/libfwupd.so.2.0.0
stripping (with flags -S) in /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/lib /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/libexec /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1/bin
patching script interpreter paths in /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1
checking for references to /tmp/nix-build-fwupd-1.0.1.drv-0 in /nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1...
/nix/store/2v57k7bvhy3i11w3vb9q1j2275mw0kf6-fwupd-1.0.1
| originalEtc = | ||
| let | ||
| isRegular = v: v == "regular"; | ||
| listFiles = d: builtins.attrNames (filterAttrs (const isRegular) (builtins.readDir d)); |
There was a problem hiding this comment.
Please, not this! It causes building during evaluation of your system, which breaks various assumptions, like Hydra rebuilding stdenv when it's only supposed to get a list of jobs. Especially as this service is enabled by default.
There was a problem hiding this comment.
BTW, we apparently had some other places like this, but they most likely haven't been tracked down yet. #29774
There was a problem hiding this comment.
Agreed, this should be fixed or reverted. And why is the service enabled by default?
There was a problem hiding this comment.
fwupd increases the size of the smallContainer from 400 to 800 MiB: https://hydra.nixos.org/job/nixos/trunk-combined/nixos.closures.smallContainer.x86_64-linux#tabs-charts
There was a problem hiding this comment.
Yeah, not suitable to be on by default in this state.
There was a problem hiding this comment.
Sorry about enabling it by default, that was not intended.
Is there any better way to install the files to etc other than hardcoding the list of files?
There was a problem hiding this comment.
I don't know of any. You often don't even need to put anything into /etc/ and you just pass paths to some /nix/store/... as config. But I'm not really good at nixos module best practices.
There was a problem hiding this comment.
Is there any better way to install the files to etc other than hardcoding the list of files?
I see three options:
- hardcode the list of files
- write a custom activation script
- extend the existing activation script: https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/system/etc/
I am not sure which is better: the first is fine if fwupd is the only package that needs it (you may list the files in a passthru attribute of the fwupd definition to keep them closer to the source), the second is hard to justify, and the third is more work and may be hard to get right, but is the right approach to support more dynamic /etc.
Motivation for this change
I cherry-picked from GNOME 3.26, where it builds sandboxed. Then I updated again (to 1.0.0), added a nixos service and hopefully fixed the problems from #24376. The new version contains some backwards incompatible changes but we do not depend on it anywhere.
There are several issues:
mesonFlags variable does not interpolate variables so I had to modify it in preConfigureHook.The sysconfdir and localstatedir are inside the nix store, i.e. not writeable, making any operation impossible. I also had to removeSolved by NixOS module.ReadWritePathsfrom systemd service file to prevent “Failed at step NAMESPACE spawning” error.Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)cc @shlevy