diff --git a/0001-ureport-use-python3-to-get-consumerCertDir.patch b/0001-ureport-use-python3-to-get-consumerCertDir.patch new file mode 100644 index 0000000..e6fe7a6 --- /dev/null +++ b/0001-ureport-use-python3-to-get-consumerCertDir.patch @@ -0,0 +1,31 @@ +From 8c00a86dddaf240d4a836a5e278190bcc51b0b66 Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Mon, 18 Jun 2018 14:51:23 +0200 +Subject: [PATCH] ureport: use python3 to get consumerCertDir + +Related to #1592073 + +Signed-off-by: Matej Habrnal +--- + src/lib/ureport.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/ureport.c b/src/lib/ureport.c +index c32c948a..d2045f0f 100644 +--- a/src/lib/ureport.c ++++ b/src/lib/ureport.c +@@ -81,9 +81,10 @@ rhsm_config_get_consumer_cert_dir(void) + return xstrdup(result); + + result = run_in_shell_and_save_output(0, +- "python -c \"from rhsm.config import initConfig; print(initConfig().get('rhsm', 'consumerCertDir'))\"", ++ "python3 -c \"from rhsm.config import initConfig; print(initConfig().get('rhsm', 'consumerCertDir'))\"", + NULL, NULL); + ++ + /* run_in_shell_and_save_output always returns non-NULL */ + if (result[0] != '/') + goto error; +-- +2.17.0 + diff --git a/libreport.spec b/libreport.spec index 705a65a..6109c61 100644 --- a/libreport.spec +++ b/libreport.spec @@ -29,10 +29,13 @@ Summary: Generic library for reporting various problems Name: libreport Version: 2.9.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz + +Patch0001: 0001-ureport-use-python3-to-get-consumerCertDir.patch + BuildRequires: %{dbus_devel} BuildRequires: gtk3-devel BuildRequires: curl-devel @@ -55,6 +58,7 @@ BuildRequires: newt-devel BuildRequires: libproxy-devel BuildRequires: satyr-devel >= 0.24 BuildRequires: glib2-devel >= %{glib_ver} +BuildRequires: git %if 0%{?fedora} >= 24 || 0%{?rhel} > 7 # A test case uses zh_CN locale to verify XML event translations @@ -347,7 +351,12 @@ data over ftp/scp... %endif %prep -%setup -q +# http://www.rpm.org/wiki/PackagerDocs/Autosetup +# Default '__scm_apply_git' is 'git apply && git commit' but this workflow +# doesn't allow us to create a new file within a patch, so we have to use +# 'git am' (see /usr/lib/rpm/macros for more details) +%define __scm_apply_git(qp:m:) %{__git} am +%autosetup -S git %build autoconf @@ -371,7 +380,12 @@ CFLAGS="%{optflags} -Werror" %configure \ make %{?_smp_mflags} %install -make install DESTDIR=%{buildroot} mandir=%{_mandir} +make install DESTDIR=%{buildroot} \ +%if %{with python3} + PYTHON=%{__python3} \ +%endif # with python3 + mandir=%{_mandir} + %find_lang %{name} # Remove byte-compiled python files generated by automake. @@ -802,6 +816,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Mon Jun 18 2018 Matej Habrnal 2.9.5-3 +- Make this build without /usr/bin/python +- Resolves #1592073 + * Sat Jun 16 2018 Miro HronĨok - 2.9.5-2 - Rebuilt for Python 3.7