Bug 172872 - Review Request: sloccount
Review Request: sloccount
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ed Hill
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-11-10 14:14 EST by Bastien Nocera
Modified: 2011-11-29 18:58 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-04 05:18:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
limburgher: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2005-11-10 14:14:04 EST
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
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 16:29:22 EST
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

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-12 20:28:43 EST
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 

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:
Comment 3 Bastien Nocera 2005-12-13 16:09:23 EST
" - 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 11:42:38 EST
Hi Bastien, its been 2+ months since the last comment -- is this submission 
still active?
Comment 5 Bastien Nocera 2006-02-19 13:28:36 EST
I really slacked on that. Just need to do some work on it...
Comment 7 Ed Hill 2006-04-03 13:36:48 EDT
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

 - 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 14:24:22 EDT
[note: the above was an sha1sum]

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

Comment 9 Bastien Nocera 2006-04-04 05:18:11 EDT
Thanks for the advices Ed, it's all in CVS now.
Comment 10 Michael Schwendt 2006-04-04 12:50:19 EDT
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
+make CC="gcc ${RPM_OPT_FLAGS}"
 rm -rf ${RPM_BUILD_ROOT}
Comment 11 Bastien Nocera 2006-04-05 04:46:59 EDT
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 16:44:01 EST
Package Change Request
Package Name: sloccount
New Branches: el5 el6
Owners: hadess grover
Comment 13 Gwyn Ciesla 2011-11-29 18:58:42 EST
Git done (by process-git-requests).

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