diff --git a/0001-libgda-report-remove-trml2pdf-trml2html-functionalit.patch b/0001-libgda-report-remove-trml2pdf-trml2html-functionalit.patch new file mode 100644 index 0000000..95b7cd9 --- /dev/null +++ b/0001-libgda-report-remove-trml2pdf-trml2html-functionalit.patch @@ -0,0 +1,68 @@ +diff --git a/libgda-report/RML/gda-report-rml-document.c b/libgda-report/RML/gda-report-rml-document.c +index 7bb13bc..3f905e5 100644 +--- a/libgda-report/RML/gda-report-rml-document.c ++++ b/libgda-report/RML/gda-report-rml-document.c +@@ -189,61 +189,11 @@ gda_report_rml_document_new (GdaReportEngine *engine) + static gboolean + gda_report_rml_document_run_as_html (GdaReportDocument *doc, const gchar *filename, GError **error) + { +- static GMutex init_mutex; +- static gchar *converter = NULL; +- +- g_return_val_if_fail (GDA_IS_REPORT_RML_DOCUMENT (doc), FALSE); +- g_return_val_if_fail (filename && *filename, FALSE); +- +- g_mutex_lock (&init_mutex); +- if (!converter) { +- converter = g_find_program_in_path ("trml2html.py"); +- if (!converter) { +- converter = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "gda_trml2html", "trml2html.py", NULL); +- if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) { +- g_free (converter); +- converter = NULL; +- } +- } +- if (!converter) { +- g_set_error (error, 0, 0, +- _("Could not find the '%s' program"), "trml2html.py"); +- g_mutex_unlock (&init_mutex); +- return FALSE; +- } +- } +- g_mutex_unlock (&init_mutex); +- +- return _gda_report_document_run_converter_path (doc, filename, converter, "trml2html", error); ++ return TRUE; + } + + static gboolean + gda_report_rml_document_run_as_pdf (GdaReportDocument *doc, const gchar *filename, GError **error) + { +- static GMutex init_mutex; +- static gchar *converter = NULL; +- +- g_return_val_if_fail (GDA_IS_REPORT_RML_DOCUMENT (doc), FALSE); +- g_return_val_if_fail (filename && *filename, FALSE); +- +- g_mutex_lock (&init_mutex); +- if (!converter) { +- converter = g_find_program_in_path ("trml2pdf.py"); +- if (!converter) { +- converter = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "gda_trml2pdf", "trml2pdf.py", NULL); +- if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) { +- g_free (converter); +- converter = NULL; +- } +- } +- if (!converter) { +- g_set_error (error, 0, 0, +- _("Could not find the '%s' program"), "trml2pdf.py"); +- g_mutex_unlock (&init_mutex); +- return FALSE; +- } +- } +- g_mutex_unlock (&init_mutex); +- +- return _gda_report_document_run_converter_path (doc, filename, converter, "trml2pdf", error); ++ return TRUE; + } diff --git a/0005-Use-explicit-python2-shebangs.patch b/0005-Use-explicit-python2-shebangs.patch deleted file mode 100644 index d11b684..0000000 --- a/0005-Use-explicit-python2-shebangs.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3505267767f8e27f1f4fe0480178b33568bbd5de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Sun, 6 Jan 2019 22:31:44 +0100 -Subject: [PATCH 6/6] Use explicit python2 shebangs - ---- - libgda-report/RML/trml2html/trml2html.py | 2 +- - libgda-report/RML/trml2pdf/trml2pdf.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libgda-report/RML/trml2html/trml2html.py b/libgda-report/RML/trml2html/trml2html.py -index 5ad2e9e..8d0f25d 100644 ---- a/libgda-report/RML/trml2html/trml2html.py -+++ b/libgda-report/RML/trml2html/trml2html.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # -*- coding: utf-8 -*- - - # trml2pdf - An RML to PDF converter -diff --git a/libgda-report/RML/trml2pdf/trml2pdf.py b/libgda-report/RML/trml2pdf/trml2pdf.py -index 8364cb1..f46a82c 100644 ---- a/libgda-report/RML/trml2pdf/trml2pdf.py -+++ b/libgda-report/RML/trml2pdf/trml2pdf.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # -*- coding: utf-8 -*- - - # trml2pdf - An RML to PDF converter --- -2.20.1 - diff --git a/libgda.spec b/libgda.spec index ddc10e9..2d04ad6 100644 --- a/libgda.spec +++ b/libgda.spec @@ -1,7 +1,3 @@ -# This package depends on automagic byte compilation -# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 -%global _python_bytecompile_extra 1 - %bcond_without bdb %bcond_without ldap %bcond_without mysql @@ -15,15 +11,15 @@ Name: libgda Epoch: 1 Version: 5.2.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for writing gnome database programs License: LGPLv2+ URL: http://www.gnome-db.org/ Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/5.2/%{name}-%{version}.tar.xz -# Use explicit python2 shebangs -Patch0005: 0005-Use-explicit-python2-shebangs.patch +# remove converter functionality that relies on eight-year-old python2 scripts +Patch1: 0001-libgda-report-remove-trml2pdf-trml2html-functionalit.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -246,6 +242,10 @@ export LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/%{archinstall}/server:$LD_LIBRA find %{buildroot} -name '*.la' -exec rm -f {} ';' rm %{buildroot}/%{_sysconfdir}/%{name}-%{apiver}/sales_test.db +# remove eight-year-old python2 report converter scripts +rm -r %{buildroot}/%{_datadir}/%{name}-%{apiver}/gda_trml2html +rm -r %{buildroot}/%{_datadir}/%{name}-%{apiver}/gda_trml2pdf + %find_lang libgda-5.0 %find_lang gda-browser --with-gnome @@ -314,8 +314,6 @@ rm %{buildroot}/%{_sysconfdir}/%{name}-%{apiver}/sales_test.db %files tools -f gda-browser.lang %doc %{_datadir}/gtk-doc/html/gda-browser/ %{_bindir}/gda-* -%{_datadir}/%{name}-%{apiver}/gda_trml2html -%{_datadir}/%{name}-%{apiver}/gda_trml2pdf %{_datadir}/appdata/*.appdata.xml %{_datadir}/applications/gda-browser-%{apiver}.desktop %{_datadir}/applications/gda-control-center-%{apiver}.desktop @@ -374,6 +372,9 @@ rm %{buildroot}/%{_sysconfdir}/%{name}-%{apiver}/sales_test.db %endif %changelog +* Thu Sep 12 2019 Fabio Valentini - 1:5.2.9-3 +- Remove report converter functionality that relies on ancient python2 scripts. + * Thu Jul 25 2019 Fedora Release Engineering - 1:5.2.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild