diff options
author | BigfootACA | 2021-03-16 17:20:17 +0800 |
---|---|---|
committer | BigfootACA | 2021-03-16 17:20:17 +0800 |
commit | d84866e380b06e836b5ee58d9039c7716a7b96db (patch) | |
tree | 27774ecf1e1d68026337d28d64348fd86f93d433 | |
download | aur-d84866e380b06e836b5ee58d9039c7716a7b96db.tar.gz |
reset repo and upload
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | 0000-lost-binary2string.patch | 18 | ||||
-rw-r--r-- | PKGBUILD | 78 |
4 files changed, 141 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..56e157efd187 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +pkgbase = python-oslo-rootwrap + pkgdesc = Oslo Rootwrap + pkgver = 6.2.0 + pkgrel = 1 + url = https://docs.openstack.org/oslo.rootwrap/latest/ + arch = any + license = Apache + checkdepends = python-hacking + checkdepends = python-fixtures + checkdepends = python-testtools + checkdepends = python-stestr + checkdepends = python-oslotest + checkdepends = python-eventlet + checkdepends = python-reno + checkdepends = bandit + makedepends = python-setuptools + makedepends = python-openstackdocstheme + makedepends = python-sphinx + makedepends = python-reno + makedepends = python-mock + makedepends = python-fixtures + depends = python + depends = python-six + options = !emptydirs + source = https://pypi.io/packages/source/o/oslo.rootwrap/oslo.rootwrap-6.2.0.tar.gz + source = 0000-lost-binary2string.patch + md5sums = 3dad1a7a001be9f6283bcc25ce511c39 + md5sums = 13d2c35be1e37af81d708cfe8c96297d + sha256sums = 83e01cf523b04a2f7c1a4c9000c55bbc1b75a26391cce25b3a7c94b50cafa848 + sha256sums = 0fb81f04ddd9f1897c11e363d1b2be61fd0940493bed50861194a3a6ee7b5e26 + sha512sums = bf3e91ec8a18f92f6f5974a6d8369ae73dba6e61fa3001996678b85d0bfb2426536d27097ad784169e6eca50ad23471505d5089e8d4a6a84c9e0e009a6a38f5a + sha512sums = feaa869fb50943464b006d14633e40f43ea75243836f5c4a8ee6a916878275498ddb421d7df73c51336cc71725e7eb4498b5f7214f61394fe0ba09f58aebd11b + +pkgname = python-oslo-rootwrap + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..fcaabd513b1a --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +pkg +src +*.tar +*.gz +*.xz +*.zst +*.zip +*.lz4 +*.lzo +*.bz diff --git a/0000-lost-binary2string.patch b/0000-lost-binary2string.patch new file mode 100644 index 000000000000..58598a7ea00d --- /dev/null +++ b/0000-lost-binary2string.patch @@ -0,0 +1,18 @@ +diff --git a/oslo.rootwrap-6.2.0/oslo_rootwrap/tests/test_functional.py b/oslo.rootwrap-6.2.0-patched/oslo_rootwrap/tests/test_functional.py +index da59b21..5b89630 100644 +--- a/oslo.rootwrap-6.2.0/oslo_rootwrap/tests/test_functional.py ++++ b/oslo.rootwrap-6.2.0-patched/oslo_rootwrap/tests/test_functional.py +@@ -103,11 +103,11 @@ later_install_cmd: CommandFilter, %s, root + + # Should run as 'nobody' + code, out, err = self.execute(['id', '-u']) +- self.assertEqual('%s\n' % pwd.getpwnam('nobody').pw_uid, out) ++ self.assertEqual(int(pwd.getpwnam('nobody').pw_uid), int(out)) + + # Should run as 'root' + code, out, err = self.execute(['sh', '-c', 'id -u']) +- self.assertEqual('0\n', out) ++ self.assertEqual(0, int(out)) + + + class RootwrapTest(_FunctionalBase, testtools.TestCase): diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..892dafd99f41 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: BigfootACA <bigfoot@classfun.cn> + +_pyname=oslo.rootwrap +_pycname=${_pyname/./-} +pkgname=python-${_pycname} +pkgver=6.2.0 +pkgrel=1 +pkgdesc="Oslo Rootwrap" +arch=('any') +url="https://docs.openstack.org/oslo.rootwrap/latest/" +license=('Apache') +depends=( + python + python-six +) +makedepends=( + python-setuptools + python-openstackdocstheme + python-sphinx + python-reno + python-mock + python-fixtures +) +checkdepends=( + python-hacking + python-fixtures + python-testtools + python-stestr + python-oslotest + python-eventlet + python-reno + bandit +) +options=('!emptydirs') +source=( + https://pypi.io/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz + 0000-lost-binary2string.patch +) +md5sums=('3dad1a7a001be9f6283bcc25ce511c39' + '13d2c35be1e37af81d708cfe8c96297d') +sha256sums=('83e01cf523b04a2f7c1a4c9000c55bbc1b75a26391cce25b3a7c94b50cafa848' + '0fb81f04ddd9f1897c11e363d1b2be61fd0940493bed50861194a3a6ee7b5e26') +sha512sums=('bf3e91ec8a18f92f6f5974a6d8369ae73dba6e61fa3001996678b85d0bfb2426536d27097ad784169e6eca50ad23471505d5089e8d4a6a84c9e0e009a6a38f5a' + 'feaa869fb50943464b006d14633e40f43ea75243836f5c4a8ee6a916878275498ddb421d7df73c51336cc71725e7eb4498b5f7214f61394fe0ba09f58aebd11b') + +prepare(){ + for i in "${source[@]}" + do case "${i}" in + ?*.patch) + msg2 "Apply patch ${i}" + patch -Np1 <"${i}" + ;; + esac + done +} + +build(){ + cd $_pyname-$pkgver + python setup.py build + sphinx-build -b html doc/source doc/build/html +} + +check(){ + cd $_pyname-$pkgver + PYTHONPATH=${PWD} stestr run +} + +package(){ + cd $_pyname-$pkgver + python setup.py install --root="$pkgdir/" --optimize=1 + install -Dm644 etc/*.sample -t "$pkgdir"/usr/share/${pkgname}/conf + install -Dm644 etc/*.sample -t "$pkgdir"/etc/oslo + for i in "$pkgdir"/etc/oslo/*.sample + do mv -v $i ${i//.sample} + done + mkdir -p "${pkgdir}/usr/share/doc" + cp -r doc/build/html "${pkgdir}/usr/share/doc/${pkgname}" +} |