Blame swid-tools.spec

8ecaacc
27375d1
%global upstream_name rpm2swidtag
27375d1
8ecaacc
Summary: Tools for producing SWID tags for rpm packages and inspecting the SWID tags
27375d1
Name: swid-tools
09d436d
Version: 0.8.7
128e4fa
Release: 1%{?dist}
8ecaacc
License: ASL 2.0
8ecaacc
URL: https://github.com/swidtags/rpm2swidtag
27375d1
Source0: https://github.com/swidtags/%{upstream_name}/releases/download/%{upstream_name}-%{version}/%{upstream_name}-%{version}.tar.gz
8ecaacc
BuildArch: noarch
8ecaacc
BuildRequires: python3-devel
8ecaacc
# The following BuildRequires are only needed for check
8ecaacc
BuildRequires: python3
8ecaacc
BuildRequires: python3-rpm
8ecaacc
BuildRequires: python3-lxml
8ecaacc
BuildRequires: openssl
8ecaacc
BuildRequires: xmlsec1-openssl
8ecaacc
BuildRequires: createrepo_c
8ecaacc
BuildRequires: fakechroot
8ecaacc
BuildRequires: fakeroot
8ecaacc
BuildRequires: dnf
8ecaacc
BuildRequires: python3-dnf-plugins-core
8ecaacc
BuildRequires: gzip
8ecaacc
BuildRequires: gnupg2
8ecaacc
8ecaacc
Requires: python3-rpm
8ecaacc
Requires: python3-lxml
8ecaacc
Requires: xmlsec1-openssl
8ecaacc
a8c39ec
Provides: rpm2swidtag = %{version}-%{release}
a8c39ec
Obsoletes: rpm2swidtag < 0.7.2
a8c39ec
8ecaacc
%description
8ecaacc
Utility for producing SWID tags for rpm packages and utility for listing
8ecaacc
and inspecting SWID tags, including supplemental tag resolution.
8ecaacc
8ecaacc
%package -n dnf-plugin-swidtags
8ecaacc
Summary: DNF plugin for keeping SWID tags up-to-date
f713b5b
Requires: python3-dnf-plugins-core
27375d1
Requires: swid-tools = %{version}-%{release}
8ecaacc
Recommends: dnf
8ecaacc
8ecaacc
%description -n dnf-plugin-swidtags
8ecaacc
DNF plugin for retrieving SWID tags from repository metadata
8ecaacc
or producing them locally.
8ecaacc
8ecaacc
%prep
27375d1
%setup -q -n %{upstream_name}-%{version}
8ecaacc
8ecaacc
%build
8ecaacc
%py3_build
8ecaacc
8ecaacc
%install
8ecaacc
%py3_install
8ecaacc
8ecaacc
%check
8ecaacc
./test.sh
8ecaacc
8ecaacc
%files
8ecaacc
%doc README.md
191e519
%license LICENSE
27375d1
%dir %{_sysconfdir}/rpm2swidtag
27375d1
%config(noreplace) %{_sysconfdir}/rpm2swidtag/rpm2swidtag.conf
27375d1
%dir %{_sysconfdir}/rpm2swidtag/rpm2swidtag.conf.d
27375d1
%config(noreplace) %{_sysconfdir}/rpm2swidtag/rpm2swidtag.conf.d/*
27375d1
%config(noreplace) %{_sysconfdir}/rpm2swidtag/*.xml
27375d1
%config(noreplace) %{_sysconfdir}/rpm2swidtag/*.xslt
27375d1
%dir %{_sysconfdir}/swid
8ecaacc
%config(noreplace) %{_sysconfdir}/swid/swidq.conf
8ecaacc
%dir %{_datarootdir}/swidq
8ecaacc
%{_datarootdir}/swidq/stylesheets
27375d1
%{python3_sitelib}/rpm2swidtag/
27375d1
%{python3_sitelib}/%{upstream_name}-*.egg-info/
8ecaacc
%{python3_sitelib}/swidq/
8ecaacc
%{_bindir}/rpm2swidtag
8ecaacc
%{_bindir}/swidq
8ecaacc
8ecaacc
%files -n dnf-plugin-swidtags
8ecaacc
%config(noreplace) %{_sysconfdir}/dnf/plugins/swidtags.conf
8ecaacc
%{python3_sitelib}/dnf-plugins/swidtags.py
8ecaacc
%{python3_sitelib}/dnf-plugins/__pycache__/*
b2e5854
%{_bindir}/dnf-plugin-swidtags-update-from-0.7
b2e5854
b2e5854
%post -n dnf-plugin-swidtags
b2e5854
b2e5854
if rpm -q rpm2swidtag dnf-plugin-swidtags 2> /dev/null | grep -E -q '(rpm2swidtag|dnf-plugin-swidtags)-0\.[1-7]\.[0-9]-' ; then
b2e5854
	echo
b2e5854
	echo "Please run dnf-plugin-swidtags-update-from-0.7 to update the filename format."
b2e5854
2de6535
	if echo "88d7506a4769d9402548cd9f0d242913cd46616f4fa755c52013094af33f5c1b /etc/dnf/plugins/swidtags.conf" | sha256sum -c > /dev/null 2>&1 ; then
2de6535
		sed -i 's/^# rpm2swidtag_command = /rpm2swidtag_command = /' /etc/dnf/plugins/swidtags.conf
2de6535
		echo
2de6535
		echo "The rpm2swidtag_command in /etc/dnf/plugins/swidtags.conf enabled"
2de6535
		echo "to keep the pre-0.8 behaviour."
2de6535
	fi
b2e5854
fi
8ecaacc
8ecaacc
%changelog
09d436d
* Thu Sep 19 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.7-1
09d436d
- Rebased to 0.8.7.
09d436d
ceda74d
* Mon Aug 26 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.6-1
128e4fa
- 1743902 - align with code changes in dnf-4.2.8.
ceda74d
- Rebased to 0.8.6.
128e4fa
0181700
* Mon Aug 19 2019 Miro HronĨok <mhroncok@redhat.com> - 0.8.4-4
0181700
- Rebuilt for Python 3.8
0181700
b0a20a8
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-3
b0a20a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b0a20a8
eae7eeb
* Mon May 27 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.4-2
eae7eeb
- Rebuild to test Fedora CI.
eae7eeb
3324fd4
* Mon May 20 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.4-1
3324fd4
- Rebased to 0.8.4.
3324fd4
b641c94
* Wed May 15 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.3-1
b641c94
- Rebased to 0.8.3.
b641c94
e643a3a
* Mon May 06 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.2-1
e643a3a
- Rebased to 0.8.2.
e643a3a
2de6535
* Tue Apr 23 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.1-1
2de6535
- Rebased to 0.8.1.
2de6535
b2e5854
* Tue Apr 16 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.8.0-1
b2e5854
- Rebased to 0.8.0.
b2e5854
0a7ee68
* Tue Mar 26 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.7.4-1
0a7ee68
- Rebased to 0.7.4.
0a7ee68
- Added GPG key configuration for Fedora 30.
0a7ee68
- Added handling of non-alphanum characters in regid and tagId.
0a7ee68
cea94ea
* Fri Mar 15 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.7.3-1
cea94ea
- Rebased to 0.7.3.
cea94ea
- 1689169 - The libdnf 0.28 in Fedora 30 updates-testing changed the
cea94ea
  ConfigParser interfaces.
cea94ea
- 1684536 - Do not print error when running purge on purged setup.
cea94ea
a8c39ec
* Fri Mar 01 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.7.2-1
27375d1
- Rename package to swid-tools.
2d4b019
- Make templates config(noreplace) as well.
f713b5b
- 1683630 - python3-dnf-plugins-core is only needed by the dnf-plugin-swidtags
f713b5b
  subpackage.
f713b5b
191e519
* Mon Feb 18 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.7.1-1
8ecaacc
- Initial Fedora rawhide release.
191e519
191e519
* Mon Feb 18 2019 Jan Pazdziora <jpazdziora@redhat.com> - 0.6.5-1
191e519
- Initial import.