fix 0.3.4 build failure on ARM by removing TemplateHaskell QuickCheck runTests
defining tests in the main library modules seems an unusual design... Note running ldconfig for ghc-ShellCheck is redundant since the library does not live in %{_libdir}/
This commit is contained in:
parent
91e1b15caf
commit
43ecec81c9
72
ShellCheck-skip-TemplateHaskell-on-ARM.patch
Normal file
72
ShellCheck-skip-TemplateHaskell-on-ARM.patch
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
diff -up ShellCheck-0.3.4/ShellCheck/Analytics.hs~ ShellCheck-0.3.4/ShellCheck/Analytics.hs
|
||||||
|
--- ShellCheck-0.3.4/ShellCheck/Analytics.hs~ 2014-07-09 10:52:01.000000000 +0900
|
||||||
|
+++ ShellCheck-0.3.4/ShellCheck/Analytics.hs 2014-09-22 11:30:02.572576093 +0900
|
||||||
|
@@ -15,8 +15,7 @@
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-}
|
||||||
|
-{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
-module ShellCheck.Analytics (AnalysisOption(..), filterByAnnotation, runAnalytics, shellForExecutable, runTests) where
|
||||||
|
+module ShellCheck.Analytics (AnalysisOption(..), filterByAnnotation, runAnalytics, shellForExecutable) where
|
||||||
|
|
||||||
|
import Control.Arrow (first)
|
||||||
|
import Control.Monad
|
||||||
|
@@ -2879,7 +2878,3 @@ checkFindActionPrecedence params = check
|
||||||
|
param <- getLiteralString t
|
||||||
|
return $ param `elem` strs
|
||||||
|
warnFor t = warn (getId t) 2146 "This action ignores everything before the -o. Use \\( \\) to group."
|
||||||
|
-
|
||||||
|
-return []
|
||||||
|
-runTests = $quickCheckAll
|
||||||
|
-
|
||||||
|
diff -up ShellCheck-0.3.4/ShellCheck/Parser.hs~ ShellCheck-0.3.4/ShellCheck/Parser.hs
|
||||||
|
--- ShellCheck-0.3.4/ShellCheck/Parser.hs~ 2014-07-09 10:52:01.000000000 +0900
|
||||||
|
+++ ShellCheck-0.3.4/ShellCheck/Parser.hs 2014-09-22 11:30:32.801636172 +0900
|
||||||
|
@@ -15,8 +15,8 @@
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-}
|
||||||
|
-{-# LANGUAGE NoMonomorphismRestriction, TemplateHaskell #-}
|
||||||
|
-module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote, runTests) where
|
||||||
|
+{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||||
|
+module ShellCheck.Parser (Note(..), Severity(..), parseShell, ParseResult(..), ParseNote(..), sortNotes, noteToParseNote) where
|
||||||
|
|
||||||
|
import ShellCheck.AST
|
||||||
|
import ShellCheck.Data
|
||||||
|
@@ -2093,7 +2093,3 @@ parseShell filename contents =
|
||||||
|
|
||||||
|
lt x = trace (show x) x
|
||||||
|
ltt t = trace (show t)
|
||||||
|
-
|
||||||
|
-return []
|
||||||
|
-runTests = $quickCheckAll
|
||||||
|
-
|
||||||
|
diff -up ShellCheck-0.3.4/ShellCheck/Simple.hs~ ShellCheck-0.3.4/ShellCheck/Simple.hs
|
||||||
|
--- ShellCheck-0.3.4/ShellCheck/Simple.hs~ 2014-07-09 10:52:01.000000000 +0900
|
||||||
|
+++ ShellCheck-0.3.4/ShellCheck/Simple.hs 2014-09-22 11:29:17.715486995 +0900
|
||||||
|
@@ -15,15 +15,14 @@
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-}
|
||||||
|
-{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
-module ShellCheck.Simple (shellCheck, ShellCheckComment, scLine, scColumn, scSeverity, scCode, scMessage, runTests) where
|
||||||
|
+module ShellCheck.Simple (shellCheck, ShellCheckComment, scLine, scColumn, scSeverity, scCode, scMessage) where
|
||||||
|
|
||||||
|
import ShellCheck.Parser hiding (runTests)
|
||||||
|
import ShellCheck.Analytics hiding (runTests)
|
||||||
|
import Data.Maybe
|
||||||
|
import Text.Parsec.Pos
|
||||||
|
import Data.List
|
||||||
|
-import Test.QuickCheck.All (quickCheckAll)
|
||||||
|
+--import Test.QuickCheck.All (quickCheckAll)
|
||||||
|
|
||||||
|
shellCheck :: String -> [AnalysisOption] -> [ShellCheckComment]
|
||||||
|
shellCheck script options =
|
||||||
|
@@ -66,7 +65,3 @@ prop_commentDisablesAnalysisIssue1 =
|
||||||
|
null $ shellCheck "#shellcheck disable=SC2086\necho $1" []
|
||||||
|
prop_commentDisablesAnalysisIssue2 =
|
||||||
|
null $ shellCheck "#shellcheck disable=SC2086\n#lol\necho $1" []
|
||||||
|
-
|
||||||
|
-return []
|
||||||
|
-runTests = $quickCheckAll
|
||||||
|
-
|
@ -1,5 +1,11 @@
|
|||||||
%global pkg_name ShellCheck
|
%global pkg_name ShellCheck
|
||||||
|
|
||||||
|
%ifnarch %{arm}
|
||||||
%global with_tests 1
|
%global with_tests 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# no useful debuginfo for Haskell packages without C sources
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: 0.3.4
|
Version: 0.3.4
|
||||||
@ -8,7 +14,8 @@ Summary: Tool for checking common errors in POSIX shell scripts
|
|||||||
|
|
||||||
License: AGPLv3+
|
License: AGPLv3+
|
||||||
URL: http://www.shellcheck.net/about.html
|
URL: http://www.shellcheck.net/about.html
|
||||||
Source0: http://hackage.haskell.org/package/ShellCheck-%{version}/ShellCheck-%{version}.tar.gz
|
Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: ShellCheck-skip-TemplateHaskell-on-ARM.patch
|
||||||
|
|
||||||
BuildRequires: ghc-Cabal-devel
|
BuildRequires: ghc-Cabal-devel
|
||||||
BuildRequires: ghc-rpm-macros
|
BuildRequires: ghc-rpm-macros
|
||||||
@ -21,7 +28,6 @@ BuildRequires: ghc-json-devel
|
|||||||
BuildRequires: ghc-mtl-devel
|
BuildRequires: ghc-mtl-devel
|
||||||
BuildRequires: ghc-parsec-devel
|
BuildRequires: ghc-parsec-devel
|
||||||
BuildRequires: ghc-regex-compat-devel
|
BuildRequires: ghc-regex-compat-devel
|
||||||
BuildRequires: ghc-transformers-devel
|
|
||||||
# End cabal-rpm deps
|
# End cabal-rpm deps
|
||||||
BuildRequires: pandoc
|
BuildRequires: pandoc
|
||||||
|
|
||||||
@ -60,13 +66,16 @@ This package provides the Haskell %{name} library development files.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%ifarch %{arm}
|
||||||
|
%patch0 -p1 -b .orig
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
LANG=en_US.utf8
|
LANG=en_US.utf8
|
||||||
%ghc_lib_build
|
%ghc_lib_build
|
||||||
|
|
||||||
pandoc -s -t man shellcheck.1.md -o $@ shellcheck.1
|
pandoc -s -t man shellcheck.1.md -o shellcheck.1
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -78,15 +87,9 @@ install -Dpm 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with tests}
|
||||||
%cabal test
|
%cabal test
|
||||||
|
%endif
|
||||||
|
|
||||||
%post -n ghc-%{name}
|
|
||||||
%{_sbindir}/ldconfig
|
|
||||||
|
|
||||||
|
|
||||||
%postun -n ghc-%{name}
|
|
||||||
%{_sbindir}/ldconfig
|
|
||||||
|
|
||||||
|
|
||||||
%post -n ghc-%{name}-devel
|
%post -n ghc-%{name}-devel
|
||||||
@ -117,6 +120,7 @@ install -Dpm 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1
|
|||||||
- bumped to version 0.3.4
|
- bumped to version 0.3.4
|
||||||
- switched to hackage for the source tarball
|
- switched to hackage for the source tarball
|
||||||
- tests are now driven by cabal
|
- tests are now driven by cabal
|
||||||
|
- skip tests on ARM since TemplateHaskell fails
|
||||||
|
|
||||||
* Fri Sep 5 2014 Jens Petersen <petersen@redhat.com> - 0.3.3-2
|
* Fri Sep 5 2014 Jens Petersen <petersen@redhat.com> - 0.3.3-2
|
||||||
- reenable pandoc on ARM
|
- reenable pandoc on ARM
|
||||||
|
Loading…
Reference in New Issue
Block a user