commit targetcli for openSUSE:Factory
Hello community, here is the log from the commit of package targetcli for openSUSE:Factory checked in at 2016-07-12 23:52:07 Comparing /work/SRC/openSUSE:Factory/targetcli (Old) and /work/SRC/openSUSE:Factory/.targetcli.new (New) Package is "targetcli" Changes: --- /work/SRC/openSUSE:Factory/targetcli/targetcli.changes 2015-12-21 12:04:22.0 +0100 +++ /work/SRC/openSUSE:Factory/.targetcli.new/targetcli.changes 2016-07-12 23:52:10.0 +0200 @@ -1,0 +2,18 @@ +Thu Jul 7 15:40:10 UTC 2016 - meiss...@suse.com + +- replace %oname usage by regular %name + +--- +Wed May 11 06:50:03 UTC 2016 - ls...@suse.com + +- Update to 3.0 pre4 version +- Remove targetcli-git-update.patch, because this package is + already updated to 3.0 pre4, no need for this patch anymore. +- Remove targetcli-fix-exit.patch, version 3.0 pre4 doesn't need + this patch, no such a bug in version 3.0 pre4. +- Rework on patch targetcli-fix-git-version-for-suse.patch, change + version to 3.0pre4-suse +- Rework on patch targetcli-refactor-fileio-backstore-creation.patch + to adapt version 3.0 pre4 API changes. + +--- Old: 2.1.tar.gz targetcli-fix-exit.patch targetcli-git-update.patch New: targetcli-3.0pre4.tar.gz Other differences: -- ++ targetcli.spec ++ --- /var/tmp/diff_new_pack.CQncUo/_old 2016-07-12 23:52:11.0 +0200 +++ /var/tmp/diff_new_pack.CQncUo/_new 2016-07-12 23:52:11.0 +0200 @@ -1,7 +1,7 @@ # # spec file for package targetcli # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,35 +20,25 @@ Summary:Generic SCSI target CLI shell License:Apache-2.0 Group: Applications/System -Version:2.1 -Release:0 -%define oname targetcli +Version:3.0pre4 +Release:1%{?dist} Url:http://www.github.com/Datera/targetcli -Source: https://github.com/Datera/%{oname}/archive/%{version}.tar.gz -Source1:%{oname}-systemd.service +Source: targetcli-3.0pre4.tar.gz +Source1:%{name}-systemd.service Source2:load_targetcli_config -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch2: %{name}-fix-git-version-for-suse.patch +Patch3: %{name}-update-man-page-examples.patch +Patch5: %{name}-refactor-fileio-backstore-creation.patch Requires: lio-utils -Requires: python -Requires: python-configobj Requires: python-configshell Requires: python-prettytable Requires: python-rtslib > 2.2-2 -BuildRequires: epydoc -BuildRequires: python-configobj BuildRequires: python-configshell BuildRequires: python-devel BuildRequires: python-prettytable -BuildRequires: python-rtslib > 2.2-2 -%if 0%{?suse_version} >= 1230 -BuildRequires: systemd -%endif -%{?systemd_requires} -Patch1: %{oname}-git-update.patch -Patch2: %{oname}-fix-git-version-for-suse.patch -Patch3: %{oname}-update-man-page-examples.patch -Patch4: %{oname}-fix-exit.patch -Patch5: %{oname}-refactor-fileio-backstore-creation.patch +BuildRequires: python-rtslib +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch %description targetcli is an administration tool for managing storage targets @@ -56,30 +46,29 @@ The targetcli CLI is built on top of the python configshell CLI framework. %prep -%setup -q -n %{oname}-%{version} -%patch1 -p1 +%setup -q %patch2 -p1 %patch3 -p1 -%patch4-p1 %patch5-p1 %build -%{__python} setup.py build +%__python setup.py build %install -%{__python} setup.py install --skip-build --root=%{buildroot} --prefix=%{_prefix} -mkdir -p %{buildroot}%{_mandir}/man8 -mv doc/targetcli.8 %{buildroot}%{_mandir}/man8/targetcli.8 -gzip -9 %{buildroot}%{_mandir}/man8/targetcli.8 +python setup.py install --skip-build --root=%{buildroot} --prefix=usr +%__install -vd %{buildroot}%{_sysconfdir}/target +%__install -vd %{buildroot}%{_localstatedir}/target/pr +%__install -vd %{buildroot}%{_localstatedir}/target/alua +%__install -vd %{buildroot}/%{_mandir}/man8 +mkdir -p -m 0755 %{buildroot}%{_prefix}/sbin # install systemd service file -install -D -m 0644 %{S:1} %{buildroot}%{_unitdir}/targetcli.service +%__install -D -m 0644 %{S:1} %{buildroot}%{_unitdir}/targetcli.service +%__install doc/targetcli.8 %{buildroot}/%{_mandir}/man8 # create target config directory
commit targetcli for openSUSE:Factory
Hello community, here is the log from the commit of package targetcli for openSUSE:Factory checked in at 2015-12-21 12:04:21 Comparing /work/SRC/openSUSE:Factory/targetcli (Old) and /work/SRC/openSUSE:Factory/.targetcli.new (New) Package is "targetcli" Changes: --- /work/SRC/openSUSE:Factory/targetcli/targetcli.changes 2015-12-01 09:18:41.0 +0100 +++ /work/SRC/openSUSE:Factory/.targetcli.new/targetcli.changes 2015-12-21 12:04:22.0 +0100 @@ -1,0 +2,8 @@ +Mon Dec 14 03:35:27 UTC 2015 - ls...@suse.com + +- fix BNC#920538,refactor fileio backstore creation, fix bugs like + silient failure when file size not spicfied. + Patch:targetcli-refactor-fileio-backstore-creation.patch + refactored by Lee Duncan + +--- New: targetcli-refactor-fileio-backstore-creation.patch Other differences: -- ++ targetcli.spec ++ --- /var/tmp/diff_new_pack.832qUq/_old 2015-12-21 12:04:23.0 +0100 +++ /var/tmp/diff_new_pack.832qUq/_new 2015-12-21 12:04:23.0 +0100 @@ -48,6 +48,7 @@ Patch2: %{oname}-fix-git-version-for-suse.patch Patch3: %{oname}-update-man-page-examples.patch Patch4: %{oname}-fix-exit.patch +Patch5: %{oname}-refactor-fileio-backstore-creation.patch %description targetcli is an administration tool for managing storage targets @@ -60,6 +61,7 @@ %patch2 -p1 %patch3 -p1 %patch4-p1 +%patch5-p1 %build %{__python} setup.py build ++ targetcli-refactor-fileio-backstore-creation.patch ++ From: Lee DuncanDate: Sat Dec 12 14:11:48 PST 2015 Subject: [PATCH] targetcli: refactor fileio backstore creation Reference: bsc#920538 Allow creating fileio backstore with size supplied or not. The logic here was a bit convoluted, so I refactored it to be more readable and fixed a couple of corner cases in the process, such as creating a file-based fileio backend with no size supplied, in which case it should use the existing file's size. Signed-off-by: Lee Duncan ui_backstore.py | 64 1 file changed, 32 insertions(+), 32 deletions(-) --- --- targetcli-2.1.orig/targetcli/ui_backstore.py2015-12-11 09:10:51.974495725 -0800 +++ targetcli-2.1/targetcli/ui_backstore.py 2015-12-12 14:07:56.742991151 -0800 @@ -318,31 +318,46 @@ class UIFileIOBackstore(UIBackstore): is_dev = get_block_type(file_or_dev) is not None \ or is_disk_partition(file_or_dev) +is_file = os.path.isfile(file_or_dev) +no_exist = not os.path.exists(file_or_dev) -if size is None and is_dev: +if is_dev: +# fileio backend to a block device +if size is not None: +raise ExecutionError("Cannot supply size for a block device") backstore = FileIOBackstore(self.next_hba_index(), mode='create') try: -so = FileIOStorageObject( -backstore, name, file_or_dev, -gen_wwn=self.prm_gen_wwn(generate_wwn), -buffered_mode=self.prm_buffered(buffered)) +so = FileIOStorageObject(backstore, name, file_or_dev, +gen_wwn=self.prm_gen_wwn(generate_wwn), +buffered_mode=self.prm_buffered(buffered)) except Exception, exception: backstore.delete() raise exception -self.shell.log.info("Created fileio %s with size %s." -% (name, size)) -self.shell.log.info("Note: block backstore preferred for " -" best results.") +self.shell.log.info("Created fileio for block device %s." % file_or_dev) +self.shell.log.info("Note: iblock backstore preferred for best results.") ui_so = UIStorageObject(so, self) return self.new_node(ui_so) -elif size is not None and not is_dev: +elif is_file or no_exist: +# fileio backend to a file +if no_exist and size is None: +raise ExecutionError("Attempting to create file for new fileio backstore, need a size") +if size is not None: +num_size = convert_human_to_bytes(size) +if no_exist: +# we know "size" has been specified +self._create_file(file_or_dev, num_size, sparse) +else: +actual_size = os.path.getsize(file_or_dev) +if size is not None and actual_size != num_size: +self.shell.log.info("%s exists,
commit targetcli for openSUSE:Factory
Hello community, here is the log from the commit of package targetcli for openSUSE:Factory checked in at 2015-12-01 09:18:38 Comparing /work/SRC/openSUSE:Factory/targetcli (Old) and /work/SRC/openSUSE:Factory/.targetcli.new (New) Package is "targetcli" Changes: --- /work/SRC/openSUSE:Factory/targetcli/targetcli.changes 2014-12-03 22:50:43.0 +0100 +++ /work/SRC/openSUSE:Factory/.targetcli.new/targetcli.changes 2015-12-01 09:18:41.0 +0100 @@ -1,0 +2,7 @@ +Tue Nov 24 08:29:19 UTC 2015 - ls...@suse.com + +- fix BNC#948529 - targetcli - TAB-ing 'exit' confirmation aborts + it + patch:targetcli-fix-exit.patch + +--- New: targetcli-fix-exit.patch Other differences: -- ++ targetcli.spec ++ --- /var/tmp/diff_new_pack.SV51pg/_old 2015-12-01 09:18:42.0 +0100 +++ /var/tmp/diff_new_pack.SV51pg/_new 2015-12-01 09:18:42.0 +0100 @@ -1,7 +1,7 @@ # # spec file for package targetcli # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -47,6 +47,7 @@ Patch1: %{oname}-git-update.patch Patch2: %{oname}-fix-git-version-for-suse.patch Patch3: %{oname}-update-man-page-examples.patch +Patch4: %{oname}-fix-exit.patch %description targetcli is an administration tool for managing storage targets @@ -58,6 +59,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4-p1 %build %{__python} setup.py build ++ targetcli-fix-exit.patch ++ Index: targetcli-2.1/targetcli/ui_node.py === --- targetcli-2.1.orig/targetcli/ui_node.py +++ targetcli-2.1/targetcli/ui_node.py @@ -128,7 +128,7 @@ class UINode(ConfigNode): except EOFError: input = None self.shell.con.display('') -if input == "exit": +if input.strip() == "exit": return 'EXIT' else: self.shell.log.warning("Aborted exit, use 'saveconfig' to "