From a3f2d068fc7f4b6256dda4557e6ef827e36780c7c17706cadaafe32c070f5709 Mon Sep 17 00:00:00 2001 From: Cor Blom Date: Wed, 29 Aug 2018 22:06:42 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Publishing/lyx?expand=0&rev=151 --- correct-shebang.patch | 54 +++++++++++++++++++++++++++++++++++++ lyx.changes | 11 ++++---- lyx.spec | 9 ++++--- remove-env-for-python.patch | 45 ------------------------------- 4 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 correct-shebang.patch delete mode 100644 remove-env-for-python.patch diff --git a/correct-shebang.patch b/correct-shebang.patch new file mode 100644 index 0000000..38b0aae --- /dev/null +++ b/correct-shebang.patch @@ -0,0 +1,54 @@ +diff -ur a/lib/configure.py b/lib/configure.py +--- a/lib/configure.py 2018-08-28 21:49:44.000000000 +0200 ++++ b/lib/configure.py 2018-08-29 23:44:58.310928948 +0200 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # -*- coding: utf-8 -*- + # + # file configure.py +diff -ur a/lib/lyx2lyx/lyx2lyx b/lib/lyx2lyx/lyx2lyx +--- a/lib/lyx2lyx/lyx2lyx 2018-08-28 21:49:44.000000000 +0200 ++++ b/lib/lyx2lyx/lyx2lyx 2018-08-29 23:46:17.080401969 +0200 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # -*- coding: utf-8 -*- + # Copyright (C) 2002-2011 The LyX Team + # Copyright (C) 2002-2007 José Matos +diff -ur a/lib/lyx2lyx/profiling.py b/lib/lyx2lyx/profiling.py +--- a/lib/lyx2lyx/profiling.py 2018-08-28 21:49:44.000000000 +0200 ++++ b/lib/lyx2lyx/profiling.py 2018-08-29 23:46:36.432763866 +0200 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # -*- coding: utf-8 -*- + # Copyright (C) 2004 José Matos + # +diff -ur a/lib/scripts/listerrors b/lib/scripts/listerrors +--- a/lib/scripts/listerrors 2018-08-28 21:49:44.000000000 +0200 ++++ b/lib/scripts/listerrors 2018-08-29 23:47:06.305322496 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # file listerrors + # This file is part of LyX, the document processor. +diff -ur a/lib/scripts/svg2pdftex.py b/lib/scripts/svg2pdftex.py +--- a/lib/scripts/svg2pdftex.py 2018-08-28 21:49:44.000000000 +0200 ++++ b/lib/scripts/svg2pdftex.py 2018-08-29 23:47:27.381716633 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file svg2pdftex.py +diff -ur a/lib/scripts/svg2pstex.py b/lib/scripts/svg2pstex.py +--- a/lib/scripts/svg2pstex.py 2018-08-28 21:49:44.000000000 +0200 ++++ b/lib/scripts/svg2pstex.py 2018-08-29 23:47:42.970008140 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # file svg2pstex.py diff --git a/lyx.changes b/lyx.changes index ce81f55..5f1b251 100644 --- a/lyx.changes +++ b/lyx.changes @@ -1,13 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 29 22:05:25 UTC 2018 - cornelis@solcon.nl + +- Add correct-shebang.patch to satisfy rpmlint +- Switch to python3 + ------------------------------------------------------------------- Tue Aug 28 20:20:14 UTC 2018 - cornelis@solcon.nl - Updated tarballs -------------------------------------------------------------------- -Tue Aug 28 19:54:38 UTC 2018 - cornelis@solcon.nl - -- Add remove-env-for-python.patch to remove rpmlint errors. - ------------------------------------------------------------------- Tue Aug 28 19:37:33 UTC 2018 - cornelis@solcon.nl diff --git a/lyx.spec b/lyx.spec index 8eb2161..20fc65a 100644 --- a/lyx.spec +++ b/lyx.spec @@ -27,8 +27,11 @@ Source: ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/lyx-%{version}-1.tar.xz Source1: lyxrc.dist Source2: lyx.keyring Source3: ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/lyx-%{version}-1.tar.xz.sig -# PATCH-FIX-UPSTREAM - use #! /usr/bin/python as shebang -Patch0: remove-env-for-python.patch +# PATCH to satisfy rpmlint - use #! /usr/bin/python as shebang +# See: https://www.lyx.org/trac/changeset/cac27076ead10684270520670adc6bd004793361/lyxgit +# Upstream also made change to python3 in master. Because 2.3.1 is compatible with both +# python2 and 3 we follow and switch to python3 +Patch0: correct-shebang.patch #!BuildIgnore: lyx BuildRequires: autoconf BuildRequires: automake @@ -39,7 +42,7 @@ BuildRequires: file-devel BuildRequires: hicolor-icon-theme BuildRequires: hunspell-devel BuildRequires: pkgconfig -BuildRequires: python +BuildRequires: python3 BuildRequires: update-desktop-files BuildRequires: zlib-devel Requires: ImageMagick diff --git a/remove-env-for-python.patch b/remove-env-for-python.patch deleted file mode 100644 index 545ec83..0000000 --- a/remove-env-for-python.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ur a/lib/configure.py b/lib/configure.py ---- a/lib/configure.py 2018-08-27 20:12:11.000000000 +0200 -+++ b/lib/configure.py 2018-08-28 21:42:49.360229706 +0200 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python - # -*- coding: utf-8 -*- - # - # file configure.py -diff -ur a/lib/lyx2lyx/lyx2lyx b/lib/lyx2lyx/lyx2lyx ---- a/lib/lyx2lyx/lyx2lyx 2018-08-27 20:12:11.000000000 +0200 -+++ b/lib/lyx2lyx/lyx2lyx 2018-08-28 21:42:24.759811210 +0200 -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python - # -*- coding: utf-8 -*- - # Copyright (C) 2002-2011 The LyX Team - # Copyright (C) 2002-2007 José Matos -diff -ur a/lib/scripts/listerrors b/lib/scripts/listerrors ---- a/lib/scripts/listerrors 2018-08-27 20:12:11.000000000 +0200 -+++ b/lib/scripts/listerrors 2018-08-28 21:40:34.005927089 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - - # file listerrors - # This file is part of LyX, the document processor. -diff -ur a/lib/scripts/svg2pdftex.py b/lib/scripts/svg2pdftex.py ---- a/lib/scripts/svg2pdftex.py 2018-08-27 20:12:11.000000000 +0200 -+++ b/lib/scripts/svg2pdftex.py 2018-08-28 21:41:14.790620909 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # -*- coding: utf-8 -*- - - # file svg2pdftex.py -diff -ur a/lib/scripts/svg2pstex.py b/lib/scripts/svg2pstex.py ---- a/lib/scripts/svg2pstex.py 2018-08-27 20:12:11.000000000 +0200 -+++ b/lib/scripts/svg2pstex.py 2018-08-28 21:41:32.770926786 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # -*- coding: utf-8 -*- - - # file svg2pstex.py