Commit Graph

23 Commits

Author SHA1 Message Date
Chen Qi
bc15582d80 yq_git: add back apply=no for SRC_URI diff
This apply=no was dropped during last upgrade. This causes
do_patch error when using git shallow tarball.

The original patch that added apply=no is:
https://lists.yoctoproject.org/g/meta-virtualization/message/8804

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-05-19 22:44:13 -04:00
Peter Kjellerstedt
428af39f51 yq: drop uneeded do_compile_prepend
remove the do_compile:prepend(). It is not needed and removing it
allows yq to be built after devtooling it.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-04-20 21:44:19 +00:00
Peter Kjellerstedt
1c98d66d20 yq: Correct the version (4.45.1+)
The current version of yq is actually based on 4.45.1.

Also remove ${SRCREV_yq} from PV to allow `devtool modify yq` to work.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-04-20 21:34:33 +00:00
Bruce Ashfield
9ac32d6781 yq: update to v4.30.8
We also drop the -dev package avoidance of bash dependency
as many more vendor'd packages now require it.

Bumping yq to version 1.13.1-1767-gde2f77b4, which comprises the following commits:

    8bf425b4 Bumping version
    f755755b Updated release notes
    0f390b27 Bumping goccy
    31ad7fba Bump github.com/magiconair/properties from 1.8.7 to 1.8.9
    566cf82d Bump github.com/goccy/go-json from 0.10.3 to 0.10.4
    2c9f8331 Bump github.com/elliotchance/orderedmap from 1.7.0 to 1.7.1
    c02d44de Bump golang.org/x/net from 0.32.0 to 0.33.0
    f73c862c feat: Create parent directories if --split-exp is used.
    294a1709 Bumping version
    342efb23 Fixed panic on multipling string by very large number #2211
    22013812 Fixed multiply string by negative number panic #2211
    52737154 Fixed panic error #2211
    e204677f Fixed no-colors regression #2218
    f7681595 Create docker image for armv7 / raspberry pi3
    c16b1800 Make sure to update the key when deleting array elements
    3bca3a23 Bump github.com/elliotchance/orderedmap from 1.6.0 to 1.7.0
    70bef5b9 Bump golang.org/x/net from 0.31.0 to 0.32.0
    ea2ba18e Bump golang from 1.23.3 to 1.23.4
    80310eaa Removing temp docker fix
    83911937 Temp fix docker version
    d858ab16 Removing riscv64 from docker build as its not supported by the base golang:1.23.2 image
    f1c7e5ca Updated release notes
    bc5b54cb Bumping version
    129e5973 Fixing release pipeline
    42db154e Bumping version
    f06c7c6b Updating release notes
    b710fadf Regenerating go mod
    58cc9db7 Updated release notes
    4af292f0 Fixed handling of nulls with sort_by expressions #2164
    f238f018 Bump github.com/fatih/color from 1.17.0 to 1.18.0
    58a4d240 Bump golang.org/x/net from 0.30.0 to 0.31.0
    887b4a56 Fixed linting
    f2cc2ea5 Bump golang from 1.23.2 to 1.23.3
    95e7b35f Fixed spelling of coloured
    f071a25f cmd: force no color output when NO_COLOR env presents
    b8607bac Prefer not having nolint
    6908161f replace error creation
    f168172b remove unused variable parameters from functions
    3ce266bf fix parameter order in error type comparison
    7eef1a45 exclude lint errors to keep cobra params unchanged
    072491c6 remove lint exception no longer required
    18972b29 replace deprecated megacheck with specific linters
    9d60c796 update golangci-lint to the last version
    9caeb429 Format comments with a gray foreground
    39a81da1 Bump golang.org/x/net from 0.29.0 to 0.30.0
    b84e23e1 Bump golang from 1.23.1 to 1.23.2
    f654fbf4 Fixed array subtraction update bug #2159
    5df71072 Fixed index out of range error
    cc7738bb Bump golang.org/x/net from 0.28.0 to 0.29.0
    302ce129 Bump golang from 1.23.0 to 1.23.1
    f57de74c Bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.3
    383cd0f1 Bump golang from 1.22.5 to 1.23.0
    3727b3e6 Fixed unecessary int64 to int conversion
    c477fc08 Updated readme to include x-cmd
    18460060 Can traverse straight from parent operator (parent.blah)
    dff01224 Regen kind docs
    42b92aff Added pick including all keys example
    c76e432d Bump golang.org/x/net from 0.27.0 to 0.28.0
    19e2591b Only use podman if CLI can execute. Use docker if non-Linux podman has no connection to Linux system.
    6eb2ae75 Create kind.md header doc
    82fca30e Fix cspell errors
    c46c1a71 build: use goreleaser for building cross-compiled binaries and add riscv64 target (#2135)
    bbdd9748 Bumping version
    99406687 Preparing release
    95aaccee Add Flox to installation methods (#2117)
    b9c3ff6f convert file ext to lowercase for format detection (#2121)
    b80e1cb3 Use static bin in snap (#2090)
    0ff84152 Bump golang.org/x/net from 0.26.0 to 0.27.0 (#2099)
    e8dcf3f1 Bump github.com/goccy/go-yaml from 1.11.3 to 1.12.0 (#2108)
    208302cf Bump golang from 1.22.4 to 1.22.5 (#2091)
    ef6fb92e Log printing follow no-colors flag #2082
    28646c7b Skip and warn when interpolating strings and theres a unclosed bracket #2083
    0b7d4b79 Fixed CSV content starting with # issue #2076
    7e172251 Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#2075)
    f15500b2 Bumping version
    b8aec71e Preparing release
    68aafb6a Handle numbers with underscores #2039
    d58870b0 Adding splat[] short hand to explode,collect,flatten,groupby,path,pivot,select and more
    f1964dec Adding splat[] short hand to collect,eval,map,omit,path,pick
    45eda8db Added support for shorthand splat[] for filter,reverse,sort,shuffle
    d9af2dd9 Support env[] expression #2071
    7bad2f4f Adding back in commented tests :facepalm
    3ea19ad2 clean code
    42120e13 Unique now works on maps and arrays #2068
    1147113f Bump github.com/goccy/go-json from 0.10.2 to 0.10.3 (#2046)
    2edfa834 Bump github.com/elliotchance/orderedmap from 1.5.1 to 1.6.0 (#2053)
    8c7cfb72 Bump golang.org/x/net from 0.25.0 to 0.26.0 (#2061)
    356c60f4 Bump golang from 1.22.3 to 1.22.4 (#2062)
    4cc646b1 Bump github.com/fatih/color from 1.16.0 to 1.17.0 (#2043)
    2e44ab45 Bump golang.org/x/net from 0.24.0 to 0.25.0 (#2035)
    557dcb87 Bumping version
    2daa39e3 Updating release notes
    0c15cf35 Added properties convert to numbers example #2023
    d9adcdb6 Update instructions for Alpine Linux (#2034)
    9010809d Bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2 (#2024)
    8250f0c2 Bump golang.org/x/text from 0.14.0 to 0.15.0 (#2036)
    8ac9f605 Bump golang from 1.22.2 to 1.22.3 (#2037)
    17481714 Bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1 (#2014)
    21ba506e Fix: shell-completion (#2006)
    b54d7eb2 handle escaped backslashes (#1997)
    db6f2dc6 Bump golang from 1.22.1 to 1.22.2 (#1998)
    1411f450 Bump golang.org/x/net from 0.22.0 to 0.24.0 (#2008)
    c7baa8bc Fix: linux (w/ selinux) build (#2004)
    a4b9c304 Removed unused debian directory #2000
    fe84f622 Docs
    28c40670 Fixes npe when given filename ending with "." #1994
    101cf14b min/max operators (#1992)
    3283c65d pivot operator (#1993)
    2ee7508b typos
    2ecd8b60 updated contribe guide
    021d5f05 Fixing omit docs
    19a0e6dd Bumping version
    fbd4c842 Remove old JSON warning
    d9ef03a2 Bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0 (#1986)
    f5bfe5a2 omit operator (#1989)
    3b85cef3 support string X int multiplication as jq (#1988)
    76a0da39 Refactoring load op
    2b2c2854 Adding release notes
    8a07e3da Can specify parent levels #1970
    9e9cb65e Fixed CSV line break issue #1974
    29056ee8 Bump golang from 1.22.0 to 1.22.1 (#1968)
    8f4e9718 Bump golang.org/x/net from 0.21.0 to 0.22.0 (#1969)
    b4463e29 Adding a EvaluateAll function to StringEvaluator #1966
    93ed6660 yqlib, default to colors off when using yaml library #1964
    b5e3a014 Added comment to goccy decoder, its will WIP
    b6ea54ba Updating release notes
    e092329b String interpolation! #1149
    152b1584 Uncomment tests - oops
    72a78472 Added tostring #72
    706424a4 Improving column docs
    9adde1ac Bumping version
    ef24680e Updating release notes
    447bf28c Introduced 'format' to encapsulate encoding and decoding formats together
    8f6d6420 Refactoring encoding configuration
    1d371b71 Refactoring encoding configuration
    55f6a3a4 Refactoring JSON encoder prefs
    7a01e216 Refactoring Yaml encoder prefs
    f44d47a2 Refactoring Props encoder prefs
    2866e90c Refactoring XML encoder prefs
    571caa69 Refactoring Output types
    8a538394 Updating release notes
    3b84aaab Updating release notes
    311c9afe Bump github.com/alecthomas/repr from 0.3.0 to 0.4.0 (#1953)
    abef92d7 Added prune recipe
    9f3822fb Improving property docs
    b24b484e Added --properties-array-brackets flag for properties encoder #1933
    2865022c Add --properties-separator option (#1951)
    9a8151d3 Added csv separator flag #1950
    42439b7d Adding shebang documentation
    796b4a09 Adding shebang documentation
    86bb90f9 Can shebang yq scripts! #1851
    04769454 Bumping version
    3c3f1180 Cleaning up log message formats
    9142c93d Improved log format
    d9e1a789 Fixed Toml decoding when table array defined before parent #1922
    c32a9cea Added new CSV option to turn off auto-parsing #1947
    e81b6007 Fixing with_entries context #1925
    8cde0c83 Can now retrieve the alias names of merge anchors #1942
    b55f52f3 Improve merge docs
    1d06d8b4 Another comment example
    2871fa05 Release notes for next release
    2dda0a20 Comments in yq expressions! #1919
    24bd5636 Updating style docs
    bf2bc29e Dont run release build on v4 branch
    7781edda Updating release notes
    c9722c22 Re-releasing for latest dependency updates
    bb66c9c8 Bumping version
    279d9a69 Bump golang.org/x/net from 0.20.0 to 0.21.0 (#1940)
    1b17de13 Bump golang from 1.21.6 to 1.22.0 (#1939)
    e1904627 Bumping version
    5513ac8a Empty TOML table is an empty object
    d4e16a41 fix: empty TOML table (#1936)
    6e21c9f7 Need to escape single quotes in bash, updated docs #1932
    2473068a Attempt to use the latest snapcraft build
    61833501 Bump github.com/goccy/go-yaml from 1.11.2 to 1.11.3 (#1930)
    33a3bb3b Bump golang from 1.21.5 to 1.21.6 (#1915)
    c06e1604 Bump golang.org/x/net from 0.19.0 to 0.20.0 (#1916)
    010750da Updated to latest golint
    8af3e46f Fixed bump version to move v4 tag
    84890ae3 Add arg and flag completions
    a69c1b52 Generate v2 bash completions
    aaef2714 Bump github.com/pelletier/go-toml/v2 from 2.1.0 to 2.1.1 (#1904)
    16bab889 Bump github/codeql-action from 2 to 3 (#1903)
    dea8f956 Fixed "all" error message #1845
    eb427878 Added another new recipe
    cbd03f8a Added new recipe
    4cf123fe Fixed to_entries[]
    eff7d99e Added sample yq script
    dd648994 Bumping version
    755becdd Release notes
    7f26d91c Fixed handling of --- #1890, #1896
    fa322aec Bump golang from 1.21.4 to 1.21.5 (#1895)
    c7b14eac Bump actions/setup-go from 4 to 5 (#1894)
    2fd1537b Bump github.com/alecthomas/participle/v2 from 2.1.0 to 2.1.1 (#1893)
    1db4b52c Bump github.com/yuin/gopher-lua from 1.1.0 to 1.1.1 (#1892)
    d474bb8b Fixing sef fault on bad XML #1888
    1c3d5510 Bumping version
    d16b6fbb Release notes
    54a6978e Release notes
    a988cd90 Updating JSON doc: NDJSON spec deprecated, prefer JSON Lines
    779b2631 Updating references to yq being a YAML processor
    638deed0 Bump golang.org/x/net from 0.18.0 to 0.19.0 (#1887)
    730f240d Fixed to_entries and del bug #1886
    c11a5332 Bumping version
    430a6d52 Release notes
    eecc1065 Update JSON to YAML example for new JSON input output default (#1875)
    998b4edb Grammar fixes (#1877)
    26effddb Fixed empty array json bug #1880
    1cf9ecc7 Bumping version
    8024470b Updating release notes
    e5cc57be Do not panic when StdIn is closed (#1867)
    3d64bdad Fixes issue when update against self #1869
    4b8c8506 Updating release notes
    f789740f Bump github.com/elliotchance/orderedmap from 1.5.0 to 1.5.1 (#1854)
    0523c9df Bump golang.org/x/net from 0.17.0 to 0.18.0 (#1856)
    c7ef9460 Fixed multi doc anchor bug #1861
    79a50b9c Fixes dos line separator issue when reading expression file #1860
    b75dc078 Bump github.com/fatih/color from 1.15.0 to 1.16.0 (#1857)
    fc940689 Bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#1858)
    7892d38f Bump golang from 1.21.3 to 1.21.4 (#1859)
    5f4c1fbd Bumping version
    8122c9ed Release notes
    d6e099f7 Formatting
    bbe196ba feat: upgrade go.mod to 1.21 (#1830)
    a60d2797 add tests for root node unwrap bug in previous versions (#1837)
    c8f4ba7f Removing copier lib
    13d1bbb4 Generic ast (#1829)
    74304194 fix: Missing dependencies to build application (#1825)
    5ac95e54 Bump golang from 1.21.1 to 1.21.3 (#1823)
    aaa81ac4 Bump golang.org/x/net from 0.15.0 to 0.17.0 (#1822)
    7c78a15b Lua output fixes (#1811)
    610896e5 Bump github.com/alecthomas/repr from 0.2.0 to 0.3.0 (#1813)
    d113344a Added tonumber support #71
    6e65d44a Can build yq with no lua
    5fa41624 Add support for Lua input (#1810)
    ee900ec9 Added kind operator
    a198f723 Bumping version
    9f355b93 Release notes
    0cf3adf5 Adding another xml test; spelling fixes
    05ad1dad Fix typos (#1798)
    c750f1a4 Bump github.com/goccy/go-yaml from 1.11.1 to 1.11.2 (#1794)
    cdb9b560 Spellig with cspell
    980b0e6d Bump golang.org/x/net from 0.14.0 to 0.15.0 (#1775)
    0667500b Bump docker/setup-qemu-action from 2 to 3 (#1785)
    fa8cfd04 Bump docker/setup-buildx-action from 2 to 3 (#1786)
    974ded5a Bump github.com/alecthomas/participle/v2 from 2.0.0 to 2.1.0 (#1787)
    e126344c Bump github.com/goccy/go-yaml from 1.11.0 to 1.11.1 (#1788)
    e09779e0 Fixed number parsing as float bug in JSON #1756
    0a0182da Bump actions/checkout from 3 to 4 (#1776)
    594a0be8 Bump golang.org/x/text from 0.12.0 to 0.13.0 (#1774)
    95f61c6f Bump golang from 1.21.0 to 1.21.1 (#1773)
    de55fb39 Bump github.com/pelletier/go-toml/v2 from 2.0.9 to 2.1.0 (#1768)
    62b25b1b Added recipes documentation
    c6648044 Added recipes documentation
    cda69bff Adding recipes
    e5564c18 Another xml example
    55c0d485 Fixed string, null concact consistency #1712
    71f95ab8 Fixed .a!= parsing issue #1711
    1e84d7ef Bump github.com/jinzhu/copier from 0.3.5 to 0.4.0 (#1763)
    d18a5e3a Fixed new linting issue CWE-118
    596dda8c improve community supported installation options for Windows (#1761)
    6609ed76 Bumping version
    44c7f3ae Preparing release notes
    aaf805d8 Added checksum in bsd format
    ba1d5c1a Bump golang.org/x/net from 0.13.0 to 0.14.0 (#1751)
    1c4f92ec Bump golang.org/x/text from 0.11.0 to 0.12.0 (#1752)
    804b204f Bump golang from 1.20.7 to 1.21.0 (#1753)
    d302d75c Implement basic Lua output support (#1745)
    9b408291 Bump golang from 1.20.6 to 1.20.7 (#1749)
    1d611f04 Bump golang.org/x/net from 0.12.0 to 0.13.0 (#1750)
    1dee08aa Bump github.com/pelletier/go-toml/v2 from 2.0.8 to 2.0.9 (#1732)
    a68be7de Bump golang from 1.20.5 to 1.20.6 (#1725)
    0b34c9a0 Bumping version
    9cb09182 Release notes
    dde18338 Bump golang.org/x/net from 0.11.0 to 0.12.0 (#1719)
    b762da38 Bump golang.org/x/net from 0.10.0 to 0.11.0 (#1695)
    cb521fd0 Bump golang from 1.20.4 to 1.20.5 (#1690)
    22ad68d1 Bump golang.org/x/text from 0.9.0 to 0.10.0 (#1696)
    845d4ae3 Bump github.com/pelletier/go-toml/v2 from 2.0.7 to 2.0.8 (#1673)
    fcc04823 Added docs on base64 only working with utf8 content
    5950329e Added docs on yes/no being strings in yaml spec 1.2
    5ef537f3 Bumping version
    f7fc4edc Preparing release notes
    af177f96 Bump golang.org/x/net from 0.9.0 to 0.10.0 (#1667)
    4d50b001 Added test for null array json example
    d14eaa9b fix:  runtime error: invalid memory address or nil pointer dereference (#1649)
    91f47ff3 Bump golang from 1.20.3 to 1.20.4 (#1658)
    80b42b81 Implement shell output format (#1645)
    bbe30550 Bump golang.org/x/net from 0.8.0 to 0.9.0 (#1638)
    d2f1ae9d Bumping version
    3aa4c833 Release notes
    385921a3 Fixed passing of readonly context in pipe
    9d3c4029 Bump golang from 1.20.2 to 1.20.3 (#1628)
    cb907647 Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#1629)
    a7934680 Bump github.com/goccy/go-yaml from 1.10.1 to 1.11.0 (#1630)
    f58b1e52 Update README command for converting JSON to YAML (#1627)
    eba07529 Added scalar output for TOML (#1617)
    a389bb64 Fixed bug when splatting empty array #1613
    496035c7 toml docs
    d00ffd9c Updating release notes
    d5bbe5be Bumping version
    6a527604 Bump github.com/pelletier/go-toml/v2 from 2.0.6 to 2.0.7 (#1623)
    1fa88041 Bump github.com/alecthomas/participle/v2 from 2.0.0-beta.5 to 2.0.0 (#1624)
    4cbede61 Bump github.com/goccy/go-yaml from 1.10.0 to 1.10.1 (#1625)
    5fd2890d Add ``--nul-output|-0`` flag to separate element with NUL character (#1550)
    311622d1 Add removable-media interface plug declaration to the snap packaging(#1618) (#1619)
    8d516ce5 Handle scalars in csv, xml files
    1b0a62d0 Handle scalars in property files
    ac5346b1 Release notes
    ebd1548e Bumping version
    aebdbb41 Added warning for auto-input json files
    7103b78d Draft: Toml (#1439)
    47f4ddc9 Bump github.com/goccy/go-json from 0.10.1 to 0.10.2 (#1614)
    4ee4b09e Bumping version
    df5737ab Updating release notes
    48b481b6 Unknown file type should default to yaml, Fixes #1609
    7305b50f Fixed release notes - toml not released yet
    875cfdc9 Bumping version
    95aafdd8 Fixed modulo docs
    fdce8fce Added docs
    d8324dee Release notes
    dccba109 added another base64 test
    69d3e3f3 Add support for decoding base64 strings without padding (#1604)
    99b2ab61 Bump github.com/goccy/go-json from 0.10.0 to 0.10.1 (#1602)
    cbe84232 Bump actions/setup-go from 3 to 4 (#1601)
    dd4306b0 Bump github.com/fatih/color from 1.14.1 to 1.15.0 (#1603)
    ac8ffa28 doc gen
    fa6fac1a Minor typos (#1595)
    a6f0495b Stripped debugging info from binary
    e7f4c6ca Update README.md
    f2dd2999 Removed debain as a installation method
    3404cc0d Removed debain as a installation method
    9d2210b1 Removed debain as a installation method
    a466821e Added divide and modulo operators (#1593)
    360a47fd Fixed npe in log #1596
    08a6cb65 Auto output format (#1599)
    2c14c984 Bump golang from 1.20.1 to 1.20.2 (#1589)
    eafcc3ba Bump golang.org/x/net from 0.7.0 to 0.8.0 (#1590)
    9539877f Add filter operation (#1588)
    d30941b5 Detect input format based on file name extension (#1582)
    fed96f67 Bump github.com/goccy/go-yaml from 1.9.8 to 1.10.0 (#1581)
    2340ce6a Release notes
    e5260d85 Release notes
    47f4f8c7 Bumping version
    2195df9e Fixed xml encoding of ProcInst #1563, improved XML comment handling
    fdb14875 Preparing release notes
    3f1f66a8 Fixed merged anchor reference problem #1482
    cf8cfbd8 Allow build without json and xml support (#1556)
    62d167c1 Variable loop - Fixes #1566 (#1577)
    cb27444e Bump golang.org/x/net from 0.1.1-0.20221104162952-702349b0e862 to 0.7.0 (#1576)
    ce3d8378 Bump github.com/a8m/envsubst from 1.4.1 to 1.4.2 (#1569)
    9949a237 v4.31.1
    b86fb0ae Bumping version
    b369de66 Bump golang from 1.20.0 to 1.20.1 (#1557)
    75483fe9 Fix github action attempt
    f4e7203a Fix github action attempt
    d17fd942 Added shuffle command #1503
    a1698b74 Added ability to sort by multiple fields #1541
    5cb3c876 bump to go 1.20
    0f2a84d2 Bump golang from 1.19.5 to 1.20.0 (#1542)
    bbb149b3 Bumped linter
    18a51ca5 Bump github.com/a8m/envsubst from 1.3.0 to 1.4.1 (#1551)
    93b7c999 Use a lazy-quoting @sh encoder (#1548)
    f64f73a0 Updated gosec
    88a6b20b Fixed date comparison with string date #1537
    915ab699 Added to_unix operator
    f9f340b6 Github pipeline not in AU tz :D
    75920481 Added from_unix operator #1535
    d21bb920 Added shell string encoder (@sh) #1526
    d119dbc2 Upgrading golang.org/x/net package (#1540)
    7eda4a51 Bump github.com/fatih/color from 1.13.0 to 1.14.1 (#1531)
    3b1bcac5 review feed back on URI
    6d7d76a3 Adds @uri/@urid #1529

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-04-16 04:38:31 +00:00
Martin Jansa
c01273e001 metadata: add whitespace around assignments
With:
https://lists.openembedded.org/g/bitbake-devel/message/17508
there are many WARNINGs from this layer will cover src_uri.inc files
in next commit.

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-04-03 17:56:53 +00:00
Robert Yang
affb2252f4 yq_git: Set apply=no for SRC_URI diff
Fixed a do_patch error use git shallow tarball (BB_GIT_SHALLOW = "1"):

$ bitbake yp -cpatch

ERROR: do_patch: Importing patch 'github.com.pkg.diff' with striplevel '1'

The github.com.pkg.diff is ud.clonedir of git://github.com/pkg/diff:
* When use regular git repo as source, oe.patch.patch_path() will NOT
  handle it as a patch since the directory github.com.pkg.diff exists,
  and nothing is wrong.

* When use git shallow tarball, the github.com.pkg.diff doesn't exist since
  it is fetched as a tarball, then oe.patch.patch_path() will handle it
  as a patch, then the error happens.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2024-07-10 15:59:26 +00:00
Bruce Ashfield
5f5a9e7cd7 yq: adapt SRC_URI to include destsuffix=${GO_SRCURI_DESTSUFFIX}
As of commit cc4ec43a2b657fb4c58429ab14f1edc2473c1327 [go: Drop fork
of unpack code, mandate GO_SRCURI_DESTSUFFIX] we require this
variable in our go recipes.

We also symlink our unpacked vendor clones into the build directory
since they are no longer directly placed in WORKDIR.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2024-05-29 13:16:56 +00:00
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