Bug 1138384

Summary: fix 'quickCheckAll' to read haskell sources in UTF-8
Product: [Fedora] Fedora Reporter: Dridi Boukelmoune <dridi.boukelmoune>
Component: ghc-QuickCheckAssignee: Jens Petersen <petersen>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: haskell-devel, petersen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 12:06:02 UTC Type: Bug
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: 1136297    

Description Dridi Boukelmoune 2014-09-04 17:13:17 UTC
Description of problem:

Locale-dependent instead of UTF-8 file manipulation.

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

ghc-QuickCheck-devel-2.6-34.fc22

How reproducible:

Always: http://koji.fedoraproject.org/koji/taskinfo?taskID=7524823

Steps to Reproduce:

Build ShellCheck 0.3.4 :)

Actual results:

ShellCheck/Parser.hs:2098:12:
    Exception when trying to run compile-time code:
      ./ShellCheck/Parser.hs: hGetContents: invalid argument (invalid byte sequence)
      Code: quickCheckAll
    In the expression: $quickCheckAll
    In an equation for `runTests': runTests = $quickCheckAll

Expected results:

A build!

Additional info:

Fixed in QuickCheck 2.7.4
https://github.com/nick8325/quickcheck/commit/ccf15ee
https://github.com/nick8325/quickcheck/commit/ccf15ee.diff

Comment 1 Jens Petersen 2014-09-05 06:33:15 UTC
I really blame rpmbuild for still using LANG=C by default... :)

Anyway as I commented in bug 1136297 you can workaround this
by setting LANG=en_US.utf8 before %cabal_lib_build. Like this:

%build
LANG=en_US.utf8
%ghc_lib_build

Comment 2 Jens Petersen 2014-09-05 06:35:22 UTC
I hope this is not the reason that upstream is now requiring 2.7.4...

Comment 3 Jens Petersen 2014-09-05 06:39:43 UTC
If I apply this it may change the ABI of the QuickCheck and so require
quite a number of packages to be rebuilt.  Perhaps we could consider
it for rawhide, but it also means diverging from the upsteam behaviour/
library so I am a little hesitant.  If you can live with the above workaround
then I may well be tempted to just close this as Upstream or CANTFIX.

Comment 4 Jens Petersen 2014-11-19 08:09:20 UTC
As far as I can tell now it is better to patch out the QC code from
the ShellCheck library since it is only needed for tests.

So hopefully this need not block future ShellCheck versions.

Haskell Platform for ghc-7.8.3 is still on 2.6 anyway.

Comment 5 Jaroslav Reznik 2015-03-03 17:15:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Fedora End Of Life 2016-07-19 12:06:02 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.