Message ID | 20240320130056.2335582-1-Quirin.Gylstorff@siemens.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [isar-cip-core] swupdate-handler-roundrobin: Add link for handler search path | expand |
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. > Should this move in front of your recent changes in 'next'? Or is this issue older? Jan > 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
On 3/20/24 2:09 PM, Jan Kiszka wrote: > 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. >> > > Should this move in front of your recent changes in 'next'? Or is this > issue older? The patch can be moved in front of adding SWUpdate 2023.12.1. The problem was previously undetected as all supported swupdate version used the search path /usr/share/lua/5.3. But the delete comment indicates this path was updated once. > > Jan > >> 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 >
On 3/20/24 2:14 PM, Quirin Gylstorff via lists.cip-project.org wrote: > > > On 3/20/24 2:09 PM, Jan Kiszka wrote: >> 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. >>> >> >> Should this move in front of your recent changes in 'next'? Or is this >> issue older? > The patch can be moved in front of adding SWUpdate 2023.12.1. The > problem was previously undetected as all supported swupdate version > used the search path /usr/share/lua/5.3. But the delete comment > indicates this path was updated once. It was update with e17bf5cf83714e4783885f54a7939a51a8fba5a2. Quirin >> >> Jan >> >>> 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 >> > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#15390): https://lists.cip-project.org/g/cip-dev/message/15390 > Mute This Topic: https://lists.cip-project.org/mt/105043814/1753640 > Group Owner: cip-dev+owner@lists.cip-project.org > Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129121/1753640/1405269326/xyzzy [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
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