Bug 753661 - hsc2hs not found error due to update-alternatives not found (missing Requires: chkconfig)
Summary: hsc2hs not found error due to update-alternatives not found (missing Requires...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: ghc
Version: el6
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-14 02:17 UTC by Giam Teck Choon
Modified: 2012-06-15 02:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-15 02:17:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Giam Teck Choon 2011-11-14 02:17:48 UTC
Description of problem:

When try to build other packages that require ghc in mock, a couple of them can't be compile due to hsc2hs not found error.  ghc-6.12.3-5.el6 and ghc-6.12.3-6.el6 (I think) in %post and %preun sections in spec file as below:

%post
# Alas, GHC, Hugs, and nhc all come with different set of tools in
# addition to a runFOO:
# 
#   * GHC:  hsc2hs
#   * Hugs: hsc2hs, cpphs
#   * nhc:  cpphs
#
# Therefore it is currently not possible to use --slave below to form
# link groups under a single name 'runhaskell'. Either these tools
# should be disentangled from the Haskell implementations, or all
# implementations should have the same set of tools. *sigh*

update-alternatives --install %{_bindir}/runhaskell runhaskell \
  %{_bindir}/runghc 500
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
  %{_bindir}/hsc2hs-ghc 500

%preun
if [ "$1" = 0 ]; then
  update-alternatives --remove runhaskell %{_bindir}/runghc
  update-alternatives --remove hsc2hs     %{_bindir}/hsc2hs-ghc
fi

So it needs update-alternatives to do the linking if I am right in fact the spec file will need to add Requires: chkconfig or else when installing ghc will have the errors as below:

Non-fatal POSTIN scriptlet failure in rpm package ghc-6.12.3-6.el6.i686
/var/tmp/rpm-tmp.E4LKqM: line 13: update-alternatives: command not found
/var/tmp/rpm-tmp.E4LKqM: line 15: update-alternatives: command not found
warning: %post(ghc-6.12.3-6.el6.i686) scriptlet failed, exit status 127



Version-Release number of selected component (if applicable):

ghc-6.12.3-5.el6
ghc-6.12.3-6.el6

In fact past versions/release can have the same problem if the %post and %preun sections are the same and without chkconfig in Requires list.

How reproducible:

When build in mock environment where chkconfig package isn't install by default will have this issue since update-alternatives is provided by chkconfig rpm package.

Like when you try to compile/build any of the packages that need hsc2hs in ghc package where ghc only has /usr/bin/hsc2hs-ghc and during %post section use update-alternatives to do the linking of /usr/bin/hsc2hs-ghc to hsc2hs-ghc.

i.e Try to build any of the following without chkconfig rpm package install:

xmonad-0.9.1-6.1.el6
ghc-X11-1.5.0.0-5.el6
hscolour-1.16-1.el6

The list goes on... ...


Thanks.

Kindest regards,
Giam Teck Choon

Comment 1 Jens Petersen 2011-11-14 10:13:41 UTC
I see - just wondering why your buildroot doesn't have chkconfig installed.

The examples you listed all build in koji for el6...

Anyway (https://fedoraproject.org/wiki/Packaging:Alternatives)
you're quite right and this also applies to Fedora even!
So I will update there first...

For some nasty technical reasons I can't rebuild easily for EPEL6
so I may wait with it until I move it to ghc7.

Comment 2 Jens Petersen 2011-11-14 10:33:31 UTC
Thank you very much for your good bug report.

This should get fixed in ghc-7.0.4-40.fc17 in rawhide.

This fix should gradually get backported to current releases.
(I guess it is not so urgent since noone else has reported this problem before.:)

Comment 3 Giam Teck Choon 2011-11-14 13:18:41 UTC
Thanks for your prompt reply and noted about the fix and backport.

Comment 4 Jens Petersen 2012-01-26 01:54:59 UTC
Moving to Fedora to track there.

Comment 5 Jens Petersen 2012-01-26 02:00:32 UTC
BTW I just checked the Koji build logs and chkconfig is installed
by default in the buildroot for both fedora and epel.

Anyway going to close this since it is fixed in rawhide now
and may get backported as appropriate to current releases.

Comment 6 Fedora Update System 2012-05-10 06:18:55 UTC
ghc-rpm-macros-0.15.5-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/ghc-rpm-macros-0.15.5-1.el6

Comment 7 Fedora Update System 2012-05-26 22:09:21 UTC
Package xmonad-0.10-6.el6, ghc-X11-1.5.0.1-2.el6, ghc-utf8-string-0.3.7-1.el6, ghc-X11-xft-0.3.1-3.el6, hscolour-1.19-6.el6, ghc-rpm-macros-0.15.5-1.el6, haskell-platform-2011.4.0.0-6.el6, ghc-HUnit-1.2.4.2-3.el6, ghc-transformers-0.2.2.0-14.el6, alex-2.3.5-6.el6.2, ghc-7.0.4-46.el6, ghc-deepseq-1.1.0.2-9.el6, ghc-html-1.0.1.2-13.el6.3, ghc-syb-0.3.3-4.el6, ghc-xhtml-3000.2.0.4-3.el6, ghc-stm-2.2.0.1-8.el6.3, ghc-OpenGL-2.2.3.0-12.el6, ghc-mtl-2.0.1.0-10.el6, ghc-GLUT-2.1.2.1-13.el6, ghc-parallel-3.1.0.1-8.el6.3, ghc-text-0.11.1.5-3.el6, ghc-fgl-5.4.2.4-2.el6, ghc-parsec-3.1.1-8.el6, ghc-QuickCheck-2.4.1.1-2.el6, ghc-regex-base-0.93.2-10.el6, happy-1.18.6-8.el6.2, ghc-haskell-src-1.0.1.4-10.el6, ghc-network-2.3.0.5-3.el6, ghc-regex-posix-0.95.1-2.el6, ghc-regex-compat-0.95.1-2.el6, ghc-cgi-3001.1.7.4-11.el6, ghc-HTTP-4000.1.2-4.el6, ghc-zlib-0.5.3.1-8.el6, cabal-install-0.10.2-7.el6, ghc-xmonad-contrib-0.10-4.2.el6, ghc-gtk-0.12.2-2.3.el6, ghc-glade-0.12.1-3.el6, gtk2hs-buildtools-0.12.1-2.el6.2, ghc-glib-0.12.2-2.el6, ghc-cairo-0.12.2-2.el6, ghc-gio-0.12.2-2.el6, ghc-pango-0.12.2-2.el6, ghc-binary-0.5.0.2-10.el6, ghc-mmap-0.5.7-6.el6, ghc-dataenc-0.14-2.el6, ghc-terminfo-0.3.2.3-2.el6, ghc-tar-0.3.2.0-1.el6, ghc-hashed-storage-0.5.7-2.el6, ghc-haskeline-0.6.4.6-3.el6, darcs-2.5.2-9.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing xmonad-0.10-6.el6 ghc-X11-1.5.0.1-2.el6 ghc-utf8-string-0.3.7-1.el6 ghc-X11-xft-0.3.1-3.el6 hscolour-1.19-6.el6 ghc-rpm-macros-0.15.5-1.el6 haskell-platform-2011.4.0.0-6.el6 ghc-HUnit-1.2.4.2-3.el6 ghc-transformers-0.2.2.0-14.el6 alex-2.3.5-6.el6.2 ghc-7.0.4-46.el6 ghc-deepseq-1.1.0.2-9.el6 ghc-html-1.0.1.2-13.el6.3 ghc-syb-0.3.3-4.el6 ghc-xhtml-3000.2.0.4-3.el6 ghc-stm-2.2.0.1-8.el6.3 ghc-OpenGL-2.2.3.0-12.el6 ghc-mtl-2.0.1.0-10.el6 ghc-GLUT-2.1.2.1-13.el6 ghc-parallel-3.1.0.1-8.el6.3 ghc-text-0.11.1.5-3.el6 ghc-fgl-5.4.2.4-2.el6 ghc-parsec-3.1.1-8.el6 ghc-QuickCheck-2.4.1.1-2.el6 ghc-regex-base-0.93.2-10.el6 happy-1.18.6-8.el6.2 ghc-haskell-src-1.0.1.4-10.el6 ghc-network-2.3.0.5-3.el6 ghc-regex-posix-0.95.1-2.el6 ghc-regex-compat-0.95.1-2.el6 ghc-cgi-3001.1.7.4-11.el6 ghc-HTTP-4000.1.2-4.el6 ghc-zlib-0.5.3.1-8.el6 cabal-install-0.10.2-7.el6 ghc-xmonad-contrib-0.10-4.2.el6 ghc-gtk-0.12.2-2.3.el6 ghc-glade-0.12.1-3.el6 gtk2hs-buildtools-0.12.1-2.el6.2 ghc-glib-0.12.2-2.el6 ghc-cairo-0.12.2-2.el6 ghc-gio-0.12.2-2.el6 ghc-pango-0.12.2-2.el6 ghc-binary-0.5.0.2-10.el6 ghc-mmap-0.5.7-6.el6 ghc-dataenc-0.14-2.el6 ghc-terminfo-0.3.2.3-2.el6 ghc-tar-0.3.2.0-1.el6 ghc-hashed-storage-0.5.7-2.el6 ghc-haskeline-0.6.4.6-3.el6 darcs-2.5.2-9.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-5980/ghc-7.0.4-46.el6,haskell-platform-2011.4.0.0-6.el6,ghc-rpm-macros-0.15.5-1.el6,hscolour-1.19-6.el6,ghc-HUnit-1.2.4.2-3.el6,ghc-transformers-0.2.2.0-14.el6,alex-2.3.5-6.el6.2,ghc-deepseq-1.1.0.2-9.el6,ghc-html-1.0.1.2-13.el6.3,ghc-syb-0.3.3-4.el6,ghc-xhtml-3000.2.0.4-3.el6,ghc-stm-2.2.0.1-8.el6.3,ghc-OpenGL-2.2.3.0-12.el6,ghc-mtl-2.0.1.0-10.el6,ghc-GLUT-2.1.2.1-13.el6,ghc-parallel-3.1.0.1-8.el6.3,ghc-text-0.11.1.5-3.el6,ghc-fgl-5.4.2.4-2.el6,ghc-parsec-3.1.1-8.el6,ghc-QuickCheck-2.4.1.1-2.el6,ghc-regex-base-0.93.2-10.el6,happy-1.18.6-8.el6.2,ghc-haskell-src-1.0.1.4-10.el6,ghc-network-2.3.0.5-3.el6,ghc-regex-posix-0.95.1-2.el6,ghc-regex-compat-0.95.1-2.el6,ghc-cgi-3001.1.7.4-11.el6,ghc-HTTP-4000.1.2-4.el6,ghc-zlib-0.5.3.1-8.el6,cabal-install-0.10.2-7.el6,xmonad-0.10-6.el6,ghc-X11-1.5.0.1-2.el6,ghc-utf8-string-0.3.7-1.el6,ghc-X11-xft-0.3.1-3.el6,ghc-xmonad-contrib-0.10-4.2.el6,gtk2hs-buildtools-0.12.1-2.el6.2,ghc-glib-0.12.2-2.el6,ghc-cairo-0.12.2-2.el6,ghc-gio-0.12.2-2.el6,ghc-pango-0.12.2-2.el6,ghc-gtk-0.12.2-2.3.el6,ghc-glade-0.12.1-3.el6,ghc-binary-0.5.0.2-10.el6,ghc-mmap-0.5.7-6.el6,ghc-dataenc-0.14-2.el6,ghc-terminfo-0.3.2.3-2.el6,ghc-tar-0.3.2.0-1.el6,ghc-hashed-storage-0.5.7-2.el6,ghc-haskeline-0.6.4.6-3.el6,darcs-2.5.2-9.el6
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-05-28 17:59:43 UTC
Package ghc-X11-1.5.0.1-2.el6, ghc-utf8-string-0.3.7-1.el6, ghc-X11-xft-0.3.1-3.el6, hscolour-1.19-6.el6, ghc-rpm-macros-0.15.5-1.el6, haskell-platform-2011.4.0.0-6.el6, ghc-HUnit-1.2.4.2-3.el6, ghc-transformers-0.2.2.0-14.el6, alex-2.3.5-6.el6.2, ghc-7.0.4-46.el6, ghc-deepseq-1.1.0.2-9.el6, ghc-html-1.0.1.2-13.el6.3, ghc-syb-0.3.3-4.el6, ghc-xhtml-3000.2.0.4-3.el6, ghc-stm-2.2.0.1-8.el6.3, ghc-OpenGL-2.2.3.0-12.el6, ghc-mtl-2.0.1.0-10.el6, ghc-GLUT-2.1.2.1-13.el6, ghc-parallel-3.1.0.1-8.el6.3, ghc-text-0.11.1.5-3.el6, ghc-fgl-5.4.2.4-2.el6, ghc-parsec-3.1.1-8.el6, ghc-QuickCheck-2.4.1.1-2.el6, ghc-regex-base-0.93.2-10.el6, happy-1.18.6-8.el6.2, ghc-haskell-src-1.0.1.4-10.el6, ghc-network-2.3.0.5-3.el6, ghc-regex-posix-0.95.1-2.el6, ghc-regex-compat-0.95.1-2.el6, ghc-cgi-3001.1.7.4-11.el6, ghc-HTTP-4000.1.2-4.el6, ghc-zlib-0.5.3.1-8.el6, cabal-install-0.10.2-7.el6, ghc-xmonad-contrib-0.10-4.2.el6, ghc-gtk-0.12.2-2.3.el6, ghc-glade-0.12.1-3.el6, gtk2hs-buildtools-0.12.1-2.el6.2, ghc-glib-0.12.2-2.el6, ghc-cairo-0.12.2-2.el6, ghc-gio-0.12.2-2.el6, ghc-pango-0.12.2-2.el6, ghc-binary-0.5.0.2-10.el6, ghc-mmap-0.5.7-6.el6, ghc-dataenc-0.14-2.el6, ghc-terminfo-0.3.2.3-2.el6, ghc-tar-0.3.2.0-1.el6, ghc-hashed-storage-0.5.7-2.el6, ghc-haskeline-0.6.4.6-3.el6, darcs-2.5.2-9.el6, xmonad-0.10-3.4.1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing ghc-X11-1.5.0.1-2.el6 ghc-utf8-string-0.3.7-1.el6 ghc-X11-xft-0.3.1-3.el6 hscolour-1.19-6.el6 ghc-rpm-macros-0.15.5-1.el6 haskell-platform-2011.4.0.0-6.el6 ghc-HUnit-1.2.4.2-3.el6 ghc-transformers-0.2.2.0-14.el6 alex-2.3.5-6.el6.2 ghc-7.0.4-46.el6 ghc-deepseq-1.1.0.2-9.el6 ghc-html-1.0.1.2-13.el6.3 ghc-syb-0.3.3-4.el6 ghc-xhtml-3000.2.0.4-3.el6 ghc-stm-2.2.0.1-8.el6.3 ghc-OpenGL-2.2.3.0-12.el6 ghc-mtl-2.0.1.0-10.el6 ghc-GLUT-2.1.2.1-13.el6 ghc-parallel-3.1.0.1-8.el6.3 ghc-text-0.11.1.5-3.el6 ghc-fgl-5.4.2.4-2.el6 ghc-parsec-3.1.1-8.el6 ghc-QuickCheck-2.4.1.1-2.el6 ghc-regex-base-0.93.2-10.el6 happy-1.18.6-8.el6.2 ghc-haskell-src-1.0.1.4-10.el6 ghc-network-2.3.0.5-3.el6 ghc-regex-posix-0.95.1-2.el6 ghc-regex-compat-0.95.1-2.el6 ghc-cgi-3001.1.7.4-11.el6 ghc-HTTP-4000.1.2-4.el6 ghc-zlib-0.5.3.1-8.el6 cabal-install-0.10.2-7.el6 ghc-xmonad-contrib-0.10-4.2.el6 ghc-gtk-0.12.2-2.3.el6 ghc-glade-0.12.1-3.el6 gtk2hs-buildtools-0.12.1-2.el6.2 ghc-glib-0.12.2-2.el6 ghc-cairo-0.12.2-2.el6 ghc-gio-0.12.2-2.el6 ghc-pango-0.12.2-2.el6 ghc-binary-0.5.0.2-10.el6 ghc-mmap-0.5.7-6.el6 ghc-dataenc-0.14-2.el6 ghc-terminfo-0.3.2.3-2.el6 ghc-tar-0.3.2.0-1.el6 ghc-hashed-storage-0.5.7-2.el6 ghc-haskeline-0.6.4.6-3.el6 darcs-2.5.2-9.el6 xmonad-0.10-3.4.1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-5980/ghc-7.0.4-46.el6,haskell-platform-2011.4.0.0-6.el6,ghc-rpm-macros-0.15.5-1.el6,hscolour-1.19-6.el6,ghc-HUnit-1.2.4.2-3.el6,ghc-transformers-0.2.2.0-14.el6,alex-2.3.5-6.el6.2,ghc-deepseq-1.1.0.2-9.el6,ghc-html-1.0.1.2-13.el6.3,ghc-syb-0.3.3-4.el6,ghc-xhtml-3000.2.0.4-3.el6,ghc-stm-2.2.0.1-8.el6.3,ghc-OpenGL-2.2.3.0-12.el6,ghc-mtl-2.0.1.0-10.el6,ghc-GLUT-2.1.2.1-13.el6,ghc-parallel-3.1.0.1-8.el6.3,ghc-text-0.11.1.5-3.el6,ghc-fgl-5.4.2.4-2.el6,ghc-parsec-3.1.1-8.el6,ghc-QuickCheck-2.4.1.1-2.el6,ghc-regex-base-0.93.2-10.el6,happy-1.18.6-8.el6.2,ghc-haskell-src-1.0.1.4-10.el6,ghc-network-2.3.0.5-3.el6,ghc-regex-posix-0.95.1-2.el6,ghc-regex-compat-0.95.1-2.el6,ghc-cgi-3001.1.7.4-11.el6,ghc-HTTP-4000.1.2-4.el6,ghc-zlib-0.5.3.1-8.el6,cabal-install-0.10.2-7.el6,xmonad-0.10-3.4.1.el6,ghc-X11-1.5.0.1-2.el6,ghc-utf8-string-0.3.7-1.el6,ghc-X11-xft-0.3.1-3.el6,ghc-xmonad-contrib-0.10-4.2.el6,gtk2hs-buildtools-0.12.1-2.el6.2,ghc-glib-0.12.2-2.el6,ghc-cairo-0.12.2-2.el6,ghc-gio-0.12.2-2.el6,ghc-pango-0.12.2-2.el6,ghc-gtk-0.12.2-2.3.el6,ghc-glade-0.12.1-3.el6,ghc-binary-0.5.0.2-10.el6,ghc-mmap-0.5.7-6.el6,ghc-dataenc-0.14-2.el6,ghc-terminfo-0.3.2.3-2.el6,ghc-tar-0.3.2.0-1.el6,ghc-hashed-storage-0.5.7-2.el6,ghc-haskeline-0.6.4.6-3.el6,darcs-2.5.2-9.el6
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-06-15 02:17:17 UTC
ghc-X11-1.5.0.1-2.el6, ghc-utf8-string-0.3.7-1.el6, ghc-X11-xft-0.3.1-3.el6, hscolour-1.19-6.el6, ghc-rpm-macros-0.15.5-1.el6, haskell-platform-2011.4.0.0-6.el6, ghc-HUnit-1.2.4.2-3.el6, ghc-transformers-0.2.2.0-14.el6, alex-2.3.5-6.el6.2, ghc-7.0.4-46.el6, ghc-deepseq-1.1.0.2-9.el6, ghc-html-1.0.1.2-13.el6.3, ghc-syb-0.3.3-4.el6, ghc-xhtml-3000.2.0.4-3.el6, ghc-stm-2.2.0.1-8.el6.3, ghc-OpenGL-2.2.3.0-12.el6, ghc-mtl-2.0.1.0-10.el6, ghc-GLUT-2.1.2.1-13.el6, ghc-parallel-3.1.0.1-8.el6.3, ghc-text-0.11.1.5-3.el6, ghc-fgl-5.4.2.4-2.el6, ghc-parsec-3.1.1-8.el6, ghc-QuickCheck-2.4.1.1-2.el6, ghc-regex-base-0.93.2-10.el6, happy-1.18.6-8.el6.2, ghc-haskell-src-1.0.1.4-10.el6, ghc-network-2.3.0.5-3.el6, ghc-regex-posix-0.95.1-2.el6, ghc-regex-compat-0.95.1-2.el6, ghc-cgi-3001.1.7.4-11.el6, ghc-HTTP-4000.1.2-4.el6, ghc-zlib-0.5.3.1-8.el6, cabal-install-0.10.2-7.el6, ghc-xmonad-contrib-0.10-4.2.el6, ghc-gtk-0.12.2-2.3.el6, ghc-glade-0.12.1-3.el6, gtk2hs-buildtools-0.12.1-2.el6.2, ghc-glib-0.12.2-2.el6, ghc-cairo-0.12.2-2.el6, ghc-gio-0.12.2-2.el6, ghc-pango-0.12.2-2.el6, ghc-binary-0.5.0.2-10.el6, ghc-mmap-0.5.7-6.el6, ghc-dataenc-0.14-2.el6, ghc-terminfo-0.3.2.3-2.el6, ghc-tar-0.3.2.0-1.el6, ghc-hashed-storage-0.5.7-2.el6, ghc-haskeline-0.6.4.6-3.el6, darcs-2.5.2-9.el6, xmonad-0.10-3.4.1.el6 has been pushed to the Fedora EPEL 6 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.