Bug 479803 (cabal2spec)

Summary: Review Request: cabal2spec - generates spec files for Haskell packages
Product: [Fedora] Fedora Reporter: Jens Petersen <petersen>
Component: Package ReviewAssignee: Parag AN(पराग) <panemade>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, haskell-devel, notting, panemade
Target Milestone: ---Flags: panemade: fedora-review+
kevin: 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: 2009-02-25 09:52:17 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 Jens Petersen 2009-01-13 07:22:03 UTC
Spec URL: http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging.spec
SRPM URL: http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging-0.1-1.fc10.src.rpm
Description: 
A first cut at separating the haskell packaging files out of ghc into a separate package.

Some thoughts:
- package could also be called ghc-packaging but that might sound more upstream (it is pretty fedora specific currently)
- probably need to host it on fedorahosted
- change license to GPLv3 or LGPLv3 (like fontpackages)?

Comment 1 Parag AN(पराग) 2009-01-13 09:29:58 UTC
few questions
1) why URL still drafts url?
https://fedoraproject.org/wiki/PackagingDrafts/Haskell
2) just a suggestion. How about using package name as haskell-packager?
3) Can it be possible to have all those Source files be tarred and released with license file on fedorapeople currently till you get fedorahosted page?
4) spec templates can be installed in /etc/rpmdevtools location instead to go for some %{_datadir}/%{name} location.

Comment 2 Jens Petersen 2009-01-14 00:26:20 UTC
Good questions:

> 1) why URL still drafts url?
> https://fedoraproject.org/wiki/PackagingDrafts/Haskell

Yeah it is kind of a chicken'n'egg kind of situation.  Actually I didn't follow the whole process of fontpackages wrt FPC (Fedora Packaging Committee) and the recent revision of the Fonts Packaging Guidelines: the files in the package are really part of the new Haskell Packaging Draft so it would probably make sense for them to be looked at by FPC as part of the Haskell Packaging Guidelines revision process.

> 2) just a suggestion. How about using package name as haskell-packager?

Hmm maybe the rpm macros and the templates should be separated then.  There are more rpm bits (scripts) coming for dependency generation.  I could move the spec templating part to haskell-packager: in the longer term we would probably like to rewrite/replace it with something in Haskell (like cabal2rpm).

> 3) Can it be possible to have all those Source files be tarred and released
> with license file on fedorapeople currently till you get fedorahosted page?

Yeah, before doing that I just wanted to put it out for discussion first. :)
Currently it is really small though and I doubt any other non-derived distro would be interested in the templates anyway so I was half-naively thinking that it could even just live in pkg cvs but that would probably be frowned upon these days?

> 4) spec templates can be installed in /etc/rpmdevtools location instead to go
> for some %{_datadir}/%{name} location.

Good point: I will change that.  Thanks.

Comment 3 Jens Petersen 2009-01-14 09:34:14 UTC
Spec URL:
http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging.spec
SRPM URL:
http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging-0.3-1.fc10.src.rpm

(In reply to comment #1)
> 1) why URL still drafts url?
> https://fedoraproject.org/wiki/PackagingDrafts/Haskell

Added a comment

> 2) just a suggestion. How about using package name as haskell-packager?

Still thinking on this - added a comment in spec - I need to look at some other packages for examples.

> 3) Can it be possible to have all those Source files be tarred and released
> with license file on fedorapeople currently till you get fedorahosted page?

Done (but untested:)

> 4) spec templates can be installed in /etc/rpmdevtools location instead to go
> for some %{_datadir}/%{name} location.

Done

Comment 4 Jens Petersen 2009-01-20 03:51:26 UTC
Spec URL: http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging.spec
SRPM URL: http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging-0.4-1.fc10.src.rpm

Noarch: http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging-0.4-1.fc10.noarch.rpm

Templates and cabal2spec have been removed from ghc-6.10.1-7.fc11 so this should now install.


* Tue Jan 20 2009 Jens Petersen <petersen> - 0.4-1
- move ghc_version back to templates for now
- leave macros.ghc in ghc
- require ghc

Comment 5 Jens Petersen 2009-01-20 03:52:13 UTC
Still open to improvements to the name. :)

Comment 6 Jens Petersen 2009-01-20 04:01:29 UTC
Spec URL:
http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging.spec
SRPM URL:
http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging-0.4-2.fc10.src.rpm

Noarch:
http://petersen.fedorapeople.org/haskell-packaging/haskell-packaging-0.4-2.fc10.noarch.rpm


* Tue Jan 20 2009 Jens Petersen <petersen> - 0.4-2
- remove old todo comments about splitting and ghc dep

Comment 7 Jens Petersen 2009-01-20 09:16:37 UTC
I think now it makes more sense to name the package after the script itself (currently cabal2spec).

Spec URL:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec.spec
SRPM URL:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec-0.4-3.fc10.src.rpm

Noarch:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec-0.4-3.fc10.noarch.rpm

Comment 8 Jens Petersen 2009-02-09 12:52:52 UTC
Spec URL:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec.spec
SRPM URL:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec-0.5-1.fc10.src.rpm

Noarch:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec-0.5-1.fc10.noarch.rpm


I dunno how long it will be before FPC revisits the Haskell Guidelines.  (I guess I need to submit it formally after the initial RFC.)

Maybe we can just complete this review and then make any updates later as appropriate?  It would be good to have this included in F11 anyway IMHO.

Comment 9 Jens Petersen 2009-02-09 12:54:22 UTC
This is the changelog:

* Mon Feb  9 2009 Jens Petersen <petersen> - 0.5-1
- add cabal2spec-diff script to diff current spec against current template
- add ghc-doc BR to binlib and lib templates

Comment 10 Parag AN(पराग) 2009-02-11 11:12:58 UTC
you should have 
%config(noreplace) %{_sysconfdir}/rpmdevtools
like we have in rpmdevtools

Comment 12 Jens Petersen 2009-02-23 06:03:06 UTC
Spec URL:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec.spec
SRPM URL:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec-0.7-1.fc10.src.rpm

Noarch:
http://petersen.fedorapeople.org/cabal2spec/cabal2spec-0.7-1.fc10.noarch.rpm


* Mon Feb 23 2009 Jens Petersen <petersen> - 0.7-1
- cabal2spec-0.7:
  - use %%global instead of %%define
  - quieten output of scripts
- updates urls to fedorahosted

Source and tarballs now on fedorahosted.

Comment 13 Parag AN(पराग) 2009-02-23 09:11:34 UTC
Review:
+ package builds in mock (rawhide i386).
koji Build => http://koji.fedoraproject.org/koji/taskinfo?taskID=1145408
+ rpmlint is silent for SRPM and for RPM.
+ source files match upstream url
d2586c3c99e2ae06c8721409cf440343  cabal2spec-0.7.tar.gz
+ package meets naming and packaging guidelines.
+ specfile is properly named, is cleanly written
+ Spec file is written in American English.
+ Spec file is legible.
+ dist tag is present.
+ build root is correct.
+ license is open source-compatible.
+ License text is included in package.
+ %doc is present.
+ BuildRequires are proper.
+ %clean is present.
+ package installed properly.
+ Macro use appears rather consistent.
+ Package contains code, not content.
+ no headers or static libraries.
+ no .pc file present.
+ no -devel subpackage
+ no .la files.
+ no translations are available
+ Does owns the directories it creates.
+ no scriptlets present.
+ no duplicates in %files.
+ file permissions are appropriate.
+ Not a GUI App.

APPROVED.

Comment 14 Jens Petersen 2009-02-24 12:08:26 UTC
Thanks for the review.


New Package CVS Request
=======================
Package Name: cabal2spec
Short Description: RPM packaging tool for Haskell Cabal Packages
Owners: petersen
Branches: F-10 F-9
InitialCC: haskell-sig

Comment 15 Kevin Fenzi 2009-02-24 21:11:57 UTC
cvs done.

Comment 16 Jens Petersen 2009-02-25 09:52:17 UTC
Thanks - package imported and built.