Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
--- Comment #21 from Bryan O'Sullivan <bos(a)serpentine.com> 2008-09-05 11:59:45 EDT ---
Re comment #15:
The makefile step is not necessary for correctness, but it makes a big
difference to build performance: it lets us build most of a package in parallel
using _smp_mflags. Cabal itself won't have the ability to do parallel builds
for a long, long time.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
--- Comment #20 from Rajesh Krishnan <fedora(a)krishnan.cc> 2008-09-05 09:44:18 EDT ---
Created an attachment (id=315906)
--> (https://bugzilla.redhat.com/attachment.cgi?id=315906)
macros.ghc - Removed a bunch of 'echo' trace statements.
A minor cleanup of the macros.ghc file I attached earlier. Removed a bunch of
unimportant 'echo' statements.
-Rajesh Krishnan
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
--- Comment #19 from Rajesh Krishnan <fedora(a)krishnan.cc> 2008-09-05 09:32:03 EDT ---
Here is another problematic Hackage cabal package:
Crypto-4.1.0:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Crypto
SRPM:
http://krishnan.cc/devel/repository/fedora/SRPMS/ghc-crypto-4.1.0-1.fc9.src…
SPEC: http://krishnan.cc/devel/repository/fedora/SPECS/ghc-crypto.spec
Macros: http://krishnan.cc/devel/repository/fedora/MISC/macros.ghc
(tested on F9 + GHC-6.8.3 installed, on x86_64).
The problems with this package are:
1. The package has mixed case package name (name starts with a capital
letter).
2. The package contains a number of executables (besides a library), but all
of those are test executables (not normally executed by end-users).
The way I solved these issues are are follows:
1. Mixed case is already taken care of the updated macros.ghc script I have
attached.
2. Because the package contains executables, the default package name as per
the Fedora Haskell Specification would be crypto-*.rpm and not
ghc-crypto-*.rpm.
The following are noteworthy for this package:
1. The library package are named ghc-crypto-<ver>.fc9.<arch>.rpm as per the
specification because they contain the library and associated library
documentation.
2. The profile packages are named ghc-crypto-prof-<ver>.fc9.<arch>.rpm as per
the spec.
3. I have an additional devel package called
ghc-crypto-devel-<ver>.fc9.<arch>.rpm that contains all the test executables:
$ rpm -ql ghc-crypto-devel
/usr/bin/HMACTest
/usr/bin/QuickTest
/usr/bin/RSATest
/usr/bin/SHA1Test
/usr/bin/SymmetricTest
for this case I am violating the current cabal package specification (which are
not set in stone I hope) for some (IMHO) good reasons
1. The test executables are not normally required by end-users.
2. The test executables are not normally required by even developers who
require compile their code against the library (contained in the main rpm) and
would probably never need these executables either.
3. These test executables don't seem to fit into the -prof package either.
4. I thought of dumping these test executables under the libexec folder like
(/usr/libexec/ghc-crypto) but for some reason didn't feel that was appropriate.
5. So the only option was to spin-off another package that is named
appropriately (-devel).
6. I didn't feel like giving the too-important sounding name "crypto-*.rpm) of
a package that contains just a handful of (mostly unnecessarily) test
executables. Hence I have named this ghc-crypto-devel-*.rpm (and not
crypto-*.rpm or crypto-devel-*.rpm) in order to emphasize its affinity to the
actual rpm and source (ghc-crypto*.rpm).
Please review the package and let me know if we could do this differently or in
any other way.
YAAKOV/JENS:
If you (mostly) agree with the above logic, then we might need to update the
Fedora Haskell Packaging specification as follows:
1. For packages that contain executables that are only related to testing of
the package (not something that end users would usually need) the RPM for such
a package should be named as ghc-<PACKAGE>.*.rpm and not simply
<PACKAGE>.*.rpm, assuming its cabal file contains a library section.
2. For packages that contain executables that are related to testing only (and
other executables that may not normally be reuqired by end-users), the .SPEC
for such an RPM may define a -devel section containing only those test
executables.
3. For other packages that contain end-user oriented executables and/or
libraries, the general rules defined in the Fedora Haskell Packaging
Specification would apply as usual.
Feedback is welcome.
-Rajesh Krishnan
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
Rajesh Krishnan <fedora(a)krishnan.cc> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fedora(a)krishnan.cc
--- Comment #16 from Rajesh Krishnan <fedora(a)krishnan.cc> 2008-09-05 06:49:28 EDT ---
Everyone,
The default Yaakov's macros.ghc or Jens' macros.haskell are NOT adequate for
building cabal packages that have mixed-case package names. I had to modify
those a little bit to get the test package (Cabal-1.4.0.2) working:
For the updated macros.ghc that could build a mixed-case cabal package, look
at:
http://krishnan.cc/devel/repository/fedora/MISC/macros.ghc
For the updated macros.haskell that could build a mixed-case cabal package,
look at:
http://krishnan.cc/devel/repository/fedora/MISC/macros.haskell
The files are quite small, so open either of those along with the corresponding
original ones in Kompare (or any other favorite diff program you prefer) to
note the differences (there are a few 'echo' traces in the file, let me know if
they are not needed and I would remove those).
For an example of package (with a mixed-case package-name) that builds with
this updated macros.ghc file, look at:
http://krishnan.cc/devel/repository/fedora/SRPMS/ghc-cabal-1.4.0.2-2.fc9.sr…
This is important because there are a lot of cabal based packages in Hackage
that have mixed-case package names. I have already mentioned this before on
the Fedora Haskell List where I submitted Cabal-1.4.0.2 package for review.
I am attaching both here along with this comment.
-Rajesh Krishnan
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
--- Comment #15 from Jens Petersen <petersen(a)redhat.com> 2008-09-05 05:23:56 EDT ---
I am not sure if %_cabal_makefile is really necessary? eg ghc-X11 seems to
build fine without it.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=426751
--- Comment #21 from Jens Petersen <petersen(a)redhat.com> 2008-09-05 05:22:00 EDT ---
Created an attachment (id=315852)
--> (https://bugzilla.redhat.com/attachment.cgi?id=315852)
ghc-X11.spec
Here is a slightly revised spec file without the macros embedded using the
latest macros I attached to bug 460304 - tested and builds on rawhide.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
Jens Petersen <petersen(a)redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #315737|0 |1
is obsolete| |
--- Comment #14 from Jens Petersen <petersen(a)redhat.com> 2008-09-05 01:08:30 EDT ---
Created an attachment (id=315829)
--> (https://bugzilla.redhat.com/attachment.cgi?id=315829)
macros.ghc
I talked a bit to Yaakov (loupgaroublond) on #fedora-devel
and hope we understand each other a bit better now.
Here is a slight update which fixes %ghc_gen_filelists
(renamed as it is implementation dependent as Yaakov pointed out to me).
I hope this can be close to a final version which is acceptable
to all parties.
I am kind of tempted to remove %cabal_install also since it is pretty
trivial, but maybe it is ok.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=460304
--- Comment #13 from Tom Moertel <tom(a)moertel.com> 2008-09-04 23:44:39 EDT ---
Yaakov, thanks for explaining your concerns in detail.
In reviewing Jens's spec for ghc-X11, it appears that it avoids your primary
concern by passing the "--ghc" flag during the initial Cabal-setup invocation:
%build
%cabal_configure -p --ghc <= HERE
%cabal_makefile
%cabal build
%cabal haddock
%ghc_gen_scripts
According to the Cabal documentation, this flag ensures that Cabal will use GHC
for the later stages of Cabal processing, regardless of which Haskell
implementation runhaskell invokes. (Ref:
http://www.haskell.org/ghc/docs/latest/html/Cabal/builders.html#setup-confi…)
So even if runhaskell invoked NHC, for example, Jens's spec would still build
a GHC package.
Do you think using Cabal-setup flags to specify the desired compiler will
adequately resolve your concern about hidden compiler dependencies?
Cheers,
Tom
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.