Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 821538 - sys-apps/fwupd-1.7.1: fails to build with >=dev-util/meson-0.60.0 (ERROR: Unknown options: "agent")
Summary: sys-apps/fwupd-1.7.1: fails to build with >=dev-util/meson-0.60.0 (ERROR: Unk...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: meson-0.60.x
  Show dependency tree
 
Reported: 2021-11-03 22:59 UTC by Duncan
Modified: 2021-11-12 18:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2021-11-03 22:59:47 UTC
Executive summary:  This particular bug seems to be that fwupd lost its former meson -Dagent option some versions ago, but nobody noticed as meson-0.59.x simply spits out an unrecognized option WARNING and continues, while meson-0.60.x now aborts with an ERROR.  So while this particular bug seems to be in the fwupd ebuild, it's very likely the new meson-0.60.x behavior will expose similar bugs in other meson-build-system packages, that weren't previously caught because it was previously just a warning and didn't abort the build until now.

Further detail:

I have fwupd-1.7.0 presently merged but it refused to remerge with the same error given for 1.7.1 below, so I got suspicious and checked the earlier package updates in the session, finding meson-0.59.3 was updated to 0.60.1.  So I tried downgrading to the also new meson-0.59.4 and fwupd-1.7.1 built (and runs) fine with it.

*But*, I did notice that the bit that triggers the meson ERROR below with meson-0.60.1, triggered a similarly worded WARNING in the same spot with 0.59.4, tho it didn't abort the build as it does with 0.60.1.

So what seems to have happened is that meson-0.60 changed the unrecognized-option WARNING of 0.59 to an ERROR, so it now terminates the fwupd build.

Meanwhile, given the error mentioning "agent", it's worth mentioning that for fwupd my default is USE=-agent (as seen below) but USE=agent yields the same meson error, so the passed -Dagent option appears to be outdated and no longer recognized (with the USE flag either on or off), resulting in a warning with meson-0.59.x which changed to an error with 0.60.x.  Evidently that option needs removed from the fwupd ebuild (which suggests meson-0.60 changing the warning to an error is a good thing, as that would presumably have then been caught in bump-testing when fwupd first removed the option), tho I'm not sure if it's replaced by another option or simply removed.

The build log is short enough I've pasted the whole thing (excluding some of the std portage boilerplate but including the --ask --verbose output for the USE flags) below.  The mentioned meson-log.txt is short too, so it's below that.

fwupd build output:

[ebuild     U  ] sys-apps/fwupd-1.7.1::gentoo [1.7.0::gentoo] USE="gnutls gusb logitech lzma man systemd -agent -amt -archive -bluetooth -dell -elogind -fastboot% -flashrom -gtk-doc -introspection -minimal -modemmanager -nvme -policykit -spi -synaptics -test -thunderbolt -tpm -uefi" PYTHON_SINGLE_TARGET="python3_9 -python3_8 -python3_10" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-apps/fwupd-1.7.1::gentoo
* fwupd-1.7.1.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                              [ ok ]
* Using python3.9 to build
>>> Unpacking source...
>>> Unpacking fwupd-1.7.1.tar.gz to /tmp/portage/sys-apps/fwupd-1.7.1/work
>>> Source unpacked in /tmp/portage/sys-apps/fwupd-1.7.1/work
>>> Preparing source in /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1 ...
>>> Source prepared.
>>> Configuring source in /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1 ...
meson setup --libdir lib64 --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload --build.pkg-config-path /tmp/portage/sys-apps/fwupd-1.7.1/temp/pkgconfig:/tmp/portage/sys-apps/fwupd-1.7.1/temp/python3.9/pkgconfig:/usr/share/pkgconfig --pkg-config-path /tmp/portage/sys-apps/fwupd-1.7.1/temp/pkgconfig:/tmp/portage/sys-apps/fwupd-1.7.1/temp/python3.9/pkgconfig:/usr/share/pkgconfig --native-file /tmp/portage/sys-apps/fwupd-1.7.1/temp/meson.x86_64-pc-linux-gnu.amd64.ini --buildtype plain --localstatedir /var -Dbuild=all -Dconsolekit=false -Dcurl=true -Ddocs=none -Defi_binary=false -Dsupported_build=true -Dagent=false -Dlibarchive=false-Dbluez=false -Delogind=false -Dgnutls=true -Dgusb=true -Dlzma=true -Dman=true -Dintrospection=false -Dpolkit=false -Dsystemd=true -Dtests=false -Dplugin_amt=false -Dplugin_dell=false -Dplugin_fastboot=false -Dplugin_flashrom=false -Dplugin_altos=true -Dplugin_logitech_bulkcontroller=true -Dplugin_modem_manager=false -Dplugin_nvme=false -Dplugin_intel_spi=false -Dplugin_synaptics_mst=false -Dplugin_synaptics_rmi=false -Dplugin_thunderbolt=false -Dplugin_tpm=false -Dplugin_uefi_capsule=false -Dplugin_uefi_capsule_splash=false -Dplugin_uefi_pk=false /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1 /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1-build
The Meson build system
Version: 0.60.1
Source dir: /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1
Build dir: /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1-build
Build type: native build

meson.build:1:0: ERROR: Unknown options: "agent"

A full log can be found at /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1-build/meson-logs/meson-log.txt

That meson-log.txt:

Build started at 2021-11-03T14:16:18.833445
Main binary: /usr/sbin/python3.9
Build Options: -Dbuild=all -Dconsolekit=false -Dcurl=true -Ddocs=none -Defi_binary=false -Dsupported_build=true -Dagent=false -Dlibarchive=false -Dbluez=false -Delogind=false -Dgnutls=true -Dgusb=true -Dlzma=true -Dman=true -Dintrospection=false -Dpolkit=false -Dsystemd=true -Dtests=false -Dplugin_amt=false -Dplugin_dell=false -Dplugin_fastboot=false -Dplugin_flashrom=false -Dplugin_altos=true -Dplugin_logitech_bulkcontroller=true -Dplugin_modem_manager=false -Dplugin_nvme=false -Dplugin_intel_spi=false -Dplugin_synaptics_mst=false -Dplugin_synaptics_rmi=false -Dplugin_thunderbolt=false -Dplugin_tpm=false -Dplugin_uefi_capsule=false -Dplugin_uefi_capsule_splash=false -Dplugin_uefi_pk=false -Dprefix=/usr -Dlibdir=lib64 -Dlocalstatedir=/var -Dsysconfdir=/etc -Dbuildtype=plain -Dwrap_mode=nodownload -Dbuild.pkg_config_path=/tmp/portage/sys-apps/fwupd-1.7.1/temp/pkgconfig:/tmp/portage/sys-apps/fwupd-1.7.1/temp/python3.9/pkgconfig:/usr/share/pkgconfig -Dpkg_config_path=/tmp/portage/sys-apps/fwupd-1.7.1/temp/pkgconfig:/tmp/portage/sys-apps/fwupd-1.7.1/temp/python3.9/pkgconfig:/usr/share/pkgconfig '--native-file /tmp/portage/sys-apps/fwupd-1.7.1/temp/meson.x86_64-pc-linux-gnu.amd64.ini'
Python system: Linux
The Meson build system
Version: 0.60.1
Source dir: /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1
Build dir: /tmp/portage/sys-apps/fwupd-1.7.1/work/fwupd-1.7.1-build
Build type: native build

meson.build:1:0: ERROR: Unknown options: "agent"
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-03 23:38:29 UTC
Yeah, this changed upstream to become fatal in newer Mesons.
Comment 2 Duncan 2021-11-03 23:44:53 UTC
(In reply to Duncan from comment #0)
> Executive summary:  This particular bug seems to be that fwupd lost its
> former meson -Dagent option some versions ago

Indeed.  Looking at meson_options.txt for tags at https://github.com/fwupd/fwupd/ , it appears fwupd-1.6.1 from June 14 was the last containing the agent option.  1.6.2 contains commit f0bc835 "Move all the fwupdagent code to fwupdmgr" https://github.com/fwupd/fwupd/commit/f0bc83576915017a6e7fbee40c55f49f59925c12 which removes the option.

So the agent option has been gone for several releases, and I regularly see fwupd bumps so gentoo has gotten at least some of them, but nobody noticed because pre-meson-0.60 the unrecognized option was just a warning and the build continued despite the ebuild specifying the unknown option.  With meson-0.60.1 it aborts.

FWIW the rest of the git comment for that commit >>>

We want to provide a lot more in JSON format in the future, and this
will reduce a lot of code duplication.

As various people are using this in the wild, the existing fwupdagent
binary just shims requests to fwupdmgr as required. We'll stop doing
this for 2.0.0 or something.

<<<

So it appears the option was just removed, not replaced by another, and the lines in the ebuilds passing it, along with the agent USE flag, can be simply removed.
Comment 3 Duncan 2021-11-03 23:53:06 UTC
(In reply to Duncan from comment #2)
> I regularly see fwupd bumps

Forgot to say it there but thank you.  The timeliness is appreciated. =:^)
Comment 4 Larry the Git Cow gentoo-dev 2021-11-12 18:59:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94af023e21271a240cd86af1290e67381e9cf789

commit 94af023e21271a240cd86af1290e67381e9cf789
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2021-11-12 18:24:51 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2021-11-12 18:59:06 +0000

    sys-apps/fwupd: drop 'agent' USE flag
    
    Closes: https://bugs.gentoo.org/821538
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/fwupd/fwupd-1.6.4-r1.ebuild | 3 +--
 sys-apps/fwupd/fwupd-1.7.1.ebuild    | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)