mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-11 22:09:23 +00:00
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.
This commit is contained in:
parent
1ccf35a9e4
commit
ebbb13c2b4
@ -8,7 +8,7 @@ pkgdesc='A simple daemon to allow session software to update firmware'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/hughsie/fwupd'
|
||||
license=('GPL2')
|
||||
depends=('appstream-glib' 'fwupdate')
|
||||
depends=('appstream-glib')
|
||||
makedepends=('meson' 'valgrind' 'gobject-introspection' 'gtk-doc' 'python-pillow' 'git'
|
||||
'python-cairo' 'ttf-dejavu' 'adobe-source-han-sans-cn-fonts' 'python-gobject' 'vala')
|
||||
|
||||
|
@ -260,37 +260,6 @@
|
||||
<package variant="x86_64" />
|
||||
</distro>
|
||||
</dependency>
|
||||
<dependency type="build" id="libfwup-dev">
|
||||
<distro id="arch">
|
||||
<package>fwupdate</package>
|
||||
</distro>
|
||||
<distro id="centos">
|
||||
<package>fwupdate-devel</package>
|
||||
</distro>
|
||||
<distro id="fedora">
|
||||
<package>fwupdate-devel</package>
|
||||
</distro>
|
||||
<distro id="debian">
|
||||
<control>
|
||||
<version>(>= 10-3)</version>
|
||||
<inclusive>amd64</inclusive>
|
||||
<inclusive>arm64</inclusive>
|
||||
<inclusive>armhf</inclusive>
|
||||
<inclusive>i386</inclusive>
|
||||
</control>
|
||||
<package variant="x86_64" />
|
||||
<package variant="i386" />
|
||||
</distro>
|
||||
<distro id="ubuntu">
|
||||
<control>
|
||||
<inclusive>amd64</inclusive>
|
||||
<inclusive>arm64</inclusive>
|
||||
<inclusive>armhf</inclusive>
|
||||
<inclusive>i386</inclusive>
|
||||
</control>
|
||||
<package variant="x86_64" />
|
||||
</distro>
|
||||
</dependency>
|
||||
<dependency type="build" id="gcab">
|
||||
<distro id="centos">
|
||||
<package />
|
||||
@ -586,6 +555,38 @@
|
||||
</distro>
|
||||
</dependency>
|
||||
<dependency type="build" id="libefivar-dev">
|
||||
<distro id="arch">
|
||||
<package>efivar</package>
|
||||
</distro>
|
||||
<distro id="centos">
|
||||
<package>efivar-devel</package>
|
||||
</distro>
|
||||
<distro id="fedora">
|
||||
<package>efivar-devel</package>
|
||||
</distro>
|
||||
<distro id="debian">
|
||||
<control>
|
||||
<inclusive>amd64</inclusive>
|
||||
<inclusive>arm64</inclusive>
|
||||
<inclusive>armhf</inclusive>
|
||||
<inclusive>armel</inclusive>
|
||||
<inclusive>i386</inclusive>
|
||||
</control>
|
||||
<package variant="x86_64" />
|
||||
<package variant="i386" />
|
||||
</distro>
|
||||
<distro id="ubuntu">
|
||||
<control>
|
||||
<inclusive>amd64</inclusive>
|
||||
<inclusive>arm64</inclusive>
|
||||
<inclusive>armhf</inclusive>
|
||||
<inclusive>armel</inclusive>
|
||||
<inclusive>i386</inclusive>
|
||||
</control>
|
||||
<package variant="x86_64" />
|
||||
</distro>
|
||||
</dependency>
|
||||
<dependency type="build" id="libefiboot-dev">
|
||||
<distro id="debian">
|
||||
<control>
|
||||
<inclusive>amd64</inclusive>
|
||||
|
@ -32,8 +32,7 @@ Package: fwupd
|
||||
Architecture: linux-any
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Recommends: fwupdate,
|
||||
python3
|
||||
Recommends: python3
|
||||
Breaks: gir1.2-dfu-1.0 (<< 0.9.7-1),
|
||||
libdfu1 (<< 0.9.7-1),
|
||||
libdfu-dev (<< 0.9.7-1)
|
||||
|
@ -13,6 +13,12 @@ ifneq ($(CI),)
|
||||
export CI=--werror
|
||||
endif
|
||||
|
||||
export UEFI=-Dplugin_uefi=false
|
||||
DEB_TARGET_ARCH ?= $(shell dpkg-architecture -qDEB_TARGET_ARCH)
|
||||
ifeq ($(DEB_TARGET_ARCH),$(filter $(DEB_TARGET_ARCH),amd64 i386 armhf arm64))
|
||||
export UEFI=-Dplugin_uefi=true
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@ --with gir,systemd
|
||||
|
||||
@ -20,11 +26,6 @@ override_dh_auto_clean:
|
||||
rm -fr debian/build
|
||||
|
||||
override_dh_auto_configure:
|
||||
if pkg-config --exists fwup; then \
|
||||
export UEFI="-Dplugin_uefi=true"; \
|
||||
else \
|
||||
export UEFI="-Dplugin_uefi=false"; \
|
||||
fi; \
|
||||
if pkg-config --exists libsmbios_c; then \
|
||||
export DELL="-Dplugin_dell=true -Dplugin_synaptics=true"; \
|
||||
else \
|
||||
|
@ -11,12 +11,12 @@
|
||||
%global enable_tests 1
|
||||
%global enable_dummy 1
|
||||
|
||||
# fwupdate is only available on these arches
|
||||
# fwup.efi is only available on these arches
|
||||
%ifarch x86_64 aarch64
|
||||
%global have_uefi 1
|
||||
%endif
|
||||
|
||||
# libsmbios is only available on x86, and fwupdate is available on just x86_64
|
||||
# libsmbios is only available on x86
|
||||
%ifarch x86_64
|
||||
%global have_dell 1
|
||||
%endif
|
||||
@ -56,6 +56,7 @@ BuildRequires: vala
|
||||
BuildRequires: bash-completion
|
||||
|
||||
%if 0%{?have_uefi}
|
||||
BuildRequires: efivar-devel >= 33
|
||||
BuildRequires: python3 python3-cairo python3-gobject python3-pillow
|
||||
BuildRequires: pango-devel
|
||||
BuildRequires: cairo-devel cairo-gobject-devel
|
||||
@ -67,14 +68,10 @@ BuildRequires: gnu-efi-devel
|
||||
%endif
|
||||
|
||||
%if 0%{?have_dell}
|
||||
BuildRequires: efivar-devel
|
||||
BuildRequires: efivar-devel >= 33
|
||||
BuildRequires: libsmbios-devel >= 2.3.0
|
||||
%endif
|
||||
|
||||
%if 0%{?have_uefi}
|
||||
BuildRequires: fwupdate-devel >= 7
|
||||
%endif
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
@ -110,23 +110,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fwupdate",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": ["make -C linux prefix=/app libdir=/app/lib", "EFIDIR=/boot/efi make -C linux install prefix=/app libdir=/app/lib"],
|
||||
"cleanup": [
|
||||
"/bin/fwupdate",
|
||||
"/lib/systemd/system/fwupdate-cleanup.service",
|
||||
"/libexec/fwupdate/cleanup"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/rhboot/fwupdate/releases/download/11/fwupdate-11.tar.bz2",
|
||||
"sha256": "d350eae66215c90fdc70f46ea734dedbfe6006ec21b7e764114b7d9e283e4abe"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libsmbios_c",
|
||||
"config-opts": ["--disable-doxygen",
|
||||
|
@ -63,31 +63,6 @@ parts:
|
||||
- -share/
|
||||
- -etc/
|
||||
- -lib/*.a
|
||||
libfwup-dev:
|
||||
plugin: make
|
||||
source: https://github.com/rhboot/fwupdate.git
|
||||
source-type: git
|
||||
make-parameters:
|
||||
- EFIDIR=ubuntu
|
||||
- GNUEFIDIR=/usr/lib
|
||||
- LIBDIR=$SNAPCRAFT_STAGE/usr/lib/x86_64-linux-gnu
|
||||
- libdir=/usr/lib/x86_64-linux-gnu
|
||||
- PKG_CONFIG_PATH=$SNAPCRAFT_STAGE/usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
- --eval=export PKG_CONFIG_PATH
|
||||
build-packages:
|
||||
- elfutils
|
||||
- gnu-efi
|
||||
- libasm1
|
||||
- libdw1
|
||||
prime:
|
||||
- -usr/lib/debug
|
||||
- -usr/lib/systemd
|
||||
- -usr/src
|
||||
- -usr/share
|
||||
- -usr/lib/*/pkgconfig
|
||||
- -usr/include
|
||||
- -usr/bin
|
||||
after: [libsmbios, libefivar-fixpkgconfig]
|
||||
meson:
|
||||
plugin: python
|
||||
source: https://github.com/mesonbuild/meson.git
|
||||
@ -275,7 +250,7 @@ parts:
|
||||
- -usr/share/upstart
|
||||
- -usr/lib/*/glib-2.0
|
||||
- -usr/lib/*/pkgconfig
|
||||
after: [appstream-glib-dev, libfwup-dev, gudev, gusb, gnu-efi, libsmbios, libefivar-fixpkgconfig]
|
||||
after: [appstream-glib-dev, gudev, gusb, gnu-efi, libsmbios, libefivar-fixpkgconfig]
|
||||
fix-bash-completion:
|
||||
plugin: make
|
||||
source: contrib/snap/fix-bash-completion
|
||||
|
@ -61,32 +61,6 @@ parts:
|
||||
- -share/
|
||||
- -etc/
|
||||
- -lib/*.a
|
||||
libfwup-dev:
|
||||
plugin: make
|
||||
#fwupdate 11 FTBFS: see https://github.com/rhboot/fwupdate/pull/113
|
||||
source: https://github.com/rhboot/fwupdate.git
|
||||
source-type: git
|
||||
make-parameters:
|
||||
- EFIDIR=ubuntu
|
||||
- GNUEFIDIR=/usr/lib
|
||||
- LIBDIR=$SNAPCRAFT_STAGE/usr/lib/x86_64-linux-gnu
|
||||
- libdir=/usr/lib/x86_64-linux-gnu
|
||||
- PKG_CONFIG_PATH=$SNAPCRAFT_STAGE/usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
- --eval=export PKG_CONFIG_PATH
|
||||
build-packages:
|
||||
- elfutils
|
||||
- gnu-efi
|
||||
- libasm1
|
||||
- libdw1
|
||||
prime:
|
||||
- -usr/lib/debug
|
||||
- -usr/lib/systemd
|
||||
- -usr/src
|
||||
- -usr/share
|
||||
- -usr/lib/*/pkgconfig
|
||||
- -usr/include
|
||||
- -usr/bin
|
||||
after: [libsmbios, libefivar-fixpkgconfig]
|
||||
meson:
|
||||
plugin: python
|
||||
source: https://github.com/mesonbuild/meson/releases/download/0.46.1/meson-0.46.1.tar.gz
|
||||
@ -276,7 +250,7 @@ parts:
|
||||
- -usr/share/upstart
|
||||
- -usr/lib/*/glib-2.0
|
||||
- -usr/lib/*/pkgconfig
|
||||
after: [appstream-glib-dev, libfwup-dev, gudev, gusb, gnu-efi, libefivar-fixpkgconfig, libsmbios]
|
||||
after: [appstream-glib-dev, gudev, gusb, gnu-efi, libefivar-fixpkgconfig, libsmbios]
|
||||
fix-bash-completion:
|
||||
plugin: make
|
||||
source: contrib/snap/fix-bash-completion
|
||||
|
12
meson.build
12
meson.build
@ -210,16 +210,7 @@ if get_option('plugin_altos')
|
||||
endif
|
||||
|
||||
if get_option('plugin_uefi')
|
||||
fwup = dependency('fwup', version : '>= 10')
|
||||
if fwup.version().version_compare('>= 11')
|
||||
conf.set('HAVE_FWUP_GET_ESP_MOUNTPOINT', '1')
|
||||
endif
|
||||
if fwup.version().version_compare('>= 12')
|
||||
conf.set('HAVE_FWUP_VERSION', '1')
|
||||
endif
|
||||
conf.set_quoted('LIBFWUP_LIBRARY_VERSION', fwup.version())
|
||||
|
||||
efivar = dependency('efivar')
|
||||
efivar = dependency('efivar', version : '>= 33')
|
||||
conf.set_quoted('EFIVAR_LIBRARY_VERSION', efivar.version())
|
||||
efiboot = dependency('efiboot')
|
||||
objcopy = find_program ('objcopy')
|
||||
@ -251,7 +242,6 @@ endif
|
||||
if get_option('plugin_dell')
|
||||
libsmbios_c = dependency('libsmbios_c', version : '>= 2.4.0')
|
||||
efivar = dependency('efivar')
|
||||
fwup = dependency('fwup', version : '>= 5')
|
||||
conf.set('HAVE_DELL', '1')
|
||||
if not get_option('plugin_uefi')
|
||||
error('plugin_dell also needs plugin_uefi to work')
|
||||
|
@ -2491,10 +2491,6 @@ main (int argc, char *argv[])
|
||||
G_USB_MAJOR_VERSION,
|
||||
G_USB_MINOR_VERSION,
|
||||
G_USB_MICRO_VERSION);
|
||||
#ifdef LIBFWUP_LIBRARY_VERSION
|
||||
g_print ("\tfwupdate:\t%s\n",
|
||||
LIBFWUP_LIBRARY_VERSION);
|
||||
#endif
|
||||
#ifdef EFIVAR_LIBRARY_VERSION
|
||||
g_print ("\tefivar:\t%s\n",
|
||||
EFIVAR_LIBRARY_VERSION);
|
||||
|
Loading…
Reference in New Issue
Block a user