diff --git a/meta-ostro/recipes-image/images/ostro-image.bb b/meta-ostro/recipes-image/images/ostro-image.bb index 40eef0cac06..118d6aa1462 100644 --- a/meta-ostro/recipes-image/images/ostro-image.bb +++ b/meta-ostro/recipes-image/images/ostro-image.bb @@ -192,8 +192,6 @@ FEATURE_PACKAGES_soletta-tools = "soletta-dev-app" # because it is the most common source code management tool. FEATURE_PACKAGES_tools-develop = "packagegroup-core-buildessential git" -FEATURE_PACKAGES_swupd = "packagegroup-swupd" - FEATURE_PACKAGES_qatests = "packagegroup-qa-tests" # Use gummiboot as the EFI bootloader. diff --git a/meta-ostro/recipes-swupd/clr-systemd-config/clr-systemd-config_98.bb b/meta-ostro/recipes-swupd/clr-systemd-config/clr-systemd-config_98.bb deleted file mode 100644 index 6bb8dfc9a86..00000000000 --- a/meta-ostro/recipes-swupd/clr-systemd-config/clr-systemd-config_98.bb +++ /dev/null @@ -1,63 +0,0 @@ -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c" - -SUMMARY = "Clear systemd config files for swupd" - -SRC_URI = " \ - file://clr-systemd-config-${PV}.tar.gz \ - file://0001-change-clear-path-to-Ostro-path.patch \ - file://0002-systemd-service-for-updating-the-efi-combo.patch \ -" - -SRC_URI[md5sum] = "bc2fa9e8728c774d779edc094c9018d2" -SRC_URI[sha256sum] = "f6c1bc9f815ad002b82d2702fc79dd28ead2361533479207efef65173e1f5503" - -REQUIRED_DISTRO_FEATURES = "systemd" - -DEPENDS += "swupd-client systemd" - -inherit pkgconfig systemd autotools distro_features_check - -do_install_append () { - rm ${D}${libdir}/modules-load.d/bridge-netfilter.conf - rm ${D}${libdir}/sysusers.d/clear.conf - rm ${D}${systemd_unitdir}/clr-image-triggers - rm ${D}${systemd_unitdir}/system-preset/80-clear.preset - rm ${D}${systemd_unitdir}/network/80-virtual.network - rm ${D}${systemd_unitdir}/network/80-wlan.network - rm ${D}${systemd_unitdir}/network/80-dhcp.network - rm ${D}${systemd_unitdir}/journald.conf.d/clear.conf - rm ${D}${systemd_unitdir}/bootchart.conf.d/clear.conf - rm ${D}${systemd_unitdir}/system/firstboot-triggers.service - rm ${D}${systemd_unitdir}/system/multi-user.target.wants/firstboot-triggers.service - rm ${D}${systemd_unitdir}/system/opt-rootfs-proc.mount - rm ${D}${systemd_unitdir}/system/opt-rootfs.mount - rm ${D}${systemd_unitdir}/system/container-workload.service - rm ${D}${systemd_unitdir}/system/container.target - rm ${D}${datadir}/defaults/etc/passwd - rm ${D}${datadir}/defaults/etc/shadow - rm ${D}${datadir}/defaults/etc/group - rm ${D}${datadir}/defaults/etc/gshadow - rm ${D}/${base_prefix}/lib/udev/rules.d/80-kvm.rules - - rmdir ${D}${libdir}/sysusers.d - rmdir ${D}${libdir}/modules-load.d - rmdir ${D}${systemd_unitdir}/system-preset - rmdir ${D}${systemd_unitdir}/network - rmdir ${D}${systemd_unitdir}/journald.conf.d - rmdir ${D}${systemd_unitdir}/bootchart.conf.d - rmdir ${D}${datadir}/defaults/etc - rmdir ${D}${datadir}/defaults - rmdir ${D}${datadir} - rmdir ${D}${libdir} - rmdir ${D}/usr - rmdir ${D}/${base_prefix}/lib/udev/rules.d - rmdir ${D}/${base_prefix}/lib/udev - - - cp --preserve=mode,timestamp ${S}/system/efi-combo-trigger.service ${D}${systemd_unitdir}/system/ -} - -FILES_${PN} += " \ - ${systemd_unitdir}/system/ \ -" diff --git a/meta-ostro/recipes-swupd/clr-systemd-config/files/0001-change-clear-path-to-Ostro-path.patch b/meta-ostro/recipes-swupd/clr-systemd-config/files/0001-change-clear-path-to-Ostro-path.patch deleted file mode 100644 index d90585918ca..00000000000 --- a/meta-ostro/recipes-swupd/clr-systemd-config/files/0001-change-clear-path-to-Ostro-path.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 612e8816e75c95f2262823348a0453e72ad99c6d Mon Sep 17 00:00:00 2001 -From: Jaska Uimonen -Date: Tue, 19 Jan 2016 13:27:19 +0200 -Subject: [PATCH] change clear path to Ostro path - -Upstream-Status: Inappropriate - ---- - system/catalog-trigger.service | 2 +- - system/ldconfig-trigger.service | 2 +- - system/systemd-modules-trigger.service | 2 +- - system/tmpfiles-trigger.service | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/system/catalog-trigger.service b/system/catalog-trigger.service -index c171683..8266174 100644 ---- a/system/catalog-trigger.service -+++ b/system/catalog-trigger.service -@@ -5,4 +5,4 @@ BindsTo=update-triggers.target - - [Service] - Type=oneshot --ExecStart=/usr/bin/journalctl --update-catalog -+ExecStart=/bin/journalctl --update-catalog -diff --git a/system/ldconfig-trigger.service b/system/ldconfig-trigger.service -index 4740f3a..224ac7a 100644 ---- a/system/ldconfig-trigger.service -+++ b/system/ldconfig-trigger.service -@@ -5,4 +5,4 @@ BindsTo=update-triggers.target - - [Service] - Type=oneshot --ExecStart=/usr/bin/ldconfig -X -+ExecStart=/sbin/ldconfig -X -diff --git a/system/systemd-modules-trigger.service b/system/systemd-modules-trigger.service -index a8fd7dc..4825c1a 100644 ---- a/system/systemd-modules-trigger.service -+++ b/system/systemd-modules-trigger.service -@@ -15,5 +15,5 @@ ConditionKernelCommandLine=|rd.modules-load - [Service] - Type=oneshot - RemainAfterExit=yes --ExecStart=/usr/lib/systemd/systemd-modules-load -+ExecStart=/lib/systemd/systemd-modules-load - TimeoutSec=90s -diff --git a/system/tmpfiles-trigger.service b/system/tmpfiles-trigger.service -index b95ac02..71009fe 100644 ---- a/system/tmpfiles-trigger.service -+++ b/system/tmpfiles-trigger.service -@@ -5,4 +5,4 @@ BindsTo=update-triggers.target - - [Service] - Type=oneshot --ExecStart=/usr/bin/systemd-tmpfiles --create -+ExecStart=/bin/systemd-tmpfiles --create --- -2.5.0 - diff --git a/meta-ostro/recipes-swupd/clr-systemd-config/files/0002-systemd-service-for-updating-the-efi-combo.patch b/meta-ostro/recipes-swupd/clr-systemd-config/files/0002-systemd-service-for-updating-the-efi-combo.patch deleted file mode 100644 index 48b7936b1c1..00000000000 --- a/meta-ostro/recipes-swupd/clr-systemd-config/files/0002-systemd-service-for-updating-the-efi-combo.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b6828d8b0214e781c420357c4955e0c14ab0993b Mon Sep 17 00:00:00 2001 -From: Igor Stoppa -Date: Thu, 28 Jan 2016 22:46:03 +0200 -Subject: [PATCH] systemd service for updating the efi combo - -The service propagates to the EFI partition the changes to -the efi-combo file present in the rootfs. - -Signed-off-by: Igor Stoppa ---- - system/efi-combo-trigger.service | 7 +++++++ - system/update-triggers.target | 1 + - 2 files changed, 8 insertions(+) - create mode 100644 system/efi-combo-trigger.service - -diff --git a/system/efi-combo-trigger.service b/system/efi-combo-trigger.service -new file mode 100644 -index 0000000..a45f342 ---- /dev/null -+++ b/system/efi-combo-trigger.service -@@ -0,0 +1,7 @@ -+[Unit] -+Description=Updates the EFI combo application -+BindsTo=update-triggers.target -+ -+[Service] -+Type=oneshot -+ExecStart=/usr/bin/efi_combo_updater -diff --git a/system/update-triggers.target b/system/update-triggers.target -index 1f3d579..2d518ee 100644 ---- a/system/update-triggers.target -+++ b/system/update-triggers.target -@@ -7,3 +7,4 @@ Wants=catalog-trigger.service - Wants=tmpfiles-trigger.service - Wants=locale-archive-trigger.service - Wants=systemd-modules-trigger.service -+Wants=efi-combo-trigger.service --- -2.1.4 - diff --git a/meta-ostro/recipes-swupd/clr-systemd-config/files/clr-systemd-config-98.tar.gz b/meta-ostro/recipes-swupd/clr-systemd-config/files/clr-systemd-config-98.tar.gz deleted file mode 100644 index 5dfacf6c9e0..00000000000 Binary files a/meta-ostro/recipes-swupd/clr-systemd-config/files/clr-systemd-config-98.tar.gz and /dev/null differ diff --git a/meta-ostro/recipes-swupd/packagegroups/packagegroup-swupd.bb b/meta-ostro/recipes-swupd/packagegroups/packagegroup-swupd.bb deleted file mode 100644 index 0fa21977fb7..00000000000 --- a/meta-ostro/recipes-swupd/packagegroups/packagegroup-swupd.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Ostro OS Software updates package groups" -LICENSE = "MIT" -PR = "r1" - -inherit packagegroup - -SUMMARY_${PN} = "Ostro OS Software updates stack" - -RDEPENDS_${PN} = "\ - swupd-client \ - clr-systemd-config \ - " diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0001-change-systemctl-path-to-Ostro-systemctl-path.patch b/meta-ostro/recipes-swupd/swupd-client/files/0001-change-systemctl-path-to-Ostro-systemctl-path.patch deleted file mode 100644 index 7aa2d541ced..00000000000 --- a/meta-ostro/recipes-swupd/swupd-client/files/0001-change-systemctl-path-to-Ostro-systemctl-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fbded4029a9324819edaa19edf2ff1d385fbe1da Mon Sep 17 00:00:00 2001 -From: Jaska Uimonen -Date: Thu, 14 Jan 2016 10:17:43 +0200 -Subject: [PATCH] change systemctl path to Ostro systemctl path - -Upstream-Status: Inappropriate - ---- - src/scripts.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/scripts.c b/src/scripts.c -index e426272..9bec0f5 100644 ---- a/src/scripts.c -+++ b/src/scripts.c -@@ -84,10 +84,10 @@ static void update_triggers(void) - int ret; - LOG_INFO(NULL, "calling systemd trigger", class_scripts, ""); - -- ret = system("/usr/bin/systemctl daemon-reload"); -+ ret = system("/bin/systemctl daemon-reload"); - if (ret != 0) - LOG_ERROR(NULL, "systemd daemon reload failed", class_scripts, "%d", ret); -- ret = system("/usr/bin/systemctl restart update-triggers.target"); -+ ret = system("/bin/systemctl restart update-triggers.target"); - if (ret != 0) - LOG_ERROR(NULL, "systemd update triggers failed", class_scripts, "%d", ret); - } --- -2.5.0 - diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0002-Fix-build-failure-on-Yocto.patch b/meta-ostro/recipes-swupd/swupd-client/files/0002-Fix-build-failure-on-Yocto.patch deleted file mode 100644 index ee1eda8391e..00000000000 --- a/meta-ostro/recipes-swupd/swupd-client/files/0002-Fix-build-failure-on-Yocto.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 27310e687f248a04456d1e68d8a0adc2711bb380 Mon Sep 17 00:00:00 2001 -From: Amarnath Valluri -Date: Thu, 7 Jan 2016 16:19:34 +0200 -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: Submitted [https://github.com/clearlinux/swupd-client/pull/9] - -Signed-off-by: Amarnath Valluri ---- - Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 1e65d3d..4d15c55 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -111,11 +111,11 @@ SWUPD_CERTS = certs/157753a5.0 \ - certs/d6325660.0 \ - 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.5.0 - diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0003-Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch b/meta-ostro/recipes-swupd/swupd-client/files/0003-Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch deleted file mode 100644 index 591edec010e..00000000000 --- a/meta-ostro/recipes-swupd/swupd-client/files/0003-Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 4472212c12db7be14ce9df292776379391f76c8c Mon Sep 17 00:00:00 2001 -From: Amarnath Valluri -Date: Wed, 13 Jan 2016 15:46:19 +0200 -Subject: [PATCH] Right usage of AC_ARG_ENABLE on bzip2 - -Upstream-Status: Pending[Not submitted] - -Signed-off-by: Amarnath Valluri ---- - configure.ac | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f94a17d..b11ef0a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,11 +20,13 @@ AC_CONFIG_HEADERS([config.h]) - PKG_CHECK_MODULES([lzma], [liblzma]) - PKG_CHECK_MODULES([zlib], [zlib]) - AC_ARG_ENABLE( -- bzip2, -- AS_HELP_STRING([--disable-bzip2],[Do not use bzip2 compression (uses bzip2 by default)]), -- AC_DEFINE(SWUPD_WITHOUT_BZIP2,1,[Do not use bzip2 compression]) , -- AC_DEFINE(SWUPD_WITH_BZIP2,1,[Use bzip2 compression]) -- AC_CHECK_LIB([bz2], [BZ2_bzBuffToBuffCompress], [], [AC_MSG_ERROR([the libbz2 library is missing])]) -+ [bzip2], -+ AS_HELP_STRING([--disable-bzip2],[Do not use bzip2 compression (uses bzip2 by default)]) -+) -+AS_IF([test "x$enable_bzip2" = "xyes" ], -+ [AC_DEFINE(SWUPD_WITH_BZIP2,1,[Use bzip2 compression]) -+ 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.5.0 - diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0004-Tolerate-quotes-in-os-release-files.patch b/meta-ostro/recipes-swupd/swupd-client/files/0004-Tolerate-quotes-in-os-release-files.patch deleted file mode 100644 index f78763fa60b..00000000000 --- a/meta-ostro/recipes-swupd/swupd-client/files/0004-Tolerate-quotes-in-os-release-files.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0ac7226645db1c7048863755a296e1e5f7d8319c Mon Sep 17 00:00:00 2001 -From: Dmitry Rozhkov -Date: Thu, 11 Feb 2016 12:49:30 +0200 -Subject: [PATCH] Tolerate quotes in os-release files - -Some systems like Yocto or OpenSUSE prefer to wrap values in -/etc/os-release file with quotes always and that still conforms -to the format defined in systemd. - -This patch removes quotes from the values before trying to -transform them into integer version id. - -Upstream-Status: Accepted - -Signed-off-by: Dmitry Rozhkov ---- - src/version.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/src/version.c b/src/version.c -index d8ad76b..1708a98 100644 ---- a/src/version.c -+++ b/src/version.c -@@ -95,6 +95,7 @@ int read_version_from_subvol_file(char *path_prefix) - FILE *file; - 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]; -+ -+ /* Drop quotes and newline in value */ -+ dest = src; -+ while (*src) { -+ if (*src == '\'' || *src == '"' || *src == '\n') { -+ ++src; -+ } else { -+ *dest = *src; -+ ++dest; -+ ++src; -+ } -+ } -+ *dest = 0; -+ - v = strtoull(&line[11], NULL, 10); - break; - } --- -2.5.0 - diff --git a/meta-ostro/recipes-swupd/swupd-client/files/swupd-client-5700.tar.gz b/meta-ostro/recipes-swupd/swupd-client/files/swupd-client-5700.tar.gz deleted file mode 100644 index dad73119a7e..00000000000 Binary files a/meta-ostro/recipes-swupd/swupd-client/files/swupd-client-5700.tar.gz and /dev/null differ diff --git a/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers.bbappend b/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers.bbappend new file mode 100644 index 00000000000..674cb5b75e3 --- /dev/null +++ b/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = "file://efi-combo-trigger.service" diff --git a/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers/efi-combo-trigger.service b/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers/efi-combo-trigger.service new file mode 100644 index 00000000000..fe3d81aeac4 --- /dev/null +++ b/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers/efi-combo-trigger.service @@ -0,0 +1,7 @@ +[Unit] +Description=Updates the EFI combo application +BindsTo=update-triggers.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/efi_combo_updater \ No newline at end of file diff --git a/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers/update-triggers.target b/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers/update-triggers.target new file mode 100644 index 00000000000..fde91d910ea --- /dev/null +++ b/meta-ostro/recipes-swupd/swupd-client/oe-swupd-helpers/update-triggers.target @@ -0,0 +1,6 @@ +[Unit] +Description=Post system update triggers +Wants=ldconfig-trigger.service +Wants=catalog-trigger.service +Wants=tmpfiles-trigger.service +Wants=efi-combo-trigger.service diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0005-Disable-boot-file-heuristics.patch b/meta-ostro/recipes-swupd/swupd-client/swupd-client/0001-Disable-boot-file-heuristics.patch similarity index 100% rename from meta-ostro/recipes-swupd/swupd-client/files/0005-Disable-boot-file-heuristics.patch rename to meta-ostro/recipes-swupd/swupd-client/swupd-client/0001-Disable-boot-file-heuristics.patch diff --git a/meta-ostro/recipes-swupd/swupd-client/files/efi_combo_updater.c b/meta-ostro/recipes-swupd/swupd-client/swupd-client/efi_combo_updater.c similarity index 100% rename from meta-ostro/recipes-swupd/swupd-client/files/efi_combo_updater.c rename to meta-ostro/recipes-swupd/swupd-client/swupd-client/efi_combo_updater.c diff --git a/meta-ostro/recipes-swupd/swupd-client/swupd-client_%.bbappend b/meta-ostro/recipes-swupd/swupd-client/swupd-client_%.bbappend new file mode 100644 index 00000000000..eb6fff642f8 --- /dev/null +++ b/meta-ostro/recipes-swupd/swupd-client/swupd-client_%.bbappend @@ -0,0 +1,16 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = "file://0001-Disable-boot-file-heuristics.patch \ + file://efi_combo_updater.c \ + " + +RDEPENDS_${PN}_class-target_append = " gptfdisk" + +do_compile_append() { + ${CC} ${LDFLAGS} ${WORKDIR}/efi_combo_updater.c -Os -o ${B}/efi_combo_updater `pkg-config --cflags --libs glib-2.0` +} + +do_install_append () { + install -d ${D}/usr/bin + install ${B}/efi_combo_updater ${D}/usr/bin/ +} diff --git a/meta-ostro/recipes-swupd/swupd-client/swupd-client_5700.bb b/meta-ostro/recipes-swupd/swupd-client/swupd-client_5700.bb deleted file mode 100644 index 8293410bda2..00000000000 --- a/meta-ostro/recipes-swupd/swupd-client/swupd-client_5700.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "Software update client tool" -DESCRIPTION = "The swupd-client package provides a reference implementation of a software update client which performs file level updates of an OS, preferentially using binary deltas whenever possible for efficiency under an assumption that the OS develops with a release process aimed at rapidly deploying small incremental changes." -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=04d0b48662817042d80393e7511fa41b \ - file://bsdiff/LICENSE;md5=0dbe7a50f028269750631fcbded3846a" - -SRC_URI = " \ - file://swupd-client-${PV}.tar.gz \ - file://0001-change-systemctl-path-to-Ostro-systemctl-path.patch \ - file://0002-Fix-build-failure-on-Yocto.patch \ - file://0003-Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch \ - file://0004-Tolerate-quotes-in-os-release-files.patch \ - file://0005-Disable-boot-file-heuristics.patch \ - file://0006-swupd-client-Add-existence-check-to-staging-target.patch \ - file://0007-Backport-Use-rename-instead-of-tar-transform.patch \ - file://0008-Add-compatibility-with-libarchive-s-bsdtar-command.patch \ - file://efi_combo_updater.c \ - " -SRC_URI[md5sum] = "58671adf559dd18620f11caf4ccf83dd" -SRC_URI[sha256sum] = "09a70a423d10a6bf71f8675b7430c29a56f41f93493331c9ae515011713c229b" - -inherit pkgconfig - -DEPENDS = "zlib curl openssl xz glib-2.0" -RDEPENDS_${PN} = "xz bsdtar gptfdisk glib-2.0 bash" - -PACKAGECONFIG ??= "bzip2" -PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" - -inherit pkgconfig autotools - -EXTRA_OECONF = "--with-systemdsystemunitdir=${base_libdir}/systemd/system --enable-bsdtar" - -FILES_${PN} += " \ - ${datadir}/clear/update-ca/ \ - ${base_libdir}/systemd/system/ \ -" - -do_compile() { - autotools_do_configure - ${CC} ${LDFLAGS} ${WORKDIR}/efi_combo_updater.c -Os -o ${B}/efi_combo_updater `pkg-config --cflags --libs glib-2.0` -} - -do_install_append() { - mkdir -p ${D}/usr/bin/ - cp ${B}/efi_combo_updater ${D}/usr/bin/ -} diff --git a/meta-ostro/recipes-swupd/swupd-client/os-release.bbappend b/meta-swupd/recipes-core/swupd-client/os-release.bbappend similarity index 79% rename from meta-ostro/recipes-swupd/swupd-client/os-release.bbappend rename to meta-swupd/recipes-core/swupd-client/os-release.bbappend index 54ebd53354a..5f797c533f7 100644 --- a/meta-ostro/recipes-swupd/swupd-client/os-release.bbappend +++ b/meta-swupd/recipes-core/swupd-client/os-release.bbappend @@ -4,6 +4,8 @@ VERSION_ID = "${OS_VERSION}" FILES_${PN}_append = " /usr/lib/os-release " +# As swupd-client doesn't update files in /etc move os-release's +# content to /usr/lib do_install_append() { install -d ${D}/usr/lib mv ${D}/etc/os-release ${D}/usr/lib diff --git a/meta-swupd/recipes-core/swupd-client/swupd-client/0001-Tolerate-quotes-in-os-release-files.patch b/meta-swupd/recipes-core/swupd-client/swupd-client/0001-Tolerate-quotes-in-os-release-files.patch index 49c71ae9e0e..c5faae87ad5 100644 --- a/meta-swupd/recipes-core/swupd-client/swupd-client/0001-Tolerate-quotes-in-os-release-files.patch +++ b/meta-swupd/recipes-core/swupd-client/swupd-client/0001-Tolerate-quotes-in-os-release-files.patch @@ -1,7 +1,7 @@ -From 586e7b927461f6604ee3a3159cd7a6d4ac22ef30 Mon Sep 17 00:00:00 2001 +From 0ac7226645db1c7048863755a296e1e5f7d8319c Mon Sep 17 00:00:00 2001 From: Dmitry Rozhkov -Date: Thu, 11 Feb 2016 13:29:57 +0200 -Subject: [PATCH 1/2] Tolerate quotes in os-release files +Date: Thu, 11 Feb 2016 12:49:30 +0200 +Subject: [PATCH] Tolerate quotes in os-release files Some systems like Yocto or OpenSUSE prefer to wrap values in /etc/os-release file with quotes always and that still conforms @@ -10,19 +10,18 @@ to the format defined in systemd. This patch removes quotes from the values before trying to transform them into integer version id. -Signed-off-by: Dmitry Rozhkov - Upstream-Status: Backport (v3.0.0+) +Signed-off-by: Dmitry Rozhkov --- src/version.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/version.c b/src/version.c -index 0e09cd9..83d6ad4 100644 +index d8ad76b..1708a98 100644 --- a/src/version.c +++ b/src/version.c -@@ -88,6 +88,7 @@ int read_version_from_subvol_file(char *path_prefix) +@@ -95,6 +95,7 @@ int read_version_from_subvol_file(char *path_prefix) FILE *file; int v = -1; char *buildstamp; @@ -30,9 +29,9 @@ index 0e09cd9..83d6ad4 100644 string_or_die(&buildstamp, "%s/usr/lib/os-release", path_prefix); file = fopen(buildstamp, "rm"); -@@ -106,7 +107,22 @@ int read_version_from_subvol_file(char *path_prefix) +@@ -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) { diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0006-swupd-client-Add-existence-check-to-staging-target.patch b/meta-swupd/recipes-core/swupd-client/swupd-client/0005-swupd-client-Add-existence-check-to-staging-target.patch similarity index 100% rename from meta-ostro/recipes-swupd/swupd-client/files/0006-swupd-client-Add-existence-check-to-staging-target.patch rename to meta-swupd/recipes-core/swupd-client/swupd-client/0005-swupd-client-Add-existence-check-to-staging-target.patch diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0007-Backport-Use-rename-instead-of-tar-transform.patch b/meta-swupd/recipes-core/swupd-client/swupd-client/0006-Backport-Use-rename-instead-of-tar-transform.patch similarity index 99% rename from meta-ostro/recipes-swupd/swupd-client/files/0007-Backport-Use-rename-instead-of-tar-transform.patch rename to meta-swupd/recipes-core/swupd-client/swupd-client/0006-Backport-Use-rename-instead-of-tar-transform.patch index 50061ac4d3d..ab3a39f974b 100644 --- a/meta-ostro/recipes-swupd/swupd-client/files/0007-Backport-Use-rename-instead-of-tar-transform.patch +++ b/meta-swupd/recipes-core/swupd-client/swupd-client/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 +Upstream-Status: Backported [v2.88] Signed-off-by: Dmitry Rozhkov --- diff --git a/meta-ostro/recipes-swupd/swupd-client/files/0008-Add-compatibility-with-libarchive-s-bsdtar-command.patch b/meta-swupd/recipes-core/swupd-client/swupd-client/0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch similarity index 98% rename from meta-ostro/recipes-swupd/swupd-client/files/0008-Add-compatibility-with-libarchive-s-bsdtar-command.patch rename to meta-swupd/recipes-core/swupd-client/swupd-client/0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch index 6c16a771ec4..6d03ee3794e 100644 --- a/meta-ostro/recipes-swupd/swupd-client/files/0008-Add-compatibility-with-libarchive-s-bsdtar-command.patch +++ b/meta-swupd/recipes-core/swupd-client/swupd-client/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: Submitted [https://github.com/clearlinux/swupd-client/pull/13] +Upstream-Status: Accepted Signed-off-by: Dmitry Rozhkov --- diff --git a/meta-swupd/recipes-core/swupd-client/swupd-client/Fix-build-failure-on-Yocto.patch b/meta-swupd/recipes-core/swupd-client/swupd-client/Fix-build-failure-on-Yocto.patch index 73f1728c8fb..a5571733d8d 100644 --- a/meta-swupd/recipes-core/swupd-client/swupd-client/Fix-build-failure-on-Yocto.patch +++ b/meta-swupd/recipes-core/swupd-client/swupd-client/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: Inappropriate +Upstream-Status: Backported (v3.0.0+) Signed-off-by: Amarnath Valluri --- diff --git a/meta-swupd/recipes-core/swupd-client/swupd-client_2.87.bb b/meta-swupd/recipes-core/swupd-client/swupd-client_2.87.bb index 822662406f6..3356ae6ecba 100644 --- a/meta-swupd/recipes-core/swupd-client/swupd-client_2.87.bb +++ b/meta-swupd/recipes-core/swupd-client/swupd-client_2.87.bb @@ -9,20 +9,23 @@ SRC_URI = "\ file://Right-usage-of-AC_ARG_ENABLE-on-bzip2.patch \ file://Change-systemctl-path-to-OE-systemctl-path.patch \ file://0001-Tolerate-quotes-in-os-release-files.patch \ + file://0005-swupd-client-Add-existence-check-to-staging-target.patch \ + file://0006-Backport-Use-rename-instead-of-tar-transform.patch \ + file://0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch \ " SRC_URI[md5sum] = "5d272c62edb8a9c576005ac5e1182ea3" SRC_URI[sha256sum] = "45df259a7dc2fed985ee9961e112120fc46670dd75476c3262fc6804b1c66fb8" DEPENDS = "glib-2.0 curl zlib bzip2 xz openssl" -RDEPENDS_${PN} = "gzip bzip2 tar xz" -RDEPENDS_${PN}_class-target = "oe-swupd-helpers" +RDEPENDS_${PN} = "gzip bzip2 xz" +RDEPENDS_${PN}_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-brokensep systemd -EXTRA_OECONF = "--with-systemdsystemunitdir=${systemd_system_unitdir}" +EXTRA_OECONF = "--with-systemdsystemunitdir=${systemd_system_unitdir} --enable-bsdtar" #TODO: create and install /var/lib/swupd/{delta,staged/download} do_install_append () { diff --git a/meta-swupd/recipes-core/swupd-server/swupd-server/0007-Clean-up-tar-options-drop-a-for-the-extract-mode.patch b/meta-swupd/recipes-core/swupd-server/swupd-server/0007-Clean-up-tar-options-drop-a-for-the-extract-mode.patch new file mode 100644 index 00000000000..2f933d03122 --- /dev/null +++ b/meta-swupd/recipes-core/swupd-server/swupd-server/0007-Clean-up-tar-options-drop-a-for-the-extract-mode.patch @@ -0,0 +1,31 @@ +From 4431ad34734632c439881a30ca90617a1fd1dde4 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Tue, 23 Feb 2016 14:50:37 +0200 +Subject: [PATCH] Clean up tar options: drop -a for the extract mode. + +The -a option is not needed for the extract mode since tar +auto-detects compression type from file format. + +Upstream-Status: Accepted + +Signed-off-by: Dmitry Rozhkov +--- + src/pack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pack.c b/src/pack.c +index 5bb99b8..e5203d0 100644 +--- a/src/pack.c ++++ b/src/pack.c +@@ -114,7 +114,7 @@ static void explode_pack_stage(int version, char *module) + * time on the client... + */ + string_or_die(&tar, "tar --directory=%s/%s/%i/staged --warning=no-timestamp " +- TAR_PERM_ATTR_ARGS " -axf %s", packstage_dir, module, version, path); ++ TAR_PERM_ATTR_ARGS " -xf %s", packstage_dir, module, version, path); + ret = system(tar); + if (!ret) { + unlink(path); +-- +2.5.0 + diff --git a/meta-swupd/recipes-core/swupd-server/swupd-server/0008-Clean-up-tar-commands-always-put-files-after-options.patch b/meta-swupd/recipes-core/swupd-server/swupd-server/0008-Clean-up-tar-commands-always-put-files-after-options.patch new file mode 100644 index 00000000000..3dabcc8e19b --- /dev/null +++ b/meta-swupd/recipes-core/swupd-server/swupd-server/0008-Clean-up-tar-commands-always-put-files-after-options.patch @@ -0,0 +1,44 @@ +From 9ecb744f0ca6faca02cc7be7539802c040cd2922 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Tue, 23 Feb 2016 15:01:25 +0200 +Subject: [PATCH] Clean up tar commands: always put files after options + +Unify tar commands to have files enumerated always at the end of +the commands. This would follow the scheme used in tar's man page +and simplify adoption of other tar implementation should the need +arise. + +Upstream-Status: Accepted + +Signed-off-by: Dmitry Rozhkov +--- + src/fullfiles.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/fullfiles.c b/src/fullfiles.c +index fa78293..23e95db 100644 +--- a/src/fullfiles.c ++++ b/src/fullfiles.c +@@ -93,7 +93,7 @@ static void create_fullfile(struct file *file) + assert(0); + } + +- string_or_die(&tarcommand, "tar -C %s " TAR_PERM_ATTR_ARGS " -cf - '%s' --exclude='%s'/* 2> /dev/null | " ++ string_or_die(&tarcommand, "tar -C %s " TAR_PERM_ATTR_ARGS " -cf - --exclude='%s'/* '%s' 2> /dev/null | " + "tar -C %s " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", + dir, base, base, rename_tmpdir); + if (system(tarcommand) != 0) { +@@ -111,8 +111,8 @@ static void create_fullfile(struct file *file) + free(rename_source); + + /* for a directory file, tar up simply with gzip */ +- string_or_die(&tarcommand, "tar -C %s %s " TAR_PERM_ATTR_ARGS " -zcf %s/%i/files/%s.tar", +- rename_tmpdir, file->hash, outdir, file->last_change, file->hash); ++ string_or_die(&tarcommand, "tar -C %s " TAR_PERM_ATTR_ARGS " -zcf %s/%i/files/%s.tar %s", ++ rename_tmpdir, outdir, file->last_change, file->hash, file->hash); + if (system(tarcommand) != 0) { + LOG(NULL, "Failed to run command:", "%s", tarcommand); + assert(0); +-- +2.5.0 + diff --git a/meta-swupd/recipes-core/swupd-server/swupd-server/0009-Add-compatibility-with-libarchive-s-bsdtar-command.patch b/meta-swupd/recipes-core/swupd-server/swupd-server/0009-Add-compatibility-with-libarchive-s-bsdtar-command.patch new file mode 100644 index 00000000000..7821938a07f --- /dev/null +++ b/meta-swupd/recipes-core/swupd-server/swupd-server/0009-Add-compatibility-with-libarchive-s-bsdtar-command.patch @@ -0,0 +1,168 @@ +From e72a040628d7b8b5fd193653c13304f47cba611b Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Tue, 23 Feb 2016 15:11:58 +0200 +Subject: [PATCH] Add compatibility with libarchive's bsdtar command + +Since GNU tar fails to extract files with xattrs preserved when +Integrity Measurement Architecture (IMA) is enabled some vendors +may choose to install libarchive-based tar (bsdtar) on their embedded +devices, so the swupd server needs to be able to create archives +in its format. + +This patch adds one compile-time options --enable-bsdtar that is used +to enable/disable GNU tar specific options. Also it harmonizes +the command strings to be compatible with both GNU tar and bsdtar. +Particularly it +- changes --exclude pattern from '%s'/* to more explicit '%s/?*' because + bsdtar's pattern matching is greedier than in tar: it uses tcsh's + globbing where '*' can be anything including the null string and the + original pattern would include the directory itself; +- OS file names are escaped with leading ./ to avoid collisions with + file names starting with @ which has special meaning in bsdtar. + +Upstream-Status: Accepted + +Signed-off-by: Dmitry Rozhkov +--- + configure.ac | 8 ++++++++ + include/swupd.h | 14 ++++++++++++-- + src/fullfiles.c | 12 ++++++------ + src/manifest.c | 2 +- + src/pack.c | 4 ++-- + 5 files changed, 29 insertions(+), 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 47256b6..32d1412 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,14 @@ PKG_CHECK_MODULES([openssl], [libcrypto >= 0.9.8]) + AC_CHECK_LIB([magic], [magic_open], [], [AC_MSG_ERROR([the magic library is missing])]) + AC_CHECK_PROGS(TAR, tar) + AC_ARG_ENABLE( ++ bsdtar, ++ AS_HELP_STRING([--enable-bsdtar],[Use alternative bsdtar command (uses tar by default)]), ++ AS_IF([test "x$enable_bsdtar" = "xyes"], ++ AC_DEFINE([SWUPD_WITH_BSDTAR], 1, [Use alternative bsdtar]), ++ AC_DEFINE([SWUPD_WITH_BSDTAR], 0, [Use default tar command])), ++ AC_DEFINE([SWUPD_WITH_BSDTAR], 0, [Use default tar command]) ++) ++AC_ARG_ENABLE( + bzip2, + AS_HELP_STRING([--disable-bzip2],[Do not use bzip2 compression (uses bzip2 by default)]), + AC_DEFINE(SWUPD_WITHOUT_BZIP2,1,[Do not use bzip2 compression]) , +diff --git a/include/swupd.h b/include/swupd.h +index d45ca9c..b049135 100644 +--- a/include/swupd.h ++++ b/include/swupd.h +@@ -17,10 +17,20 @@ + + #define SWUPD_SERVER_STATE_DIR "/var/lib/update" + ++#if SWUPD_WITH_BSDTAR ++#define TAR_COMMAND "bsdtar" ++#define TAR_XATTR_ARGS "" ++#define TAR_WARN_ARGS "" ++#else ++#define TAR_COMMAND "tar" ++#define TAR_XATTR_ARGS "--xattrs --xattrs-include='*'" ++#define TAR_WARN_ARGS "--warning=no-timestamp" ++#endif ++ + #if SWUPD_WITH_SELINUX +-#define TAR_PERM_ATTR_ARGS "--preserve-permissions --xattrs --xattrs-include='*' --selinux" ++#define TAR_PERM_ATTR_ARGS "--preserve-permissions --selinux " TAR_XATTR_ARGS + #else +-#define TAR_PERM_ATTR_ARGS "--preserve-permissions --xattrs --xattrs-include='*'" ++#define TAR_PERM_ATTR_ARGS "--preserve-permissions " TAR_XATTR_ARGS + #endif + + #if SWUPD_WITH_STATELESS +diff --git a/src/fullfiles.c b/src/fullfiles.c +index 23e95db..cf77e74 100644 +--- a/src/fullfiles.c ++++ b/src/fullfiles.c +@@ -93,8 +93,8 @@ static void create_fullfile(struct file *file) + assert(0); + } + +- string_or_die(&tarcommand, "tar -C %s " TAR_PERM_ATTR_ARGS " -cf - --exclude='%s'/* '%s' 2> /dev/null | " +- "tar -C %s " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", ++ string_or_die(&tarcommand, TAR_COMMAND " -C %s " TAR_PERM_ATTR_ARGS " -cf - --exclude='%s/?*' './%s' 2> /dev/null | " ++ TAR_COMMAND " -C %s " TAR_PERM_ATTR_ARGS " -xf - 2> /dev/null", + dir, base, base, rename_tmpdir); + if (system(tarcommand) != 0) { + LOG(NULL, "Failed to run command:", "%s", tarcommand); +@@ -111,7 +111,7 @@ static void create_fullfile(struct file *file) + free(rename_source); + + /* for a directory file, tar up simply with gzip */ +- string_or_die(&tarcommand, "tar -C %s " TAR_PERM_ATTR_ARGS " -zcf %s/%i/files/%s.tar %s", ++ string_or_die(&tarcommand, TAR_COMMAND " -C %s " TAR_PERM_ATTR_ARGS " -zcf %s/%i/files/%s.tar %s", + rename_tmpdir, outdir, file->last_change, file->hash, file->hash); + if (system(tarcommand) != 0) { + LOG(NULL, "Failed to run command:", "%s", tarcommand); +@@ -146,7 +146,7 @@ static void create_fullfile(struct file *file) + + /* step 2a: tar it with each compression type */ + // lzma +- string_or_die(&tarcommand, "tar --directory=%s " TAR_PERM_ATTR_ARGS " -Jcf %s/%i/files/%s.tar.xz %s", ++ string_or_die(&tarcommand, TAR_COMMAND " --directory=%s " TAR_PERM_ATTR_ARGS " -Jcf %s/%i/files/%s.tar.xz %s", + empty, outdir, file->last_change, file->hash, file->hash); + if (system(tarcommand) != 0) { + LOG(NULL, "Failed to run command:", "%s", tarcommand); +@@ -154,7 +154,7 @@ static void create_fullfile(struct file *file) + } + free(tarcommand); + // gzip +- string_or_die(&tarcommand, "tar --directory=%s " TAR_PERM_ATTR_ARGS " -zcf %s/%i/files/%s.tar.gz %s", ++ string_or_die(&tarcommand, TAR_COMMAND " --directory=%s " TAR_PERM_ATTR_ARGS " -zcf %s/%i/files/%s.tar.gz %s", + empty, outdir, file->last_change, file->hash, file->hash); + if (system(tarcommand) != 0) { + LOG(NULL, "Failed to run command:", "%s", tarcommand); +@@ -162,7 +162,7 @@ static void create_fullfile(struct file *file) + } + free(tarcommand); + #ifdef SWUPD_WITH_BZIP2 +- string_or_die(&tarcommand, "tar --directory=%s " TAR_PERM_ATTR_ARGS " -jcf %s/%i/files/%s.tar.bz2 %s", ++ string_or_die(&tarcommand, TAR_COMMAND " --directory=%s " TAR_PERM_ATTR_ARGS " -jcf %s/%i/files/%s.tar.bz2 %s", + empty, outdir, file->last_change, file->hash, file->hash); + if (system(tarcommand) != 0) { + LOG(NULL, "Failed to run command:", "%s", tarcommand); +diff --git a/src/manifest.c b/src/manifest.c +index e878288..cf0cabf 100644 +--- a/src/manifest.c ++++ b/src/manifest.c +@@ -750,7 +750,7 @@ static int write_manifest_tar(struct manifest *manifest) + + /* now, tar the thing up for efficient full file download */ + /* and put the signature of the plain manifest into the archive, too */ +- string_or_die(&tarcmd, "tar --directory=%s/%i " TAR_PERM_ATTR_ARGS " -Jcf " ++ string_or_die(&tarcmd, TAR_COMMAND " --directory=%s/%i " TAR_PERM_ATTR_ARGS " -Jcf " + "%s/%i/Manifest.%s.tar Manifest.%s Manifest.%s.signed", + conf, manifest->version, conf, manifest->version, manifest->component, + manifest->component, manifest->component); +diff --git a/src/pack.c b/src/pack.c +index e5203d0..1a11a03 100644 +--- a/src/pack.c ++++ b/src/pack.c +@@ -113,7 +113,7 @@ static void explode_pack_stage(int version, char *module) + * the resulting pack is slightly smaller, and in addition, we're saving CPU + * time on the client... + */ +- string_or_die(&tar, "tar --directory=%s/%s/%i/staged --warning=no-timestamp " ++ string_or_die(&tar, TAR_COMMAND " --directory=%s/%s/%i/staged " TAR_WARN_ARGS " " + TAR_PERM_ATTR_ARGS " -xf %s", packstage_dir, module, version, path); + ret = system(tar); + if (!ret) { +@@ -442,7 +442,7 @@ static int make_final_pack(struct packdata *pack) + + /* tar the staging directory up */ + LOG(NULL, "starting tar for pack", "%s: %i to %i", pack->module, pack->from, pack->to); +- string_or_die(&tar, "tar " TAR_PERM_ATTR_ARGS " --directory=%s/%s/%i/ " ++ string_or_die(&tar, TAR_COMMAND " " TAR_PERM_ATTR_ARGS " --directory=%s/%s/%i/ " + "--numeric-owner -Jcf %s/%i/pack-%s-from-%i.tar delta staged", + packstage_dir, pack->module, pack->from, staging_dir, pack->to, pack->module, pack->from); + ret = system(tar); +-- +2.5.0 + diff --git a/meta-swupd/recipes-core/swupd-server/swupd-server_2.53.bb b/meta-swupd/recipes-core/swupd-server/swupd-server_2.53.bb index a57f2cf787d..321fadce63b 100644 --- a/meta-swupd/recipes-core/swupd-server/swupd-server_2.53.bb +++ b/meta-swupd/recipes-core/swupd-server/swupd-server_2.53.bb @@ -13,6 +13,9 @@ SRC_URI = "\ file://0004-Fix-regression-that-introduced-a-directory-named.patch \ file://0005-xattrs.c-Avoid-freeing-dangling-pointers.patch \ file://0006-Always-use-xattrs-when.patch \ + file://0007-Clean-up-tar-options-drop-a-for-the-extract-mode.patch \ + file://0008-Clean-up-tar-commands-always-put-files-after-options.patch \ + file://0009-Add-compatibility-with-libarchive-s-bsdtar-command.patch \ " SRC_URI[md5sum] = "14f25677b5a4f0b33785910b03860939" @@ -20,7 +23,7 @@ SRC_URI[sha256sum] = "c2d0e595444fe198c4092dd83d20a929fd1402a13b66b410b76677ed3a inherit autotools -EXTRA_OECONF = "--enable-bzip2 --enable-lzma --disable-stateless" +EXTRA_OECONF = "--enable-bzip2 --enable-lzma --disable-stateless --enable-bsdtar" # safer-calls-to-system-utilities.patch uses for loop initial declaration CFLAGS_append = " -std=c99" @@ -30,6 +33,8 @@ do_install_append () { install -m 0755 ${S}/test/signature/* ${D}${sysconfdir}/swupd-certs/ } -RDEPENDS_${PN} = "tar rsync" +# Work around lack of "RPROVIDES = bsdtar-native" in libarchive-native. +RDEPENDS_${PN}_class-target = "bsdtar rsync" +RDEPENDS_${PN}_class-native = "libarchive rsync" BBCLASSEXTEND = "native" diff --git a/meta-swupd/recipes-extended/libarchive/libarchive_%.bbappend b/meta-swupd/recipes-extended/libarchive/libarchive_%.bbappend new file mode 100644 index 00000000000..0b51a6d4cbb --- /dev/null +++ b/meta-swupd/recipes-extended/libarchive/libarchive_%.bbappend @@ -0,0 +1,10 @@ +# swupd-server and swupd-client requires the xz compression type +# to be supported in bsdtar. +PACKAGECONFIG_append = " xz" + +# Since the format of the archives generated by swupd-server and +# the ones consumed by swupd-client must be identical +# configure the native tool the same way as it's done for target. +PACKAGECONFIG_append_class-native = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \ +"