aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-core/swupd-client/swupd-client-2.87/0001-Add-configure-option-to-re-enable-updating-of-config.patch58
-rw-r--r--recipes-core/swupd-client/swupd-client/0001-Add-configure-option-to-re-enable-updating-of-config.patch35
-rw-r--r--recipes-core/swupd-client/swupd-client_git.bb4
3 files changed, 79 insertions, 18 deletions
diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-Add-configure-option-to-re-enable-updating-of-config.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-Add-configure-option-to-re-enable-updating-of-config.patch
new file mode 100644
index 0000000..ac16d06
--- /dev/null
+++ b/recipes-core/swupd-client/swupd-client-2.87/0001-Add-configure-option-to-re-enable-updating-of-config.patch
@@ -0,0 +1,58 @@
+From 1f2ad4cdff6b999fcd00193cdd1dc8a35e49c0b2 Mon Sep 17 00:00:00 2001
+From: Joshua Lock <joshua.g.lock@intel.com>
+Date: Thu, 3 Mar 2016 19:55:41 +0000
+Subject: [PATCH] Add configure option to re-enable updating of config files
+
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+Upstream-Status: Pending
+
+---
+ configure.ac | 7 +++++++
+ src/heuristics.c | 5 +++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f94a17d..0063463 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,6 +78,13 @@ AC_ARG_ENABLE(
+ enable_linux_rootfs_build="no"
+ )
+
++AC_ARG_ENABLE(
++ [stateless],
++ AS_HELP_STRING([--disable-stateless],[OS is not stateless, do not ignore configuration files (stateless by default)]),
++ AC_DEFINE(OS_IS_STATELESS,0,[OS is not stateless]),
++ AC_DEFINE(OS_IS_STATELESS,1,[OS is stateless])
++)
++
+ AS_IF([test "$enable_linux_btrfs_build" = "yes" -a "$enable_android_build" = "yes"],
+ [AC_MSG_ERROR([Cannot enable more than one build variant. Choose a single variant.])])
+
+diff --git a/src/heuristics.c b/src/heuristics.c
+index 12fb59c..92dbcdc 100644
+--- a/src/heuristics.c
++++ b/src/heuristics.c
+@@ -27,6 +27,7 @@
+ #include <string.h>
+ #include <assert.h>
+
++#include <config.h>
+ #include <swupd.h>
+
+ /* trailing slash is to indicate dir itself is expected to exist, but
+@@ -113,8 +114,8 @@ void apply_heuristics(struct file *file)
+
+ bool ignore(struct file *file)
+ {
+- if ((file->is_config) ||
+- is_config(file->filename) || // ideally we trust the manifest but short term reapply check here
++ if ((OS_IS_STATELESS && file->is_config) ||
++ (OS_IS_STATELESS && is_config(file->filename)) || // ideally we trust the manifest but short term reapply check here
+ (file->is_state) ||
+ is_state(file->filename) || // ideally we trust the manifest but short term reapply check here
+ (file->is_boot && fix && file->is_deleted) || // shouldn't happen
+--
+2.5.0
+
diff --git a/recipes-core/swupd-client/swupd-client/0001-Add-configure-option-to-re-enable-updating-of-config.patch b/recipes-core/swupd-client/swupd-client/0001-Add-configure-option-to-re-enable-updating-of-config.patch
index ac16d06..649f7da 100644
--- a/recipes-core/swupd-client/swupd-client/0001-Add-configure-option-to-re-enable-updating-of-config.patch
+++ b/recipes-core/swupd-client/swupd-client/0001-Add-configure-option-to-re-enable-updating-of-config.patch
@@ -1,23 +1,22 @@
-From 1f2ad4cdff6b999fcd00193cdd1dc8a35e49c0b2 Mon Sep 17 00:00:00 2001
+From d648898c8f9823a8d511507f93390079954bc24a Mon Sep 17 00:00:00 2001
From: Joshua Lock <joshua.g.lock@intel.com>
-Date: Thu, 3 Mar 2016 19:55:41 +0000
+Date: Mon, 18 Apr 2016 13:30:18 +0100
Subject: [PATCH] Add configure option to re-enable updating of config files
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
Upstream-Status: Pending
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
configure.ac | 7 +++++++
src/heuristics.c | 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index f94a17d..0063463 100644
+index b1905f0..4a5c029 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -78,6 +78,13 @@ AC_ARG_ENABLE(
- enable_linux_rootfs_build="no"
+@@ -63,6 +63,13 @@ AS_IF([test "x$enable_bsdtar" = "xyes" ],
+ [AC_DEFINE(SWUPD_WITHOUT_BSDTAR, 1, [Use default tar])]
)
+AC_ARG_ENABLE(
@@ -27,23 +26,23 @@ index f94a17d..0063463 100644
+ AC_DEFINE(OS_IS_STATELESS,1,[OS is stateless])
+)
+
- AS_IF([test "$enable_linux_btrfs_build" = "yes" -a "$enable_android_build" = "yes"],
- [AC_MSG_ERROR([Cannot enable more than one build variant. Choose a single variant.])])
-
+ AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
+ [path to systemd system service dir @<:@default=/usr/lib/systemd/system@:>@]), [unitpath=${withval}],
+ [unitpath="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"])
diff --git a/src/heuristics.c b/src/heuristics.c
-index 12fb59c..92dbcdc 100644
+index e7c0632..c488e17 100644
--- a/src/heuristics.c
+++ b/src/heuristics.c
@@ -27,6 +27,7 @@
#include <string.h>
- #include <assert.h>
+ #include <unistd.h>
-+#include <config.h>
- #include <swupd.h>
++#include "config.h"
+ #include "swupd.h"
/* trailing slash is to indicate dir itself is expected to exist, but
-@@ -113,8 +114,8 @@ void apply_heuristics(struct file *file)
-
+@@ -121,8 +122,8 @@ void apply_heuristics(struct file *file)
+ */
bool ignore(struct file *file)
{
- if ((file->is_config) ||
@@ -52,7 +51,7 @@ index 12fb59c..92dbcdc 100644
+ (OS_IS_STATELESS && is_config(file->filename)) || // ideally we trust the manifest but short term reapply check here
(file->is_state) ||
is_state(file->filename) || // ideally we trust the manifest but short term reapply check here
- (file->is_boot && fix && file->is_deleted) || // shouldn't happen
+ (file->is_boot && file->is_deleted) ||
--
-2.5.0
+2.5.5
diff --git a/recipes-core/swupd-client/swupd-client_git.bb b/recipes-core/swupd-client/swupd-client_git.bb
index 1a35d8e..f4c833f 100644
--- a/recipes-core/swupd-client/swupd-client_git.bb
+++ b/recipes-core/swupd-client/swupd-client_git.bb
@@ -10,6 +10,7 @@ SRC_URI = "\
git://github.com/clearlinux/swupd-client.git;protocol=https \
file://Change-systemctl-path-to-OE-systemctl-path.patch \
file://0001-staging.c-Protect-tar-command-against-special-charac.patch \
+ file://0001-Add-configure-option-to-re-enable-updating-of-config.patch \
"
SRCREV = "e4b2a32448d9fd9ab494f861f1bb143468659c75"
@@ -26,6 +27,9 @@ EXTRA_OECONF = "\
--enable-bsdtar \
"
+PACKAGECONFIG ??= "stateless"
+PACKAGECONFIG[stateless] = ",--disable-stateless"
+
do_install_append () {
# TODO: This should be a less os-specific directory and not hard-code datadir
install -d ${D}${datadir}/clear/bundles