https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Bug ID: 1052117 Summary: ShellCheck source dir is named shellcheck-version/ not ShellCheck-version/ Product: Fedora Version: rawhide Component: ShellCheck Assignee: dridi.boukelmoune@gmail.com Reporter: petersen@redhat.com QA Contact: extras-qa@fedoraproject.org CC: dridi.boukelmoune@gmail.com, haskell-devel@lists.fedoraproject.org
Description of problem: It is unfortunate the current source code dir of ShellCheck is named in lowercase while the package name is CamelCase. I assume this comes about because the project is called shellcheck on github... I think it would be good to point this out to the author. I think it might also be problematic if/when he ever wants to publish the package on Hackage.
Version: 0.2.0
Steps to Reproduce: 1. fedpkg prep 2. ls
Actual results: ShellCheck/shellcheck-0.2.0 ShellCheck/shellcheck-0.2.0/ShellCheck.cabal
Expected results: ShellCheck/ShellCheck-0.2.0 ShellCheck/ShellCheck-0.2.0/ShellCheck.cabal
Additional info: A simple temporary workaround would be to rename the dir in the spec file:
%prep %setup -q -n shellcheck-%{version} mv {shellcheck,ShellCheck}-%{version}
Then at least the Fedora Haskell "toolchain" scripts will be break when they hit ShellCheck. I don't think there is any offer Haskell cabal-based package in Fedora which has this problem.
Alternatively the upstream cabal package could be renamed to shellcheck but then the Fedora package should really be renamed accordingly. So easiest would be to make the upstream project/tarball name consistent with the package name.
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Dridi Boukelmoune dridi.boukelmoune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |petersen@redhat.com Flags| |needinfo?(petersen@redhat.c | |om)
--- Comment #1 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- I'm in the process of upgrading to 0.3.1, but I'll get in touch with upstream once it's done.
A tarball in the expected form is available at: http://hackage.haskell.org/package/ShellCheck-0.3.1/ShellCheck-0.3.1.tar.gz
But it doesn't contain the test/ folder and the Makefile: https://github.com/koalaman/shellcheck/archive/v0.3.1.tar.gz
So for this release I'll go with the workaround, but it won't work "as is" because of the way %setup seems to work. Anyway I've made a new build for rawhide, I hope this temporarily solves the issue: http://koji.fedoraproject.org/koji/taskinfo?taskID=6492554
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Flags|needinfo?(petersen@redhat.c | |om) |
--- Comment #2 from Jens Petersen petersen@redhat.com --- Thanks a lot - sounds good, worksforme. :)
Will future hackage releases include those missing files?
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #3 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- (In reply to Jens Petersen from comment #2)
Will future hackage releases include those missing files?
That's my goal, it's basically missing everything but the Haskell sources and the cabal file. I suspect it has been generated with some cabal-related tooling that needs to be told to include the missing files (forgot to mention the brand new man page too).
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #4 from Jens Petersen petersen@redhat.com --- Okay let me know if I can be of any help: I could point at some other example .cabal files if it helps.
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #5 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- Yes please, my cabal/build knowledge is rather limited, as you can see in my Setup.hs file here: http://pkgs.fedoraproject.org/cgit/ShellCheck.git/tree/ShellCheck.spec?&...
Thanks to you I've just noticed a similar one now exists upstream: https://github.com/koalaman/shellcheck/blob/197b3e3/Setup.hs
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #6 from Jens Petersen petersen@redhat.com --- Cool - you added building the manpage with pandoc. :) Unfortunately currently there is no pandoc on arm so you may want to disable the pandoc dep on armv7hl... (this should get fixed hopefully soon in Rawhide at least.)
Also I think you could simply the spec a bit:
diff --git a/ShellCheck.spec b/ShellCheck.spec index 8d8bffd..44ffc8a 100644 --- a/ShellCheck.spec +++ b/ShellCheck.spec @@ -60,25 +60,18 @@ This package provides the Haskell %{name} library development files. %setup -q -n shellcheck-%{version}
# workaround until the tarball root directory becomes %%{name}-%%{version} -# see also "cd %%{_builddir}/%%{name}-%%{version}" in other sections -ln -s shellcheck-%{version} ../%{name}-%{version} - -cat >Setup.hs <<EOF -import Distribution.Simple - -main = defaultMain -EOF +if [ ! -d ../%{name}-%{version} ]; then + ln -s shellcheck-%{version} ../%{name}-%{version} +fi
%build -cd %{_builddir}/%{name}-%{version} %ghc_lib_build
make shellcheck.1
%install -cd %{_builddir}/%{name}-%{version} %ghc_lib_install
mkdir -p %{buildroot}%{_mandir}/man1
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #7 from Jens Petersen petersen@redhat.com --- Sorry you also need:
=== diff --git a/ShellCheck.spec b/ShellCheck.spec index 8d8bffd..c010758 100644 --- a/ShellCheck.spec +++ b/ShellCheck.spec @@ -81,8 +81,8 @@ make shellcheck.1 cd %{_builddir}/%{name}-%{version} %ghc_lib_install
-mkdir -p %{buildroot}%{_mandir}/man1 -install -t %{buildroot}%{_mandir}/man1 shellcheck.1 +install -D -p -m 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1 +
%check ===
to fix the manpage permission.
For a .cabal file example including test cases and even building a manpage I recommend looking at pandoc - it might be a bit long or do more than you need but I think it is a reasonable example.
http://hackage.haskell.org/package/pandoc -> http://hackage.haskell.org/package/pandoc-1.12.3.3/pandoc.cabal or https://github.com/jgm/pandoc/blob/master/pandoc.cabal
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #8 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- (In reply to Jens Petersen from comment #6)
Cool - you added building the manpage with pandoc. :)
Of course I did, since I originally wrote and submitted it upstream !
Unfortunately currently there is no pandoc on arm so you may want to disable the pandoc dep on armv7hl... (this should get fixed hopefully soon in Rawhide at least.)
Yeah, by the time I'd seen that, it was too late for me to fix until today.
New (scratch) build, merged with your diffs: http://koji.fedoraproject.org/koji/taskinfo?taskID=6509906
I'll submit that as the next update.
(In reply to Jens Petersen from comment #7)
For a .cabal file example including test cases and even building a manpage I recommend looking at pandoc - it might be a bit long or do more than you need but I think it is a reasonable example.
http://hackage.haskell.org/package/pandoc -> http://hackage.haskell.org/package/pandoc-1.12.3.3/pandoc.cabal or https://github.com/jgm/pandoc/blob/master/pandoc.cabal
Thanks, my next course of action is to actually fix this bug and make sure the tarball on hackage meets both our requirements :)
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #9 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- Sorry for being unresponsive so long, but I have sent a patch upstream today: https://github.com/koalaman/shellcheck/pull/169
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Dridi Boukelmoune dridi.boukelmoune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On| |1081471
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1081471 [Bug 1081471] ghc-QuickCheck-2.7.6 is available
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #10 from Jens Petersen petersen@redhat.com --- No worries: I added ShellCheck to https://fedoraproject.org/wiki/Upstream_release_monitoring just now, so you should get alerts of new releases via bugzilla from now on.
I hope QuickCheck 2.6 may be sufficient for the time being since I don't think a newer version will appear in Fedora until next year.
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
--- Comment #11 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- (In reply to Jens Petersen from comment #10)
No worries: I added ShellCheck to https://fedoraproject.org/wiki/Upstream_release_monitoring just now, so you should get alerts of new releases via bugzilla from now on.
I could have sworn I had already added it, thanks!
I hope QuickCheck 2.6 may be sufficient for the time being since I don't think a newer version will appear in Fedora until next year.
Sure, I will try that instead like I said in bug 1081471.
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Dridi Boukelmoune dridi.boukelmoune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1136297
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1136297 [Bug 1136297] ShellCheck-0.3.4 is available
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Dridi Boukelmoune dridi.boukelmoune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On|1081471 |
--- Comment #12 from Dridi Boukelmoune dridi.boukelmoune@gmail.com --- Actually, 0.3.4 depends on QuickCheck > 2.2, it's the master branch that depends on 2.7.4+.
I've misread the build log when it failed.
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1081471 [Bug 1081471] ghc-QuickCheck-2.7.6 is available
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Dridi Boukelmoune dridi.boukelmoune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On| |1138384
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1138384 [Bug 1138384] fix 'quickCheckAll' to read haskell sources in UTF-8
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Dridi Boukelmoune dridi.boukelmoune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks|1136297 | Depends On| |1136297
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1136297 [Bug 1136297] ShellCheck-0.3.4 is available
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
--- Comment #13 from Jens Petersen petersen@redhat.com --- I believe this is fixed in ShellCheck-0.3.4-1.fc22, thanks!
https://bugzilla.redhat.com/show_bug.cgi?id=1052117 Bug 1052117 depends on bug 1136297, which changed state.
Bug 1136297 Summary: ShellCheck-0.3.4 is available https://bugzilla.redhat.com/show_bug.cgi?id=1136297
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |RAWHIDE
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On|1138384 |
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1138384 [Bug 1138384] fix 'quickCheckAll' to read haskell sources in UTF-8
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version| |ShellCheck-0.3.4-1.fc22
https://bugzilla.redhat.com/show_bug.cgi?id=1052117
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |RAWHIDE Last Closed| |2014-11-06 05:08:25
haskell-devel@lists.fedoraproject.org