aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-client/swupd-client-2.87
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/swupd-client/swupd-client-2.87')
-rw-r--r--recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch58
-rw-r--r--recipes-core/swupd-client/swupd-client-2.87/Change-systemctl-path-to-OE-systemctl-path.patch31
-rw-r--r--recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch36
-rw-r--r--recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch38
4 files changed, 163 insertions, 0 deletions
diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch
new file mode 100644
index 0000000..c5faae8
--- /dev/null
+++ b/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch
@@ -0,0 +1,58 @@
+From 0ac7226645db1c7048863755a296e1e5f7d8319c Mon Sep 17 00:00:00 2001
+From: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
+Date: Thu, 11 Feb 2016 12:49:30 +0200
+Subject: [PATCH] Tolerate quotes in os-release files
+
+Some systems like Yocto or OpenSUSE prefer to wrap values in
+/etc/os-release file with quotes always and that still conforms
+to the format defined in systemd.
+
+This patch removes quotes from the values before trying to
+transform them into integer version id.
+
+Upstream-Status: Backport (v3.0.0+)
+
+Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
+---
+ src/version.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/src/version.c b/src/version.c
+index d8ad76b..1708a98 100644
+--- a/src/version.c
++++ b/src/version.c
+@@ -95,6 +95,7 @@ int read_version_from_subvol_file(char *path_prefix)
+ FILE *file;
+ int v = -1;
+ char *buildstamp;
++ char *src, *dest;
+
+ string_or_die(&buildstamp, "%s/usr/lib/os-release", path_prefix);
+ file = fopen(buildstamp, "rm");
+@@ -116,7 +117,22 @@ int read_version_from_subvol_file(char *path_prefix)
+ if (fgets(line, LINE_MAX, file) == NULL)
+ break;
+
+- if (strncmp(line,"VERSION_ID=", 11) == 0) {
++ if (strncmp(line, "VERSION_ID=", 11) == 0) {
++ src = &line[11];
++
++ /* Drop quotes and newline in value */
++ dest = src;
++ while (*src) {
++ if (*src == '\'' || *src == '"' || *src == '\n') {
++ ++src;
++ } else {
++ *dest = *src;
++ ++dest;
++ ++src;
++ }
++ }
++ *dest = 0;
++
+ v = strtoull(&line[11], NULL, 10);
+ break;
+ }
+--
+2.5.0
+
diff --git a/recipes-core/swupd-client/swupd-client-2.87/Change-systemctl-path-to-OE-systemctl-path.patch b/recipes-core/swupd-client/swupd-client-2.87/Change-systemctl-path-to-OE-systemctl-path.patch
new file mode 100644
index 0000000..5ca6373
--- /dev/null
+++ b/recipes-core/swupd-client/swupd-client-2.87/Change-systemctl-path-to-OE-systemctl-path.patch
@@ -0,0 +1,31 @@
+From 259d86e64146c3156eccfcce0351a9cdc4714766 Mon Sep 17 00:00:00 2001
+From: Jaska Uimonen <jaska.uimonen@intel.com>
+Date: Thu, 14 Jan 2016 10:17:43 +0200
+Subject: [PATCH] change systemctl path to OE systemctl path
+
+Upstream-Status: Inappropriate
+
+---
+ src/scripts.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/scripts.c b/src/scripts.c
+index e426272..9bec0f5 100644
+--- a/src/scripts.c
++++ b/src/scripts.c
+@@ -84,10 +84,10 @@ static void update_triggers(void)
+ int ret;
+ LOG_INFO(NULL, "calling systemd trigger", class_scripts, "");
+
+- ret = system("/usr/bin/systemctl daemon-reload");
++ ret = system("/bin/systemctl daemon-reload");
+ if (ret != 0)
+ LOG_ERROR(NULL, "systemd daemon reload failed", class_scripts, "%d", ret);
+- ret = system("/usr/bin/systemctl restart update-triggers.target");
++ ret = system("/bin/systemctl restart update-triggers.target");
+ if (ret != 0)
+ LOG_ERROR(NULL, "systemd update triggers failed", class_scripts, "%d", ret);
+ }
+--
+2.5.0
+
diff --git a/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch b/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch
new file mode 100644
index 0000000..a557173
--- /dev/null
+++ b/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch
@@ -0,0 +1,36 @@
+From ccce73a2d703e6789ded87ca5aa9f3b7c506892a Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Thu, 7 Jan 2016 16:19:34 +0200
+Subject: [PATCH] Fix build failure on Yocto
+
+On install phase certificate files are being installed twice as included in
+_DATA twice. We can use EXTRA_DIST than dist_.
+
+Upstream-Status: Backported (v3.0.0+)
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1e65d3d..4d15c55 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -111,11 +111,11 @@ SWUPD_CERTS = certs/157753a5.0 \
+ certs/d6325660.0 \
+ certs/d6325660.1
+ swupdcerts_DATA = $(SWUPD_CERTS)
+-dist_swupdcerts_DATA = $(SWUPD_CERTS)
+
+ EXTRA_DIST += \
+ data/check-update.service \
+- data/check-update.timer
++ data/check-update.timer \
++ $(SWUPD_CERTS)
+
+ DISTCHECK_CONFIGURE_FLAGS = \
+ --with-systemdsystemunitdir=$$dc_install_base/$(systemdunitdir)
+--
+2.1.4
+
diff --git a/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch b/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch
new file mode 100644
index 0000000..e5b53ef
--- /dev/null
+++ b/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch
@@ -0,0 +1,38 @@
+From d80ae9954c5e5b720766274249dbf5309b7c70a9 Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Wed, 13 Jan 2016 15:46:19 +0200
+Subject: [PATCH] Right usage of AC_ARG_ENABLE on bzip2
+
+Upstream-Status: Pending[Not submitted]
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ configure.ac | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f94a17d..b11ef0a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,11 +20,13 @@ AC_CONFIG_HEADERS([config.h])
+ PKG_CHECK_MODULES([lzma], [liblzma])
+ PKG_CHECK_MODULES([zlib], [zlib])
+ AC_ARG_ENABLE(
+- bzip2,
+- AS_HELP_STRING([--disable-bzip2],[Do not use bzip2 compression (uses bzip2 by default)]),
+- AC_DEFINE(SWUPD_WITHOUT_BZIP2,1,[Do not use bzip2 compression]) ,
+- AC_DEFINE(SWUPD_WITH_BZIP2,1,[Use bzip2 compression])
+- AC_CHECK_LIB([bz2], [BZ2_bzBuffToBuffCompress], [], [AC_MSG_ERROR([the libbz2 library is missing])])
++ [bzip2],
++ AS_HELP_STRING([--disable-bzip2],[Do not use bzip2 compression (uses bzip2 by default)])
++)
++AS_IF([test "x$enable_bzip2" = "xyes" ],
++ [AC_DEFINE(SWUPD_WITH_BZIP2,1,[Use bzip2 compression])
++ AC_CHECK_LIB([bz2], [BZ2_bzBuffToBuffCompress], [], [AC_MSG_ERROR([the libbz2 library is missing])])],
++ [AC_DEFINE(SWUPD_WITHOUT_BZIP2,1,[Do not use bzip2 compression])]
+ )
+
+ AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
+--
+2.1.4
+