Bug 682666 - Review Request: DeTex - A program to remove TeX constructs from a text file
Review Request: DeTex - A program to remove TeX constructs from a text file
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mohamed El Morabity
Fedora Extras Quality Assurance
:
: 626175 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-07 03:08 EST by Ankur Sinha (FranciscoD)
Modified: 2011-05-19 00:55 EDT (History)
5 users (show)

See Also:
Fixed In Version: detex-2.8-2.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-28 13:42:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
pikachu.2014: fedora‑review+
dennis: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Ankur Sinha (FranciscoD) 2011-03-07 03:08:43 EST
Spec URL: http://ankursinha.fedorapeople.org/detex/detex.spec
SRPM URL: http://ankursinha.fedorapeople.org/detex/detex-2.8-1.fc14.src.rpm
Description: 

Detex is a program to remove TeX constructs from a text file.  It recognizes
the \input command.

This program assumes it is dealing with LaTeX input if it sees the string
"\begin{document}" in the text.  It recognizes the \include and \includeonly
commands.
Comment 1 Ankur Sinha (FranciscoD) 2011-03-07 03:09:52 EST
*** Bug 626175 has been marked as a duplicate of this bug. ***
Comment 2 Mohamed El Morabity 2011-04-14 21:19:40 EDT
Since I *really* need this tool, I'd be glad to review it.


Some comments:

* your patch could be *really* simplified:
   - the flex package provides also lex, which is a symbolic link to flex ;
   - in the same way, libl.a is provided by the flex-static package and is a symbolic link to libfl.a
   As a result, modifying the LEX and LEXLIB variables in your patch is useless.
  You could even skip the « make install ... » instruction in %install in your .spec, and manually install the binary and the man page, like below:
  %install
  rm -rf $RPM_BUILD_ROOT
  install -Dpm 755 detex $RPM_BUILD_ROOT%{_bindir}/detex
  install -Dpm 644 detex.1l $RPM_BUILD_ROOT%{_mandir}/man1/detex.1l
(notice the -p option of install to preserve timestamp during installation).

* detex is not compiled using the Fedora standard flags ($RPM_OPT_FLAGS). It appears clearly in compilation logs. Moreover the generated *-debug package is unusable. You must set the CFLAGS when calling make:
   %build
   make CFLAGS="$RPM_OPT_FLAGS"
You can even add to CFLAGS the « -DNO_MALLOC_DECL » option you enabled on your patch; by this way, the patch is useless and can be removed from your package:
   %build
   make CFLAGS="$RPM_OPT_FLAGS -DNO_MALLOC_DECL"

* The 1l section for man pages is sometimes intended for programs installed in /usr/local. This may be the reason for the man page to be suffixed « 1l ». Whatever the explanation, it's not correct. I suggest you to rename the man page to « detex.1 »: in %install, simply:
  %install
  rm -rf $RPM_BUILD_ROOT
  install -Dpm 755 detex $RPM_BUILD_ROOT%{_bindir}/detex
  install -Dpm 644 detex.1l $RPM_BUILD_ROOT%{_mandir}/man1/detex.1
(dont forget to fix it also in %files section of your .spec).
As a result, you should also patch the man page and replace each occurence of « 1L » to « 1 ».
Comment 3 Ankur Sinha (FranciscoD) 2011-04-16 05:13:08 EDT
Thank you for the review :)

I've made the changes.

Please find the spec here:
http://ankursinha.fedorapeople.org/detex/detex.spec

SRPM: 
http://ankursinha.fedorapeople.org/detex/detex-2.8-2.fc14.src.rpm

A koji scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3004874

I did get rid of the patch completely. Please do have a look at the sed usage in the prep section once. 

Thanks.
Ankur
Comment 4 Mohamed El Morabity 2011-04-16 06:57:09 EDT
That looks good :)

According to the guidelines, patches in a .spec should have a comment. This concerns also fixes made through sed.
This will not (only) help the reviewer, but it help you as a maintainer.
By the way, why these lines in %prep?
   sed -i "/rm -f xxx\.l/d" Makefile
   sed -i "s/mv lex\.yy\.c detex\.c/cp lex\.yy\.c detex\.c/" Makefile

In %description, use « DeTeX » instead of « Detex ». This seems to be the « official » name of the application.
Comment 5 Mohamed El Morabity 2011-04-26 21:00:16 EDT
Ping?
Comment 6 Ankur Sinha (FranciscoD) 2011-04-28 05:11:58 EDT
AH! Sorry, I missed out on the earlier mail.

(In reply to comment #4)
> That looks good :)
> 
> According to the guidelines, patches in a .spec should have a comment. This
> concerns also fixes made through sed.

I'll add the comments.

> This will not (only) help the reviewer, but it help you as a maintainer.
> By the way, why these lines in %prep?
>    sed -i "/rm -f xxx\.l/d" Makefile
>    sed -i "s/mv lex\.yy\.c detex\.c/cp lex\.yy\.c detex\.c/" Makefile
> 

The above sed commands are to make some changes in the Makefile to enable proper generation of debuginfo. If these files are removed/moved, debuginfo generation fails. 

> In %description, use « DeTeX » instead of « Detex ». This seems to be the «
> official » name of the application.

Okay. 

Do I upload a new spec? Or can I make these changes before the scm commit please? (Since only comments etc. are required)

Thanks,
Ankur
Comment 7 Christoph Wickert 2011-04-28 05:20:53 EDT
You upload not only a new spec but a new srpm because we are reviewing srpms.
Comment 8 Ankur Sinha (FranciscoD) 2011-04-28 05:32:19 EDT
(In reply to comment #7)
> You upload not only a new spec but a new srpm because we are reviewing srpms.

Well, I've got to keep you happy:

http://ankursinha.fedorapeople.org/detex/detex.spec

http://ankursinha.fedorapeople.org/detex/detex-2.8-2.fc15.src.rpm

Ankur
Comment 9 Mohamed El Morabity 2011-04-28 05:41:25 EDT
> > By the way, why these lines in %prep?
> >    sed -i "/rm -f xxx\.l/d" Makefile
> >    sed -i "s/mv lex\.yy\.c detex\.c/cp lex\.yy\.c detex\.c/" Makefile
> 
> The above sed commands are to make some changes in the Makefile to enable
> proper generation of debuginfo. If these files are removed/moved, debuginfo
> generation fails. 
OK, good catch :)

You forgot in the last .spec you uploaded to replace « DeTex » by « DeTeX ». Anyway, it's a minor issue, I trust you to fix it before you upload the package.

Here is the review:

MUST: rpmlint must be run on every package.
->OK, only false-positive spelling issues

MUST: The package must be named according to the Package Naming Guidelines.
->OK

MUST: The spec file name must match the base package %{name}, in the format
      %{name}.spec unless your package has an exemption.
->OK

MUST: The package must meet the Packaging Guidelines.
->OK

MUST: The package must be licensed with a Fedora approved license and meet the
      Licensing Guidelines.
->OK

MUST: The License field in the package spec file must match the actual license.
->OK

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 must be included in %doc.
->OK

MUST: The spec file must be written in American English.
->OK

MUST: The spec file for the package MUST be legible.
->OK

MUST: The sources used to build the package must match the upstream source, as
      provided in the spec URL.
->OK, md5sum = 7a96b647f43bb077323cde92faa1e893

MUST: The package MUST successfully compile and build into binary rpms on at
      least one primary architecture.
->OK, see http://koji.fedoraproject.org/koji/taskinfo?taskID=3032154

MUST: If the package does not successfully compile, build or work on an
      architecture, then those architectures should be listed in the spec in
      ExcludeArch.
->N/A

MUST: All build dependencies must be listed in BuildRequires, except for any
      that are listed in the exceptions section of the Packaging Guidelines ;
      inclusion of those as BuildRequires is optional.
->OK

MUST: The spec file MUST handle locales properly. This is done by using the
      %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
->N/A

MUST: Every binary RPM package (or subpackage) which stores shared library files
      (not just symlinks) in any of the dynamic linker's default paths, must
      call ldconfig in %post and %postun.
->N/A

MUST: Packages must NOT bundle copies of system libraries.
->OK

MUST: If the package is designed to be relocatable, the packager must state this
      fact in the request for review, along with the rationalization for
      relocation of that specific package. Without this, use of Prefix: /usr is
      considered a blocker.
->N/A

MUST: A package must own all directories that it creates. If it does not create
      a directory that it uses, then it should require a package which does
      create that directory.
>OK

MUST: A Fedora package must not list a file more than once in the spec file's
      %files listings. 
->OK

MUST: Permissions on files must be set properly. Executables should be set with
      executable permissions, for example. Every %files section must include a
      %defattr(...) line.
->OK

MUST: Each package must consistently use macros.
->OK

MUST: The package must contain code, or permissable content.
->OK

MUST: Large documentation files must go in a -doc subpackage.
->N/A

MUST: If a package includes something as %doc, it must not affect the runtime of
      the application. To summarize: If it is in %doc, the program must run
      properly if it is not present.
->OK

MUST: Header files must be in a -devel package.
->N/A

MUST: Static libraries must be in a -static package.
->N/A

MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1),
      then library files that end in .so (without suffix) must go in a -devel
      package.
->N/A

MUST: In the vast majority of cases, devel packages must require the base
      package using a fully versioned dependency: Requires: %{name} =
      %{version}-%{release}.
->N/A

MUST: Packages must NOT contain any .la libtool archives, these must be removed
      in the spec if they are built.
->OK

MUST: Packages containing GUI applications must include a %{name}.desktop file,
      and that file must be properly installed with desktop-file-install in the
      %install section.
->N/A

MUST: Packages must not own files or directories already owned by other
      packages.
->OK

MUST: All filenames in rpm packages must be valid UTF-8.
->OK

This package is APPROVED!
Comment 10 Christoph Wickert 2011-04-28 05:52:18 EDT
There is still a small bug in the spec: the release was not bumped and -2 is in the changelog twie.
Comment 11 Ankur Sinha (FranciscoD) 2011-04-28 05:58:15 EDT
(In reply to comment #10)
> There is still a small bug in the spec: the release was not bumped and -2 is in
> the changelog twie.

That isn't a bug afaics:

http://fedoraproject.org/wiki/PackagingGuidelines#Multiple_Changelog_Entries_per_Release

Before I do an SCM request, should I change the *entire* package name to DeTeX Mohamed? I mean, change the spec name to DeTeX too, along with the changes in the description? (The final binary, and source is named detex though)

And, I did make the change in the description, I changed Detex to DeTex, (forgot the X! XD )

Thanks for the review!!
Ankur
Comment 12 Christoph Wickert 2011-04-28 06:15:35 EDT
(In reply to comment #11)
> (In reply to comment #10)
> > There is still a small bug in the spec: the release was not bumped and -2 is in
> > the changelog twie.
> 
> That isn't a bug afaics:
> 
> http://fedoraproject.org/wiki/PackagingGuidelines#Multiple_Changelog_Entries_per_Release

But we should have had two releases actually, even during a review. And if you substitute multiple versions in a changelog entry, it should actually be 

* Thu Apr 28 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.8-2
- removed patch
- renamed man page to .1 instead of .1l
- corrected compilation flags
- Review ticket #682666
- Added *comments*

Highest version/release and latest date contain all changes.

I suggest to leave it at -2 and just change the changelog.

> Before I do an SCM request, should I change the *entire* package name to DeTeX
> Mohamed?

Please don't, leave the spec and the package "detex" please. LaTeX is also written lowercase in our package names

"While case sensitivity is not a mandatory requirement, case should only be used where necessary."
from http://fedoraproject.org/wiki/PackageNamingGuidelines#Case_Sensitivity
Comment 13 Ankur Sinha (FranciscoD) 2011-04-28 06:25:36 EDT
Hello,

(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > There is still a small bug in the spec: the release was not bumped and -2 is in
> > > the changelog twie.
> > 
> > That isn't a bug afaics:
> > 
> > http://fedoraproject.org/wiki/PackagingGuidelines#Multiple_Changelog_Entries_per_Release
> 
> But we should have had two releases actually, even during a review. And if you
> substitute multiple versions in a changelog entry, it should actually be 
> 
> * Thu Apr 28 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.8-2
> - removed patch
> - renamed man page to .1 instead of .1l
> - corrected compilation flags
> - Review ticket #682666
> - Added *comments*
> 
> Highest version/release and latest date contain all changes.
> 
> I suggest to leave it at -2 and just change the changelog.

Okay, although the link that I posted above gives two ways of doing it (one of which is what I used).

> 
> > Before I do an SCM request, should I change the *entire* package name to DeTeX
> > Mohamed?
> 
> Please don't, leave the spec and the package "detex" please. LaTeX is also
> written lowercase in our package names
> 
> "While case sensitivity is not a mandatory requirement, case should only be
> used where necessary."
> from http://fedoraproject.org/wiki/PackageNamingGuidelines#Case_Sensitivity

Okay. 

Thank you for the clarification :)

Ankur
Comment 14 Ankur Sinha (FranciscoD) 2011-04-28 06:27:25 EDT
New Package SCM Request
=======================
Package Name: detex
Short Description: A program to remove TeX constructs from a text file
Owners: ankursinha
Branches: f14 f15
InitialCC:
Comment 15 Dennis Gilmore 2011-04-28 12:39:13 EDT
Git done (by process-git-requests).
Comment 16 Fedora Update System 2011-04-28 13:44:25 EDT
detex-2.8-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/detex-2.8-2.fc15
Comment 17 Fedora Update System 2011-04-28 13:51:01 EDT
detex-2.8-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/detex-2.8-2.fc14
Comment 18 Fedora Update System 2011-05-07 15:56:12 EDT
detex-2.8-2.fc14 has been pushed to the Fedora 14 stable repository.
Comment 19 Fedora Update System 2011-05-19 00:55:06 EDT
detex-2.8-2.fc15 has been pushed to the Fedora 15 stable repository.

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