Date: Thursday, May 22, 2014 @ 21:12:12 Author: anatolik Revision: 111691
archrelease: copy trunk to community-testing-i686, community-testing-x86_64 Added: rethinkdb/repos/community-testing-i686/ rethinkdb/repos/community-testing-i686/PKGBUILD (from rev 111690, rethinkdb/trunk/PKGBUILD) rethinkdb/repos/community-testing-i686/rethinkdb-tmpfile.conf (from rev 111690, rethinkdb/trunk/rethinkdb-tmpfile.conf) rethinkdb/repos/community-testing-i686/rethinkdb.install (from rev 111690, rethinkdb/trunk/rethinkdb.install) rethinkdb/repos/community-testing-i686/rethinkdb.service (from rev 111690, rethinkdb/trunk/rethinkdb.service) rethinkdb/repos/community-testing-x86_64/ rethinkdb/repos/community-testing-x86_64/PKGBUILD (from rev 111690, rethinkdb/trunk/PKGBUILD) rethinkdb/repos/community-testing-x86_64/rethinkdb-tmpfile.conf (from rev 111690, rethinkdb/trunk/rethinkdb-tmpfile.conf) rethinkdb/repos/community-testing-x86_64/rethinkdb.install (from rev 111690, rethinkdb/trunk/rethinkdb.install) rethinkdb/repos/community-testing-x86_64/rethinkdb.service (from rev 111690, rethinkdb/trunk/rethinkdb.service) -------------------------------------------------+ community-testing-i686/PKGBUILD | 55 ++++++++++++++++++++++ community-testing-i686/rethinkdb-tmpfile.conf | 1 community-testing-i686/rethinkdb.install | 37 ++++++++++++++ community-testing-i686/rethinkdb.service | 12 ++++ community-testing-x86_64/PKGBUILD | 55 ++++++++++++++++++++++ community-testing-x86_64/rethinkdb-tmpfile.conf | 1 community-testing-x86_64/rethinkdb.install | 37 ++++++++++++++ community-testing-x86_64/rethinkdb.service | 12 ++++ 8 files changed, 210 insertions(+) Copied: rethinkdb/repos/community-testing-i686/PKGBUILD (from rev 111690, rethinkdb/trunk/PKGBUILD) =================================================================== --- community-testing-i686/PKGBUILD (rev 0) +++ community-testing-i686/PKGBUILD 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1,55 @@ +# $Id$ +# Maintainer: Anatol Pomozov <anatol.pomo...@gmail.com> +# Contributor: Massimiliano Torromeo <massimiliano.torro...@gmail.com> +# Contributor: Sigmund Lahn <sigm...@lahn.no> + +pkgname=rethinkdb +pkgver=1.12.5 +pkgrel=1 +pkgdesc='An open-source distributed database built with love.' +arch=(i686 x86_64) +url='http://www.rethinkdb.com/' +license=(AGPL) +depends=(protobuf ncurses gperftools) +makedepends=(boost python python2) +backup=(etc/rethinkdb/instances.d/default.conf) +install=rethinkdb.install +options=(!emptydirs) +source=( + http://download.rethinkdb.com/dist/rethinkdb-$pkgver.tgz + rethinkdb-tmpfile.conf + rethinkdb.service +) +sha256sums=('f86c70e680a863be106fb03d8245bd3d42df57a5635378bd70ba0eb86ff98bea' + '656d3a42e75d087e723f71aa320fdd91cbbb82071ef72eb11fd3e4a619b429a4' + 'e56bffa2b9ebc3a00ef566ab2be0719a633c89d961a2461dfa2d9ffdb258c1a2') + +build() { + cd rethinkdb-$pkgver + ./configure --fetch v8 --disable-drivers --dynamic all --enable-precompiled-web --prefix=/usr --sysconfdir=/etc + make +} + +check() { + cd rethinkdb-$pkgver + make build/release/rethinkdb-unittest + ./build/release/rethinkdb-unittest + # some tests might be flaky on btrfs filesystem! +} + +package() { + cd rethinkdb-$pkgver + make DESTDIR="$pkgdir" install + + install -Dm644 "$srcdir"/rethinkdb-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/rethinkdb.conf + install -Dm644 "$srcdir"/rethinkdb.service "$pkgdir"/usr/lib/systemd/system/rethinkdb@.service + + # create 'default' database instance + cp "$pkgdir"/etc/rethinkdb/default.conf.sample "$pkgdir"/etc/rethinkdb/instances.d/default.conf + sed -e 's|# directory=/var/lib/rethinkdb|directory=/var/lib/rethinkdb|' \ + -e 's|# pid-file=/var/run/rethinkdb/rethinkdb.pid|pid-file=/var/run/rethinkdb/default.pid|' \ + -i "$pkgdir"/etc/rethinkdb/instances.d/default.conf + + # Arch uses systemd, no need for init.d scripts + rm -r "$pkgdir"/etc/init.d +} Copied: rethinkdb/repos/community-testing-i686/rethinkdb-tmpfile.conf (from rev 111690, rethinkdb/trunk/rethinkdb-tmpfile.conf) =================================================================== --- community-testing-i686/rethinkdb-tmpfile.conf (rev 0) +++ community-testing-i686/rethinkdb-tmpfile.conf 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1 @@ +d /run/rethinkdb 0755 rethinkdb rethinkdb - \ No newline at end of file Copied: rethinkdb/repos/community-testing-i686/rethinkdb.install (from rev 111690, rethinkdb/trunk/rethinkdb.install) =================================================================== --- community-testing-i686/rethinkdb.install (rev 0) +++ community-testing-i686/rethinkdb.install 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1,37 @@ +post_install() { + groupadd rethinkdb &>/dev/null + useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null + + if type -P systemd-tmpfiles &> /dev/null; then + systemd-tmpfiles --create rethinkdb.conf + fi + + if [ -d /var/lib/rethinkdb ]; then + echo "Database directory '/var/lib/rethinkdb' already exists. If you want to recreate default database then delete the directory and run 'rethinkdb create -d /var/lib/rethinkdb/default'." + fi + + if [ ! -d /var/lib/rethinkdb/default ]; then + mkdir -p /var/lib/rethinkdb + /usr/bin/rethinkdb create -d /var/lib/rethinkdb/default + fi + chown -R rethinkdb:rethinkdb /var/lib/rethinkdb +} + +post_upgrade() { + IFS='.' read -a new_version <<< "$1" + IFS='.' read -a old_version <<< "$2" + + if [ "${old_version[0]}" != "${new_version[0]}" -o "${old_version[1]}" != "${new_version[1]}" ]; then + echo "This release changed data storage format. Please upgrade your data using following information https://github.com/rethinkdb/rethinkdb/tree/next/scripts/migration" + fi + + getent group rethinkdb >/dev/null 2>&1 || groupadd rethinkdb &>/dev/null + getent passwd rethinkdb >/dev/null 2>&1 || useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null +} + +post_remove() { + getent passwd rethinkdb >/dev/null && userdel rethinkdb + getent group rethinkdb >/dev/null && groupdel rethinkdb + + echo "RethinkDB data directory '/var/lib/rethinkdb' is left untouched. Remove it if you really sure you won't need your data in the future." +} Copied: rethinkdb/repos/community-testing-i686/rethinkdb.service (from rev 111690, rethinkdb/trunk/rethinkdb.service) =================================================================== --- community-testing-i686/rethinkdb.service (rev 0) +++ community-testing-i686/rethinkdb.service 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1,12 @@ +[Unit] +Description=RethinkDB database server for instance '%i' + +[Service] +User=rethinkdb +Group=rethinkdb +ExecStart=/usr/bin/rethinkdb serve --config-file /etc/rethinkdb/instances.d/%i.conf +KillMode=process +PrivateTmp=true + +[Install] +WantedBy=multi-user.target Copied: rethinkdb/repos/community-testing-x86_64/PKGBUILD (from rev 111690, rethinkdb/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1,55 @@ +# $Id$ +# Maintainer: Anatol Pomozov <anatol.pomo...@gmail.com> +# Contributor: Massimiliano Torromeo <massimiliano.torro...@gmail.com> +# Contributor: Sigmund Lahn <sigm...@lahn.no> + +pkgname=rethinkdb +pkgver=1.12.5 +pkgrel=1 +pkgdesc='An open-source distributed database built with love.' +arch=(i686 x86_64) +url='http://www.rethinkdb.com/' +license=(AGPL) +depends=(protobuf ncurses gperftools) +makedepends=(boost python python2) +backup=(etc/rethinkdb/instances.d/default.conf) +install=rethinkdb.install +options=(!emptydirs) +source=( + http://download.rethinkdb.com/dist/rethinkdb-$pkgver.tgz + rethinkdb-tmpfile.conf + rethinkdb.service +) +sha256sums=('f86c70e680a863be106fb03d8245bd3d42df57a5635378bd70ba0eb86ff98bea' + '656d3a42e75d087e723f71aa320fdd91cbbb82071ef72eb11fd3e4a619b429a4' + 'e56bffa2b9ebc3a00ef566ab2be0719a633c89d961a2461dfa2d9ffdb258c1a2') + +build() { + cd rethinkdb-$pkgver + ./configure --fetch v8 --disable-drivers --dynamic all --enable-precompiled-web --prefix=/usr --sysconfdir=/etc + make +} + +check() { + cd rethinkdb-$pkgver + make build/release/rethinkdb-unittest + ./build/release/rethinkdb-unittest + # some tests might be flaky on btrfs filesystem! +} + +package() { + cd rethinkdb-$pkgver + make DESTDIR="$pkgdir" install + + install -Dm644 "$srcdir"/rethinkdb-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/rethinkdb.conf + install -Dm644 "$srcdir"/rethinkdb.service "$pkgdir"/usr/lib/systemd/system/rethinkdb@.service + + # create 'default' database instance + cp "$pkgdir"/etc/rethinkdb/default.conf.sample "$pkgdir"/etc/rethinkdb/instances.d/default.conf + sed -e 's|# directory=/var/lib/rethinkdb|directory=/var/lib/rethinkdb|' \ + -e 's|# pid-file=/var/run/rethinkdb/rethinkdb.pid|pid-file=/var/run/rethinkdb/default.pid|' \ + -i "$pkgdir"/etc/rethinkdb/instances.d/default.conf + + # Arch uses systemd, no need for init.d scripts + rm -r "$pkgdir"/etc/init.d +} Copied: rethinkdb/repos/community-testing-x86_64/rethinkdb-tmpfile.conf (from rev 111690, rethinkdb/trunk/rethinkdb-tmpfile.conf) =================================================================== --- community-testing-x86_64/rethinkdb-tmpfile.conf (rev 0) +++ community-testing-x86_64/rethinkdb-tmpfile.conf 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1 @@ +d /run/rethinkdb 0755 rethinkdb rethinkdb - \ No newline at end of file Copied: rethinkdb/repos/community-testing-x86_64/rethinkdb.install (from rev 111690, rethinkdb/trunk/rethinkdb.install) =================================================================== --- community-testing-x86_64/rethinkdb.install (rev 0) +++ community-testing-x86_64/rethinkdb.install 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1,37 @@ +post_install() { + groupadd rethinkdb &>/dev/null + useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null + + if type -P systemd-tmpfiles &> /dev/null; then + systemd-tmpfiles --create rethinkdb.conf + fi + + if [ -d /var/lib/rethinkdb ]; then + echo "Database directory '/var/lib/rethinkdb' already exists. If you want to recreate default database then delete the directory and run 'rethinkdb create -d /var/lib/rethinkdb/default'." + fi + + if [ ! -d /var/lib/rethinkdb/default ]; then + mkdir -p /var/lib/rethinkdb + /usr/bin/rethinkdb create -d /var/lib/rethinkdb/default + fi + chown -R rethinkdb:rethinkdb /var/lib/rethinkdb +} + +post_upgrade() { + IFS='.' read -a new_version <<< "$1" + IFS='.' read -a old_version <<< "$2" + + if [ "${old_version[0]}" != "${new_version[0]}" -o "${old_version[1]}" != "${new_version[1]}" ]; then + echo "This release changed data storage format. Please upgrade your data using following information https://github.com/rethinkdb/rethinkdb/tree/next/scripts/migration" + fi + + getent group rethinkdb >/dev/null 2>&1 || groupadd rethinkdb &>/dev/null + getent passwd rethinkdb >/dev/null 2>&1 || useradd -g rethinkdb -d /var/lib/rethinkdb -s /bin/false rethinkdb &>/dev/null +} + +post_remove() { + getent passwd rethinkdb >/dev/null && userdel rethinkdb + getent group rethinkdb >/dev/null && groupdel rethinkdb + + echo "RethinkDB data directory '/var/lib/rethinkdb' is left untouched. Remove it if you really sure you won't need your data in the future." +} Copied: rethinkdb/repos/community-testing-x86_64/rethinkdb.service (from rev 111690, rethinkdb/trunk/rethinkdb.service) =================================================================== --- community-testing-x86_64/rethinkdb.service (rev 0) +++ community-testing-x86_64/rethinkdb.service 2014-05-22 19:12:12 UTC (rev 111691) @@ -0,0 +1,12 @@ +[Unit] +Description=RethinkDB database server for instance '%i' + +[Service] +User=rethinkdb +Group=rethinkdb +ExecStart=/usr/bin/rethinkdb serve --config-file /etc/rethinkdb/instances.d/%i.conf +KillMode=process +PrivateTmp=true + +[Install] +WantedBy=multi-user.target