From 58cc8674965de207d6b67ee5bb3c2a49571e1cb4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:48:18 +0000 Subject: import fwupd-1.0.1-4.el7 --- diff --git a/.fwupd.metadata b/.fwupd.metadata index b281fac..c93dc05 100644 --- a/.fwupd.metadata +++ b/.fwupd.metadata @@ -1 +1 @@ -246dd8504aea706688adb1c0113050c5daf4f47f SOURCES/fwupd-0.8.2.tar.xz +69537ec34a021e471b9f6a6e50d711a7728ae6d4 SOURCES/fwupd-1.0.1.tar.xz diff --git a/.gitignore b/.gitignore index 573fe3d..feeb755 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/fwupd-0.8.2.tar.xz +SOURCES/fwupd-1.0.1.tar.xz diff --git a/SOURCES/0001-Do-not-use-the-LVFS.patch b/SOURCES/0001-Do-not-use-the-LVFS.patch index 24d538b..10cc43e 100644 --- a/SOURCES/0001-Do-not-use-the-LVFS.patch +++ b/SOURCES/0001-Do-not-use-the-LVFS.patch @@ -1,26 +1,12 @@ -From 58369cde7db9e086a5dd0be4a5c49703d686a02f Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Mon, 8 May 2017 19:10:57 +0100 -Subject: [PATCH] Do not use the LVFS - ---- - data/fwupd.conf | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/data/fwupd.conf b/data/fwupd.conf -index 158f112..45a4412 100644 ---- a/data/fwupd.conf -+++ b/data/fwupd.conf -@@ -4,7 +4,8 @@ - # - # If you want to use testing firmware then change this value to: - # https://s3.amazonaws.com/lvfsbucket/downloads/firmware-testing.xml.gz --DownloadURI=https://s3.amazonaws.com/lvfsbucket/downloads/firmware.xml.gz -+#DownloadURI=https://s3.amazonaws.com/lvfsbucket/downloads/firmware.xml.gz -+DownloadURI= +diff -urNp fwupd-1.0.1.old/data/remotes.d/lvfs.conf fwupd-1.0.1/data/remotes.d/lvfs.conf +--- fwupd-1.0.1.old/data/remotes.d/lvfs.conf 2017-11-09 16:07:29.596004147 +0000 ++++ fwupd-1.0.1/data/remotes.d/lvfs.conf 2017-11-09 16:07:46.905897123 +0000 +@@ -1,7 +1,7 @@ + [fwupd Remote] - # If we should verify option ROM images - EnableOptionROM=true --- -2.12.2 - + # this remote provides metadata and firmware marked as 'stable' from the LVFS +-Enabled=true ++Enabled=false + Title=Linux Vendor Firmware Service + Keyring=gpg + MetadataURI=https://s3.amazonaws.com/lvfsbucket/downloads/firmware.xml.gz diff --git a/SOURCES/0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch b/SOURCES/0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch deleted file mode 100644 index c596a27..0000000 --- a/SOURCES/0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch +++ /dev/null @@ -1,33 +0,0 @@ -From df5652ffb55974c3153fd0a66a2ac606bd46cfc5 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Mon, 8 May 2017 19:06:08 +0100 -Subject: [PATCH] trivial: Return a sensible error if DownloadURI is - intentionaly left blank - ---- - src/fu-util.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/fu-util.c b/src/fu-util.c -index 677cc7a..d24e46e 100644 ---- a/src/fu-util.c -+++ b/src/fu-util.c -@@ -697,6 +697,15 @@ fu_util_download_metadata (FuUtilPrivate *priv, GError **error) - data_uri = g_key_file_get_string (config, "fwupd", "DownloadURI", error); - if (data_uri == NULL) - return FALSE; -+ if (data_uri[0] == '\0') { -+ g_set_error (error, -+ FWUPD_ERROR, -+ FWUPD_ERROR_NOT_SUPPORTED, -+ "Nothing set as DownloadURI in %s", -+ config_fn); -+ return FALSE; -+ -+ } - sig_uri = g_strdup_printf ("%s.asc", data_uri); - data_fn = g_build_filename (cache_dir, "firmware.xml.gz", NULL); - sig_fn = g_strdup_printf ("%s.asc", data_fn); --- -2.12.2 - diff --git a/SOURCES/fwupd-build-with-old-deps.patch b/SOURCES/fwupd-build-with-old-deps.patch new file mode 100644 index 0000000..bf17974 --- /dev/null +++ b/SOURCES/fwupd-build-with-old-deps.patch @@ -0,0 +1,436 @@ +diff --git a/data/fwupd.service.in b/data/fwupd.service.in +index 0110ea8c..49d84153 100644 +--- a/data/fwupd.service.in ++++ b/data/fwupd.service.in +@@ -10,11 +10,3 @@ BusName=org.freedesktop.fwupd + ExecStart=@libexecdir@/fwupd/fwupd + MemoryDenyWriteExecute=yes + PrivateTmp=yes +-ProtectControlGroups=yes +-ProtectHome=yes +-ProtectKernelModules=yes +-ProtectSystem=full +-RestrictAddressFamilies=AF_NETLINK AF_UNIX +-RestrictRealtime=yes +-ReadWritePaths=@localstatedir@/lib/fwupd @sysconfdir@/fwupd/remotes.d -@bootdir@ +-SystemCallFilter=~@mount +diff --git a/meson.build b/meson.build +index 7cc6fe85..8d58bd45 100644 +--- a/meson.build ++++ b/meson.build +@@ -145,7 +145,11 @@ gudev = dependency('gudev-1.0') + if gudev.version().version_compare('>= 232') + conf.set('HAVE_GUDEV_232', '1') + endif +-appstream_glib = dependency('appstream-glib', version : '>= 0.6.13') ++appstream_glib = dependency('appstream-glib', version : '>= 0.6.10') ++ ++# only for appstream <= 0.6.13 ++uuid = dependency('uuid') ++ + gusb = dependency('gusb', version : '>= 0.2.9') + sqlite = dependency('sqlite3') + libarchive = dependency('libarchive') +@@ -215,7 +219,7 @@ if get_option('enable-thunderbolt') + endif + + if get_option('enable-systemd') +- systemd = dependency('systemd', version : '>= 231') ++ systemd = dependency('systemd') + conf.set('HAVE_SYSTEMD' , '1') + endif + +diff --git a/src/fu-engine.c b/src/fu-engine.c +index 79b0a147..bcc18350 100644 +--- a/src/fu-engine.c ++++ b/src/fu-engine.c +@@ -54,6 +54,131 @@ + #include "fu-keyring-pkcs7.h" + #endif + ++#if !AS_CHECK_VERSION(0,6,12) ++#include ++#endif ++ ++#if AS_CHECK_VERSION(0,6,13) ++static gint ++as_utils_vercmp_SAFE (const gchar *version_a, const gchar *version_b) ++{ ++ return as_utils_vercmp (version_a, version_b); ++} ++#else ++ ++static gchar * ++as_utils_version_parse_SAFE (const gchar *version) ++{ ++ const gchar *version_noprefix = version; ++ gchar *endptr = NULL; ++ guint64 tmp; ++ guint base; ++ guint i; ++ ++ /* already dotted decimal */ ++ if (g_strstr_len (version, -1, ".") != NULL) ++ return g_strdup (version); ++ ++ /* is a date */ ++ if (g_str_has_prefix (version, "20") && ++ strlen (version) == 8) ++ return g_strdup (version); ++ ++ /* convert 0x prefixed strings to dotted decimal */ ++ if (g_str_has_prefix (version, "0x")) { ++ version_noprefix += 2; ++ base = 16; ++ } else { ++ /* for non-numeric content, just return the string */ ++ for (i = 0; version[i] != '\0'; i++) { ++ if (!g_ascii_isdigit (version[i])) ++ return g_strdup (version); ++ } ++ base = 10; ++ } ++ ++ /* convert */ ++ tmp = g_ascii_strtoull (version_noprefix, &endptr, base); ++ if (endptr != NULL && endptr[0] != '\0') ++ return g_strdup (version); ++ if (tmp == 0) ++ return g_strdup (version); ++ return as_utils_version_from_uint32 ((guint32) tmp, AS_VERSION_PARSE_FLAG_USE_TRIPLET); ++} ++ ++static gint ++as_utils_vercmp_SAFE (const gchar *version_a, const gchar *version_b) ++{ ++ gchar *endptr; ++ gint64 ver_a; ++ gint64 ver_b; ++ guint i; ++ guint longest_split; ++ g_autofree gchar *str_a = NULL; ++ g_autofree gchar *str_b = NULL; ++ g_auto(GStrv) split_a = NULL; ++ g_auto(GStrv) split_b = NULL; ++ ++ /* sanity check */ ++ if (version_a == NULL || version_b == NULL) ++ return G_MAXINT; ++ ++ /* optimisation */ ++ if (g_strcmp0 (version_a, version_b) == 0) ++ return 0; ++ ++ /* split into sections, and try to parse */ ++ str_a = as_utils_version_parse_SAFE (version_a); ++ str_b = as_utils_version_parse_SAFE (version_b); ++ split_a = g_strsplit (str_a, ".", -1); ++ split_b = g_strsplit (str_b, ".", -1); ++ longest_split = MAX (g_strv_length (split_a), g_strv_length (split_b)); ++ for (i = 0; i < longest_split; i++) { ++ gboolean isnum_a = TRUE; ++ gboolean isnum_b = TRUE; ++ ++ /* we lost or gained a dot */ ++ if (split_a[i] == NULL) ++ return -1; ++ if (split_b[i] == NULL) ++ return 1; ++ ++ /* compare integers */ ++ ver_a = g_ascii_strtoll (split_a[i], &endptr, 10); ++ if (endptr != NULL && endptr[0] != '\0') ++ isnum_a = FALSE; ++ if (ver_a < 0) ++ isnum_a = FALSE; ++ ver_b = g_ascii_strtoll (split_b[i], &endptr, 10); ++ if (endptr != NULL && endptr[0] != '\0') ++ isnum_b = FALSE; ++ if (ver_b < 0) ++ isnum_b = FALSE; ++ ++ /* can't compare integer with string */ ++ if (isnum_a != isnum_b) ++ return G_MAXINT; ++ ++ /* compare strings */ ++ if (!isnum_a) { ++ gint rc = g_strcmp0 (split_a[i], split_b[i]); ++ if (rc != 0) ++ return rc; ++ ++ /* compare integers */ ++ } else { ++ if (ver_a < ver_b) ++ return -1; ++ if (ver_a > ver_b) ++ return 1; ++ } ++ } ++ ++ /* we really shouldn't get here */ ++ return 0; ++} ++#endif ++ + static void fu_engine_finalize (GObject *obj); + + struct _FuEngine +@@ -811,6 +936,77 @@ _as_app_get_screenshot_default (AsApp *app) + #endif + } + ++#if !AS_CHECK_VERSION(0,6,12) ++static gboolean ++as_require_version_compare_SAFE (AsRequire *require, ++ const gchar *version, ++ GError **error) ++{ ++ const gchar *priv__version = as_require_get_version (require); ++ AsRequireCompare priv__compare = as_require_get_compare (require); ++ gboolean ret = FALSE; ++ gint rc = 0; ++ ++ switch (priv__compare) { ++ case AS_REQUIRE_COMPARE_EQ: ++ rc = as_utils_vercmp_SAFE (version, priv__version); ++ ret = rc == 0; ++ break; ++ case AS_REQUIRE_COMPARE_NE: ++ rc = as_utils_vercmp_SAFE (version, priv__version); ++ ret = rc != 0; ++ break; ++ case AS_REQUIRE_COMPARE_LT: ++ rc = as_utils_vercmp_SAFE (version, priv__version); ++ ret = rc < 0; ++ break; ++ case AS_REQUIRE_COMPARE_GT: ++ rc = as_utils_vercmp_SAFE (version, priv__version); ++ ret = rc > 0; ++ break; ++ case AS_REQUIRE_COMPARE_LE: ++ rc = as_utils_vercmp_SAFE (version, priv__version); ++ ret = rc <= 0; ++ break; ++ case AS_REQUIRE_COMPARE_GE: ++ rc = as_utils_vercmp_SAFE (version, priv__version); ++ ret = rc >= 0; ++ break; ++ case AS_REQUIRE_COMPARE_GLOB: ++ ret = fnmatch (priv__version, version, 0) == 0; ++ break; ++ case AS_REQUIRE_COMPARE_REGEX: ++ ret = g_regex_match_simple (priv__version, version, 0, 0); ++ break; ++ default: ++ break; ++ } ++ ++ /* could not compare */ ++ if (rc == G_MAXINT) { ++ g_set_error (error, ++ AS_UTILS_ERROR, ++ AS_UTILS_ERROR_FAILED, ++ "failed to compare [%s] and [%s]", ++ priv__version, ++ version); ++ return FALSE; ++ } ++ ++ /* set error */ ++ if (!ret && error != NULL) { ++ g_set_error (error, ++ AS_UTILS_ERROR, ++ AS_UTILS_ERROR_FAILED, ++ "failed predicate [%s %s %s]", ++ priv__version, ++ as_require_compare_to_string (priv__compare), ++ version); ++ } ++ return ret; ++} ++#endif ++ + static gboolean + fu_engine_check_version_requirement (AsApp *app, + AsRequireKind kind, +@@ -836,7 +1032,11 @@ fu_engine_check_version_requirement (AsApp *app, + } + + /* check version */ ++#if AS_CHECK_VERSION(0,6,12) + if (!as_require_version_compare (req, version, error)) { ++#else ++ if (!as_require_version_compare_SAFE (req, version, error)) { ++#endif + g_prefix_error (error, "Value of %s incorrect: ", id); + return FALSE; + } +@@ -1221,7 +1421,7 @@ fu_engine_install (FuEngine *self, + + /* compare to the lowest supported version, if it exists */ + tmp = fu_device_get_version_lowest (item->device); +- if (tmp != NULL && as_utils_vercmp (tmp, version) > 0) { ++ if (tmp != NULL && as_utils_vercmp_SAFE (tmp, version) > 0) { + g_set_error (error, + FWUPD_ERROR, + FWUPD_ERROR_VERSION_NEWER, +@@ -1240,7 +1440,7 @@ fu_engine_install (FuEngine *self, + device_id); + return FALSE; + } +- vercmp = as_utils_vercmp (tmp, version); ++ vercmp = as_utils_vercmp_SAFE (tmp, version); + if (vercmp == 0 && (flags & FWUPD_INSTALL_FLAG_ALLOW_REINSTALL) == 0) { + g_set_error (error, + FWUPD_ERROR, +@@ -1476,7 +1676,7 @@ fu_engine_get_action_id_for_device (FuEngine *self, + "Release has no firmware version"); + return NULL; + } +- vercmp = as_utils_vercmp (version, version_release); ++ vercmp = as_utils_vercmp_SAFE (version, version_release); + if (vercmp == 0 && (flags & FWUPD_INSTALL_FLAG_ALLOW_REINSTALL) == 0) { + g_set_error (error, + FWUPD_ERROR, +@@ -2099,7 +2299,7 @@ fu_engine_sort_releases_cb (gconstpointer a, gconstpointer b) + { + FwupdRelease *rel_a = FWUPD_RELEASE (*((FwupdRelease **) a)); + FwupdRelease *rel_b = FWUPD_RELEASE (*((FwupdRelease **) b)); +- return as_utils_vercmp (fwupd_release_get_version (rel_a), ++ return as_utils_vercmp_SAFE (fwupd_release_get_version (rel_a), + fwupd_release_get_version (rel_b)); + } + +@@ -2246,7 +2446,7 @@ fu_engine_get_downgrades (FuEngine *self, const gchar *device_id, GError **error + gint vercmp; + + /* only include older firmware */ +- vercmp = as_utils_vercmp (fwupd_release_get_version (rel_tmp), ++ vercmp = as_utils_vercmp_SAFE (fwupd_release_get_version (rel_tmp), + fu_device_get_version (item->device)); + if (vercmp == 0) { + g_string_append_printf (error_str, "%s=same, ", +@@ -2267,7 +2467,7 @@ fu_engine_get_downgrades (FuEngine *self, const gchar *device_id, GError **error + + /* don't show releases we are not allowed to dowgrade to */ + if (fu_device_get_version_lowest (item->device) != NULL) { +- if (as_utils_vercmp (fwupd_release_get_version (rel_tmp), ++ if (as_utils_vercmp_SAFE (fwupd_release_get_version (rel_tmp), + fu_device_get_version_lowest (item->device)) <= 0) { + g_string_append_printf (error_str, "%s=lowest, ", + fwupd_release_get_version (rel_tmp)); +@@ -2339,7 +2539,7 @@ fu_engine_get_upgrades (FuEngine *self, const gchar *device_id, GError **error) + gint vercmp; + + /* only include older firmware */ +- vercmp = as_utils_vercmp (fwupd_release_get_version (rel_tmp), ++ vercmp = as_utils_vercmp_SAFE (fwupd_release_get_version (rel_tmp), + fu_device_get_version (item->device)); + if (vercmp == 0) { + g_string_append_printf (error_str, "%s=same, ", +diff --git a/src/fu-hwids.c b/src/fu-hwids.c +index 5e7aa923..92d0afdf 100644 +--- a/src/fu-hwids.c ++++ b/src/fu-hwids.c +@@ -69,6 +69,56 @@ fu_hwids_has_guid (FuHwids *self, const gchar *guid) + return g_hash_table_lookup (self->hash_guid, guid) != NULL; + } + ++#if !AS_CHECK_VERSION(0,6,13) ++#include ++static gchar * ++as_utils_guid_from_data (const gchar *namespace_id, ++ const guint8 *data, ++ gsize data_len, ++ GError **error) ++{ ++ gchar guid_new[37]; /* 36 plus NUL */ ++ gsize digestlen = 20; ++ guint8 hash[20]; ++ gint rc; ++ uuid_t uu_namespace; ++ uuid_t uu_new; ++ g_autoptr(GChecksum) csum = NULL; ++ ++ g_return_val_if_fail (namespace_id != NULL, FALSE); ++ g_return_val_if_fail (data != NULL, FALSE); ++ g_return_val_if_fail (data_len != 0, FALSE); ++ ++ /* convert the namespace to binary */ ++ rc = uuid_parse (namespace_id, uu_namespace); ++ if (rc != 0) { ++ g_set_error (error, ++ AS_UTILS_ERROR, ++ AS_UTILS_ERROR_FAILED, ++ "namespace '%s' is invalid", ++ namespace_id); ++ return FALSE; ++ } ++ ++ /* hash the namespace and then the string */ ++ csum = g_checksum_new (G_CHECKSUM_SHA1); ++ g_checksum_update (csum, (guchar *) uu_namespace, 16); ++ g_checksum_update (csum, (guchar *) data, (gssize) data_len); ++ g_checksum_get_digest (csum, hash, &digestlen); ++ ++ /* copy most parts of the hash 1:1 */ ++ memcpy (uu_new, hash, 16); ++ ++ /* set specific bits according to Section 4.1.3 */ ++ uu_new[6] = (guint8) ((uu_new[6] & 0x0f) | (5 << 4)); ++ uu_new[8] = (guint8) ((uu_new[8] & 0x3f) | 0x80); ++ ++ /* return as a string */ ++ uuid_unparse (uu_new, guid_new); ++ return g_strdup (guid_new); ++} ++#endif ++ + static gchar * + fu_hwids_get_guid_for_str (const gchar *str, GError **error) + { +diff --git a/src/meson.build b/src/meson.build +index 3d35dd87..9788f529 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -38,6 +38,7 @@ libfwupdprivate = static_library( + ], + dependencies : [ + appstream_glib, ++ uuid, + giounix, + gudev, + gusb, +@@ -67,6 +68,7 @@ fwupdmgr = executable( + ], + dependencies : [ + appstream_glib, ++ uuid, + giounix, + gudev, + gusb, +@@ -141,6 +143,7 @@ executable( + dependencies : [ + keyring_deps, + appstream_glib, ++ uuid, + giounix, + gmodule, + gudev, +@@ -203,6 +206,7 @@ if get_option('enable-tests') + dependencies : [ + keyring_deps, + appstream_glib, ++ uuid, + giounix, + gmodule, + gudev, +@@ -260,6 +264,7 @@ if get_option('enable-introspection') + ], + dependencies : [ + appstream_glib, ++ uuid, + gir_dep, + giounix, + gusb, diff --git a/SOURCES/fwupd-fix-under-including.patch b/SOURCES/fwupd-fix-under-including.patch deleted file mode 100644 index 60d2d2d..0000000 --- a/SOURCES/fwupd-fix-under-including.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urNp fwupd-0.8.2.old/plugins/uefi/Makefile.in fwupd-0.8.2/plugins/uefi/Makefile.in ---- fwupd-0.8.2.old/plugins/uefi/Makefile.in 2017-04-28 20:05:47.626535181 +0100 -+++ fwupd-0.8.2/plugins/uefi/Makefile.in 2017-04-28 20:06:57.489137310 +0100 -@@ -453,7 +453,7 @@ libfu_plugin_uefi_la_SOURCES = \ - - libfu_plugin_uefi_la_LIBADD = $(GUSB_LIBS) $(UEFI_LIBS) - libfu_plugin_uefi_la_LDFLAGS = -module -avoid-version --libfu_plugin_uefi_la_CFLAGS = $(WARN_CFLAGS) \ -+libfu_plugin_uefi_la_CFLAGS = $(WARN_CFLAGS) $(UEFI_CFLAGS) \ - -DG_LOG_DOMAIN=\"FuPluginUefi\" - - EXTRA_DIST = README.md diff --git a/SOURCES/fwupd-no-meson.patch b/SOURCES/fwupd-no-meson.patch new file mode 100644 index 0000000..00113f9 --- /dev/null +++ b/SOURCES/fwupd-no-meson.patch @@ -0,0 +1,3179 @@ +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +index 0000000..c88b745 +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1,83 @@ ++AUTOMAKE_OPTIONS = 1.7 ++ ++ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} ++ ++SUBDIRS = \ ++ libfwupd \ ++ po \ ++ data \ ++ docs \ ++ policy \ ++ src \ ++ plugins ++ ++snapshot: ++ $(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"` ++ ++EXTRA_DIST = \ ++ COPYING \ ++ MAINTAINERS \ ++ AUTHORS \ ++ README.md \ ++ NEWS \ ++ autogen.sh \ ++ config.h ++ ++MAINTAINERCLEANFILES = \ ++ $(srcdir)/INSTALL \ ++ $(srcdir)/ABOUT-NLS \ ++ $(srcdir)/aclocal.m4 \ ++ $(srcdir)/autoscan.log \ ++ $(srcdir)/compile \ ++ $(srcdir)/config.guess \ ++ $(srcdir)/config.rpath \ ++ $(srcdir)/config.h.in \ ++ $(srcdir)/config.sub \ ++ $(srcdir)/configure.scan \ ++ $(srcdir)/depcomp \ ++ $(srcdir)/install-sh \ ++ $(srcdir)/ltmain.sh \ ++ $(srcdir)/missing \ ++ $(srcdir)/mkinstalldirs \ ++ $(srcdir)/omf.make \ ++ $(srcdir)/test-driver \ ++ $(srcdir)/xmldocs.make \ ++ $(srcdir)/gtk-doc.make \ ++ $(srcdir)/ChangeLog \ ++ $(srcdir)/po/Makefile.in.in~ \ ++ $(srcdir)/fwupd-*.tar.* \ ++ `find "$(srcdir)" -type f -name Makefile.in -print` ++ ++DISTCHECK_CONFIGURE_FLAGS = \ ++ --enable-colorhug \ ++ --enable-uefi \ ++ --enable-dell \ ++ --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \ ++ --with-bootdir=$$dc_install_base/$(bootdir) \ ++ --with-systemdunitdir=$$dc_install_base/$(systemdunitdir) ++ ++GITIGNOREFILES = \ ++ .tx ++ ++distclean-local: ++ if test $(srdcir) = .; then :; else \ ++ rm -f ChangeLog; \ ++ fi ++ ++ChangeLog: ++ @echo Creating $@ ++ @if test -d "$(srcdir)/.git"; then \ ++ (GIT_DIR=$(top_srcdir)/.git ./missing --run git log e197d80c8937c622f21f569457d1bbd05746d951.. --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \ ++ && mv -f $@.tmp $@ \ ++ || ($(RM) $@.tmp; \ ++ echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ ++ (test -f $@ || echo git-log is required to generate this file >> $@)); \ ++ else \ ++ test -f $@ || \ ++ (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ ++ echo A git checkout and git-log is required to generate this file >> $@); \ ++ fi ++ ++.PHONY: ChangeLog ++ ++-include $(top_srcdir)/git.mk +diff --git a/autogen.sh b/autogen.sh +new file mode 100755 +index 0000000..3032530 +--- /dev/null ++++ b/autogen.sh +@@ -0,0 +1,29 @@ ++#!/bin/sh ++# Copyright (C) 2015 Richard Hughes ++# ++# Run this to generate all the initial makefiles, etc. ++# ++# Licensed under the GNU General Public License Version 2 ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++ ++test -n "$srcdir" || srcdir=`dirname "$0"` ++test -n "$srcdir" || srcdir=. ++ ++olddir=`pwd` ++cd "$srcdir" ++ ++AUTORECONF=`which autoreconf` ++if test -z $AUTORECONF; then ++ echo "*** No autoreconf found, please install it ***" ++ exit 1 ++fi ++ ++(cd $srcdir && autopoint --force) || exit 1 ++(cd $srcdir && gtkdocize) || exit 1 ++(cd $srcdir && autoreconf --force --install) || exit 1 ++ ++cd "$olddir" ++test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" +diff --git a/configure.ac b/configure.ac +new file mode 100644 +index 0000000..d53cfa4 +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,431 @@ ++# Copyright (C) 2015 Richard Hughes ++AC_PREREQ(2.63) ++ ++m4_define([fwupd_major_version], [1]) ++m4_define([fwupd_minor_version], [0]) ++m4_define([fwupd_micro_version], [1]) ++m4_define([fwupd_version], ++ [fwupd_major_version.fwupd_minor_version.fwupd_micro_version]) ++ ++AC_INIT([fwupd],[fwupd_version],[https://github.com/hughsie/fwupd]) ++AC_CONFIG_SRCDIR(src) ++AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar foreign subdir-objects]) ++AC_CONFIG_HEADERS([config.h]) ++AC_CONFIG_MACRO_DIR([m4]) ++AC_PROG_LIBTOOL ++ ++m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.9.8])]) ++AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = xyes) ++GLIB_GSETTINGS ++ ++# use this in fu-version.h ++FWUPD_MAJOR_VERSION=fwupd_major_version ++FWUPD_MINOR_VERSION=fwupd_minor_version ++FWUPD_MICRO_VERSION=fwupd_micro_version ++AC_SUBST(VERSION) ++AC_SUBST(FWUPD_MAJOR_VERSION) ++AC_SUBST(FWUPD_MINOR_VERSION) ++AC_SUBST(FWUPD_MICRO_VERSION) ++ ++# libtool versioning - this applies to libfwupd ++# ++# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details ++# ++# increment; ++# CURRENT If the API or ABI interface has changed (reset REVISION to 0) ++# REVISION If the API and ABI remains the same, but bugs are fixed. ++# AGE Don't use. ++LT_CURRENT=2 ++LT_REVISION=0 ++LT_AGE=0 ++AC_SUBST(LT_CURRENT) ++AC_SUBST(LT_REVISION) ++AC_SUBST(LT_AGE) ++ ++# enable nice build output on automake1.11 ++m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) ++ ++# check for gtk-doc ++GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) ++ ++AS_ALL_LINGUAS ++AC_PROG_CC_C99 ++AC_PROG_INSTALL ++LT_INIT ++AM_PROG_CC_C_O ++AC_PATH_PROG(XSLTPROC, xsltproc) ++ ++WARN_CFLAGS_EXTRA=" ++ -D_FORTIFY_SOURCE=2 ++ -fstack-protector-strong ++ -Waggregate-return ++ -Wunused ++ -Warray-bounds ++ -Wcast-align ++ -Wclobbered ++ -Wdeclaration-after-statement ++ -Wempty-body ++ -Wextra ++ -Wformat=2 ++ -Wformat-nonliteral ++ -Wformat-security ++ -Wformat-signedness ++ -Wignored-qualifiers ++ -Wimplicit-function-declaration ++ -Winit-self ++ -Winline ++ -Wmissing-declarations ++ -Wmissing-format-attribute ++ -Wmissing-include-dirs ++ -Wmissing-noreturn ++ -Wmissing-parameter-type ++ -Wmissing-prototypes ++ -Wnested-externs ++ -Wno-missing-field-initializers ++ -Wno-strict-aliasing ++ -Wno-suggest-attribute=format ++ -Wno-unused-parameter ++ -Wold-style-definition ++ -Woverride-init ++ -Wpointer-arith ++ -Wredundant-decls ++ -Wreturn-type ++ -Wshadow ++ -Wsign-compare ++ -Wstrict-aliasing ++ -Wstrict-prototypes ++ -Wswitch-default ++ -Wtype-limits ++ -Wundef ++ -Wuninitialized ++ -Wunused-but-set-variable ++ -Wwrite-strings" ++AX_APPEND_COMPILE_FLAGS([$WARN_CFLAGS_EXTRA], [WARN_CFLAGS]) ++AC_SUBST(WARN_CFLAGS) ++ ++# internationalization ++AM_GNU_GETTEXT([external]) ++AM_GNU_GETTEXT_VERSION([0.19.8]) ++AC_SUBST([GETTEXT_PACKAGE], [fwupd]) ++AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext]) ++ ++# check for PIE (position independent executable) support ++if test x$with_pic != xno; then ++ AX_CHECK_COMPILE_FLAG([-fPIE], ++ [AX_CHECK_LINK_FLAG([-fPIE -pie], ++ [PIE_CFLAGS="-fPIE" PIE_LDFLAGS="-pie"])]) ++ AC_SUBST(PIE_CFLAGS) ++ AC_SUBST(PIE_LDFLAGS) ++fi ++ ++# check for full RELRO (relocation read-only) support ++AX_CHECK_LINK_FLAG([-Wl,-z,relro,-z,now], ++ [RELRO_LDFLAGS="-Wl,-z,relro,-z,now"]) ++AC_SUBST([RELRO_LDFLAGS]) ++ ++# use -lm ++LT_LIB_M ++AC_SUBST(LIBM) ++ ++dnl --------------------------------------------------------------------------- ++dnl - Check library dependencies ++dnl --------------------------------------------------------------------------- ++PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.45.8 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9 gio-unix-2.0 gmodule-2.0) ++PKG_CHECK_MODULES(GUDEV, gudev-1.0) ++PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.103) ++PKG_CHECK_MODULES(GCAB, libgcab-1.0) ++PKG_CHECK_MODULES(APPSTREAM_GLIB, appstream-glib >= 0.5.10) ++PKG_CHECK_MODULES(GUSB, gusb >= 0.2.9) ++PKG_CHECK_MODULES(SQLITE, sqlite3) ++PKG_CHECK_MODULES(ARCHIVE, libarchive) ++PKG_CHECK_MODULES(UUID, uuid) ++PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.51.92) ++PKG_CHECK_MODULES(VALGRIND, valgrind, ++ has_valgrind=yes, ++ has_valgrind=no) ++if test x$has_valgrind = xyes; then ++ AC_DEFINE(HAVE_VALGRIND,1, ++ [Define as 1 if you have valgrind]) ++else ++ has_valgrind=no ++fi ++ ++PKG_CHECK_MODULES([GUDEV_232], [gudev-1.0 >= 232], ++ [have_gudev_232=yes], [have_gudev_232=no]) ++AS_IF([test "$have_gudev_232" = "yes"], [ ++ AC_DEFINE([HAVE_GUDEV_232],[1], ++ [Define as 1 if you have gudev >= 232]) ++]) ++ ++AC_PATH_PROG(DOCBOOK2MAN, docbook2man) ++if test -z $DOCBOOK2MAN ; then ++ AC_MSG_ERROR([docbook2man program not found]) ++fi ++ ++AC_PATH_PROG(GCAB, [gcab], [no]) ++if test -z $GCAB ; then ++ AC_MSG_ERROR([gcab program not found]) ++fi ++ ++# 0.114 introduced autocleanup functions for its types. ++PKG_CHECK_MODULES([POLKIT_0_114], [polkit-gobject-1 >= 0.114], ++ [have_polkit_0_114=yes], [have_polkit_0_114=no]) ++AS_IF([test "$have_polkit_0_114" = "yes"], [ ++ AC_DEFINE([HAVE_POLKIT_0_114],[1], ++ [Define as 1 if you have polkit >= 0.114]) ++]) ++ ++# ColorHug support ++AC_ARG_ENABLE(colorhug, ++ AS_HELP_STRING([--enable-colorhug], ++ [Enable ColorHug support [default=auto]]),, ++ enable_colorhug=maybe) ++if test x$enable_colorhug != xno; then ++ PKG_CHECK_MODULES(COLORHUG, colorhug >= 1.2.12, ++ has_colorhug=yes, ++ has_colorhug=no) ++fi ++if test x$has_colorhug = xyes; then ++ AC_DEFINE(HAVE_COLORHUG,1,[Use ColorHug support]) ++else ++ has_colorhug=no ++ if test "x$enable_colorhug" = "xyes"; then ++ AC_MSG_ERROR([colorhug support requested but 'libcolorhug-dev' was not found]) ++ fi ++fi ++AM_CONDITIONAL(HAVE_COLORHUG, test x$has_colorhug = xyes) ++ ++# Thunderbolt support ++AC_ARG_ENABLE(thunderbolt, ++ AS_HELP_STRING([--enable-thunderbolt], ++ [Enable Thunderbolt support [default=auto]]),, ++ enable_thunderbolt=yes) ++AM_CONDITIONAL(HAVE_THUNDERBOLT, test x$enable_thunderbolt = xyes) ++ ++# USB fallback support ++AC_ARG_ENABLE(usb_fallback, ++ AS_HELP_STRING([--enable-usb_fallback], ++ [Enable USB fallback support [default=auto]]),, ++ enable_usb_fallback=no) ++AM_CONDITIONAL(ENABLE_USB_FALLBACK, test x$enable_usb_fallback = xyes) ++ ++# libelf support ++AC_ARG_ENABLE(libelf, ++ AS_HELP_STRING([--enable-libelf], ++ [Enable libelf support [default=auto]]),, ++ enable_libelf=maybe) ++if test x$enable_libelf != xno; then ++ PKG_CHECK_MODULES(ELF, libelf, ++ has_libelf=yes, ++ has_libelf=no) ++fi ++if test x$has_libelf = xyes; then ++ AC_DEFINE(HAVE_LIBELF,1,[Use libelf support]) ++else ++ has_libelf=no ++ if test "x$enable_libelf" = "xyes"; then ++ AC_MSG_ERROR([libelf support requested but 'libelf' was not found]) ++ fi ++fi ++AM_CONDITIONAL(HAVE_LIBELF, test x$has_libelf = xyes) ++ ++# PKCS7 support ++AC_ARG_ENABLE(pkcs7, ++ AS_HELP_STRING([--enable-pkcs7], ++ [Enable PKCS7 support [default=yes]]),, ++ enable_pkcs7=yes) ++if test x$enable_pkcs7 != xno; then ++ PKG_CHECK_MODULES(GNUTLS, gnutls) ++ AC_DEFINE(ENABLE_PKCS7,1,[Use PKCS7 support]) ++fi ++AM_CONDITIONAL(ENABLE_PKCS7, test x$enable_pkcs7 = xyes) ++ ++# GPG support ++AC_ARG_ENABLE(gpg, ++ AS_HELP_STRING([--enable-gpg], ++ [Enable GPG support [default=yes]]),, ++ enable_gpg=yes) ++if test x$enable_gpg != xno; then ++ AC_MSG_CHECKING([for gpgme]) ++ if ! test -x "/usr/bin/gpgme-config"; then ++ AC_MSG_ERROR([Cannot locate gpgme]) ++ else ++ AC_MSG_RESULT([yes]) ++ GPGME_CFLAGS="`\"/usr/bin/gpgme-config\" --cflags`" ++ GPGME_LIBS="`\"/usr/bin/gpgme-config\" --libs`" ++ GPGME_CFLAGS+=" `\"/usr/bin/gpg-error-config\" --cflags`" ++ GPGME_LIBS+=" `\"/usr/bin/gpg-error-config\" --libs`" ++ AC_SUBST([GPGME_CFLAGS]) ++ AC_SUBST([GPGME_LIBS]) ++ fi ++ AC_DEFINE(ENABLE_GPG,1,[Use GPG support]) ++fi ++AM_CONDITIONAL(ENABLE_GPG, test x$enable_gpg = xyes) ++ ++# UEFI support ++AC_ARG_ENABLE(uefi, ++ AS_HELP_STRING([--enable-uefi], ++ [Enable UEFI support [default=auto]]),, ++ enable_uefi=maybe) ++if test x$enable_uefi != xno; then ++ PKG_CHECK_MODULES(UEFI, fwup >= 0.5, ++ has_fwup=yes, ++ has_fwup=no) ++ PKG_CHECK_MODULES(EFIVAR, efivar, ++ has_efivar=yes, ++ has_efivar=no) ++fi ++if test x$has_fwup = xyes; then ++ AC_DEFINE(HAVE_UEFI,1,[Use UEFI support]) ++ # check for ability to unlock ++ PKG_CHECK_MODULES(UEFI_UNLOCK, fwup >= 5, ++ has_uefi_unlock=yes, ++ has_uefi_unlock=no) ++ if test x$has_uefi_unlock = xyes; then ++ AC_DEFINE(HAVE_UEFI_UNLOCK,1,[Use UEFI unlock support]) ++ fi ++else ++ has_fwup=no ++ if test "x$enable_uefi" = "xyes"; then ++ AC_MSG_ERROR([UEFI support requested but 'libfwup-dev' was not found]) ++ fi ++fi ++AM_CONDITIONAL(HAVE_UEFI, test x$has_fwup = xyes) ++ ++# Dell Non ESRT capsule support ++AC_ARG_ENABLE(dell, ++ AS_HELP_STRING([--enable-dell], ++ [Enable Dell non-ESRT capsule support]),, ++ enable_dell=maybe) ++if test x$enable_dell != xno; then ++ PKG_CHECK_MODULES(LIBSMBIOS, libsmbios_c >= 2.3.0, ++ has_libsmbios=yes, ++ has_libsmbios=no) ++ PKG_CHECK_MODULES(EFIVAR, efivar, ++ has_efivar=yes, ++ has_efivar=no) ++fi ++if test x$has_libsmbios = xyes && ++ test x$has_efivar = xyes && ++ test x$has_fwup = xyes; then ++ AC_DEFINE(HAVE_DELL,1,[Use Dell non-ESRT capsule support]) ++ has_dell=yes ++ # check for ability to change GUID ++ PKG_CHECK_MODULES(UEFI_GUID, fwup >= 5, ++ has_uefi_guid=yes, ++ has_uefi_guid=no) ++ if test x$has_uefi_guid = xyes; then ++ AC_DEFINE(HAVE_UEFI_GUID,1,[Use UEFI GUID override]) ++ fi ++else ++ has_dell=no ++ if test "x$enable_dell" = "xyes"; then ++ if test x$enable_uefi = xno; then ++ AC_MSG_ERROR([Dell support requested but UEFI support explicitly disabled]) ++ fi ++ if test x$has_libsmbios = xno; then ++ AC_MSG_ERROR([Dell support requested but 'libsmbios-dev' was not found]) ++ fi ++ if test x$has_efivar = xno; then ++ AC_MSG_ERROR([Dell support requested but 'libefivar-dev' was not found]) ++ fi ++ if test x$has_fwup = xno; then ++ AC_MSG_ERROR([Dell support requested but 'libfwup-dev' was not found]) ++ fi ++ fi ++fi ++AM_CONDITIONAL(HAVE_DELL, test x$has_dell = xyes) ++ ++# Synaptics mst support ++AC_ARG_ENABLE(synaptics, ++ AS_HELP_STRING([--enable-synaptics], ++ [Enable Synaptics MST hub support]),, ++ enable_synaptics=yes) ++if test x$enable_synaptics != xno; then ++ AC_DEFINE(HAVE_SYNAPTICS,1,[Use Synaptics MST hub support]) ++fi ++AM_CONDITIONAL(HAVE_SYNAPTICS, test x$enable_synaptics = xyes) ++ ++# systemd support ++AC_ARG_WITH([systemdunitdir], ++ AS_HELP_STRING([--with-systemdunitdir=DIR], [Directory for systemd service files]), ++ [], ++ [with_systemdunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) ++AC_SUBST([systemdunitdir], [$with_systemdunitdir]) ++ ++# EFI system partition location ++AC_ARG_WITH([bootdir], ++ AS_HELP_STRING([--with-bootdir=DIR], [Directory for EFI system partition]), ++ [], ++ [with_bootdir=/boot/efi]) ++AC_SUBST([bootdir], [$with_bootdir]) ++ ++# udev rules ++AC_ARG_WITH([udevrulesdir], ++ AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules files]), ++ [], ++ [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)/rules.d]) ++AC_SUBST([udevrulesdir], [$with_udevrulesdir]) ++ ++dnl --------------------------------------------------------------------------- ++dnl - Makefiles, etc. ++dnl --------------------------------------------------------------------------- ++AC_CONFIG_FILES([ ++Makefile ++libfwupd/fwupd-version.h ++libfwupd/fwupd.pc ++libfwupd/Makefile ++data/Makefile ++data/pki/Makefile ++data/builder/Makefile ++data/remotes.d/Makefile ++data/tests/Makefile ++data/tests/colorhug/Makefile ++docs/Makefile ++docs/libfwupd/Makefile ++policy/Makefile ++po/Makefile.in ++src/Makefile ++plugins/Makefile ++plugins/altos/Makefile ++plugins/amt/Makefile ++plugins/colorhug/Makefile ++plugins/dell/Makefile ++plugins/dfu/Makefile ++plugins/ebitdo/Makefile ++plugins/raspberrypi/Makefile ++plugins/raspberrypi/rpiupdate/Makefile ++plugins/steelseries/Makefile ++plugins/synapticsmst/Makefile ++plugins/test/Makefile ++plugins/thunderbolt/Makefile ++plugins/thunderbolt-power/Makefile ++plugins/udev/Makefile ++plugins/uefi/Makefile ++plugins/unifying/Makefile ++plugins/upower/Makefile ++plugins/usb/Makefile ++]) ++AC_OUTPUT ++ ++dnl ========================================================================== ++echo " ++ fwupd $VERSION ++ ================= ++ ++ prefix: ${prefix} ++ datadir: ${datadir} ++ compiler: ${CC} ++ cflags: ${CFLAGS} ++ cppflags: ${CPPFLAGS} ++ ++ optional plugins ++ ------------------ ++ Colorhug: $has_colorhug ++ libelf: $has_libelf ++ UEFI: $has_fwup ++ Dell: $has_dell ++ Synaptics MST: $enable_synaptics ++ Thunderbolt: $enable_thunderbolt ++ USB fallback: $enable_usb_fallback ++" +diff --git a/data/Makefile.am b/data/Makefile.am +new file mode 100644 +index 0000000..59e34ac +--- /dev/null ++++ b/data/Makefile.am +@@ -0,0 +1,51 @@ ++SUBDIRS = tests pki builder remotes.d ++ ++dbusdir = $(sysconfdir)/dbus-1/system.d ++dist_dbus_DATA = org.freedesktop.fwupd.conf ++ ++remotesdir = $(datadir)/fwupd/remotes.d/fwupd ++dist_remotes_DATA = metadata.xml ++ ++dbusservicemaindir = $(datadir)/dbus-1/system-services ++dbusservicemain_in_files = org.freedesktop.fwupd.service.in ++dbusservicemain_DATA = $(dbusservicemain_in_files:.service.in=.service) ++$(dbusservicemain_DATA): $(dbusservicemain_in_files) Makefile ++ @sed -e "s|\@servicedir\@|$(libexecdir)|" $< | \ ++ sed -e "s|\@daemon_user\@|$(daemon_user)|" > $@ ++ ++configdir = $(sysconfdir)/fwupd ++dist_config_DATA = daemon.conf ++ ++metainfodir = $(datadir)/metainfo ++dist_metainfo_DATA = org.freedesktop.fwupd.metainfo.xml ++ ++%.service: %.service.in Makefile ++ $(AM_V_GEN)sed -e 's|\@libexecdir\@|$(libexecdir)|' \ ++ -e 's|\@localstatedir\@|$(localstatedir)|' \ ++ -e 's|\@bootdir\@|$(bootdir)|' \ ++ -e 's|\@bindir\@|$(bindir)|' \ ++ -e 's|\@daemon_user\@|$(daemon_user)|' $< > $@.tmp && mv $@.tmp $@ ++ ++systemdservicedir = $(systemdunitdir) ++systemdservice_in_files = \ ++ fwupd.service.in \ ++ fwupd-offline-update.service.in ++systemdservice_DATA = $(systemdservice_in_files:.service.in=.service) ++ ++install-data-hook: ++ $(MKDIR_P) $(DESTDIR)$(systemdunitdir)/system-update.target.wants ++ ln -sf ../fwupd-offline-update.service $(DESTDIR)$(systemdunitdir)/system-update.target.wants/fwupd-offline-update.service ++ ++udevrules_DATA = \ ++ 90-fwupd-devices.rules ++ ++EXTRA_DIST = \ ++ $(udevrules_DATA) \ ++ $(dbusservicemain_in_files) \ ++ $(systemdservice_in_files) ++ ++DISTCLEANFILES = \ ++ $(dbusservicemain_DATA) \ ++ $(systemdservice_DATA) ++ ++-include $(top_srcdir)/git.mk +diff --git a/data/builder/Makefile.am b/data/builder/Makefile.am +new file mode 100644 +index 0000000..d82bdcd +--- /dev/null ++++ b/data/builder/Makefile.am +@@ -0,0 +1,4 @@ ++builderdir = $(localstatedir)/lib/fwupd/builder ++dist_builder_DATA = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/data/pki/Makefile.am b/data/pki/Makefile.am +new file mode 100644 +index 0000000..a9d9d30 +--- /dev/null ++++ b/data/pki/Makefile.am +@@ -0,0 +1,28 @@ ++pkidir = $(sysconfdir)/pki/fwupd ++dist_pki_DATA = ++ ++if ENABLE_GPG ++dist_pki_DATA += \ ++ GPG-KEY-Hughski-Limited \ ++ GPG-KEY-Linux-Vendor-Firmware-Service ++endif ++ ++if ENABLE_PKCS7 ++dist_pki_DATA += \ ++ LVFS-CA.pem ++endif ++ ++pkimetadatadir = $(sysconfdir)/pki/fwupd-metadata ++dist_pkimetadata_DATA = ++ ++if ENABLE_GPG ++dist_pkimetadata_DATA += \ ++ GPG-KEY-Linux-Vendor-Firmware-Service ++endif ++ ++if ENABLE_PKCS7 ++dist_pkimetadata_DATA += \ ++ LVFS-CA.pem ++endif ++ ++-include $(top_srcdir)/git.mk +diff --git a/data/remotes.d/Makefile.am b/data/remotes.d/Makefile.am +new file mode 100644 +index 0000000..b933c78 +--- /dev/null ++++ b/data/remotes.d/Makefile.am +@@ -0,0 +1,19 @@ ++remotes2dir = $(sysconfdir)/fwupd/remotes.d ++dist_remotes2_DATA = lvfs.conf lvfs-testing.conf ++ ++vendordir = $(datadir)/fwupd/remotes.d/vendor/firmware ++dist_vendor_DATA = README.md ++ ++remotesdir = $(sysconfdir)/fwupd/remotes.d ++remotes_in_files = fwupd.conf.in vendor.conf.in ++remotes_DATA = $(remotes_in_files:.conf.in=.conf) ++$(remotes_DATA): $(remotes_in_files) Makefile ++ $(AM_V_GEN)sed -e 's|\@datadir\@|$(datadir)|' $< > $@.tmp && mv $@.tmp $@ ++ ++EXTRA_DIST = \ ++ $(remotes_in_files) ++ ++DISTCLEANFILES = \ ++ $(remotes_DATA) ++ ++-include $(top_srcdir)/git.mk +diff --git a/data/remotes.d/fwupd.conf b/data/remotes.d/fwupd.conf.in +similarity index 100% +rename from data/remotes.d/fwupd.conf +rename to data/remotes.d/fwupd.conf.in +diff --git a/data/remotes.d/vendor.conf b/data/remotes.d/vendor.conf.in +similarity index 100% +rename from data/remotes.d/vendor.conf +rename to data/remotes.d/vendor.conf.in +diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am +new file mode 100644 +index 0000000..7cb0a18 +--- /dev/null ++++ b/data/tests/Makefile.am +@@ -0,0 +1,7 @@ ++SUBDIRS = colorhug ++ ++test_files = pki/GPG-KEY-Linux-Vendor-Firmware-Service ++ ++EXTRA_DIST = $(test_files) ++ ++-include $(top_srcdir)/git.mk +diff --git a/data/tests/colorhug/Makefile.am b/data/tests/colorhug/Makefile.am +new file mode 100644 +index 0000000..e1cb36e +--- /dev/null ++++ b/data/tests/colorhug/Makefile.am +@@ -0,0 +1,23 @@ ++test_files = \ ++ colorhug-als-3.0.2.cab ++ ++colorhug-als-3.0.2.cab: firmware.bin firmware.bin.asc firmware.metainfo.xml ++ $(AM_V_GEN) touch -c -m -d"2000-01-01T00:00:00" $?; \ ++ $(GCAB) --create --nopath $@ \ ++ $(srcdir)/firmware.bin \ ++ $(srcdir)/firmware.bin.asc \ ++ $(srcdir)/firmware.metainfo.xml ++ ++BUILT_SOURCES = \ ++ colorhug-als-3.0.2.cab ++ ++CLEANFILES = \ ++ $(BUILT_SOURCES) ++ ++EXTRA_DIST = \ ++ $(test_files) \ ++ firmware.bin \ ++ firmware.bin.asc \ ++ firmware.metainfo.xml ++ ++-include $(top_srcdir)/git.mk +diff --git a/docs/Makefile.am b/docs/Makefile.am +new file mode 100644 +index 0000000..7137548 +--- /dev/null ++++ b/docs/Makefile.am +@@ -0,0 +1,7 @@ ++SUBDIRS = \ ++ libfwupd ++ ++EXTRA_DIST = \ ++ dfu-metadata-store.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/docs/libfwupd/Makefile.am b/docs/libfwupd/Makefile.am +new file mode 100644 +index 0000000..79a4616 +--- /dev/null ++++ b/docs/libfwupd/Makefile.am +@@ -0,0 +1,95 @@ ++# This is a blank Makefile.am for using gtk-doc. ++# Copy this to your project's API docs directory and modify the variables to ++# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples ++# of using the various options. ++ ++# The name of the module, e.g. 'glib'. ++DOC_MODULE=libfwupd ++ ++# Uncomment for versioned docs and specify the version of the module, e.g. '2'. ++#DOC_MODULE_VERSION=2 ++ ++# The top-level XML file. ++DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml ++ ++# Directories containing the source code. ++# gtk-doc will search all .c and .h files beneath these paths ++# for inline comments documenting functions and macros. ++# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk ++DOC_SOURCE_DIR=$(top_srcdir)/libfwupd $(top_builddir)/libfwupd ++ ++# Extra options to pass to gtkdoc-scangobj. Normally not needed. ++SCANGOBJ_OPTIONS= ++ ++# Extra options to supply to gtkdoc-scan. ++# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" ++SCAN_OPTIONS= ++ ++# Extra options to supply to gtkdoc-mkdb ++# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml ++MKDB_OPTIONS=--xml-mode --output-format=xml ++ ++# Extra options to supply to gtkdoc-mkhtml ++MKHTML_OPTIONS= ++ ++# Extra options to supply to gtkdoc-fixref. Normally not needed. ++# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html ++FIXXREF_OPTIONS= ++ ++# Used for dependencies. The docs will be rebuilt if any of these change. ++# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h ++# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c ++HFILE_GLOB=$(top_srcdir)/libfwupd/*.h ++CFILE_GLOB=$(top_srcdir)/libfwupd/*.c ++ ++# Extra header to include when scanning, which are not under DOC_SOURCE_DIR ++# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h ++EXTRA_HFILES= ++ ++# Header files or dirs to ignore when scanning. Use base file/dir names ++# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code ++IGNORE_HFILES= \ ++ fwupd-enums-private.h ++ ++# Images to copy into HTML directory. ++# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png ++HTML_IMAGES= ++ ++# Extra files that are included by $(DOC_MAIN_SGML_FILE). ++# e.g. content_files=running.xml building.xml changes-2.0.xml ++content_files= ++ ++# Files where gtk-doc abbrevations (#GtkWidget) are expanded ++# e.g. expand_content_files=running.xml ++expand_content_files= ++ ++# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. ++# Only needed if you are using gtkdoc-scangobj to dynamically query widget ++# signals and properties. ++# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) ++# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) ++GTKDOC_CFLAGS= ++GTKDOC_LIBS=$(top_builddir)/libfwupd/libfwupd.la ++ ++# This includes the standard gtk-doc make rules, copied by gtkdocize. ++include $(top_srcdir)/gtk-doc.make ++ ++# Comment this out if you want 'make check' to test you doc status ++# and run some sanity checks ++#if ENABLE_GTK_DOC ++#TESTS_ENVIRONMENT = \ ++# DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ ++# SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) ++#TESTS = $(GTKDOC_CHECK) ++#endif ++ ++CLEANFILES= \ ++ libfwupd.args \ ++ libfwupd.hierarchy \ ++ libfwupd.interfaces \ ++ libfwupd.prerequisites \ ++ libfwupd.signals \ ++ libfwupd-*.txt \ ++ *.stamp ++ ++-include $(top_srcdir)/git.mk +diff --git a/docs/libfwupd/clean.sh b/docs/libfwupd/clean.sh +old mode 100644 +new mode 100755 +diff --git a/docs/libfwupd/libfwupd-docs.xml b/docs/libfwupd/libfwupd-docs.xml +index 1f46e7f..974ddd1 100644 +--- a/docs/libfwupd/libfwupd-docs.xml ++++ b/docs/libfwupd/libfwupd-docs.xml +@@ -34,312 +34,6 @@ + + + +- +- Plugin Reference +- +- +- Functionality available to plugins. +- +- +- +- +- +- +- +- +- +- +- +- Plugin Tutorial +- +-
+- Introduction +- +- At the heart of fwupd is a plugin loader that gets run at startup, +- when devices get hotplugged and when updates are done. +- The idea is we have lots of small plugins that each do one thing, and +- are ordered by dependencies against each other at runtime. +- Using plugins we can add support for new hardware or new policies +- without making big changes all over the source tree. +- +- +- There are broadly 3 types of plugin methods: +- +- +- +- +- Mechanism: Upload binary data +- into a specific hardware device. +- +- +- +- +- Policy: Control the system when +- updates are happening, e.g. preventing the user from powering-off. +- +- +- +- +- Helpers: Providing more +- metadata about devices, for instance handling device quirks. +- +- +- +- +- In general, building things out-of-tree isn't something that we think is +- a very good idea; the API and ABI internal to fwupd is still +- changing and there's a huge benefit to getting plugins upstream where +- they can undergo review and be ported as the API adapts. +- For this reason we don't install the plugin headers onto the system, +- although you can of course just install the .so binary file +- manually. +- +- +- +- A plugin only needs to define the vfuncs that are required, and the +- plugin name is taken automatically from the suffix of the +- .so file. +- +- +- A sample plugin +- +-/* +- * Copyright (C) 2017 Richard Hughes +- */ +- +-#include <fu-plugin.h> +-#include <fu-plugin-vfuncs.h> +- +-struct FuPluginData { +- gpointer proxy; +-}; +- +-void +-fu_plugin_initialize (FuPlugin *plugin) +-{ +- fu_plugin_add_rule (plugin, FU_PLUGIN_RULE_RUN_BEFORE, "dfu"); +- fu_plugin_alloc_data (plugin, sizeof (FuPluginData)); +-} +- +-void +-fu_plugin_destroy (FuPlugin *plugin) +-{ +- FuPluginData *data = fu_plugin_get_data (plugin); +- destroy_proxy (data->proxy); +-} +- +-gboolean +-fu_plugin_startup (FuPlugin *plugin, GError **error) +-{ +- FuPluginData *data = fu_plugin_get_data (plugin); +- data->proxy = create_proxy (); +- if (data->proxy == NULL) { +- g_set_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED, +- "failed to create proxy"); +- return FALSE; +- } +- return TRUE; +-} +- +- +- +- +- We have to define when our plugin is run in reference to other plugins, +- in this case, making sure we run before the dfu plugin. +- For most plugins it does not matter in what order they are run and +- this information is not required. +- +-
+- +-
+- Creating an abstact device +- +- This section shows how you would create a device which is exported +- to the daemon and thus can be queried and updated by the client software. +- The example here is all hardcoded, and a true plugin would have to +- derive the details about the FuDevice from the hardware, +- for example reading data from sysfs or /dev. +- +- +- Example adding a custom device +- +-#include <fu-plugin.h> +- +-gboolean +-fu_plugin_coldplug (FuPlugin *plugin, GError **error) +-{ +- g_autoptr(FuDevice) dev = NULL; +- fu_device_set_id (dev, "dummy-1:2:3"); +- fu_device_add_guid (dev, "2d47f29b-83a2-4f31-a2e8-63474f4d4c2e"); +- fu_device_set_version (dev, "1.2.3"); +- fu_device_get_version_lowest (dev, "1.2.2"); +- fu_device_get_version_bootloader (dev, "0.1.2"); +- fu_device_add_icon (dev, "computer"); +- fu_device_add_flag (dev, FWUPD_DEVICE_FLAG_UPDATABLE); +- fu_plugin_device_add (plugin, dev); +- return TRUE; +-} +- +- +- +- This shows a lot of the plugin architecture in action. Some notable points: +- +- +- +- +- The device ID (dummy-1:2:3) has to be unique on the +- system between all plugins, so including the plugin name as a +- prefix is probably a good idea. +- +- +- +- +- The GUID value can be generated automatically using +- fu_device_add_guid(dev,"some-identifier") but is quoted +- here explicitly. +- The GUID value has to match the provides value in the +- .metainfo.xml file for the firmware update to succeed. +- +- +- +- +- Setting a display name and an icon is a good idea in case the +- GUI software needs to display the device to the user. +- Icons can be specified using a full path, although icon theme names +- should be preferred for most devices. +- +- +- +- +- The FWUPD_DEVICE_FLAG_UPDATABLE flag tells the client +- code that the device is in a state where it can be updated. +- If the device needs to be in a special mode (e.g. a bootloader) then +- the FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER flag can also be +- used. +- If the update should only be allowed when there is AC power available +- to the computer (i.e. not on battery) then +- FWUPD_DEVICE_FLAG_REQUIRE_AC should be used as well. +- There are other flags and the API documentation should be used when +- choosing what flags to use for each kind of device. +- +- +- +- +- Setting the lowest allows client software to refuse downgrading +- the device to specific versions. +- This is required in case the upgrade migrates some kind of data-store +- so as to be incompatible with previous versions. +- Similarly, setting the version of the bootloader (if known) allows +- the firmware to depend on a specific bootloader version, for instance +- allowing signed firmware to only be installable on hardware with +- a bootloader new enough to deploy it +- +- +- +-
+- +-
+- Mechanism Plugins +- +- Although it would be a wonderful world if we could update all hardware +- using a standard shared protocol this is not the universe we live in. +- Using a mechanism like DFU or UpdateCapsule means that fwupd will just +- work without requiring any special code, but for the real world we need +- to support vendor-specific update protocols with layers of backwards +- compatibility. +- +- +- When a plugin has created a device that is FWUPD_DEVICE_FLAG_UPDATABLE +- we can ask the daemon to update the device with a suitable +- .cab file. +- When this is done the daemon checks the update for compatibility with +- the device, and then calls the vfuncs to update the device. +- +- +- +- Updating a device +- +-gboolean +-fu_plugin_update (FuPlugin *plugin, +- FuDevice *dev, +- GBytes *blob_fw, +- FwupdInstallFlags flags, +- GError **error) +-{ +- gsize sz = 0; +- guint8 *buf = g_bytes_get_data (blob_fw, &sz); +- /* write 'buf' of size 'sz' to the hardware */ +- return TRUE; +-} +- +- +- +- It's important to note that the blob_fw is the binary +- firmware file (e.g. .dfu) and not +- the .cab binary data. +- +- +- If FWUPD_INSTALL_FLAG_FORCE is used then the usual checks +- done by the flashing process can be relaxed (e.g. checking for quirks), +- but please don't brick the users hardware even if they ask you to. +- +-
+- +-
+- Policy Helpers +- +- For some hardware, we might want to do an action before or after +- the actual firmware is squirted into the device. +- This could be something as simple as checking the system battery +- level is over a certain theshold, or it could be as complicated as +- ensuring a vendor-specific GPIO is asserted when specific types +- of hardware are updated. +- +- +- +- Running before a device update +- +-gboolean +-fu_plugin_update_prepare (FuPlugin *plugin, FuDevice *device, GError **error) +-{ +- if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_REQUIRE_AC && !on_ac_power ()) { +- g_set_error_literal (error, +- FWUPD_ERROR, +- FWUPD_ERROR_AC_POWER_REQUIRED, +- "Cannot install update " +- "when not on AC power"); +- return FALSE; +- } +- return TRUE; +-} +- +- +- +- Running after a device update +- +-gboolean +-fu_plugin_update_cleanup (FuPlugin *plugin, FuDevice *device, GError **error) +-{ +- return g_file_set_contents ("/var/lib/fwupd/something", +- fu_device_get_id (device), -1, error); +-} +- +- +-
+- +-
+- The Plugin Object Cache +- +- The fwupd daemon provides a per-plugin cache which allows objects +- to be added, removed and queried using a specified key. +- Objects added to the cache must be GObjects to enable the +- cache objects to be properly refcounted. +- +-
+- +-
+-
+- + + API Index + +diff --git a/docs/libfwupd/libfwupd.types b/docs/libfwupd/libfwupd.types +index 0fbcf81..26b4143 100644 +--- a/docs/libfwupd/libfwupd.types ++++ b/docs/libfwupd/libfwupd.types +@@ -1,6 +1,4 @@ + fwupd_client_get_type + fwupd_device_get_type +-fwupd_quirks_get_type + fwupd_release_get_type + fwupd_remote_get_type +-fwupd_result_get_type +diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am +new file mode 100644 +index 0000000..7b97144 +--- /dev/null ++++ b/docs/man/Makefile.am +@@ -0,0 +1,31 @@ ++man_MANS_DIST = \ ++ dfu-tool.1 \ ++ fwupdmgr.1 ++ ++EXTRA_DIST = \ ++ dfu-tool.sgml \ ++ fwupdmgr.sgml \ ++ $(man_MANS_DIST) ++ ++man_MANS = \ ++ $(man_MANS_DIST) ++ ++fwupdmgr.1: fwupdmgr.sgml ++ $(AM_V_GEN) \ ++ $(DOCBOOK2MAN) $? > /dev/null ++dfu-tool.1: dfu-tool.sgml ++ $(AM_V_GEN) \ ++ $(DOCBOOK2MAN) $? > /dev/null ++ ++MAINTAINERCLEANFILES = \ ++ manpage.links \ ++ manpage.log \ ++ manpage.refs \ ++ $(man_MANS) ++ ++clean-local : ++ rm -f *~ ++ rm -f *.1 ++ rm -f manpage.* ++ ++-include $(top_srcdir)/git.mk +diff --git a/git.mk b/git.mk +new file mode 100644 +index 0000000..d3c0e35 +--- /dev/null ++++ b/git.mk +@@ -0,0 +1,350 @@ ++# git.mk, a small Makefile to autogenerate .gitignore files ++# for autotools-based projects. ++# ++# Copyright 2009, Red Hat, Inc. ++# Copyright 2010,2011,2012,2013 Behdad Esfahbod ++# Written by Behdad Esfahbod ++# ++# Copying and distribution of this file, with or without modification, ++# is permitted in any medium without royalty provided the copyright ++# notice and this notice are preserved. ++# ++# The latest version of this file can be downloaded from: ++GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk ++# ++# Bugs, etc, should be reported upstream at: ++# https://github.com/behdad/git.mk ++# ++# To use in your project, import this file in your git repo's toplevel, ++# then do "make -f git.mk". This modifies all Makefile.am files in ++# your project to -include git.mk. Remember to add that line to new ++# Makefile.am files you create in your project, or just rerun the ++# "make -f git.mk". ++# ++# This enables automatic .gitignore generation. If you need to ignore ++# more files, add them to the GITIGNOREFILES variable in your Makefile.am. ++# But think twice before doing that. If a file has to be in .gitignore, ++# chances are very high that it's a generated file and should be in one ++# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. ++# ++# The only case that you need to manually add a file to GITIGNOREFILES is ++# when remove files in one of mostlyclean-local, clean-local, distclean-local, ++# or maintainer-clean-local make targets. ++# ++# Note that for files like editor backup, etc, there are better places to ++# ignore them. See "man gitignore". ++# ++# If "make maintainer-clean" removes the files but they are not recognized ++# by this script (that is, if "git status" shows untracked files still), send ++# me the output of "git status" as well as your Makefile.am and Makefile for ++# the directories involved and I'll diagnose. ++# ++# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see ++# Makefile.am.sample in the git.mk git repo. ++# ++# Don't EXTRA_DIST this file. It is supposed to only live in git clones, ++# not tarballs. It serves no useful purpose in tarballs and clutters the ++# build dir. ++# ++# This file knows how to handle autoconf, automake, libtool, gtk-doc, ++# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, ++# appstream. ++# ++# This makefile provides the following targets: ++# ++# - all: "make all" will build all gitignore files. ++# - gitignore: makes all gitignore files in the current dir and subdirs. ++# - .gitignore: make gitignore file for the current dir. ++# - gitignore-recurse: makes all gitignore files in the subdirs. ++# ++# KNOWN ISSUES: ++# ++# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the ++# submodule doesn't find us. If you have configure.{in,ac} files in ++# subdirs, add a proxy git.mk file in those dirs that simply does: ++# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. ++# And add those files to git. See vte/gnome-pty-helper/git.mk for ++# example. ++# ++ ++ ++ ++############################################################################### ++# Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: ++############################################################################### ++ ++# ++# Most autotools-using modules should be fine including this variable in their ++# toplevel MAINTAINERCLEANFILES: ++GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ ++ $(srcdir)/aclocal.m4 \ ++ $(srcdir)/autoscan.log \ ++ $(srcdir)/configure.scan \ ++ `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ ++ test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ ++ for x in \ ++ ar-lib \ ++ compile \ ++ config.guess \ ++ config.rpath \ ++ config.sub \ ++ depcomp \ ++ install-sh \ ++ ltmain.sh \ ++ missing \ ++ mkinstalldirs \ ++ test-driver \ ++ ylwrap \ ++ ; do echo "$$AUX_DIR/$$x"; done` \ ++ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ ++ head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` ++# ++# All modules should also be fine including the following variable, which ++# removes automake-generated Makefile.in files: ++GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ ++ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ ++ while read f; do \ ++ case $$f in Makefile|*/Makefile) \ ++ test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ ++ done` ++# ++# Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, ++# though it's harmless to include regardless. ++GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ ++ `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ ++ if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ ++ for x in \ ++ libtool.m4 \ ++ ltoptions.m4 \ ++ ltsugar.m4 \ ++ ltversion.m4 \ ++ lt~obsolete.m4 \ ++ ; do echo "$$MACRO_DIR/$$x"; done; \ ++ fi` ++ ++ ++ ++############################################################################### ++# Default rule is to install ourselves in all Makefile.am files: ++############################################################################### ++ ++git-all: git-mk-install ++ ++git-mk-install: ++ @echo "Installing git makefile" ++ @any_failed=; \ ++ find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ ++ if grep 'include .*/git.mk' $$x >/dev/null; then \ ++ echo "$$x already includes git.mk"; \ ++ else \ ++ failed=; \ ++ echo "Updating $$x"; \ ++ { cat $$x; \ ++ echo ''; \ ++ echo '-include $$(top_srcdir)/git.mk'; \ ++ } > $$x.tmp || failed=1; \ ++ if test x$$failed = x; then \ ++ mv $$x.tmp $$x || failed=1; \ ++ fi; \ ++ if test x$$failed = x; then : else \ ++ echo "Failed updating $$x"; >&2 \ ++ any_failed=1; \ ++ fi; \ ++ fi; done; test -z "$$any_failed" ++ ++git-mk-update: ++ wget $(GIT_MK_URL) -O $(top_srcdir)/git.mk ++ ++.PHONY: git-all git-mk-install git-mk-update ++ ++ ++ ++############################################################################### ++# Actual .gitignore generation: ++############################################################################### ++ ++$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk ++ @echo "git.mk: Generating $@" ++ @{ \ ++ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ ++ for x in \ ++ $(DOC_MODULE)-decl-list.txt \ ++ $(DOC_MODULE)-decl.txt \ ++ tmpl/$(DOC_MODULE)-unused.sgml \ ++ "tmpl/*.bak" \ ++ $(REPORT_FILES) \ ++ $(DOC_MODULE).pdf \ ++ xml html \ ++ ; do echo "/$$x"; done; \ ++ FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ ++ case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ ++ if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-types"; then \ ++ echo "/$(DOC_MODULE).types"; \ ++ fi; \ ++ if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-sections"; then \ ++ echo "/$(DOC_MODULE)-sections.txt"; \ ++ fi; \ ++ if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ ++ for x in \ ++ $(SETUP_FILES) \ ++ $(DOC_MODULE).types \ ++ ; do echo "/$$x"; done; \ ++ fi; \ ++ fi; \ ++ if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ ++ for lc in $(DOC_LINGUAS); do \ ++ for x in \ ++ $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ ++ $(DOC_PAGES) \ ++ $(DOC_INCLUDES) \ ++ ; do echo "/$$lc/$$x"; done; \ ++ done; \ ++ for x in \ ++ $(_DOC_OMF_ALL) \ ++ $(_DOC_DSK_ALL) \ ++ $(_DOC_HTML_ALL) \ ++ $(_DOC_MOFILES) \ ++ $(DOC_H_FILE) \ ++ "*/.xml2po.mo" \ ++ "*/*.omf.out" \ ++ ; do echo /$$x; done; \ ++ fi; \ ++ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ ++ for lc in $(HELP_LINGUAS); do \ ++ for x in \ ++ $(HELP_FILES) \ ++ "$$lc.stamp" \ ++ "$$lc.mo" \ ++ ; do echo "/$$lc/$$x"; done; \ ++ done; \ ++ fi; \ ++ if test "x$(gsettings_SCHEMAS)" = x; then :; else \ ++ for x in \ ++ $(gsettings_SCHEMAS:.xml=.valid) \ ++ $(gsettings__enum_file) \ ++ ; do echo "/$$x"; done; \ ++ fi; \ ++ if test "x$(appdata_XML)" = x; then :; else \ ++ for x in \ ++ $(appdata_XML:.xml=.valid) \ ++ ; do echo "/$$x"; done; \ ++ fi; \ ++ if test "x$(appstream_XML)" = x; then :; else \ ++ for x in \ ++ $(appstream_XML:.xml=.valid) \ ++ ; do echo "/$$x"; done; \ ++ fi; \ ++ if test -f $(srcdir)/po/Makefile.in.in; then \ ++ for x in \ ++ ABOUT-NLS \ ++ po/Makefile.in.in \ ++ po/Makefile.in.in~ \ ++ po/Makefile.in \ ++ po/Makefile \ ++ po/Makevars.template \ ++ po/POTFILES \ ++ po/Rules-quot \ ++ po/stamp-it \ ++ po/stamp-po \ ++ po/.intltool-merge-cache \ ++ "po/*.gmo" \ ++ "po/*.header" \ ++ "po/*.mo" \ ++ "po/*.sed" \ ++ "po/*.sin" \ ++ po/$(GETTEXT_PACKAGE).pot \ ++ intltool-extract.in \ ++ intltool-merge.in \ ++ intltool-update.in \ ++ ; do echo "/$$x"; done; \ ++ fi; \ ++ if test -f $(srcdir)/configure; then \ ++ for x in \ ++ autom4te.cache \ ++ configure \ ++ config.h \ ++ stamp-h1 \ ++ libtool \ ++ config.lt \ ++ ; do echo "/$$x"; done; \ ++ fi; \ ++ if test "x$(DEJATOOL)" = x; then :; else \ ++ for x in \ ++ $(DEJATOOL) \ ++ ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ ++ echo /site.exp; \ ++ fi; \ ++ if test "x$(am__dirstamp)" = x; then :; else \ ++ echo "$(am__dirstamp)"; \ ++ fi; \ ++ if test "x$(findstring libtool,$(LTCOMPILE))" = x -a "x$(findstring libtool,$(LTCXXCOMPILE))" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ ++ for x in \ ++ "*.lo" \ ++ ".libs" "_libs" \ ++ ; do echo "$$x"; done; \ ++ fi; \ ++ for x in \ ++ .gitignore \ ++ $(GITIGNOREFILES) \ ++ $(CLEANFILES) \ ++ $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ ++ $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ ++ $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ ++ so_locations \ ++ $(MOSTLYCLEANFILES) \ ++ $(TEST_LOGS) \ ++ $(TEST_LOGS:.log=.trs) \ ++ $(TEST_SUITE_LOG) \ ++ $(TESTS:=.test) \ ++ "*.gcda" \ ++ "*.gcno" \ ++ $(DISTCLEANFILES) \ ++ $(am__CONFIG_DISTCLEAN_FILES) \ ++ $(CONFIG_CLEAN_FILES) \ ++ TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ ++ "*.tab.c" \ ++ $(MAINTAINERCLEANFILES) \ ++ $(BUILT_SOURCES) \ ++ $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ ++ $(filter %_vala.stamp,$(DIST_COMMON)) \ ++ $(filter %.vapi,$(DIST_COMMON)) \ ++ $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ ++ Makefile \ ++ Makefile.in \ ++ "*.orig" \ ++ "*.rej" \ ++ "*.bak" \ ++ "*~" \ ++ ".*.sw[nop]" \ ++ ".dirstamp" \ ++ ; do echo "/$$x"; done; \ ++ for x in \ ++ "*.$(OBJEXT)" \ ++ $(DEPDIR) \ ++ ; do echo "$$x"; done; \ ++ } | \ ++ sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ ++ sed 's@/[.]/@/@g' | \ ++ LC_ALL=C sort | uniq > $@.tmp && \ ++ mv $@.tmp $@; ++ ++all: $(srcdir)/.gitignore gitignore-recurse-maybe ++gitignore: $(srcdir)/.gitignore gitignore-recurse ++ ++gitignore-recurse-maybe: ++ @for subdir in $(DIST_SUBDIRS); do \ ++ case " $(SUBDIRS) " in \ ++ *" $$subdir "*) :;; \ ++ *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ ++ esac; \ ++ done ++gitignore-recurse: ++ @for subdir in $(DIST_SUBDIRS); do \ ++ test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ ++ done ++ ++maintainer-clean: gitignore-clean ++gitignore-clean: ++ -rm -f $(srcdir)/.gitignore ++ ++.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe +diff --git a/libfwupd/Makefile.am b/libfwupd/Makefile.am +new file mode 100644 +index 0000000..96ad934 +--- /dev/null ++++ b/libfwupd/Makefile.am +@@ -0,0 +1,125 @@ ++if HAVE_INTROSPECTION ++-include $(INTROSPECTION_MAKEFILE) ++INTROSPECTION_GIRS = ++INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) ++INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) ++endif ++ ++AM_CPPFLAGS = \ ++ $(GLIB_CFLAGS) \ ++ $(SOUP_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -DFWUPD_COMPILATION \ ++ -DG_LOG_DOMAIN=\"libfwupd\" \ ++ -DLIBEXECDIR=\""$(libexecdir)"\" \ ++ -DLOCALSTATEDIR=\""$(localstatedir)"\" \ ++ -DPACKAGE_DATA_DIR=\""$(datadir)"\" ++ ++lib_LTLIBRARIES = \ ++ libfwupd.la ++ ++libfwupd_includedir = $(includedir)/fwupd-1 ++libfwupd_include_HEADERS = \ ++ fwupd.h ++ ++libfwupdbase_includedir = $(libfwupd_includedir)/libfwupd ++libfwupdbase_include_HEADERS = \ ++ fwupd-client.h \ ++ fwupd-common.h \ ++ fwupd-deprecated.h \ ++ fwupd-enums.h \ ++ fwupd-error.h \ ++ fwupd-release.h \ ++ fwupd-device.h \ ++ fwupd-remote.h \ ++ fwupd-version.h ++ ++libfwupd_la_SOURCES = \ ++ fwupd-client.c \ ++ fwupd-enums.c \ ++ fwupd-release.c \ ++ fwupd-device.c \ ++ fwupd-common.c \ ++ fwupd-remote.c \ ++ fwupd-enums-private.h \ ++ fwupd-error.c ++libfwupd_la_LIBADD = \ ++ $(SOUP_LIBS) \ ++ $(GLIB_LIBS) ++libfwupd_la_LDFLAGS = \ ++ $(PIE_LDFLAGS) \ ++ $(RELRO_LDFLAGS) \ ++ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ ++ -export-dynamic \ ++ -no-undefined \ ++ -version-script=$(srcdir)/fwupd.map ++libfwupd_la_CFLAGS = \ ++ $(PIE_CFLAGS) \ ++ $(WARN_CFLAGS) ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = fwupd.pc ++ ++EXTRA_DIST = \ ++ fwupd-version.h.in \ ++ fwupd.pc.in ++ ++if HAVE_INTROSPECTION ++introspection_sources = \ ++ $(libfwupd_la_SOURCES) \ ++ $(libfwupdbase_include_HEADERS) ++ ++Fwupd-2.0.gir: libfwupd.la ++Fwupd_2_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Soup-2.4 ++Fwupd_2_0_gir_CFLAGS = $(AM_CPPFLAGS) -DCD_DISABLE_DEPRECATED ++Fwupd_2_0_gir_SCANNERFLAGS = --identifier-prefix=Fwupd \ ++ --symbol-prefix=fwupd \ ++ --warn-all \ ++ --add-include-path=$(srcdir) \ ++ --c-include="fwupd.h" ++Fwupd_2_0_gir_EXPORT_PACKAGES = fwupd ++Fwupd_2_0_gir_LIBS = libfwupd.la ++Fwupd_2_0_gir_FILES = $(introspection_sources) ++INTROSPECTION_GIRS += Fwupd-2.0.gir ++ ++girdir = $(datadir)/gir-1.0 ++gir_DATA = $(INTROSPECTION_GIRS) ++ ++typelibdir = $(libdir)/girepository-1.0 ++typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) ++ ++CLEANFILES = $(gir_DATA) $(typelib_DATA) ++ ++endif ++ ++TESTS_ENVIRONMENT = \ ++ libtool --mode=execute valgrind \ ++ --quiet \ ++ --leak-check=full \ ++ --show-possibly-lost=no ++ ++check_PROGRAMS = \ ++ fwupd-self-test ++ ++fwupd_self_test_SOURCES = \ ++ fwupd-client.c \ ++ fwupd-enums.c \ ++ fwupd-error.c \ ++ fwupd-self-test.c ++ ++fwupd_self_test_LDADD = \ ++ $(LIBM) \ ++ $(ARCHIVE_LIBS) \ ++ $(GLIB_LIBS) ++ ++fwupd_self_test_CFLAGS = \ ++ $(WARN_CFLAGS) ++ ++TESTS = fwupd-self-test ++ ++clean-local: ++ rm -f *~ ++ ++-include $(top_srcdir)/git.mk +diff --git a/libfwupd/fwupd.pc.in b/libfwupd/fwupd.pc.in +new file mode 100644 +index 0000000..4fe4695 +--- /dev/null ++++ b/libfwupd/fwupd.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: fwupd ++Description: fwupd is a system daemon for installing device firmware ++Version: @VERSION@ ++Requires: glib-2.0, gobject-2.0, gio-2.0 ++Libs: -L${libdir} -lfwupd ++Cflags: -I${includedir}/fwupd-1 +diff --git a/m4/.gitignore b/m4/.gitignore +new file mode 100644 +index 0000000..0f4126c +--- /dev/null ++++ b/m4/.gitignore +@@ -0,0 +1 @@ ++*.m4 +diff --git a/m4/as-linguas.m4 b/m4/as-linguas.m4 +new file mode 100644 +index 0000000..92b28f7 +--- /dev/null ++++ b/m4/as-linguas.m4 +@@ -0,0 +1,24 @@ ++# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the ++# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a ++# subset of the po files. ++ ++AC_DEFUN([AS_ALL_LINGUAS], ++[ ++ AC_MSG_CHECKING([for linguas]) ++ podir="m4_default([$1],[$srcdir/po])" ++ linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'` ++ if test -f "$podir/LINGUAS.ignore"; then ++ ALL_LINGUAS=""; ++ ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \ ++ -e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`; ++ for lang in $linguas; do ++ if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then ++ ALL_LINGUAS="$ALL_LINGUAS $lang"; ++ fi; ++ done; ++ else ++ ALL_LINGUAS="$linguas"; ++ fi; ++ AC_SUBST([ALL_LINGUAS]) ++ AC_MSG_RESULT($ALL_LINGUAS) ++]) +diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 +new file mode 100644 +index 0000000..c3a8d69 +--- /dev/null ++++ b/m4/ax_check_compile_flag.m4 +@@ -0,0 +1,72 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the current language's compiler ++# or gives an error. (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the current language's default ++# flags (e.g. CFLAGS) when the check is done. The check is thus made with ++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to ++# force the compiler to issue an error when a bad flag is given. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++AC_DEFUN([AX_CHECK_COMPILE_FLAG], ++[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX ++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl ++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_COMPILE_FLAGS +diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 +new file mode 100644 +index 0000000..e2d0d36 +--- /dev/null ++++ b/m4/ax_check_link_flag.m4 +@@ -0,0 +1,71 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the linker or gives an error. ++# (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the linker's default flags ++# when the check is done. The check is thus made with the flags: "LDFLAGS ++# EXTRA-FLAGS FLAG". This can for example be used to force the linker to ++# issue an error when a bad flag is given. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++AC_DEFUN([AX_CHECK_LINK_FLAG], ++[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl ++AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$LDFLAGS ++ LDFLAGS="$LDFLAGS $4 $1" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM()], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ LDFLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_LINK_FLAGS +diff --git a/plugins/Makefile.am b/plugins/Makefile.am +new file mode 100644 +index 0000000..80aa29d +--- /dev/null ++++ b/plugins/Makefile.am +@@ -0,0 +1,38 @@ ++SUBDIRS = \ ++ amt \ ++ altos \ ++ dfu \ ++ ebitdo \ ++ raspberrypi \ ++ steelseries \ ++ test \ ++ udev \ ++ unifying \ ++ upower ++ ++if HAVE_DELL ++SUBDIRS += dell ++endif ++ ++if HAVE_SYNAPTICS ++SUBDIRS += synapticsmst ++endif ++ ++if HAVE_COLORHUG ++SUBDIRS += colorhug ++endif ++ ++if HAVE_UEFI ++SUBDIRS += uefi ++endif ++ ++if HAVE_THUNDERBOLT ++SUBDIRS += thunderbolt ++SUBDIRS += thunderbolt-power ++endif ++ ++if ENABLE_USB_FALLBACK ++SUBDIRS += usb ++endif ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/altos/Makefile.am b/plugins/altos/Makefile.am +new file mode 100644 +index 0000000..6c7fc9b +--- /dev/null ++++ b/plugins/altos/Makefile.am +@@ -0,0 +1,31 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(ELF_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_altos.la ++libfu_plugin_altos_la_SOURCES = \ ++ fu-altos-firmware.c \ ++ fu-altos-firmware.h \ ++ fu-device-altos.c \ ++ fu-device-altos.h \ ++ fu-plugin-altos.c ++libfu_plugin_altos_la_LIBADD = \ ++ $(ELF_LIBS) \ ++ $(GUDEV_LIBS) ++libfu_plugin_altos_la_LDFLAGS = -module -avoid-version ++libfu_plugin_altos_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginAltos\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/amt/Makefile.am b/plugins/amt/Makefile.am +new file mode 100644 +index 0000000..e8db96b +--- /dev/null ++++ b/plugins/amt/Makefile.am +@@ -0,0 +1,25 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_amt.la ++libfu_plugin_amt_la_SOURCES = \ ++ fu-plugin-amt.c ++libfu_plugin_amt_la_LIBADD = \ ++ $(GUDEV_LIBS) ++libfu_plugin_amt_la_LDFLAGS = -module -avoid-version ++libfu_plugin_amt_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginAmt\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/colorhug/Makefile.am b/plugins/colorhug/Makefile.am +new file mode 100644 +index 0000000..a797e68 +--- /dev/null ++++ b/plugins/colorhug/Makefile.am +@@ -0,0 +1,21 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(COLORHUG_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_colorhug.la ++libfu_plugin_colorhug_la_SOURCES = \ ++ fu-plugin-colorhug.c ++libfu_plugin_colorhug_la_LIBADD = $(GUSB_LIBS) $(COLORHUG_LIBS) ++libfu_plugin_colorhug_la_LDFLAGS = -module -avoid-version ++libfu_plugin_colorhug_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginColorHug\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/dell/Makefile.am b/plugins/dell/Makefile.am +new file mode 100644 +index 0000000..79f1699 +--- /dev/null ++++ b/plugins/dell/Makefile.am +@@ -0,0 +1,38 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(COLORHUG_CFLAGS) \ ++ $(LIBSMBIOS_CFLAGS) \ ++ $(EFIVAR_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(VALGRIND_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ -DLIBEXECDIR=\"$(libexecdir)\" \ ++ -DTESTDATADIR=\""$(top_srcdir)/data/tests"\" \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_dell.la ++libfu_plugin_dell_la_SOURCES = \ ++ fu-dell-smi.c \ ++ fu-plugin-dell.c ++libfu_plugin_dell_la_LIBADD = \ ++ $(GUSB_LIBS) \ ++ $(UEFI_LIBS) \ ++ $(LIBSMBIOS_LIBS) ++libfu_plugin_dell_la_LDFLAGS = -module -avoid-version ++libfu_plugin_dell_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginDell\" ++ ++quirkdir = $(datadir)/fwupd/quirks.d ++dist_quirk_DATA = dell.quirk ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/dfu/Makefile.am b/plugins/dfu/Makefile.am +new file mode 100644 +index 0000000..33c8c6b +--- /dev/null ++++ b/plugins/dfu/Makefile.am +@@ -0,0 +1,124 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src \ ++ -DLOCALEDIR=\""$(localedir)"\" ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++FWUPDPRIVATE_LIBS = \ ++ $(top_builddir)/src/libfwupdprivate.a ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_dfu.la ++ ++dfu_SOURCES = \ ++ dfu-common.c \ ++ dfu-common.h \ ++ dfu-cipher-xtea.c \ ++ dfu-cipher-xtea.h \ ++ dfu-context.c \ ++ dfu-context.h \ ++ dfu-chunked.c \ ++ dfu-chunked.h \ ++ dfu-device.c \ ++ dfu-device.h \ ++ dfu-device-private.h \ ++ dfu-element.c \ ++ dfu-element.h \ ++ dfu-patch.c \ ++ dfu-patch.h \ ++ dfu-firmware.c \ ++ dfu-firmware.h \ ++ dfu-firmware-private.h \ ++ dfu-format-dfu.c \ ++ dfu-format-dfu.h \ ++ dfu-format-dfuse.c \ ++ dfu-format-dfuse.h \ ++ dfu-format-ihex.c \ ++ dfu-format-ihex.h \ ++ dfu-format-metadata.c \ ++ dfu-format-metadata.h \ ++ dfu-format-raw.c \ ++ dfu-format-raw.h \ ++ dfu-image.c \ ++ dfu-image.h \ ++ dfu-sector.c \ ++ dfu-sector.h \ ++ dfu-sector-private.h \ ++ dfu-target.c \ ++ dfu-target.h \ ++ dfu-target-avr.c \ ++ dfu-target-avr.h \ ++ dfu-target-stm.c \ ++ dfu-target-stm.h \ ++ dfu-target-private.h ++ ++libfu_plugin_dfu_la_SOURCES = \ ++ $(dfu_SOURCES) \ ++ fu-plugin-dfu.c ++libfu_plugin_dfu_la_LIBADD = \ ++ $(GUSB_LIBS) \ ++ $(APPSTREAM_GLIB_LIBS) \ ++ $(FWUPD_LIBS) \ ++ $(GUSB_LIBS) \ ++ $(GLIB_LIBS) \ ++ $(LIBM) ++ ++libfu_plugin_dfu_la_LDFLAGS = -module -avoid-version ++libfu_plugin_dfu_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginDfu\" ++ ++bin_PROGRAMS = \ ++ dfu-tool ++ ++dfu_tool_SOURCES = \ ++ $(dfu_SOURCES) \ ++ dfu-tool.c ++ ++dfu_tool_LDADD = \ ++ $(lib_LTLIBRARIES) \ ++ $(APPSTREAM_GLIB_LIBS) \ ++ $(FWUPD_LIBS) \ ++ $(FWUPDPRIVATE_LIBS) \ ++ $(ELF_LIBS) \ ++ $(GLIB_LIBS) \ ++ $(GUSB_LIBS) \ ++ $(LIBM) ++ ++dfu_tool_CFLAGS = -DEGG_TEST $(AM_CFLAGS) $(WARN_CFLAGS) ++ ++man_MANS_DIST = \ ++ dfu-tool.1 ++ ++EXTRA_DIST = \ ++ README.md \ ++ dfu-tool.sgml \ ++ $(man_MANS_DIST) ++ ++man_MANS = \ ++ $(man_MANS_DIST) ++ ++dfu-tool.1: dfu-tool.sgml ++ $(AM_V_GEN) \ ++ $(DOCBOOK2MAN) $? > /dev/null ++ ++MAINTAINERCLEANFILES = \ ++ manpage.links \ ++ manpage.log \ ++ manpage.refs \ ++ $(man_MANS) ++ ++clean-local : ++ rm -f *~ ++ rm -f *.1 ++ rm -f manpage.* ++ ++quirkdir = $(datadir)/fwupd/quirks.d ++dist_quirk_DATA = dfu.quirk ++ ++include $(top_srcdir)/git.mk +diff --git a/plugins/dfu/tests/Makefile.am b/plugins/dfu/tests/Makefile.am +new file mode 100644 +index 0000000..623c4f8 +--- /dev/null ++++ b/plugins/dfu/tests/Makefile.am +@@ -0,0 +1,12 @@ ++EXTRA_DIST = \ ++ example.bin \ ++ example.dfu \ ++ example.elf \ ++ example.xdfu \ ++ firmware.bin \ ++ firmware.hex \ ++ metadata.dfu \ ++ kiibohd.dfu.bin \ ++ dev_VRBRAIN.dfu ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/ebitdo/Makefile.am b/plugins/ebitdo/Makefile.am +new file mode 100644 +index 0000000..5b1652d +--- /dev/null ++++ b/plugins/ebitdo/Makefile.am +@@ -0,0 +1,30 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_ebitdo.la ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++libfu_plugin_ebitdo_la_SOURCES = \ ++ fu-ebitdo-common.c \ ++ fu-ebitdo-common.h \ ++ fu-device-ebitdo.c \ ++ fu-device-ebitdo.h \ ++ fu-plugin-ebitdo.c ++libfu_plugin_ebitdo_la_LIBADD = $(GUSB_LIBS) ++libfu_plugin_ebitdo_la_LDFLAGS = -module -avoid-version ++libfu_plugin_ebitdo_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginEbitdo\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/raspberrypi/Makefile.am b/plugins/raspberrypi/Makefile.am +new file mode 100644 +index 0000000..ea72d4d +--- /dev/null ++++ b/plugins/raspberrypi/Makefile.am +@@ -0,0 +1,31 @@ ++SUBDIRS = \ ++ rpiupdate ++ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(VALGRIND_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ -DLIBEXECDIR=\"$(libexecdir)\" \ ++ -DTESTDATADIR=\""$(top_srcdir)/plugins/raspberrypi"\" \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_raspberrypi.la ++ ++libfu_plugin_raspberrypi_la_SOURCES = \ ++ fu-plugin-raspberrypi.c ++libfu_plugin_raspberrypi_la_LIBADD = $(GUSB_LIBS) ++libfu_plugin_raspberrypi_la_LDFLAGS = -module -avoid-version ++libfu_plugin_raspberrypi_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginRpi\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/raspberrypi/rpiupdate/Makefile.am b/plugins/raspberrypi/rpiupdate/Makefile.am +new file mode 100644 +index 0000000..cd6aebd +--- /dev/null ++++ b/plugins/raspberrypi/rpiupdate/Makefile.am +@@ -0,0 +1,30 @@ ++test_files = \ ++ firmware.bin \ ++ rpi-firmware-20150805.cab ++ ++firmware.bin: $(srcdir)/*.elf $(srcdir)/overlays/* $(srcdir)/README ++ $(AM_V_GEN) tar -cf $@ \ ++ $(srcdir)/README \ ++ $(srcdir)/*.elf \ ++ $(srcdir)/overlays/*.dtb ++ ++rpi-firmware-20150805.cab: firmware.bin firmware.metainfo.xml ++ $(AM_V_GEN) touch -c -m -d"2000-01-01T00:00:00" $?; \ ++ $(GCAB) --create --nopath $@ \ ++ $(builddir)/firmware.bin \ ++ $(srcdir)/firmware.metainfo.xml ++ ++BUILT_SOURCES = \ ++ firmware.bin \ ++ rpi-firmware-20150805.cab ++ ++CLEANFILES = \ ++ $(BUILT_SOURCES) ++ ++EXTRA_DIST = \ ++ $(test_files) \ ++ firmware.metainfo.xml \ ++ overlays/test.dtb \ ++ start.elf ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/steelseries/Makefile.am b/plugins/steelseries/Makefile.am +new file mode 100644 +index 0000000..c460787 +--- /dev/null ++++ b/plugins/steelseries/Makefile.am +@@ -0,0 +1,21 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_steelseries.la ++ ++libfu_plugin_steelseries_la_SOURCES = \ ++ fu-plugin-steelseries.c ++libfu_plugin_steelseries_la_LIBADD = $(GUSB_LIBS) ++libfu_plugin_steelseries_la_LDFLAGS = -module -avoid-version ++libfu_plugin_steelseries_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginSteelSeries\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/synapticsmst/Makefile.am b/plugins/synapticsmst/Makefile.am +new file mode 100644 +index 0000000..8868f23 +--- /dev/null ++++ b/plugins/synapticsmst/Makefile.am +@@ -0,0 +1,36 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(VALGRIND_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ $(EFIVAR_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/src \ ++ -I$(top_srcdir)/libfwupd \ ++ -DLIBEXECDIR=\"$(libexecdir)\" \ ++ -DLOCALEDIR=\""$(localedir)"\" ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_synapticsmst.la ++ ++libfu_plugin_synapticsmst_la_SOURCES = \ ++ synapticsmst-device.c \ ++ synapticsmst-device.h \ ++ synapticsmst-common.c \ ++ synapticsmst-common.h \ ++ fu-plugin-synapticsmst.c ++ ++libfu_plugin_synapticsmst_la_LIBADD = \ ++ $(GUSB_LIBS) \ ++ $(GLIB_LIBS) ++libfu_plugin_synapticsmst_la_LDFLAGS = -module -avoid-version ++libfu_plugin_synapticsmst_la_CFLAGS = \ ++ $(PIE_CFLAGS) \ ++ $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginSynapticsMST\" ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/test/Makefile.am b/plugins/test/Makefile.am +new file mode 100644 +index 0000000..b61418b +--- /dev/null ++++ b/plugins/test/Makefile.am +@@ -0,0 +1,20 @@ ++AM_CPPFLAGS = \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_test.la ++ ++libfu_plugin_test_la_SOURCES = \ ++ fu-plugin-test.c ++libfu_plugin_test_la_LIBADD = $(GLIB_LIBS) ++libfu_plugin_test_la_LDFLAGS = -module -avoid-version ++libfu_plugin_test_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginTest\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/thunderbolt-power/Makefile.am b/plugins/thunderbolt-power/Makefile.am +new file mode 100644 +index 0000000..06fe481 +--- /dev/null ++++ b/plugins/thunderbolt-power/Makefile.am +@@ -0,0 +1,21 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_thunderbolt_power.la ++libfu_plugin_thunderbolt_power_la_SOURCES = \ ++ fu-plugin-thunderbolt-power.c ++libfu_plugin_thunderbolt_power_la_LIBADD = $(GUDEV_LIBS) $(THUNDERBOLT_LIBS) ++libfu_plugin_thunderbolt_power_la_LDFLAGS = -module -avoid-version ++libfu_plugin_thunderbolt_power_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginThunderboltPower\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/thunderbolt/Makefile.am b/plugins/thunderbolt/Makefile.am +new file mode 100644 +index 0000000..528f30f +--- /dev/null ++++ b/plugins/thunderbolt/Makefile.am +@@ -0,0 +1,23 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_thunderbolt.la ++libfu_plugin_thunderbolt_la_SOURCES = \ ++ fu-thunderbolt-image.c \ ++ fu-thunderbolt-image.h \ ++ fu-plugin-thunderbolt.c ++libfu_plugin_thunderbolt_la_LIBADD = $(GUDEV_LIBS) $(THUNDERBOLT_LIBS) ++libfu_plugin_thunderbolt_la_LDFLAGS = -module -avoid-version ++libfu_plugin_thunderbolt_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginThunderbolt\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/udev/Makefile.am b/plugins/udev/Makefile.am +new file mode 100644 +index 0000000..075583a +--- /dev/null ++++ b/plugins/udev/Makefile.am +@@ -0,0 +1,31 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ -DTESTDATADIR=\""$(top_srcdir)/plugins/udev"\" \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_udev.la ++ ++libfu_plugin_udev_la_SOURCES = \ ++ fu-rom.c \ ++ fu-rom.h \ ++ fu-plugin-udev.c ++libfu_plugin_udev_la_LIBADD = \ ++ $(GUSB_LIBS) \ ++ $(GUDEV_LIBS) ++libfu_plugin_udev_la_LDFLAGS = -module -avoid-version ++libfu_plugin_udev_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginUdev\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/uefi/Makefile.am b/plugins/uefi/Makefile.am +new file mode 100644 +index 0000000..fbf390e +--- /dev/null ++++ b/plugins/uefi/Makefile.am +@@ -0,0 +1,23 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(EFIVAR_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(LIBSMBIOS_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src \ ++ -DLOCALEDIR=\""$(localedir)"\" ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_uefi.la ++libfu_plugin_uefi_la_SOURCES = \ ++ fu-plugin-uefi.c ++libfu_plugin_uefi_la_LIBADD = $(GUSB_LIBS) $(UEFI_LIBS) ++libfu_plugin_uefi_la_LDFLAGS = -module -avoid-version ++libfu_plugin_uefi_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginUefi\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/unifying/Makefile.am b/plugins/unifying/Makefile.am +new file mode 100644 +index 0000000..57fa931 +--- /dev/null ++++ b/plugins/unifying/Makefile.am +@@ -0,0 +1,47 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_unifying.la ++ ++libunify_common = \ ++ lu-common.c \ ++ lu-common.h \ ++ lu-context.c \ ++ lu-context.h \ ++ lu-device-bootloader.c \ ++ lu-device-bootloader.h \ ++ lu-device-bootloader-nordic.c \ ++ lu-device-bootloader-nordic.h \ ++ lu-device-bootloader-texas.c \ ++ lu-device-bootloader-texas.h \ ++ lu-device.c \ ++ lu-device.h \ ++ lu-device-peripheral.c \ ++ lu-device-peripheral.h \ ++ lu-device-runtime.c \ ++ lu-device-runtime.h \ ++ lu-hidpp.h \ ++ lu-hidpp-msg.c \ ++ lu-hidpp-msg.h ++ ++libfu_plugin_unifying_la_SOURCES = \ ++ $(libunify_common) \ ++ fu-plugin-unifying.c ++libfu_plugin_unifying_la_LIBADD = $(GUSB_LIBS) $(GUDEV_LIBS) ++libfu_plugin_unifying_la_LDFLAGS = -module -avoid-version ++libfu_plugin_unifying_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginUnifying\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/upower/Makefile.am b/plugins/upower/Makefile.am +new file mode 100644 +index 0000000..c6de67f +--- /dev/null ++++ b/plugins/upower/Makefile.am +@@ -0,0 +1,20 @@ ++AM_CPPFLAGS = \ ++ $(GUSB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_upower.la ++ ++libfu_plugin_upower_la_SOURCES = \ ++ fu-plugin-upower.c ++libfu_plugin_upower_la_LIBADD = $(GLIB_LIBS) ++libfu_plugin_upower_la_LDFLAGS = -module -avoid-version ++libfu_plugin_upower_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginUpower\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/plugins/usb/Makefile.am b/plugins/usb/Makefile.am +new file mode 100644 +index 0000000..0480b95 +--- /dev/null ++++ b/plugins/usb/Makefile.am +@@ -0,0 +1,21 @@ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -I$(top_srcdir)/src ++ ++plugindir = $(libdir)/fwupd-plugins-3 ++plugin_LTLIBRARIES = libfu_plugin_usb.la ++ ++libfu_plugin_usb_la_SOURCES = \ ++ fu-plugin-usb.c ++libfu_plugin_usb_la_LIBADD = $(GUSB_LIBS) ++libfu_plugin_usb_la_LDFLAGS = -module -avoid-version ++libfu_plugin_usb_la_CFLAGS = $(WARN_CFLAGS) \ ++ -DG_LOG_DOMAIN=\"FuPluginUsb\" ++ ++EXTRA_DIST = README.md ++ ++-include $(top_srcdir)/git.mk +diff --git a/policy/Makefile.am b/policy/Makefile.am +new file mode 100644 +index 0000000..596036b +--- /dev/null ++++ b/policy/Makefile.am +@@ -0,0 +1,15 @@ ++ ++polkit_rulesdir = $(datadir)/polkit-1/rules.d ++dist_polkit_rules_DATA = \ ++ org.freedesktop.fwupd.rules ++ ++polkit_policydir = $(datadir)/polkit-1/actions ++polkit_policy_DATA = org.freedesktop.fwupd.policy ++org.freedesktop.fwupd.policy: org.freedesktop.fwupd.policy.in ++ $(AM_V_GEN) GETTEXTDATADIR=$(srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ ++ ++EXTRA_DIST = org.freedesktop.fwupd.policy.in ++CLEANFILES = \ ++ org.freedesktop.fwupd.policy ++ ++-include $(top_srcdir)/git.mk +diff --git a/src/Makefile.am b/src/Makefile.am +new file mode 100644 +index 0000000..2f89f7b +--- /dev/null ++++ b/src/Makefile.am +@@ -0,0 +1,220 @@ ++introspectiondir = $(datadir)/dbus-1/interfaces ++dist_introspection_DATA = \ ++ org.freedesktop.fwupd.xml ++ ++AM_CPPFLAGS = \ ++ $(APPSTREAM_GLIB_CFLAGS) \ ++ $(GUSB_CFLAGS) \ ++ $(GCAB_CFLAGS) \ ++ $(GLIB_CFLAGS) \ ++ $(PIE_CFLAGS) \ ++ $(POLKIT_CFLAGS) \ ++ $(GPGME_CFLAGS) \ ++ $(SOUP_CFLAGS) \ ++ $(ARCHIVE_CFLAGS) \ ++ $(GUDEV_CFLAGS) \ ++ $(GNUTLS_CFLAGS) \ ++ $(VALGRIND_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_builddir) \ ++ -I$(top_srcdir)/libfwupd \ ++ -DG_LOG_DOMAIN=\"Fu\" \ ++ -DPLUGINDIR=\""$(libdir)/fwupd-plugins-3"\" \ ++ -DSYSFSFIRMWAREDIR=\"/sys/firmware\" \ ++ -DLIBEXECDIR=\"$(libexecdir)\" \ ++ -DLIBDIR=\"$(libdir)\" \ ++ -DDATADIR=\"$(datadir)\" \ ++ -DFWUPDDATADIR=\"$(datadir)/fwupd\" \ ++ -DFWUPDCONFIGDIR=\"$(sysconfdir)/fwupd\" \ ++ -DSYSCONFDIR=\""$(sysconfdir)"\" \ ++ -DVERSION="\"$(VERSION)\"" \ ++ -DDAEMON_USER="\"$(daemon_user)\"" \ ++ -DTESTDATADIR=\""$(top_srcdir)/data/tests"\" \ ++ -DG_UDEV_API_IS_SUBJECT_TO_CHANGE \ ++ -DHAVE_CONSOLEKIT=0 \ ++ -DHAVE_SYSTEMD=1 \ ++ -DLOCALEDIR=\""$(localedir)"\" ++ ++FWUPD_LIBS = \ ++ $(top_builddir)/libfwupd/libfwupd.la ++ ++noinst_LIBRARIES = libfwupdprivate.a ++libfwupdprivate_a_SOURCES = \ ++ fu-common.c \ ++ fu-device-locker.c \ ++ fu-progressbar.c \ ++ fu-quirks.c ++ ++libfwupdprivate_a_CFLAGS = \ ++ -DFU_OFFLINE_DESTDIR=\"\" \ ++ -DLOCALSTATEDIR=\""$(localstatedir)"\" \ ++ $(WARN_CFLAGS) ++ ++bin_PROGRAMS = fwupdmgr ++ ++fwupdmgr_SOURCES = \ ++ fu-device.c \ ++ fu-device.h \ ++ fu-pending.c \ ++ fu-pending.h \ ++ fu-common.c \ ++ fu-common.h \ ++ fu-smbios.c \ ++ fu-smbios.h \ ++ fu-hwids.c \ ++ fu-hwids.h \ ++ fu-progressbar.c \ ++ fu-progressbar.h \ ++ fu-util.c ++ ++fwupdmgr_LDADD = \ ++ $(LIBM) \ ++ $(FWUPD_LIBS) \ ++ $(APPSTREAM_GLIB_LIBS) \ ++ $(SQLITE_LIBS) \ ++ $(SOUP_LIBS) \ ++ $(GUDEV_LIBS) \ ++ $(ARCHIVE_LIBS) \ ++ $(UUID_LIBS) \ ++ $(GLIB_LIBS) ++ ++fwupdmgr_LDFLAGS = \ ++ $(PIE_LDFLAGS) \ ++ $(RELRO_LDFLAGS) ++ ++fwupdmgr_CFLAGS = \ ++ -DFU_OFFLINE_DESTDIR=\"\" \ ++ -DLOCALSTATEDIR=\""$(localstatedir)"\" \ ++ $(WARN_CFLAGS) ++ ++fwupd-resources.c: fwupd.gresource.xml $(dist_introspection_DATA) ++ $(AM_V_GEN) \ ++ glib-compile-resources \ ++ --sourcedir=$(srcdir) \ ++ --sourcedir=$(top_builddir)/data \ ++ --target=$@ \ ++ --generate-source \ ++ --c-name fu \ ++ $(srcdir)/fwupd.gresource.xml ++fwupd-resources.h: fwupd.gresource.xml ++ $(AM_V_GEN) \ ++ glib-compile-resources \ ++ --sourcedir=$(srcdir) \ ++ --sourcedir=$(top_builddir)/data \ ++ --target=$@ \ ++ --generate-header \ ++ --c-name fu \ ++ $(srcdir)/fwupd.gresource.xml ++ ++pkglibexec_PROGRAMS = \ ++ fwupd ++ ++fwupd_SOURCES = \ ++ fu-common.c \ ++ fu-common.h \ ++ fu-config.c \ ++ fu-config.h \ ++ fu-debug.c \ ++ fu-debug.h \ ++ fu-device.c \ ++ fu-device.h \ ++ fu-device-locker.c \ ++ fu-device-locker.h \ ++ fu-engine.c \ ++ fu-engine.h \ ++ fu-hwids.c \ ++ fu-hwids.h \ ++ fu-keyring.c \ ++ fu-keyring.h \ ++ fu-keyring-result.c \ ++ fu-keyring-result.h \ ++ fu-main.c \ ++ fu-pending.c \ ++ fu-pending.h \ ++ fu-plugin.c \ ++ fu-plugin.h \ ++ fu-plugin-private.h \ ++ fu-plugin-vfuncs.h \ ++ fu-quirks.c \ ++ fu-quirks.h \ ++ fu-quirks.h \ ++ fu-smbios.c \ ++ fu-smbios.h \ ++ fwupd-resources.c \ ++ fwupd-resources.h ++ ++if ENABLE_PKCS7 ++fwupd_SOURCES += \ ++ fu-keyring-pkcs7.c \ ++ fu-keyring-pkcs7.h ++endif ++ ++if ENABLE_GPG ++fwupd_SOURCES += \ ++ fu-keyring-gpg.c \ ++ fu-keyring-gpg.h ++endif ++ ++fwupd_LDADD = \ ++ $(FWUPD_LIBS) \ ++ $(APPSTREAM_GLIB_LIBS) \ ++ $(GUSB_LIBS) \ ++ $(GCAB_LIBS) \ ++ $(GLIB_LIBS) \ ++ $(GUDEV_LIBS) \ ++ $(POLKIT_LIBS) \ ++ $(SQLITE_LIBS) \ ++ $(GPGME_LIBS) \ ++ $(UUID_LIBS) \ ++ $(GNUTLS_LIBS) \ ++ $(ARCHIVE_LIBS) ++ ++fwupd_LDFLAGS = \ ++ $(PIE_LDFLAGS) \ ++ $(RELRO_LDFLAGS) ++ ++fwupd_CFLAGS = \ ++ -DFU_OFFLINE_DESTDIR=\"\" \ ++ -DLOCALSTATEDIR=\""$(localstatedir)"\" \ ++ $(WARN_CFLAGS) ++ ++install-data-hook: ++ if test -w $$(dirname $(DESTDIR)$(localstatedir)/); then \ ++ mkdir -p $(DESTDIR)$(localstatedir)/lib/fwupd; \ ++ chmod 0755 $(DESTDIR)$(localstatedir)/lib/fwupd; \ ++ fi ++ ++BUILT_SOURCES = \ ++ fwupd-resources.c \ ++ fwupd-resources.h ++ ++CLEANFILES = $(BUILT_SOURCES) *.log *.trs ++ ++EXTRA_DIST = \ ++ fwupd.gresource.xml \ ++ fwupdmgr.sgml \ ++ $(man_MANS_DIST) ++ ++man_MANS_DIST = \ ++ fwupdmgr.1 ++ ++man_MANS = \ ++ $(man_MANS_DIST) ++ ++fwupdmgr.1: fwupdmgr.sgml ++ $(AM_V_GEN) \ ++ $(DOCBOOK2MAN) $? > /dev/null ++ ++MAINTAINERCLEANFILES = \ ++ findings \ ++ manpage.links \ ++ manpage.log \ ++ manpage.refs \ ++ $(man_MANS) ++ ++clean-local : ++ rm -f *~ ++ rm -f *.1 ++ rm -f manpage.* ++ ++-include $(top_srcdir)/git.mk +diff --git a/src/fwupdmgr.sgml b/src/fwupdmgr.sgml +new file mode 100644 +index 0000000..119b967 +--- /dev/null ++++ b/src/fwupdmgr.sgml +@@ -0,0 +1,248 @@ ++ ++ 26 February,2015"> ++ ++ GNU"> ++ GPL"> ++]> ++ ++ ++ ++
++ richard@hughsie.com; ++
++ ++ Richard ++ Hughes ++ ++ ++ 2015 ++ Richard Hughes ++ ++ &date; ++
++ ++ fwupdmgr ++ 1 ++ ++ ++ &package; ++ fwupd client tool ++ ++ ++ ++ &package; ++ ++ COMMAND ++ ++ ++ ++ DESCRIPTION ++ ++ This manual page documents briefly the &package; command. ++ ++ ++ &package; allows an administrator to update firmware. ++ ++ ++ ++ OPTIONS ++ ++ This program follows the usual &gnu; command line syntax, ++ with long options starting with two dashes (`-'). A summary of ++ options is included below. ++ ++ ++ ++ ++ ++ ++ ++ Show summary of options. ++ ++ ++ ++ ++ ++ ++ ++ Show extra debugging information. ++ ++ ++ ++ ++ ++ ++ ++ Allow re-installing existing firmware versions. ++ ++ ++ ++ ++ ++ ++ ++ Allow downgrading firmware versions. ++ ++ ++ ++ ++ ++ ++ ++ Schedule installation for next reboot when possible. ++ ++ ++ ++ ++ ++ ++ ++ Override plugin warning. ++ ++ ++ ++ ++ ++ COMMANDS ++ ++ This program takes commands with a variable number of arguments. ++ ++ ++ ++ ++ ++ ++ ++ Gets details about a firmware file. ++ ++ ++ ++ ++ ++ ++ ++ Get the list of hardware that supports firmware updates. ++ ++ ++ ++ ++ ++ ++ ++ Gets the list of updates for connected hardware. ++ ++ ++ ++ ++ ++ ++ ++ Updates all firmware to latest versions available. ++ ++ ++ ++ ++ ++ ++ ++ Install a firmware file on this hardware. ++ ++ ++ ++ ++ ++ ++ ++ Install prepared updates now. ++ ++ ++ ++ ++ ++ ++ ++ Clears the results from the last update. ++ ++ ++ ++ ++ ++ ++ ++ Dump the ROM checksum. ++ ++ ++ ++ ++ ++ ++ ++ Monitor the daemon for events. ++ ++ ++ ++ ++ ++ ++ ++ Unlocks the devicefor firmware access. ++ ++ ++ ++ ++ ++ ++ ++ Gets the cryptographic hash of the dumped firmware. ++ ++ ++ ++ ++ ++ ++ ++ Update the stored metadata with current ROM contents. ++ ++ ++ ++ ++ ++ ++ ++ Refresh metadata from remote server. ++ ++ ++ ++ ++ ++ ++ ++ Gets the results from the last update. ++ ++ ++ ++ ++ ++ AUTHOR ++ This manual page was written by Richard Hughes richard@hughsie.com. ++ ++ ++
++ ++ diff --git a/SOURCES/fwupd-only-use-old-systemd-protections.patch b/SOURCES/fwupd-only-use-old-systemd-protections.patch deleted file mode 100644 index bb86d1a..0000000 --- a/SOURCES/fwupd-only-use-old-systemd-protections.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urNp fwupd-0.8.2.old/data/fwupd.service.in fwupd-0.8.2/data/fwupd.service.in ---- fwupd-0.8.2.old/data/fwupd.service.in 2017-07-03 14:30:09.361974001 +0100 -+++ fwupd-0.8.2/data/fwupd.service.in 2017-07-03 14:30:32.740828053 +0100 -@@ -8,12 +8,6 @@ Before=gdm.service - Type=dbus - BusName=org.freedesktop.fwupd - ExecStart=@servicedir@/fwupd/fwupd --MemoryDenyWriteExecute=yes - PrivateTmp=yes --ProtectControlGroups=yes - ProtectHome=yes --ProtectKernelModules=yes --ProtectSystem=full - RestrictAddressFamilies=AF_NETLINK AF_UNIX --RestrictRealtime=yes --ReadWritePaths=@localstatedir@/lib/fwupd -@bootdir@ diff --git a/SPECS/fwupd.spec b/SPECS/fwupd.spec index 61046b6..76a1c9f 100644 --- a/SPECS/fwupd.spec +++ b/SPECS/fwupd.spec @@ -1,45 +1,77 @@ %global glib2_version 2.45.8 -%global libappstream_version 0.5.10 +%global libappstream_version 0.6.10 %global libgusb_version 0.2.9 %global libsoup_version 2.51.92 +%global colord_version 1.0.0 +%global systemd_version 219 %ifarch x86_64 aarch64 %global have_uefi 1 %endif +# libsmbios is only available on x86, and fwupdate is available on just x86_64 +%ifarch x86_64 +%global have_dell 1 +%endif + +# valgrind is not available on s390 +%ifarch x86_64 aarch64 +%global have_valgrind 1 +%endif + Summary: Firmware update daemon Name: fwupd -Version: 0.8.2 -Release: 3%{?dist} +Version: 1.0.1 +Release: 4%{?dist} License: GPLv2+ URL: https://github.com/hughsie/fwupd Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz -# already upstream -Patch0: fwupd-fix-under-including.patch -Patch1: 0001-trivial-Return-a-sensible-error-if-DownloadURI-is-in.patch +# neuter the LVFS Patch2: 0001-Do-not-use-the-LVFS.patch -Patch3: fwupd-only-use-old-systemd-protections.patch + +# don't depend on such a new appstream-glib +Patch3: fwupd-build-with-old-deps.patch + +# don't use meson, urgh +Patch4: fwupd-no-meson.patch BuildRequires: docbook-utils BuildRequires: gettext BuildRequires: glib2-devel >= %{glib2_version} -BuildRequires: intltool BuildRequires: libappstream-glib-devel >= %{libappstream_version} BuildRequires: libgudev1-devel BuildRequires: libgusb-devel >= %{libgusb_version} BuildRequires: libsoup-devel >= %{libsoup_version} -BuildRequires: colord-devel >= 1.0.0 +BuildRequires: colord-devel >= %{colord_version} BuildRequires: polkit-devel >= 0.103 -BuildRequires: libgcab1-devel BuildRequires: sqlite-devel BuildRequires: gpgme-devel -BuildRequires: systemd +BuildRequires: systemd >= %{systemd_version} BuildRequires: libarchive-devel BuildRequires: gobject-introspection-devel BuildRequires: gcab BuildRequires: elfutils-libelf-devel BuildRequires: gtk-doc +BuildRequires: libuuid-devel +BuildRequires: gnutls-devel +BuildRequires: gnutls-utils + +# because we're creating the build files +BuildRequires: autoconf +BuildRequires: autoconf-archive +BuildRequires: automake +BuildRequires: gettext-devel + +%if 0%{?have_valgrind} +BuildRequires: valgrind +BuildRequires: valgrind-devel +%endif + +%if 0%{?have_dell} +BuildRequires: efivar-devel +BuildRequires: libsmbios-devel >= 2.3.0 +%endif %if 0%{?have_uefi} BuildRequires: fwupdate-devel >= 7 @@ -70,24 +102,31 @@ Files for development with %{name}. %prep %setup -q -%patch0 -p1 -b .underinclude -%patch1 -p1 -b .sensible-error %patch2 -p1 -b .no-lvfs -%patch3 -p1 -b .no-new-systemd +%patch3 -p1 -b .old-appstream-glib +%patch4 -p1 -b .automake %build +gtkdocize +autoreconf -f -i %configure \ --disable-static \ - --disable-thunderbolt \ + --disable-pkcs7 \ + --enable-gpg \ + --enable-thunderbolt \ --enable-gtk-doc \ --enable-colorhug \ + --enable-synaptics \ %if 0%{?have_uefi} --enable-uefi \ %else --disable-uefi \ %endif +%if 0%{?have_dell} + --enable-dell \ +%else --disable-dell \ - --disable-synaptics \ +%endif --disable-rpath \ --disable-silent-rules \ --disable-dependency-tracking @@ -100,17 +139,8 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' mkdir --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg # not ready yet -rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_altos.so -rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_raspberrypi.so -rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_steelseries.so -rm -f %{buildroot}%{_libdir}/fwupd-plugins-2/libfu_plugin_unifying.so - -# we don't want to include this in RHEL yet -rm -rf %{buildroot}%{_datadir}/gtk-doc/html/libdfu -rm -rf %{buildroot}%{_includedir}/libdfu -rm -f %{buildroot}%{_includedir}/dfu.h -rm -f %{buildroot}%{_includedir}/libdfu/*.h -rm -f %{buildroot}%{_libdir}/pkgconfig/dfu.pc +rm -f %{buildroot}%{_libdir}/fwupd-plugins-3/libfu_plugin_altos.so +rm -f %{buildroot}%{_libdir}/fwupd-plugins-3/libfu_plugin_raspberrypi.so %find_lang %{name} @@ -131,60 +161,87 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/dfu.pc %files -f %{name}.lang %doc README.md AUTHORS NEWS %license COPYING -%config(noreplace)%{_sysconfdir}/fwupd.conf +%config(noreplace)%{_sysconfdir}/fwupd/daemon.conf %dir %{_libexecdir}/fwupd %{_libexecdir}/fwupd/fwupd +%{_bindir}/dfu-tool %{_bindir}/fwupdmgr +%dir %{_sysconfdir}/fwupd +%dir %{_sysconfdir}/fwupd/remotes.d +%{_sysconfdir}/fwupd/remotes.d/fwupd.conf +%{_sysconfdir}/fwupd/remotes.d/lvfs.conf +%{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf +%{_sysconfdir}/fwupd/remotes.d/vendor.conf %{_sysconfdir}/pki/fwupd %{_sysconfdir}/pki/fwupd-metadata %{_sysconfdir}/dbus-1/system.d/org.freedesktop.fwupd.conf -%{_datadir}/app-info/xmls/org.freedesktop.fwupd.xml +%{_datadir}/fwupd/remotes.d/fwupd/metadata.xml +%{_datadir}/fwupd/remotes.d/vendor/firmware/README.md %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service +%{_datadir}/man/man1/dfu-tool.1.gz %{_datadir}/man/man1/fwupdmgr.1.gz +%{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml %{_unitdir}/fwupd-offline-update.service %{_unitdir}/fwupd.service %{_unitdir}/system-update.target.wants/ %dir %{_localstatedir}/lib/fwupd +%dir %{_datadir}/fwupd/quirks.d +%{_datadir}/fwupd/quirks.d/*.quirk +%{_localstatedir}/lib/fwupd/builder/README.md %{_libdir}/libfwupd*.so.* -%{_libdir}/girepository-1.0/Fwupd-1.0.typelib +%{_libdir}/girepository-1.0/Fwupd-2.0.typelib /usr/lib/udev/rules.d/*.rules -%dir %{_libdir}/fwupd-plugins-2 -%{_libdir}/fwupd-plugins-2/libfu_plugin_colorhug.so -%{_libdir}/fwupd-plugins-2/libfu_plugin_dfu.so -%{_libdir}/fwupd-plugins-2/libfu_plugin_ebitdo.so -%{_libdir}/fwupd-plugins-2/libfu_plugin_test.so -%{_libdir}/fwupd-plugins-2/libfu_plugin_udev.so +%dir %{_libdir}/fwupd-plugins-3 +%{_libdir}/fwupd-plugins-3/libfu_plugin_amt.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_colorhug.so +%if 0%{?have_dell} +%{_libdir}/fwupd-plugins-3/libfu_plugin_dell.so +%endif +%{_libdir}/fwupd-plugins-3/libfu_plugin_dfu.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_ebitdo.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_steelseries.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_synapticsmst.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_test.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_thunderbolt_power.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_thunderbolt.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_udev.so %if 0%{?have_uefi} -%{_libdir}/fwupd-plugins-2/libfu_plugin_uefi.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi.so %endif -%{_libdir}/fwupd-plugins-2/libfu_plugin_upower.so -%{_libdir}/fwupd-plugins-2/libfu_plugin_usb.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_unifying.so +%{_libdir}/fwupd-plugins-3/libfu_plugin_upower.so %ghost %{_localstatedir}/lib/fwupd/gnupg -# merged from libdfu upstream -%{_bindir}/dfu-tool -%{_datadir}/man/man1/dfu-tool.1.gz -%{_libdir}/girepository-1.0/Dfu-1.0.typelib -%{_libdir}/libdfu*.so.* - %files devel -%{_datadir}/gir-1.0/Fwupd-1.0.gir +%{_datadir}/gir-1.0/Fwupd-2.0.gir %{_datadir}/gtk-doc/html/libfwupd %{_includedir}/fwupd-1 %{_libdir}/libfwupd*.so %{_libdir}/pkgconfig/fwupd.pc -# merged from libdfu upstream -%{_datadir}/gir-1.0/Dfu-1.0.gir -%{_libdir}/libdfu*.so - %changelog -* Mon Jul 03 2017 Richard Hughes 0.8.2-3 -- Do not use systemd protections not yet available in RHEL. -- Resolves: #1380827 +* Mon Jan 08 2018 Richard Hughes 1.0.1-4 +- Enable the libsmbios dependency to get the Dell plugin +- Resolves: #1420913 + +* Thu Nov 23 2017 Richard Hughes 1.0.1-3 +- Remove the runtime dep on bubblewrap. +- Resolves: #1512620 + +* Tue Nov 14 2017 Richard Hughes 1.0.1-2 +- Enable Synaptics MST hub updates. +- Resolves: #1420913 + +* Thu Nov 09 2017 Richard Hughes 1.0.1-1 +- Rebase to 1.0.1, specifically the wip/hughsie/rhel75 branch which adds + back the automake build system and lowers the required versions of deps. +- This also un-neuters fwupd so that most of the plugins are functional, + for instance allowing updates of Thunderbolt controllers and Logitech + Unifying devices. However, the LVFS is still disabled. +- Resolves: #1313086 * Mon May 08 2017 Richard Hughes 0.8.2-2 - Do not use the LVFS by default.