Commit Graph

16 Commits

Author SHA1 Message Date
Bruce Ashfield
e11b230d0e Revert "yq: Redefine do_compile"
This reverts commit 49a6827cbd.

The workaround is no longer needed, as oe-core has upgraded go to
a version that has fixed the issue.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-05-29 09:41:07 -04:00
Mingli Yu
49a6827cbd yq: Redefine do_compile
This reverts commit 9b87b12885
which states the linkshared issue is resolved. Actually the
issue still exists as build fails on qemuarm64 and we still
need the fix [1]. So add the fix [1] back and it's also better
define its own do_compile and not let the do_compile logic
in go.bbclass affect the build.

[1] https://git.yoctoproject.org/meta-virtualization/commit/?id=d2a630ce6cf67a145f218012fbf02e4d0d9648df

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-05-17 11:46:05 -04:00
Jose Quaresma
9b87b12885 Revert "yq: drop {LINKSHARED}"
This reverts commit d2a630ce6c.

The linkshared is fixed upstream and backported in oe-core.
https://git.yoctoproject.org/poky/commit/?id=d5c79ca6a77af1a04992fff4300333e02d94d84d

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-03-27 22:14:27 -04:00
Mingli Yu
d2a630ce6c yq: drop {LINKSHARED}
Redefine do_compile logic to drop {LINKSHARED} to fix the
below build failure.
  WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink  -I /lib64/ld-linux-aarch64.so.1  -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0  -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0  -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0  -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0  -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot=  -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot=  -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native=  -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie `go_list_packages`'

 Before the patch:
 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq

 # du -sh /usr/bin/yq
 5.2M	/usr/bin/yq

 After the patch:
 # rpm -ql yq
 /usr
 /usr/bin
 /usr/bin/yq

 # du -sh /usr/bin/yq
 9.0M	/usr/bin/yq

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-03-08 17:07:00 -05:00
Mingli Yu
d766f36eae yq: remove .git suffix for cobra component
Remove the '.git' suffix of the cobra in SRC_URI to make the cobra
SRC_URI exactly the same among the recipes which define cobra to
make sure two local git repos (Yocto supports fetching locally)
which are the same.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-03-02 16:30:56 -05:00
Mingli Yu
147e78a2af yq: add ptest support
# ./run-ptest
 PASS: acceptance.sh
 PASS: bad_args.sh
 PASS: basic.sh
 PASS: bump-version.sh
 PASS: check.sh
 PASS: completion.sh
 PASS: copy-docs.sh
 PASS: coverage.sh
 PASS: devtools.sh
 PASS: empty.sh
 PASS: extract-checksum.sh
 PASS: format.sh
 PASS: front-matter.sh
 PASS: generate-man-page-md.sh
 PASS: generate-man-page.sh
 PASS: header-processing-off.sh
 PASS: inputs-format.sh
 PASS: install-man-page.sh
 PASS: leading-seperator.sh
 PASS: load-file.sh
 PASS: output-format.sh
 PASS: pipe.sh
 PASS: pretty-print.sh
 PASS: release-deb.sh
 PASS: secure.sh
 PASS: setup.sh
 PASS: split-printer.sh
 PASS: test-docker.sh
 PASS: test.sh
 PASS: xcompile.sh

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-02-10 12:58:29 -05:00
Mingli Yu
e8a1ce41d7 yq: Upgrade to 4.30.8
Upgrade yq to 4.30.8 [1].

[1] https://github.com/mikefarah/yq/releases/tag/v4.30.8

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-02-10 12:58:29 -05:00
Mingli Yu
24f5ab34cb yq: fix QA issues
Fixes:
  ERROR: yq-1.13.1+gite0f5cb3c5958e57c7f250a7030e92c768c1b2b19-r0 do_package_qa: QA Issue: /usr/lib64/go/src/github.com/mikefarah/yq/debian/rules contained in package yq-dev requires /usr/bin/make, but no providers found in RDEPENDS:yq-dev? [file-rdeps]
  ERROR: yq-1.13.1+gite0f5cb3c5958e57c7f250a7030e92c768c1b2b19-r0 do_package_qa: QA Issue: /usr/lib64/go/src/github.com/mikefarah/yq/scripts/xcompile.sh contained in package yq-dev requires /bin/bash, but no providers found in RDEPENDS:yq-dev? [file-rdeps]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-02-10 12:58:29 -05:00
Bruce Ashfield
ad8af62133 yq: fix build
The yq build was broken:

  - some repositories have moved from master -> main
  - missing dependencies, that were being fetched in the compile task

Correcting these issues fixes yq' build

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-09-13 16:11:10 -04:00
Martin Jansa
1aadb32730 yq: convert github SRC_URI to use https protocol
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-08 09:18:20 -05:00
Bruce Ashfield
0a7ae8bc50 global: convert github SRC_URIs to use https protocol
github is removing git:// access, and fetches will start experiencing
interruptions in service, and eventually will fail completely.

bitbake will also begin to warn on github src_uri's that don't use
https. So we convert the meta-virt instances to use protocol=https
(done using the oe-core contrib conversion script)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-02 09:57:03 -04:00
Bruce Ashfield
ac399ad091 global: add explicit branch to all SRC_URIs
As introduced in the oe-core post:

  https://lists.openembedded.org/g/openembedded-core/message/157623

SRC_URIs without an explicit branch will generate warnings, and
eventually be an error.

We run the provided conversion script to make sure that meta-virt
is ready for the change.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-02 09:57:03 -04:00
Bruce Ashfield
89b1a89d9e yq: add SRCREV_FORMAT
recipes that use multiple SCMs in the SRC_URI, must supply
SRCREV_FORMAT or SRCPV triggers an expansion error. While
this isn't fatal during the build, it can cause issues with
setscene (and possibly) other tasks failing, which then
leads to no sstate re-use, etc.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-10-19 23:21:20 -04:00
Bruce Ashfield
d876cfc5bf global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides
separator.

This is pass one of updating the meta-virt recipes to use that
syntax.

This has only been minimally build/runtime tested, more changes
will be required for missed overrides, or incorrect conversions

Note: A recent bitbake is required:

    commit 75fad23fc06c008a03414a1fc288a8614c6af9ca
    Author: Richard Purdie <richard.purdie@linuxfoundation.org>
    Date:   Sun Jul 18 12:59:15 2021 +0100

        bitbake: data_smart/parse: Allow ':' characters in variable/function names

        It is becomming increasingly clear we need to find a way to show what
        is/is not an override in our syntax. We need to do this in a way which
        is clear to users, readable and in a way we can transition to.

        The most effective way I've found to this is to use the ":" charater
        to directly replace "_" where an override is being specified. This
        includes "append", "prepend" and "remove" which are effectively special
        override directives.

        This patch simply adds the character to the parser so bitbake accepts
        the value but maps it back to "_" internally so there is no behaviour
        change.

        This change is simple enough it could potentially be backported to older
        version of bitbake meaning layers using the new syntax/markup could
        work with older releases. Even if other no other changes are accepted
        at this time and we don't backport, it does set us on a path where at
        some point in future we could
        require a more explict syntax.

        I've tested this patch by converting oe-core/meta-yocto to the new
        syntax for overrides (9000+ changes) and then seeing that builds
        continue to work with this patch.

        (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284)

        Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-08-02 17:17:53 -04:00
Bruce Ashfield
4218573b08 yq: export GO111MODULE=off
With the latest go version bump in oe-core export GO111MODULE is
on by default. Our build is not setup to use go modules, so we
disable it and avoid configuration errors:

  no required module provides package ... : working directory is not part of a module

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-03-01 17:02:33 -05:00
Bruce Ashfield
96c644f896 devtoos: introduce 'yq'
yq is used by some builds to do command line parsing of yaml config
files.

We introduce the recipe/package and all of its dependencies.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-10-08 10:53:39 -04:00