Bug 2074467

Summary: Review Request: yq - Portable command-line YAML, JSON and XML processor
Product: [Fedora] Fedora Reporter: Julien Rische <jrische>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dustymabe, lukas, maxwell, mikel, package-review, pemensik, tpopela
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: NotReady
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-11 16:13:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1270054, 1946151, 2031922, 2074406, 2074412, 2074438, 2074463, 2107472    
Bug Blocks:    

Description Julien Rische 2022-04-12 09:38:18 UTC
Spec URL: https://pagure.io/rpm-yq/raw/rawhide/f/yq.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jrische/yq/fedora-rawhide-x86_64/04189741-yq/yq-4.20.2-1.fc37.src.rpm

Description:
Lightweight and portable command-line YAML, JSON and XML processor. yq 
uses jq like syntax but works with yaml files as well as json and xml. 
It doesn't yet support everything jq does - but it does support the 
most common operations and functions, and more is being added 
continuously.

Fedora Account System Username: jrische

Source RPM repo: https://pagure.io/rpm-yq

Copr: https://copr.fedorainfracloud.org/coprs/jrische/yq/

Comment 3 Maxwell G 2022-07-15 18:44:08 UTC
https://github.com/mikefarah/yq/releases/tag/v4.26.1 has been released. There have been some dependency changes upstream, so make sure to open new review requests for those. I would close the review requests for the dependencies that have been removed, as we generally try to avoid packaging libraries that aren't actually needed for anything, but I won't object if you feel strongly about keeping them.

Comment 4 Julien Rische 2022-08-25 16:20:03 UTC
The current version is v4.27.2. There is no dependency on github.com/timtadh/lexmachine, github.com/timtadh/data-structures, and github.com/timtadh/getopt any more.

There are 2 new dependencies that are already packaged: github.com/alecthomas/repr[1] and github.com/goccy/go-json[2].

Lexmachine was replaced by github.com/alecthomas/participle, which is not packaged. I am working on it, but the fact the version that is currently required by yq (2.0.0-beta.4) is containing a dash character is causing a conflict with Fedora's version format. Version 2.0.0 is not released yet.


[1] https://src.fedoraproject.org/rpms/golang-github-alecthomas-repr
[2] https://src.fedoraproject.org/rpms/golang-github-goccy-json

Comment 5 Maxwell G 2022-08-25 17:32:29 UTC
> Lexmachine was replaced by github.com/alecthomas/participle, which is not
> packaged. I am working on it, but the fact the version that is currently
> required by yq (2.0.0-beta.4) is containing a dash character is causing a
> conflict with Fedora's version format. Version 2.0.0 is not released yet.

Try adding `%global tag %(tr '~' '-' <<< %{version}) (with the proper indentation) right below Version and set Version to `2.0.0~beta.4`.

Comment 6 Maxwell G 2022-10-26 04:30:58 UTC
Are you interested in updating the package and proceeding with this review?

Comment 7 Package Review 2022-11-26 00:45:29 UTC
This is an automatic action taken by review-stats script.

The ticket submitter failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we consider this ticket as DEADREVIEW and proceed to close it.

Comment 8 Julien Rische 2022-11-28 09:02:46 UTC
I am still working on this package. There have been more dependencies changes. I will be opening other packages review requests for these.

Comment 9 Mikel Olasagasti Uranga 2024-01-22 16:20:47 UTC
> %global goipath         github.com/mikefarah/yq

Should be github.com/mikefarah/yq/v4


It would be interesting to add shell completions:

https://mikefarah.gitbook.io/yq/commands/shell-completion

Check doctl's spec as example.

Similar with man pages:

https://github.com/mikefarah/yq/blob/master/debian/rules#L51

Comment 10 Petr Menšík 2024-06-11 13:52:54 UTC
There would be conflict if both this review and bug #2263790 pass, because both provide tool named %_bindir/yq. Any idea how that should be solved?

I thought about naming those tools by pyq, meaning python yq. Possible alternative would be gyq, golang yq (this package). Still not long enough, but different from upstream.
Of course alternative is also yq.python and yq.go and customizable alternative via Alternatives [1]. But I doubt those implementations are similar enough. But target functionality is basically the same.

It seems Debian has chosen bug #2263790, but has alternative name xq-python for xq tool. I have not found any clear attempt to resolve the conflict on upstream side. Issue #141 [2] references the problem on python upstream, but haven't found similar note at mikefarah. Except for pip version issue #193 [3].

Would you consider using alternatives to share yq name? Would you have any other idea, how to solve it?

1. https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
2. https://github.com/kislyuk/yq/issues/141
3. https://github.com/mikefarah/yq/issues/193

Comment 11 Petr Menšík 2024-06-11 16:13:24 UTC
It seems this package variant has already been imported under bug #2276522. If the reviewer wants access to it, need to request it from current maintainer.

https://src.fedoraproject.org/rpms/yq

Comment 12 Petr Menšík 2024-06-11 16:13:55 UTC

*** This bug has been marked as a duplicate of bug 2276522 ***