Bug 546376 - Review Request: ghc-chalmers-lava2000 - Haskell hardware description library
Review Request: ghc-chalmers-lava2000 - Haskell hardware description library
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-10 13:33 EST by Shakthi Kannan
Modified: 2010-07-07 13:41 EDT (History)
6 users (show)

See Also:
Fixed In Version: ghc-chalmers-lava2000-1.1.1-5.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-30 04:17:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
petersen: fedora‑review+
tibbs: fedora‑cvs+


Attachments (Terms of Use)
ghc-chalmers-lava2000.spec-1.patch (3.91 KB, patch)
2010-05-21 04:01 EDT, Jens Petersen
no flags Details | Diff
ghc-chalmers-lava2000.spec.orig2 (1.64 KB, patch)
2010-05-24 01:18 EDT, Jens Petersen
no flags Details | Diff
ghc-chalmers-lava2000.spec-2.patch (1.40 KB, patch)
2010-06-29 09:41 EDT, Jens Petersen
no flags Details | Diff

  None (edit)
Description Shakthi Kannan 2009-12-10 13:33:29 EST
Spec URL: http://shakthimaan.fedorapeople.org/SPECS/ghc-chalmers-lava2000.spec
SRPM URL: http://shakthimaan.fedorapeople.org/SRPMS/ghc-chalmers-lava2000-1.0.2-1.fc12.src.rpm
Description: This package provides the Haskell chalmers-lava2000 library for ghc.

Successful Koji builds for F-11, F-12:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1867636
http://koji.fedoraproject.org/koji/taskinfo?taskID=1867644
Comment 1 Shakthi Kannan 2009-12-20 07:25:43 EST
* Created patch to remove verification modules in build that use wrapper scripts that require, and invoke third party non-free binaries.
* Remove Scripts/ folder.
* Wrote README.fedora and removed default README.

Spec URL: http://shakthimaan.fedorapeople.org/SPECS/ghc-chalmers-lava2000.spec
SRPM URL: http://shakthimaan.fedorapeople.org/SRPMS/ghc-chalmers-lava2000-1.1.1-1.fc12.src.rpm

Successful Koji builds for F-11, F-12:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1881728
http://koji.fedoraproject.org/koji/taskinfo?taskID=1881732
Comment 2 Chitlesh GOORAH 2010-01-02 11:56:07 EST
I apologize, I can't carry on this package review since I'll be offline for one month.
https://fedoraproject.org/wiki/Vacation

If no one has taken up the review, I'll do when I'll be back.
Comment 3 Rakesh Pandit 2010-01-10 13:14:29 EST
http://koji.fedoraproject.org/koji/taskinfo?taskID=1912457 build failed.

May you fix this ?

Thanks,
Comment 4 Jens Petersen 2010-01-10 19:29:11 EST
Yeah package needs updating to ghc-6.12.1 macros.

I will push a new cabal2spec as soon as I can.
Comment 5 Jens Petersen 2010-01-14 20:26:36 EST
New cabal2spec is available in rawhide.

http://kojipkgs.fedoraproject.org/packages/cabal2spec/0.21.1/1.fc13/noarch/cabal2spec-0.21.1-1.fc13.noarch.rpm
Comment 6 Jens Petersen 2010-04-07 20:06:18 EDT
New haskell-platform just built for f13 which might make life easier for you once it reaches the testing repo.
Comment 7 Shakthi Kannan 2010-04-13 02:32:43 EDT
- Removed INSTALL file.
- Gzip tutorial.ps and move it to docdir.
- Move Vhdl folder to docdir.
- Removed chalmers-lava2000-1.1.1 folder contents.

SPEC URL: http://shakthimaan.fedorapeople.org/SPECS/ghc-chalmers-lava2000.spec
SRPM URL: http://shakthimaan.fedorapeople.org/SRPMS/ghc-chalmers-lava2000-1.1.1-3.fc12.src.rpm

Successful Koji builds for F-13 and F-14, respectively:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2112162
http://koji.fedoraproject.org/koji/taskinfo?taskID=2112159

$ rpmlint -iv ghc-chalmers-lava2000.spec ../SRPMS/ghc-chalmers-lava2000-1.1.1-3.fc12.src.rpm ../RPMS/i686/ghc-chalmers-lava2000-*

ghc-chalmers-lava2000.src: I: checking
ghc-chalmers-lava2000.i686: I: checking
ghc-chalmers-lava2000.i686: W: unstripped-binary-or-object /usr/lib/ghc-6.12.1/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.1.so
ghc-chalmers-lava2000.i686: W: executable-stack /usr/lib/ghc-6.12.1/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.1.so
The binary declares the stack as executable.  Executable stack is usually an
error as it is only needed if the code contains GCC trampolines or similar
constructs which uses code on the stack.  One common source for needlessly
executable stack cases are object files built from assembler files which don't
define a proper .note.GNU-stack section.

ghc-chalmers-lava2000-devel.i686: I: checking
ghc-chalmers-lava2000-devel.i686: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

ghc-chalmers-lava2000-doc.i686: I: checking
ghc-chalmers-lava2000-prof.i686: I: checking
ghc-chalmers-lava2000-prof.i686: E: devel-dependency ghc-chalmers-lava2000-devel
Your package has a dependency on a devel package but it's not a devel package
itself.

ghc-chalmers-lava2000-prof.i686: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

ghc-chalmers-lava2000-prof.i686: W: devel-file-in-non-devel-package /usr/lib/ghc-6.12.1/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1_p.a
A development file (usually source code) is located in a non-devel package. If
you want to include source code in your package, be sure to create a
development package.

5 packages and 1 specfiles checked; 1 errors, 5 warnings.
Comment 8 Jens Petersen 2010-04-27 22:03:07 EDT
Shakthi, would you be able to show us the whole stack of packages
that you are planning to submit to get a clearer picture?

I just want to avoid getting into supporting singleton libraries
in Fedora Haskell, since every library we add adds to the
maintenance burden of ghc rebases, etc.
Comment 9 Shakthi Kannan 2010-04-27 23:04:19 EDT
@Jens:

At this juncture, I have the following (and their dependencies) to be packaged, if not available):

1. chalmers-lava2000:

  http://hackage.haskell.org/package/chalmers-lava2000

I have removed specific modules in the above that invoke/require third party closed source software in the patch used in the .spec file.

2. ForSyDe:

  http://hackage.haskell.org/package/ForSyDe

This has dependencies that need to be packaged (parameterized-data, type-level). packedString is deprecated and a patch is required to avoid its use.

3. Wired:

  http://hackage.haskell.org/package/Wired

This requires chalmers-lava2000 and QuickCheck as dependencies. Modules that use third party non-free software need to be removed with a patch.

4. Feldspar

  http://feldspar.sourceforge.net/

5. Kansas Lava:

  http://www.ittc.ku.edu/csdl/fpg/KansasLava

This is to be released in Summer 2010.
Comment 10 Jens Petersen 2010-05-21 03:16:07 EDT
Is "lava.vhd" needed at runtime or is it more a demo/devel file?
Comment 11 Shakthi Kannan 2010-05-21 03:38:18 EDT
From upstream:

"When you use writeVhdl to convert a circuit to VHDL, the generated file will use definitions from lava.vhd. So your VHDL project must import both lava.vhd as well as the generated file."

So, it is useful for demo/development.
Comment 12 Jens Petersen 2010-05-21 03:57:52 EDT
Thanks - do you have a small example file?

Just wondering if it will look for lava.vhd in a particular place.
Comment 13 Jens Petersen 2010-05-21 04:01:01 EDT
Created attachment 415602 [details]
ghc-chalmers-lava2000.spec-1.patch

This fixes not having the extra data files in the library base package.
Comment 14 Jens Petersen 2010-05-21 04:03:48 EDT
(In reply to comment #12)
> Just wondering if it will look for lava.vhd in a particular place.    

Or maybe it just assumes the copied has been copied to the cwd?
Comment 15 Shakthi Kannan 2010-05-21 04:36:51 EDT
I don't have a small example file. I guess it would depend on what project environment the developer uses. It could be an IDE-based environment or a text editor, for example. Yes, it is easier if it is copied to cwd.

I was able to apply your ghc-chalmers-lava2000.spec-1.patch patch and build ghc-chalmers-lava2000 package.
Comment 16 Jens Petersen 2010-05-21 04:38:48 EDT
OK thanks if you are happy with the patch then please post an updated package. :)
Comment 17 Shakthi Kannan 2010-05-21 05:39:51 EDT
I was able to test the package with First.hs example from tutorial.ps and it
runs fine! Updated:

SPEC: http://shakthimaan.fedorapeople.org/SPECS/ghc-chalmers-lava2000.spec
SRPM:
http://shakthimaan.fedorapeople.org/SRPMS/ghc-chalmers-lava2000-1.1.1-4.fc12.src.rpm

Successful Koji builds for F-13 and F-14:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2200757
http://koji.fedoraproject.org/koji/taskinfo?taskID=2200762
Comment 18 Shakthi Kannan 2010-05-21 22:07:01 EDT
Install ghc-chalmers-lava2000-devel package and try the following example with ghdl:

1. In a working directory, create a file:

=== First.hs ===

import Lava

halfAdd (a, b) = (sum, carry)
  where
    sum   = xor2 (a, b)
    carry = and2 (a, b)

=== END ===

2. Load it with ghci:

  $ ghci First.hs

  GHCi, version 6.12.2: http://www.haskell.org/ghc/  :? for help
  Loading package ghc-prim ... linking ... done.
  Loading package integer-gmp ... linking ... done.
  Loading package base ... linking ... done.
  Loading package ffi-1.0 ... linking ... done.
  [1 of 1] Compiling Main             ( First.hs, interpreted )
  Ok, modules loaded: Main.

3. Write the vhdl file using:

  *Main> writeVhdl "halfAdd" halfAdd

  Loading package syb-0.1.0.2 ... linking ... done.
  Loading package base-3.0.3.2 ... linking ... done.
  Loading package array-0.3.0.0 ... linking ... done.
  Loading package filepath-1.1.0.4 ... linking ... done.
  Loading package old-locale-1.0.0.2 ... linking ... done.
  Loading package old-time-1.0.0.4 ... linking ... done.
  Loading package unix-2.4.0.1 ... linking ... done.
  Loading package directory-1.0.1.1 ... linking ... done.
  Loading package process-1.0.1.2 ... linking ... done.
  Loading package time-1.1.4 ... linking ... done.
  Loading package random-1.0.0.2 ... linking ... done.
  Loading package haskell98 ... linking ... done.
  Loading package chalmers-lava2000-1.1.1 ... linking ... done.
  Writing to file "halfAdd.vhd" ... Done.

4. Install ghdl:

  $ sudo yum install ghdl

5. Copy the lava.vhd to the working directory, and then analyze the files with ghdl:

  $ cp cp /usr/share/doc/ghc-chalmers-lava2000-devel-1.1.1/lava.vhd .
  $ ghdl -a lava.vhd
  $ ghdl -a halfAdd.vhd 
  $

If there are no errors/warnings in the output, it means the output is clean, and that there are no problems with the entity definitions.
Comment 19 Jens Petersen 2010-05-24 00:55:55 EDT
Ok cool: I tried it here too. :)

So perhaps it is better to keep lava.vhd in datadir then IMHO?
Comment 20 Jens Petersen 2010-05-24 01:18:46 EDT
Created attachment 416027 [details]
ghc-chalmers-lava2000.spec.orig2

* Mon May 24 2010 Jens Petersen <petersen@redhat.com> - 1.1.1-5
- Keep lava.vhd in datadir so users can find it easily (#546376)
- Improve summary and description

Rpmlint looks ok too.
Comment 21 Shakthi Kannan 2010-05-29 14:02:10 EDT
Thanks for the second patch. I have updated and tested the package. Looks good!

SPEC: http://shakthimaan.fedorapeople.org/SPECS/ghc-chalmers-lava2000.spec
SRPM: http://shakthimaan.fedorapeople.org/SRPMS/ghc-chalmers-lava2000-1.1.1-5.fc12.src.rpm

Successful Koji builds for F-13, F-14 respectively:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2217429
http://koji.fedoraproject.org/koji/taskinfo?taskID=2217430

$ rpmlint ghc-chalmers-lava2000.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ rpmlint ../SRPMS/ghc-chalmers-lava2000-1.1.1-5.fc12.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint ../RPMS/i686/ghc-chalmers-lava2000-1.1.1-5.fc12.i686.rpm 
ghc-chalmers-lava2000.i686: W: unstripped-binary-or-object /usr/lib/ghc-6.12.2/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.2.so
ghc-chalmers-lava2000.i686: W: executable-stack /usr/lib/ghc-6.12.2/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.2.so
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 22 Jens Petersen 2010-05-30 23:01:41 EDT
Thanks for the update.

(In reply to comment #21)
> Thanks for the second patch. I have updated and tested the package. Looks good!

Cool: later I may address your rfe for supporting datadir files
from ghc-rpm-macros, but for I think this packaging should be
good enough.

> $ rpmlint ../RPMS/i686/ghc-chalmers-lava2000-1.1.1-5.fc12.i686.rpm 
> ghc-chalmers-lava2000.i686: W: unstripped-binary-or-object
> /usr/lib/ghc-6.12.2/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.2.so

(I am thinking cabal2spec should probably be updated to
strip binaries and object files.)
Comment 23 Jens Petersen 2010-06-11 03:47:48 EDT
> ghc-chalmers-lava2000.i686: W: unstripped-binary-or-object
> /usr/lib/ghc-6.12.2/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.2.so

I filed bug 602979 for this btw (it doesn't block this review though:).
Comment 24 Jens Petersen 2010-06-29 09:33:41 EDT
Sorry, finally getting back to this now after rebuilding all the packages for ghc-6.12.3...


Here is the review:

 +:ok, NA: not applicable

MUST Items:
[+] MUST: rpmlint output

ghc-chalmers-lava2000.src: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
ghc-chalmers-lava2000.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-chalmers-lava2000.x86_64: W: unstripped-binary-or-object /usr/lib64/ghc-6.12.1/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.1.so (fixed with latest macros)
ghc-chalmers-lava2000.x86_64: W: executable-stack /usr/lib64/ghc-6.12.1/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.1.so (waived)
1 packages and 0 specfiles checked; 0 errors, 3 warnings.
ghc-chalmers-lava2000-devel.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-chalmers-lava2000-devel.x86_64: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
ghc-chalmers-lava2000-prof.x86_64: E: devel-dependency ghc-chalmers-lava2000-devel (waived)
ghc-chalmers-lava2000-prof.x86_64: W: no-documentation
ghc-chalmers-lava2000-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-6.12.1/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1_p.a
1 packages and 0 specfiles checked; 1 errors, 2 warnings.

[+] MUST: Package Naming Guidelines
[+] MUST: spec file name must match base package %{name}
[+] MUST: Packaging Guidelines.
[+] MUST: Licensing Guidelines

But please contact the author to request adding headers to the source files.

[+] MUST: License field in the package spec file must match actual license.
[+] MUST: include license files in %doc if available in source
[+] MUST: The spec file must be written in American English and be legible.
[+] MUST: source md5sum matches upstream release

cf8c388bd905a57221169b54a4b4454e  chalmers-lava2000-1.1.1.tar.gz

[+] MUST: must successfully compile and build into binary rpms on one main arch
[+] MUST: if necessary use ExcludeArch for other archs
[+] MUST: All build dependencies must be listed in BuildRequires
[NA] MUST: use %find_lang macro for .po translations
[NA] MUST: packages which store shared library files in the dynamic linker's default paths, must call ldconfig in %post and %postun.
[NA] MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review
[+] 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.
[+] MUST: A package must not contain any duplicate files in the %files listing.
[+] 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.
[+] MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[+] MUST: Each package must consistently use macros, as described in the macros section of Packaging Guidelines.
[+] MUST: The package must contain code, or permissable content.
[+] MUST: Large documentation files should go in a doc subpackage.
[+] MUST: If a package includes something as %doc, it must not affect the runtime of the application.
[+] MUST: Header files must be in a -devel package.
[NA] MUST: Static libraries must be in a -static package.
[+] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
[+] MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
[+] MUST: Packages must not own files or directories already owned by other packages.
[+] MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[+] MUST: All filenames in rpm packages must be valid UTF-8.

SHOULD Items:
[+] SHOULD: The reviewer should test that the package builds in mock.
[+] SHOULD: The package should compile and build into binary rpms on all supported architectures.
[+] SHOULD: The reviewer should test that the package functions as described.
[+] SHOULD: If scriptlets are used, those scriptlets must be sane.

Package APPROVED
Comment 25 Jens Petersen 2010-06-29 09:41:41 EDT
Created attachment 427684 [details]
ghc-chalmers-lava2000.spec-2.patch

Update packaging to latest improved macros.

http://koji.fedoraproject.org/koji/taskinfo?taskID=2280598

Please apply before importing into cvs or building at least.
Comment 26 Shakthi Kannan 2010-06-29 10:36:57 EDT
Applied patch. Tested fine! Latest at:

SPEC: http://shakthimaan.fedorapeople.org/SPECS/ghc-chalmers-lava2000.spec
SRPM: http://shakthimaan.fedorapeople.org/SRPMS/ghc-chalmers-lava2000-1.1.1-6.fc14.src.rpm

Successful Koji builds for F-14 at:

  http://koji.fedoraproject.org/koji/taskinfo?taskID=2280676

F-13 build fails at:

  No Package Found for ghc-rpm-macros >= 0.7.0

$ rpmlint ghc-chalmers-lava2000.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ rpmlint ../SRPMS/ghc-chalmers-lava2000-1.1.1-6.fc14.src.rpm 
ghc-chalmers-lava2000.src: W: spelling-error Summary(en_US) Haskell -> Harrell, Rathskeller, Hastily
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

$ rpmlint ../RPMS/i686/ghc-chalmers-lava2000-1.1.1-6.fc14.i686.rpm 
ghc-chalmers-lava2000.i686: W: spelling-error Summary(en_US) Haskell -> Harrell, Rathskeller, Hastily
ghc-chalmers-lava2000.i686: W: executable-stack /usr/lib/ghc-6.12.2/chalmers-lava2000-1.1.1/libHSchalmers-lava2000-1.1.1-ghc6.12.2.so
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 27 Shakthi Kannan 2010-06-29 10:42:28 EDT
New Package CVS Request
=======================
Package Name: ghc-chalmers-lava2000
Short Description: A Hardware description library for Haskell
Owners: shakthimaan chitlesh
Branches: F-14
Comment 28 Kevin Fenzi 2010-06-29 21:00:18 EDT
CVS done (by process-cvs-requests.py).

We are not yet doing F-14 branches.
Comment 29 Jens Petersen 2010-06-29 22:28:11 EDT
((In reply to comment #26)
> F-13 build fails at:
>   No Package Found for ghc-rpm-macros >= 0.7.0

Right let me push the newer package to F13 updates
so you can build it there too without changes
(otherwise -5 should build ok in F13).

Also you didn't request a F-13 branch yet.

(BTW I am not planning on any F-12 backport at this stage but maybe later.)

Please include haskell-sig in your cvs request in the future:
helps to keep track of ghc packages. :)
Comment 30 Shakthi Kannan 2010-06-30 00:57:29 EDT
Package Change Request
======================
Package Name: ghc-chalmers-lava2000
New Branches: F-13
Owners: shakthimaan chitlesh
InitialCC: haskell-sig

Requesting new branch F-13 for ghc-chalmers-lava2000-1.1.1-5 to be used.
Comment 31 Jason Tibbitts 2010-07-01 00:50:32 EDT
CVS done (by process-cvs-requests.py).
Comment 32 Fedora Update System 2010-07-07 13:41:18 EDT
ghc-chalmers-lava2000-1.1.1-5.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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