Bug 595603 - (ghc-hslogger) Review Request: ghc-hslogger - Haskell logging framework
Review Request: ghc-hslogger - Haskell logging framework
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jens Petersen
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ghc-MissingH
  Show dependency treegraph
 
Reported: 2010-05-25 03:26 EDT by Narasimhan
Modified: 2012-12-25 15:08 EST (History)
7 users (show)

See Also:
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 01:35:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
petersen: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)
Spec file attached (1.56 KB, application/octet-stream)
2010-05-25 03:26 EDT, Narasimhan
no flags Details
ghc-hslogger updated spec file (87 bytes, text/plain)
2010-05-27 06:10 EDT, Narasimhan
no flags Details
ghc-hslogger source rpm (103 bytes, text/plain)
2010-05-27 06:13 EDT, Narasimhan
no flags Details

  None (edit)
Description Narasimhan 2010-05-25 03:26:56 EDT
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 03:51:24 EDT
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 12:00:29 EDT
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 06:10:42 EDT
Created attachment 417182 [details]
ghc-hslogger updated spec file
Comment 4 Narasimhan 2010-05-27 06:13:27 EDT
Created attachment 417184 [details]
ghc-hslogger source rpm
Comment 5 Jens Petersen 2010-05-27 06:30:39 EDT
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 06:34:39 EDT
Yes looks so. :)
Comment 7 Narasimhan 2010-05-27 06:50:09 EDT
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 10:03:53 EDT
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 00:04:45 EDT
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 00:46:05 EDT
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 04:08:46 EDT
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-12 23:10:19 EDT
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-15 20:13:23 EDT
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-18 23:50:52 EDT
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-19 23:55:41 EDT
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-24 23:35:34 EDT
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 03:43:11 EDT
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 03:45:51 EDT
(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-30 22:43:53 EDT
(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-30 23:10:14 EDT
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-30 23:31:46 EDT
Yes COPYING sorry for the confusion: both files should be included
since COPYING contains the actual GPL license.
Comment 25 Narasimhan 2010-09-01 07:04:49 EDT
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 19:14:33 EDT
%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-01 22:51:05 EDT
Right the echo command is redundant and unnecessary if you install the file,
which is the cleaner approach here.
Comment 28 Narasimhan 2010-09-03 22:12:37 EDT
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 05:30:07 EDT
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 06:08:57 EDT
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-14 21:54:50 EDT
Hi Jens,
Yes , I can do that. I will start right away.
Comment 32 Jens Petersen 2010-09-19 20:52:00 EDT
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 06:41:11 EDT
Next step is to do the SCM admin request.
Comment 35 Narasimhan 2010-09-28 08:21:31 EDT
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-28 20:19:46 EDT
Lakshmi, you need to set the fedora_cvs fedora to '?' when requesting.
('+' means it is done/ok.)
Comment 37 Narasimhan 2010-09-28 22:36:32 EDT
Ok. Changed it to ?
Thanks.
Comment 38 Kevin Fenzi 2010-09-29 14:44:28 EDT
Git done (by process-git-requests).
Comment 39 Jens Petersen 2010-09-30 20:09:32 EDT
Lakshmi, you should be able to import and build the package now in koji.
Comment 40 Fedora Update System 2010-10-03 02:13:09 EDT
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 11:18:46 EDT
Thanks for doing this. I'll be using this as a dependency shortly.
Comment 43 Bruno Wolff III 2010-10-03 13:55:41 EDT
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-03 21:35:07 EDT
Yes let's do f13 and f12 too - no reason not too really.
Comment 45 Fedora Update System 2010-10-03 22:51:43 EDT
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 00:24:43 EDT
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 00:32:38 EDT
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 03:22:18 EDT
Yes please just lower the BR to >= 0.7.0 for F13 and F12.
Comment 49 Narasimhan 2010-10-05 06:31:28 EDT
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 06:43:11 EDT
(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 06:43:59 EDT
(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 01:13:31 EDT
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 01:15:21 EDT
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 02:21:55 EDT
(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 19:21:18 EDT
Git done (by process-git-requests).
Comment 56 Fedora Update System 2010-10-09 00:41:25 EDT
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 01:35:35 EDT
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 18:44:33 EDT
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 00:06:04 EST
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 Jon Ciesla 2012-12-07 08:13:05 EST
Git done (by process-git-requests).
Comment 61 Fedora Update System 2012-12-10 03:47:21 EST
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 15:08:43 EST
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.

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