From: Jan Kiszka <jan.kiszka@siemens.com>
To: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>,
cip-dev@lists.cip-project.org,
Adithya.Balakumar@toshiba-tsip.com
Subject: Re: [cip-dev][isar-cip-core][PATCH] swupdate-handler-roundrobin: Add link for handler search path
Date: Wed, 20 Mar 2024 14:41:01 +0100 [thread overview]
Message-ID: <1ca9f272-7bdf-4188-9ae3-d89dfc4ca796@siemens.com> (raw)
In-Reply-To: <20240320130056.2335582-1-Quirin.Gylstorff@siemens.com>
On 20.03.24 13:59, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>
> The lua version which is used to search for additional handler is
> hard coded in SWUpdate and debian salsa[1].
>
> To support multiple distribution with different lua versions add
> the variables SWUPDATE_LUA_VERSION and SWUPDATE_ADDITIONAL_LUA_VERSIONS.
>
> SWUPDATE_LUA_VERSION defines the main version and for all space
> seperated entries in SWUPDATE_ADDITIONAL_LUA_VERSIONS a symbolic link
> is generated.
>
> [1]: https://salsa.debian.org/debian/swupdate/-/blob/6ccd44a8539ebb880bf0dac408d5db5de7e2de99/debian/rules#L13
>
> This fixes issue #102 SWUpdate failed to install update on bookworm
> amd64 image.
>
> Reported-by: Adithya Balakumar <Adithya.Balakumar@toshiba-tsip.com>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> .../swupdate-handler-roundrobin_0.1.bb | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb b/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb
> index b39278e..95ceedd 100644
> --- a/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb
> +++ b/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb
> @@ -20,12 +20,22 @@ SWUPDATE_LUASCRIPT = "swupdate-handler-roundrobin/swupdate_handlers_roundrobin.l
> SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG ?= "swupdate.handler.${SWUPDATE_BOOTLOADER}.ini"
> SRC_URI += "${@('file://' + d.getVar('SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG')) if d.getVar('SWUPDATE_BOOTLOADER') else ''}"
>
> -# lua version 5.2 is currently hard coded in swupdate @ debian salsa
> +# The lua version used by swupdate to search for additional handler is hard coded in debian/rules
> +# see https://salsa.debian.org/debian/swupdate/-/blob/6ccd44a8539ebb880bf0dac408d5db5de7e2de99/debian/rules#L13
> +SWUPDATE_LUA_VERSION ??= "5.4"
> +SWUPDATE_ADDITIONAL_LUA_VERSIONS ??= "5.3"
> +
> +do_prepare_build:append() {
> + for lua_version in ${SWUPDATE_ADDITIONAL_LUA_VERSIONS}; do
> + echo "usr/share/lua/${SWUPDATE_LUA_VERSION} usr/share/lua/$lua_version" >> ${WORKDIR}/${PN}-${PV}/debian/${PN}.links
> + done
> +}
> +
> do_install[cleandirs] = "${D}/etc \
> - ${D}/usr/share/lua/5.3"
> + ${D}/usr/share/lua/${SWUPDATE_LUA_VERSION}"
> do_install() {
> if [ -e ${WORKDIR}/${SWUPDATE_LUASCRIPT} ]; then
> - install -m 0644 ${WORKDIR}/${SWUPDATE_LUASCRIPT} ${D}/usr/share/lua/5.3/swupdate_handlers.lua
> + install -m 0644 ${WORKDIR}/${SWUPDATE_LUASCRIPT} ${D}/usr/share/lua/${SWUPDATE_LUA_VERSION}/swupdate_handlers.lua
> fi
> if [ -e ${WORKDIR}/${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG} ]; then
> install -m 0644 ${WORKDIR}/${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG} ${D}/etc/swupdate.handler.ini
Thanks, squeezed into current next.
Jan
--
Siemens AG, Technology
Linux Expert Center
prev parent reply other threads:[~2024-03-20 13:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 12:59 [cip-dev][isar-cip-core][PATCH] swupdate-handler-roundrobin: Add link for handler search path Quirin Gylstorff
2024-03-20 13:09 ` Jan Kiszka
2024-03-20 13:14 ` Gylstorff Quirin
2024-03-20 13:31 ` Gylstorff Quirin
2024-03-20 13:41 ` Jan Kiszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ca9f272-7bdf-4188-9ae3-d89dfc4ca796@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=Adithya.Balakumar@toshiba-tsip.com \
--cc=Quirin.Gylstorff@siemens.com \
--cc=cip-dev@lists.cip-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).