Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 172872

Summary: Review Request: sloccount
Product: [Fedora] Fedora Reporter: Bastien Nocera <bnocera>
Component: Package ReviewAssignee: Ed Hill <ed>
Status: CLOSED NEXTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: agrover, fedora-extras-list, jwboyer
Target Milestone: ---Flags: gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-04 09:18:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 163779    

Description Bastien Nocera 2005-11-10 19:14:04 UTC
Spec Name or Url: http://files.hadess.net/redhat/perso/spec/sloccount.spec
SRPM Name or Url: http://files.hadess.net/redhat/perso/source/sloccount-2.26-1.src.rpm
Description:
SLOCCount (pronounced "sloc-count") is a suite of programs for counting
physical source lines of code (SLOC) in potentially large software systems
(thus, SLOCCount is a "software metrics tool" or "software measurement tool").

SLOCCount can count physical SLOC for a wide number of languages;
listed alphabetically, they are: Ada, Assembly, awk, Bourne shell, C, C++,
C shell, COBOL, Expect, Fortran, Java, lex/flex, LISP (including Scheme),
Modula-3, Objective-C, Pascal, Perl, PHP, Python, sed, TCL, and Yacc.
SLOCCount can automatically determine if a file
is a source code file or not, and if so, which language it's written in.

As a result, you can analyze large systems completely automatically;
it's been used to examine entire GNU/Linux distributions, for example.
SLOCCount also includes some report-generating tools
to collect the data generated and present it in several different formats.
Normally you can just run "sloccount DIRECTORY" and all the source code
in the directory and its descendants will be counted.

Comment 1 Josh Boyer 2005-11-10 21:29:22 UTC
I don't know what the policies of Fedora are on data that is generated by a
program, but sloccount produces the following statement at the bottom of each
report:

SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL.
SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to
redistribute it under certain conditions as specified by the GNU GPL license;
see the documentation for details.
Please credit this data as "generated using David A. Wheeler's 'SLOCCount'."

Does the "Please credit.." line cause a problem at all?  Is it required when
including the data in a report, etc?


Comment 2 Ed Hill 2005-11-13 01:28:43 UTC
Hi Bastien & Josh, I don't think the "Please credit..." line should be seen 
as anything more (or less!) than a polite request by the author.  The lines
immediately preceeding it clearly and unequivocally state that SLOCCount is 
GPL-ed.

Moving on to a quick (incomplete!) review, I noticed the following:

 - the source does not match upstream according to:

     wget http://www.dwheeler.com/sloccount/sloccount-2.26.tar.gz
     cmp sloccount-2.26.tar.gz.1 sloccount-2.26.tar.gz

   and this is a necessary pre-requisiste for almost any review

 - wrong "BuildRoot:" is used -- please see:
     http://fedoraproject.org/wiki/PackagingGuidelines


Comment 3 Bastien Nocera 2005-12-13 21:09:23 UTC
" - the source does not match upstream according to:"
I'll blame Scott on that one, I used his source RPM as a starting point.

I'll fix up the rest of the .spec when I have a moment.

Comment 4 Ed Hill 2006-02-19 16:42:38 UTC
Hi Bastien, its been 2+ months since the last comment -- is this submission 
still active?

Comment 5 Bastien Nocera 2006-02-19 18:28:36 UTC
I really slacked on that. Just need to do some work on it...

Comment 7 Ed Hill 2006-04-03 17:36:48 UTC
Hi Bastien,

The above SRPM URL gave a 404 but I found the "-2" rev which I assume
you meant to reference in the first place.

36397816454626ed4abc11afc66783aaec01f444  sloccount-2.26-2.src.rpm

good:
 - source matches upstream
 - builds on FC4 i386 (still waiting on the mock build...)
 - rpmlint OK -- no warnings or errors
 - name OK
 - license is OK and correctly included
 - spec-file is clean and simple (although it might be 
     nice to use "%setup -q" but thats just a suggestion!)
 - no shared libs
 - dir ownership and permissions OK

very minor nit:
 - the description could be shortened a bit and the text 
     better formatted -- but thats not a blocker

Its taking me a while to get a mock build and I think its due to a 
slow network connection.  As soon as I get a clean mock build, I'll 
approve the package.

Comment 8 Ed Hill 2006-04-03 18:24:22 UTC
[note: the above was an sha1sum]

Builds in mock on FC4 i386.  Ran OK on some simple tests.

APPROVED.

Comment 9 Bastien Nocera 2006-04-04 09:18:11 UTC
Thanks for the advices Ed, it's all in CVS now.

Comment 10 Michael Schwendt 2006-04-04 16:50:19 UTC
Doesn't build with RPM optflags. A complete patch would be needed
(since CFLAGS are not accepted) or a hack like this:

--- sloccount.spec.orig 2006-04-04 11:21:23.000000000 +0200
+++ sloccount.spec      2006-04-04 18:54:27.000000000 +0200
@@ -19,7 +19,7 @@
 %setup -q
 
 %build
-make
+make CC="gcc ${RPM_OPT_FLAGS}"
 
 %install
 rm -rf ${RPM_BUILD_ROOT}


Comment 11 Bastien Nocera 2006-04-05 08:46:59 UTC
That's actually what's recommended:
# Set this to your C compiler, if it's not "gcc"; a likely alternative is "cc".
# The "-Wall" option turns on warnings in gcc.  gcc users might also want
# to consider using "-Werror", which turns warnings into errors.
CC=gcc -Wall

Should be fixed in sloccount-2.26-4

Comment 12 Andy Grover 2011-11-29 21:44:01 UTC
Package Change Request
======================
Package Name: sloccount
New Branches: el5 el6
Owners: hadess grover

Comment 13 Gwyn Ciesla 2011-11-29 23:58:42 UTC
Git done (by process-git-requests).