Bug 906481 - Review Request: erlang-cowboy - Small, fast, modular HTTP server written in Erlang
Summary: Review Request: erlang-cowboy - Small, fast, modular HTTP server written in E...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jos de Kloe
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 918587
TreeView+ depends on / blocked
 
Reported: 2013-01-31 17:16 UTC by Peter Lemenkov
Modified: 2013-04-08 00:26 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-22 14:43:23 UTC
Type: ---
Embargoed:
josdekloe: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Peter Lemenkov 2013-01-31 17:16:46 UTC
Spec URL: http://peter.fedorapeople.org/erlyvideo/erlang-cowboy.spec
SRPM URL: http://peter.fedorapeople.org/erlyvideo/erlang-cowboy-0.6.1-1.fc19.src.rpm
Description: Small, fast, modular HTTP server written in Erlang
Fedora Account System Username: peter

This is a dependency for Erlyvideo.

Koji scratchbuild for Rawhide:

* http://koji.fedoraproject.org/koji/taskinfo?taskID=4917969

Unit-tests are unavailable for now - sorry.

Comment 1 Jos de Kloe 2013-03-14 16:26:14 UTC
This package builds fine.
The rpmlint results show an error and 2 warnings.

Rpmlint
-------
Checking: erlang-cowboy-0.6.1-1.fc18.x86_64.rpm
erlang-cowboy.x86_64: E: no-binary
erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
erlang-cowboy.x86_64: W: file-not-utf8 /usr/share/doc/erlang-cowboy-0.6.1/doc/overview.edoc
1 packages and 0 specfiles checked; 1 errors, 2 warnings.

The no-binary thing has been discussed before for erlang packages (see for example this bug #906473) and can be ignored.

So only the not-utf8 thing should be fixed.
A fix is documented here:
https://fedoraproject.org/wiki/Common_Rpmlint_issues#file-not-utf8

After that, I'll be happy to do the review.

Comment 2 Peter Lemenkov 2013-03-14 18:03:49 UTC
(In reply to comment #1)
> This package builds fine.
> The rpmlint results show an error and 2 warnings.
> 
> Rpmlint
> -------
> Checking: erlang-cowboy-0.6.1-1.fc18.x86_64.rpm
> erlang-cowboy.x86_64: E: no-binary
> erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
> erlang-cowboy.x86_64: W: file-not-utf8
> /usr/share/doc/erlang-cowboy-0.6.1/doc/overview.edoc
> 1 packages and 0 specfiles checked; 1 errors, 2 warnings.
> 
> The no-binary thing has been discussed before for erlang packages (see for
> example this bug #906473) and can be ignored.
> 
> So only the not-utf8 thing should be fixed.
> A fix is documented here:
> https://fedoraproject.org/wiki/Common_Rpmlint_issues#file-not-utf8
> 
> After that, I'll be happy to do the review.

Thanks in advance!

* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy.spec
* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy-0.8.2-1.fc19.src.rpm

Changes:

* Updated to ver. 0.8.2 (fully relies on erlang-ranch now)
* Changed encoding of doc/overview.edoc to UTF-8
* Added unit-tests (based on erlang-eunit) back


Koji scratchbuild for F-19:

* http://koji.fedoraproject.org/koji/taskinfo?taskID=5122625

Comment 3 Jos de Kloe 2013-03-17 14:36:14 UTC
Package Review
==============

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


Issues:
=======
- Large documentation must go in a -doc subpackage.
  Note: Documentation size is 4300800 bytes in 211 files.
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation
- end-of-line issue: see after the rpmlint output below
- timestamps are not preserved in install step, see comment below

Please address these points in your next version.

===== 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]: %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.
[-]: Development files must be in a -devel package
[-]: Package requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[x]: Package complies to the Packaging Guidelines
[x]: License field in the package spec file matches the actual license.
[x]: Package consistently uses macro is (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]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Useful -debuginfo package or justification otherwise.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: Spec file lacks Packager, Vendor, PreReq tags.
[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 %doc.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[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
[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).

===== 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).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: SourceX tarball generation or download is documented.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[!]: Packages should try to preserve timestamps of original installed files.
==>needs work, i.e. add '-p' option to install step
[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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define.

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

Generic:
[!]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
     Note: Arch-ed rpms have a total of 4474880 bytes in /usr/share 4474880
     erlang-cowboy-0.8.2-1.fc19.x86_64.rpm
==>I tend to agree here. The amount and size of the doc files clearly is
   way larger than the module itself, so a separate no-arch doc package
   should be used here.
[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: erlang-cowboy-0.8.2-1.fc19.x86_64.rpm
erlang-cowboy.x86_64: E: no-binary
erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
erlang-cowboy.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/erlang-cowboy-0.8.2/examples/websocket/priv/static/jquery.min.js
1 packages and 0 specfiles checked; 1 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint erlang-cowboy
erlang-cowboy.x86_64: E: no-binary
erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
erlang-cowboy.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/erlang-cowboy-0.8.2/examples/websocket/priv/static/jquery.min.js
1 packages and 0 specfiles checked; 1 errors, 2 warnings.
# echo 'rpmlint-done:'

==>a solution using sed to the end-of-line issue is mentioned here:
https://fedoraproject.org/wiki/Common_Rpmlint_issues#wrong-file-end-of-line-encoding


Requires
--------
erlang-cowboy (rpmlib, GLIBC filtered):
    /bin/sh
    erlang-crypto(x86-64)
    erlang-erts(x86-64)
    erlang-kernel(x86-64)
    erlang-ranch(x86-64)
    erlang-stdlib(x86-64)



Provides
--------
erlang-cowboy:
    erlang-cowboy
    erlang-cowboy(x86-64)


Built with local dependencies:
    /home/user_to_make_rpms/reviews/906481.erlang-cowboy/../906473-erlang-ranch/906473-erlang-ranch/results/erlang-ranch-0.6.1-2.fc19.x86_64.rpm
    /home/user_to_make_rpms/reviews/906481.erlang-cowboy/../906473-erlang-ranch/906473-erlang-ranch/results/erlang-ranch-0.6.1-2.fc19.src.rpm


Generated by fedora-review 0.4.0 (660ce56) last change: 2013-01-29
Buildroot used: fedora-rawhide-x86_64
Command line :/bin/fedora-review -b 906481 -m fedora-rawhide-x86_64 -L ../906473-erlang-ranch/906473-erlang-ranch/results

Comment 4 Peter Lemenkov 2013-03-17 15:05:57 UTC
(In reply to comment #3)
> Package Review
> ==============
> 
> Key:
> [x] = Pass
> [!] = Fail
> [-] = Not applicable
> [?] = Not evaluated
> [ ] = Manual review needed
> 
> 
> Issues:
> =======
> - Large documentation must go in a -doc subpackage.
>   Note: Documentation size is 4300800 bytes in 211 files.
>   See:
> http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation

Fixed (added *-doc subpackage).

> - end-of-line issue: see after the rpmlint output below

Fixed.

> - timestamps are not preserved in install step, see comment below

Fixed.

> Please address these points in your next version.

Done! New spec-file and src.rpm:

* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy.spec
* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy-0.8.2-2.fc19.src.rpm

Comment 5 Jos de Kloe 2013-03-17 21:03:44 UTC
Thanks for your new version.
I retested with the fedora-review tool, and all mentioned points are fixed now, but I found a few new issues:

The fedora-review tool now gives these extra items:

[!]: Fully versioned dependency in subpackages, if present.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in erlang-
     cowboy-doc
==>the doc package contains example scripts that will only run if the base
   package is installed I think. Therefore the doc package should have
   a fully versioned Requires for the base package. Please add this.

[!]: License file installed when any subpackage combination is installed.
==>this automatically will be the case if the above Require is added

[x]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 30720 bytes in 4 files.
==>no longer an issue with this version

Rpmlint
-------
Checking: erlang-cowboy-0.8.2-2.fc18.x86_64.rpm
          erlang-cowboy-doc-0.8.2-2.fc18.noarch.rpm
erlang-cowboy.x86_64: E: no-binary
erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
2 packages and 0 specfiles checked; 1 errors, 1 warnings.

==>this is no problem. The no-binary thing is a known erlang 'feature'.
   See for example the discussion in comment 2 of bug #906473


Rpmlint (installed packages)
----------------------------
# rpmlint erlang-cowboy erlang-cowboy-doc
erlang-cowboy.x86_64: E: no-binary
erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
erlang-cowboy.x86_64: W: wrong-file-end-of-line-encoding /usr/share/doc/erlang-cowboy-0.8.2/examples/websocket/priv/static/jquery.min.js
2 packages and 0 specfiles checked; 1 errors, 2 warnings.
# echo 'rpmlint-done:'

==>this one still complains about the line ending issue
   It's not clear to me why.

Requires
--------
...
erlang-cowboy-doc (rpmlib, GLIBC filtered):
    /bin/sh

Because of the above rpmlint issue I looked at the content of this file jquery.min.js and this one seems to have been downloaded from another project:
http://blog.jquery.com/2012/08/09/jquery-1-8-released/

According to: http://jquery.com/download/
the license for this file is MIT or GPL
clearly this needs to be added to the License field
of the spec file, probably with a comment referring to the
file in question.

looking at:
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Bundling_of_multiple_projects
I feel a bit uneasy allowing this into the doc package, but a quick locate
shows more projects provide copies of this file:

>locate jquery.min
/usr/lib/python2.7/site-packages/django/contrib/admin/static/admin/js/jquery.min.js
/usr/share/transmission/web/javascript/jquery/jquery.min.js
/var/lib/mock/fedora-18-x86_64/root/usr/share/doc/erlang-cowboy-0.8.2/examples/websocket/priv/static/jquery.min.js

The python-django package is BSD licensed and includes jquery version 1.4.2 which also is dual licensed MIT and GPLv2.
No explanation is given in the spec file, so this seems not correct to me.

The transmission-common package refers in its specfile to the COPYING file
in which it is clearly stated that the package combines elements
that are MIT licensed and elements that are GPLv2 licensed.
This package includes jquery version 1.7.2
which also is dual licensed MIT and GPLv2.

I also noted that in this bug #857992 a discussion occurs on the packaging of jquery in other packages. It seems here that the discussion on unbundling them is still ongoing.

Concluding, because it is clear the jquery code in this erlang-cowboy is part of the example documentation, I will not reject your package because of it,
but would feel more comfortable if you would just remove this particular example from the doc package.

Comment 6 Peter Lemenkov 2013-03-18 12:35:57 UTC
Thanks for digging into this, Jos!

Here is a new spec ans srpm:

* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy.spec
* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy-0.8.2-3.fc19.src.rpm

Comment 7 Jos de Kloe 2013-03-18 21:01:06 UTC
Thanks Peter for removing this one example from the doc package.

fedora-review -b 906481 -m fedora-18-x86_64

runs fine now, and I am happy with its output. No new issues are found here.
The tool generates 3 rpm's on my system:
   erlang-cowboy-0.8.2-3.fc18.src.rpm
   erlang-cowboy-doc-0.8.2-3.fc18.noarch.rpm
   erlang-cowboy-0.8.2-3.fc18.x86_64.rpm

and rpmlint outputs seem fine:
$ rpmlint *.rpm
erlang-cowboy.src: W: invalid-url Source0: extend-cowboy-0.8.2-0-gcc50778.tar.gz
erlang-cowboy.x86_64: E: no-binary
erlang-cowboy.x86_64: W: only-non-binary-in-usr-lib
3 packages and 0 specfiles checked; 1 errors, 2 warnings.

Finally, I tested with koji, see:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5139210

This shows a final tiny issue:

BuildError: mismatch when analyzing erlang-cowboy-doc-0.8.2-3.fc18.noarch.rpm, rpmdiff output was:
removed     REQUIRES erlang-cowboy(x86-64) = 0.8.2-3.fc18
added       REQUIRES erlang-cowboy(x86-32) = 0.8.2-3.fc18

so the noarch rpm's differ when compiled on 32 and 64 architectures because they
depend on the fully versioned base package.
I guess removing the %{?_isa} in the Requires lines of the doc section
may solve this?

Comment 8 Peter Lemenkov 2013-03-19 10:41:52 UTC
(In reply to comment #7)

> I guess removing the %{?_isa} in the Requires lines of the doc section
> may solve this?

Yes, definitely! New package and spec-file:

* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy.spec
* http://peter.fedorapeople.org/erlyvideo/erlang-cowboy-0.8.2-4.fc19.src.rpm

Comment 9 Jos de Kloe 2013-03-19 21:40:52 UTC
Thanks for fixing this tiny issue.
koji build runs fine now, see:
  http://koji.fedoraproject.org/koji/taskinfo?taskID=5145002

I have no more comments and am happy with this version.
Therefore this package is:

APPROVED.

Comment 10 Peter Lemenkov 2013-03-22 08:53:36 UTC
(In reply to comment #9)
> Thanks for fixing this tiny issue.
> koji build runs fine now, see:
>   http://koji.fedoraproject.org/koji/taskinfo?taskID=5145002
> 
> I have no more comments and am happy with this version.
> Therefore this package is:
> 
> APPROVED.

Thanks!

New Package SCM Request
=======================
Package Name: erlang-cowboy
Short Description: Small, fast, modular HTTP server written in Erlang
Owners: peter
Branches: f18 f19 el6
InitialCC:

Comment 11 Gwyn Ciesla 2013-03-22 12:48:15 UTC
Git done (by process-git-requests).

Comment 12 Fedora Update System 2013-03-22 13:26:08 UTC
erlang-cowboy-0.8.2-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/erlang-cowboy-0.8.2-4.fc18

Comment 13 Fedora Update System 2013-04-08 00:26:37 UTC
erlang-cowboy-0.8.2-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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