diff options
11 files changed, 75 insertions, 120 deletions
diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch index c5faae8..2e9bd5b 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0001-Tolerate-quotes-in-os-release-files.patch @@ -10,7 +10,7 @@ to the format defined in systemd. This patch removes quotes from the values before trying to transform them into integer version id. -Upstream-Status: Backport (v3.0.0+) +Upstream-Status: Backport [v3.0.0+] Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> --- @@ -26,13 +26,13 @@ index d8ad76b..1708a98 100644 int v = -1; char *buildstamp; + char *src, *dest; - + string_or_die(&buildstamp, "%s/usr/lib/os-release", path_prefix); file = fopen(buildstamp, "rm"); @@ -116,7 +117,22 @@ int read_version_from_subvol_file(char *path_prefix) if (fgets(line, LINE_MAX, file) == NULL) break; - + - if (strncmp(line,"VERSION_ID=", 11) == 0) { + if (strncmp(line, "VERSION_ID=", 11) == 0) { + src = &line[11]; @@ -53,6 +53,5 @@ index d8ad76b..1708a98 100644 v = strtoull(&line[11], NULL, 10); break; } --- +-- 2.5.0 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch index cbe2d28..95a94e9 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch @@ -9,7 +9,7 @@ pointer inside deduplicate_files_from_manifest() isn't initialized which leads to NULL as output of the function. As result no files of the deleted bundle get deleted at all. -Upstream-Status: Backported [v3.0.0+] +Upstream-Status: Backport [v3.0.0+] Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> --- @@ -22,13 +22,12 @@ index 7c356d7..10b7daa 100644 +++ b/src/manifest.c @@ -1326,7 +1326,7 @@ void deduplicate_files_from_manifest(struct manifest **m1, struct manifest *m2) int count = 0; - + bmanifest = *m1; - iter1 = list_head(bmanifest->files); + iter1 = preserver = list_head(bmanifest->files); iter2 = list_head(m2->files); - + while (iter1 && iter2) { --- +-- 2.5.0 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-staging.c-Protect-tar-command-against-special-charac.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-staging.c-Protect-tar-command-against-special-charac.patch index e069722..4b69b2f 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0001-staging.c-Protect-tar-command-against-special-charac.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0001-staging.c-Protect-tar-command-against-special-charac.patch @@ -12,7 +12,7 @@ Also a target file may have a name with '@' as its first symbol. Since the symbol has a special meaning in case of bsdtar the name needs to escaped in tar commands with the prefix './'. -Upstream-Status: Submitted [https://github.com/clearlinux/swupd-client/pull/43] +Upstream-Status: Backport [v3.5.2+] Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> --- @@ -54,6 +54,5 @@ index 742e8a2..6f7eafb 100644 TAR_COMMAND " -C %s/%s " TAR_PERM_ATTR_ARGS " -xf - --transform=\"s/%s/%s/\" 2> /dev/null", STATE_DIR, file->hash, STAGING_SUBVOL, rel_dir, file->hash, base); ret = system(tarcommand); --- +-- 2.5.0 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/0002-downloads-minimize-syscalls-to-improve-performance.patch b/recipes-core/swupd-client/swupd-client-2.87/0002-downloads-minimize-syscalls-to-improve-performance.patch index f75496a..0953fcd 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0002-downloads-minimize-syscalls-to-improve-performance.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0002-downloads-minimize-syscalls-to-improve-performance.patch @@ -24,7 +24,7 @@ As an additional improvement, failures during close() are checked when downloading single files. However, perform_curl_io_and_complete() still ignores the error. -Upstream-Status: Submitted [https://github.com/clearlinux/swupd-client/issues/37] +Upstream-Status: Submitted [https://github.com/clearlinux/swupd-client/issues/41] Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> --- @@ -40,18 +40,18 @@ index 554e795..fbaa5ae 100644 @@ -82,6 +82,7 @@ struct file { int last_change; struct update_stat stat; - + + unsigned int fd_valid : 1; unsigned int is_dir : 1; unsigned int is_file : 1; unsigned int is_link : 1; @@ -101,6 +102,7 @@ struct file { - + char *staging; /* output name used during download & staging */ CURL *curl; /* curl handle if downloading */ + int fd; /* file written into during downloading, unset when fd_valid is false */ }; - + extern bool download_only; @@ -183,6 +185,7 @@ extern void swupd_curl_cleanup(void); extern void swupd_curl_set_current_version(int v); @@ -71,7 +71,7 @@ index c989426..c4e1398 100644 FILE *f; - size_t written; + size_t written, remaining; - + outfile = file->staging; + if (file->fd_valid) { + fd = file->fd; @@ -95,7 +95,7 @@ index c989426..c4e1398 100644 + return -1; + } + } - + - fd = open(outfile, O_CREAT | O_RDWR , 00600); - if (fd < 0) { - LOG_ERROR(file, "Cannot open file for write", class_file_io, @@ -106,7 +106,7 @@ index c989426..c4e1398 100644 return -1; - } + } - + - f = fdopen(fd, "a"); - if (!f) { - LOG_ERROR(file, "Cannot fdopen file for write", class_file_io, @@ -121,7 +121,7 @@ index c989426..c4e1398 100644 - fclose(f); + return size*nmemb; +} - + - if (written != 1) { - LOG_ERROR(file, "short write", class_file_io, - "\\*outfile=\"%s\",strerror=\"%s\"*\\", outfile, strerror(errno)); @@ -142,7 +142,7 @@ index c989426..c4e1398 100644 - return size*nmemb; + return curl_ret; } - + /* Download a single file SYNCHRONOUSLY @@ -193,7 +210,6 @@ int swupd_curl_get_file(const char *url, char *filename, struct file *file, } @@ -154,7 +154,7 @@ index c989426..c4e1398 100644 curl_ret = curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, (curl_off_t) stat.st_size); @@ -263,6 +279,9 @@ int swupd_curl_get_file(const char *url, char *filename, struct file *file, } - + exit: + if (local) { + curl_ret = swupd_download_file_complete(curl_ret, local); @@ -169,7 +169,7 @@ index 211ee24..2f88fb1 100644 @@ -165,6 +165,7 @@ static void free_curl_list_data(void *data) struct file *file = (struct file*)data; CURL *curl = file->curl; - + + swupd_download_file_complete(CURLE_OK, file); curl_multi_remove_handle(mcurl, curl); curl_easy_cleanup(curl); @@ -177,7 +177,7 @@ index 211ee24..2f88fb1 100644 @@ -379,6 +380,12 @@ static int perform_curl_io_and_complete(int *left) continue; } - + + curl_ret = swupd_download_file_complete(curl_ret, file); + /* + * Any error as logged already. Let's continue and @@ -187,6 +187,5 @@ index 211ee24..2f88fb1 100644 if (ret == 200) { untar_full_download(file); } else { --- +-- 2.1.4 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/0005-swupd-client-Add-existence-check-to-staging-target.patch b/recipes-core/swupd-client/swupd-client-2.87/0005-swupd-client-Add-existence-check-to-staging-target.patch index 512105e..9779044 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0005-swupd-client-Add-existence-check-to-staging-target.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0005-swupd-client-Add-existence-check-to-staging-target.patch @@ -10,7 +10,7 @@ Patch adds an stat() check to ensure that: Follow-on patch will add correct corrective behavior once verify_fix_path() is implemented -Upstream-Status: Accepted +Upstream-Status: Backport [v3.0.0+] Signed-off-by: Brad T. Peters <brad.t.peters@intel.com> --- @@ -31,12 +31,12 @@ index 3a847e2..b8545c1 100644 int ret; - struct stat stat; + struct stat s; - + tmp = strdup(file->filename); tmp2 = strdup(file->filename); @@ -294,6 +296,29 @@ int do_staging(struct file *file) string_or_die(&original, "%s/staged/%s", STATE_DIR, file->hash); - + #if SWUPD_LINUX_ROOTFS + string_or_die(&targetpath, "%s%s", path_prefix, rel_dir); + ret = stat(targetpath, &s); @@ -67,7 +67,7 @@ index 3a847e2..b8545c1 100644 @@ -306,12 +331,12 @@ int do_staging(struct file *file) string_or_die(&statfile, "%s/%s/%s", STAGING_SUBVOL, rel_dir, base); #endif - + - memset(&stat, 0, sizeof(struct stat)); - ret = lstat(statfile, &stat); + memset(&s, 0, sizeof(struct stat)); @@ -84,13 +84,12 @@ index 3a847e2..b8545c1 100644 ret = swupd_rm(statfile); @@ -325,7 +350,7 @@ int do_staging(struct file *file) free(statfile); - + #if SWUPD_LINUX_ROOTFS - if (file->is_dir || S_ISDIR(stat.st_mode)) { + if (file->is_dir || S_ISDIR(s.st_mode)) { /* In the btrfs only scenario there is an implicit * "create_or_update_dir()" via un-tar-ing a directory.tar after * download and the untar happens in the staging subvolume which --- +-- 2.5.0 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/0006-Backport-Use-rename-instead-of-tar-transform.patch b/recipes-core/swupd-client/swupd-client-2.87/0006-Backport-Use-rename-instead-of-tar-transform.patch index ab3a39f..be4d908 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0006-Backport-Use-rename-instead-of-tar-transform.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0006-Backport-Use-rename-instead-of-tar-transform.patch @@ -20,7 +20,7 @@ always encapsulating variable use within the do_staging function. Note: the SWUPD_LINUX_ROOTFS checks have been removed entirely, since they are not used anywhere in the code at present. -Upstream-Status: Backported [v2.88] +Upstream-Status: Backported [v2.88+] Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> --- @@ -34,7 +34,7 @@ index b8545c1..16dafbb 100644 @@ -36,6 +36,31 @@ #include "swupd-build-variant.h" #include <swupd.h> - + +/* clean then recreate temporary folder for tar renames */ +static int create_staging_renamedir(char *rename_tmpdir) +{ @@ -65,7 +65,7 @@ index b8545c1..16dafbb 100644 { @@ -269,6 +294,9 @@ int prepare(bool UNUSED_PARAM *is_corrupted, int UNUSED_PARAM current_version, i #endif - + /* Do the staging of new files into the filesystem */ +#warning do_staging is currently not able to be run in parallel +/* Consider adding a remove_leftovers() that runs in verify/fix in order to @@ -81,7 +81,7 @@ index b8545c1..16dafbb 100644 + char *rename_tmpdir = NULL; int ret; struct stat s; - + @@ -360,12 +390,28 @@ int do_staging(struct file *file) * attributes and it includes internal logic that does the * right thing to overlay a directory onto something @@ -151,7 +151,6 @@ index b8545c1..16dafbb 100644 + free(rename_tmpdir); free(tmp); free(tmp2); - --- -2.5.0 +-- +2.5.0 diff --git a/recipes-core/swupd-client/swupd-client-2.87/0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch b/recipes-core/swupd-client/swupd-client-2.87/0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch index 6d03ee3..5154a0e 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch @@ -12,7 +12,7 @@ in its format. This patch adds one compile-time options --enable-bsdtar that is used to enable/disable GNU tar specific options. -Upstream-Status: Accepted +Upstream-Status: Backport [3.1.0+] Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> --- @@ -32,7 +32,7 @@ index b11ef0a..930f64c 100644 @@ -29,6 +29,15 @@ AS_IF([test "x$enable_bzip2" = "xyes" ], [AC_DEFINE(SWUPD_WITHOUT_BZIP2,1,[Do not use bzip2 compression])] ) - + +AC_ARG_ENABLE( + [bsdtar], + AS_HELP_STRING([--enable-bsdtar], [Use alternative bsdtar command (uses tar by default)]) @@ -52,7 +52,7 @@ index f2103a2..0c15dca 100644 @@ -13,10 +13,18 @@ #define VERIFY_FAILED_MAX_VERSIONS_COUNT 20 #endif - + +#ifdef SWUPD_WITH_BSDTAR +#define TAR_COMMAND "bsdtar" +#define TAR_XATTR_ARGS "" @@ -68,7 +68,7 @@ index f2103a2..0c15dca 100644 -#define TAR_PERM_ATTR_ARGS "--preserve-permissions --xattrs --xattrs-include='*'" +#define TAR_PERM_ATTR_ARGS "--preserve-permissions " TAR_XATTR_ARGS #endif - + #ifdef SWUPD_WITH_REPAIR diff --git a/src/download.c b/src/download.c index cb6d1a2..211ee24 100644 @@ -76,36 +76,36 @@ index cb6d1a2..211ee24 100644 +++ b/src/download.c @@ -194,7 +194,7 @@ static int check_tarfile_content(struct file *file, const char *tarfilename) int count = 0; - + /* we're using -a because the server side has a choice between different compression methods */ - string_or_die(&tarcommand, "tar -tf %s/download/%s.tar 2> /dev/null", STATE_DIR, file->hash); + string_or_die(&tarcommand, TAR_COMMAND " -tf %s/download/%s.tar 2> /dev/null", STATE_DIR, file->hash); - + err = access(tarfilename, R_OK); if (err) { @@ -300,7 +300,7 @@ static void untar_full_download(void *data) } - + /* modern tar will automatically determine the compression type used */ - string_or_die(&tarcommand, "tar -C %s/staged/ " TAR_PERM_ATTR_ARGS " -xf %s 2> /dev/null", + string_or_die(&tarcommand, TAR_COMMAND " -C %s/staged/ " TAR_PERM_ATTR_ARGS " -xf %s 2> /dev/null", STATE_DIR, tarfile); - + LOG_DEBUG(file, "Doing tar operation", class_file_compression, "%s", tarcommand); diff --git a/src/esp.c b/src/esp.c index e2b2ae9..3483f55 100644 --- a/src/esp.c +++ b/src/esp.c @@ -231,8 +231,8 @@ int copy_files_to_esp(int target_version) - + progress_step(PROGRESS_MSG_UPDATE_ESP); - + - string_or_die(&tarcommand, "tar -C %s/%d/system/vendor/intel/ -cf - esp 2> /dev/null | " - "tar -C %s/ -xf - --no-same-permissions --no-same-owner --transform=\"s/esp//\" 2> /dev/null", + string_or_die(&tarcommand, TAR_COMMAND " -C %s/%d/system/vendor/intel/ -cf - esp 2> /dev/null | " + TAR_COMMAND " -C %s/ -xf - --no-same-permissions --no-same-owner --transform=\"s/esp//\" 2> /dev/null", MOUNT_POINT, target_version, ESP_MOUNT); - + ret = system(tarcommand); diff --git a/src/manifest.c b/src/manifest.c index 5757e9f..7c356d7 100644 @@ -113,7 +113,7 @@ index 5757e9f..7c356d7 100644 +++ b/src/manifest.c @@ -34,6 +34,7 @@ #include <fcntl.h> - + #include "config.h" +#include "swupd-build-variant.h" #include <swupd.h> @@ -122,11 +122,11 @@ index 5757e9f..7c356d7 100644 @@ -519,7 +520,7 @@ static int retrieve_manifests(int current, int version, char *component, struct goto out; } - + - string_or_die(&tar, "tar -C %s/%i -xf %s/%i/Manifest.%s.tar 2> /dev/null", + string_or_die(&tar, TAR_COMMAND " -C %s/%i -xf %s/%i/Manifest.%s.tar 2> /dev/null", STATE_DIR, version, STATE_DIR, version, component); - + LOG_DEBUG(NULL, "tar", class_file_compression, "running %s", tar); diff --git a/src/packs.c b/src/packs.c index b176b74..91a83c5 100644 @@ -134,12 +134,12 @@ index b176b74..91a83c5 100644 +++ b/src/packs.c @@ -83,7 +83,7 @@ static int download_pack(int oldversion, int newversion, char *module) free(url); - + progress_step(PROGRESS_MSG_EXTRACTING_PACK); - string_or_die(&tar, "tar -C %s " TAR_PERM_ATTR_ARGS " -xf %s/pack-%s-from-%i-to-%i.tar 2> /dev/null", + string_or_die(&tar, TAR_COMMAND " -C %s " TAR_PERM_ATTR_ARGS " -xf %s/pack-%s-from-%i-to-%i.tar 2> /dev/null", STATE_DIR, STATE_DIR, module, oldversion, newversion); - + LOG_INFO(NULL, "Untar of delta pack", class_file_compression, "%s", tar); diff --git a/src/staging.c b/src/staging.c index 16dafbb..742e8a2 100644 @@ -178,6 +178,5 @@ index 16dafbb..742e8a2 100644 STATE_DIR, file->hash, STAGING_SUBVOL, rel_dir, file->hash, base); ret = system(tarcommand); free(tarcommand); --- +-- 2.5.0 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch b/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch index a557173..e7dada8 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/Fix-build-failure-on-Yocto.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix build failure on Yocto On install phase certificate files are being installed twice as included in _DATA twice. We can use EXTRA_DIST than dist_. -Upstream-Status: Backported (v3.0.0+) +Upstream-Status: Backport [v3.0.0+] Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> --- @@ -22,15 +22,14 @@ index 1e65d3d..4d15c55 100644 certs/d6325660.1 swupdcerts_DATA = $(SWUPD_CERTS) -dist_swupdcerts_DATA = $(SWUPD_CERTS) - + EXTRA_DIST += \ data/check-update.service \ - data/check-update.timer + data/check-update.timer \ + $(SWUPD_CERTS) - + DISTCHECK_CONFIGURE_FLAGS = \ --with-systemdsystemunitdir=$$dc_install_base/$(systemdunitdir) --- +-- 2.1.4 - diff --git a/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch b/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch index e5b53ef..4e12369 100644 --- a/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch +++ b/recipes-core/swupd-client/swupd-client-2.87/Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch @@ -3,7 +3,7 @@ From: Amarnath Valluri <amarnath.valluri@intel.com> Date: Wed, 13 Jan 2016 15:46:19 +0200 Subject: [PATCH] Right usage of AC_ARG_ENABLE on bzip2 -Upstream-Status: Pending[Not submitted] +Upstream-Status: Pending Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> --- @@ -31,8 +31,7 @@ index f94a17d..b11ef0a 100644 + AC_CHECK_LIB([bz2], [BZ2_bzBuffToBuffCompress], [], [AC_MSG_ERROR([the libbz2 library is missing])])], + [AC_DEFINE(SWUPD_WITHOUT_BZIP2,1,[Do not use bzip2 compression])] ) - + AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], --- +-- 2.1.4 - diff --git a/recipes-core/swupd-client/swupd-client/0001-staging.c-Protect-tar-command-against-special-charac.patch b/recipes-core/swupd-client/swupd-client/0001-staging.c-Protect-tar-command-against-special-charac.patch deleted file mode 100644 index 99c4de0..0000000 --- a/recipes-core/swupd-client/swupd-client/0001-staging.c-Protect-tar-command-against-special-charac.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d54cf4dcbd668289deb0a2ef303b6c8c5a95561d Mon Sep 17 00:00:00 2001 -From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> -Date: Mon, 18 Apr 2016 11:43:03 +0300 -Subject: [PATCH] staging.c: Protect tar command against special characters - -It may happen that a bundle contains a directory named '#' and -other files under this directory, thus not only target files -need to be escaped in tar commands, but also target directories -where the files get installed. - -Also a target file may have a name with '@' as its first symbol. -Since the symbol has a special meaning in case of bsdtar the -name needs to escaped in tar commands with the prefix './'. - -Upstream-Status: Submitted [https://github.com/clearlinux/swupd-client/pull/43] - -Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> ---- - src/staging.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/staging.c b/src/staging.c -index deae1c2..09945b6 100644 ---- a/src/staging.c -+++ b/src/staging.c -@@ -148,8 +148,8 @@ int do_staging(struct file *file, struct manifest *MoM) - ret = -errno; - goto out; - } -- string_or_die(&tarcommand, TAR_COMMAND " -C %s " TAR_PERM_ATTR_ARGS " -cf - '%s' 2> /dev/null | " -- TAR_COMMAND " -C %s%s " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", -+ string_or_die(&tarcommand, TAR_COMMAND " -C '%s' " TAR_PERM_ATTR_ARGS " -cf - './%s' 2> /dev/null | " -+ TAR_COMMAND " -C '%s%s' " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", - rename_tmpdir, base, path_prefix, rel_dir); - ret = system(tarcommand); - if (WIFEXITED(ret)) { -@@ -186,8 +186,8 @@ int do_staging(struct file *file, struct manifest *MoM) - ret = -errno; - goto out; - } -- string_or_die(&tarcommand, TAR_COMMAND " -C %s/staged " TAR_PERM_ATTR_ARGS " -cf - '.update.%s' 2> /dev/null | " -- TAR_COMMAND " -C %s%s " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", -+ string_or_die(&tarcommand, TAR_COMMAND " -C '%s/staged' " TAR_PERM_ATTR_ARGS " -cf - '.update.%s' 2> /dev/null | " -+ TAR_COMMAND " -C '%s%s' " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", - STATE_DIR, base, path_prefix, rel_dir); - ret = system(tarcommand); - if (WIFEXITED(ret)) { diff --git a/recipes-core/swupd-client/swupd-client_git.bb b/recipes-core/swupd-client/swupd-client_git.bb index f4c833f..aa41b7b 100644 --- a/recipes-core/swupd-client/swupd-client_git.bb +++ b/recipes-core/swupd-client/swupd-client_git.bb @@ -5,14 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f8d90fb802930e30e49c39c8126a959e" DEPENDS = "glib-2.0 curl openssl libarchive bsdiff" -PV = "3.3.0+git${SRCPV}" +PV = "3.5.3+git${SRCPV}" 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" +SRCREV = "42c02c5f4a91f3ef2cdb9f80fa7ca79dfbab1ac0" S = "${WORKDIR}/git" @@ -20,19 +19,31 @@ RDEPENDS_${PN}_append_class-target = " oe-swupd-helpers bsdtar" # We check /etc/os-release for the current OS version number RRECOMMENDS_${PN}_class-target = "os-release" -inherit pkgconfig autotools systemd +# TODO: we inherit autotools-brokensep because the Makefile calls a perl script +# in ${S} during one of its steps. +inherit pkgconfig autotools-brokensep systemd EXTRA_OECONF = "\ --with-systemdsystemunitdir=${systemd_system_unitdir} \ --enable-bsdtar \ + --disable-tests \ " PACKAGECONFIG ??= "stateless" PACKAGECONFIG[stateless] = ",--disable-stateless" +SWUPD_VERSION_URL ??= "example.com" +SWUPD_CONTENT_URL ??= "example.com" +SWUPD_FORMAT ??= "3" do_install_append () { # TODO: This should be a less os-specific directory and not hard-code datadir - install -d ${D}${datadir}/clear/bundles + install -d ${D}$/usr/share/clear/bundles + + # Write default values to the configuration hierarchy (since 3.4.0) + install -d ${D}/usr/share/defaults/swupd + echo "{SWUPD_VERSION_URL}" >> ${D}/usr/share/defaults/swupd/versionurl + echo "{SWUPD_CONTENT_URL}" >> ${D}/usr/share/defaults/swupd/contenturl + echo "{SWUPD_FORMAT}" >> ${D}/usr/share/defaults/swupd/format } FILES_${PN} += "\ |