From d6ac906b804359651cad89f4ae2a46ecd6a1a15f Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 29 Jul 2020 10:46:10 +0200 Subject: qemucommand: Restore custom booloader parameter. The functionality was (presumably unintentionally) removed, but the option was still present. Signed-off-by: Patrick Vacek --- scripts/qemucommand.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 30929ac..9658fcd 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py @@ -75,7 +75,10 @@ class QemuCommand(object): if args.efi: self.bios = 'OVMF.fd' elif self.enable_u_boot: - uboot_path = abspath(join(args.dir, self.machine, 'u-boot-qemux86-64.rom')) + if args.bootloader: + uboot_path = args.bootloader + else: + uboot_path = abspath(join(args.dir, self.machine, 'u-boot-qemux86-64.rom')) if self.overlay: new_uboot_path = self.overlay + '.u-boot.rom' if not exists(self.overlay): -- cgit v1.2.3-54-g00ecf From ecc4ebbe4aa208f227e473f06f504ced3edb7328 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Fri, 10 Jul 2020 16:31:30 +0200 Subject: nfs-utils: fix nfs systemd daemons runtime issues nfs-mountd.service and nfs-statd.service rely on /var/lib/nfs to be present in rootfs, or else they would run into problems for some files missing in it. But a ostree/ota rootfs does not have that directory (removed during do_image), to fix that, we now copy them to /var/local/lib/nfs and mount it to /var/lib/nfs at runtime, which is done in nfs-home-mount.service. nfs-mountd.service and nfs-statd.service need run after nfs-home-mount.service. Signed-off-by: Ming Liu --- .../nfs-utils/nfs-utils/nfs-home-mount.service | 13 +++++++++++ .../nfs-utils/nfs-utils_%.bbappend | 25 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service create mode 100644 recipes-connectivity/nfs-utils/nfs-utils_%.bbappend diff --git a/recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service b/recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service new file mode 100644 index 0000000..514151a --- /dev/null +++ b/recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service @@ -0,0 +1,13 @@ +[Unit] +Description=NFS home mount @LOCALSTATEDIR@/local/lib/nfs -> @LOCALSTATEDIR@/lib/nfs. +DefaultDependencies=no +Conflicts=umount.target +After=local-fs.target + +[Service] +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/nfs +ExecStart=@BASE_BINDIR@/mount -o bind @LOCALSTATEDIR@/local/lib/nfs @LOCALSTATEDIR@/lib/nfs +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend b/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend new file mode 100644 index 0000000..2304ab4 --- /dev/null +++ b/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend @@ -0,0 +1,25 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "file://nfs-home-mount.service" + +SYSTEMD_SERVICE_${PN} += "nfs-home-mount.service" + +CONFFILES_${PN}-client += "${localstatedir}/local/lib" + +do_install_append_sota () { + install -d ${D}${localstatedir}/local + cp -aPR ${D}${localstatedir}/lib ${D}${localstatedir}/local + + install -m 0644 ${WORKDIR}/nfs-home-mount.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + ${D}${systemd_unitdir}/system/nfs-home-mount.service + + sed -i -e '0,/Requires=/{s,Requires=\(.*\),Requires=\1 nfs-home-mount.service,}' \ + -e '0,/After=/{s,After=\(.*\),After=\1 nfs-home-mount.service,}' \ + ${D}${systemd_unitdir}/system/nfs-statd.service + + sed -i -e '0,/Requires=/{s,Requires=\(.*\),Requires=\1 nfs-home-mount.service,}' \ + -e '0,/After=/{s,After=\(.*\),After=\1 nfs-home-mount.service,}' \ + ${D}${systemd_unitdir}/system/nfs-mountd.service +} -- cgit v1.2.3-54-g00ecf From 31b994a3baa4033ffe029ae518aadc90ee920be4 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sun, 26 Jul 2020 11:41:25 +0200 Subject: nfs-utils: don't add nfs-home-mount.service without sota enabled * nfs-home-mount.service is installed by do_install_append_sota, so only when sota is enabled but it was always added to SYSTEMD_SERVICE_ even when sota wasn't enabled resulting in do_patch failure: nfs-utils-2.5.1-r0 do_package: SYSTEMD_SERVICE_nfs-utils value nfs-home-mount.service does not exist * use sota override everywhere Signed-off-by: Martin Jansa --- recipes-connectivity/nfs-utils/nfs-utils_%.bbappend | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend b/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend index 2304ab4..7cce775 100644 --- a/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend +++ b/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend @@ -1,10 +1,10 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +FILESEXTRAPATHS_prepend_sota := "${THISDIR}/${BPN}:" -SRC_URI += "file://nfs-home-mount.service" +SRC_URI_append_sota = " file://nfs-home-mount.service" -SYSTEMD_SERVICE_${PN} += "nfs-home-mount.service" +SYSTEMD_SERVICE_${PN}_append_sota = " nfs-home-mount.service" -CONFFILES_${PN}-client += "${localstatedir}/local/lib" +CONFFILES_${PN}-client_append_sota = " ${localstatedir}/local/lib" do_install_append_sota () { install -d ${D}${localstatedir}/local -- cgit v1.2.3-54-g00ecf From db66072e90bb4d3186d67dd897d02156c6ae40a6 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 3 Aug 2020 08:58:53 +0200 Subject: Inherit python3native instead of using HOSTTOOLS. Signed-off-by: Patrick Vacek --- classes/image_repo_manifest.bbclass | 2 ++ conf/distro/sota.conf.inc | 2 +- recipes-test/big-update/big-update_1.0.bb | 2 ++ recipes-test/big-update/big-update_2.0.bb | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 72dc28f..47692df 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -9,6 +9,8 @@ # For more information, see: # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests +inherit python3native + # Write build information to target filesystem buildinfo_manifest () { if [ $(which repo) ]; then diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index 1d5f8df..7a0ac66 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc @@ -17,4 +17,4 @@ export SOURCE_DATE_EPOCH ?= "0" REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "0" HOSTTOOLS += "git sync sha256sum" -HOSTTOOLS_NONFATAL += "java repo python" +HOSTTOOLS_NONFATAL += "java repo" diff --git a/recipes-test/big-update/big-update_1.0.bb b/recipes-test/big-update/big-update_1.0.bb index 3b1d652..dfb3a96 100644 --- a/recipes-test/big-update/big-update_1.0.bb +++ b/recipes-test/big-update/big-update_1.0.bb @@ -7,6 +7,8 @@ FILES_${PN} = "/usr/lib/big-update" DEPENDS = "coreutils-native" +inherit python3native + do_install() { install -d ${D}/usr/lib/big-update python ${S}/../rand_file.py ${D}/usr/lib/big-update/a-big-file $(numfmt --from=iec 10M) diff --git a/recipes-test/big-update/big-update_2.0.bb b/recipes-test/big-update/big-update_2.0.bb index 7cb6e94..6fffbc1 100644 --- a/recipes-test/big-update/big-update_2.0.bb +++ b/recipes-test/big-update/big-update_2.0.bb @@ -7,6 +7,8 @@ FILES_${PN} = "/usr/lib/big-update" DEPENDS = "coreutils-native" +inherit python3native + do_install() { install -d ${D}/usr/lib/big-update python ${S}/../rand_file.py ${D}/usr/lib/big-update/a-big-file $(numfmt --from=iec 12M) -- cgit v1.2.3-54-g00ecf From 2575ec071aac687733edf537ca2189f8da89991f Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 5 Aug 2020 16:30:33 +0200 Subject: aktualizr: Bump to latest and install headers in dev package. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index d9b464f..c01a30f 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -32,7 +32,7 @@ SRC_URI = " \ SRC_URI[garagesign.md5sum] = "e2354fb75ae56c2d253be26617b2bd10" SRC_URI[garagesign.sha256sum] = "2ddb26b19090a42d7aeeda287ed40123ffa3ab55b5dcc4ea4c9320d0a0fd59a0" -SRCREV = "4169157a1874fca3fb55571c60507c1aefd4e1e5" +SRCREV = "753c2d73c36e3221f5e7800727d94b5c74c01499" BRANCH ?= "master" S = "${WORKDIR}/git" @@ -178,7 +178,9 @@ FILES_${PN}-sotatools-lib = " \ ${libdir}/libsota_tools.so \ " -FILES_${PN}-dev = "" +FILES_${PN}-dev = " \ + ${includedir}/lib${PN} \ + " BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf From f77b1764ba58449c7e12c6fcc48e350e1b94e815 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 9 Aug 2020 12:28:01 +0200 Subject: image_repo_manifest.bbclass: explicitly call python3 Now we have changed to inherit python3native to provide python3 binary for repo, then we need explicitly call python3 to execute repo, or else it will firstly try to locate python which will fail if python is not in HOSTTOOLS. This fixes a following warning: | Android repo tool failed to run; manifest not copied Signed-off-by: Ming Liu --- classes/image_repo_manifest.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 47692df..795f41f 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -13,8 +13,9 @@ inherit python3native # Write build information to target filesystem buildinfo_manifest () { - if [ $(which repo) ]; then - repo manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml || bbwarn "Android repo tool failed to run; manifest not copied" + repotool=$(which repo) + if [ -n "$repotool" ]; then + python3 $repotool manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml || bbwarn "Android repo tool failed to run; manifest not copied" else bbwarn "Android repo tool not found; manifest not copied." fi -- cgit v1.2.3-54-g00ecf From 69b8f5487caacf1cc85fe95d4545b58e3eebc8c6 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Tue, 18 Aug 2020 15:57:38 +0200 Subject: image_repo_manifest.bbclass: fix build when there is no repo on host * failing "which repo" causes the run.buildinfo_manifest task to fail before it even reaches the test for empty repotool variable: dash -x some-image/1.0-r2/temp/run.buildinfo_manifest.80233 + export systemd_system_unitdir=/usr/lib/systemd/system + export systemd_unitdir=/usr/lib/systemd + export systemd_user_unitdir=/usr/lib/systemd/user + buildinfo_manifest + which repo + repotool= + bb_sh_exit_handler + ret=1 + [ 1 != 0 ] + echo WARNING: exit code 1 from a shell command. WARNING: exit code 1 from a shell command. + exit 1 causing nasty long python exception from do_image task with this fix, it just shows an warning again: dash -x some-image/1.0-r2/temp/run.buildinfo_manifest.80233 + export systemd_user_unitdir=/usr/lib/systemd/user + buildinfo_manifest + which repo + true + repotool= + [ -n ] + bbwarn Android repo tool not found; manifest not copied. + [ -p some-image/1.0-r2/temp/fifo.80233 ] + echo WARNING: Android repo tool not found; manifest not copied. WARNING: Android repo tool not found; manifest not copied. + ret=0 + trap 0 + exit 0 Signed-off-by: Martin Jansa --- classes/image_repo_manifest.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 795f41f..12f56f0 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -13,7 +13,7 @@ inherit python3native # Write build information to target filesystem buildinfo_manifest () { - repotool=$(which repo) + repotool=`which repo || true` if [ -n "$repotool" ]; then python3 $repotool manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml || bbwarn "Android repo tool failed to run; manifest not copied" else -- cgit v1.2.3-54-g00ecf From 78a52b17118ec99581db175ec1173cb1ec78257f Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 26 Aug 2020 09:38:59 +0200 Subject: aktualizr: Upgrade to 2020.9 release. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index c01a30f..69beb4b 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -17,7 +17,7 @@ PRIVATE_LIBS_${PN}-ptest = "libaktualizr.so libaktualizr_secondary.so" PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.1-10-ga0a099a" +GARAGE_SIGN_PV = "0.7.1-22-g1d0d714" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ @@ -29,10 +29,10 @@ SRC_URI = " \ ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \ " -SRC_URI[garagesign.md5sum] = "e2354fb75ae56c2d253be26617b2bd10" -SRC_URI[garagesign.sha256sum] = "2ddb26b19090a42d7aeeda287ed40123ffa3ab55b5dcc4ea4c9320d0a0fd59a0" +SRC_URI[garagesign.md5sum] = "7be214beb64ce4ae443f7a4288b6d491" +SRC_URI[garagesign.sha256sum] = "b8524a03bb31551889790eca4ed44070f679d33a98b09e8220d7e0e965de68d8" -SRCREV = "753c2d73c36e3221f5e7800727d94b5c74c01499" +SRCREV = "d4811f900c765f3b4e5b9ea76531bad7d830a691" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf