Jan Tojnar 2022-07-29 15:19:10 +02:00
parent ce49cb7792
commit 9249634151
3 changed files with 79 additions and 70 deletions

View file

@ -1,33 +1,33 @@
diff --git a/data/meson.build b/data/meson.build diff --git a/data/meson.build b/data/meson.build
index 9176aa34..1a0298a9 100644 index d8494020d..7c896fa0d 100644
--- a/data/meson.build --- a/data/meson.build
+++ b/data/meson.build +++ b/data/meson.build
@@ -26,7 +26,7 @@ endif @@ -26,7 +26,7 @@ endif
if build_standalone if build_standalone
install_data(['daemon.conf'], install_data(['daemon.conf'],
- install_dir : join_paths(sysconfdir, 'fwupd') - install_dir: join_paths(sysconfdir, 'fwupd')
+ install_dir : join_paths(sysconfdir_install, 'fwupd') + install_dir: join_paths(sysconfdir_install, 'fwupd')
) )
install_data(['power.quirk', 'cfi.quirk'], plugin_quirks += join_paths(meson.current_source_dir(), 'power.quirk')
install_dir: join_paths(datadir, 'fwupd', 'quirks.d')) plugin_quirks += join_paths(meson.current_source_dir(), 'cfi.quirk')
diff --git a/data/pki/meson.build b/data/pki/meson.build diff --git a/data/pki/meson.build b/data/pki/meson.build
index 499b7201..1be13607 100644 index 3649fecea..c3462744b 100644
--- a/data/pki/meson.build --- a/data/pki/meson.build
+++ b/data/pki/meson.build +++ b/data/pki/meson.build
@@ -12,13 +12,13 @@ install_data([ @@ -12,13 +12,13 @@ install_data([
'GPG-KEY-Linux-Foundation-Firmware', 'GPG-KEY-Linux-Foundation-Firmware',
'GPG-KEY-Linux-Vendor-Firmware-Service', 'GPG-KEY-Linux-Vendor-Firmware-Service',
], ],
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd') - install_dir: join_paths(sysconfdir, 'pki', 'fwupd')
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') + install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd')
) )
install_data([ install_data([
'GPG-KEY-Linux-Foundation-Metadata', 'GPG-KEY-Linux-Foundation-Metadata',
'GPG-KEY-Linux-Vendor-Firmware-Service', 'GPG-KEY-Linux-Vendor-Firmware-Service',
], ],
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') - install_dir: join_paths(sysconfdir, 'pki', 'fwupd-metadata')
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') + install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
) )
endif endif
@ -35,32 +35,32 @@ index 499b7201..1be13607 100644
install_data([ install_data([
'LVFS-CA.pem', 'LVFS-CA.pem',
], ],
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd') - install_dir: join_paths(sysconfdir, 'pki', 'fwupd')
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') + install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd')
) )
install_data([ install_data([
'LVFS-CA.pem', 'LVFS-CA.pem',
], ],
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') - install_dir: join_paths(sysconfdir, 'pki', 'fwupd-metadata')
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') + install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
) )
endif endif
diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build
index 87e794b1..ebeeeca7 100644 index 1d1698a7e..5469d00a6 100644
--- a/data/remotes.d/meson.build --- a/data/remotes.d/meson.build
+++ b/data/remotes.d/meson.build +++ b/data/remotes.d/meson.build
@@ -2,7 +2,7 @@ if build_standalone and get_option('lvfs') != 'false' @@ -2,7 +2,7 @@ if build_standalone and get_option('lvfs') != 'false'
install_data([ install_data([
'lvfs-testing.conf', 'lvfs-testing.conf',
], ],
- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d') - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d')
+ install_dir : join_paths(sysconfdir_install, 'fwupd', 'remotes.d') + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d')
) )
con3 = configuration_data() con3 = configuration_data()
if get_option('lvfs') == 'disabled' if get_option('lvfs') == 'disabled'
@@ -15,7 +15,7 @@ if build_standalone and get_option('lvfs') != 'false' @@ -15,7 +15,7 @@ if build_standalone and get_option('lvfs') != 'false'
output : 'lvfs.conf', output: 'lvfs.conf',
configuration : con3, configuration: con3,
install: true, install: true,
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
@ -68,22 +68,22 @@ index 87e794b1..ebeeeca7 100644
i18n.merge_file( i18n.merge_file(
input: 'lvfs.metainfo.xml', input: 'lvfs.metainfo.xml',
@@ -49,12 +49,12 @@ configure_file( @@ -49,12 +49,12 @@ configure_file(
output : 'vendor.conf', output: 'vendor.conf',
configuration : con2, configuration: con2,
install: true, install: true,
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
) )
configure_file( configure_file(
input : 'vendor-directory.conf', input: 'vendor-directory.conf',
output : 'vendor-directory.conf', output: 'vendor-directory.conf',
configuration : con2, configuration: con2,
install: true, install: true,
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
) )
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index b91dd037..a8de7810 100644 index e6b717078..f8a7a7455 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -195,6 +195,12 @@ endif @@ -195,6 +195,12 @@ endif
@ -97,10 +97,10 @@ index b91dd037..a8de7810 100644
+endif +endif
+ +
diffcmd = find_program('diff') diffcmd = find_program('diff')
gio = dependency('gio-2.0', version : '>= 2.45.8') gio = dependency('gio-2.0', version: '>= 2.45.8')
giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) giounix = dependency('gio-unix-2.0', version: '>= 2.45.8', required: false)
diff --git a/meson_options.txt b/meson_options.txt diff --git a/meson_options.txt b/meson_options.txt
index d00038db..c84652ca 100644 index 06d242371..d9e517fc0 100644
--- a/meson_options.txt --- a/meson_options.txt
+++ b/meson_options.txt +++ b/meson_options.txt
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
@ -109,75 +109,75 @@ index d00038db..c84652ca 100644
option('consolekit', type : 'feature', description : 'ConsoleKit support', deprecated: {'true': 'enabled', 'false': 'disabled'}) option('consolekit', type : 'feature', description : 'ConsoleKit support', deprecated: {'true': 'enabled', 'false': 'disabled'})
option('static_analysis', type : 'boolean', value : false, description : 'enable GCC static analysis support') option('static_analysis', type : 'boolean', value : false, description : 'enable GCC static analysis support')
diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build
index 00b7ecda..789f34ca 100644 index 67bd3b9d9..ad04a91b6 100644
--- a/plugins/dell-esrt/meson.build --- a/plugins/dell-esrt/meson.build
+++ b/plugins/dell-esrt/meson.build +++ b/plugins/dell-esrt/meson.build
@@ -38,6 +38,6 @@ configure_file( @@ -38,6 +38,6 @@ configure_file(
output : 'dell-esrt.conf', output: 'dell-esrt.conf',
configuration : con2, configuration: con2,
install: true, install: true,
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
) )
endif endif
diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build
index 1a278375..f57ae530 100644 index 13f03ccd4..9235ebe33 100644
--- a/plugins/msr/meson.build --- a/plugins/msr/meson.build
+++ b/plugins/msr/meson.build +++ b/plugins/msr/meson.build
@@ -12,7 +12,7 @@ install_data(['fwupd-msr.conf'], @@ -10,7 +10,7 @@ install_data(['fwupd-msr.conf'],
endif endif
install_data(['msr.conf'], install_data(['msr.conf'],
- install_dir: join_paths(sysconfdir, 'fwupd') - install_dir: join_paths(sysconfdir, 'fwupd')
+ install_dir: join_paths(sysconfdir_install, 'fwupd') + install_dir: join_paths(sysconfdir_install, 'fwupd')
) )
shared_module('fu_plugin_msr', shared_module('fu_plugin_msr',
fu_hash, fu_hash,
diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
index 8717d50f..9a703723 100644 index 95606e478..e5355e520 100644
--- a/plugins/redfish/meson.build --- a/plugins/redfish/meson.build
+++ b/plugins/redfish/meson.build +++ b/plugins/redfish/meson.build
@@ -51,7 +51,7 @@ shared_module('fu_plugin_redfish', @@ -43,7 +43,7 @@ shared_module('fu_plugin_redfish',
) )
install_data(['redfish.conf'], install_data(['redfish.conf'],
- install_dir: join_paths(sysconfdir, 'fwupd'), - install_dir: join_paths(sysconfdir, 'fwupd'),
+ install_dir: join_paths(sysconfdir_install, 'fwupd'), + install_dir: join_paths(sysconfdir_install, 'fwupd'),
) )
if get_option('tests') if get_option('tests')
diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build
index aa6c8ce1..61734c4d 100644 index 5f8ffbf90..9ba323e75 100644
--- a/plugins/thunderbolt/meson.build --- a/plugins/thunderbolt/meson.build
+++ b/plugins/thunderbolt/meson.build +++ b/plugins/thunderbolt/meson.build
@@ -35,7 +35,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', @@ -32,7 +32,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt',
) )
install_data(['thunderbolt.conf'], install_data(['thunderbolt.conf'],
- install_dir: join_paths(sysconfdir, 'fwupd') - install_dir: join_paths(sysconfdir, 'fwupd')
+ install_dir: join_paths(sysconfdir_install, 'fwupd') + install_dir: join_paths(sysconfdir_install, 'fwupd')
) )
# we use functions from 2.52 in the tests # we use functions from 2.52 in the tests
if get_option('tests') and run_sanitize_unsafe_tests and umockdev.found() and gio.version().version_compare('>= 2.52') if get_option('tests') and run_sanitize_unsafe_tests and umockdev.found() and gio.version().version_compare('>= 2.52')
diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build
index 2d9ba819..0feb5f6b 100644 index ef38dc03e..78ff65e1d 100644
--- a/plugins/uefi-capsule/meson.build --- a/plugins/uefi-capsule/meson.build
+++ b/plugins/uefi-capsule/meson.build +++ b/plugins/uefi-capsule/meson.build
@@ -21,7 +21,7 @@ if host_machine.system() == 'linux' @@ -20,7 +20,7 @@ if host_machine.system() == 'linux'
output : '35_fwupd', output: '35_fwupd',
configuration : con2, configuration: con2,
install: true, install: true,
- install_dir: join_paths(sysconfdir, 'grub.d') - install_dir: join_paths(sysconfdir, 'grub.d')
+ install_dir: join_paths(sysconfdir_install, 'grub.d') + install_dir: join_paths(sysconfdir_install, 'grub.d')
) )
elif host_machine.system() == 'freebsd' elif host_machine.system() == 'freebsd'
backend_srcs += 'fu-uefi-backend-freebsd.c' backend_srcs += 'fu-uefi-backend-freebsd.c'
@@ -112,7 +112,7 @@ if get_option('compat_cli') and get_option('man') @@ -110,7 +110,7 @@ if get_option('compat_cli') and get_option('man')
endif endif
install_data(['uefi_capsule.conf'], install_data(['uefi_capsule.conf'],
- install_dir: join_paths(sysconfdir, 'fwupd') - install_dir: join_paths(sysconfdir, 'fwupd')
+ install_dir: join_paths(sysconfdir_install, 'fwupd') + install_dir: join_paths(sysconfdir_install, 'fwupd')
) )
# add all the .po files as inputs to watch # add all the .po files as inputs to watch

View file

@ -4,7 +4,7 @@
, lib , lib
, fetchurl , fetchurl
, fetchFromGitHub , fetchFromGitHub
, gtk-doc , gi-docgen
, pkg-config , pkg-config
, gobject-introspection , gobject-introspection
, gettext , gettext
@ -17,7 +17,6 @@
, libarchive , libarchive
, curl , curl
, libjcat , libjcat
, libxslt
, elfutils , elfutils
, libsmbios , libsmbios
, efivar , efivar
@ -25,8 +24,6 @@
, meson , meson
, libuuid , libuuid
, colord , colord
, docbook_xml_dtd_43
, docbook-xsl-nons
, ninja , ninja
, gcab , gcab
, gnutls , gnutls
@ -117,7 +114,7 @@ let
self = stdenv.mkDerivation rec { self = stdenv.mkDerivation rec {
pname = "fwupd"; pname = "fwupd";
version = "1.8.1"; version = "1.8.3";
# libfwupd goes to lib # libfwupd goes to lib
# daemon, plug-ins and libfwupdplugin go to out # daemon, plug-ins and libfwupdplugin go to out
@ -126,7 +123,7 @@ let
src = fetchurl { src = fetchurl {
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
sha256 = "sha256-V1ZGZELrkTT7QM3IpG+eAQAyR8jqyC+l2LFvZCA3W3k="; sha256 = "sha256-ciIpd86KhmJRH/o8CIFWb2xFjsjWHSUNlGYRfWEiOOw=";
}; };
patches = [ patches = [
@ -152,7 +149,7 @@ let
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja
gtk-doc gi-docgen
pkg-config pkg-config
gobject-introspection gobject-introspection
gettext gettext
@ -160,9 +157,6 @@ let
valgrind valgrind
gcab gcab
gnutls gnutls
docbook_xml_dtd_43
docbook-xsl-nons
libxslt
protobufc # for protoc protobufc # for protoc
python python
wrapGAppsHook wrapGAppsHook
@ -201,7 +195,7 @@ let
]; ];
mesonFlags = [ mesonFlags = [
"-Ddocs=gtkdoc" "-Ddocs=enabled"
"-Dplugin_dummy=true" "-Dplugin_dummy=true"
# We are building the official releases. # We are building the official releases.
"-Dsupported_build=enabled" "-Dsupported_build=enabled"
@ -216,6 +210,8 @@ let
"-Dsysconfdir_install=${placeholder "out"}/etc" "-Dsysconfdir_install=${placeholder "out"}/etc"
"-Defi_os_dir=nixos" "-Defi_os_dir=nixos"
"-Dplugin_modem_manager=enabled" "-Dplugin_modem_manager=enabled"
# Requires Meson 0.63
"-Dgresource_quirks=disabled"
# We do not want to place the daemon into lib (cyclic reference) # We do not want to place the daemon into lib (cyclic reference)
"--libexecdir=${placeholder "out"}/libexec" "--libexecdir=${placeholder "out"}/libexec"
@ -261,10 +257,20 @@ let
meson_post_install.sh \ meson_post_install.sh \
po/test-deps po/test-deps
# This checks a version of a dependency of gi-docgen but gi-docgen is self-contained in Nixpkgs.
echo "Clearing docs/test-deps.py"
test -f docs/test-deps.py
echo > docs/test-deps.py
substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \ substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \
--replace "gdbus" ${glib.bin}/bin/gdbus --replace "gdbus" ${glib.bin}/bin/gdbus
''; '';
preBuild = ''
# jcat-tool at buildtime requires a home directory
export HOME="$(mktemp -d)"
'';
preCheck = '' preCheck = ''
addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share" addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
''; '';
@ -298,8 +304,8 @@ let
) )
''; '';
# Since we had to disable wrapGAppsHook, we need to wrap the executables manually.
postFixup = '' postFixup = ''
# Since we had to disable wrapGAppsHook, we need to wrap the executables manually.
find -L "$out/bin" "$out/libexec" -type f -executable -print0 \ find -L "$out/bin" "$out/libexec" -type f -executable -print0 \
| while IFS= read -r -d ''' file; do | while IFS= read -r -d ''' file; do
if [[ "$file" != *.efi ]]; then if [[ "$file" != *.efi ]]; then
@ -307,6 +313,9 @@ let
wrapGApp "$file" wrapGApp "$file"
fi fi
done done
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
''; '';
separateDebugInfo = true; separateDebugInfo = true;

View file

@ -4,11 +4,11 @@ index 1afa28e1..3da81d30 100644
+++ b/libfwupdplugin/meson.build +++ b/libfwupdplugin/meson.build
@@ -220,7 +220,8 @@ fwupdplugin = library( @@ -220,7 +220,8 @@ fwupdplugin = library(
], ],
link_args : cc.get_supported_link_arguments([vflag]), link_args: cc.get_supported_link_arguments([vflag]),
link_depends : fwupdplugin_mapfile, link_depends: fwupdplugin_mapfile,
- install : true - install: true
+ install : true, + install: true,
+ install_dir : bindir / '..' / 'lib', + install_dir: bindir / '..' / 'lib',
) )
fwupdplugin_pkgg = import('pkgconfig') fwupdplugin_pkgg = import('pkgconfig')
@ -16,9 +16,9 @@ index 1afa28e1..3da81d30 100644
girtargets, girtargets,
fwupd_gir[0], fwupd_gir[0],
], ],
- install : true - install: true
+ install : true, + install: true,
+ install_dir_typelib : bindir / '..' / 'lib' / 'girepository-1.0', + install_dir_typelib: bindir / '..' / 'lib' / 'girepository-1.0',
) )
# Verify the map file is correct -- note we can't actually use the generated # Verify the map file is correct -- note we can't actually use the generated