Bug 639263

Summary: Review Request: erlang-rebar - Erlang Build Tools
Product: [Fedora] Fedora Reporter: Peter Lemenkov <lemenkov>
Component: Package ReviewAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, hdegoede, notting
Target Milestone: ---Flags: hdegoede: fedora‑review+
tibbs: fedora‑cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: erlang-rebar-2-3.20101120git90058c7.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-23 14:38:09 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 638948, 638974, 639278, 639284, 639291    
Bug Blocks: 638909, 639292, 652543, 652546, 652585, 652598, 652616, 652623, 652629, 652648, 652665, 739014, 739015, 739016, 822997, 823101, 823105, 823171, 841766    

Description Peter Lemenkov 2010-10-01 05:42:20 EDT
Spec URL: http://peter.fedorapeople.org/erlang-rebar.spec
SRPM URL: http://peter.fedorapeople.org/erlang-rebar-2-1.fc12.src.rpm
Description: Erlang Build Tools.

This is one of the requirements for etorrent.

rpmlint output:


Sulaco ~/rpmbuild/SRPMS: rpmlint ../RPMS/ppc/erlang-rebar-2-1.fc12.ppc.rpm 
erlang-rebar.ppc: E: explicit-lib-dependency erlang-stdlib
erlang-rebar.ppc: E: no-binary
erlang-rebar.ppc: W: only-non-binary-in-usr-lib
erlang-rebar.ppc: W: devel-file-in-non-devel-package /usr/lib/erlang/lib/rebar-2/priv/templates/basicnif.c
erlang-rebar.ppc: E: non-executable-script /usr/lib/erlang/lib/rebar-2/priv/templates/simplenode.erl.script 0644 /bin/bash
erlang-rebar.ppc: W: no-manual-page-for-binary rebar
1 packages and 0 specfiles checked; 3 errors, 3 warnings.
Sulaco ~/rpmbuild/SRPMS: 

First message is a false positive - due to "lib" substring in the name of explicit requires. The next two (no-binary, only-non-binary-in-usr-lib) should be ignored too - this is due to the fact that this package is arch-independent but it is installed into arch-dependent library. Next two messages also should be ignored - these are templates, required for package's normal operation.

Koji scratch build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2505758
Comment 1 Peter Lemenkov 2010-11-17 05:40:19 EST
Fresh koji scratchbuild for F-14:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2606091
Comment 2 Hans de Goede 2010-11-19 11:09:47 EST
I'll review this this weekend.
Comment 3 Hans de Goede 2010-11-20 08:10:05 EST
Full review done, results below:

Good:
- rpmlint checks return:
  See Comment #0
- package meets naming guidelines
- package meets packaging guidelines
- spec file legible, in am. english
- package compiles on devel (x86)
- no missing BR
- no unnecessary BR
- no locales
- not relocatable
- owns all directories that it creates
- no duplicate files
- permissions ok
- %clean ok
- macro use consistent
- code, not content
- no need for -docs
- nothing in %doc affects runtime
- no need for .desktop file 

Bad (MUST FIX):
- Spec file states license is BSD, copyright headers in the source code contain
  MIT headers -> change spec file to match
- License text included in the upstream sources is Apache -> do not include 
  as %doc (as its wrong), mail upstream about this
- source do no match upstream, doing spectool -g erlang-rebar.spec yields
  a different tarbal then in the source rpm -> include a tarbal generation
  script as Source2, make this script check out a specific revision.

Remarks (Could FIX):
- The %files contains:
%dir %{_libdir}/erlang/lib/%{realname}-%{version}
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/include
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/priv
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.beam
%{_libdir}/erlang/lib/%{realname}-%{version}/include/*.hrl
%{_libdir}/erlang/lib/%{realname}-%{version}/priv/*
This could simply be written as:
%{_libdir}/erlang/lib/%{realname}-%{version}
rpmbuild will then cause the build rpm to own that dir and include (and own) all dirs and files under it.
Comment 4 Peter Lemenkov 2010-11-20 09:16:20 EST
Thanks!

(In reply to comment #3)
> Full review done, results below:

> Bad (MUST FIX):
> - Spec file states license is BSD, copyright headers in the source code contain
>   MIT headers -> change spec file to match

Done.

> - License text included in the upstream sources is Apache -> do not include 
>   as %doc (as its wrong), mail upstream about this

Removed. Will send message upstream asap.

> - source do no match upstream, doing spectool -g erlang-rebar.spec yields
>   a different tarbal then in the source rpm -> include a tarbal generation
>   script as Source2, make this script check out a specific revision.

Done. The project was relocated to GitHub, and I changed all links accordingly.
 
> Remarks (Could FIX):
> - The %files contains:
> %dir %{_libdir}/erlang/lib/%{realname}-%{version}
> %dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
> %dir %{_libdir}/erlang/lib/%{realname}-%{version}/include
> %dir %{_libdir}/erlang/lib/%{realname}-%{version}/priv
> %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
> %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.beam
> %{_libdir}/erlang/lib/%{realname}-%{version}/include/*.hrl
> %{_libdir}/erlang/lib/%{realname}-%{version}/priv/*
> This could simply be written as:
> %{_libdir}/erlang/lib/%{realname}-%{version}
> rpmbuild will then cause the build rpm to own that dir and include (and own)
> all dirs and files under it.

Done.

I also removed two bundled libraries (already packaged separately) and changed versioning to reflect that it's a post-release tarball:

http://peter.fedorapeople.org/erlang-rebar.spec
http://peter.fedorapeople.org/erlang-rebar-2-2.20101120git90058c7.fc12.src.rpm
Comment 5 Hans de Goede 2010-11-20 14:24:58 EST
Looks good now, approved!
Comment 6 Peter Lemenkov 2010-11-20 14:32:31 EST
Thanks!

New Package SCM Request
=======================
Package Name: erlang-rebar
Short Description: Erlang Build Tools
Owners: peter
Branches: f14 el6
InitialCC:
Comment 7 Jason Tibbitts 2010-11-22 08:54:57 EST
Git done (by process-git-requests).
Comment 8 Fedora Update System 2010-11-22 10:58:12 EST
erlang-rebar-2-3.20101120git90058c7.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/erlang-rebar-2-3.20101120git90058c7.fc14
Comment 9 Fedora Update System 2010-11-22 17:17:37 EST
erlang-rebar-2-3.20101120git90058c7.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update erlang-rebar'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/erlang-rebar-2-3.20101120git90058c7.fc14
Comment 10 Fedora Update System 2010-12-02 14:12:34 EST
erlang-rebar-2-3.20101120git90058c7.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Peter Lemenkov 2012-05-18 07:46:34 EDT
Package Change Request
======================
Package Name: erlang-rebar
New Branches: el5
Owners: peter
InitialCC: 

I managed to fix  code (simply remove some functionality) which requires missing dependencies (due to old erlang) so it's useful addition again. Also some new Erlang packages which could be built with erlang R12B require it for building.
Comment 12 Jason Tibbitts 2012-05-19 14:24:50 EDT
Git done (by process-git-requests).