aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch')
-rw-r--r--recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch37
1 files changed, 19 insertions, 18 deletions
diff --git a/recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch b/recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch
index 063c701..6e221b9 100644
--- a/recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch
+++ b/recipes-core/swupd-server/swupd-server/0003-swupd_create_pack-download-original-files-on-demand-.patch
@@ -1,8 +1,8 @@
-From ee076ebeb041b725e40041e77d8f368f866f3216 Mon Sep 17 00:00:00 2001
+From d05c819ff83f04145dac355e183b426b5802d6b4 Mon Sep 17 00:00:00 2001
From: Patrick Ohly <patrick.ohly@intel.com>
Date: Tue, 8 Nov 2016 18:39:49 +0100
-Subject: [PATCH 3/3] swupd_create_pack: download original files on demand for
- diffing
+Subject: [PATCH 09/12] swupd_create_pack: download original files on demand
+ for diffing
The new, optional mode gets enabled via the --content-url parameter.
When specified, swupd_create_pack will download the <original
@@ -28,19 +28,22 @@ bsdtar.
If for some reason a format change is necessary, delta computation
becomes impossible and falls back to staging the full files.
+Upstream-Status: Submitted [https://github.com/clearlinux/swupd-server/pull/47]
+
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+
---
include/swupd.h | 2 ++
- src/delta.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
- src/globals.c | 13 ++++++++
- src/make_packs.c | 8 +++++
- 4 files changed, 111 insertions(+), 2 deletions(-)
+ src/delta.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/globals.c | 13 +++++++++
+ src/make_packs.c | 8 ++++++
+ 4 files changed, 110 insertions(+), 1 deletion(-)
diff --git a/include/swupd.h b/include/swupd.h
-index 31c7191..c1c0e96 100644
+index f9c0583..e1fa6ff 100644
--- a/include/swupd.h
+++ b/include/swupd.h
-@@ -147,12 +147,14 @@ extern char *state_dir;
+@@ -149,12 +149,14 @@ extern char *state_dir;
extern char *packstage_dir;
extern char *image_dir;
extern char *staging_dir;
@@ -56,27 +59,25 @@ index 31c7191..c1c0e96 100644
extern void free_state_globals(void);
diff --git a/src/delta.c b/src/delta.c
-index 67e7df7..7e978b1 100644
+index ad40820..563abb9 100644
--- a/src/delta.c
+++ b/src/delta.c
-@@ -37,8 +37,14 @@
+@@ -37,7 +37,13 @@
- void __create_delta(struct file *file, int from_version)
+ void __create_delta(struct file *file, int from_version, char *from_hash)
{
-- char *original, *newfile, *outfile, *dotfile, *testnewfile;
-- char *conf, *param1, *param2;
-+ char *original = NULL, *newfile = NULL, *outfile = NULL, *dotfile = NULL, *testnewfile = NULL;
+- char *original, *newfile, *outfile, *dotfile, *testnewfile, *conf;
++ char *original = NULL, *newfile = NULL, *outfile = NULL, *dotfile = NULL, *testnewfile = NULL, *conf = NULL;
+ char *tmpdir = NULL;
+ char *url = NULL;
+ char *cmd = NULL;
-+ char *conf = NULL, *param1 = NULL, *param2 = NULL;
+ bool delete_original = false;
+ struct manifest *manifest = NULL;
+ GError *gerror = NULL;
int ret;
if (file->is_link) {
-@@ -58,6 +64,74 @@ void __create_delta(struct file *file, int from_version)
+@@ -57,6 +63,74 @@ void __create_delta(struct file *file, int from_version, char *from_hash)
string_or_die(&original, "%s/%i/full/%s", conf, from_version, file->peer->filename);
@@ -151,7 +152,7 @@ index 67e7df7..7e978b1 100644
free(conf);
conf = config_output_dir();
-@@ -141,6 +215,18 @@ void __create_delta(struct file *file, int from_version)
+@@ -136,6 +210,18 @@ void __create_delta(struct file *file, int from_version, char *from_hash)
LOG(NULL, "Failed to rename", "");
}
out: