Make this build without /usr/bin/python
Related to #1592073 Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
This commit is contained in:
parent
5cfc64eb8f
commit
81821dbddb
31
0001-ureport-use-python3-to-get-consumerCertDir.patch
Normal file
31
0001-ureport-use-python3-to-get-consumerCertDir.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 8c00a86dddaf240d4a836a5e278190bcc51b0b66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
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 <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -29,10 +29,13 @@
|
|||||||
Summary: Generic library for reporting various problems
|
Summary: Generic library for reporting various problems
|
||||||
Name: libreport
|
Name: libreport
|
||||||
Version: 2.9.5
|
Version: 2.9.5
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://abrt.readthedocs.org/
|
URL: https://abrt.readthedocs.org/
|
||||||
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
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: %{dbus_devel}
|
||||||
BuildRequires: gtk3-devel
|
BuildRequires: gtk3-devel
|
||||||
BuildRequires: curl-devel
|
BuildRequires: curl-devel
|
||||||
@ -55,6 +58,7 @@ BuildRequires: newt-devel
|
|||||||
BuildRequires: libproxy-devel
|
BuildRequires: libproxy-devel
|
||||||
BuildRequires: satyr-devel >= 0.24
|
BuildRequires: satyr-devel >= 0.24
|
||||||
BuildRequires: glib2-devel >= %{glib_ver}
|
BuildRequires: glib2-devel >= %{glib_ver}
|
||||||
|
BuildRequires: git
|
||||||
|
|
||||||
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7
|
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7
|
||||||
# A test case uses zh_CN locale to verify XML event translations
|
# A test case uses zh_CN locale to verify XML event translations
|
||||||
@ -347,7 +351,12 @@ data over ftp/scp...
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%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
|
%build
|
||||||
autoconf
|
autoconf
|
||||||
@ -371,7 +380,12 @@ CFLAGS="%{optflags} -Werror" %configure \
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot} mandir=%{_mandir}
|
make install DESTDIR=%{buildroot} \
|
||||||
|
%if %{with python3}
|
||||||
|
PYTHON=%{__python3} \
|
||||||
|
%endif # with python3
|
||||||
|
mandir=%{_mandir}
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
# Remove byte-compiled python files generated by automake.
|
# Remove byte-compiled python files generated by automake.
|
||||||
@ -802,6 +816,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 18 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-3
|
||||||
|
- Make this build without /usr/bin/python
|
||||||
|
- Resolves #1592073
|
||||||
|
|
||||||
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.9.5-2
|
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.9.5-2
|
||||||
- Rebuilt for Python 3.7
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user