diff mbox series

[scarthgap,master,meta-oe] rrdtool: Fix do_populate_sysroot QA issues

Message ID 20240604032018.419634-1-jiaying.song.cn@windriver.com
State New
Headers show
Series [scarthgap,master,meta-oe] rrdtool: Fix do_populate_sysroot QA issues | expand

Commit Message

jiaying.song.cn@windriver.com June 4, 2024, 3:20 a.m. UTC
From: Jiaying Song <jiaying.song.cn@windriver.com>

This commit addresses the shebang size issue encountered in the
do_populate_sysroot task of the rrdtool-native recipe. The issue
was caused by the shebang line in the cgi-demo.cgi file exceeding
the maximum allowed length of 128 characters.

The following error was observed:

ERROR: rrdtool-native-1.8.0-r0 do_populate_sysroot: QA Issue: : /work/x86_64-linux/rrdtool-native/1.8.0/sysroot-destdir/work/x86_64-linux/rrdtool-native/1.8.0/recipe-sysroot-native/usr/share/rrdtool/examples/cgi-demo.cgi maximum shebang size exceeded, the maximum size is 128. [shebang-size]
ERROR: rrdtool-native-1.8.0-r0 do_populate_sysroot: do_populate_sysroot for this recipe installed files with QA issues

The solution implemented involves modifying the shebang line in the
cgi-demo.cgi file to use '/usr/bin/env rrdcgi', ensuring it adheres
to the length limit.

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
---
 meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Khem Raj June 4, 2024, 6:25 p.m. UTC | #1
On Mon, Jun 3, 2024 at 8:19 PM Song, Jiaying (CN) via
lists.openembedded.org
<Jiaying.Song.CN=windriver.com@lists.openembedded.org> wrote:
>
> From: Jiaying Song <jiaying.song.cn@windriver.com>
>
> This commit addresses the shebang size issue encountered in the
> do_populate_sysroot task of the rrdtool-native recipe. The issue
> was caused by the shebang line in the cgi-demo.cgi file exceeding
> the maximum allowed length of 128 characters.
>
> The following error was observed:
>
> ERROR: rrdtool-native-1.8.0-r0 do_populate_sysroot: QA Issue: : /work/x86_64-linux/rrdtool-native/1.8.0/sysroot-destdir/work/x86_64-linux/rrdtool-native/1.8.0/recipe-sysroot-native/usr/share/rrdtool/examples/cgi-demo.cgi maximum shebang size exceeded, the maximum size is 128. [shebang-size]
> ERROR: rrdtool-native-1.8.0-r0 do_populate_sysroot: do_populate_sysroot for this recipe installed files with QA issues
> 
> The solution implemented involves modifying the shebang line in the
> cgi-demo.cgi file to use '/usr/bin/env rrdcgi', ensuring it adheres
> to the length limit.
>
> Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
> ---
>  meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb
> index cbe1af285..5afb3f2f4 100644
> --- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb
> +++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb
> @@ -103,6 +103,11 @@ do_configure() {
>          ${B}/examples/*.pl
>  }
>
> +do_install:append:class-native() {
> +    # Replace the shebang line in cgi-demo.cgi
> +    sed -i '1s|^.*$|#!/usr/bin/env rrdcgi|' ${D}${datadir}/rrdtool/examples/cgi-demo.cgi
> +}

I think this patch makes sense for non-native versions of this recipe
as well. However, it will be good
to see if we can do it as a patch to .in file itself, string
substitution can cause unintended changes
especially when the scripts change etc.

https://github.com/oetiker/rrdtool-1.x/blob/master/examples/cgi-demo.cgi.in#L1


> +
>  PACKAGES =+ "${PN}-perl ${PN}-python"
>  PACKAGES =+ "rrdcached"
>
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#110683): https://lists.openembedded.org/g/openembedded-devel/message/110683
> Mute This Topic: https://lists.openembedded.org/mt/106476549/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb
index cbe1af285..5afb3f2f4 100644
--- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.8.0.bb
@@ -103,6 +103,11 @@  do_configure() {
         ${B}/examples/*.pl
 }
 
+do_install:append:class-native() {
+    # Replace the shebang line in cgi-demo.cgi
+    sed -i '1s|^.*$|#!/usr/bin/env rrdcgi|' ${D}${datadir}/rrdtool/examples/cgi-demo.cgi
+}
+
 PACKAGES =+ "${PN}-perl ${PN}-python"
 PACKAGES =+ "rrdcached"