Message ID | 20230915120131.251678-1-f_l_k@t-online.de |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe] appstream: remove workaround for cross-compile | expand |
It fails to build https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/3128/steps/14/logs/stdio On Fri, Sep 15, 2023 at 5:01 AM Markus Volk <f_l_k@t-online.de> wrote: > > This issue has been fixed upstream > https://github.com/ximion/appstream/pull/510/commits/1f301baa5bf59d75d566a674bd76221847ca1d21 > > - fix api documentation build > - build vapi dependent on gobject-introspection-data > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > .../appstream/0001-fix-crosscompile.patch | 43 ------------------- > .../0001-remove-hardcoded-path.patch | 31 +++++++++++++ > .../appstream/appstream_0.16.3.bb | 17 +++----- > 3 files changed, 37 insertions(+), 54 deletions(-) > delete mode 100644 meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch > create mode 100644 meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch > > diff --git a/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch b/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch > deleted file mode 100644 > index fe8dcff91..000000000 > --- a/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch > +++ /dev/null > @@ -1,43 +0,0 @@ > -From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001 > -From: Markus Volk <f_l_k@t-online.de> > -Date: Mon, 12 Dec 2022 15:42:42 +0100 > -Subject: [PATCH] fix crosscompile > - > -Signed-off-by: Markus Volk <f_l_k@t-online.de> > - > -Upstream-Status: Inappropriate [oe-specific] > ---- > - data/meson.build | 2 +- > - meson.build | 2 +- > - tools/meson.build | 9 +++++++++ > - 3 files changed, 11 insertions(+), 2 deletions(-) > - > -diff --git a/data/meson.build b/data/meson.build > -index aea0cb25..1a085fc9 100644 > ---- a/data/meson.build > -+++ b/data/meson.build > -@@ -14,7 +14,7 @@ install_data('its/metainfo.loc', > - metainfo_with_relinfo = custom_target('gen-output', > - input : ['../NEWS', 'org.freedesktop.appstream.cli.metainfo.xml'], > - output : ['nol10n_withrelinfo_org.freedesktop.appstream.cli.metainfo.xml'], > -- command : [ascli_exe, 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] > -+ command : ['appstreamcli', 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] > - ) > - > - metainfo_i18n = i18n.itstool_join( > -diff --git a/meson.build b/meson.build > -index fd0e3373..2f273ada 100644 > ---- a/meson.build > -+++ b/meson.build > -@@ -124,7 +124,7 @@ if get_option ('gir') > - dependency('gobject-introspection-1.0', version: '>=1.56') > - endif > - > --stemmer_inc_dirs = include_directories(['/usr/include']) > -+stemmer_inc_dirs = include_directories(['']) > - if get_option('stemming') > - stemmer_lib = cc.find_library('stemmer', required: true) > - if not cc.has_header('libstemmer.h') > --- > -2.34.1 > - > diff --git a/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch b/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch > new file mode 100644 > index 000000000..9cbfaca82 > --- /dev/null > +++ b/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch > @@ -0,0 +1,31 @@ > +From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001 > +From: Markus Volk <f_l_k@t-online.de> > +Date: Mon, 12 Dec 2022 15:42:42 +0100 > +Subject: [PATCH] remove hardcoded path > + > +Signed-off-by: Markus Volk <f_l_k@t-online.de> > + > +Dont include hardcoded path. This fixes: > +| cc1: error: include location "/usr/include" is unsafe for cross-compilation [-Werror=poison-system-directories] > + > +Upstream-Status: Inappropriate [oe-specific] > +--- > + meson.build | 2 +- > + 1 files changed, 1 insertions(+), 1 deletions(-) > + > +diff --git a/meson.build b/meson.build > +index fd0e3373..2f273ada 100644 > +--- a/meson.build > ++++ b/meson.build > +@@ -124,7 +124,7 @@ if get_option ('gir') > + dependency('gobject-introspection-1.0', version: '>=1.56') > + endif > + > +-stemmer_inc_dirs = include_directories(['/usr/include']) > ++stemmer_inc_dirs = include_directories(['']) > + if get_option('stemming') > + stemmer_lib = cc.find_library('stemmer', required: true) > + if not cc.has_header('libstemmer.h') > +-- > +2.34.1 > + > diff --git a/meta-oe/recipes-support/appstream/appstream_0.16.3.bb b/meta-oe/recipes-support/appstream/appstream_0.16.3.bb > index 222cd80be..5a6c5336c 100644 > --- a/meta-oe/recipes-support/appstream/appstream_0.16.3.bb > +++ b/meta-oe/recipes-support/appstream/appstream_0.16.3.bb > @@ -22,9 +22,12 @@ DEPENDS = " \ > inherit meson gobject-introspection gettext gtk-doc pkgconfig vala > > GIR_MESON_OPTION = "gir" > +GTKDOC_MESON_OPTION = "apidocs" > > -SRC_URI = "https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz" > -SRC_URI:append:class-target = " file://0001-fix-crosscompile.patch" > +SRC_URI = " \ > + https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz \ > + file://0001-remove-hardcoded-path.patch \ > +" > SRC_URI[sha256sum] = "081c917646e94d7221c9e4aae54dacda95a27c607fa93cd8e6344a2b318b98b1" > > S = "${WORKDIR}/AppStream-${PV}" > @@ -36,14 +39,6 @@ PACKAGECONFIG[stemming] = "-Dstemming=true,-Dstemming=false,libstemmer" > > FILES:${PN} += "${datadir}" > > -EXTRA_OEMESON:append = " -Ddocs=false" > -EXTRA_OEMESON:class-target += "--cross-file=${WORKDIR}/meson-${PN}.cross" > - > -do_write_config:append:class-target() { > - cat >${WORKDIR}/meson-${PN}.cross <<EOF > -[binaries] > -appstreamcli = '${STAGING_BINDIR_NATIVE}/appstreamcli' > -EOF > -} > +EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" > > BBCLASSEXTEND = "native" > -- > 2.41.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#104894): https://lists.openembedded.org/g/openembedded-devel/message/104894 > Mute This Topic: https://lists.openembedded.org/mt/101377808/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, Sep 15 2023 at 03:58:17 PM -07:00:00, Khem Raj
<raj.khem@gmail.com> wrote:
> It fails to build
Sorry, I didn't check properly. The fix still needs to be backported.
Sent a v2 for it
diff --git a/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch b/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch deleted file mode 100644 index fe8dcff91..000000000 --- a/meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001 -From: Markus Volk <f_l_k@t-online.de> -Date: Mon, 12 Dec 2022 15:42:42 +0100 -Subject: [PATCH] fix crosscompile - -Signed-off-by: Markus Volk <f_l_k@t-online.de> - -Upstream-Status: Inappropriate [oe-specific] ---- - data/meson.build | 2 +- - meson.build | 2 +- - tools/meson.build | 9 +++++++++ - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/data/meson.build b/data/meson.build -index aea0cb25..1a085fc9 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -14,7 +14,7 @@ install_data('its/metainfo.loc', - metainfo_with_relinfo = custom_target('gen-output', - input : ['../NEWS', 'org.freedesktop.appstream.cli.metainfo.xml'], - output : ['nol10n_withrelinfo_org.freedesktop.appstream.cli.metainfo.xml'], -- command : [ascli_exe, 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] -+ command : ['appstreamcli', 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] - ) - - metainfo_i18n = i18n.itstool_join( -diff --git a/meson.build b/meson.build -index fd0e3373..2f273ada 100644 ---- a/meson.build -+++ b/meson.build -@@ -124,7 +124,7 @@ if get_option ('gir') - dependency('gobject-introspection-1.0', version: '>=1.56') - endif - --stemmer_inc_dirs = include_directories(['/usr/include']) -+stemmer_inc_dirs = include_directories(['']) - if get_option('stemming') - stemmer_lib = cc.find_library('stemmer', required: true) - if not cc.has_header('libstemmer.h') --- -2.34.1 - diff --git a/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch b/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch new file mode 100644 index 000000000..9cbfaca82 --- /dev/null +++ b/meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch @@ -0,0 +1,31 @@ +From 6ab00a4279823829a9b82dc9e4d055da4de88c6e Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@t-online.de> +Date: Mon, 12 Dec 2022 15:42:42 +0100 +Subject: [PATCH] remove hardcoded path + +Signed-off-by: Markus Volk <f_l_k@t-online.de> + +Dont include hardcoded path. This fixes: +| cc1: error: include location "/usr/include" is unsafe for cross-compilation [-Werror=poison-system-directories] + +Upstream-Status: Inappropriate [oe-specific] +--- + meson.build | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/meson.build b/meson.build +index fd0e3373..2f273ada 100644 +--- a/meson.build ++++ b/meson.build +@@ -124,7 +124,7 @@ if get_option ('gir') + dependency('gobject-introspection-1.0', version: '>=1.56') + endif + +-stemmer_inc_dirs = include_directories(['/usr/include']) ++stemmer_inc_dirs = include_directories(['']) + if get_option('stemming') + stemmer_lib = cc.find_library('stemmer', required: true) + if not cc.has_header('libstemmer.h') +-- +2.34.1 + diff --git a/meta-oe/recipes-support/appstream/appstream_0.16.3.bb b/meta-oe/recipes-support/appstream/appstream_0.16.3.bb index 222cd80be..5a6c5336c 100644 --- a/meta-oe/recipes-support/appstream/appstream_0.16.3.bb +++ b/meta-oe/recipes-support/appstream/appstream_0.16.3.bb @@ -22,9 +22,12 @@ DEPENDS = " \ inherit meson gobject-introspection gettext gtk-doc pkgconfig vala GIR_MESON_OPTION = "gir" +GTKDOC_MESON_OPTION = "apidocs" -SRC_URI = "https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz" -SRC_URI:append:class-target = " file://0001-fix-crosscompile.patch" +SRC_URI = " \ + https://www.freedesktop.org/software/appstream/releases/AppStream-${PV}.tar.xz \ + file://0001-remove-hardcoded-path.patch \ +" SRC_URI[sha256sum] = "081c917646e94d7221c9e4aae54dacda95a27c607fa93cd8e6344a2b318b98b1" S = "${WORKDIR}/AppStream-${PV}" @@ -36,14 +39,6 @@ PACKAGECONFIG[stemming] = "-Dstemming=true,-Dstemming=false,libstemmer" FILES:${PN} += "${datadir}" -EXTRA_OEMESON:append = " -Ddocs=false" -EXTRA_OEMESON:class-target += "--cross-file=${WORKDIR}/meson-${PN}.cross" - -do_write_config:append:class-target() { - cat >${WORKDIR}/meson-${PN}.cross <<EOF -[binaries] -appstreamcli = '${STAGING_BINDIR_NATIVE}/appstreamcli' -EOF -} +EXTRA_OEMESON += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dvapi=true', '-Dvapi=false', d)}" BBCLASSEXTEND = "native"
This issue has been fixed upstream https://github.com/ximion/appstream/pull/510/commits/1f301baa5bf59d75d566a674bd76221847ca1d21 - fix api documentation build - build vapi dependent on gobject-introspection-data Signed-off-by: Markus Volk <f_l_k@t-online.de> --- .../appstream/0001-fix-crosscompile.patch | 43 ------------------- .../0001-remove-hardcoded-path.patch | 31 +++++++++++++ .../appstream/appstream_0.16.3.bb | 17 +++----- 3 files changed, 37 insertions(+), 54 deletions(-) delete mode 100644 meta-oe/recipes-support/appstream/appstream/0001-fix-crosscompile.patch create mode 100644 meta-oe/recipes-support/appstream/appstream/0001-remove-hardcoded-path.patch