Bug 629145

Summary: Review Request: ghc-cmdargs - Haskell command argument parsing
Product: [Fedora] Fedora Reporter: Ben Boeckel <fedora>
Component: Package ReviewAssignee: Peter Robinson <pbrobinson>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, haskell-devel, notting, pbrobinson
Target Milestone: ---Flags: pbrobinson: fedora-review+
j: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ghc-cmdargs-0.6.3-2.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-08 21:44:33 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:

Description Ben Boeckel 2010-09-01 04:29:39 UTC
Spec URL: http://benboeckel.net/packaging/cmdargs/cmdargs.spec
SRPM URL: http://benboeckel.net/packaging/cmdargs/cmdargs-0.2-1.fc14.src.rpm
Description:
A library to support command argument parsing.

Comment 1 Jens Petersen 2010-09-01 05:50:59 UTC
I think Ben is going to submit it as ghc-cmdargs
since cabal2spec gave it a false binlib positive
because of the included demo program.

Comment 2 Jens Petersen 2010-09-01 05:52:53 UTC
BTW a quick hack to do that is to edit out the executable
from a copy of cmdargs.cabal and run cabal2spec on the modified file.
That should give you a lib ghc-cmdargs.spec.

Comment 3 Jens Petersen 2010-09-01 05:53:51 UTC
Perhaps I should add an optional ignore arg to cabal2spec for that.

Comment 4 Ben Boeckel 2010-09-01 23:11:08 UTC
Spec URL: http://benboeckel.net/packaging/cmdargs/ghc-cmdargs.spec
SRPM URL: http://benboeckel.net/packaging/cmdargs/ghc-cmdargs-0.2-1.fc14.src.rpm

Updated to just do the library.

Comment 5 Jens Petersen 2010-09-05 10:18:40 UTC
BTW 0.4 was released if you can use that.

Comment 6 Ben Boeckel 2010-09-05 15:19:33 UTC
Spec URL: http://benboeckel.net/packaging/cmdargs/ghc-cmdargs.spec
SRPM URL: http://benboeckel.net/packaging/cmdargs/ghc-cmdargs-0.4-1.fc14.src.rpm

Also gave a better summary/description (from cabal).

% lintmock fedora-14-x86_64-bb
ghc-cmdargs.src: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-cmdargs.src: W: strange-permission cmdargs-0.4.tar.gz 0640L
ghc-cmdargs.src: W: strange-permission ghc-cmdargs.spec 0640L
ghc-cmdargs.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-cmdargs-prof.x86_64: E: devel-dependency ghc-cmdargs-devel
ghc-cmdargs-prof.x86_64: W: no-documentation
ghc-cmdargs-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-6.12.3/cmdargs-0.4/libHScmdargs-0.4_p.a
4 packages and 0 specfiles checked; 1 errors, 6 warnings.

Comment 7 Peter Robinson 2010-09-06 21:21:12 UTC
I'll take this

Comment 8 Peter Robinson 2010-09-06 22:15:02 UTC
+ rpmlint output

$ rpmlint ghc-cmdargs*
ghc-cmdargs.src: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-cmdargs.src: W: strange-permission cmdargs-0.4.tar.gz 0640L
ghc-cmdargs.src: W: strange-permission ghc-cmdargs.spec 0640L
ghc-cmdargs.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-cmdargs-prof.x86_64: E: devel-dependency ghc-cmdargs-devel
ghc-cmdargs-prof.x86_64: W: no-documentation
ghc-cmdargs-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-6.12.3/cmdargs-0.4/libHScmdargs-0.4_p.a
4 packages and 1 specfiles checked; 1 errors, 6 warnings.

+ package name satisfies the packaging naming guidelines
+ specfile name matches the package base name
+ package should satisfy packaging guidelines
+ license meets guidelines and is acceptable to Fedora
+ license matches the actual package license
+ latest version packaged

+ %doc includes license file
+ spec file written in American English
+ spec file is legible
+ upstream sources match sources in the srpm
  33c45101ddb9c5f1ab996633744bdc7d  cmdargs-0.4.tar.gz
+ package successfully builds on at least one architecture
  tested using koji scratch build
+ BuildRequires list all build dependencies
n/a %find_lang instead of %{_datadir}/locale/*
n/a binary RPM with shared library files must call ldconfig in %post and %postun+ does not use Prefix: /usr
n/a package owns all directories it creates
n/a no duplicate files in %files
+ Package perserves timestamps on install
- Permissions on files must be set properly
  see rpmlint output
? %defattr line
  No way to tell as there is no %file manifest
+ consistent use of macros
+ package must contain code or permissible content
n/a large documentation files should go in -doc subpackage
+ files marked %doc should not affect package runtime 
n/a header files should be in -devel
- static libraries should be in -static
  There is a .a file contained but its not clear from the haskell package guidelines regarding this
n/a packages containing pkgconfig (.pc) files need 'Requires: pkgconfig'
n/a libfoo.so must go in -devel
n/a devel must require the fully versioned base
+ packages should not contain libtool .la files
n/a packages containing GUI apps must include %{name}.desktop file
+ packages must not own files or directories owned by other packages
+ filenames must be valid UTF-8

Optional:

+ if there is no license file, packager should query upstream to include it
n/a translations of description and summary for non-English languages, if
available
+ reviewer should build the package in mock/koji
+ the package should build into binary RPMs on all supported architectures
n/a review should test the package functions as described
+ scriptlets should be sane
+ non -devel packages should require fully versioned base
n/a pkgconfig files should go in -devel
+ shouldn't have file dependencies outside /etc /bin /sbin /usr/bin or
/usr/sbin
n/1 Package should have man files

Comment 9 Jens Petersen 2010-09-13 06:43:43 UTC
(In reply to comment #8)
> ? %defattr line
>   No way to tell as there is no %file manifest

You can check the filelists %{name}*.files in
the build directory.  They are automatically generated
by macros in macros.ghc.

> - static libraries should be in -static
>   There is a .a file contained but its not clear from the haskell package
> guidelines regarding this

Agreed this is unfortunate but currently ghc assumes and requires
the presence of the static library so they can't be subpackaged yet.
I hope this will change in the future.  (Actually ghc's shared
library support is still considered somewhat experimental
but seems to work well - I don't know if any other distro which
has actually adopted them yet though.)  The Haskell Guidelines
should state this clearly, though they were written but ghc-6.12
which introduced shared lib support on linux.

http://fedoraproject.org/wiki/Packaging/Haskell#Static_vs._Dynamic_Linking

Yes, the packaging guidelines need a refresh too.

Running cabal2spec-diff on the tarball should show you
how the package differences from the standard Haskell templates.

Comment 10 Jens Petersen 2010-09-17 10:33:17 UTC
0.5 was released btw.

Comment 12 Peter Robinson 2010-09-22 07:06:50 UTC
> > - static libraries should be in -static
> >   There is a .a file contained but its not clear from the haskell package
> > guidelines regarding this
> 
> Agreed this is unfortunate but currently ghc assumes and requires
> the presence of the static library so they can't be subpackaged yet.
> I hope this will change in the future.  (Actually ghc's shared
> library support is still considered somewhat experimental
> but seems to work well - I don't know if any other distro which
> has actually adopted them yet though.)  The Haskell Guidelines
> should state this clearly, though they were written but ghc-6.12
> which introduced shared lib support on linux.

So there's an agreed exception here with the packaging committee? There's only that and the rpmlint errors blocking this.

Comment 13 Ben Boeckel 2010-10-30 22:20:50 UTC
Spec URL: http://benboeckel.net/packaging/ghc-cmdargs/ghc-cmdargs.spec
SRPM URL: http://benboeckel.net/packaging/ghc-cmdargs/ghc-cmdargs-0.6.1-1.fc14.src.rpm

% lintmock fedora-14-x86_64-bb
ghc-cmdargs.src: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-cmdargs.src: W: strange-permission cmdargs-0.6.1.tar.gz 0640L
ghc-cmdargs.src: W: strange-permission ghc-cmdargs.spec 0640L
ghc-cmdargs.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-cmdargs-prof.x86_64: E: devel-dependency ghc-cmdargs-devel
ghc-cmdargs-prof.x86_64: W: no-documentation
ghc-cmdargs-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-6.12.3/cmdargs-0.6.1/libHScmdargs-0.6.1_p.a
4 packages and 0 specfiles checked; 1 errors, 6 warnings.

Comment 14 Jens Petersen 2010-11-01 00:29:14 UTC
(In reply to comment #12)
> > The Haskell Guidelines
> > should state this clearly, though they were written *before* ghc-6.12
> > which introduced shared lib support on linux.
> 
> So there's an agreed exception here with the packaging committee?

Well yes: it has been like this forever for ghc.
Static libraries are still the default for ghc.

I think http://fedoraproject.org/wiki/Packaging:Haskell#Static_vs._Dynamic_Linking is supposed to imply this but unfortunately it doesn't read well. :-(

Comment 15 Peter Robinson 2010-11-01 13:36:53 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > > The Haskell Guidelines
> > > should state this clearly, though they were written *before* ghc-6.12
> > > which introduced shared lib support on linux.
> > 
> > So there's an agreed exception here with the packaging committee?
> 
> Well yes: it has been like this forever for ghc.
> Static libraries are still the default for ghc.
> 
> I think
> http://fedoraproject.org/wiki/Packaging:Haskell#Static_vs._Dynamic_Linking is
> supposed to imply this but unfortunately it doesn't read well. :-(

OK, looks reasonable (I don't think I found that previously). APPROVED

Comment 16 Ben Boeckel 2010-11-13 01:38:43 UTC
New Package CVS Request
=======================
Package Name: ghc-cmdargs
Short Description: Haskell command argument parsing
Owners: mathstuf
Branches: F-13 F-14
InitialCC: haskell-sig

Comment 17 Jason Tibbitts 2010-11-13 16:49:09 UTC
Git done (by process-git-requests).

Comment 18 Jens Petersen 2010-11-29 04:00:59 UTC
Packages now built in koji.  It would be good to push them to Bodhi.

Comment 19 Ben Boeckel 2010-11-30 00:19:37 UTC
Submitted.

Comment 20 Fedora Update System 2010-11-30 00:19:46 UTC
ghc-cmdargs-0.6.3-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/ghc-cmdargs-0.6.3-2.fc13

Comment 21 Fedora Update System 2010-11-30 00:19:53 UTC
ghc-cmdargs-0.6.3-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/ghc-cmdargs-0.6.3-2.fc14

Comment 22 Fedora Update System 2010-11-30 22:34:48 UTC
ghc-cmdargs-0.6.3-2.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 ghc-cmdargs'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ghc-cmdargs-0.6.3-2.fc14

Comment 23 Fedora Update System 2010-12-08 21:44:28 UTC
ghc-cmdargs-0.6.3-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2010-12-08 21:44:40 UTC
ghc-cmdargs-0.6.3-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.