Bug 1700438

Summary: Review Request: yq - a lightweight and portable command-line YAML processor
Product: [Fedora] Fedora Reporter: bndabbs
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: avi.kivity, dustymabe, eclipseo, package-review
Target Milestone: ---   
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: 2019-06-17 13:30:04 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: 177841    

Description bndabbs 2019-04-16 14:51:43 UTC
Spec URL: https://copr-be.cloud.fedoraproject.org/results/bndabbs/rocknsm-devel_brad/epel-7-x86_64/00884063-yq/yq.spec

SRPM URL: https://copr-be.cloud.fedoraproject.org/results/bndabbs/rocknsm-devel_brad/epel-7-x86_64/00884063-yq/yq-2.3.0-1.el7.src.rpm

Description: I am maintainer for an open source project called RockNSM (https://github.com/rocknsm/rock) and we currently rely on a Go application called yq (https://github.com/mikefarah/yq) to edit YAML files through a whiptail TUI. At the moment, we are packaging yq as an RPM ourselves, but I would love to bring it into EPEL to make it more available to everyone else. The author for yq already publishes packages for Ubuntu and Homebrew, so having an official package for Red Hat flavored systems would really round things out.

I understand that I will need a sponsor in order to become a maintainer for this package. You can see some of my contributions to RPM development, here: https://github.com/rocknsm/rpms.
 

Fedora Account System Username: bndabbs

Comment 1 Robert-André Mauchin 🐧 2019-04-20 22:10:19 UTC
 - Not needed:

rm -rf %{buildroot}

 - No, you don't have access to Internet in mock/koji, this will never work:

# Get go dependencies
go get -u github.com/kardianos/govendor
go install github.com/kardianos/govendor

 Instead package the deps first then BR them:

BuildRequires: golang(import path)

 - You should use the Go macros loosely defined in https://fedoraproject.org/wiki/More_Go_packaging
 Note that we are in the process of rewriting them for F31 (https://eclipseo.fedorapeople.org/guidelines/packaging-guidelines/Golang/ )

# Generated by go2rpm
%bcond_without check

# https://github.com/mikefarah/yq
%global goipath         github.com/mikefarah/yq
Version:                2.3.0

%gometa

%global common_description %{expand:
Yq is a portable command-line yaml processor.}

Name:           yq
Release:        1%{?dist}
Summary:        Portable command-line yaml processor

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(github.com/pkg/errors)
BuildRequires:  golang(gopkg.in/imdario/mergo.v0)
BuildRequires:  golang(gopkg.in/mikefarah/yaml.v2)
BuildRequires:  golang(gopkg.in/op/go-logging.v1)
BuildRequires:  golang(gopkg.in/spf13/cobra.v0)

%description
%{common_description}

%package devel
Summary:       %{summary}
BuildArch:     noarch

%description devel
%{common_description}

This package contains library source intended for
building other packages which use import path with
%{goipath} prefix.

%prep
%forgeautosetup -p1

%build
%gobuildroot
%gobuild -o _bin/yq %{goipath}

%install
%goinstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp _bin/*              %{buildroot}%{_bindir}/

%if %{with check}
%check
%gochecks
%endif

%files
%license LICENSE
%doc docs examples README.md
%{_bindir}/*

%changelog
* Mon Mar 25 2019 Bradford Dabbs <brad> - 2.3.0-1
- Initial package

Comment 2 Dusty Mabe 2019-11-19 22:17:47 UTC
hey bndabbs you closed this. Do you still want it in fedora? I'd like to have it in Fedora too.

Comment 3 bndabbs 2019-11-19 22:21:35 UTC
(In reply to Dusty Mabe from comment #2)
> hey bndabbs you closed this. Do you still want it in fedora? I'd like to
> have it in Fedora too.

It would be great to have it in Fedora. I just didn't have to time to be a maintainer for it due to some changes in my full-time role.

Comment 4 bndabbs 2019-11-19 22:21:55 UTC
(In reply to Dusty Mabe from comment #2)
> hey bndabbs you closed this. Do you still want it in fedora? I'd like to
> have it in Fedora too.

It would be great to have it in Fedora. I just didn't have to time to be a maintainer for it due to some changes in my full-time role.