commit bd8cdbd6bd3d934cff1b59745eb39f376961d47be30b7173c2c06ca224c8f3ce Author: Robert Munteanu Date: Thu Jan 9 12:31:02 2025 +0000 fix CVE-2024-45338 old: utilities/yq new: home:mslacken:branches:utilities/yq rev None Index: vendor.tar.gz =================================================================== Binary files vendor.tar.gz (revision 39) and vendor.tar.gz (revision 3) differ Index: yq.changes =================================================================== --- yq.changes (revision 39) +++ yq.changes (revision 3) @@ -1,4 +1,27 @@ ------------------------------------------------------------------- +Wed Jan 8 16:52:32 UTC 2025 - Christian Goll + +- Updated to 4.44.6: + * Fixed deleting items in array bug #2027, #2172; Thanks @jandubois + * Docker image for armv7 / raspberry pi3, Thanks @brianegge + * Fixed no-colors regression #2218 + * Fixed various panic scenarios #2211 + * Bumped dependencies +- Changes from 4.44.5 (4.44.4 was skipped) + * Format comments with a gray foreground (Thanks @gabe565) + * Fixed handling of nulls with sort_by expressions #2164 + * Force no color output when NO_COLOR env presents (Thanks @narqo) + * Fixed array subtraction update bug #2159 + * Fixed index out of range error + * Can traverse straight from parent operator (parent.blah) + * Bumped dependencies + +- Bumped x/net to 0.33.0 to fix CVE-2024-45338 + * add file Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch + + + +------------------------------------------------------------------- Mon Aug 12 13:18:36 UTC 2024 - Dirk Müller - update to 4.44.3: Index: yq.spec =================================================================== --- yq.spec (revision 39) +++ yq.spec (revision 3) @@ -1,7 +1,7 @@ # # spec file for package yq # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,13 +20,14 @@ %global import_path %{provider_prefix} Name: yq -Version: 4.44.3 +Version: 4.44.6 Release: 0 Summary: A portable command-line YAML processor License: MIT URL: https://github.com/mikefarah/yq Source0: https://github.com/mikefarah/yq/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: vendor.tar.gz +Patch0: Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch # conflict with all python3X-yq packages since they install /usr/bin/yq # we need to handle Leap 15.4 specially since the python3dist() is not # generated there @@ -71,7 +72,7 @@ Fish command line completion support for %{name}. %prep -%setup -qa1 +%autosetup -p1 -a1 %build go build -trimpath -buildmode=pie -mod=vendor -o bin/%{name} Index: Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch =================================================================== --- Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch (added) +++ Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch (revision 3) @@ -0,0 +1,56 @@ +From 7efae2dad9f3900a5d4e3ef275735657f0a34d2a Mon Sep 17 00:00:00 2001 +From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> +Date: Thu, 19 Dec 2024 03:23:37 +0000 +Subject: [PATCH] Bump golang.org/x/net from 0.32.0 to 0.33.0 + +Bumps [golang.org/x/net](https://github.com/golang/net) from 0.32.0 to 0.33.0. +- [Commits](https://github.com/golang/net/compare/v0.32.0...v0.33.0) + +--- +updated-dependencies: +- dependency-name: golang.org/x/net + dependency-type: direct:production + update-type: version-update:semver-minor +... + +Signed-off-by: dependabot[bot] +--- + go.mod | 2 +- + go.sum | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/go.mod b/go.mod +index f44bcbbd..56bd2a2c 100644 +--- a/go.mod ++++ b/go.mod +@@ -16,7 +16,7 @@ require ( + github.com/spf13/cobra v1.8.1 + github.com/spf13/pflag v1.0.5 + github.com/yuin/gopher-lua v1.1.1 +- golang.org/x/net v0.32.0 ++ golang.org/x/net v0.33.0 + golang.org/x/text v0.21.0 + gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 + gopkg.in/yaml.v3 v3.0.1 +diff --git a/go.sum b/go.sum +index e8746990..4fec28d7 100644 +--- a/go.sum ++++ b/go.sum +@@ -62,10 +62,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT + github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= + github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= + github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +-golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +-golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +-golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +-golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= ++golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= ++golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= ++golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= ++golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +-- +2.43.0 + Index: yq-4.44.6.tar.gz =================================================================== Binary file yq-4.44.6.tar.gz (revision 3) added Index: yq-4.44.3.tar.gz =================================================================== Binary file yq-4.44.3.tar.gz (revision 39) deleted OBS-URL: https://build.opensuse.org/package/show/utilities/yq?expand=0&rev=40 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch b/Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch new file mode 100644 index 0000000..2366a0f --- /dev/null +++ b/Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch @@ -0,0 +1,56 @@ +From 7efae2dad9f3900a5d4e3ef275735657f0a34d2a Mon Sep 17 00:00:00 2001 +From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> +Date: Thu, 19 Dec 2024 03:23:37 +0000 +Subject: [PATCH] Bump golang.org/x/net from 0.32.0 to 0.33.0 + +Bumps [golang.org/x/net](https://github.com/golang/net) from 0.32.0 to 0.33.0. +- [Commits](https://github.com/golang/net/compare/v0.32.0...v0.33.0) + +--- +updated-dependencies: +- dependency-name: golang.org/x/net + dependency-type: direct:production + update-type: version-update:semver-minor +... + +Signed-off-by: dependabot[bot] +--- + go.mod | 2 +- + go.sum | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/go.mod b/go.mod +index f44bcbbd..56bd2a2c 100644 +--- a/go.mod ++++ b/go.mod +@@ -16,7 +16,7 @@ require ( + github.com/spf13/cobra v1.8.1 + github.com/spf13/pflag v1.0.5 + github.com/yuin/gopher-lua v1.1.1 +- golang.org/x/net v0.32.0 ++ golang.org/x/net v0.33.0 + golang.org/x/text v0.21.0 + gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 + gopkg.in/yaml.v3 v3.0.1 +diff --git a/go.sum b/go.sum +index e8746990..4fec28d7 100644 +--- a/go.sum ++++ b/go.sum +@@ -62,10 +62,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT + github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= + github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= + github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +-golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +-golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +-golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +-golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= ++golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= ++golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= ++golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= ++golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +-- +2.43.0 + diff --git a/_service b/_service new file mode 100644 index 0000000..0b07d5c --- /dev/null +++ b/_service @@ -0,0 +1,4 @@ + + + + diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 100644 index 0000000..2b535e6 --- /dev/null +++ b/vendor.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c46fa70484d862bd487110445c861dad918ebcfaac7353954682f79b2629b6e +size 3335540 diff --git a/yq-4.44.2.tar.gz b/yq-4.44.2.tar.gz new file mode 100644 index 0000000..1f85ccb --- /dev/null +++ b/yq-4.44.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb741c2d41351537aa42d563d0fccf16b3195c352b33e0ef111fd448232da911 +size 297469 diff --git a/yq-4.44.3.tar.gz b/yq-4.44.3.tar.gz new file mode 100644 index 0000000..2f22efd --- /dev/null +++ b/yq-4.44.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea950f5622480fc0ff3708c52589426a737cd4ec887a52922a74efa1be8f2fbf +size 297938 diff --git a/yq-4.44.6.tar.gz b/yq-4.44.6.tar.gz new file mode 100644 index 0000000..f838a3b --- /dev/null +++ b/yq-4.44.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0acef928168e5fdb26cd7e8320eddde822f30cf1942817f3f6b854dd721653f +size 299062 diff --git a/yq.changes b/yq.changes new file mode 100644 index 0000000..ef9a806 --- /dev/null +++ b/yq.changes @@ -0,0 +1,961 @@ +------------------------------------------------------------------- +Wed Jan 8 16:52:32 UTC 2025 - Christian Goll + +- Updated to 4.44.6: + * Fixed deleting items in array bug #2027, #2172; Thanks @jandubois + * Docker image for armv7 / raspberry pi3, Thanks @brianegge + * Fixed no-colors regression #2218 + * Fixed various panic scenarios #2211 + * Bumped dependencies +- Changes from 4.44.5 (4.44.4 was skipped) + * Format comments with a gray foreground (Thanks @gabe565) + * Fixed handling of nulls with sort_by expressions #2164 + * Force no color output when NO_COLOR env presents (Thanks @narqo) + * Fixed array subtraction update bug #2159 + * Fixed index out of range error + * Can traverse straight from parent operator (parent.blah) + * Bumped dependencies + +- Bumped x/net to 0.33.0 to fix CVE-2024-45338 + * add file Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch + + + +------------------------------------------------------------------- +Mon Aug 12 13:18:36 UTC 2024 - Dirk Müller + +- update to 4.44.3: + * Fixed upper-case file extension detection + * Log printing follow no-colors flag + * Skip and warn when interpolating strings and theres a + unclosed bracket + * Fixed CSV content starting with # issue #2076 + * Bumped dependencies + +------------------------------------------------------------------- +Mon Jun 17 09:38:16 UTC 2024 - Dirk Müller + +- update to 4.44.2: + * Handle numbers with underscores #2039 + * Unique now works on maps and arrays #2068 + * Added support for short hand splat with env[] expression + #2071, as well as many other operators + (split,select,eval,pick..) + * Bumped dependencies +- update to 4.44.1: + * Added min/max operators (#1992) Thanks @mbenson + * Added pivot oeprator (#1993) Thanks @mbenson + * Fix: shell-completion (#2006) Thanks @codekow + * Handle escaped backslashes (#1997) Thanks @mbenson + * Fix npe when given filename ending with "." + * Fix: linux (w/ selinux) build (#2004) Thanks @codekow + * Bumped dependencies +- update to 4.43.1: + * Added omit operator #1989 thanks @mbenson! + * Can now multiply strings by numbers #1988 thanks @mbenson! + * Added tostring #72 + * Added string interpolation #1149 + * Can specify parent(n) levels #1970 + * Fixed CSV line break issue #1974 + * Adding a EvaluateAll function to StringEvaluator #1966 + * yqlib, default to colors off when using yaml library #1964 + * Removed JSON output warning + * Bumped dependencies +- update to 4.42.1: + * Can execute yq expression files directly with shebang #1851 + * Added --csv-separator flag #1950 + * Added --properties-separator option - thanks @learnitall + * Added --properties-array-brackets flag for properties encoder + * Shell completion improvements - thanks @scop #1911 + * Bumped dependencies +- update to 4.41.1: + * Can now comment in yq expressions! #1919 + * Added new CSV option to turn off auto-parsing #1947 + * Can now retrieve the alias names of merge anchors #1942 + * Fixed Toml decoding when table array defined before parent + * Fixing with_entries context #1925 + +------------------------------------------------------------------- +Thu Feb 8 12:44:10 UTC 2024 - Dirk Müller + +- update to 4.40.6: + * Fixed to_entries[] + * Added sample yq script + +------------------------------------------------------------------- +Mon Dec 18 09:26:45 UTC 2023 - Dirk Müller + +- update to 4.40.5: + * Fixing seg fault on bad XML #1888 + * Fixed handling of --- #1890, #1896 +- update to 4.40.4: + * Fixed bug with creating maps with values based off keys + +------------------------------------------------------------------- +Fri Nov 24 09:23:19 UTC 2023 - Dirk Müller + +- update to 4.40.3: + * Fixed JSON output issue with empty arrays #1880 +- update to 4.40.2: + * Do not panic when StdIn is closed (#1867) Thanks @aleskandro! + * Fixed issue when update against self #1869 + * Fixed multi doc anchor bug #1861 + * Fixes doc line separator issue when reading expression file + #1860 + * Bumped dependencies + +------------------------------------------------------------------- +Wed Oct 11 12:40:20 UTC 2023 - Dirk Müller + +- trim paths in the binary +- run tests + +------------------------------------------------------------------- +Tue Sep 26 11:56:03 UTC 2023 - Dirk Müller + +- update to 4.35.2 (bsc#1215808): + * Fix various typos #1798 + * Fixed number parsing as float bug in JSON #1756 + * Fixed string, null concatenation consistency #1712 + * Fixed expression parsing issue #1711 + * Bumped dependencies +- update to 4.35.1: + * Added Lua output support + * Added BSD checksum format + * Bumped dependencies + +------------------------------------------------------------------- +Tue Jul 18 14:38:53 UTC 2023 - Dirk Müller + +- update to 4.34.2: + * Bumped depedencies +- update to 4.34.1: + * Added shell output format + * Fixed nil pointer dereference + * Bumped dependency versions + +------------------------------------------------------------------- +Fri Apr 14 17:03:43 UTC 2023 - Dirk Müller + +- update to 4.33.3: + * Fixed bug when splatting empty array #1613 + * Added scalar output for TOML (#1617) + * Fixed passing of read-only context in pipe (partial fix for + #1631) + * Bumped dependency versions + +------------------------------------------------------------------- +Fri Mar 31 08:42:46 UTC 2023 - Dirk Müller + +- update to 4.33.2: + * Add ``--nul-output|-0`` flag to separate element with NUL + character (#1550) Thanks @vaab! + * Add removable-media interface plug declaration to the snap + packaging(#1618) Thanks @brlin-tw! + * Scalar output now handled in csv, tsv and property files + * Bumped dependency versions + +------------------------------------------------------------------- +Mon Mar 27 19:32:58 UTC 2023 - Dirk Müller + +- update to 4.33.1: + * Added read-only TOML support! #1364. Thanks @pelletier for + making your API available in your toml lib :) + * Added warning when auto detect by file type is outputs JSON + +------------------------------------------------------------------- +Mon Mar 20 09:00:05 UTC 2023 - Dirk Müller + +- update to 4.32.2: + * Fixes parsing terraform tfstate files results in "unknown" + format + * Added divide and modulo operators (#1593) + * Add support for decoding base64 strings without padding + * Add filter operation (#1588) - thanks @rbren! + * Detect input format based on file name extension (#1582) + * Auto output format when input format is automatically + detected + * Fixed npe in log #1596 + * Improved binary file size! + * Bumped dependency versions + +------------------------------------------------------------------- +Thu Mar 2 08:03:20 UTC 2023 - Dirk Müller + +- update to 4.31.2: + * Fixed merged anchor reference problem #1482 + * Fixed xml encoding of ProcInst #1563, improved XML + comment handling + * Allow build without json and xml support (#1556) Thanks + * Bumped dependencies + +------------------------------------------------------------------- +Tue Feb 28 20:21:17 UTC 2023 - Dirk Müller + +- update to 4.31.1: + * Added shuffle command #1503 + * Added ability to sort by multiple fields #1541 + * Added @sh encoder #1526 + * Added @uri/@urid encoder/decoder #1529 + * Fixed date comparison with string date #1537 + * Added from_unix/to_unix Operators + * Bumped dependency versions + +------------------------------------------------------------------- +Mon Jan 16 09:05:04 UTC 2023 - Dirk Müller + +- update to v4.30.8: + * Log info message instead of erroring when unable to chown file in linux + (e.g. snap confinement) #1521 + * Fixed bug in splice operator #1511 + * Fixed value operator bug #1515 + * Fixed handling of merging null #1501 + * Ownership of file now maintained in linux (thanks @vaguecoder) #1473 + * Bumped dependency versions + +------------------------------------------------------------------- +Sun Dec 18 13:43:18 UTC 2022 - dmueller@suse.com + +- Update to version 4.30.6: + * Bumping version + * release notes + * Fixed xml comment in array of scalars #1465 + * Bump github.com/magiconair/properties from 1.8.6 to 1.8.7 (#1476) + * Bump github.com/goccy/go-yaml from 1.9.6 to 1.9.7 (#1466) + * Bump golang from 1.19.3 to 1.19.4 (#1465) + * Include blank new lines in leading header preprocessing #1462 + * Upgraded golang/x/text and golang/x/net to fix trivy scan vulnerabilities (#1461) + * Bump github.com/goccy/go-json from 0.9.11 to 0.10.0 (#1455) + * updating release notes + +------------------------------------------------------------------- +Sat Dec 3 16:46:48 UTC 2022 - Dirk Müller + +- update to v4.30.5: + * XML Decoder: Comment parsing tweak + * XML Decoder: Fixed processing comments in empty XML #1446 + * XML Decoder: Checking for invalid content outside of a root node #1448 + * XML Decoder: Fixed issue where content surrounding tags are lost #1447 + * XML Decoder: Fixed xml decode bug when there is content after a comment + * Fixed loading yaml with header issue #1445 + * guessTagFromCustomType warning log is now a debug. + * Special thanks to @Kopfbremse for reporting XML issues! + * Fixing missing version in brew/snap due to bug in automated versioning + * Updated release process (automated versioning) + * Fixed handling of yaml directives (#1424) + * Fixed parsing of newline character in string expression #1430 + * Fixed length compares to null instead of 0 issue #1427 + * Actually updated the default xml prefix 🤦 + * XML users note: the default attribute prefix has change to +@ to avoid naming conflicts! + * Can use expressions in slice #1419 + * Fixed unhandled exception when decoding CSV thanks @washanhanzi + * Added array_to_map operator for #1415 + * Fixed sorting by date #1412 + * Added check to ensure only maps can be encoded to XML #1408 + * Check merge alias is a map #1425 + * Explicity setting unwrap flag works for json output #437, #1409 + * Fixed null pointer exception when parsing CSV with empty field #1404 +- update to v4.29.1: + * Fixed Square brackets removing update #1342 + * Added slice array operator (.[10:15]) #44 + * XML decoder/encoder now parses directives and proc instructions (#1344). + * Please use the new skip flags documented here to ignore them. + * XML users note that the default attribute prefix will change to +@ in the 4.30 release to avoid naming conflicts! + * Improved comment handling of decoders (breaking change for yqlib users sorry) + * Fixed load operator bug when loading yaml file with multiple documents + * Bumped Go compiler version #1394 + * Bumped dependencies + * Fixed Github Actions issues (thanks @mattphelps-8451) + * yq Github action docker image is now built as part of the release + * Fixed bug - can now delete documents #1377 + * Fixed handling of UTF8 encoded CSVs #1373 + * Detect and fail on missing closing brackets #1366 + * Bumped dependencies + * Added setpath and delpaths operators, like jq (#1374) + * Added is_key operator, to check if a match was a key when recursing + * Added validation when attempting to add sequences to maps (#1341) + * Fixed relative merge bug #1333 + * Fixed bug in alternative (//) operator, RHS being evaluated when it didn't need to be + * Fixed footer comment issue #1231 + * Github action now runs as root (as recommended by Github Actions doc) + +------------------------------------------------------------------- +Thu Apr 14 11:45:10 UTC 2022 - Robert Munteanu + +- Add conflicts for Leap 15.4 + +------------------------------------------------------------------- +Fri Feb 4 14:03:18 UTC 2022 - Robert Munteanu + +- Add conflict with python3x-yq packages + +------------------------------------------------------------------- +Wed Feb 2 12:21:11 UTC 2022 - Robert Munteanu + +- Correct source URL + +------------------------------------------------------------------- +Tue Feb 01 14:05:46 UTC 2022 - rombert@apache.org + +- Update to version 4.18.1: + * Bumbing version + * Updating docs + * Bump github.com/a8m/envsubst from 1.2.0 to 1.3.0 (#1089) + * Preparing release notes + * Fixing github build + * Debug github build + * Debug github build + * Working around github strangeness + * Debug github build + * Debug github build + * No longer have to specify eval! + * Smarter behaviour when piping data in with one argument + * Auto style when adding to empty maps/arrays + * Fix Seg Fault on bad split expression input #1086 + * Merged envsubst into env operators + * Add a new `envsubst` operator to replace environment variables in strings (#1082) + * Added support for adding objects + * Include zip file checksums in release + * Added support for `*=` + * Multiply, substract with custom types + * Auto cast for add + * Updated README, better xml docs + * Bumping release + * Fixing manpage path issue + * fixes path in scripts/generate-man-page-md.sh (#1075) + * Bumping version + * Added JSON conversion tests and doc generation + * refactor: move from io/ioutil to io and os packages (#1068) + * Bump github.com/jinzhu/copier from 0.3.4 to 0.3.5 (#1071) + * Tweaking select docs + * Improving select docs (#839) + * Updated readme as per #1051 recommendations + * Preparing release notes + * New merge flag (n) to only merge in new fields (#1038) + * Added XML encoding/decoding (#1067) + * Better fix #1062 (return error instead of panic) + * Fixed #1062 + * Fixed #1048 + * Bump github.com/goccy/go-yaml from 1.9.4 to 1.9.5 (#1065) + * Arch Linux install instructions (#1059) + * Update changelog for version v4.16.2 (#1046) + * chore: script to build the deb sources (#1045) + * Updating cli docs + * Added xml acceptance tests + * Can encode in XML! + * Added global xml prefs for simplicity + * wip + * wip + * wip + * Added XML decoder (#1044) + * Bumping version + * Bump golang compiler #1037 + * enable more linters (#1043) + * Bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (#1039) + * Improved extract-checksum.sh + * Added script for extracting checksums + * Report while filename failed to parse #1030 + * Improving docs + * Improved tips and tricks + * Improved error message + * Bumping version + * Updated release notes + * Added sort_by operator + * wip + * Updated release notes + * Assignment op no longer clobbers anchor (#1029) + * Recording release notes for next release + * Fixed docker permission issue #1014 + * Cleanup test + * Added encoder tests + * Added encoder tests + * Added csv, tsv output formats + * Bump github.com/jinzhu/copier from 0.3.2 to 0.3.4 (#1027) + * Add support for Podman as well as Docker (#1026) + * Added map, map_values + * Added another test + * Added another test + * Fixed collect op when working with multiple nodes + * Add accessor for the yq logger instance (#1013) + * Better merge example + * Better formatting of merge arrays example + * Added credit for merge by array example + * Better merge array by key example + * Better merge array by key example + * gci linter + * update Golangci version to v1.43.0 + * updated readme + * enable misspell linter + * Clean up errored file? + * Include version query for tools + * Attempt to fix golint problem + * Bumping version + * Fixing comments + * Update release notes + * Added more tests + * Added key operator + * Added errorlint to devtools + * enable errorlint linter + * add labels, quote some values + * simplify prod stage, move version label to action + * Update install-man-page.sh + * feature: detect MANPATh and install there + * Improved load doc + * Minor improvement on handling front matter + * Load file acceptance test + * wip + * Update check.sh + * lint : define golangci configuration file + * Bumping version + * Fixed header preprocessing! + * remove leading content indicator + * fixed printer test + * wip + * wip + * Fixing bad label in github action + * Include secure as part of build process + * Include secure as part of build process + * add build check to PRs + * Update go.yml + * Update dependabot.yml + * Bump github.com/spf13/cobra from 1.1.3 to 1.2.1 + * Bump github.com/fatih/color from 1.10.0 to 1.13.0 + * Bump github.com/jinzhu/copier from 0.2.8 to 0.3.2 + * Bump github.com/goccy/go-yaml from 1.8.9 to 1.9.4 + * Bump actions/setup-go from 1 to 2.1.4 + * Bump actions/create-release from 1.0.0 to 1.1.4 + * Create dependabot.yml + * github action no longer uses data1.yml + * Updating release instructions + * Tweaking docs + * Updating README + * Update document generation script + * gitbook wip + * Bumping version + * Fixed acceptance tests + * Fix JSON encoding removing null #985 + * Refactored command logic + * Split printer + * Improving docs + * Fixed flatten error message + * Added flatten operator + * Added group_by operator + * better docs + * Can specify indent in encode ops + * Fixed newline handling in encoder/decoder + * better docs + * Fixed newline handling when decoding/encoding + * Added decoder op + * Added encoder op + * Removing no longer needed github action + * Bumping version + * Updated github action release to generate man page + * Man page release workflow wip + * Man page release workflow wip + * Man page release workflow wip + * Added test release flow + * Bumping go-lang, docker versions + * Fixed expression parsing bug #970 + * Man page + * Updated Readme + * Keep flag, it is needed in corner cases + * Revert "Removed leadingContentPreProcessing flag - header preprocessing is stable" + * Man page wip + * Man page wip + * Man page wip + * Removed leadingContentPreProcessing flag - header preprocessing is stable + * Make deepMatch report in linear time + * Update README with recently added / changed options + * Bump version + * Speed up multiply + * Slight performance improvement to context.ChildContext + * Sped up explode operator + * Fixed select bug (#958) + * Skip the tests if the nocheck Debian build option is specified + * Fix a typo in root.go + * Bump version + * Updating to go 1.17 to fix CVE #944 + * New release with docker build fixes + * Fixed docker timeout - simplify docker builds + * Bumping version + * Help text tweak + * minor readme cleanup + * Bump deb to version 4.13.0 + * Added STDIN example to the top + * Added STDIN example to the top + * Updating with documentation + * Fixed with semicolon space issue + * Bumping version + * Added contains operator + * Update release notes + * Update release notes + * Added with operator + * Draft release notes + * Updated var to work like jq #934 + * Added missing closing bracket error check + * supports multiline output + * Adding subtraction support for arrays + * Bumping version + * Fixed union infinite loop #930 + * Fixing alternative op bug #930 + * Can process hex numbers + * Clarifying readme + * Bumping version + * Fixed merge comment issue #919 + * Fixing pipeline + * Bumping version + * Added shorthand output formats + * Updated to use -o for output format + * Pretty Print tests + * wip - pretty print 1.1 compat mode + * Fixed document header/footer comment handling when merging + * Updated README to include instructions on docker + * Adding string readme + * Added properties encoder test + * Properties encoder wip + * Properties encoder wip + * Add github action docs to readme + * updating readme + * Version bump + * bad github action now fails properly + * testing bad github action fails + * testing bad github action fails + * Fixed merging arrays with merge anchors #899 + * Added more tests + * Added more tests + * Version bump + * Handle leading comment with no new-line + * More efficient front matter processor + * Better way of processing leading content + * Fixed for most cases, except strip comments + * Added more tests + * Added printer tests + * wip + * wip + * shellcheck + * Now using shunit2 for acceptance tests + * Removed blank file disclaimer + * Version bump + * Front matter processor seems to be working! + * Added front-matter handler + * Remember comments in empty files + * Handle empty files + * Fixed EOF bug when processing empty files + * Improving reg ex doc + * Increment version + * added more readme disclaimers + * fixing github flow + * set github default user + * testing github action + * Adding magic to detect leading seperators + * Added capture regex operator + * Added test for #878 + * Added test operator + * Added match operator + * (wip) regex match op + * (wip) regex match op + * Clean up cli help doc, add github and doc links + * Bump version + * Revert usage of filepath.Clean (azure compatability issues) + * Revert "Fix for gosec rule G304 - sanitize filepaths" + * Updated docker instructions + * Fixed secure script to run against all files + * Bump version + * Extract out compound assign logic, use it add and subtract ops + * Added another |= example + * Fixes #870 + * Update append array docs + * Fixed append array issue https://github.com/mikefarah/yq/issues/874 + * Fixed merge bug https://github.com/mikefarah/yq/issues/880 + * Update debian pkg files to version 4.9.6 + * Fix for gosec rule G304 - sanitize filepaths + * Fix for gosec rule G104 - handle errors + * powershell issues + * Checksum archives as well as binaries + * Update Dockerfile + * Updating release instructions + * Increment version + * Add darwin/arm64 builds + * Fixed newline issue https://github.com/mikefarah/yq/issues/855 + * Fixed issue on creating objects using [] + * Update Dockerfile + * Added more tests + * Bumping version + * Fixed alternative operator + * Updating docs + * Added nested traversal examples + * Increment version + * Moved GithubAction docs to gitbook + * outputs support in the action + * Fixing entries test + * Add `with_entries` example using filtering + * Added gofmt to format command + * Fixing doc + * Fixed nil RHS bug in alternative operator #838 + * Increment version + * Fixes update-assign with collect object issue #830 + * Increment version + * Fixes nested array indexing #824 + * Fixing readonly ops not to modify context when paths dont exist + * Fixing readonly ops not to modify context when paths dont exist + * Added blank alias example + * Fixing readonly ops not to modify context when paths dont exist + * Fixing readonly ops not to modify context when paths dont exist + * Increment version + * Added ability to escape double quotes in double quotes + * Fixed handling of null expressions in equals op + * Increment version + * Added any_c and all_c operators + * Added any and all operators + * Added unique operator + * Update operator docs + * Fixed null issue with entry operators + * Increment version + * Added optional traverse flag + * Added with_entries + * Added from_entries op + * Added to_entries op + * Fixed merge anchor bug #800 + * Fixed boolean op with empty context issue + * updating operator docs + * Updating comment docs + * Moved multiply doc example lower + * Added complex merge example + * Added another style example for doc + * Increment version + * Fixes delete issue #793 + * Updating operator doc + * Added command help about using stdin + * Better string sub documentation + * Incrementing version + * Added string substitute command + * Added "expand" to explode docs for searchability + * Fixed alternative operator when LHS has empty matches + * 4.6.3 release + * Added subtract operator (numbers only) + * Added chocolate badges thanks @adriens + * updated release notes to run gosec manually + * cannot run gosec on all docker platforms, removing from devtools + * cannot run gosec on all docker platforms, removing for now + * Bump version + * Bump dependencies + * Fixed merge comments + * Dont print doc separators for JSON (https://github.com/mikefarah/yq/issues/735) + * Fixed += operator (https://github.com/mikefarah/yq/issues/750) + * Fixed precedence of CREATE_MAP (https://github.com/mikefarah/yq/issues/753) + * Fixing doc links + * Added gosec + * Improving docs + * Update readme + * Bump version + * Improved lexer performance! + * Increment version + * Arrays no longer deeply merge by defauly, like jq + * nicer reduce example + * nicer reduce example + * Added context variable for reduce + * Added reduce examples and doc + * infix reduce + * infix reduce + * wip - reduce! + * Force re-release + * Fixed write-inplace with no expression + * Fix pretty-printing + * Version increment + * Preserve comments on map keys + * Added space example to docs + * update deps + * Fixed merge dropping anchors + * improving docs + * Fixing special character example + * Added not equals operator + * Equals now only compares scalars + * Fixed delete bug + * fixed instructions + * v4.5.0 + * Fixed delete bug + * Added variable doc + * Fixed variable precedence + * Fixing op precedences + * Fixing op precedences + * Added variables + * Dont create entries when selecting + * Pass context through operators + * Added funding button + * change version from master to latest(v4) + * fix: go install fails + * Fixed length of null to be zero + * fixing docker pipeline for nextime + * attempt to fix dockre + * Fixed bad docker version + * Bump version + * Can add and merge append to null + * Don't escape HTML chars when converting to json + * Fixed cross-function combinatorial bug + * wip + * thoughts + * cross function fix wip + * Fixed doker instructions + * Fixing multiply doc + * Incrementing version + * Added keys operator + * Added split string operator + * Added join strings operator + * Split doc operator + * Fixing add,multiply,alternative operator precendences + * Fixed remove comments example + * Dont use pointer for env prefs (avoid nil) + * Dont use pointer for recursive prefs (avoid nil) + * Dont use pointer for multiply prefs (avoid nil) + * Dont use pointer for commment prefs (avoid nil) + * Added merge if empty + * Added operator level doc + * Incrementing version + * Renaming pathtree to expression + * Removed global vars + * UnwrapDoc now private + * Moved eval function to eval interface + * added lib_test.go + * added EvaluateNodes and EvaluateCandidateNodes to yqlib + * Merge now copies anchor names + * Fixed creation of candidateNode in operators to include file metadata + * Cleaning up exposed public api + * Fixed tag operator for top level node + * Fixed equals operator for top level node + * Fixed has operator for top level node + * fixing exposed functions and interfaces + * fixing exposed functions and interfaces + * Better add documentation + * Added scalar addition + * Fixed collect at document level + * Better error handling will empty env + * Better recursive decent docs + * Better docIndex docs + * Better env docs + * Merged env commands in :eye-roll: + * Env Ops! + * strenv + * wip + * wip + * Bump version + * Error when passing files and using null-input flag + * Bumped go yaml for comment hanlding fixes + * Added webi + * Added recurse examples + * Added another delete example + * Can assign-update tag + * Can assign-update style + * Can assign-update aliases and anchors + * Can assign-update comments + * updating readme + * brew v3! + * Updated collect objcet doc + * Added shorthand document index selection + * Unwrap node in get tag to return proper tag at root level + * Added v3 snap instructions + * Refactored doc generation, add fi fileIndex alias + * Fixed updating yaml from other files + * update issue template, instruct questions to be raised in disussion + * fixed heading + * added tar.gz instructions + * updating readme + * updating readme + * wget version var missing a 'v' prefix. + * scripts/check works for local and docker build + * find golangci_lint through PATH + * Updated docs + * updated release instructions + * Cleaning up release process, fixed github action version + * Updated docs + * Added prettyPrint flag + * Added recurse keys operator + * Removed TraversePrefs + * More scenarios + * Cleaning code + * Traverse Array Operator + * Refactoring traverse + * Refactoring traverse + * Fixed nested array splat path + * Fixed doc links + * Cleaning up docs + * v4.1.0 + * Updated release instructions, remove gate for release + * fixing xcompile for git action + * fixing xcompile for git action + * only tar executable files + * Fixed rhash call + * Fixed xcompile.sh + * trialing github release actions + * trialing github release actions + * trialing github release actions + * trialing github release actions + * trialing github release actions + * trialing github release actions + * automated docker releases! + * playing with release action + * playing with release action + * playing with release action + * playing with release action + * Added alias operator; + * Added anchor operator + * fixed test name + * Fixed delete full path + * Added missing flag + * moved string space test to op values test cases + * #607 Fix string value with spaces error + * tar files to keep permissions of exectuable + * Added compressed binaries for download managers and better file size + * Added trivy to docker build, bumped alpine image + * Add now uses crossFunction + * Boolean operators now use the crossFunction util func + * Added Alternative op + * Better readme + * Increment version + * Updating readme for imminent v4 release + * Updating readme for imminent v4 release + * Added better error reporting + * Added better error reporting + * handle multiple document streams + * Can now properly handle .a[] expressions + * Update README.md + * added another test + * clarified pipe parsing tests + * Added pipe and length docs, fix pipe precedence + * Update README.md + * updated cobra package + * incrementing version + * Added sort keys operator + * fixed create doc for eval-all + * improved acceptance tests + * Fixed create yaml + * added exit status + * Added write-inlplace flag + * wip - write in place + * Updated lib todo list + * Added append equals, merge append. Fixed creating numeric arrays + * wip + * wip + * Added get key examples + * updated issue templates + * updated issue templates + * updated issue templates + * updated issue templates + * Fixed recursive decent on empty objects/arrays + * 4 alpha2 + * attempt to fix pipeline + * go mod tidy + * Add operator! + * Added has operator + * Fixed empty array op + * Fixing docs + * path operator singular + * added path operator! + * Extracted out evaluators + * Added File operators + * Added File operators + * get file wip + * fixed boolean example + * Fixed typo + * Fixed boolean ops + * wip + * Attempt to fix git pipeline + * Updated readme + * Set entrypoint to yq + * Adding github action on release to publish multi-arch image + * Updated readme re v4 + * Fixed docker file, fixed doco + * Updated todo + * Minor fixes + * Added plain assignment + * Added tag operator + * updated todo + * wip style docs and test + * docs + * select doc + * Added printer test + * include docs for tracking + * added test to ensure json keys remain in order + * Fixed printer + * updating release + * more docs + * more docs + * more docs + * Better documentation generation + * Better documentation generation + * Better documentation generation + * Fixed linting + * Alpha1 of v4! + * Fixed collect object for multi doc + * refining + * document index + * more tests + * comment ops! + * refactored + * explode when outputting to json + * explode! + * got style + * multiply merge anchors + * merge anchors! + * simple anchors + * create object fixes + * create object fixes + * first cli + * collect object operator! + * wip + * more + * Added null + * simplified, refactored + * Moved macports to community, announced v4 + * wip + * README: add instructions for installing with MacPorts + * wip + * merge + * autovivification, merge! + * updating release instructions + * Multiply wip + * removed docs, added recursive decent + * more refinement + * value parse test + * refactoring, fixing + * can assign children! + * can assign values + * JQ like syntax wip + * adding pipe + * collect + * read tests + * read command + * added single count operator + * ops first class + * wip + * cool, both work + * dont splat scalars + * Refactoring + * wip + * can delete + * assign operator + * extracted out operators + * fixed equals number issue + * array equals! + * arrays + * equal! + * equal! + * added AND op + * use orderermap + * wip + * ops work in theory! + * wip + * binary tree ftw + * wip + * postfix with traverse op + * include traverse as a operator token + * postfix wip! + * postfix wip! + * to postfix wip + * tree wip + * fixed wrapping! + * wip + +------------------------------------------------------------------- +Tue Oct 19 09:23:42 UTC 2021 - Robert Munteanu + +- Initial package diff --git a/yq.spec b/yq.spec new file mode 100644 index 0000000..749b554 --- /dev/null +++ b/yq.spec @@ -0,0 +1,118 @@ +# +# spec file for package yq +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global provider_prefix github.com/mikefarah/yq +%global import_path %{provider_prefix} + +Name: yq +Version: 4.44.6 +Release: 0 +Summary: A portable command-line YAML processor +License: MIT +URL: https://github.com/mikefarah/yq +Source0: https://github.com/mikefarah/yq/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: vendor.tar.gz +Patch0: Bump-golang.org-x-net-from-0.32.0-to-0.33.0.patch +# conflict with all python3X-yq packages since they install /usr/bin/yq +# we need to handle Leap 15.4 specially since the python3dist() is not +# generated there +%if 0%{?suse_version} >= 1550 +Conflicts: python3dist(yq) +%else +Conflicts: python3-yq +%endif +BuildRequires: golang(API) = 1.22 + +%description +A lightweight and portable command-line YAML processor. yq uses jq like syntax +but works with yaml files as well as json. It doesn't yet support everything +jq does - but it does support the most common operations and functions, and more +is being added continuously. + +%package bash-completion +Summary: Bash Completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and bash-completion) +BuildArch: noarch + +%description bash-completion +Bash command line completion support for %{name}. + +%package zsh-completion +Summary: Zsh Completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and zsh) +BuildArch: noarch + +%description zsh-completion +Zsh command line completion support for %{name}. + +%package fish-completion +Summary: Fish Completion for %{name} +Requires: %{name} = %{version} +Supplements: (%{name} and fish) +BuildArch: noarch + +%description fish-completion +Fish command line completion support for %{name}. + +%prep +%autosetup -p1 -a1 + +%build +go build -trimpath -buildmode=pie -mod=vendor -o bin/%{name} + +%check +go test ./... + +%install +install -D -m 0755 ./bin/%{name} "%{buildroot}/%{_bindir}/%{name}" +mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions +%{buildroot}/%{_bindir}/%{name} shell-completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name} +mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d +%{buildroot}/%{_bindir}/%{name} shell-completion zsh > %{buildroot}%{_datarootdir}/zsh_completion.d/_%{name} +mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d +%{buildroot}/%{_bindir}/%{name} shell-completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name}.fish + +%files bash-completion +%defattr(-,root,root) +%dir %{_datarootdir}/bash-completion/completions/ +%{_datarootdir}/bash-completion/completions/%{name} + +%files zsh-completion +%defattr(-,root,root) +%dir %{_datarootdir}/zsh_completion.d/ +%{_datarootdir}/zsh_completion.d/_%{name} + +%files fish-completion +%defattr(-,root,root) +%dir %{_datarootdir}/fish +%dir %{_datarootdir}/fish/vendor_completions.d +%{_datarootdir}/fish/vendor_completions.d/%{name}.fish + +%files +%{_bindir}/%{name} +%license LICENSE +%doc README.md + +%files bash-completion +%defattr(-,root,root) +%dir %{_datarootdir}/bash-completion/completions/ +%{_datarootdir}/bash-completion/completions/%{name} + +%changelog