aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-server/swupd-server/0003-Add-configure-option-to-re-enable-config-files-in-ma.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/swupd-server/swupd-server/0003-Add-configure-option-to-re-enable-config-files-in-ma.patch')
-rw-r--r--recipes-core/swupd-server/swupd-server/0003-Add-configure-option-to-re-enable-config-files-in-ma.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/recipes-core/swupd-server/swupd-server/0003-Add-configure-option-to-re-enable-config-files-in-ma.patch b/recipes-core/swupd-server/swupd-server/0003-Add-configure-option-to-re-enable-config-files-in-ma.patch
new file mode 100644
index 0000000..af14bbe
--- /dev/null
+++ b/recipes-core/swupd-server/swupd-server/0003-Add-configure-option-to-re-enable-config-files-in-ma.patch
@@ -0,0 +1,65 @@
+From f35e84199529c0dc320d8d4280a79b8060dbaf21 Mon Sep 17 00:00:00 2001
+From: Joshua Lock <joshua.g.lock@intel.com>
+Date: Fri, 12 Feb 2016 16:02:58 +0000
+Subject: [PATCH] Add configure option to re-enable config files in manifests
+
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+Upstream-Status: Accepted (v3.0+)
+
+---
+ configure.ac | 6 ++++++
+ include/swupd.h | 6 ++++++
+ src/manifest.c | 2 +-
+ 3 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0cb074f..47256b6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -28,6 +28,12 @@ AC_ARG_ENABLE(
+ AC_DEFINE(SWUPD_WITH_LZMA,1,[Use lzma compression])
+ [enable_lzma=check]
+ )
++AC_ARG_ENABLE(
++ [stateless],
++ AS_HELP_STRING([--disable-stateless],[OS is not stateless, do not ignore configuration files (stateless by default)]),
++ AC_DEFINE(SWUPD_WITH_STATELESS,0,[OS is not stateless]),
++ AC_DEFINE(SWUPD_WITH_STATELESS,1,[OS is stateless])
++)
+
+ AS_IF([test "$enable_lzma" = "check"],
+ [PKG_CHECK_MODULES([lzma],
+diff --git a/include/swupd.h b/include/swupd.h
+index ad4b967..d45ca9c 100644
+--- a/include/swupd.h
++++ b/include/swupd.h
+@@ -23,6 +23,12 @@
+ #define TAR_PERM_ATTR_ARGS "--preserve-permissions --xattrs --xattrs-include='*'"
+ #endif
+
++#if SWUPD_WITH_STATELESS
++#define OS_IS_STATELESS 1
++#else
++#define OS_IS_STATELESS 0
++#endif
++
+ /* Build types */
+ #define REGULAR_BUILD 0
+ #define FIX_BUILD 1
+diff --git a/src/manifest.c b/src/manifest.c
+index 251c884..24403e3 100644
+--- a/src/manifest.c
++++ b/src/manifest.c
+@@ -825,7 +825,7 @@ int prune_manifest(struct manifest *manifest)
+ next = g_list_next(list);
+ file = list->data;
+
+- if ((!file->is_deleted) && (file->is_config)) {
++ if (OS_IS_STATELESS && (!file->is_deleted) && (file->is_config)) {
+ // toward being a stateless OS
+ LOG(file, "Skipping config file in manifest write", "component %s", manifest->component);
+ manifest->files = g_list_delete_link(manifest->files, list);
+--
+2.5.0
+