Bug 2031226

Summary: Review Request: golang-github-pelletier-toml-2 - Go library for the toml language
Product: [Fedora] Fedora Reporter: W. Michael Petullo <mike>
Component: Package ReviewAssignee: Fabio Alessandro Locati <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eclipseo, maxwell, me, mikel, package-review
Target Milestone: ---Flags: me: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-24 23:16:51 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:    
Bug Blocks: 1930952    

Description W. Michael Petullo 2021-12-10 19:29:03 UTC
Spec URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2.spec
SRPM URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2-2.0.0-0.1.beta.4.fc35.src.rpm
Description:
Go-toml provides the following features for using data parsed from TOML
documents:

 - Load TOML documents from files and string data
 - Easily navigate TOML structure using Tree
 - Mashaling and unmarshaling to and from data structures
 - Line & column position data for all parsed elements
 - Query support similar to JSON-Path
 - Syntax errors contain line and column numbers

Note that this package is separate from the existing golang-github-pelletier-toml. This package contains the v2 API, and it is necessary to build recent versions of Hugo (https://gohugo.io/).

Fedora Account System Username: mikep

Comment 1 Maxwell G 2021-12-26 22:14:18 UTC
You should generate this spec using go2rpm. You can do so by running `go2rpm -r github.com/pelletier/go-toml/v2 -f https://github.com/pelletier/go-toml`. Then, you should replace `Version:                2.0.0-beta.4` in the generated specfile with the following:

```
Version:                2.0.0~beta.4
%global tag             %(echo v%{version} | sed -e 's/~/-/')
```

This ensures that the version will sort correctly once upstream puts out the final release[1].

[1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning

Thanks,
Maxwell

Comment 3 Mikel Olasagasti Uranga 2022-03-09 22:56:53 UTC
The cmd's that are installed seem to be test apps, not sure if they're useful for the Fedora context:

/usr/bin/gotoml-test-decoder
/usr/bin/tomltestgen

Comment 4 Maxwell G 2022-03-12 18:25:49 UTC
The binaries conflict with golang-github-pelletier-toml. I'm NEEDINFO'ing the maintainer of that package to figure out how to proceed.

Besides that, this package looks alright.

Comment 5 W. Michael Petullo 2022-03-12 19:49:37 UTC
Go packages do not seem to have the discipline of C libraries. Hugo does indeed need some of the features of this newer version of this toml package, namely:

toml.DecodeError
x.AsTime

I guess the questions is how to package two revisions of a package API. I am not sure if all of the packages that rely on the existing toml package could use this version instead. It seems there are a few packages that depend on the existing toml package:

nf repoquery --whatrequires golang-github-pelletier-toml-devel
Last metadata expiration check: 0:02:00 ago on Sat 12 Mar 2022 01:46:17 PM CST.
containerd-devel-0:1.5.5-1.fc35.noarch
containerd-devel-0:1.6.0-1.fc35.noarch
golang-gitea-lunny-nodb-devel-0:0-0.3.20210111git3238c46.fc35.noarch
golang-github-astaxie-beego-devel-0:2.0.0~beta-3.20220206git093f976.fc35.noarch
golang-github-aws-sdk-2-devel-0:1.8.0-1.fc35.noarch
golang-github-containerd-stargz-snapshotter-devel-0:0.7.0-2.fc35.noarch
golang-github-gohugoio-hugo-devel-0:0.80.0-2.fc34.noarch
golang-github-gohugoio-hugo-devel-0:0.80.0-4.fc35.noarch
golang-github-gosidekick-goconfig-devel-0:1.3.0-2.fc35.noarch
golang-github-istio-viper-devel-0:1.3.2-3.20200908git8c945bc.fc35.noarch
golang-github-ledisdb-devel-0:0.6-3.20210112gitd35789e.fc35.noarch
golang-github-nicksnyder-i18n-devel-1:1.10.1-6.fc35.noarch
golang-github-peterbourgon-ff-3-devel-0:3.0.0-3.fc35.noarch
golang-github-peterbourgon-ff-3-devel-0:3.1.2-1.fc35.noarch
golang-github-spf13-viper-devel-0:1.10.1-1.fc35.noarch
golang-github-spf13-viper-devel-0:1.7.1-3.fc35.noarch
golang-mongodb-mongo-driver-devel-0:1.4.5-3.fc35.noarch

Comment 6 Maxwell G 2022-03-12 20:29:33 UTC
It's normal to have multiple versions of go libraries in Fedora. I'm just not sure how to handle the binaries. I suppose we could add `Conflicts: golang-github-pelletier-toml` to this package or not ship the binaries in one of the packages.

Comment 7 W. Michael Petullo 2022-03-12 22:10:24 UTC
Should I just remove the binaries? As you stated, they seem relevant only when compiling and testing the package.

Is it a problem that both packages own the directory /usr/share/gocode/src/github.com/pelletier/go-toml?

Comment 8 Maxwell G 2022-03-16 21:38:00 UTC
(In reply to W. Michael Petullo from comment #7)
> Should I just remove the binaries? As you stated, they seem relevant only
> when compiling and testing the package.

cmd/jsontoml cmd/tomljson cmd/tomll are indeed useful. I would recommend keeping those binaries and adding `Conflicts: golang-github-pelletier-toml` for now.

> Is it a problem that both packages own the directory
> /usr/share/gocode/src/github.com/pelletier/go-toml?

No, it shouldn't be.

Comment 9 W. Michael Petullo 2022-03-18 02:23:04 UTC
Spec URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2.spec
SRPM URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2-2.0.0~beta.5-1.fc35.src.rpm

I added the conflict statement suggested above.

Comment 10 Fabio Alessandro Locati 2022-04-06 17:23:08 UTC
I see no comments after last update.
I can step in to do the review if previous commenters are too busy

Comment 11 Maxwell G 2022-04-07 01:11:46 UTC
You should change `for cmd in cmd/* ; do` to `for cmd in cmd/{jsontoml,tomljson,tomll} ; do`. If Fabio wants to step in for the final review, that's fine with me.

Comment 12 W. Michael Petullo 2022-04-14 19:39:47 UTC
Spec URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2.spec
SRPM URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2-2.0.0~beta.8-1.fc35.src.rpm

Regenerated with go2rpm 1.6, revised the for statement as suggested above, and updated to beta8.

Comment 13 Fabio Alessandro Locati 2022-04-18 08:08:00 UTC
Hi,

Why did you put `for cmd in cmd/{gotoml-test-decoder,tomltestgen} ; do` instead of the suggested `for cmd in cmd/* ; do` to `for cmd in cmd/{jsontoml,tomljson,tomll} ; do`?

My understanding is that gotoml-test-decoder and tomltestgen are not useful for the regular Fedora user, since they are used to create tests and code, while jsontoml, tomljson, and tomll would be useful for the user.

Comment 14 W. Michael Petullo 2022-04-18 15:26:05 UTC
Spec URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2.spec
SRPM URL: https://www.flyn.org/SRPMS/golang-github-pelletier-toml-2-2.0.0~beta.8-1.fc35.src.rpm

I made a mistake regarding the for loop. This version handles jsontoml, tomljson, and tomll.

Comment 15 Fabio Alessandro Locati 2022-04-19 14:38:36 UTC
go2rpm package, fedora-review is correct:

- The specfile is sane.
- License is correct
- Builds successfully in mock
- No rpmlint errors
- %check section passes
- The latest version is packaged
- The package complies with the Packaging Guidelines.

Package approved! On import, don't forget to do the following:

- Add package to release-monitoring.org
- Add package to Koschei.
- Give go-sig privileges on package
- Close the review bug by referencing it in the rpm changelog and/or the Bodhi ticket. (rhbz#BUG_ID)

Thanks!

Comment 16 Gwyn Ciesla 2022-04-19 18:01:36 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/golang-github-pelletier-toml-2

Comment 17 Fedora Update System 2022-04-24 23:13:55 UTC
FEDORA-2022-3479d3a088 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3479d3a088

Comment 18 Fedora Update System 2022-04-24 23:16:51 UTC
FEDORA-2022-3479d3a088 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2022-04-24 23:25:04 UTC
FEDORA-2022-49648ecde5 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-49648ecde5

Comment 20 Fedora Update System 2022-04-24 23:36:22 UTC
FEDORA-2022-eeb810dce7 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-eeb810dce7

Comment 21 Fedora Update System 2022-04-25 07:52:38 UTC
FEDORA-2022-eeb810dce7 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-eeb810dce7 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-eeb810dce7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2022-04-25 08:23:21 UTC
FEDORA-2022-49648ecde5 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-49648ecde5 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-49648ecde5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2022-05-03 14:54:11 UTC
FEDORA-2022-49648ecde5 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2022-05-07 04:31:01 UTC
FEDORA-2022-eeb810dce7 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.