From f177a59b8f943006b6d4cdc9caee0662c42ca742 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Sep 11 2020 16:36:27 +0000 Subject: enable embedded python support drop unused variable causing GCC10 compilation error --- diff --git a/inn-2.6.3-filterPath.patch b/inn-2.6.3-filterPath.patch new file mode 100644 index 0000000..b628957 --- /dev/null +++ b/inn-2.6.3-filterPath.patch @@ -0,0 +1,36 @@ +diff -up inn-2.6.3/innd/art.c.fp inn-2.6.3/innd/art.c +--- inn-2.6.3/innd/art.c.fp 2019-02-07 16:02:22.000000000 +0100 ++++ inn-2.6.3/innd/art.c 2020-09-11 14:24:21.055208612 +0200 +@@ -77,10 +77,6 @@ static char ARTjnk[] = "junk"; + static char hostcclass[256]; + #define ARThostchar(c) ((hostcclass[(unsigned char)(c)]) != 0) + +-#if defined(DO_PERL) || defined(DO_PYTHON) +-const char *filterPath; +-#endif /* DO_PERL || DO_PYTHON */ +- + /* Prototypes. */ + static void ARTerror(CHANNEL *cp, const char *format, ...) + __attribute__((__format__(printf, 2, 3))); +@@ -2072,10 +2068,6 @@ ARTpost(CHANNEL *cp) + } + } + +-#if defined(DO_PERL) || defined(DO_PYTHON) +- filterPath = HDR(HDR__PATH); +-#endif /* DO_PERL || DO_PYHTON */ +- + #if defined(DO_PYTHON) + TMRstart(TMR_PYTHON); + filterrc = PYartfilter(data, article->data + data->Body, +diff -up inn-2.6.3/innd/python.c.fp inn-2.6.3/innd/python.c +--- inn-2.6.3/innd/python.c.fp 2019-02-07 16:02:22.000000000 +0100 ++++ inn-2.6.3/innd/python.c 2020-09-11 14:23:46.143958961 +0200 +@@ -60,7 +60,6 @@ + #include "innd.h" + + bool PythonFilterActive; +-char *filterPath; /* This gets set in art.c. */ + PyObject *PYFilterObject = NULL; + PyObject *PYFilterModule = NULL; + diff --git a/inn.spec b/inn.spec index ccd01b9..42a0490 100644 --- a/inn.spec +++ b/inn.spec @@ -22,6 +22,7 @@ Source24: innd-nntpsend.timer Source25: innd-rnews.service Source26: innd-rnews.timer Patch1: inn-2.6.0-rh.patch +Patch2: inn-2.6.3-filterPath.patch Patch4: inn-2.6.0.pie.patch Patch6: inn-2.5.2.posix.patch Patch7: inn-2.4.3.warn.patch @@ -43,7 +44,7 @@ BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::Embed) BuildRequires: perl(GD) BuildRequires: perl(MIME::Parser) -BuildRequires: python3 +BuildRequires: python3-devel BuildRequires: systemd BuildRequires: wget BuildRequires: %{_bindir}/gpgv2 @@ -114,6 +115,7 @@ This package contains dynamic libraries provided by INN project gpgv2 --keyring %{S:3} %{S:1} %{S:0} %setup -q -n inn-%{version} %patch1 -p1 -b .rh +%patch2 -p1 -b .gcc10 %patch4 -p1 -b .pie %patch6 -p1 -b .posix %patch7 -p1 -b .warn @@ -137,6 +139,7 @@ gpgv2 --keyring %{S:3} %{S:1} %{S:0} --with-openssl \ --with-perl \ --with-pic \ + --with-python \ --with-run-dir=/run/news \ --with-sasl \ --with-sendmail=/usr/sbin/sendmail \ @@ -613,6 +616,8 @@ fi %changelog * Wed Sep 09 2020 Petr Viktorin - 2.6.3-9 - Switch BuildRequires to python3 +- enable embedded python support (Dominik Mierzejewski) +- drop unused variable causing GCC10 compilation error (Dominik Mierzejewski) * Tue Jul 28 2020 Fedora Release Engineering - 2.6.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild