Package Details: python-rtslib-fb 2.1.76-1

Git Clone URL: https://aur.archlinux.org/python-rtslib-fb.git (read-only, click to copy)
Package Base: python-rtslib-fb
Description: free branch version of the LIO target API
Upstream URL: https://github.com/open-iscsi/rtslib-fb
Licenses: Apache
Conflicts: python2-rtslib, targetcli-fb
Submitter: JonnyJD
Maintainer: fuhry
Last Packager: fuhry
Votes: 11
Popularity: 0.52
First Submitted: 2013-10-08 20:54 (UTC)
Last Updated: 2023-12-08 17:30 (UTC)

Latest Comments

1 2 3 Next › Last »

rigred commented on 2025-01-17 19:57 (UTC)

Here's a correctly working PKGBUILD and Patch

# Maintainer: Rigo Reddig <rigo.reddig at gmail dot com>
pkgname='python-rtslib-fb'
_pkgname=rtslib-fb
pkgver=2.2.0
pkgrel=1
pkgdesc="Free branch version of the LIO target API"
arch=('any')
url="https://github.com/open-iscsi/$_pkgname"
license=('Apache')
depends=('python' 'python-six' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
makedepends=('python-setuptools' 'python-pyudev')
source=(
  "https://github.com/open-iscsi/$_pkgname/archive/v${pkgver}.tar.gz"
  target.service
  fix_open_context.patch
)
sha512sums=('8a321be004fabdd4abb479a1900bc27103000ea15712cbcc855fdaa762dca1658e1f3528e1e1976a56a99e57a60c0d69e3bdede5323a2f1a3a6bf419a5ddc6d4'
            '3c634f1c466d0a8c3dd2b57a230438aaeeb0e66324863a2ded57dd69a2ca5946f83c4ab511766f510f3e63b43aedcf7e368bcf5bc325ee69c016bb0bb2612de5'
            'e00980c8b350ea8986ca52f08ab34214557aaae137f6720fa359e512b6bb886c996895f3cdf5334d136ccebd6f1070238cd01631eec1f3b37e411f480dba34bb')

prepare() {
    cd "$srcdir/$_pkgname-$pkgver"
    patch -Np1 -i "$srcdir/fix_open_context.patch"
}

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
  install -Dm644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"

  install -dm755 "$pkgdir/etc/target/backup"
  install -Dm644 "$srcdir/target.service" "$pkgdir/usr/lib/systemd/system/target.service"

  # Install targetctl script to /usr/bin
  install -Dm755 scripts/targetctl "$pkgdir/usr/bin/targetctl"

  # Create symlink for rtslib_fb to rtslib
  install -dm755 "$pkgdir/usr/lib/python3.13/site-packages/rtslib"
  ln -s ../rtslib_fb "$pkgdir/usr/lib/python3.13/site-packages/rtslib"
}

fix_open_context.patch

--- rtslib-fb-2.2.0/rtslib/root.py.orig 2025-01-17 21:43:22.992672648 +0200
+++ rtslib-fb-2.2.0/rtslib/root.py      2025-01-17 21:53:20.492076362 +0200
@@ -487,7 +487,7 @@
         if not restore_file:
             restore_file = default_save_file

-        with Path(restore_file).open as f:
+        with Path(restore_file).open() as f:
             config = json.loads(f.read())
             return self.restore(config, target, storage_object,
                                 clear_existing=clear_existing,

sanerb commented on 2025-01-10 06:06 (UTC)

PKGBUILD for 2.2.0 (probably needs further work/cleanup):

# Contributor: Johannes Dewender  arch at JonnyJD dot net
pkgname='python-rtslib-fb'
_pkgname=rtslib-fb
pkgver=2.2.0
pkgrel=1
pkgdesc="free branch version of the LIO target API"
arch=('any')
url="https://github.com/open-iscsi/$_pkgname"
license=('Apache')
depends=('python' 'python-six' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
makedepends=('python-setuptools' 'python-pyudev')
source=(
  "https://github.com/open-iscsi/$_pkgname/archive/v${pkgver}.tar.gz"
  target.service
)
sha512sums=('8a321be004fabdd4abb479a1900bc27103000ea15712cbcc855fdaa762dca1658e1f3528e1e1976a56a99e57a60c0d69e3bdede5323a2f1a3a6bf419a5ddc6d4'
            '3c634f1c466d0a8c3dd2b57a230438aaeeb0e66324863a2ded57dd69a2ca5946f83c4ab511766f510f3e63b43aedcf7e368bcf5bc325ee69c016bb0bb2612de5')

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
  install -Dm644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"

  install -dm755 "$pkgdir/etc/target/backup"
  install -Dm644 "$srcdir/target.service" "$pkgdir/usr/lib/systemd/system/target.service"
}

thekoma commented on 2025-01-01 19:34 (UTC)

I see that the packages is installed in 3.12 path but today the python env is 3.13 . Probably the package should be updated somehow?

zomgugoff commented on 2023-06-17 08:39 (UTC) (edited on 2023-06-17 08:39 (UTC) by zomgugoff)

Updated for 2.1.76. target.service was internalized so there's a minor path change.

# Contributor: Johannes Dewender  arch at JonnyJD dot net
pkgname='python-rtslib-fb'
_pkgname=rtslib-fb
pkgver=2.1.76
pkgrel=1
pkgdesc="free branch version of the LIO target API"
arch=('any')
url="https://github.com/open-iscsi/$_pkgname"
license=('Apache')
depends=('python' 'python-six' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
makedepends=('python-setuptools' 'python-pyudev')
source=(
  "https://github.com/open-iscsi/$_pkgname/archive/v${pkgver}.tar.gz"
)

sha512sums=('50bc9f4ebff71cc87fd62036ff9d929fb1e5989be6251b1111904e76a7c026215692dc8930b90552a4ff850c6252338e420fe710993b8c8a0c737b65590a520d'
)

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
  install -Dm644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"

  install -dm755 "$pkgdir/etc/target/backup"
  install -Dm644 "$srcdir/$_pkgname-$pkgver/systemd/target.service" "$pkgdir/usr/lib/systemd/system/target.service"

Xyne commented on 2021-02-15 13:36 (UTC) (edited on 2021-02-15 13:53 (UTC) by Xyne)

Here's a cleaner version of the PKGBUILD (no empty variables, no split-package syntax for a single package, consistent user of "install" command and use of _pkgname variable where appropriate). You can replace the current PKGBUILD with this without bumping the release because the built package is equivalent.

# Contributor: Johannes Dewender  arch at JonnyJD dot net
pkgname='python-rtslib-fb'
_pkgname=rtslib-fb
pkgver=2.1.74
pkgrel=1
pkgdesc="free branch version of the LIO target API"
arch=('any')
url="https://github.com/open-iscsi/$_pkgname"
license=('Apache')
depends=('python' 'python-six' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
makedepends=('python-setuptools' 'python-pyudev')
source=(
  "https://github.com/open-iscsi/$_pkgname/archive/v${pkgver}.tar.gz"
  target.service
)
sha512sums=(
  '181b57f699dd4e6bc050585e1abffe75a7eaf5ae8325220d61d37f932912f2cec878c4643172c584f0d4c231441d25ff0e09aa1f48c2305061b75acdce051c86'
  '3c634f1c466d0a8c3dd2b57a230438aaeeb0e66324863a2ded57dd69a2ca5946f83c4ab511766f510f3e63b43aedcf7e368bcf5bc325ee69c016bb0bb2612de5'
)

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
  install -Dm644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"

  install -dm755 "$pkgdir/etc/target/backup"
  install -Dm644 "$srcdir/target.service" "$pkgdir/usr/lib/systemd/system/target.service"
}

# vim:set ts=2 sw=2 et:

jamespharvey20 commented on 2019-09-24 02:23 (UTC)

For some reason, upstream URL is from github user "agrover", instead of "open-iscsi". When going to agrover, it makes it look like this package is up to date with fb69, but the real upstream released 2.1.70.