Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1534044

Summary: Review Request: golang-github-beevik-ntp - A simple ntp client written in go
Product: [Fedora] Fedora Reporter: Paul Gier <pgier>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, spasquie, 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: 2018-05-02 16:04:32 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: 1512702    

Comment 1 Robert-André Mauchin 🐧 2018-01-14 20:03:17 UTC
- If you package a release, you don't need git snapshot info in the Release field:

Release:        1%{?dist}

   And:

* Fri Jan 12 2018 Paul Gier <pgier> - 0.2.0-1

 - Grab the correct release archive:

Source0:        https://%{provider_prefix}/archive/v%{version}/%{repo}-%{version}.tar.gz

   And in %prep:

%setup -q -n %{repo}-%{version}

 - Why did you remove all BR and R to golang(golang.org/x/net/ipv4)? They are needed.

Comment 2 Paul Gier 2018-04-20 23:12:01 UTC
I updated the spec file based on the comments, and there is a new build in koji:
https://koji.fedoraproject.org/koji/taskinfo?taskID=26474830

The only change I didn't make is that I left out the Requires golang(golang.org/x/net/ipv4), because this dependency is not needed at runtime.  Any golang apps using this library should compile the code directly into the binary.

Comment 3 Robert-André Mauchin 🐧 2018-04-21 16:07:16 UTC
If you intend to target F28 and above only, I'd recommend to upgrade to the new Go guidelines: https://fedoraproject.org/wiki/More_Go_packaging

I have a bunch of examples to inspire you from: https://eclipseo.fedorapeople.org/golang/

Comment 4 Paul Gier 2018-04-23 20:30:27 UTC
The new Go guidelines seem much improved, thanks!
I have uploaded the spec, sources, and srpm to fedorapeople.org:
https://pgier.fedorapeople.org/golang/golang-github-beevik-ntp/

And a new scratch build is here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=26521932

Comment 5 Robert-André Mauchin 🐧 2018-04-25 15:14:02 UTC
 - Split the description to stay below 80 characters per line:

%global common_description %{expand:
The ntp package is an implementation of a Simple NTP (SNTP) client based on RFC5905. It allows you to connect to a remote NTP server and request information about the current time.}

 - Since you're packaging a Release, you should not use %global commit, which is for dev snapshot, but instead move the Version: field before the %gometa macro:


%global goipath         github.com/beevik/ntp
Version:                0.2.0

%global common_description %{expand:
The ntp package is an implementation of a Simple NTP (SNTP) client based on 
RFC5905. It allows you to connect to a remote NTP server and request 
information about the current time.}

%gometa

Name:           %{goname}
Release:        1%{?dist}
Summary:        A simple NTP client written in Go
License:        BSD
URL:            %{gourl}
Source0:        %{gosource}

   That way %gometa will use the version info in lieu of the commit to gather the Source.
a

- Don't assign the bug to yourself, the assignee should be the Reviewer, i.e, me, but I let the bug as New / unassigned so that it stay visible in the Review request list and visible for a potential sponsor. (I can't sponsor, you should trx to find one by introducing yourself to the fedora devel mailing list)

Comment 6 Robert-André Mauchin 🐧 2018-04-25 15:54:34 UTC
I don't know why I thought you needed a sponsor, but you're already a member of the packager group. I'll finish you review ASAP.


 - Fix the line encodings for this file (with sed "s|\r||g"):

golang-github-beevik-ntp-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/golang-github-beevik-ntp-devel/README.md


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD (2 clause)", "Unknown or generated". 6 files have unknown
     license. Detailed output of licensecheck in /home/bob/packaging/review
     /golang-github-beevik-ntp/review-golang-github-beevik-
     ntp/licensecheck.txt
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/gocode/src,
     /usr/share/gocode
[x]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by:
     /usr/share/gocode/src/github.com(golang)
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: golang-github-beevik-ntp-devel-0.2.0-1.fc29.noarch.rpm
          golang-github-beevik-ntp-0.2.0-1.fc29.src.rpm
golang-github-beevik-ntp-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/golang-github-beevik-ntp-devel/README.md
golang-github-beevik-ntp-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/beevik/ntp/.goipath
golang-github-beevik-ntp-devel.noarch: E: zero-length /usr/share/gocode/src/github.com/beevik/ntp/.goipath
golang-github-beevik-ntp-devel.noarch: W: wrong-file-end-of-line-encoding /usr/share/gocode/src/github.com/beevik/ntp/README.md
golang-github-beevik-ntp.src: W: no-%build-section
2 packages and 0 specfiles checked; 1 errors, 4 warnings.

Comment 7 Paul Gier 2018-04-25 21:10:02 UTC
Ok, I made the updates and submitted a new koji scratch build.
https://koji.fedoraproject.org/koji/taskinfo?taskID=26561526

Comment 8 Robert-André Mauchin 🐧 2018-04-25 21:43:14 UTC
Ok, package approved.

Comment 9 Paul Gier 2018-05-01 16:08:42 UTC
SCM repo request: https://pagure.io/releng/fedora-scm-requests/issue/6402

Comment 10 Gwyn Ciesla 2018-05-01 16:29:09 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/golang-github-beevik-ntp