Skip to content
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: 1.0.1 → 1.0.4 #32751

Merged
merged 12 commits into from Feb 15, 2018
Merged

fwupd: 1.0.1 → 1.0.4 #32751

merged 12 commits into from Feb 15, 2018

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Dec 17, 2017

Motivation for this change

Update and clean-up.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@jtojnar
Copy link
Contributor Author

jtojnar commented Dec 17, 2017

Maybe we can wait for the pull request to be merged so we do not include the patch in repo?

@disassembler
Copy link
Member

@GrahamcOfBorg build fwupd

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: aarch64-linux


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.

(use '--show-trace' to show detailed location information)

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: x86_64-darwin

error: Package ‘fwupd-1.0.2’ in /tmp/nix-ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/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.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

shrinking /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib/fwupd-plugins-3/libfu_plugin_steelseries.so
shrinking /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib/fwupd-plugins-3/libfu_plugin_amt.so
shrinking /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib/fwupd-plugins-3/libfu_plugin_colorhug.so
shrinking /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib/fwupd-plugins-3/libfu_plugin_thunderbolt_power.so
shrinking /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib/fwupd-plugins-3/libfu_plugin_unifying.so
shrinking /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib/libfwupd.so.2.0.0
stripping (with flags -S) in /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/lib  /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/libexec  /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2/bin 
patching script interpreter paths in /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2
checking for references to /tmp/nix-build-fwupd-1.0.2.drv-0 in /nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2...
/nix/store/kxl44x4605vcqm9sh01v631nbk8gay1i-fwupd-1.0.2

@disassembler
Copy link
Member

looks good! I don't see any problems with merging with the patch, but if you want to wait, that's fine too.

@jtojnar
Copy link
Contributor Author

jtojnar commented Dec 17, 2017

Waiting few days should not be a problem.

Regarding the aarch64 failure, we could remove libsmbios dependency on that platform. Unless smbios is supported on ARM and the limitation is only artificial.

@grahamc
Copy link
Member

grahamc commented Dec 17, 2017

Originally designed for Intel® processor architecture systems, SMBIOS now includes support for IA-32 (x86), x64 (x86-64, Intel64, AMD64, EM64T), Intel® Itanium® architecture, 32-bit ARM (Aarch32) and 64-bit ARM (Aarch64).

however our libsmbios does not live up to this claim:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./out/include -I./out/include -I./src/include -DLIBSMBIOS_LOCALEDIR=\"/nix/store/fvdfb1cy430j35n0vpb5c6n7a48sf2bi-libsmbios-2.3.3/share/locale\" -I./src/libsmbios_c/common -Wall -fPIC -fvisibility=hidden -g -O2 -DLIBSMBIOS_C_ALL_DYN_LINK -c src/libsmbios_c/token/token_da.c  -fPIC -DPIC -o src/libsmbios_c/token/.libs/out_libsmbios_c_la-token_da.o
src/libsmbios_c/cmos/cmos_linux.c:25:20: fatal error: sys/io.h: No such file or directory
 #include <sys/io.h>
                    ^
compilation terminated.
make[1]: *** [Makefile:2599: src/libsmbios_c/cmos/out_libsmbios_c_la-cmos_linux.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
src/libsmbios_c/smi/smi_linux.c: In function 'LINUX_dell_smi_obj_execute':
src/libsmbios_c/smi/smi_linux.c:308:9: warning: ignoring return value of 'strerror_r', declared with attribute warn_unused_result [-Wunused-result]
         strerror_r(errno, this->errstring + curstrsize, ERROR_BUFSIZE - curstrsize - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/build/source'
make: *** [Makefile:3313: all-recursive] Error 1
builder for '/nix/store/15wkv5b5w3rfvcc8hxmvvs7i4r0d092v-libsmbios-2.3.3.drv' failed with exit code 2
cannot build derivation '/nix/store/grsmim0p1sp71rm5hj5a68np3znfkkyg-fwupd-1.0.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/grsmim0p1sp71rm5hj5a68np3znfkkyg-fwupd-1.0.2.drv' failed

I'm not sure we strictly need to handle the aarch64 failure at this time.

@jtojnar jtojnar changed the title fwupd: 1.0.1 → 1.0.2 fwupd: 1.0.1 → 1.0.3 Jan 19, 2018
@dtzWill
Copy link
Member

dtzWill commented Feb 9, 2018

beep boop, ping! 1.0.4 is now out, FWIW!

@dtzWill
Copy link
Member

dtzWill commented Feb 9, 2018

This seems to do the trick:

From 6fb73e976372fbebf00e3d27e465dfa06121c3ee Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Fri, 9 Feb 2018 14:37:23 -0600
Subject: [PATCH] fwupd: 1.0.3 -> 1.0.4

---
 pkgs/os-specific/linux/firmware/fwupd/default.nix | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix
index cf2216d3916..a67a052e5fe 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -1,18 +1,16 @@
-{ stdenv, fetchFromGitHub, gtk_doc, pkgconfig, gobjectIntrospection, intltool
+{ stdenv, fetchurl, gtk_doc, pkgconfig, gobjectIntrospection, intltool
 , libgudev, polkit, appstream-glib, gusb, sqlite, libarchive, glib_networking
 , libsoup, docbook2x, gpgme, libxslt, libelf, libsmbios, efivar, glibcLocales
 , fwupdate, libyaml, valgrind, meson, libuuid, pygobject3, colord
-, pillow, ninja, gcab, gnutls, python3Packages, wrapGAppsHook
+, pillow, ninja, gcab, gnutls, python3Packages, wrapGAppsHook, json_glib
 }:
 let
-  version = "1.0.3";
+  version = "1.0.4";
 in stdenv.mkDerivation {
   name = "fwupd-${version}";
-  src = fetchFromGitHub {
-    owner = "hughsie";
-    repo = "fwupd";
-    rev = version;
-    sha256 = "0vg9f1gzcvfd7jnfhvv0ylf04fy7cw31ykrim7qik6gbkhr4gr65";
+  src = fetchurl {
+    url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
+    sha256 = "1n4d6fw3ffg051072hbxn106s52x2wlh5dh2kxwdfjsb5kh03ra3";
   };
 
   nativeBuildInputs = [
@@ -21,7 +19,7 @@ in stdenv.mkDerivation {
   ];
   buildInputs = [
     polkit appstream-glib gusb sqlite libarchive libsoup libelf libsmbios fwupdate libyaml
-    libgudev colord gpgme libuuid pillow gnutls glib_networking efivar
+    libgudev colord gpgme libuuid pillow gnutls glib_networking efivar json_glib
   ];
 
   LC_ALL = "en_US.UTF-8"; # For po/make-images
-- 
2.16.1

@dtzWill
Copy link
Member

dtzWill commented Feb 9, 2018

Hmm, for some reason using this (1.0.4) as well at least on master (1.0.1) doesn't seem to find updates.

Logs show messages like:

/var/lib/fwupd/remotes.d/lvfs/metadata.xml.gz file: cannot process file of type text/plain

Which is strange, considering:

$ file /var/lib/fwupd/remotes.d/lvfs/metadata.xml.gz
/var/lib/fwupd/remotes.d/lvfs/metadata.xml.gz: gzip compressed data, from Unix

Oh! Searching on upstream's github it appears you've discussed this and we need to update gcab, maybe?

fwupd/fwupd#318 (comment)

@dtzWill
Copy link
Member

dtzWill commented Feb 9, 2018

https://github.com/dtzWill/nixpkgs/tree/experimental/fwupd bumps our gcab and appstream-glib (with no testing of anything other than blitzing a path to fwupd 😇), if that's helpful.

Unfortunately still seeing the problem re:unable to parse text/plain. Dunno.

@jtojnar
Copy link
Contributor Author

jtojnar commented Feb 12, 2018

Oh! Searching on upstream's github it appears you've discussed this and we need to update gcab, maybe?

The issue I was reporting was caused by a broken error handler, it has nothing to do with gcab and it was fixed in fwupd/fwupd@5f733f2 – the “cannot process file of type text/plain” only triggered the bug.

I noticed your issue in 1.0.1 but since I only needed fwupd as a build dependency for gnome-software, I did not pay it much heed. It should probably be reported upstream.

@dtzWill
Copy link
Member

dtzWill commented Feb 12, 2018

Looks like we need shared_mime_info, something like this in preFixup: gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared_mime_info}/share").

That seems to fix problems parsing the remotes' XML! Woo. But nothing seems to happen when I request the updates are performed/applied.

@jtojnar jtojnar changed the title fwupd: 1.0.1 → 1.0.3 fwupd: 1.0.1 → 1.0.4 Feb 13, 2018
@jtojnar
Copy link
Contributor Author

jtojnar commented Feb 13, 2018

@dtzWill I merged your gcab update and appstream-glib update from my other branch.

And efivar was updated just now so I think this is ready to merge.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘libsmbios-2.3.3’ in /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/os-specific/linux/libsmbios/default.nix:34 is not supported on ‘aarch64-linux’, 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
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘appstream-glib-0.7.6’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/development/libraries/appstream-glib/default.nix:43 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
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘libsmbios-2.3.3’ in /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/pkgs/os-specific/linux/libsmbios/default.nix:34 is not supported on ‘aarch64-linux’, 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
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘appstream-glib-0.7.6’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/development/libraries/appstream-glib/default.nix:43 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
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

checking for references to /build in /nix/store/7afryq6x0yavny7gddd6029m1fbcyx4r-fwupd-1.0.4-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/plrgp1v4pk29nmmci9kr6f8y6gqj6nks-fwupd-1.0.4-installedTests
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/plrgp1v4pk29nmmci9kr6f8y6gqj6nks-fwupd-1.0.4-installedTests
checking for references to /build in /nix/store/plrgp1v4pk29nmmci9kr6f8y6gqj6nks-fwupd-1.0.4-installedTests...
/nix/store/dpbdn5kmfy9acg5x0kf5vpvgsp6rki4v-appstream-glib-0.7.6
/nix/store/s9hgjjb3id9wymbrcwrfmqx459k4lxbr-efivar-34
/nix/store/3d3y6spkfi9vsvqp241ivkcss9cjfngw-fwupd-1.0.4
/nix/store/n75ay4va22mw4g7bb364qzrfyj7bfcx4-gcab-1.1
/nix/store/js1x5hw8w91pzzkj0fbaijjdwkyjxprz-gnome-desktop-testing-2016.1

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘libsmbios-2.3.3’ in /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/os-specific/linux/libsmbios/default.nix:34 is not supported on ‘aarch64-linux’, 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
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘appstream-glib-0.7.6’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/development/libraries/appstream-glib/default.nix:43 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
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

/nix/store/dpbdn5kmfy9acg5x0kf5vpvgsp6rki4v-appstream-glib-0.7.6
/nix/store/s9hgjjb3id9wymbrcwrfmqx459k4lxbr-efivar-34
/nix/store/3d3y6spkfi9vsvqp241ivkcss9cjfngw-fwupd-1.0.4
/nix/store/n75ay4va22mw4g7bb364qzrfyj7bfcx4-gcab-1.1
/nix/store/js1x5hw8w91pzzkj0fbaijjdwkyjxprz-gnome-desktop-testing-2016.1

@jtojnar jtojnar mentioned this pull request Feb 14, 2018
44 tasks
@jtojnar jtojnar force-pushed the fwupd-1.0.2 branch 2 times, most recently from 03617f7 to f118d2b Compare February 15, 2018 00:14
@jtojnar jtojnar merged commit c6283e6 into NixOS:master Feb 15, 2018
@jtojnar jtojnar deleted the fwupd-1.0.2 branch February 15, 2018 00:18
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Package ‘libsmbios-2.3.3’ in /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/os-specific/linux/libsmbios/default.nix:34 is not supported on ‘aarch64-linux’, 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
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘appstream-glib-0.7.6’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/development/libraries/appstream-glib/default.nix:43 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
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

patching script interpreter paths in /nix/store/7afryq6x0yavny7gddd6029m1fbcyx4r-fwupd-1.0.4-man
checking for references to /tmp/nix-build-fwupd-1.0.4.drv-0 in /nix/store/7afryq6x0yavny7gddd6029m1fbcyx4r-fwupd-1.0.4-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/plrgp1v4pk29nmmci9kr6f8y6gqj6nks-fwupd-1.0.4-installedTests
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/plrgp1v4pk29nmmci9kr6f8y6gqj6nks-fwupd-1.0.4-installedTests
checking for references to /tmp/nix-build-fwupd-1.0.4.drv-0 in /nix/store/plrgp1v4pk29nmmci9kr6f8y6gqj6nks-fwupd-1.0.4-installedTests...
/nix/store/dpbdn5kmfy9acg5x0kf5vpvgsp6rki4v-appstream-glib-0.7.6
/nix/store/s9hgjjb3id9wymbrcwrfmqx459k4lxbr-efivar-34
/nix/store/3d3y6spkfi9vsvqp241ivkcss9cjfngw-fwupd-1.0.4
/nix/store/n75ay4va22mw4g7bb364qzrfyj7bfcx4-gcab-1.1

@@ -258,6 +258,7 @@ in rec {
tests.firefox = callTest tests/firefox.nix {};
tests.firewall = callTest tests/firewall.nix {};
tests.fleet = callTestOnTheseSystems ["x86_64-linux"] tests/fleet.nix {};
tests.fwupd = callTest tests/fwupd.nix {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a problem on Hydra. It causes build during evaluation, most likely due to the code around listFiles. It's probably the cause why it doesn't have resources to evaluate trunk-combined ATM. I disabled the test for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an issue already :-) #32142

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, sorry about that. Still the same old #32142, still not sure how to best fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants