ppc64le: disable hslua version check to avoid --version crash (rhbz#2172771)

This commit is contained in:
Jens Petersen 2023-03-13 20:18:51 +08:00
parent 3ce14ce621
commit 7df6e7356a
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,23 @@
--- pandoc-2.19.2/src/Text/Pandoc/App/CommandLineOptions.hs~ 2001-09-09 09:46:40.000000000 +0800
+++ pandoc-2.19.2/src/Text/Pandoc/App/CommandLineOptions.hs 2023-03-13 20:14:12.911386007 +0800
@@ -969,14 +969,15 @@
(\_ -> do
prg <- getProgName
defaultDatadir <- defaultUserDataDir
- luaVersion <- HsLua.run @HsLua.Exception $ do
- openlibs
- getglobal "_VERSION"
- peek top
+ -- luaVersion <- HsLua.run @HsLua.Exception $ do
+ -- openlibs
+ -- getglobal "_VERSION"
+ -- peek top
UTF8.hPutStrLn stdout
$ T.pack
$ prg ++ " " ++ T.unpack pandocVersion ++ versionSuffix ++
- compileInfo ++ "\nScripting engine: " ++ luaVersion ++
+ compileInfo ++
+ -- "\nScripting engine: " ++ luaVersion ++
"\nUser data directory: " ++ defaultDatadir ++
('\n':copyrightMessage)
exitSuccess ))

View File

@ -26,7 +26,7 @@
Name: %{pkg_name}
Version: 2.19.2
# can only be reset when all subpkgs bumped
Release: 20%{?dist}
Release: 21%{?dist}
Summary: Conversion between markup formats
License: GPL-2.0-or-later
@ -49,6 +49,7 @@ Source13: https://hackage.haskell.org/package/%{hsluamoduleversion}/%{hslu
Source14: https://hackage.haskell.org/package/%{lpeg}/%{lpeg}.tar.gz
Source15: https://hackage.haskell.org/package/%{pandocluamarshal}/%{pandocluamarshal}.tar.gz
# End cabal-rpm sources
Patch0: pandoc-version-disable-hslua.patch
# Begin cabal-rpm deps:
BuildRequires: ghc-Cabal-devel
@ -417,6 +418,9 @@ This package provides the Haskell %{name} profiling library.
# Begin cabal-rpm setup:
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15
# End cabal-rpm setup
%ifarch ppc64le
%patch0 -p1 -b .orig
%endif
%build
@ -496,6 +500,9 @@ touch %{buildroot}%{_datadir}/bash-completion/completions/%{name}
%changelog
* Mon Mar 13 2023 Jens Petersen <petersen@redhat.com> - 2.19.2-21
- ppc64le: disable hslua version check to avoid --version crash (rhbz#2172771)
* Thu Feb 23 2023 Jens Petersen <petersen@redhat.com> - 2.19.2-20
- rebuild