public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-block/targetcli-fb/files/, sys-block/targetcli-fb/
@ 2018-05-14 13:53 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-05-14 13:53 UTC (permalink / raw
  To: gentoo-commits

commit:     97bf3ffb0f4e0ae46d041e4f288e982654f1f8c2
Author:     Diogo Pereira <sir.suriv <AT> gmail <DOT> com>
AuthorDate: Mon May 14 01:21:20 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May 14 13:53:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97bf3ffb

sys-block/targetcli-fb: fix python3 compatibility

Fix a crash under python3 when creating a block-based backstore.

Closes: https://bugs.gentoo.org/654756
Closes: https://github.com/gentoo/gentoo/pull/8393
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/targetcli-fb-2.1.48-python3.patch        | 23 ++++++++++++++
 .../targetcli-fb/targetcli-fb-2.1.48-r2.ebuild     | 36 ++++++++++++++++++++++
 2 files changed, 59 insertions(+)

diff --git a/sys-block/targetcli-fb/files/targetcli-fb-2.1.48-python3.patch b/sys-block/targetcli-fb/files/targetcli-fb-2.1.48-python3.patch
new file mode 100644
index 00000000000..ec771c4a130
--- /dev/null
+++ b/sys-block/targetcli-fb/files/targetcli-fb-2.1.48-python3.patch
@@ -0,0 +1,23 @@
+From ed5ff9b9505e50b545e86dfbdd32077f0ddda0cb Mon Sep 17 00:00:00 2001
+From: Taylor Jakobson <tjakobs@us.ibm.com>
+Date: Thu, 1 Feb 2018 14:44:32 -0600
+Subject: [PATCH] Use signed char instead of char
+
+Python3 does not have the "character" type, use signed char instead.
+---
+ targetcli/ui_backstore.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
+index 3a2db10..5af448f 100644
+--- a/targetcli/ui_backstore.py
++++ b/targetcli/ui_backstore.py
+@@ -536,7 +536,7 @@ def _ui_block_ro_check(self, dev):
+         except (OSError, IOError):
+             raise ExecutionError("Could not open %s" % dev)
+         # ioctl returns an int. Provision a buffer for it
+-        buf = array.array('c', [chr(0)] * 4)
++        buf = array.array('b', [0] * 4)
+         try:
+             fcntl.ioctl(f, BLKROGET, buf)
+         except (OSError, IOError):

diff --git a/sys-block/targetcli-fb/targetcli-fb-2.1.48-r2.ebuild b/sys-block/targetcli-fb/targetcli-fb-2.1.48-r2.ebuild
new file mode 100644
index 00000000000..b5191e41649
--- /dev/null
+++ b/sys-block/targetcli-fb/targetcli-fb-2.1.48-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1 versionator
+
+MY_PV=$(replace_version_separator 2 '.fb' ${PV})
+
+DESCRIPTION="Command shell for managing Linux LIO kernel target"
+HOMEPAGE="https://github.com/open-iscsi/targetcli-fb"
+SRC_URI="https://github.com/open-iscsi/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="dev-python/configshell-fb[${PYTHON_USEDEP}]
+	dev-python/pygobject:3[${PYTHON_USEDEP}]
+	>=dev-python/rtslib-fb-2.1.62[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+	!sys-block/targetcli"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+PATCHES=( "${FILESDIR}/${P}-python3.patch" )
+
+src_install() {
+	distutils-r1_src_install
+
+	keepdir /etc/target /etc/target/backup
+	doman targetcli.8
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-block/targetcli-fb/files/, sys-block/targetcli-fb/
@ 2020-04-21 12:45 Joonas Niilola
  0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2020-04-21 12:45 UTC (permalink / raw
  To: gentoo-commits

commit:     571ccbf089da5694157227b9c4739d9402788723
Author:     Diogo Pereira <sir.suriv <AT> gmail <DOT> com>
AuthorDate: Sun Apr 19 22:53:52 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Apr 21 12:44:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=571ccbf0

sys-block/targetcli-fb: drop 2.1.48-r2

Signed-off-by: Diogo Pereira <sir.suriv <AT> gmail.com>
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-block/targetcli-fb/Manifest                    |  1 -
 .../files/targetcli-fb-2.1.48-python3.patch        | 23 --------------
 .../targetcli-fb/targetcli-fb-2.1.48-r2.ebuild     | 36 ----------------------
 3 files changed, 60 deletions(-)

diff --git a/sys-block/targetcli-fb/Manifest b/sys-block/targetcli-fb/Manifest
index 0920a4dc8a7..0be8eca49fb 100644
--- a/sys-block/targetcli-fb/Manifest
+++ b/sys-block/targetcli-fb/Manifest
@@ -1,2 +1 @@
-DIST targetcli-fb-2.1.48.tar.gz 33777 BLAKE2B f24661777509a1e125cccaa12ca03eff9564e08bc3b5b3b1798b69a07bd7587b0089bcccbfa6c0166db51ec9f55fa663833e412ecab1614be43bcddf0521b1af SHA512 97351b29d8428e797f0cf7a7bab588f20368121d29fd8ed2afe2bf63aaf10aa7761e355e033772f6cbaf7aec2a1540cffae7dccad872a7e5885f200fa07dd420
 DIST targetcli-fb-2.1.49.tar.gz 34147 BLAKE2B 49ed4a610282af30308373cdf806832a3441dcab9a52cddb3f59bacdecb79f7308f316cc65f526d6ea1f9bb875d05e049e6cd7d99eb243f25546395ba6aaa38c SHA512 05fb6f638f808bf09089bdd110592b3ed3be49fc70cc1a71680de7bff40dc88425e69e9a99fdfcab712646cf131f78071edae46f214fdfee4b7090f47933c93a

diff --git a/sys-block/targetcli-fb/files/targetcli-fb-2.1.48-python3.patch b/sys-block/targetcli-fb/files/targetcli-fb-2.1.48-python3.patch
deleted file mode 100644
index ec771c4a130..00000000000
--- a/sys-block/targetcli-fb/files/targetcli-fb-2.1.48-python3.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From ed5ff9b9505e50b545e86dfbdd32077f0ddda0cb Mon Sep 17 00:00:00 2001
-From: Taylor Jakobson <tjakobs@us.ibm.com>
-Date: Thu, 1 Feb 2018 14:44:32 -0600
-Subject: [PATCH] Use signed char instead of char
-
-Python3 does not have the "character" type, use signed char instead.
----
- targetcli/ui_backstore.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
-index 3a2db10..5af448f 100644
---- a/targetcli/ui_backstore.py
-+++ b/targetcli/ui_backstore.py
-@@ -536,7 +536,7 @@ def _ui_block_ro_check(self, dev):
-         except (OSError, IOError):
-             raise ExecutionError("Could not open %s" % dev)
-         # ioctl returns an int. Provision a buffer for it
--        buf = array.array('c', [chr(0)] * 4)
-+        buf = array.array('b', [0] * 4)
-         try:
-             fcntl.ioctl(f, BLKROGET, buf)
-         except (OSError, IOError):

diff --git a/sys-block/targetcli-fb/targetcli-fb-2.1.48-r2.ebuild b/sys-block/targetcli-fb/targetcli-fb-2.1.48-r2.ebuild
deleted file mode 100644
index 9f7e58e9430..00000000000
--- a/sys-block/targetcli-fb/targetcli-fb-2.1.48-r2.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1 versionator
-
-MY_PV=$(replace_version_separator 2 '.fb' ${PV})
-
-DESCRIPTION="Command shell for managing Linux LIO kernel target"
-HOMEPAGE="https://github.com/open-iscsi/targetcli-fb"
-SRC_URI="https://github.com/open-iscsi/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND="dev-python/configshell-fb[${PYTHON_USEDEP}]
-	dev-python/pygobject:3[${PYTHON_USEDEP}]
-	>=dev-python/rtslib-fb-2.1.62[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-	!sys-block/targetcli"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-PATCHES=( "${FILESDIR}/${P}-python3.patch" )
-
-src_install() {
-	distutils-r1_src_install
-
-	keepdir /etc/target /etc/target/backup
-	doman targetcli.8
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-21 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-21 12:45 [gentoo-commits] repo/gentoo:master commit in: sys-block/targetcli-fb/files/, sys-block/targetcli-fb/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2018-05-14 13:53 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox