import spacewalk-abrt-2.8.3-5.module+el8+2757+b847be8a

This commit is contained in:
CentOS Sources 2019-05-07 06:44:58 -04:00 committed by Andrew Lukoshko
commit a121f901c6
7 changed files with 376 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/spacewalk-abrt-2.8.3.tar.gz

1
.spacewalk-abrt.metadata Normal file
View File

@ -0,0 +1 @@
5387322f4b637dc5b0963ed8c4428cca1dd7bf4a SOURCES/spacewalk-abrt-2.8.3.tar.gz

View File

@ -0,0 +1,23 @@
diff --git a/spacewalk-abrt.spec b/spacewalk-abrt.spec
index 38238e92d3..75bce26561 100644
--- a/spacewalk-abrt.spec
+++ b/spacewalk-abrt.spec
@@ -7,7 +7,7 @@
Name: spacewalk-abrt
Version: 2.8.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: ABRT plug-in for rhn-check
License: GPLv2
@@ -83,6 +83,9 @@ service abrtd restart
%endif
%changelog
+* Mon Mar 05 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-2
+- rebuild for rhel8
+
* Fri Feb 09 2018 Michael Mraka <michael.mraka@redhat.com> 2.8.3-1
- remove install/clean section initial cleanup
- removed Group from specfile

View File

@ -0,0 +1,29 @@
diff --git a/spacewalk-abrt.spec b/spacewalk-abrt.spec
index 75bce26561..14914eba34 100644
--- a/spacewalk-abrt.spec
+++ b/spacewalk-abrt.spec
@@ -1,4 +1,4 @@
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} >= 8
%global build_py3 1
%global default_py3 1
%endif
@@ -7,7 +7,7 @@
Name: spacewalk-abrt
Version: 2.8.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: ABRT plug-in for rhn-check
License: GPLv2
@@ -83,6 +83,9 @@ service abrtd restart
%endif
%changelog
+* Wed Mar 14 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-3
+- build spacewalk-abrt for python3 (tkasparek@redhat.com)
+
* Mon Mar 05 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-2
- rebuild for rhel8

View File

@ -0,0 +1,71 @@
diff --git a/spacewalk-abrt.spec b/spacewalk-abrt.spec
index 14914eba34..951caa0794 100644
--- a/spacewalk-abrt.spec
+++ b/spacewalk-abrt.spec
@@ -3,11 +3,15 @@
%global default_py3 1
%endif
+%if ( 0%{?fedora} && 0%{?fedora} < 28 ) || ( 0%{?rhel} && 0%{?rhel} < 8 )
+%global build_py2 1
+%endif
+
%define pythonX %{?default_py3: python3}%{!?default_py3: python2}
Name: spacewalk-abrt
Version: 2.8.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: ABRT plug-in for rhn-check
License: GPLv2
@@ -21,6 +25,7 @@ Requires: abrt-cli
%description
spacewalk-abrt - rhn-check plug-in for collecting information about crashes handled by ABRT.
+%if 0%{?build_py2}
%package -n python2-%{name}
Summary: ABRT plug-in for rhn-check
%{?python_provide:%python_provide python2-%{name}}
@@ -29,6 +34,7 @@ Requires: python2-rhn-client-tools
Requires: python2-rhn-check
%description -n python2-%{name}
Python 2 specific files for %{name}.
+%endif
%if 0%{?build_py3}
%package -n python3-%{name}
@@ -48,8 +54,10 @@ Python 3 specific files for %{name}.
make -f Makefile.spacewalk-abrt
%install
+%if 0%{?build_py2}
make -f Makefile.spacewalk-abrt install PREFIX=$RPM_BUILD_ROOT \
PYTHON_PATH=%{python_sitelib} PYTHON_VERSION=%{python_version}
+%endif
%if 0%{?build_py3}
sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' src/bin/spacewalk-abrt
make -f Makefile.spacewalk-abrt install PREFIX=$RPM_BUILD_ROOT \
@@ -72,9 +80,11 @@ service abrtd restart
%{_bindir}/spacewalk-abrt
%{_mandir}/man8/*
+%if 0%{?build_py2}
%files -n python2-%{name}
%{_bindir}/spacewalk-abrt-%{python_version}
%{python_sitelib}/spacewalk_abrt/
+%endif
%if 0%{?build_py3}
%files -n python3-%{name}
@@ -83,6 +93,10 @@ service abrtd restart
%endif
%changelog
+* Tue Mar 20 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-4
+- don't build python2 subpackages on systems with default python3
+ (tkasparek@redhat.com)
+
* Wed Mar 14 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-3
- build spacewalk-abrt for python3 (tkasparek@redhat.com)

View File

@ -0,0 +1,53 @@
diff --git a/spacewalk-abrt.spec b/spacewalk-abrt.spec
index 951caa0794..83de6a7954 100644
--- a/spacewalk-abrt.spec
+++ b/spacewalk-abrt.spec
@@ -11,7 +11,7 @@
Name: spacewalk-abrt
Version: 2.8.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: ABRT plug-in for rhn-check
License: GPLv2
@@ -93,6 +93,10 @@ service abrtd restart
%endif
%changelog
+* Fri Nov 02 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-5
+- Resolves: #1623111 - use base64.encodebytes if possible
+ (tkasparek@redhat.com)
+
* Tue Mar 20 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-4
- don't build python2 subpackages on systems with default python3
(tkasparek@redhat.com)
diff --git a/src/spacewalk_abrt/abrt.py b/src/spacewalk_abrt/abrt.py
index d1093a0209..283dea46af 100644
--- a/src/spacewalk_abrt/abrt.py
+++ b/src/spacewalk_abrt/abrt.py
@@ -29,6 +29,9 @@ from up2date_client import up2dateAuth
from up2date_client import rhnserver
from up2date_client import up2dateLog
+encodestring = base64.encodestring
+if hasattr(base64, 'encodebytes'):
+ encodestring = base64.encodebytes
def _readline(filepath):
firstline = None
@@ -114,12 +117,12 @@ def report(problem_dir):
crash_file_data = {'filename': os.path.basename(i),
'path': path,
'filesize': filesize,
- 'filecontent': base64.encodestring(bstr("")),
+ 'filecontent': encodestring(bstr("")),
'content-encoding': 'base64'}
if server.abrt.is_crashfile_upload_enabled(systemid) and filesize <= server.abrt.get_crashfile_uploadlimit(systemid):
f = open(path, 'r')
try:
- crash_file_data['filecontent'] = base64.encodestring(bstr(f.read()))
+ crash_file_data['filecontent'] = encodestring(bstr(f.read()))
finally:
f.close()

198
SPECS/spacewalk-abrt.spec Normal file
View File

@ -0,0 +1,198 @@
%if 0%{?fedora} || 0%{?rhel} >= 8
%global build_py3 1
%global default_py3 1
%endif
%if ( 0%{?fedora} && 0%{?fedora} < 28 ) || ( 0%{?rhel} && 0%{?rhel} < 8 )
%global build_py2 1
%endif
%define pythonX %{?default_py3: python3}%{!?default_py3: python2}
Name: spacewalk-abrt
Version: 2.8.3
Release: 5%{?dist}
Summary: ABRT plug-in for rhn-check
License: GPLv2
URL: https://github.com/spacewalkproject/spacewalk
Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
Patch0: spacewalk-abrt-2.8.3-1-to-spacewalk-abrt-2.8.3-2-el8.patch
Patch1: spacewalk-abrt-2.8.3-2-el8-to-spacewalk-abrt-2.8.3-3-el8.patch
Patch2: spacewalk-abrt-2.8.3-3-el8-to-spacewalk-abrt-2.8.3-4-el8.patch
Patch3: spacewalk-abrt-2.8.3-4-el8-to-spacewalk-abrt-2.8.3-5-el8.patch
BuildArch: noarch
BuildRequires: gettext
Requires: %{pythonX}-%{name} = %{version}-%{release}
Requires: abrt
Requires: abrt-cli
%description
spacewalk-abrt - rhn-check plug-in for collecting information about crashes handled by ABRT.
%if 0%{?build_py2}
%package -n python2-%{name}
Summary: ABRT plug-in for rhn-check
%{?python_provide:%python_provide python2-%{name}}
BuildRequires: python
Requires: python2-rhn-client-tools
Requires: python2-rhn-check
%description -n python2-%{name}
Python 2 specific files for %{name}.
%endif
%if 0%{?build_py3}
%package -n python3-%{name}
Summary: ABRT plug-in for rhn-check
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-rpm-macros
Requires: python3-rhn-client-tools
Requires: python3-rhn-check
%description -n python3-%{name}
Python 3 specific files for %{name}.
%endif
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
make -f Makefile.spacewalk-abrt
%install
%if 0%{?build_py2}
make -f Makefile.spacewalk-abrt install PREFIX=$RPM_BUILD_ROOT \
PYTHON_PATH=%{python_sitelib} PYTHON_VERSION=%{python_version}
%endif
%if 0%{?build_py3}
sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' src/bin/spacewalk-abrt
make -f Makefile.spacewalk-abrt install PREFIX=$RPM_BUILD_ROOT \
PYTHON_PATH=%{python3_sitelib} PYTHON_VERSION=%{python3_version}
%endif
%define default_suffix %{?default_py3:-%{python3_version}}%{!?default_py3:-%{python_version}}
ln -s spacewalk-abrt%{default_suffix} $RPM_BUILD_ROOT%{_bindir}/spacewalk-abrt
%find_lang %{name}
%clean
%post
service abrtd restart
%files -f %{name}.lang
%config /etc/sysconfig/rhn/clientCaps.d/abrt
%config /etc/libreport/events.d/spacewalk.conf
%{_bindir}/spacewalk-abrt
%{_mandir}/man8/*
%if 0%{?build_py2}
%files -n python2-%{name}
%{_bindir}/spacewalk-abrt-%{python_version}
%{python_sitelib}/spacewalk_abrt/
%endif
%if 0%{?build_py3}
%files -n python3-%{name}
%{_bindir}/spacewalk-abrt-%{python3_version}
%{python3_sitelib}/spacewalk_abrt/
%endif
%changelog
* Fri Nov 02 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-5
- Resolves: #1623111 - use base64.encodebytes if possible
(tkasparek@redhat.com)
* Tue Mar 20 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-4
- don't build python2 subpackages on systems with default python3
(tkasparek@redhat.com)
* Wed Mar 14 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-3
- build spacewalk-abrt for python3 (tkasparek@redhat.com)
* Mon Mar 05 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.3-2
- rebuild for rhel8
* Fri Feb 09 2018 Michael Mraka <michael.mraka@redhat.com> 2.8.3-1
- remove install/clean section initial cleanup
- removed Group from specfile
- removed BuildRoot from specfiles
* Mon Oct 09 2017 Michael Mraka <michael.mraka@redhat.com> 2.8.2-1
- use standard rpmbuild bytecompile
- modules are now in standard sitelib path
- install files into python_sitelib/python3_sitelib
- split spacewalk-abrt into python2/python3 specific packages
* Wed Sep 06 2017 Michael Mraka <michael.mraka@redhat.com> 2.8.1-1
- purged changelog entries for Spacewalk 2.0 and older
- Bumping package versions for 2.8.
* Mon Jul 31 2017 Eric Herget <eherget@redhat.com> 2.7.3-1
- update copyright year
* Mon Jul 17 2017 Jan Dobes 2.7.2-1
- Updating .po translations from Zanata
- Updated links to github in spec files
- Migrating Fedorahosted to GitHub
* Mon Jan 23 2017 Jan Dobes 2.7.1-1
- abrt python2/3 fix
- Bumping package versions for 2.7.
* Wed Nov 09 2016 Gennadii Altukhov <galt@redhat.com> 2.6.2-1
- Revert Project-Id-Version for translations
* Tue Nov 08 2016 Gennadii Altukhov <galt@redhat.com> 2.6.1-1
- Regenerating .po and .pot files for spacewalk-abrt.
- Updating .po translations from Zanata
- Bumping package versions for 2.6.
* Tue May 24 2016 Tomas Kasparek <tkasparek@redhat.com> 2.5.5-1
- updating copyright years
- Regenerating .po and .pot files for spacewalk-abrt.
- Updating .po translations from Zanata
* Wed May 18 2016 Tomas Kasparek <tkasparek@redhat.com> 2.5.4-1
- encodestring expected bytes, not string
* Tue Apr 26 2016 Gennadii Altukhov <galt@redhat.com> 2.5.3-1
- Adapt spacewalk-abrt to Python 2/3
* Thu Feb 18 2016 Jan Dobes 2.5.2-1
- fixing warning
- do not evaluate Makefile
- do not keep this file in git
- pulling *.po translations from Zanata
- fixing current *.po translations
* Fri Nov 13 2015 Tomas Kasparek <tkasparek@redhat.com> 2.5.1-1
- python is not part of basic Fedora installation anymore
- Bumping package versions for 2.5.
* Fri Sep 25 2015 Jan Dobes 2.4.2-1
- support translations in spacewalk-abrt
* Wed Sep 23 2015 Jan Dobes 2.4.1-1
- Pulling updated *.po translations from Zanata.
- Bumping package versions for 2.4.
- Bumping package versions for 2.3.
- Bumping package versions for 2.2.
* Thu Oct 31 2013 Tomas Kasparek <tkasparek@redhat.com> 2.1.4-1
- explicitely require abrt-cli
* Mon Sep 30 2013 Michael Mraka <michael.mraka@redhat.com> 2.1.3-1
- Reading only one line
- 1002041 - File content is loaded only when needed
* Tue Sep 17 2013 Michael Mraka <michael.mraka@redhat.com> 2.1.2-1
- Grammar error occurred
* Tue Sep 03 2013 Milan Zazrivec <mzazrivec@redhat.com> 2.1.1-1
- 1002041 - don't upload crash file if over the size limit or the upload is
disabled
- Bumping package versions for 2.1.