Bug 1821809 - Review Request: golang-github-sourcemap - Source maps consumer
Summary: Review Request: golang-github-sourcemap - Source maps consumer
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1821815
TreeView+ depends on / blocked
 
Reported: 2020-04-07 16:33 UTC by Fabian Affolter
Modified: 2023-02-22 20:33 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-02-22 20:33:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fabian Affolter 2020-04-07 16:33:01 UTC
Spec URL: https://fab.fedorapeople.org/packages/SRPMS/golang-github-sourcemap.spec
SRPM URL: https://fab.fedorapeople.org/packages/SRPMS/golang-github-sourcemap-2.1.3-1.fc31.src.rpm

Project URL: https://github.com/go-sourcemap/sourcemap

Description:
Source maps consumer for Golang.

Koji scratch build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=43094480

rpmlint output:
$ rpmlint golang-github-sourcemap-2.1.3-1.fc31.src.rpm 
golang-github-sourcemap.src: W: no-%build-section
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

$ rpmlint golang-github-sourcemap-devel-2.1.3-1.fc31.noarch.rpm 
golang-github-sourcemap-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/go-sourcemap/sourcemap/.goipath
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

Fedora Account System Username: fab

Comment 1 Hirotaka Wakabayashi 2020-06-18 00:21:03 UTC
Hello Fabian,

I'm not sure, but no tests seem not to have run in %check. The spec file looks good. If you know anything, please tell me.

Here is an excerpt of my rpmbuild log. 
```
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.Z0UYtg
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd sourcemap-2.1.3
+ LDFLAGS='-X github.com/go-sourcemap/sourcemap/version=2.1.3'
+ GO_TEST_FLAGS='-buildmode pie -compiler gc'
+ GO_TEST_EXT_LD_FLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '
+ go-rpm-integration check -i github.com/go-sourcemap/sourcemap -b /home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/_build/bin -s /home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/_build -V 2.1.3-1.fc33 -p /home/vagrant/rpmbuild/BUILDROOT/golang-github-sourcemap-2.1.3-1.fc33.x86_64 -g /usr/share/gocode -r '.*example.*'
Testing    in: /home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/_build/src
         PATH: /home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/_build/bin:/home/vagrant/.local/bin:/home/vagrant/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
       GOPATH: /home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags "-X github.com/go-sourcemap/sourcemap/version=2.1.3 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
      testing: github.com/go-sourcemap/sourcemap
+ RPM_EC=0
++ jobs -p
+ exit 0
```

I find this upstream prepares tests and I could run.
```
[vagrant@localhost sourcemap-2.1.3]$ export GOPATH=/home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/_build:/usr/share/gocode
[vagrant@localhost sourcemap-2.1.3]$ make
go test ./...
ok  	_/home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3	0.315s
ok  	_/home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/internal/base64vlq	0.002s
go test ./... -short -race
ok  	_/home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3	0.373s
ok  	_/home/vagrant/rpmbuild/BUILD/sourcemap-2.1.3/internal/base64vlq	0.029s
go vet
```

Thanks in advance,
Hirotaka Wakabayashi

Comment 2 Package Review 2021-06-18 00:45:33 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time, but it seems
that the review is still being working out by you. If this is right, please
respond to this comment clearing the NEEDINFO flag and try to reach out the
submitter to proceed with the review.

If you're not interested in reviewing this ticket anymore, please clear the
fedora-review flag and reset the assignee, so that a new reviewer can take
this ticket.

Without any reply, this request will shortly be resetted.

Comment 3 Hirotaka Wakabayashi 2021-07-13 17:35:58 UTC
Sorry for my late response because of my early summer vacation. I will check this again this week.

Thanks in advance,
Hirotaka Wakabayashi

Comment 4 Hirotaka Wakabayashi 2021-07-17 13:52:22 UTC
Hello Fabian, Package approved. Please see my review attached.
                                                                      
This package contains test suites. If they are practical, you should 
run them because of the the guidelines[1][2]. 

I found tests run correctly when changing the spec file as followings.
```
$ diff golang-github-sourcemap.spec.orig golang-github-sourcemap.spec
37c37,38
< %gocheck
---
> GOPATH=%{gobuilddir}:%{gobuilddir}/_build:/usr/share/gocode:/usr/share/gocode
> GO111MODULE=off make
```

Thanks you very much,
Hirotaka Wakabayashi

---
1: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_test_suites
2: https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_testing


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: There is no build directory. Running licensecheck on vanilla
     upstream sources. Licenses found: "Unknown or generated", "BSD
     2-clause "Simplified" License". 10 files have unknown license.
     Detailed output of licensecheck in
     /home/build/dev/fedora_packaging/1821809-golang-github-
     sourcemap/licensecheck.txt
[x]: Package does not own files or directories owned by other packages.
[-]: %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
[-]: 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.
[-]: 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 1 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 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]: 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:
[-]: 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.
[-]: 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.
[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
-------
[build@3bbc8cb38dbc fedora_packaging]$ rpmlint ./1821809-golang-github-sourcemap/results/golang-github-sourcemap-2.1.3-1.fc35.src.rpm > binary.rpmlint 2>&1
[build@3bbc8cb38dbc fedora_packaging]$ rpmlint ./1821809-golang-github-sourcemap/results/golang-github-sourcemap-devel-2.1.3-1.fc35.noarch.rpm > source.rpmlint 2>&1
[build@3bbc8cb38dbc fedora_packaging]$ cat binary.rpmlint 
(none): W: unable to init enchant, spellchecking disabled.
(none): W: unable to init enchant, spellchecking disabled.
============================ rpmlint session starts ============================
rpmlint: 2.0.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 1

golang-github-sourcemap.spec: W: no-%build-section
 1 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.4 s 
[build@3bbc8cb38dbc fedora_packaging]$ cat source.rpmlint 
(none): W: unable to init enchant, spellchecking disabled.
(none): W: unable to init enchant, spellchecking disabled.
============================ rpmlint session starts ============================
rpmlint: 2.0.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 1

golang-github-sourcemap-devel.noarch: W: hidden-file-or-dir /usr/share/gocode/src/github.com/go-sourcemap/sourcemap/.goipath
golang-github-sourcemap-devel.noarch: W: files-duplicate /usr/share/gocode/src/github.com/go-sourcemap/sourcemap/README.md /usr/share/doc/golang-github-sourcemap-devel/README.md
 1 packages and 0 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 0.0 s 


Source checksums
----------------
https://github.com/go-sourcemap/sourcemap/archive/v2.1.3/sourcemap-2.1.3.tar.gz :
  CHECKSUM(SHA256) this package     : 9e5d9e6f1b7facedd58ef8bb2af86ddf906bfc0c3f377934603e900b21490956
  CHECKSUM(SHA256) upstream package : 9e5d9e6f1b7facedd58ef8bb2af86ddf906bfc0c3f377934603e900b21490956


Requires
--------
golang-github-sourcemap-devel (rpmlib, GLIBC filtered):
    go-filesystem



Provides
--------
golang-github-sourcemap-devel:
    golang(github.com/go-sourcemap/sourcemap)
    golang(github.com/go-sourcemap/sourcemap/internal/base64vlq)
    golang-github-sourcemap-devel
    golang-ipath(github.com/go-sourcemap/sourcemap)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1821809
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: C/C++, PHP, Java, R, Python, Perl, fonts, Haskell, SugarActivity, Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Package Review 2022-07-03 07:48:59 UTC
Review is stalled, resetting ticket status.


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