Blame SPECS/python-blivet3.spec

aada13
%define is_rhel 0%{?rhel} != 0
aada13
aada13
# python3 is not available on RHEL <=7
aada13
%if %{is_rhel} && 0%{?rhel} <= 7
aada13
# disable python3 by default
aada13
%bcond_with python3
aada13
%else
aada13
%bcond_without python3
aada13
%endif
aada13
aada13
# python2 is not available on RHEL > 7 and not needed on Fedora > 28
aada13
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
aada13
# disable python2 by default
aada13
%bcond_with python2
aada13
%else
aada13
%bcond_without python2
aada13
%endif
aada13
aada13
Summary:  A python module for system storage configuration
aada13
Name: python-blivet3
aada13
Url: https://storageapis.wordpress.com/projects/blivet
aada13
Version: 3.1.3
aada13
aada13
#%%global prerelease .b2
aada13
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
aada13
Release: 3%{?prerelease}%{?dist}
aada13
Epoch: 1
aada13
License: LGPLv2+
aada13
Group: System Environment/Libraries
aada13
%global realname blivet3
aada13
%global realversion %{version}%{?prerelease}
aada13
Source0: http://github.com/storaged-project/blivet/archive/blivet-%{realversion}.tar.gz
aada13
Patch0: 0001-Move-blivet-module-package-to-blivet3.patch
aada13
Patch1: 0002-Adjust-rpm-spec-file-to-new-blivet3-name.patch
aada13
Patch2: 0003-Rename-rpm-spec-file-according-to-new-name.patch
aada13
Patch3: 0004-Adjust-Makefile-et-al-to-renamed-package.patch
aada13
Patch4: 0005-Adjust-translation-domain-to-match-new-package-name.patch
aada13
Patch5: 0006-Update-logging-facility-to-match-new-package-name.patch
aada13
Patch6: 0007-Regenerate-translations.patch
aada13
Patch7: 0008-Remove-Obsoletes-for-compat-package.patch
aada13
Patch8: 0009-Dont-require-python3-for-the-dbus-service.patch
aada13
Patch9: 0010-Handle-older-pyudev-w-o-Device.properties.patch
aada13
Patch10: 0011-Adapt-to-older-pyudev-API-for-instantiating-Device.patch
aada13
Patch11: 0012-Adapt-device-tags-to-absence-of-enum-in-python2.patch
aada13
Patch12: 0013-Update-factory-example-to-work-w-latest-API.patch
aada13
Patch13: 0014-Fix-bare-blivet-imports-in-the-examples.patch
aada13
aada13
aada13
# Versions of required components (done so we make sure the buildrequires
aada13
# match the requires versions of things).
aada13
%global partedver 1.8.1
aada13
%global pypartedver 3.9
aada13
%global utillinuxver 2.15.1
aada13
%global libblockdevver 2.17
aada13
%global libbytesizever 0.3
aada13
%global pyudevver 0.15
aada13
aada13
BuildArch: noarch
aada13
aada13
%description
aada13
The python-blivet package is a python module for examining and modifying
aada13
storage configuration.
aada13
aada13
%package -n %{realname}-data
aada13
Summary: Data for the %{realname} python module.
aada13
aada13
BuildRequires: systemd
aada13
aada13
%description -n %{realname}-data
aada13
The %{realname}-data package provides data files required by the %{realname}
aada13
python module.
aada13
aada13
%if %{with python3}
aada13
%package -n python3-%{realname}
aada13
Summary: A python3 package for examining and modifying storage configuration.
aada13
aada13
%{?python_provide:%python_provide python3-%{realname}}
aada13
aada13
BuildRequires: gettext
aada13
BuildRequires: python3-devel
aada13
BuildRequires: python3-setuptools
aada13
aada13
Requires: python3
aada13
Requires: python3-six
aada13
Requires: python3-pyudev >= %{pyudevver}
aada13
Requires: parted >= %{partedver}
aada13
Requires: python3-pyparted >= %{pypartedver}
aada13
Requires: libselinux-python3
aada13
Requires: python3-blockdev >= %{libblockdevver}
aada13
%if 0%{?rhel} > 7 || 0%{?fedora}
aada13
Recommends: libblockdev-btrfs >= %{libblockdevver}
aada13
Recommends: libblockdev-crypto >= %{libblockdevver}
aada13
Recommends: libblockdev-dm >= %{libblockdevver}
aada13
Recommends: libblockdev-kbd >= %{libblockdevver}
aada13
Recommends: libblockdev-loop >= %{libblockdevver}
aada13
Recommends: libblockdev-lvm >= %{libblockdevver}
aada13
Recommends: libblockdev-mdraid >= %{libblockdevver}
aada13
Recommends: libblockdev-mpath >= %{libblockdevver}
aada13
Recommends: libblockdev-nvdimm >= %{libblockdevver}
aada13
Recommends: libblockdev-swap >= %{libblockdevver}
aada13
Recommends: libblockdev-s390 >= %{libblockdevver}
aada13
%endif
aada13
Requires: python3-bytesize >= %{libbytesizever}
aada13
Requires: util-linux >= %{utillinuxver}
aada13
Requires: lsof
aada13
Requires: python3-gobject-base
aada13
Requires: systemd-udev
aada13
Requires: %{realname}-data = %{epoch}:%{version}-%{release}
aada13
aada13
%description -n python3-%{realname}
aada13
The python3-%{realname} is a python3 package for examining and modifying storage
aada13
configuration.
aada13
%endif
aada13
aada13
%if %{with python2}
aada13
%package -n python2-%{realname}
aada13
Summary: A python2 package for examining and modifying storage configuration.
aada13
aada13
%{?python_provide:%python_provide python2-%{realname}}
aada13
aada13
BuildRequires: gettext
aada13
BuildRequires: python2-devel
aada13
BuildRequires: python2-setuptools
aada13
aada13
Requires: python2
aada13
Requires: python-six
aada13
Requires: python-pyudev >= %{pyudevver}
aada13
Requires: parted >= %{partedver}
aada13
# XXX pyparted can mean both python2 and python3
aada13
Requires: pyparted >= %{pypartedver}
aada13
Requires: libselinux-python
aada13
Requires: python2-blockdev >= %{libblockdevver}
aada13
%if 0%{?rhel} > 7 || 0%{?fedora}
aada13
Recommends: libblockdev-btrfs >= %{libblockdevver}
aada13
Recommends: libblockdev-crypto >= %{libblockdevver}
aada13
Recommends: libblockdev-dm >= %{libblockdevver}
aada13
Recommends: libblockdev-fs >= %{libblockdevver}
aada13
Recommends: libblockdev-kbd >= %{libblockdevver}
aada13
Recommends: libblockdev-loop >= %{libblockdevver}
aada13
Recommends: libblockdev-lvm >= %{libblockdevver}
aada13
Recommends: libblockdev-mdraid >= %{libblockdevver}
aada13
Recommends: libblockdev-mpath >= %{libblockdevver}
aada13
Recommends: libblockdev-nvdimm >= %{libblockdevver}
aada13
Recommends: libblockdev-part >= %{libblockdevver}
aada13
Recommends: libblockdev-swap >= %{libblockdevver}
aada13
Recommends: libblockdev-s390 >= %{libblockdevver}
aada13
%endif
aada13
Requires: python2-bytesize >= %{libbytesizever}
aada13
Requires: util-linux >= %{utillinuxver}
aada13
Requires: lsof
aada13
Requires: python2-hawkey
aada13
Requires: %{realname}-data = %{epoch}:%{version}-%{release}
aada13
aada13
Requires: udev
aada13
Requires: python-gobject-base
aada13
aada13
%description -n python2-%{realname}
aada13
The python2-%{realname} is a python2 package for examining and modifying storage
aada13
configuration.
aada13
%endif
aada13
aada13
%prep
aada13
%autosetup -n blivet-%{realversion} -p1
aada13
aada13
%build
aada13
%{?with_python2:make PYTHON=%{__python2}}
aada13
%{?with_python3:make PYTHON=%{__python3}}
aada13
aada13
%install
aada13
%{?with_python2:make PYTHON=%{__python2} DESTDIR=%{buildroot} install}
aada13
%{?with_python3:make PYTHON=%{__python3} DESTDIR=%{buildroot} install}
aada13
aada13
%find_lang %{realname}
aada13
aada13
%files -n %{realname}-data -f %{realname}.lang
aada13
%{_sysconfdir}/dbus-1/system.d/*
aada13
%{_datadir}/dbus-1/system-services/*
aada13
%{_libexecdir}/*
aada13
%{_unitdir}/*
aada13
aada13
%if %{with python2}
aada13
%files -n python2-%{realname}
aada13
%license COPYING
aada13
%doc README ChangeLog examples
aada13
%{python2_sitelib}/*
aada13
%endif
aada13
aada13
%if %{with python3}
aada13
%files -n python3-%{realname}
aada13
%license COPYING
aada13
%doc README ChangeLog examples
aada13
%{python3_sitelib}/*
aada13
%endif
aada13
aada13
%changelog
aada13
* Fri Mar 29 2019 David Lehman <dlehman@redhat.com> - 3.1.3-3
aada13
- spec file requires fixes from pcahyna
aada13
- adjust to older pyudev API
aada13
- adjust tags implementation to absence of enum in python-2.7
aada13
- fix bare imports in example scripts
aada13
- update factory example to match latest API
aada13
aada13
* Mon Mar 25 2019 Pavel Cahyna <pcahyna@redhat.com> - 3.1.3-2
aada13
- Initial import of python-blivet3 by David Lehman <dlehman@redhat.com>
aada13
  derived from python-blivet-3.1.2-1
aada13
- clear the old python-blivet %%changelog except the most recent entry.
aada13
aada13
* Wed Feb 27 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.3-1
aada13
- Don't crash if blockdev mpath plugin isn't available. (#1672971) (dlehman)
aada13
- iscsi: Add default value to unused 'storage' argument in 'write' (vtrefny)
aada13
- Add exported property to LVMVolumeGroupDevice (vtrefny)
aada13
- Add VG data to static_data (vtrefny)
aada13
- Do not try to get format free space for non-existing formats (vtrefny)
aada13
- Do not raise exception if can't get PV free space (vtrefny)
aada13
- Fix undefined attribute in LVM info cache (vtrefny)
aada13
- Use raw_device to get thinpool device in LVMThinPFactory (#1490174) (vtrefny)
aada13
- Do not crash if DM RAID activation fails (#1661712) (vtrefny)
aada13
- Remove the unused sysroot property (vponcova)
aada13
- Remove unused attributes from the Blivet class (vponcova)
aada13
- Remove the unused gpt flag (vponcova)
aada13
- Copy the iSCSI initiator name file to the installed system (vtrefny)
aada13
- Use udev to determine if disk is a multipath member. (dlehman)
aada13
- Require libfc instead of fcoe for offloaded FCoE. (#1575953) (dlehman)