diff --git a/1001-remove-mpath-plugin.patch b/1001-remove-mpath-plugin.patch new file mode 100644 index 0000000000000000000000000000000000000000..a005cc169c70e149a2d2643c24e39a0a27159e3f --- /dev/null +++ b/1001-remove-mpath-plugin.patch @@ -0,0 +1,13 @@ +--- blivet-3.4.3/blivet/__init__.py 2022-04-06 15:42:19.789225445 +0800 ++++ blivet-3.4.3-an23/blivet/__init__.py 2022-04-06 15:41:05.131080309 +0800 +@@ -65,7 +65,8 @@ + if arch.is_s390(): + _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) + else: +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) ++ # _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) ++ _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "dm", "nvdimm")) + + _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES) + try: + diff --git a/blivet-3.4.3-tests.tar.gz b/blivet-3.4.3-tests.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4b0eed3dd5fedb71e0ac5c3e5ebdec4408e41695 Binary files /dev/null and b/blivet-3.4.3-tests.tar.gz differ diff --git a/blivet-3.4.3.tar.gz b/blivet-3.4.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2eb10bafb26bcdfe4dde9939d8625c934d6e4ac6 Binary files /dev/null and b/blivet-3.4.3.tar.gz differ diff --git a/python-blivet.spec b/python-blivet.spec new file mode 100644 index 0000000000000000000000000000000000000000..64f6d39fc452f69237c7cf6700c37e7a2b97ed3c --- /dev/null +++ b/python-blivet.spec @@ -0,0 +1,121 @@ +Summary: A python module for system storage configuration +Name: python-blivet +Url: https://storageapis.wordpress.com/projects/blivet +Version: 3.4.3 + +#%%global prerelease .b2 +# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 +Release: 1%{?prerelease}%{?dist} +Epoch: 1 +License: LGPLv2+ +%global realname blivet +%global realversion %{version} +Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz +Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz + +# Add by Anolis-23 +Patch0: 1001-remove-mpath-plugin.patch +# End + +# Versions of required components (done so we make sure the buildrequires +# match the requires versions of things). +%global partedver 3.2 +%global pypartedver 3.10.4 +%global utillinuxver 2.15.1 +%global libblockdevver 2.24 +%global libbytesizever 0.3 +%global pyudevver 0.18 + +BuildArch: noarch + +%description +The python-blivet package is a python module for examining and modifying +storage configuration. + +%package -n %{realname}-data +Summary: Data for the %{realname} python module. + +BuildRequires: make +BuildRequires: systemd + +Conflicts: python-blivet < 1:2.0.0 +Conflicts: python3-blivet < 1:2.0.0 + +%description -n %{realname}-data +The %{realname}-data package provides data files required by the %{realname} +python module. + +%package -n python3-%{realname} +Summary: A python3 package for examining and modifying storage configuration. + +%{?python_provide:%python_provide python3-%{realname}} + +BuildRequires: gettext +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%{?__python3:Requires: %{__python3}} +Requires: python3 +Requires: python3-six +Requires: python3-pyudev >= %{pyudevver} +Requires: parted >= %{partedver} +Requires: python3-pyparted >= %{pypartedver} +Requires: libselinux-python3 +Requires: python3-blockdev >= %{libblockdevver} +Recommends: libblockdev-btrfs >= %{libblockdevver} +Recommends: libblockdev-crypto >= %{libblockdevver} +Recommends: libblockdev-dm >= %{libblockdevver} +Recommends: libblockdev-fs >= %{libblockdevver} +Recommends: libblockdev-kbd >= %{libblockdevver} +Recommends: libblockdev-loop >= %{libblockdevver} +Recommends: libblockdev-lvm >= %{libblockdevver} +Recommends: libblockdev-mdraid >= %{libblockdevver} +Recommends: libblockdev-mpath >= %{libblockdevver} +Recommends: libblockdev-nvdimm >= %{libblockdevver} +Recommends: libblockdev-part >= %{libblockdevver} +Recommends: libblockdev-swap >= %{libblockdevver} +Recommends: libblockdev-s390 >= %{libblockdevver} +Requires: python3-bytesize >= %{libbytesizever} +Requires: util-linux >= %{utillinuxver} +Requires: lsof +Requires: python3-gobject-base +Requires: systemd-udev +Requires: %{realname}-data = %{epoch}:%{version}-%{release} + +Obsoletes: blivet-data < 1:2.0.0 + +Obsoletes: python2-blivet < 1:2.0.2-2 +Obsoletes: python-blivet < 1:2.0.2-2 + +%description -n python3-%{realname} +The python3-%{realname} is a python3 package for examining and modifying storage +configuration. + +%prep +%autosetup -n %{realname}-%{realversion} -N +%autosetup -n %{realname}-%{realversion} -b1 -p1 + +%build +make PYTHON=%{__python3} + +%install +make PYTHON=%{__python3} DESTDIR=%{buildroot} install + +%find_lang %{realname} + +%files -n %{realname}-data -f %{realname}.lang +%{_sysconfdir}/dbus-1/system.d/* +%{_datadir}/dbus-1/system-services/* +%{_libexecdir}/* +%{_unitdir}/* + +%files -n python3-%{realname} +%license COPYING +%doc README.md ChangeLog examples +%{python3_sitelib}/* + +%changelog +* Wed Apr 6 2022 Chang Gao - 3.4.3-1 +- remove mpath plugin +- remove python2 support +