From 7df6e7356aa9b7d681cd91680beb36b0199d230e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 13 Mar 2023 20:18:51 +0800 Subject: [PATCH] ppc64le: disable hslua version check to avoid --version crash (rhbz#2172771) --- pandoc-version-disable-hslua.patch | 23 +++++++++++++++++++++++ pandoc.spec | 9 ++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pandoc-version-disable-hslua.patch diff --git a/pandoc-version-disable-hslua.patch b/pandoc-version-disable-hslua.patch new file mode 100644 index 0000000..f9594cd --- /dev/null +++ b/pandoc-version-disable-hslua.patch @@ -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 )) diff --git a/pandoc.spec b/pandoc.spec index 7861c25..812dd1d 100644 --- a/pandoc.spec +++ b/pandoc.spec @@ -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 - 2.19.2-21 +- ppc64le: disable hslua version check to avoid --version crash (rhbz#2172771) + * Thu Feb 23 2023 Jens Petersen - 2.19.2-20 - rebuild