Commit Graph

53 Commits

Author SHA1 Message Date
Mario Limonciello
0b2c717e97 trivial: snap: fix bash completion
fwupdmgr is now using fwupdagent, and so we need to reference properly.
2020-03-20 11:18:00 -05:00
Mario Limonciello
14001f7523 trivial: snap: remove master snap
We're realistically never going to build something with this.
2020-03-20 11:18:00 -05:00
Mario Limonciello
c4bc1ad881 trivial: snap: add fwupdagent command 2020-03-20 11:18:00 -05:00
Mario Limonciello
d6baddc772 trivial: snap: include fwupdtpmevlog command (fixes: #1885) 2020-03-20 11:18:00 -05:00
Elvis Stansvik
efc2e47e48 Start fwupd-activate.service after snapd.service
Instead of using RequiresMountsFor=/snap/fwupd/current, which will not
work since /snap/fwupd/current is a symlink [1].

This will work since the mount units generated by snapd all have
Before=snapd.service, so will be stopped after snapd.service during
shutdown.

With After=snapd.service, fwupd-activate.service will then stop before
snapd.service, at a point when all snap mount units are still running.

Fixes the issue where fwupd-activate.service hangs when stopped, causing
a stop job timeout during shutdown.

[1] See https://github.com/systemd/systemd/issues/8907

Closes #1654
2020-03-15 09:06:21 -05:00
Mario Limonciello
bf6d455687 Move fwupdtool and fwupdagent into bindir
These are intended to be executed by users (albeit for debugging and
advanced users) and shouldn't be left as an internal implementation
per FHS 3.0.
2020-02-20 09:02:11 -06:00
Mario Limonciello
a3069f57b0 trivial: snap: set return code 2 on fwupd-activate.service as success
Otherwise the common case (nothing to do) will return 2 and show the systemd
unit as failed every time.
2019-04-04 22:30:25 +01:00
Mario Limonciello
a29ca19793 snap: Add a custom systemd unit to call activation on shutdown (Fixes: #1125)
The systemd shutdown script gets called after /snap/fwupd/* gets
unmounted meaning it can't be used to do the activation.

Explicitly check that the symlink for /snap/fwupd/current is mounted
when calling the script.
2019-04-02 07:10:56 -05:00
Mario Limonciello
6884795033 trivial: snap: fix install location for shutdown script (Fixes: #1064) 2019-03-03 19:48:27 -06:00
Aleksander Morgado
fc8093626c modem-manager: implement support for qmi-pdc
If a device reports that qmi-pdc is supported (e.g. DW5821e that
supports both fastboot and qmi-pdc), we'll end up first running the
fastboot installation before doing the qmi-pdc installation procedure.

These changes also make sure that the MM device inhibition is kept for
as long as the whole process is ongoing. Only after the last method is
run, the inhibition will be removed.

In order to handle devices being exposed in the system while the MM
inhibition is in place, e.g. to be able to run qmi-pdc after fastboot,
a simple udev based watcher is included, which will take care of
creating the FuMmDevice that is not associated to any modem currently
exposed by MM, but that shares all the details of the original device.

This new logic assumes that the devices don't change their USB layout
during a firmware upgrade, which is not a very good assumption, but it
works for the case at hand. If this is not the case, we may need to
end up doing some custom AT port probing instead of relying on the
original one reported by MM being still valid (note that we don't rely
on the device name, as that may change if some other device is plugged
in the system while we're doing the update, we rely on the USB
interface number).
2019-02-27 16:09:13 +00:00
Mario Limonciello
5e5267d12c trivial: snap: Restore uuid-dev dependency
The snap build uses xmlb as a subproject.  libxmlb actually does
need the uuid-dev dependency.

Resolves this failure:
```
Couldn't use fallback subproject in subprojects/libxmlb for the dependency xmlb
Reason: subprojects/libxmlb/meson.build:107: Native dependency 'uuid' not found

meson.build:158:0: ERROR:  Native dependency 'xmlb' not found
```
2019-02-12 08:26:05 -06:00
Richard Hughes
6b78d64987 Add fwupd_guid_from_string() to drop dep on uuid
This also allows us to write mixed-endian structures and adds tests. As part of
this commit we've also changed the API of something that's not yet been in any
tarball release, so no pitchforks please.
2019-02-06 14:48:04 +00:00
Mario Limonciello
7cff2dcb25 trivial: Bump meson dependency to 0.47.0
The current libxmlb dependency requires this and when run in subproject
mode will cause failures otherwise.

Also bump the snap to use meson 0.47.2 to fix snap build due to this
failure.
2018-11-07 11:40:26 -06:00
Mario Limonciello
a8240caf2e trivial: snap: Use libxmlb subproject instead
This avoids having to bump the snap on libxmlb releases.
2018-10-18 21:25:56 +01:00
Richard Hughes
481aa2a923 Port from libappstream-glib to libxmlb
The libxmlb library is much faster to query, and does not require the daemon
to parse the XML metadata at startup. It's a zero-copy mmap design that is more
modern and less clunky.

RSS has reduced from 3Mb (peak 3.61Mb) to 1Mb (peak 1.07Mb) and the startup
time has gone from 280ms to 250ms.
2018-10-17 14:41:13 +01:00
Mario Limonciello
802a279bd2 trivial: snap: drop the stable symlink
Leading to this problem:

Building fwupd-wrappers
Failed to copy '/build/fwupd/parts/fwupd-wrappers/build/snapcraft-stable.yaml': it's a symlink pointing outside the snap.
Fix it to be valid when snapped and try again.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 229, in run
    self.build()
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 218, in build
    env=env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 75, in run_build_command
    return self.backend.run(args, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 460, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)

Scanning for processes to kill in build SNAPBUILD-351860
2018-10-12 11:59:04 -05:00
Mario Limonciello
3e54789ee3 trivial: snap: Swap the type of snap/snapcraft.yaml to be a real file
Workaround for https://bugs.launchpad.net/launchpad/+bug/1797366

It was previously a symlink to contrib/snap/snapcraft-stable.yaml
however infrastructure changes in launchpad have caused this to break
automatic snap builds.
2018-10-12 08:41:41 -05:00
Richard Hughes
9a9cb9e179 trivial: Be more explicit when building the snap packages 2018-10-04 18:38:12 +01:00
Mario Limonciello
b41b2d7061 trivial: snap: fix TLS communications in classic snap 2018-09-10 21:05:06 -05:00
Mario Limonciello
9ac08995d8 trivial: snap: sync up some missing changes in master snap 2018-09-10 21:05:06 -05:00
Mario Limonciello
db9a13c5bb trivial: snap: Correct bash completion path 2018-09-10 13:21:29 -05:00
Mario Limonciello
c60012c784 trivial: snap: Install dbus service in classic snap
This should be reverted if switching to a devmode or confined snap.
2018-09-10 13:21:12 -05:00
Mario Limonciello
2da1aca6e3 trivial: snap: tear out slots as well for classic snap
Classic snaps don't allow slots either.  When switching to a confined
or devmode snap, revert this commit.
2018-09-10 08:27:15 -05:00
Mario Limonciello
8511cc54bb trivial: snap: adjust efivar prefixes to be same on all archs
Snaps aren't multiarch, so this should help snap builds on !x86_64
potentially that have FTBFS thus far.
2018-09-09 23:09:21 -05:00
Mario Limonciello
05cc3f5956 trivial: snap: disable use of plugs for classic snap
This should be reverted if switching back to devmode or confined
snap.
2018-09-09 21:52:28 -05:00
Mario Limonciello
78bc800396 trivial: snap: Add python3-apt to build-deps for signed 2018-09-09 12:46:40 -05:00
Mario Limonciello
3514a5ea84 snap: Remove setting LD_LIBRARY_PATH
When working with classic snap this causes gpg to stop working.
If switching to devmode revert this fix.
2018-09-08 08:34:36 -05:00
Mario Limonciello
e7e569255f snap: Adjust grade to stable
The snap itself is in good shape now and should be able to migrate to
stable channels as needed.
2018-09-08 08:34:36 -05:00
Mario Limonciello
2e22d316eb snap: Move fwupd to / rather than /usr 2018-09-08 08:34:36 -05:00
Mario Limonciello
e9a3a0b925 snap: Enable builds for the daemon
This requires a newer version of gettext than is in Ubuntu 16.04
in order to support GETTEXTDATADIRS
2018-09-08 08:34:36 -05:00
Mario Limonciello
4b9769a361 trivial: snap: Download signed fwupd instead of signed fwupdate
It took some time for the round trip to sort out.  Download the latest
signed fwupd binary rather than fwupdate binary.
2018-08-15 19:54:15 +01:00
Mario Limonciello
44305bbde4 Rename EFI application from fwup<arch>.efi to fwupd<arch>.efi
This will prevent potentially clashing with fwupdate's EFI application
and allow them to remain co-installable.
2018-07-10 10:45:39 -05:00
Mario Limonciello
f771bde71f uefi: Merge plugin_uefi and plugin_uefi_labels configure options 2018-06-28 15:51:11 +01:00
Richard Hughes
ebbb13c2b4 Remove the libfwup dependency from fwupd
In Fedora the only user of libfwupdate is fwupd and the fwupdate command line
tool. It makes sense to absorb the libfwupdate library interface into the
uefi plugin in fwupd. Benefits I can see include:

* fwupd and fwupdate are very similar names; a lot of OEMs are confused

* fwupd already depends on efivar for other things

* We are maintaining an artificial library interface

* The CI and translation hooks are already in place for fwupd

* We don't need to check for features or versions in fwupd, we can just develop
the feature (e.g. BGRT) all in one place.
2018-06-28 15:51:11 +01:00
Mario Limonciello
411952700c Download latest signed version of fwupx64.efi during snap build
This might not match the version that's in the snap, but if someone
is booted in secure boot, it's better completely failing.
2018-06-28 15:51:11 +01:00
Richard Hughes
b1e0ab98d1 uefi: Import the fwupd.efi sources from the fwupdate project 2018-06-28 15:51:11 +01:00
Mario Limonciello
8bda7ccae8 trivial: snap: sync up changes to master snap 2018-06-12 12:03:17 -05:00
Mario Limonciello
352f2c9b49 trivial: snap: fix bash completion
Since the snap is named fwupd, fwupdtool gets namespaced as
fwupd.fwupdtool so bash completion doesn't work properly.

Add a step to fixup bash completion paths
2018-06-12 12:02:41 -05:00
Mario Limonciello
e49cce5187 trivial: snap: strip some more items out 2018-06-11 14:22:08 -05:00
Mario Limonciello
90b3be33eb snap: use the 'home' interface to allow snap to access CABs in $HOME
This matches the similar flatpak commit to allow easier consumption
of CAB files manually downloaded from LVFS
2018-06-08 16:41:08 -05:00
Mario Limonciello
bb1cb5af35 trivial: snap: Update the mime information
Fixes installation from CAB files in devmode
(although they need to be placed in the ratherintuitive directory
/root/snap/fwupdtool/common/ for now)
2018-06-06 17:37:37 -05:00
Mario Limonciello
2a327154c2 trivial: snap: switch to devmode instead of classic
Per discussion in trying to get classic snap approved, snap security
audience would rather see all interfaces used by fwupd added into
snapd interfaces so proper confinement works.

This will require devmode for now until that has occurred.
2018-06-06 14:42:30 -05:00
Mario Limonciello
982e74dba6 trivial: for snap/flatpak use the libsmbios 2.4.2 release 2018-06-06 16:48:05 +01:00
Mario Limonciello
f6689b8144 trivial: snap: don't build dep on xmlto
Not needed, and speeds up builds quite a bit since it doesn't pull
in the latex stack.
2018-06-05 11:33:26 -05:00
Mario Limonciello
2b1e80e79a trivial: snap: use fwupdate 11 git until fwupdate 12 release is out 2018-06-04 12:01:27 -05:00
Mario Limonciello
eafc35391c trivial: snap: build libusb and libgusb against stable releases 2018-06-04 12:01:27 -05:00
Mario Limonciello
71515d6a9c trivial: snap: Split up to a snapcraft.yaml for stable and unstable builds
This allows easily building all the dependencies but makes snaps more
likely to be stable.
2018-06-04 12:01:27 -05:00
Mario Limonciello
84f2048697 trivial: snap: Add a README 2018-06-04 12:01:27 -05:00
Richard Hughes
0b522aef96 colorhug: Do not require libcolorhug to build
Requiring colord to be built before fwupd makes it hard to build packages.

The HID-based flashing protocol is stable and documented, so there's no need
to use an external library for this now.
2018-06-02 21:43:20 +01:00
Mario Limonciello
e1a39e6191 trivial: snap: Cache the correct giomodules
Fixes:
'g_io_module_load': /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so: undefined symbol: g_io_module_load
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
'g_io_module_load': /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so: undefined symbol: g_io_module_load
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
'g_io_module_load': /usr/lib/x86_64-linux-gnu/gio/modules/libgiognomeproxy.so: undefined symbol: g_io_module_load
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiognomeproxy.so
2018-06-01 16:43:50 -05:00