Bug 2031583

Summary: Review Request: golang-github-gohugoio-go-i18n - Go tools for translating Go programs into multiple languages
Product: [Fedora] Fedora Reporter: W. Michael Petullo <mike>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: me, package-review, zebob.m
Target Milestone: ---Flags: zebob.m: 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: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description W. Michael Petullo 2021-12-13 02:21:31 UTC
Spec URL: https://www.flyn.org/SRPMS/golang-github-gohugoio-i18n.spec
SRPM URL: https://www.flyn.org/SRPMS/golang-github-gohugoio-i18n-2.1.3-1.fc35.src.rpm
Description: A Go package and a command that helps you translate Go programs into multiple languages.

This package is required to build the recent releases of Hugo.

Fedora Account System Username: mikep

Comment 1 Fabio Alessandro Locati 2022-04-06 17:33:53 UTC
I do not see version 2.1.3 from upstream, the latest I see is 2.1.2.

I would suggest basing this package on the latest commit, since the tagged version is of the previous path

Comment 2 Package Review 2023-08-03 00:45:33 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time. We're sorry
it is taking so long. If you're still interested in packaging this software
into Fedora repositories, please respond to this comment clearing the
NEEDINFO flag.

You may want to update the specfile and the src.rpm to the latest version
available and to propose a review swap on Fedora devel mailing list to increase
chances to have your package reviewed. If this is your first package and you
need a sponsor, you may want to post some informal reviews. Read more at
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group.

Without any reply, this request will shortly be considered abandoned
and will be closed.
Thank you for your patience.

Comment 3 Robert-André Mauchin 🐧 2023-08-05 07:50:21 UTC
 - Version 2.1.3 doesn't exist anymore, just go with 2.1.2

 - the patch is not needed, just fix the import path of the fork:

sed -i "s|github.com/nicksnyder/go-i18n|github.com/gohugoio/go-i18n|" $(find . -iname "*.go" -type f)

 - a test fails with a recent version of Go, it has been fixed upstream, let's backport the patch :

# https://github.com/gohugoio/hugo/issues/11336
Patch:          https://github.com/nicksnyder/go-i18n/commit/dadad2bdb2a713748df0717eddd54495150cfb58.patch

I sent a bug report upstream for them to backport the upstream changes.

 - update the spec with latest go2rpm + fix some stuff:


# Generated by go2rpm 1.9.0
%bcond_without check
%global debug_package %{nil}

# https://github.com/gohugoio/go-i18n
%global goipath         github.com/gohugoio/go-i18n
Version:                2.1.2

%gometa -f

%global common_description %{expand:
A Go package and a command that helps you translate Go programs into multiple
languages.}

%global golicenses    LICENSE

Name:           %{goname}
Release:        %autorelease
Summary:        Go tools for translating Go programs into multiple languages

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}
# https://github.com/gohugoio/hugo/issues/11336
Patch:          https://github.com/nicksnyder/go-i18n/commit/dadad2bdb2a713748df0717eddd54495150cfb58.patch

%description %{common_description}

%gopkg

%prep
%goprep
%autopatch -p1
sed -i "s|github.com/nicksnyder/go-i18n|github.com/gohugoio/go-i18n|" $(find . -iname "*.go" -type f)

%generate_buildrequires
%go_generate_buildrequires


%install
%gopkginstall

%check
%gocheck

%gopkgfiles


%changelog
%autochangelog


The following review was conducted on my update:

 - License ok
 - Latest version packaged
 - Builds in mock
 - Checks pass
 - No rpmlint errors
 - Conforms to Go Packaging Guidelines


Please check what I said above and I'll approve.

Comment 4 Robert-André Mauchin 🐧 2023-08-05 07:52:10 UTC
Actually let me correct that:

# Generated by go2rpm 1.9.0
%bcond_without check
%global debug_package %{nil}

# https://github.com/gohugoio/go-i18n
%global goipath         github.com/gohugoio/go-i18n
Version:                2.1.2
%global commit          4c28c89f8013a686b0ef5a0ebcb063a586a3ba7f

%gometa -f

%global common_description %{expand:
A Go package and a command that helps you translate Go programs into multiple languages.}

%global golicenses    LICENSE

Name:           %{goname}
Release:        %autorelease
Summary:        Go tools for translating Go programs into multiple languages

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}
# https://github.com/gohugoio/hugo/issues/11336
Patch:          https://github.com/nicksnyder/go-i18n/commit/dadad2bdb2a713748df0717eddd54495150cfb58.patch

%description %{common_description}

%gopkg

%prep
%goprep
%autopatch -p1
sed -i "s|github.com/nicksnyder/go-i18n|github.com/gohugoio/go-i18n|" $(find . -iname "*.go" -type f)

%generate_buildrequires
%go_generate_buildrequires


%install
%gopkginstall

%check
%gocheck

%gopkgfiles


%changelog
%autochangelog

Comment 5 W. Michael Petullo 2023-08-11 04:43:26 UTC
Spec URL: https://www.flyn.org/SRPMS/golang-github-gohugoio-i18n.spec
SRPM URL: https://www.flyn.org/SRPMS/golang-github-gohugoio-i18n-2.1.2-1.fc38.src.rpm
Description: A Go package and a command that helps you translate Go programs into multiple languages.

This package is required to build the recent releases of Hugo.

Fedora Account System Username: mikep

This revision uses the specification file from comment #4, except I dropped the commit definition to use the tag tarball.