diff options
Diffstat (limited to 'recipes-core/swupd-server/swupd-server/0002-Add-configure-option-to-re-enable-config-files-in-ma.patch')
-rw-r--r-- | recipes-core/swupd-server/swupd-server/0002-Add-configure-option-to-re-enable-config-files-in-ma.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/recipes-core/swupd-server/swupd-server/0002-Add-configure-option-to-re-enable-config-files-in-ma.patch b/recipes-core/swupd-server/swupd-server/0002-Add-configure-option-to-re-enable-config-files-in-ma.patch new file mode 100644 index 0000000..a5ab7af --- /dev/null +++ b/recipes-core/swupd-server/swupd-server/0002-Add-configure-option-to-re-enable-config-files-in-ma.patch @@ -0,0 +1,66 @@ +From e209255d8985eb4eb4c43f5e773ee1a0a16eb297 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 2/2] 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 8bb6e3b..afffad5 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 58307d9..7cce735 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 69a8fb9..58d0be1 100644 +--- a/src/manifest.c ++++ b/src/manifest.c +@@ -830,7 +830,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 + |