Add packages needed for ISCSI target

This commit is contained in:
moparisthebest
2016-11-05 23:28:50 -04:00
parent b96f27869a
commit c1a9c881e0
11 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# Generated by mksrcinfo v8
# Tue May 17 18:39:25 UTC 2016
pkgbase = python-rtslib-fb
pkgdesc = free branch version of the LIO target API
pkgver = 2.1.fb60
pkgrel = 2
url = https://github.com/agrover/rtslib-fb
arch = any
license = Apache
makedepends = python-setuptools
makedepends = python2-setuptools
makedepends = python-pyudev
makedepends = python2-pyudev
source = https://fedorahosted.org/releases/t/a/targetcli-fb/rtslib-fb-2.1.fb60.tar.gz
source = target.service
sha256sums = 11b664f02219e5108c4a996f5bc7445500912cff5696b3f51be2f6a1b243e957
sha256sums = 74b9e5c11eab1781aa8b43680b429080ae800fbcdafd29626791b5426a4cdea8
pkgname = python-rtslib-fb
depends = python
depends = python-six
depends = python-pyudev
conflicts = python2-rtslib
conflicts = targetcli-fb<=2.1.fb31
pkgname = python2-rtslib-fb
depends = python2
depends = python2-six
depends = python2-pyudev
conflicts = python2-rtslib

8
src/python-rtslib-fb/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
*.tar.gz
*.tar.xz
*.tgz
*.rpm
*.zip
*.bz2
src/
pkg/

View File

@@ -0,0 +1,53 @@
# Contributor: Johannes Dewender arch at JonnyJD dot net
pkgname=('python-rtslib-fb' 'python2-rtslib-fb')
_pkgname=rtslib-fb
pkgver=2.1.fb60
pkgrel=2
pkgdesc="free branch version of the LIO target API"
arch=('any')
url="https://github.com/agrover/rtslib-fb"
license=('Apache')
makedepends=('python-setuptools' 'python2-setuptools' 'python-pyudev' 'python2-pyudev')
backup=()
options=()
install=
source=(https://fedorahosted.org/releases/t/a/targetcli-fb/$_pkgname-$pkgver.tar.gz target.service)
sha256sums=('11b664f02219e5108c4a996f5bc7445500912cff5696b3f51be2f6a1b243e957'
'74b9e5c11eab1781aa8b43680b429080ae800fbcdafd29626791b5426a4cdea8')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
#patch -p1 < ../setup-syntax.patch
}
package_python-rtslib-fb() {
depends=('python' 'python-six' 'python-pyudev')
conflicts=('python2-rtslib' 'targetcli-fb<=2.1.fb31')
cd "$srcdir/$_pkgname-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1
install -Dm 644 doc/targetctl.8 "$pkgdir/usr/share/man/man8/targetctl.8"
install -Dm 644 doc/saveconfig.json.5 "$pkgdir/usr/share/man/man5/saveconfig.json.5"
# arch specific
cd "$srcdir"
install -d "$pkgdir/etc/target"
install -d "$pkgdir/etc/target/backup"
# systemd
mkdir -p "$pkgdir/usr/lib/systemd/system"
cp target.service "$pkgdir/usr/lib/systemd/system/"
}
package_python2-rtslib-fb() {
depends=('python2' 'python2-six' 'python2-pyudev')
conflicts=('python2-rtslib')
cd "$srcdir/$_pkgname-$pkgver"
python2 setup.py install --root="$pkgdir/" --optimize=1
# the service file and targetctl script is in python-rtslib-fb
rm -r "$pkgdir/usr/bin"
}
# vim:set ts=2 sw=2 et:

View File

@@ -0,0 +1,26 @@
From 53b9e3e7da9da9a797d0b9c0b07bf869dcc7d1bf Mon Sep 17 00:00:00 2001
From: Johannes Dewender <github@JonnyJD.net>
Date: Tue, 26 May 2015 22:41:54 +0200
Subject: [PATCH] fix a syntax error in setup.py
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 442ac06..fcbae40 100755
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ setup (
url = 'http://github.com/agrover/rtslib-fb',
packages = ['rtslib_fb', 'rtslib'],
scripts = ['scripts/targetctl'],
- "classifiers": [
+ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
--
2.1.3

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/targetctl restore
ExecStop=/usr/bin/targetctl clear
SyslogIdentifier=target
[Install]
WantedBy=multi-user.target