Date: Friday, August 19, 2016 @ 22:49:13 Author: seblu Revision: 273985
ceph 10.2.2 Added: ceph/trunk/01-virtualenv2.patch ceph/trunk/02-setup-python2.patch ceph/trunk/ceph.install ceph/trunk/ceph.sysusers Modified: ceph/trunk/PKGBUILD Deleted: ceph/trunk/[email protected] ceph/trunk/[email protected] ceph/trunk/[email protected] ------------------------+ 01-virtualenv2.patch | 11 +++++ 02-setup-python2.patch | 38 +++++++++++++++++++ PKGBUILD | 94 +++++++++++++++++++++++++---------------------- [email protected] | 9 ---- [email protected] | 9 ---- [email protected] | 9 ---- ceph.install | 16 ++++++++ ceph.sysusers | 1 8 files changed, 116 insertions(+), 71 deletions(-) Added: 01-virtualenv2.patch =================================================================== --- 01-virtualenv2.patch (rev 0) +++ 01-virtualenv2.patch 2016-08-19 22:49:13 UTC (rev 273985) @@ -0,0 +1,11 @@ +--- a/src/tools/setup-virtualenv.sh 2016-06-14 13:43:58.000000000 +0200 ++++ b/src/tools/setup-virtualenv.sh 2016-08-18 02:13:31.418624320 +0200 +@@ -18,7 +18,7 @@ + DIR=$1 + rm -fr $DIR + mkdir -p $DIR +-virtualenv --python python2.7 $DIR ++virtualenv2 --python python2.7 $DIR + . $DIR/bin/activate + # older versions of pip will not install wrap_console scripts + # when using wheel packages Added: 02-setup-python2.patch =================================================================== --- 02-setup-python2.patch (rev 0) +++ 02-setup-python2.patch 2016-08-19 22:49:13 UTC (rev 273985) @@ -0,0 +1,38 @@ +--- a/src/Makefile.in 2016-06-14 13:44:59.000000000 +0200 ++++ b/src/Makefile.in 2016-08-19 22:09:15.526703376 +0200 +@@ -32623,7 +32623,7 @@ + cd $(srcdir)/ceph-detect-init ; ../tools/setup-virtualenv.sh ${CEPH_DETECT_INIT_VIRTUALENV} ; test -d wheelhouse && export NO_INDEX=--no-index ; ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e . + + ceph-detect-init-clean: +- cd $(srcdir)/ceph-detect-init ; python setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DETECT_INIT_VIRTUALENV} .coverage *.egg-info ++ cd $(srcdir)/ceph-detect-init ; python2 setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DETECT_INIT_VIRTUALENV} .coverage *.egg-info + + ceph-detect-init-install-data: + cd $(srcdir)/ceph-detect-init ; \ +@@ -32635,7 +32635,7 @@ + fi ; \ + root="--root=$(DESTDIR)" ; \ + fi ; \ +- python setup.py install $$root $$options ++ python2 setup.py install $$root $$options + + export CEPH_DISK_VIRTUALENV = ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv + +@@ -32645,7 +32645,7 @@ + cd $(srcdir)/ceph-disk ; ../tools/setup-virtualenv.sh ${CEPH_DISK_VIRTUALENV} ; test -d wheelhouse && export NO_INDEX=--no-index ; ${CEPH_DISK_VIRTUALENV}/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e . + + ceph-disk-clean: +- cd $(srcdir)/ceph-disk ; python setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DISK_VIRTUALENV} .coverage *.egg-info ++ cd $(srcdir)/ceph-disk ; python2 setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DISK_VIRTUALENV} .coverage *.egg-info + + ceph-disk-install-data: + cd $(srcdir)/ceph-disk ; \ +@@ -32657,7 +32657,7 @@ + fi ; \ + root="--root=$(DESTDIR) --install-script=/usr/sbin" ; \ + fi ; \ +- python setup.py install $$root $$options ++ python2 setup.py install $$root $$options + + #crush_includedir = $(includedir)/crush + #crush_include_DATA = \ Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-08-19 18:28:02 UTC (rev 273984) +++ PKGBUILD 2016-08-19 22:49:13 UTC (rev 273985) @@ -2,50 +2,44 @@ # Maintainer: Sébastien "Seblu" Luttringer <[email protected]> pkgname=ceph -pkgver=0.94.5 -pkgrel=3 +pkgver=10.2.2 +pkgrel=0.1 pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system' arch=('x86_64' 'i686') url='http://ceph.com/' license=('GPL') -makedepends=('boost' 'systemd' 'xfsprogs') -depends=('boost-libs' - 'curl' - 'expat' - 'fcgi' - 'fuse' - 'gcc-libs' - 'glibc' - 'gperftools' - 'keyutils' - 'leveldb' - 'libaio' - 'libatomic_ops' - 'libedit' - 'libsystemd' - 'libutil-linux' - 'ncurses' - 'nss' - 'python2' - 'snappy') +makedepends=('boost' 'systemd' 'xfsprogs' 'python2-setuptools' 'python2-sphinx' + 'python2-virtualenv' 'cython2') +depends=('boost-libs' 'curl' 'expat' 'fcgi' 'fuse' 'gcc-libs' 'glibc' + 'gperftools' 'keyutils' 'leveldb' 'libaio' 'libatomic_ops' 'libedit' + 'libsystemd' 'libutil-linux' 'ncurses' 'nss' 'python2' 'snappy') optdepends=('xfsprogs: support xfs backend') options=('emptydirs') -source=("http://ceph.com/download/$pkgname-$pkgver.tar.bz2" - '[email protected]' - '[email protected]' - '[email protected]') -md5sums=('e7c35581f8d36d34f7cde16a862e54fb' - '9104b5b90349d2aa7802eb89158456e8' - '63a584aa2a4e2b0efbee4e8fd32593f0' - 'd2411c41208d95743baa6d899cc1e0b0') +install=ceph.install +source=("http://ceph.com/download/$pkgname-$pkgver.tar.gz" + 'ceph.sysusers' + '01-virtualenv2.patch' + '02-setup-python2.patch') +md5sums=('5cba47af53b3b17002aad3c854e5405c' + 'b3e24e3aa005a657ab475f84bfe3291a' + 'a3f72dc8e97f9fd5708d52256bcd9e75' + 'f11582acceeb6c1790518c3a5a29bb18') -#prepare() { -# patch -p1 -d $pkgname-$pkgver < 01-boost-158.patch -#} +prepare() { + cd $pkgname-$pkgver + # apply patch from the source array (should be a pacman feature) + local filename + for filename in "${source[@]}"; do + if [[ "$filename" =~ \.patch$ ]]; then + msg2 "Applying patch $filename" + patch -p1 -N -i "$srcdir/$filename" + fi + done + : +} build() { cd $pkgname-$pkgver - export PYTHON=/usr/bin/python2 ./configure \ --prefix=/usr \ --sbindir=/usr/bin \ @@ -52,29 +46,41 @@ --libexecdir=/usr/lib \ --sysconfdir=/etc \ --localstatedir=/var \ - --with-radosgw + --with-man-pages \ + --with-radosgw \ + --without-openldap \ + PYTHON=/usr/bin/python2 \ + CYTHON_CHECK=yes \ + PYTHON_CONFIG_CHECK=yes \ + SPHINX_BUILD=sphinx-build2 make } package() { - make -C $pkgname-$pkgver DESTDIR="$pkgdir" install + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + + # install tmpfiles.d + install -Dm644 systemd/ceph.tmpfiles.d "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" + install -Dm644 "$srcdir"/ceph.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" + cd "$pkgdir" - # systemd - install -dm755 usr/lib/{systemd/system,udev/rules.d} - install -Dm644 "$srcdir"/ceph-{osd,mon,mds}@.service usr/lib/systemd/system - install -Dm644 "$srcdir"/$pkgname-$pkgver/udev/* usr/lib/udev/rules.d + # fix sbin path + msg2 'Fix sbin paths' + mv -v sbin/* usr/sbin/* usr/bin + rmdir -v sbin usr/sbin - # fix directories path - mv sbin/* usr/bin - rmdir sbin + # fix bash completions path + msg2 'Fix bash completion path' install -d -m 755 usr/share/bash-completion mv etc/bash_completion.d usr/share/bash-completion/completions # fix python2 shebang, did not do it in prepare() anymore because it # confuse automake - find . -type f -exec \ + msg2 'Fix python2 shebang' + find . -type f -executable -exec \ sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; } Deleted: [email protected] =================================================================== --- [email protected] 2016-08-19 18:28:02 UTC (rev 273984) +++ [email protected] 2016-08-19 22:49:13 UTC (rev 273985) @@ -1,9 +0,0 @@ -[Unit] -Description=Ceph MDS %i -After=network.target - -[Service] -ExecStart=/usr/bin/ceph-mds -f -i %i - -[Install] -WantedBy=multi-user.target Deleted: [email protected] =================================================================== --- [email protected] 2016-08-19 18:28:02 UTC (rev 273984) +++ [email protected] 2016-08-19 22:49:13 UTC (rev 273985) @@ -1,9 +0,0 @@ -[Unit] -Description=Ceph MON %i -After=network.target - -[Service] -ExecStart=/usr/bin/ceph-mon -f -i %i - -[Install] -WantedBy=multi-user.target Deleted: [email protected] =================================================================== --- [email protected] 2016-08-19 18:28:02 UTC (rev 273984) +++ [email protected] 2016-08-19 22:49:13 UTC (rev 273985) @@ -1,9 +0,0 @@ -[Unit] -Description=Ceph OSD %i -After=network.target - -[Service] -ExecStart=/usr/bin/ceph-osd -f -i %i - -[Install] -WantedBy=multi-user.target Added: ceph.install =================================================================== --- ceph.install (rev 0) +++ ceph.install 2016-08-19 22:49:13 UTC (rev 273985) @@ -0,0 +1,16 @@ +# vim: ft=sh ts=2 sw=2 et: + +# arg 1: the new package version +post_install() { + systemd-sysusers ceph.conf + systemd-tmpfiles --create ceph.conf +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + if (( "$(vercmp $2 '10.2.2-1')" < 0 )); then + systemd-sysusers ceph.conf + systemd-tmpfiles --create ceph.conf + fi +} Added: ceph.sysusers =================================================================== --- ceph.sysusers (rev 0) +++ ceph.sysusers 2016-08-19 22:49:13 UTC (rev 273985) @@ -0,0 +1 @@ +u ceph - - /run/ceph
