Bug 595603 (ghc-hslogger)

Summary: Review Request: ghc-hslogger - Haskell logging framework
Product: [Fedora] Fedora Reporter: Narasimhan <lakshminaras2002>
Component: Package ReviewAssignee: Jens Petersen <petersen>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: bruno, fedora, fedora-package-review, haskell-devel, notting, petersen, terje.rosten
Target Milestone: ---Flags: petersen: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ghc-hslogger-1.1.0-3.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-10 05:35:40 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:
Bug Depends On:    
Bug Blocks: 634037    
Attachments:
Description Flags
Spec file attached
none
ghc-hslogger updated spec file
none
ghc-hslogger source rpm none

Description Narasimhan 2010-05-25 07:26:56 UTC
Created attachment 416288 [details]
Spec file attached

Attaching the spec file.
Currently there are two issues
1) cp: cannot stat `LICENSE': No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.8BH8HY (%doc)
2) In the %files section, permissions for hslogger binary is being modified. However, the binary is not created. I ran cabal install to confirm this.

For 1) the license file needs to be added to the sources. I am not sure how to proceed with this. Perhaps I can contact the source maintainer. 
For 2) the line that tries to modify the permission has been removed.

Comment 1 Bruno Wolff III 2010-05-25 07:51:24 UTC
You need to provide an SRPM.
If you are not currently a packager (I couldn't find you in the packager group, but might not have been looking for the right email address) you need to block on FE-NEEDSPONSOR.
See:
http://fedoraproject.org/wiki/Package_Review_Process

Comment 2 Terje Røsten 2010-05-25 16:00:29 UTC
Hi Lakshmi,

do you want to maintain hslogger in Fedora? 

I am afraid that is a bit more complicated than running cabal2spec.

Please start here if you want to become a maintainer:

 https://fedoraproject.org/wiki/PackageMaintainers/Join

If you study that page and linked material I guess you can answer your own question above.

Comment 3 Narasimhan 2010-05-27 10:10:42 UTC
Created attachment 417182 [details]
ghc-hslogger updated spec file

Comment 4 Narasimhan 2010-05-27 10:13:27 UTC
Created attachment 417184 [details]
ghc-hslogger source rpm

Comment 5 Jens Petersen 2010-05-27 10:30:39 UTC
Please don't attach urls!! ;)  Just paste them into a comment.

(Was just writing an explanation how to get ghc-hslogger.spec
with cabal2spec but guess you may have worked that out?)

Comment 6 Jens Petersen 2010-05-27 10:34:39 UTC
Yes looks so. :)

Comment 7 Narasimhan 2010-05-27 10:50:09 UTC
Sorry about the urls attachments 

http://sites.google.com/site/lakshminaras2002/home/ghc-hslogger-1.0.10-1.f13.src.rpm?attredirects=0&d=1

http://sites.google.com/site/lakshminaras2002/home/ghc-hslogger.spec?attredirects=0&d=1

Also, I remaned the spec file. Is that what you had in mind.

Comment 8 Jens Petersen 2010-06-29 14:03:53 UTC
Basically looks fine.

Would appreciate if you could update to cabal2spec-0.22.1 from rawhide, sorry.

http://koji.fedoraproject.org/koji/packageinfo?packageID=7809

It also requires latest ghc-rpm-macros to build - planning to push those
shortly to F13 updates too.

Comment 9 Narasimhan 2010-06-30 04:04:45 UTC
Hi,
Will both cabal2spec-0.22.1 and the  latest of ghc-rpm-macros be in F13 or only the latest ghc-rpm-macros?

Thanks

Comment 10 Jens Petersen 2010-06-30 04:46:05 UTC
Yes they will.

I just built cabal2spec-0.22.1 for f13 too (the f14 packages are identical though).

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

Comment 11 Narasimhan 2010-07-03 08:08:46 UTC
I have generated the spec file from the latest cabal2spec. Here is the spec file and the source rpm

http://sites.google.com/site/lakshminaras2002/home/ghc-hslogger.spec?attredirects=0&d=1

http://sites.google.com/site/lakshminaras2002/home/ghc-hslogger-1.0.10-1.f13.src.rpm?attredirects=0&d=1

Comment 12 Jens Petersen 2010-07-13 03:10:19 UTC
I am offering to sponsor Lakshmi for this review.

I took a quick look at the .spec file and basically looks ok.

Can you add a changelog entry to document the changes you made
relative to cabal2spec (you can also use cabal2spec-diff for that).

Comment 13 Narasimhan 2010-07-16 00:13:23 UTC
Hi,

I have updated the spec file with the changelog. However I have put the Release as 2. My doubt is that since the hslogger rpm has never been into the repos, is it still ok to put the release as 2?

http://sites.google.com/site/lakshminaras2002/home/ghc-hslogger.spec?attredirects=0&d=1

http://sites.google.com/site/lakshminaras2002/home/ghc-hslogger-1.0.10-2.f13.src.rpm?attredirects=0&d=1

Comment 14 Jens Petersen 2010-08-19 03:50:52 UTC
Sorry for the long pause.

The changelog must be in your name (see other .spec files for examples).
The initial "Fedora Haskell SIG" entry is just a seed to show
that the file was generated by cabal2spec.

I am afraid cabal2spec is now 0.22.2 in F14.
It would be better if you could update the spec.

I will endeavour to respond faster from now. :)

Comment 15 Narasimhan 2010-08-20 03:55:41 UTC
Ok. I will modify that.
I will update and upload the spec file and source rpm by tomorrow. 

Thanks.

Comment 17 Jens Petersen 2010-08-25 03:35:34 UTC
BTW I just noticed there is a new upstream release:
http://hackage.haskell.org/package/hslogger-1.0.11

Comment 19 Jens Petersen 2010-08-30 07:43:11 UTC
Looks pretty good.  Only problem I see now so far is that you
really need to include COPYING too not just COPYRIGHT.

Successful koji scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2434620

Comment 20 Jens Petersen 2010-08-30 07:45:51 UTC
(In reply to comment #19)
> Looks pretty good.  Only problem I see now so far is that you
> really need to include COPYING too not just COPYRIGHT.

One way to do that would be to copy it into the doc dir for ghc-hslogger
which you might need to create in %install - alternatively you
could append COPYRIGHT to the ghc-hslogger.files file list.

Comment 21 Jens Petersen 2010-08-31 02:43:53 UTC
(Better the latter way is better - that is also what we
are doing in a few other packages.  Long term we need
a better way to support datadir files in cabal and macros.ghc.)

Comment 22 Narasimhan 2010-08-31 03:10:14 UTC
COPYRIGHT is present in the packaged rpm. Do you mean that COPYING should also be  present in the same location as COPYRIGHT?

Comment 23 Jens Petersen 2010-08-31 03:31:46 UTC
Yes COPYING sorry for the confusion: both files should be included
since COPYING contains the actual GPL license.

Comment 25 Narasimhan 2010-09-01 11:04:49 UTC
This is another approach (going by your first suggestion). Under %install

rm -rf $RPM_BUILD_ROOT
%ghc_lib_install
cp COPYING ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
echo "%doc %{_docdir}/%{name}-%{version}/COPYING" >> ghc-hslogger.files

Using this approach, I didn't have to explicitly mention COPYRIGHT in the %doc directive. I tried to put only %doc COPYING. But this deleted the doc/ghc-hslogger-1.1.0 directory and COPYRIGHT got deleted as well. My understanding is that cabal install put the COPYRIGHT file into the directory in the first place and the final stage of packaging was unable to find COPYRIGHT.

Comment 26 Ben Boeckel 2010-09-01 23:14:33 UTC
%doc is magic when just specifying files in the tarball. Also, explicitly mentioning %doc on %{_mandir} or %{_docdir} is unnecessary since it's implicit to RPM. Here's what I'd do:

rm -rf $RPM_BUILD_ROOT
%ghc_lib_install
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
install -p COPYING ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/COPYING

The directory is already owned through %doc commands make the directory owned and everything in it is then brought in through that. It's a little messy :( .

Comment 27 Jens Petersen 2010-09-02 02:51:05 UTC
Right the echo command is redundant and unnecessary if you install the file,
which is the cleaner approach here.

Comment 28 Narasimhan 2010-09-04 02:12:37 UTC
Thanks Ben, Jens. Attaching the modified spec file and source rpm

https://sites.google.com/site/lakshminaras2002/home/ghc-hslogger.spec?attredirects=0&d=1
https://sites.google.com/site/lakshminaras2002/home/ghc-hslogger-1.1.0-3.f13.src.rpm?attredirects=0&d=1

Here is the rpmlint output on source rpm

>rpmlint  -i ghc-hslogger-1.1.0-3.f13.src.rpm
ghc-hslogger.src: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
The value of this tag appears to be misspelled. Please double-check.

1 packages and 0 specfiles checked; 0 errors, 1 warnings.

Comment 29 Jens Petersen 2010-09-14 09:30:07 UTC
Lakshmi, as part of your sponsorship process, can I ask you to
help out by checking one or more packages currently open for review:

https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Reviewing_Packages

It can be any package which interests but if you are stuck
for a choice there are lots of haskell packages waiting for review:
<http://j.mp/fedora-haskell-reviews-open>.

Comment 30 Jens Petersen 2010-09-14 10:08:57 UTC
Here is the review:

 +:ok, NA: not applicable

MUST Items:
[+] MUST: rpmlint output

ghc-hslogger.src: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
ghc-hslogger.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
ghc-hslogger.x86_64: W: executable-stack /usr/lib64/ghc-6.12.1/hslogger-1.1.0/libHShslogger-1.1.0-ghc6.12.1.so
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
ghc-hslogger-devel.x86_64: W: spelling-error Summary(en_US) Haskell -> Gaskell, Gaitskell, Skellum
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
ghc-hslogger-prof.x86_64: E: devel-dependency ghc-hslogger-devel
ghc-hslogger-prof.x86_64: W: no-documentation
ghc-hslogger-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-6.12.1/hslogger-1.1.0/libHShslogger-1.1.0_p.a
1 packages and 0 specfiles checked; 1 errors, 2 warnings.

There are ok.

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

Note if in the future you want to also package hslogger4j
then ASL 2.0 should be added to the license field.

[+] 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

8039e079338dae19e1273bbd73332014  hslogger-1.1.0.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.
[+] MUST: A package must not contain any duplicate files in the %files listing.
[+] MUST: Permissions on files must be set properly. 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.
[NA] 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.
[NA] 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.
[+] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency
[+] MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
[NA] 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.
[+] 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.

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

[+] SHOULD: If scriptlets are used, those scriptlets must be sane.

Package is APPROVED.

Comment 31 Narasimhan 2010-09-15 01:54:50 UTC
Hi Jens,
Yes , I can do that. I will start right away.

Comment 32 Jens Petersen 2010-09-20 00:52:00 UTC
Thanks I see you comments on ghc-colour, ghc-tagsoup, and ghc-gtk.

Please apply for membership of the packager group in FAS.

Comment 34 Jens Petersen 2010-09-28 10:41:11 UTC
Next step is to do the SCM admin request.

Comment 35 Narasimhan 2010-09-28 12:21:31 UTC
New Package SCM Request
=======================
Package Name: ghc-hslogger
Short Description:  A logging framework for Haskell
Owners: narasim
Branches: f14
InitialCC: haskell-sig

Comment 36 Jens Petersen 2010-09-29 00:19:46 UTC
Lakshmi, you need to set the fedora_cvs fedora to '?' when requesting.
('+' means it is done/ok.)

Comment 37 Narasimhan 2010-09-29 02:36:32 UTC
Ok. Changed it to ?
Thanks.

Comment 38 Kevin Fenzi 2010-09-29 18:44:28 UTC
Git done (by process-git-requests).

Comment 39 Jens Petersen 2010-10-01 00:09:32 UTC
Lakshmi, you should be able to import and build the package now in koji.

Comment 40 Fedora Update System 2010-10-03 06:13:09 UTC
ghc-hslogger-1.1.0-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/ghc-hslogger-1.1.0-3.fc14

Comment 42 Bruno Wolff III 2010-10-03 15:18:46 UTC
Thanks for doing this. I'll be using this as a dependency shortly.

Comment 43 Bruno Wolff III 2010-10-03 17:55:41 UTC
Are you planning to also do an F13 build eventually? Knowing this will help me plan what I want to do for a hedgewars update for F13. Thanks.

Comment 44 Jens Petersen 2010-10-04 01:35:07 UTC
Yes let's do f13 and f12 too - no reason not too really.

Comment 45 Fedora Update System 2010-10-04 02:51:43 UTC
ghc-hslogger-1.1.0-3.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-hslogger'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ghc-hslogger-1.1.0-3.fc14

Comment 46 Narasimhan 2010-10-04 04:24:43 UTC
For f13 and f12, ghc-rpm-macros 0.8.1 is not available as an update. Should I create a spec file for hslogger with the appropriate versions of ghc-rpm-macros (and cabal2spec)? In that case, I will keep the spec files ready.

Comment 47 Ben Boeckel 2010-10-04 04:32:38 UTC
For F13, changing the version to 0.7.0 has worked for me. I'm not sure what F12 wants, but some of my packages wouldn't build for it. I can look at it tomorrow if the version change doesn't fix it.

Comment 48 Jens Petersen 2010-10-04 07:22:18 UTC
Yes please just lower the BR to >= 0.7.0 for F13 and F12.

Comment 49 Narasimhan 2010-10-05 10:31:28 UTC
hslogger requires  mtl but it is not available in F12. 
F13 build works fine after modifying the BR to 0.7.0.
Couple of doubts:
1) Since the spec file will have a change, I would bump the release number. This means that F13 will end up with ghc-hslogger-1.1.0-4 and rawhide will have 1.1.0-3. Is that acceptable?
2) Should I submit the spec file for another review or can I go ahead and apply for Package change request?

Comment 50 Jens Petersen 2010-10-05 10:43:11 UTC
(In reply to comment #49)
> hslogger requires  mtl but it is not available in F12. 

mtl is part of ghc-6.10.4 so you can just the dep.
Sorry I didn't bother to add the provides to ghc there...

> F13 build works fine after modifying the BR to 0.7.0.
> Couple of doubts:
> 1) Since the spec file will have a change, I would bump the release number.
> This means that F13 will end up with ghc-hslogger-1.1.0-4 and rawhide will have
> 1.1.0-3. Is that acceptable?

No that is not acceptable.

Either don't bump (I haven't) or bump after %{?dist}: eg 3%{?dist}.1

> 2) Should I submit the spec file for another review or can I go ahead and apply
> for Package change request?

No review needed: it is standard package maintainer work.
Feel free to use 0.7.0 also in newer branches if it is
easier for you.  I may well lower the version in the next
cabal2spec.

Comment 51 Jens Petersen 2010-10-05 10:43:59 UTC
(In reply to comment #50)
> mtl is part of ghc-6.10.4 so you can just *drop* the dep.

Comment 52 Narasimhan 2010-10-06 05:13:31 UTC
I tried building hslogger in f12 but the build did not go through. There was an error when haddock started to parse the source files. 

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

For now, I would raise a package change request for f13.

Comment 53 Narasimhan 2010-10-06 05:15:21 UTC
Package Change Request
======================
Package Name: ghc-hslogger
New Branches: f13
Owners: narasim
InitialCC: haskell-sig

Package ghc-hslogger for Fedora 13.

Comment 54 Jens Petersen 2010-10-06 06:21:55 UTC
(In reply to comment #52)
> I tried building hslogger in f12 but the build did not go through. There was an
> error when haddock started to parse the source files. 
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=2513743
> 
> For now, I would raise a package change request for f13.

Sure that is just fine.

Hmm maybe need an older hslogger for ghc-6.10.4 then, but maybe not worth worrying about until something needs it, which may well not happen before F12 goes EOL.

Comment 55 Kevin Fenzi 2010-10-06 23:21:18 UTC
Git done (by process-git-requests).

Comment 56 Fedora Update System 2010-10-09 04:41:25 UTC
ghc-hslogger-1.1.0-3.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/ghc-hslogger-1.1.0-3.fc13

Comment 57 Fedora Update System 2010-10-10 05:35:35 UTC
ghc-hslogger-1.1.0-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 58 Fedora Update System 2010-10-27 22:44:33 UTC
ghc-hslogger-1.1.0-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 59 Jens Petersen 2012-12-07 05:06:04 UTC
I like to build this also for epel6.


Package Change Request
======================
Package Name: ghc-hslogger
New Branches: el6
Owners: narasim petersen
InitialCC: haskell-sig

Comment 60 Gwyn Ciesla 2012-12-07 13:13:05 UTC
Git done (by process-git-requests).

Comment 61 Fedora Update System 2012-12-10 08:47:21 UTC
ghc-hslogger-1.1.5-5.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/ghc-hslogger-1.1.5-5.el6

Comment 62 Fedora Update System 2012-12-25 20:08:43 UTC
ghc-hslogger-1.1.5-5.el6, ghc-MissingH-1.1.1.0-5.el6 has been pushed to the Fedora EPEL 6 stable repository.