Bug 831895 - Review Request: cloc - Count Lines of Code
Review Request: cloc - Count Lines of Code
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Robin Lee
Fedora Extras Quality Assurance
:
: 1164371 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 22:48 EDT by Ricky Elrod
Modified: 2014-11-17 08:03 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-26 17:38:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
robinlee.sysu: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Ricky Elrod 2012-06-13 22:48:53 EDT
Spec URL: http://codeblock.fedorapeople.org/packages/cloc/cloc.spec
SRPM URL: http://codeblock.fedorapeople.org/packages/cloc/cloc-1.56-1.fc18.src.rpm
Description: A tool to count lines of code in various languages from a given directory.
Fedora Account System Username: codeblock

rpmlint outputs:

[ricky@t520 SPECS]$ rpmlint ../SRPMS/cloc-1.56-1.fc18.src.rpm 
cloc.src: W: invalid-url Source0: http://downloads.sourceforge.net/project/cloc/cloc/v1.56/cloc-1.56.pl timed out
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

Justification: http://fedoraproject.org/wiki/Packaging:SourceURL#Sourceforge.net

[ricky@t520 SPECS]$ rpmlint ../RPMS/noarch/cloc-1.56-1.fc18.noarch.rpm 
cloc.noarch: W: no-documentation
cloc.noarch: W: no-manual-page-for-binary cloc
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

Justification: no manpages distributed by upstream, and not required by Fedora.
Comment 1 Terje Røsten 2012-06-14 03:32:30 EDT
a)
Requires:       perl-Regexp-Common
Requires:       perl-Algorithm-Diff
# Stop trying to find the optional Win32::File dep.
AutoReq:        no

Please redo this, see

https://fedoraproject.org/wiki/Packaging:Perl#Filtering_Requires_and_Provides
https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Perl

b)
mkdir -p %{buildroot}/%{_bindir}
cp %{SOURCE0} %{buildroot}/%{_bindir}/%{name}
chmod +x %{buildroot}/%{_bindir}/%{name}

can be done in one line:

install -D -m 0755 %{SOURCE0} %{buildroot}/%{_bindir}/%{name}

c)

Any license file available?
Comment 2 Ricky Elrod 2012-06-14 03:47:57 EDT
a)

Fixed, didn't see those links before. Thanks.

b)

Yep. Fixed.

c)

Not explicitly. The header of the source file (cloc-1.56.pl) contains the GPLv2+ header though.

Thanks!
Comment 3 Ricky Elrod 2012-06-14 03:49:13 EDT
Forgot to mention - the links are the same as above, I've uploaded the new spec/srpm.

Spec URL: http://codeblock.fedorapeople.org/packages/cloc/cloc.spec
SRPM URL: http://codeblock.fedorapeople.org/packages/cloc/cloc-1.56-1.fc18.src.rpm
Comment 4 Terje Røsten 2012-06-14 04:14:12 EDT
Thanks, some more:

there is a pod available:

 http://sourceforge.net/projects/cloc/files/cloc/v1.56/cloc.1.pod/download

You can use pod2man to create man page for cloc (would be useful).

Also consider to include release.txt:

 http://sourceforge.net/projects/cloc/files/cloc/v1.56/release-1.56.txt/download

And please:
 - update %changelog and release tag on *every* change.
Comment 5 Ricky Elrod 2012-06-14 04:51:22 EDT
Now generates a man page using pod2man and includes release-1.56.txt.

Spec URL: http://codeblock.fedorapeople.org/packages/cloc/cloc.spec
SRPM URL: http://codeblock.fedorapeople.org/packages/cloc/cloc-1.56-2.fc18.src.rpm

Sorry, I generally start incrementing the release and changelog after the package is approved, I didn't think it mattered for review.

Incremented the release to 2 and added a changelog entry this time.

rpmlint is silent.

[ricky@t520 SPECS]$ rpmlint ../SRPMS/cloc-1.56-2.fc18.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

[ricky@t520 SPECS]$ rpmlint cloc
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

[ricky@t520 SPECS]$ rpmlint cloc.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
Comment 6 Terje Røsten 2012-06-14 05:43:41 EDT
Thanks,

changelog does matter, in review it's important for reviewer (and others) to track progress and changes.

Don't compress the man page, rpmbuild will take care of that, just list the file
with wildcard, %doc marking is also done by rpmbuild:

%doc %{_mandir}/man1/%{name}.1.gz

->

%{_mandir}/man1/%{name}.1*
Comment 8 Robin Lee 2012-06-14 23:19:22 EDT
Package Review
==============

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



==== Generic ====
[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.
[x]: 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.
[!]: MUST Buildroot is not present
     Note: Buildroot is not needed unless packager plans to package for EPEL5
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[!]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean is needed only if supporting EPEL
[x]: MUST Sources contain only permissible code or content.
[!]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: defattr(....) present in %files section. This is OK if packaging
     for EPEL5. Otherwise not needed
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[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.
[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.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[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.
[!]: MUST Requires correct, justified where necessary.
[x]: MUST Rpmlint output is silent.

rpmlint cloc-1.56-3.fc18.src.rpm

1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint cloc-1.56-3.fc18.noarch.rpm

1 packages and 0 specfiles checked; 0 errors, 0 warnings.


[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
/home/cheese/Downloads/831895/release-1.56.txt :
  MD5SUM this package     : b4fa722b575c91d35c15106649a3f49b
  MD5SUM upstream package : b4fa722b575c91d35c15106649a3f49b
/home/cheese/Downloads/831895/cloc-1.56.pl :
  MD5SUM this package     : 2739127ce5398fa627b50e54ea3dcbb6
  MD5SUM upstream package : 2739127ce5398fa627b50e54ea3dcbb6
/home/cheese/Downloads/831895/cloc.1.pod :
  MD5SUM this package     : ff0fb147d0233e91338dd080bcf3bad8
  MD5SUM upstream package : ff0fb147d0233e91338dd080bcf3bad8

[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 a SysV-style init script if in need of one.
[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).
[x]: 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 SourceX is a working URL.
[x]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[x]: 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.

Issues:
[!]: MUST Buildroot is not present
     Note: Buildroot is not needed unless packager plans to package for EPEL5
See: http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
[!]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean is needed only if supporting EPEL
See: http://fedoraproject.org/wiki/Packaging/Guidelines#.25clean
[!]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: defattr(....) present in %files section. This is OK if packaging
     for EPEL5. Otherwise not needed
See: http://fedoraproject.org/wiki/Packaging/Guidelines#FilePermissions
[!]: 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
See: None
[!]: MUST Requires correct, justified where necessary.
  * require Perl module instread of Perl distribution, for example,  Requires: perl(Regexp::Common) instead of perl-Regexp::Common
  * No need to Requires: perl explicitly

Generated by fedora-review 0.1.3
External plugins:

Other issues:
[!]: pod2man is used in %build, BR: /usr/bin/pod2man indead of 'perl'

[!]: filter should be:
%filter_from_requires /perl(Win32::File)/d;
%{?perl_default_filter}
Comment 9 Ricky Elrod 2012-06-14 23:39:19 EDT
* Removed EL5-specific steps.
* Fixed Requires and BuildRequires
* Fixed filter.

Spec URL: http://codeblock.fedorapeople.org/packages/cloc/cloc.spec
SRPM URL: http://codeblock.fedorapeople.org/packages/cloc/cloc-1.56-4.fc18.src.rpm
Comment 10 Robin Lee 2012-06-14 23:48:09 EDT
You can even remove the %clean section.

Approved.
Comment 12 Ricky Elrod 2012-06-14 23:56:02 EDT
New Package SCM Request
=======================
Package Name: cloc
Short Description: Count Lines of Code
Owners: codeblock
Branches: el6 f16 f17
InitialCC:
Comment 13 Gwyn Ciesla 2012-06-15 09:09:41 EDT
Git done (by process-git-requests).
Comment 14 Fedora Update System 2012-06-15 14:55:45 EDT
cloc-1.56-5.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/cloc-1.56-5.el6
Comment 15 Fedora Update System 2012-06-15 15:06:09 EDT
cloc-1.56-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/cloc-1.56-5.fc17
Comment 16 Fedora Update System 2012-06-15 15:18:34 EDT
cloc-1.56-5.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/cloc-1.56-5.fc16
Comment 17 Fedora Update System 2012-06-16 13:59:42 EDT
cloc-1.56-5.el6 has been pushed to the Fedora EPEL 6 testing repository.
Comment 18 Fedora Update System 2012-06-26 17:38:13 EDT
cloc-1.56-5.fc16 has been pushed to the Fedora 16 stable repository.
Comment 19 Fedora Update System 2012-06-26 17:40:33 EDT
cloc-1.56-5.fc17 has been pushed to the Fedora 17 stable repository.
Comment 20 Fedora Update System 2012-07-03 15:33:39 EDT
cloc-1.56-5.el6 has been pushed to the Fedora EPEL 6 stable repository.
Comment 21 Ricky Elrod 2014-11-15 05:09:27 EST
Package Change Request
======================
Package Name: cloc
New Branches: epel7
Owners: codeblock
Comment 22 Ricky Elrod 2014-11-15 05:11:26 EST
*** Bug 1164371 has been marked as a duplicate of this bug. ***
Comment 23 Gwyn Ciesla 2014-11-17 08:03:45 EST
Git done (by process-git-requests).

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