diff options
-rw-r--r-- | classes/swupd-image.bbclass | 5 | ||||
-rw-r--r-- | recipes-core/swupd-server/swupd-server/0002-pack.c-do-not-clean-packstage.patch | 38 | ||||
-rw-r--r-- | recipes-core/swupd-server/swupd-server_git.bb | 1 |
3 files changed, 44 insertions, 0 deletions
diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass index e849f56..4e03c1a 100644 --- a/classes/swupd-image.bbclass +++ b/classes/swupd-image.bbclass @@ -380,6 +380,11 @@ END fi done + # Remove any remaining intermediate artifacts from a previous run. + # Necessary because the corresponding cleanup in swupd-server is + # disabled because of https://bugzilla.yoctoproject.org/show_bug.cgi?id=10623. + rm -rf ${DEPLOY_DIR_SWUPD}/packstage + invoke_swupd () { echo $PSEUDO "$@" time env $PSEUDO "$@" diff --git a/recipes-core/swupd-server/swupd-server/0002-pack.c-do-not-clean-packstage.patch b/recipes-core/swupd-server/swupd-server/0002-pack.c-do-not-clean-packstage.patch new file mode 100644 index 0000000..4cc3af4 --- /dev/null +++ b/recipes-core/swupd-server/swupd-server/0002-pack.c-do-not-clean-packstage.patch @@ -0,0 +1,38 @@ +From 7b9e1bc78b704a2fb9610dddc6f0925bb6412f55 Mon Sep 17 00:00:00 2001 +From: Patrick Ohly <patrick.ohly@intel.com> +Date: Tue, 8 Nov 2016 18:34:44 +0100 +Subject: [PATCH 2/3] pack.c: do not clean packstage + +This works around a bug in pseudo +(https://bugzilla.yoctoproject.org/show_bug.cgi?id=10623) where +unlinking the linked entries in the staging area also removes the +xattrs of the original files in the full directory tree. + +This works as long as the swupd_create_pack command does not get +called again without cleaning the packstage. + +Upstream-Status: Inappropriate [workaround] + +Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> +--- + src/pack.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/pack.c b/src/pack.c +index 46c7c68..984c2d6 100644 +--- a/src/pack.c ++++ b/src/pack.c +@@ -46,7 +46,9 @@ static void empty_pack_stage(int full, int from_version, int to_version, char *m + // clean any stale data (eg: re-run after a failure) + string_or_die(¶m, "%s/%s/%i_to_%i/", packstage_dir, module, from_version, to_version); + char *const rmcmd[] = { "rm", "-fr", param, NULL }; +- if (system_argv(rmcmd) != 0) { ++ if (true) { ++ LOG(NULL, "Skipping removal of packstage", "%s/%s/%i_to_%i/", packstage_dir, module, from_version, to_version); ++ } else if (system_argv(rmcmd) != 0) { + fprintf(stderr, "Failed to clean %s/%s/%i_to_%i\n", + packstage_dir, module, from_version, to_version); + free(param); +-- +2.1.4 + diff --git a/recipes-core/swupd-server/swupd-server_git.bb b/recipes-core/swupd-server/swupd-server_git.bb index 63932c4..2ee8642 100644 --- a/recipes-core/swupd-server/swupd-server_git.bb +++ b/recipes-core/swupd-server/swupd-server_git.bb @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/clearlinux/swupd-server.git;protocol=https \ file://0002-add-logging-to-stdout.patch \ file://swupd_create_fullfiles-avoid-segfault-when-nothing-c.patch \ file://0001-delta.c-fix-xattr-test-after-patching.patch \ + file://0002-pack.c-do-not-clean-packstage.patch \ " SRCREV = "ddca171dad32229ceeff8b8527a179610b88ce55" |