forked from pool/python-evtx
Accepting request 929626 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/929626 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-evtx?expand=0&rev=11
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 5 12:35:19 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Use libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 4 08:29:55 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define commands dump dump_chunk_slack eid_record_numbers extract_record filter_records info record_structure structure templates
|
||||
%bcond_without python2
|
||||
@@ -35,14 +41,19 @@ BuildRequires: python2-xml
|
||||
%endif
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python-rpm-macros >= 20210929
|
||||
Requires: python-hexdump
|
||||
Requires: python-lxml
|
||||
%ifpython2
|
||||
Requires: python-xml
|
||||
%endif
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -74,6 +85,12 @@ done
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%pre
|
||||
# If libalternatives is used: Removing old update-alternatives entries.
|
||||
%{lua:for c in rpm.expand("%{commands}"):gmatch("%S+") do
|
||||
print(rpm.expand("%python_libalternatives_reset_alternative evtx_" .. c .. ".py"))
|
||||
end}
|
||||
|
||||
%post
|
||||
%{lua:for c in rpm.expand("%{commands}"):gmatch("%S+") do
|
||||
print(rpm.expand("%python_install_alternative evtx_" .. c .. ".py"))
|
||||
|
||||
Reference in New Issue
Block a user