Bug 1773719 - Review Request: golang-github-haproxytech-client-native - Go client for HAProxy configuration and runtime API
Summary: Review Request: golang-github-haproxytech-client-native - Go client for HAPro...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ryan O'Hara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1773717 1773718
Blocks: FE-NEEDSPONSOR 1773720
TreeView+ depends on / blocked
 
Reported: 2019-11-18 19:23 UTC by Brandon Perkins
Modified: 2020-06-05 15:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-05 15:29:41 UTC
Type: ---
Embargoed:
rohara: fedora-review+


Attachments (Terms of Use)

Description Brandon Perkins 2019-11-18 19:23:46 UTC
Spec URL: https://github.com/bdperkin/haproxytech/blob/master/SPECS/golang-github-haproxytech-client-native.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/bdperkin/haproxytech/fedora-31-x86_64/01093804-golang-github-haproxytech-client-native/golang-github-haproxytech-client-native-1.2.6-1.fc31.src.rpm
Description: HAProxy Native Client is a client that exposes methods for reading and changing HAProxy configuration files, and executing commands and parsing the output of the HAProxy Runtime API (via unix socket, AKA stats socket in HAProxy). It uses the models package to shift data around.

Fedora Account System Username: bdperkin
Note: These are my first packages and I need a sponsor.  The packages include: golang-github-gehirninc-crypt, golang-github-haproxytech-models, golang-github-haproxytech-config-parser, golang-github-haproxytech-client-native, and golang-github-haproxytech-dataplaneapi.
Successful copr build: https://copr.fedorainfracloud.org/coprs/bdperkin/haproxytech/build/1093804/

Comment 1 Ryan O'Hara 2019-11-20 20:13:52 UTC
Package Review
==============

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/


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

Generic:
[ ]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: There is no build directory. Running licensecheck on vanilla
     upstream sources. Licenses found: "Unknown or generated". 1 files have
     unknown license. Detailed output of licensecheck in /home/rohara/copr-
     build-1093804/review-golang-github-haproxytech-client-
     native/licensecheck.txt
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: Sources contain only permissible code or content.
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: 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 1 files.
[ ]: Package complies to the Packaging Guidelines
[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 must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[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 must not depend on deprecated() packages.
[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:
[!]: Reviewer should test that the package builds in mock.
[ ]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[ ]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[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]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint
[x]: Spec file according to URL is the same as in SRPM.


Installation errors
-------------------
INFO: mock.py version 1.4.21 starting (python version = 3.7.5)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.21
INFO: Mock Version: 1.4.21
Finish: chroot init
INFO: installing package(s): /home/rohara/copr-build-1093804/golang-github-haproxytech-client-native-devel-1.2.6-1.fc32.noarch.rpm
ERROR: Command failed:
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 32 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk install /home/rohara/copr-build-1093804/golang-github-haproxyte\
ch-client-native-devel-1.2.6-1.fc32.noarch.rpm --setopt=tsflags=nocontexts



Rpmlint
-------
Checking: golang-github-haproxytech-client-native-devel-1.2.6-1.fc32.noarch.rpm
          golang-github-haproxytech-client-native-1.2.6-1.fc32.src.rpm
golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath
golang-github-haproxytech-client-native.src: W: no-%build-section
2 packages and 0 specfiles checked; 0 errors, 2 warnings.




Source checksums
----------------
https://github.com/haproxytech/client-native/archive/v1.2.6/client-native-1.2.6.tar.gz :
  CHECKSUM(SHA256) this package     : 3ff941f973eeaf6f6089ae961318194f0adda75f9e9b330c060c172aae2ec2a2
  CHECKSUM(SHA256) upstream package : 3ff941f973eeaf6f6089ae961318194f0adda75f9e9b330c060c172aae2ec2a2


Requires
--------
golang-github-haproxytech-client-native-devel (rpmlib, GLIBC filtered):
    go-filesystem
    golang(github.com/go-openapi/errors)
    golang(github.com/go-openapi/strfmt)
    golang(github.com/google/uuid)
    golang(github.com/haproxytech/config-parser)
    golang(github.com/haproxytech/config-parser/common)
    golang(github.com/haproxytech/config-parser/errors)
    golang(github.com/haproxytech/config-parser/params)
    golang(github.com/haproxytech/config-parser/parsers/filters)
    golang(github.com/haproxytech/config-parser/parsers/http/actions)
    golang(github.com/haproxytech/config-parser/parsers/tcp/actions)
    golang(github.com/haproxytech/config-parser/types)
    golang(github.com/haproxytech/models)
    golang(github.com/mitchellh/mapstructure)
    golang(github.com/pkg/errors)



Provides
--------
golang-github-haproxytech-client-native-devel:
    golang(github.com/haproxytech/client-native)
    golang(github.com/haproxytech/client-native/configuration)
    golang(github.com/haproxytech/client-native/misc)
    golang(github.com/haproxytech/client-native/runtime)
    golang-github-haproxytech-client-native-devel
    golang-ipath(github.com/haproxytech/client-native)



Generated by fedora-review 0.7.3 (44b83c7) last change: 2019-09-18
Command line :/usr/bin/fedora-review --copr-build 1093804
Buildroot used: fedora-rawhide-{{ target_arch }}
Active plugins: Shell-api, Generic
Disabled plugins: Python, Haskell, PHP, fonts, Perl, R, C/C++, Ocaml, SugarActivity, Java
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 2 Brandon Perkins 2019-11-21 13:33:32 UTC
# golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath

Nothing to worry about, all go devel packages have this in /usr/share/gocode/src/*/*/*/.goipath


# golang-github-haproxytech-client-native.src: W: no-%build-section

Added in: https://github.com/bdperkin/haproxytech/commit/cb4476b58a85b16eb068e58f06fd68fa7dfae13d


# Build failure

Likely due to missing BuildRequires:

golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/common)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/errors)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/params)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/parsers/filters)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/parsers/http/actions)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/parsers/tcp/actions)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/config-parser/types)
golang-github-haproxytech-client-native.spec:BuildRequires:  golang(github.com/haproxytech/models)

Comment 3 Brandon Perkins 2019-11-21 14:35:31 UTC
Turns out that a %build section breaks the go macros, as a result, I've reverted the change that made rpmlint happy: https://github.com/bdperkin/haproxytech/commit/6361a781c2f51ae9c11c317fd9cf4445e116cd7f

Comment 4 Brandon Perkins 2019-11-21 15:03:03 UTC
========================== golang-github-haproxytech-client-native-1.2.6-1.fc31.src.rpm ==========================
golang-github-haproxytech-client-native.src: W: no-%build-section
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

########################## golang-github-haproxytech-client-native ##########################
========================== golang-github-haproxytech-client-native-devel ==========================
golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

Copr build tested: https://copr.fedorainfracloud.org/coprs/bdperkin/haproxytech/build/1114122/

Comment 5 Brandon Perkins 2020-03-03 15:42:49 UTC
Spec URL: https://raw.githubusercontent.com/bdperkin/haproxytech/master/SPECS/golang-github-haproxytech-client-native.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01281735-golang-github-haproxytech-client-native/golang-github-haproxytech-client-native-1.2.6-2.fc31.src.rpm
Successful copr build: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01281735-golang-github-haproxytech-client-native/

Changelog:
* Mon Mar 02 2020 Brandon Perkins <bperkins> - 1.2.6-2
- Clean changelog

* Wed Nov 13 2019 Brandon Perkins <bperkins> - 1.2.6-1
- Initial package



RPM Lint:
golang-github-haproxytech-client-native.src: W: no-%build-section
golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

Comment 6 Brandon Perkins 2020-03-04 20:29:48 UTC
Trying to get ahead of any issues, I went through the fedora-review report for all five packages as they exist now and provided comments where needed:

> Issues:
> =======
> - Package does not contain duplicates in %files.
>   Note: warning: File listed twice: /usr/share/doc/golang-github-
>   haproxytech-client-native-devel/README.md
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_duplicate_files

This appears to be an issue in the %godevelfiles macro in /usr/lib/rpm/macros.d/macros.go-srpm.  However, it does not appear it is something that I can override.

> 
> 
> ===== MUST items =====
> 
> Generic:
> [ ]: Package is licensed with an open-source compatible license and meets
>      other legal requirements as defined in the legal section of Packaging
>      Guidelines.

$ rpm -q --queryformat="%{NAME}: %{LICENSE}\n" RPMS/golang-github-haproxytech-client-native-devel-1.2.6-2.fc31.noarch.rpm SRPMS/golang-github-haproxytech-client-native-1.2.6-2.fc31.src.rpm
golang-github-haproxytech-client-native-devel: ASL 2.0
golang-github-haproxytech-client-native: ASL 2.0


> [ ]: License field in the package spec file matches the actual license.
>      Note: There is no build directory. Running licensecheck on vanilla
>      upstream sources. Licenses found: "Unknown or generated". 1 files have
>      unknown license. Detailed output of licensecheck in
>      ~/git/haproxytech/1773719-golang-github-haproxytech-
>      client-native/licensecheck.txt


Unknown or generated
--------------------
~/git/haproxytech/1773719-golang-github-haproxytech-client-native/upstream-unpacked/Source0/client-native-1.2.6.tar.gz

$ rpm -qpL RPMS/golang-github-haproxytech-client-native-devel-1.2.6-2.fc31.noarch.rpm 
/usr/share/licenses/golang-github-haproxytech-client-native-devel/LICENSE
$ tar -tf 1773719-golang-github-haproxytech-client-native/upstream-unpacked/Source0/client-native-1.2.6.tar.gz | grep /LICENSE$
client-native-1.2.6/LICENSE
$ tar -xvzf 1773719-golang-github-haproxytech-client-native/upstream-unpacked/Source0/client-native-1.2.6.tar.gz client-native-1.2.6/LICENSE
client-native-1.2.6/LICENSE
$ rpm -qp --queryformat="%{NAME}: %{LICENSE}\n" RPMS/golang-github-haproxytech-client-native-devel-1.2.6-2.fc31.noarch.rpm
golang-github-haproxytech-client-native-devel: ASL 2.0
$ licensecheck client-native-1.2.6/LICENSE
client-native-1.2.6/LICENSE: *No copyright* Apache License (v2.0)
$ grep '^# Upstream license specification: ' 1773719-golang-github-haproxytech-client-native/srpm-unpacked/golang-github-haproxytech-client-native.spec 
# Upstream license specification: Apache-2.0


> [ ]: Package does not own files or directories owned by other packages.
>      Note: Dirs in package are owned also by:

<snip/>

This is an issue across all 'golang-github' packages.  In reality, the '/usr/share/gocode/src/github.com' directory should only be owned by the 'golang' package itself:

$ rpm -qf /usr/share/gocode/src/github.com
golang-1.13.6-1.fc31.x86_64


> [ ]: %build honors applicable compiler flags or justifies otherwise.

Not Applicable as there is no %build section:

$ grep -A7 ^%build SPECS/golang-github-haproxytech-client-native.spec


> [ ]: Package contains no bundled libraries without FPC exception.

None:

$ rpm -qp --provides RPMS/golang-github-haproxytech-client-native-devel-1.2.6-2.fc31.noarch.rpm | grep bundled


> [ ]: Changelog in prescribed format.

Should all be fixed now.

> [ ]: Sources contain only permissible code or content.

Yes.

> [ ]: Package contains desktop file if it is a GUI application.

Not Applicable.

> [ ]: Development files must be in a -devel package

RPMS/golang-github-haproxytech-client-native-devel-1.2.6-2.fc31.noarch.rpm


> [ ]: Package uses nothing in %doc for runtime.

None:

golang-github-haproxytech-client-native-devel:
/usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
/usr/share/gocode/src/github.com/haproxytech/client-native/README.md
/usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md



> [ ]: Package consistently uses macros (instead of hard-coded directory
>      names).

Yes.

> [ ]: Package is named according to the Package Naming Guidelines.

Yes.

> [ ]: Package does not generate any conflict.

None.

> [ ]: Package obeys FHS, except libexecdir and /usr/target.

Yes.

> [ ]: If the package is a rename of another package, proper Obsoletes and
>      Provides are present.

Not Applicable.

> [ ]: Requires correct, justified where necessary.

Yes:

golang-github-haproxytech-client-native-devel:
go-filesystem
golang(github.com/go-openapi/errors)
golang(github.com/go-openapi/strfmt)
golang(github.com/google/uuid)
golang(github.com/haproxytech/config-parser)
golang(github.com/haproxytech/config-parser/common)
golang(github.com/haproxytech/config-parser/errors)
golang(github.com/haproxytech/config-parser/params)
golang(github.com/haproxytech/config-parser/parsers/filters)
golang(github.com/haproxytech/config-parser/parsers/http/actions)
golang(github.com/haproxytech/config-parser/parsers/tcp/actions)
golang(github.com/haproxytech/config-parser/types)
golang(github.com/haproxytech/models)
golang(github.com/mitchellh/mapstructure)
golang(github.com/pkg/errors)



> [ ]: Spec file is legible and written in American English.

Yes.

> [ ]: Package contains systemd file(s) if in need.

Not Applicable.

> [ ]: Package is not known to require an ExcludeArch tag.

ExcludeArch tag not required.

> [ ]: Large documentation must go in a -doc subpackage. Large could be size
>      (~1MB) or number of files.
>      Note: Documentation size is 10240 bytes in 1 files.

Not needed as 10240 bytes is less than 1MB.

> [ ]: Package complies to the Packaging Guidelines

Yes.

> [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 must own all directories that it creates.
> [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]: Permissions on files are set properly.
> [x]: Package must not depend on deprecated() packages.
> [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.

Good.

> [ ]: Final provides and requires are sane (see attachments).

Good.

> [ ]: Package functions as described.

Yes.

> [ ]: Latest version is packaged.

Yes.

> [ ]: Package does not include license text files separate from upstream.

No additional license text files.

> [ ]: Sources are verified with gpgverify first in %prep if upstream
>      publishes signatures.
>      Note: gpgverify is not used.

Not available.

> [ ]: Description and summary sections in the package spec file contains
>      translations for supported Non-English languages, if available.

Not available.

> [ ]: %check is present and all tests pass.

Yes:

$ grep -B1 -A3 -E "(^%check| check$)" SPECS/golang-github-haproxytech-client-native.spec
%bcond_without check

# https://github.com/haproxytech/client-native
%global goipath         github.com/haproxytech/client-native
--
%if %{with check}
%check
%gocheck
%endif



> [ ]: Packages should try to preserve timestamps of original installed
>      files.

Good:

$ date ; LANG=C.utf8 mock -q -r fedora-rawhide-x86_64 --no-bootstrap-chroot --no-cleanup-after --no-clean --enable-network --chroot -- "ls -ld \$(rpm -qL golang-github-haproxytech-client-native-devel)"
Wed 04 Mar 2020 02:50:22 PM EST
-rw-r--r--. 1 root root 10173 Oct  9 09:28 /usr/share/licenses/golang-github-haproxytech-client-native-devel/LICENSE


> [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-haproxytech-client-native-devel-1.2.6-2.fc33.noarch.rpm
>           golang-github-haproxytech-client-native-1.2.6-2.fc33.src.rpm
> golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath

Expected.

> golang-github-haproxytech-client-native.src: W: no-%build-section

%build section not needed for '-devel' packages.

> 2 packages and 0 specfiles checked; 0 errors, 2 warnings.
> 
> 
> 
> 
> Rpmlint (installed packages)
> ----------------------------
> golang-github-haproxytech-client-native-devel.noarch: W: invalid-url URL: https://github.com/haproxytech/client-native <urlopen error [Errno -2] Name or service not known>
> golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath
> 1 packages and 0 specfiles checked; 0 errors, 2 warnings.
>

$ sudo mkdir -p /var/lib/mock/fedora-rawhide-x86_64/root/root/.config
$ echo "addFilter(r\"hidden-file-or-dir /usr/share/gocode/src/github\.com/.*/.*/.goipath$\")" > /tmp/rpmlint.config
$ sudo cp /tmp/rpmlint.config /var/lib/mock/fedora-rawhide-x86_64/root/root/.config/rpmlint
$ LANG=C.utf8 mock -q -r fedora-rawhide-x86_64 --no-bootstrap-chroot --no-cleanup-after --no-clean --enable-network --chroot -- rpmlint -f /root/.config/rpmlint golang-github-haproxytech-client-native-devel
1 packages and 0 specfiles checked; 0 errors, 0 warnings.


> 
> 
> Source checksums
> ----------------
> https://github.com/haproxytech/client-native/archive/v1.2.6/client-native-1.2.6.tar.gz :
>   CHECKSUM(SHA256) this package     : 3ff941f973eeaf6f6089ae961318194f0adda75f9e9b330c060c172aae2ec2a2
>   CHECKSUM(SHA256) upstream package : 3ff941f973eeaf6f6089ae961318194f0adda75f9e9b330c060c172aae2ec2a2
> 
> 
> Requires
> --------
> golang-github-haproxytech-client-native-devel (rpmlib, GLIBC filtered):
>     go-filesystem
>     golang(github.com/go-openapi/errors)
>     golang(github.com/go-openapi/strfmt)
>     golang(github.com/google/uuid)
>     golang(github.com/haproxytech/config-parser)
>     golang(github.com/haproxytech/config-parser/common)
>     golang(github.com/haproxytech/config-parser/errors)
>     golang(github.com/haproxytech/config-parser/params)
>     golang(github.com/haproxytech/config-parser/parsers/filters)
>     golang(github.com/haproxytech/config-parser/parsers/http/actions)
>     golang(github.com/haproxytech/config-parser/parsers/tcp/actions)
>     golang(github.com/haproxytech/config-parser/types)
>     golang(github.com/haproxytech/models)
>     golang(github.com/mitchellh/mapstructure)
>     golang(github.com/pkg/errors)
> 
> 
> 
> Provides
> --------
> golang-github-haproxytech-client-native-devel:
>     golang(github.com/haproxytech/client-native)
>     golang(github.com/haproxytech/client-native/configuration)
>     golang(github.com/haproxytech/client-native/misc)
>     golang(github.com/haproxytech/client-native/runtime)
>     golang-github-haproxytech-client-native-devel
>     golang-ipath(github.com/haproxytech/client-native)
> 
> 
> 
> Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
> Command line :/usr/bin/fedora-review -b 1773719 -L ~/git/haproxytech/RPMS -v
> Buildroot used: fedora-rawhide-x86_64
> Active plugins: Generic, Shell-api
> Disabled plugins: C/C++, Ocaml, R, Haskell, Perl, SugarActivity, Java, PHP, Python, fonts
> Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
> 
> Built with local dependencies:
>     ~/git/haproxytech/RPMS/golang-github-gehirninc-crypt-devel-0-0.2.20200214git6c0105a.fc31.noarch.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-client-native-devel-1.2.6-2.fc31.noarch.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-config-parser-devel-1.2.0-1.fc31.noarch.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-dataplaneapi-1.2.4-5.fc31.x86_64.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-dataplaneapi-debuginfo-1.2.4-5.fc31.x86_64.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-dataplaneapi-debugsource-1.2.4-5.fc31.x86_64.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-dataplaneapi-devel-1.2.4-5.fc31.noarch.rpm
>     ~/git/haproxytech/RPMS/golang-github-haproxytech-models-devel-1.2.4-2.fc31.noarch.rpm

Comment 7 Ryan O'Hara 2020-04-13 18:13:42 UTC
Package Review
==============

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


Issues:
=======
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/share/doc/golang-github-
  haproxytech-client-native-devel/README.md
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files

- I don't quite understand this because the files aren't really listed in the spec file, but rather wee use %gopkgfiles. Also note that this did not happen with any of the other Go pacakges we are reviewing as part of the haproxy dataplaneapi. This is interesting, though:

# rpm -q --filesbypkg golang-github-haproxytech-client-native-devel-1.2.6-2.fc33.noarch.rpm | grep README
golang-github-haproxytech-client-native-devel /usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
golang-github-haproxytech-client-native-devel /usr/share/gocode/src/github.com/haproxytech/client-native/README.md
golang-github-haproxytech-client-native-devel /usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md


# md5sum usr/share/doc/golang-github-haproxytech-client-native-devel/README.md usr/share/gocode/src/github.com/haproxytech/client-native/README usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md
0a47f2b62cb73f6f84520d404d44f9e2  usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
0173e68acc6998d347f71ae13122390d  usr/share/gocode/src/github.com/haproxytech/client-native/README.md
0a47f2b62cb73f6f84520d404d44f9e2  usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md

So two of these files are identical, installed in different directories. If you look at github.com, you can see this README.md is duplicated in the git repo, too. Perhaps the easiest was to fix this is to ask upstream to remove one of the files?

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

Generic:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.

- ASL 2.0

[ ]: License field in the package spec file matches the actual license.
     Note: There is no build directory. Running licensecheck on vanilla
     upstream sources. Licenses found: "Unknown or generated". 1 files have
     unknown license. Detailed output of licensecheck in
     /home/rohara/1773719-golang-github-haproxytech-client-
     native/licensecheck.txt

- The source contains LICENSE file containig Apache License 2.0.

[ ]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by:

- This seems like an issue with all Go modules, as mentioned above.

[ ]: %build honors applicable compiler flags or justifies otherwise.

- No %build here.

[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.

- All good.

[ ]: Sources contain only permissible code or content.
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: 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 1 files.
[ ]: Package complies to the Packaging Guidelines

- All good.

[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 must own all directories that it creates.
[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]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[ ]: 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.
[ ]: Packages should try to preserve timestamps of original installed
     files.

- No issues above. Latest version is packaged, should be -devel package only (no binaries), and there is no upstream gpg key to use for verify.

[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-haproxytech-client-native-devel-1.2.6-2.fc33.noarch.rpm
          golang-github-haproxytech-client-native-1.2.6-2.fc33.src.rpm
golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath
golang-github-haproxytech-client-native.src: W: no-%build-section
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

- The .goipath hidden files seems to be unavoidable for Go packages.


Rpmlint (installed packages)
----------------------------
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "C.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "C.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
golang-github-haproxytech-client-native-devel.noarch: W: invalid-url URL: https://github.com/haproxytech/client-native <urlopen error [Errno -2] Name or service not known>
golang-github-haproxytech-client-native-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/haproxytech/client-native/.goipath
1 packages and 0 specfiles checked; 0 errors, 2 warnings.



Source checksums
----------------
https://github.com/haproxytech/client-native/archive/v1.2.6/client-native-1.2.6.tar.gz :
  CHECKSUM(SHA256) this package     : 3ff941f973eeaf6f6089ae961318194f0adda75f9e9b330c060c172aae2ec2a2
  CHECKSUM(SHA256) upstream package : 3ff941f973eeaf6f6089ae961318194f0adda75f9e9b330c060c172aae2ec2a2


Requires
--------
golang-github-haproxytech-client-native-devel (rpmlib, GLIBC filtered):
    go-filesystem
    golang(github.com/go-openapi/errors)
    golang(github.com/go-openapi/strfmt)
    golang(github.com/google/uuid)
    golang(github.com/haproxytech/config-parser)
    golang(github.com/haproxytech/config-parser/common)
    golang(github.com/haproxytech/config-parser/errors)
    golang(github.com/haproxytech/config-parser/params)
    golang(github.com/haproxytech/config-parser/parsers/filters)
    golang(github.com/haproxytech/config-parser/parsers/http/actions)
    golang(github.com/haproxytech/config-parser/parsers/tcp/actions)
    golang(github.com/haproxytech/config-parser/types)
    golang(github.com/haproxytech/models)
    golang(github.com/mitchellh/mapstructure)
    golang(github.com/pkg/errors)



Provides
--------
golang-github-haproxytech-client-native-devel:
    golang(github.com/haproxytech/client-native)
    golang(github.com/haproxytech/client-native/configuration)
    golang(github.com/haproxytech/client-native/misc)
    golang(github.com/haproxytech/client-native/runtime)
    golang-github-haproxytech-client-native-devel
    golang-ipath(github.com/haproxytech/client-native)



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -L /home/rohara/tmp/rpms/ -b 1773719
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: C/C++, R, SugarActivity, fonts, PHP, Haskell, Python, Ocaml, Java, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Built with local dependencies:
    /home/rohara/tmp/rpms/golang-github-haproxytech-config-parser-devel-1.2.0-1.fc33.noarch.rpm
    /home/rohara/tmp/rpms/golang-github-haproxytech-models-devel-1.2.4-2.fc33.noarch.rpm

Comment 8 Brandon Perkins 2020-04-13 21:42:08 UTC
Spec URL: https://raw.githubusercontent.com/bdperkin/haproxytech/master/SPECS/golang-github-haproxytech-client-native.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01337234-golang-github-haproxytech-client-native/golang-github-haproxytech-client-native-1.2.6-3.fc31.src.rpm
Successful copr build: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01337234-golang-github-haproxytech-client-native/

Changelog:
* Mon Apr 13 2020 Brandon Perkins <bperkins> - 1.2.6-3
- Remove runtime/README.md

* Mon Mar 02 2020 Brandon Perkins <bperkins> - 1.2.6-2
- Clean changelog

* Wed Nov 13 2019 Brandon Perkins <bperkins> - 1.2.6-1
- Initial package

Comment 9 Brandon Perkins 2020-04-13 22:02:23 UTC
(In reply to Ryan O'Hara from comment #7)

> 
> Issues:
> =======
> - Package does not contain duplicates in %files.
>   Note: warning: File listed twice: /usr/share/doc/golang-github-
>   haproxytech-client-native-devel/README.md
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/#_duplicate_files
> 
> - I don't quite understand this because the files aren't really listed in
> the spec file, but rather wee use %gopkgfiles. Also note that this did not
> happen with any of the other Go pacakges we are reviewing as part of the
> haproxy dataplaneapi. This is interesting, though:
> 
> # rpm -q --filesbypkg
> golang-github-haproxytech-client-native-devel-1.2.6-2.fc33.noarch.rpm | grep
> README
> golang-github-haproxytech-client-native-devel
> /usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
> golang-github-haproxytech-client-native-devel
> /usr/share/gocode/src/github.com/haproxytech/client-native/README.md
> golang-github-haproxytech-client-native-devel
> /usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md
> 
> 
> # md5sum
> usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
> usr/share/gocode/src/github.com/haproxytech/client-native/README
> usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md
> 0a47f2b62cb73f6f84520d404d44f9e2 
> usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
> 0173e68acc6998d347f71ae13122390d 
> usr/share/gocode/src/github.com/haproxytech/client-native/README.md
> 0a47f2b62cb73f6f84520d404d44f9e2 
> usr/share/gocode/src/github.com/haproxytech/client-native/runtime/README.md
> 
> So two of these files are identical, installed in different directories. If
> you look at github.com, you can see this README.md is duplicated in the git
> repo, too. Perhaps the easiest was to fix this is to ask upstream to remove
> one of the files?
> 

Fixed with 1.2.6-3:

[x]: Package does not contain duplicates in %files.

[bperkins@bperkins haproxytech]$ rpm -ql golang-github-haproxytech-client-native-devel | grep '/README.md$'
/usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
/usr/share/gocode/src/github.com/haproxytech/client-native/README.md

[bperkins@bperkins haproxytech]$ rpm -ql golang-github-haproxytech-client-native-devel | grep '/README.md$' | xargs -i md5sum {}
0173e68acc6998d347f71ae13122390d  /usr/share/doc/golang-github-haproxytech-client-native-devel/README.md
0173e68acc6998d347f71ae13122390d  /usr/share/gocode/src/github.com/haproxytech/client-native/README.md

Comment 10 Ryan O'Hara 2020-04-13 22:05:00 UTC
Thanks, Brandon!

Comment 11 Brandon Perkins 2020-04-14 19:31:48 UTC
Spec URL: https://raw.githubusercontent.com/bdperkin/haproxytech/master/SPECS/golang-github-haproxytech-client-native.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01337933-golang-github-haproxytech-client-native/golang-github-haproxytech-client-native-1.2.6-4.fc31.src.rpm
Successful copr build: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01337933-golang-github-haproxytech-client-native/

Changelog:
* Tue Apr 14 14:27:35 EST 2020 Brandon Perkins <bperkins> - 1.2.6-4
- Add specific versions for haproxytech BuildRequires

* Mon Apr 13 17:29:12 EST 2020 Brandon Perkins <bperkins> - 1.2.6-3
- Remove runtime/README.md

* Mon Mar 02 15:30:56 EST 2020 Brandon Perkins <bperkins> - 1.2.6-2
- Clean changelog

* Wed Nov 13 12:24:19 UTC 2019 Brandon Perkins <bperkins> - 1.2.6-1
- Initial package

Comment 12 Brandon Perkins 2020-04-27 22:57:18 UTC
Spec URL: https://raw.githubusercontent.com/bdperkin/haproxytech/master/SPECS/golang-github-haproxytech-client-native.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01352907-golang-github-haproxytech-client-native/golang-github-haproxytech-client-native-2.0.0-1.fc31.src.rpm
Successful copr build: https://download.copr.fedorainfracloud.org/results/bdperkin/haproxytech/fedora-31-x86_64/01352907-golang-github-haproxytech-client-native/

Changelog:
* Mon Apr 27 2020 Brandon Perkins <bperkins> - 2.0.0-1
- Upgrade to version 2.0.0

* Wed Apr 15 2020 Brandon Perkins <bperkins> - 1.2.7-1
- Update to version 1.2.7

* Tue Apr 14 2020 Brandon Perkins <bperkins> - 1.2.6-4
- Add specific versions for haproxytech BuildRequires

* Mon Apr 13 2020 Brandon Perkins <bperkins> - 1.2.6-3
- Remove runtime/README.md

* Mon Mar 02 2020 Brandon Perkins <bperkins> - 1.2.6-2
- Clean changelog

* Wed Nov 13 2019 Brandon Perkins <bperkins> - 1.2.6-1
- Initial package

Comment 15 Gwyn Ciesla 2020-06-02 00:56:59 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/golang-github-haproxytech-client-native

Comment 16 Brandon Perkins 2020-06-05 15:29:41 UTC
CLOSED. In Rawhide (f33) and in progress for f32.


Note You need to log in before you can comment on or make changes to this bug.