Bug 823105 - Review Request: erlang-riak_control - Admin UI for Riak
Summary: Review Request: erlang-riak_control - Admin UI for Riak
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Patrick Uiterwijk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 639263 652546 652598
Blocks: 652682
TreeView+ depends on / blocked
 
Reported: 2012-05-19 05:12 UTC by Peter Lemenkov
Modified: 2012-08-23 17:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-28 19:48:18 UTC
Type: ---
Embargoed:
puiterwijk: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Peter Lemenkov 2012-05-19 05:12:49 UTC
Spec URL: http://peter.fedorapeople.org/erlang-riak_control.spec
SRPM URL: http://peter.fedorapeople.org/erlang-riak_control-0.1.2-1.fc18.src.rpm
Description: Riak Control is a set of webmachine resources, all accessible via the
/admin/* paths, allow you to inspect your running cluster, and manipulate
it in various ways.

NotReady since 

* it depends on packages not yet available in Rawhide, 
* fails to pass the tests
* has defects in the source code (revealed by static analysis)

Comment 1 Peter Lemenkov 2012-07-14 14:53:45 UTC
Unblocking NotReady - all dependencies are available at least for Rawhide, I fixed code defects (and sent patches upstream). Don't know what I meant under "fails to pass the tests" since the package doesn't have any of them (unfortunately). Use the same links as posted above:

Spec URL: http://peter.fedorapeople.org/erlang-riak_control.spec
SRPM URL: http://peter.fedorapeople.org/erlang-riak_control-0.1.2-1.fc18.src.rpm

Koji scratchbuild for Rawhide:

http://koji.fedoraproject.org/koji/taskinfo?taskID=4239722

Comment 2 Patrick Uiterwijk 2012-07-26 11:37:59 UTC
I'll review this one

Comment 3 Patrick Uiterwijk 2012-07-26 18:01:04 UTC
Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated



==== Generic ====
[x]: EXTRA Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: EXTRA Spec file according to URL is the same as in SRPM.
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[-]: MUST %build honors applicable compiler flags or justifies otherwise.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Buildroot is not present
     Note: Unless packager wants to package for EPEL5 this is fine
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[x]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean would be needed if support for EPEL is required
[x]: MUST Sources contain only permissible code or content.
[x]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: Note: defattr macros not found. They would be needed for EPEL5
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[-]: MUST Package contains desktop file if it is a GUI application.
[x]: MUST Development files must be in a -devel package
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[!]: MUST Package complies to the Packaging Guidelines
     Note: Different styles of variables used (e.g. $RPM_BUILD_ROOT and %{_libdir})
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[!]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf is only needed if supporting EPEL5
[x]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: MUST 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]: MUST License field in the package spec file matches the actual license.
[!]: MUST Package consistently uses macro is (instead of hard-coded directory
     names).
     Note: Using both %{buildroot} and $RPM_BUILD_ROOT
[x]: MUST Package is named using only allowed ascii characters.
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
     Note: Package contains no Conflicts: tag(s)
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[x]: MUST Package is not relocatable.
[x]: MUST Requires correct, justified where necessary.
[x]: MUST Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: MUST Package contains systemd file(s) if in need.
[x]: MUST File names are valid UTF-8.
[x]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[-]: SHOULD 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]: SHOULD Dist tag is present.
[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[?]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[!]: SHOULD SourceX / PatchY prefixed with %{name}.
     Note: Source0 (basho-riak_control-0.1.2-0-gc7fd3a9.tar.gz)
[!]: SHOULD SourceX is a working URL.
     Note: Source0 does specify how to download, but is not a URL itself
[x]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[-]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.

Rpmlint
-------
Checking: erlang-riak_control-0.1.2-1.fc18.x86_64.rpm
          erlang-riak_control-0.1.2-1.fc18.src.rpm
erlang-riak_control.x86_64: W: spelling-error %description -l en_US Riak -> Rick, Risk, Rial
erlang-riak_control.x86_64: W: spelling-error %description -l en_US webmachine -> web machine, web-machine, machine
erlang-riak_control.x86_64: E: no-binary
erlang-riak_control.x86_64: W: only-non-binary-in-usr-lib
erlang-riak_control.src: W: spelling-error %description -l en_US Riak -> Rick, Risk, Rial
erlang-riak_control.src: W: spelling-error %description -l en_US webmachine -> web machine, web-machine, machine
erlang-riak_control.src: W: invalid-url Source0: basho-riak_control-0.1.2-0-gc7fd3a9.tar.gz
2 packages and 0 specfiles checked; 1 errors, 6 warnings.


Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:
Requires
--------
erlang-riak_control-0.1.2-1.fc18.x86_64.rpm (rpmlib, GLIBC filtered):
    
    erlang-erts(x86-64) >= R13B
    erlang-kernel(x86-64)  
    erlang-mochiweb(x86-64)  
    erlang-os_mon(x86-64)  
    erlang-riak_core(x86-64)  
    erlang-stdlib(x86-64)  
    erlang-webmachine(x86-64)  

Provides
--------
erlang-riak_control-0.1.2-1.fc18.x86_64.rpm:
    
    erlang-riak_control = 0.1.2-1.fc18
    erlang-riak_control(x86-64) = 0.1.2-1.fc18

MD5-sum check
-------------


Generated by fedora-review 0.2.0 (53cc903) last change: 2012-07-09

Comment 4 Patrick Uiterwijk 2012-07-26 18:13:14 UTC
MD5-sum check
-------------
798797f3ee9f413183d3a227f4051070  basho-riak_control-0.1.2-0-gc7fd3a9.tar.gz
798797f3ee9f413183d3a227f4051070  riak_control-0.1.2.0.tar.gz

Comment 5 Patrick Uiterwijk 2012-07-26 18:21:31 UTC
Also, using sed to build is very dangerous, it could break things if not kept up-to-date with the sources.
I would advice you to use a patch file, as this will just fail to apply if the upstream sources are changed.

Comment 6 Peter Lemenkov 2012-07-26 19:58:22 UTC
(In reply to comment #5)
> Also, using sed to build is very dangerous, it could break things if not
> kept up-to-date with the sources.
> I would advice you to use a patch file, as this will just fail to apply if
> the upstream sources are changed.

Thanks for the sensible advice! I really didn't realise why sed might be a bad idea.

Here are updated files:

* http://peter.fedorapeople.org/erlang-riak_control.spec
* http://peter.fedorapeople.org/erlang-riak_control-0.1.2-2.fc18.src.rpm

Changelog:

- Consistent usage of macros.
- Removed sed invocation (replaced by patch-file)
- Fully removed EL5-related junk

Comment 7 Patrick Uiterwijk 2012-07-26 22:13:54 UTC
- I see you are still doing a sed-line, which can still break after upstream changes that file (sed -i -e "5,11d" rebar.config).

- Source0 is still no valid URL, but this is not such a problem since the github links are very strange.

- Why don't you use %{name} for the PatchX-lines? So for example:
Patch1:         %{name}-0001-Typo-fix-no-such-function-gen_server-cast-3.patch

- Why do the Requires-lines say you need the specific same arch? Is it incompatible with the libraries of a different architecture?

- In %files, you could have removed the %dir %{_libdir}/erlang/lib/%{realname}-%{version}/priv/ and remove the asterisk from the %{_libdir}/erlang/lib/%{realname}-%{version}/priv/*

- The %setup-line has a magic version number in it: %{upstream}-%{realname}-d5f714a. As this is the same name as in %setup -n, you can use %{buildsubdir} to refer to this directory.



The first one is the only one I think is really critical, as this can make it break somewhere in the future without any warnings.


I think you could fix this before pushing and won't need a re-look, so hereby I declare this package as

APPROVED

Comment 8 Peter Lemenkov 2012-07-28 18:53:01 UTC
Thanks for the 
(In reply to comment #7)
> - I see you are still doing a sed-line, which can still break after upstream
> changes that file (sed -i -e "5,11d" rebar.config).

Done.
For the record - that's a workaround for rebar shortcoming. It doesn't check for already installed dependencies. At least it doesn't do it reliably - I'm working on it and I plan to fix it before F-18 release.

> - Source0 is still no valid URL, but this is not such a problem since the
> github links are very strange.
> 
> - Why don't you use %{name} for the PatchX-lines? So for example:
> Patch1:        
> %{name}-0001-Typo-fix-no-such-function-gen_server-cast-3.patch

Done.

> - Why do the Requires-lines say you need the specific same arch? Is it
> incompatible with the libraries of a different architecture?

Yep, this is a quite obscure thing. Erlang is designed that it looks for its libraries in %{_libdir}/erlang/lib (at least by default). This path is definitely arch-dependent so every Erlang package becomes arch-dependent as well even if they contain only arch-independent data (*.beam files and headers). So we forced to apply a policy for arch-dependent packages.

> - In %files, you could have removed the %dir
> %{_libdir}/erlang/lib/%{realname}-%{version}/priv/ and remove the asterisk
> from the %{_libdir}/erlang/lib/%{realname}-%{version}/priv/*

That's a leftover from my previous experiments with static analysis of Erlang packages. I'd rather keep them as is since I plan to continue these experiments. I'll drop them someday eventually.

> APPROVED

Many thanks for this!



New Package SCM Request
=======================
Package Name: erlang-riak_control
Short Description: Admin UI for Riak
Owners: peter
Branches: f17 el6
InitialCC:

Comment 9 Gwyn Ciesla 2012-07-28 19:15:21 UTC
Git done (by process-git-requests).

Comment 10 Peter Lemenkov 2012-07-28 19:48:18 UTC
Built in Rawhide. Other branches will have to wait (~ 2 weeks).

Comment 11 Fedora Update System 2012-07-29 07:23:19 UTC
erlang-riak_control-0.1.2-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/erlang-riak_control-0.1.2-2.fc17

Comment 12 Fedora Update System 2012-08-05 07:11:29 UTC
erlang-riak_control-0.1.2-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/erlang-riak_control-0.1.2-2.el6

Comment 13 Fedora Update System 2012-08-09 23:31:48 UTC
erlang-riak_control-0.1.2-2.fc17 has been pushed to the Fedora 17 stable repository.

Comment 14 Fedora Update System 2012-08-23 17:01:05 UTC
erlang-riak_control-0.1.2-2.el6 has been pushed to the Fedora EPEL 6 stable repository.


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