diff --git a/0001-force-lvm-plugin.patch b/0001-force-lvm-plugin.patch new file mode 100644 index 0000000000000000000000000000000000000000..2f9d9a09d8f9111933cfe130635f3090491f529b --- /dev/null +++ b/0001-force-lvm-plugin.patch @@ -0,0 +1,32 @@ +From 2f90040ff66eacc9715e370cd49ffb72d8d1f36f Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 11 Jul 2018 15:36:24 +0200 +Subject: [PATCH] Force command line based libblockdev LVM plugin + +--- + blivet/__init__.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/blivet/__init__.py b/blivet/__init__.py +index c5a75bb8..cb759173 100644 +--- a/blivet/__init__.py ++++ b/blivet/__init__.py +@@ -63,11 +63,16 @@ def log_bd_message(level, msg): + from gi.repository import GLib + from gi.repository import BlockDev as blockdev + if arch.is_s390(): +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) ++ _REQUESTED_PLUGIN_NAMES = set(("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(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) + + _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES) ++# XXX force non-dbus LVM plugin ++lvm_plugin = blockdev.PluginSpec() ++lvm_plugin.name = blockdev.Plugin.LVM ++lvm_plugin.so_name = "libbd_lvm.so.2" ++_requested_plugins.append(lvm_plugin) + try: + # do not check for dependencies during libblockdev initializtion, do runtime + # checks instead diff --git a/0002-Fix-options-for-ISCSI-functions-1632656.patch b/0002-Fix-options-for-ISCSI-functions-1632656.patch new file mode 100644 index 0000000000000000000000000000000000000000..b482f6bc123bc83dd668a14e515b7a90fb11c12d --- /dev/null +++ b/0002-Fix-options-for-ISCSI-functions-1632656.patch @@ -0,0 +1,42 @@ +From 48d19a9835ebb6743ec03e4c9182c8cc74db4cf8 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 3 Oct 2018 14:11:08 +0200 +Subject: [PATCH] Fix options for ISCSI functions (#1632656) + +Correct mutual authentication options in UDisks are +"reverse-username" and "reverse-password". +--- + blivet/iscsi.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/blivet/iscsi.py b/blivet/iscsi.py +index b979e01c..ca51f8ed 100644 +--- a/blivet/iscsi.py ++++ b/blivet/iscsi.py +@@ -385,9 +385,9 @@ class iSCSI(object): + if password: + auth_info["password"] = GLib.Variant("s", password) + if r_username: +- auth_info["r_username"] = GLib.Variant("s", r_username) ++ auth_info["reverse-username"] = GLib.Variant("s", r_username) + if r_password: +- auth_info["r_password"] = GLib.Variant("s", r_password) ++ auth_info["reverse-password"] = GLib.Variant("s", r_password) + + args = GLib.Variant("(sqa{sv})", (ipaddr, int(port), auth_info)) + nodes, _n_nodes = self._call_initiator_method("DiscoverSendTargets", args) +@@ -423,9 +423,9 @@ class iSCSI(object): + if password: + auth_info["password"] = GLib.Variant("s", password) + if r_username: +- auth_info["r_username"] = GLib.Variant("s", r_username) ++ auth_info["reverse-username"] = GLib.Variant("s", r_username) + if r_password: +- auth_info["r_password"] = GLib.Variant("s", r_password) ++ auth_info["reverse-password"] = GLib.Variant("s", r_password) + + try: + self._login(node, auth_info) +-- +2.17.1 + diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..a7ac33e515766a2f2aa7f1cf4f8699ebc439c1a3 --- /dev/null +++ b/README.en.md @@ -0,0 +1,36 @@ +# python-blivet + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..afb7c0bd065c98a59cfae25a2cfd70e87a3b2d76 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# python-blivet + +#### 介绍 +{**以下是码云平台说明,您可以替换此简介** +码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 码云特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 +5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/blivet-3.1.1.tar.gz b/blivet-3.1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ed3602fb22c49d7f291e86292f5e5b522d08c4e1 Binary files /dev/null and b/blivet-3.1.1.tar.gz differ diff --git a/blivet-3.1.6-tests.tar.gz b/blivet-3.1.6-tests.tar.gz deleted file mode 100644 index 5dc3d3fcda89459f9ab7bb0d44f3bac509fe584c..0000000000000000000000000000000000000000 Binary files a/blivet-3.1.6-tests.tar.gz and /dev/null differ diff --git a/blivet-3.1.6.tar.gz b/blivet-3.1.6.tar.gz deleted file mode 100644 index fe5232b05d50a70b1f7130d41fad737f83f91cc7..0000000000000000000000000000000000000000 Binary files a/blivet-3.1.6.tar.gz and /dev/null differ diff --git a/fix-the-long-hostname.patch b/fix-the-long-hostname.patch new file mode 100644 index 0000000000000000000000000000000000000000..d8d23c1e510f7bfe71abe99083e6cabdc172b4ab --- /dev/null +++ b/fix-the-long-hostname.patch @@ -0,0 +1,12 @@ +diff -Nur blivet-3.1.1/blivet/devicelibs/lvm.py blivet-3.1.1-old/blivet/devicelibs/lvm.py +--- blivet-3.1.1/blivet/devicelibs/lvm.py 2019-01-26 04:29:13.358210238 -0500 ++++ blivet-3.1.1-old/blivet/devicelibs/lvm.py 2019-01-26 04:29:54.489210238 -0500 +@@ -201,7 +201,7 @@ + # minus the number of hyphens, and possibly minus up to another 8 characters + # in some unspecified set of situations. Instead of figuring all of that out, + # no one gets a vg or lv name longer than, let's say, 55. +- if len(name) > 55: ++ if len(name) > 71: + return False + + return True diff --git a/python-blivet.spec b/python-blivet.spec index ce52c4c475816a1784161a4ff364b4c4c1100e7d..364b18e0befffba87d4277c52806a1a345511448 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -1,19 +1,24 @@ -Name: python-blivet -Version: 3.1.6 -Release: 1 +Name: python-blivet +Version: 3.1.1 +Release: 4 Epoch: 1 -Summary: A python module for system storage configuration -License: LGPLv2+ -URL: https://storageapis.wordpress.com/projects/blivet -Source0: http://github.com/storaged-project/blivet/archive/blivet-%{version}.tar.gz -Source1: http://github.com/storaged-project/blivet/archive/blivet-%{version}-tests.tar.gz +Summary: A python module for system storage configuration +License: LGPLv2+ +URL: https://storageapis.wordpress.com/projects/blivet +Source0: http://github.com/storaged-project/blivet/archive/blivet-%{version}.tar.gz BuildArch: noarch -BuildRequires: systemd gettext python3-devel python3-setuptools -%if %{with python2} +BuildRequires: systemd gettext python3-devel python3-setuptools + +%if %{with_python2} BuildRequires: python2-devel python2-setuptools %endif +Patch0: 0001-force-lvm-plugin.patch +Patch1: 0002-Fix-options-for-ISCSI-functions-1632656.patch + +Patch9000: fix-the-long-hostname.patch + %description The python-blivet package is a python module for examining and modifying storage configuration. @@ -69,8 +74,7 @@ python2 package for blivet %package_help %prep -%autosetup -n blivet-%{version} -N -%autosetup -n blivet-%{version} -b1 -p1 +%autosetup -n blivet-blivet-%{version} -p1 %build %{?with_python2:make PYTHON=%{__python2}} @@ -80,9 +84,7 @@ python2 package for blivet %{?with_python2:make PYTHON=%{__python2} DESTDIR=%{buildroot} install} %{?with_python3:make PYTHON=%{__python3} DESTDIR=%{buildroot} install} -%find_lang blivet - -%files -n blivet-data -f blivet.lang +%files -n blivet-data %defattr(-,root,root) %{_sysconfdir}/dbus-1/system.d/* %{_libexecdir}/* @@ -105,12 +107,9 @@ python2 package for blivet %files help %defattr(-,root,root) -%doc README ChangeLog +%doc README %changelog -* Fri Jan 10 2020 openEuler Buildteam - 3.1.6-1 -- update to 3.1.6 - * Sun Dec 29 2019 openEuler Buildteam - 3.1.1-4 - Type:bugfix - ID:NA