[DRE-commits] [SCM] syncache.git branch, master, updated. upstream/1.0-3-gf1559ae
Dmitry Borodaenko
angdraug at debian.org
Wed Sep 14 11:31:21 UTC 2011
The following commit has been merged in the master branch:
commit 424d64af336a0cf26a3c9b468888c437d50f1cbd
Author: Dmitry Borodaenko <angdraug at debian.org>
Date: Wed Sep 14 13:55:10 2011 +0300
first Debian build based on gem2deb and an old ITP
diff --git a/debian/changelog b/debian/changelog
index c8d4386..abfd647 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,5 @@
-syncache (1.0-1) UNRELEASED; urgency=low
+syncache (1.0-1) unstable; urgency=low
- * Initial release (Closes: #nnnn)
+ * Initial release. Closes: #573966 (ITP).
-- Dmitry Borodaenko <angdraug at debian.org> Wed, 14 Sep 2011 11:58:51 +0300
diff --git a/debian/control b/debian/control
index db0d42b..1beb97a 100644
--- a/debian/control
+++ b/debian/control
@@ -6,14 +6,27 @@ Uploaders: Dmitry Borodaenko <angdraug at debian.org>
DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.8~)
Standards-Version: 3.9.2
-#Vcs-Git: git://git.debian.org/pkg-ruby-extras/syncache.git
-#Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/syncache.git;a=summary
-Homepage: FIXME
+Vcs-Git: git://github.com/angdraug/syncache.git
+Vcs-Browser: https://github.com/angdraug/syncache
+Homepage: http://samizdat.nongnu.org/
XS-Ruby-Versions: all
Package: syncache
Architecture: all
XB-Ruby-Versions: ${ruby:Versions}
-Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter
-Description: FIXME
- <insert long description, indented with spaces>
+Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, adduser
+Description: Thread-safe time-limited cache for Ruby
+ SynCache stores cached objects in a Hash that is protected by an advanced
+ two-level locking mechanism which ensures that:
+ .
+ * Multiple threads can add and fetch objects in parallel.
+ * While one thread is working on a cache entry, other threads can access
+ the rest of the cache with no waiting on the global lock, no race
+ conditions nor deadlock or livelock situations.
+ * While one thread is performing a long and resource-intensive
+ operation, other threads that request the same data will be put on hold,
+ and as soon as the first thread completes the operation, the result will be
+ returned to all threads.
+ .
+ This package provides SynCache module for Ruby and a DRb server that exports a
+ SynCache::Cache object for use in Ruby programs.
diff --git a/debian/copyright b/debian/copyright
index 8727f0e..25d87bd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,33 +1,20 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: syncache
-Source: FIXME <http://example.com/>
+Source: http://samizdat.nongnu.org/
Files: *
-Copyright: <years> <put author's name and email here>
- <years> <likewise for another author>
-License: GPL-2+ (FIXME)
- This program is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
- .
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU General Public License for more
- details.
- .
- You should have received a copy of the GNU General Public
- License along with this package; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA 02110-1301 USA
- .
- On Debian systems, the full text of the GNU General Public
- License version 2 can be found in the file
- `/usr/share/common-licenses/GPL-2'.
+Copyright: 2002-2009 Dmitry Borodaenko <angdraug at debian.org>
+License: GPL-3+
Files: debian/*
-Copyright: 2011 Dmitry Borodaenko <angdraug at debian.org>
-License:
- [LICENSE TEXT]
+Copyright: 2005-2011 Dmitry Borodaenko <angdraug at debian.org>
+License: GPL-3+
+
+License: GPL-3+
+ The files hereby included are free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3 of the
+ License, or (at your option) any later version.
+ .
+ On Debian systems, the full text of the GNU General Public License
+ version 3 can be found in the file `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..a861192
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+
+PIDDIR="/var/run/syncache-drb"
+
+case "$1" in
+ configure)
+
+ # Create syncache system user
+ getent passwd syncache > /dev/null || \
+ adduser --quiet --system --home "$PIDDIR" --no-create-home \
+ --gecos 'SynCache DRb Server' --group syncache
+
+ # Create pidfile directory
+ [ -d "$PIDDIR" ] || install -o syncache -g syncache -d "$PIDDIR"
+
+ ;;
+
+ failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..847804d
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+case "$1" in
+ purge)
+ # remove user, group, and home directory
+ deluser --remove-home syncache >/dev/null 2>&1 || true
+ ;;
+
+ remove|upgrade|disappearfailed-install|abort-install|abort-upgrade|failed-upgrade)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2;
+ ;;
+esac
+
+exit 0
diff --git a/debian/ruby-syncache.docs b/debian/ruby-syncache.docs
deleted file mode 100644
index 0d5eab8..0000000
--- a/debian/ruby-syncache.docs
+++ /dev/null
@@ -1,2 +0,0 @@
-# FIXME: READMEs found
-# README.rdoc
diff --git a/debian/ruby-syncache.manpages b/debian/ruby-syncache.manpages
deleted file mode 100644
index c59ff24..0000000
--- a/debian/ruby-syncache.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-# FIXME: man/ dir found in source. Consider installing manpages
-# man/syncache-drb.1
diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml
new file mode 100644
index 0000000..48d4bfb
--- /dev/null
+++ b/debian/ruby-test-files.yaml
@@ -0,0 +1,2 @@
+---
+- test/ts_syncache.rb
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
deleted file mode 100644
index eac5ce6..0000000
--- a/debian/ruby-tests.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# FIXME
-# there's a spec/ or a test/ directory in the upstream source, but
-# no test suite was defined in the Gem specification. It would be
-# a good idea to define it here so the package gets tested at build time.
-# Examples:
-# $: << 'lib' << '.'
-# Dir['{spec,test}/**/*.rb'].each { |f| require f }
-#
-# require 'test/ts_foo.rb'
-#
-# require 'rbconfig'
-# ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
-# exec("#{ruby} -I. test/runtests.rb")
diff --git a/debian/rules b/debian/rules
index a5e7dc8..17a4ba9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,3 +13,12 @@
%:
dh $@ --buildsystem=ruby --with ruby
+
+override_dh_installdocs:
+ rdoc --inline-source --op rdoc --main README.rdoc \
+ README.rdoc lib
+ dh_installdocs
+
+override_dh_clean:
+ rm -rf rdoc
+ dh_clean
diff --git a/debian/syncache.default b/debian/syncache.default
new file mode 100644
index 0000000..b38738f
--- /dev/null
+++ b/debian/syncache.default
@@ -0,0 +1,19 @@
+# /etc/default/syncache
+# Dmitry Borodaenko
+
+# Change to "0" to disable starting syncache-drb on boot
+ENABLED=1
+
+# Change default dRuby URI
+#URI='druby://localhost:9000'
+
+# Change default time-to-live limit
+#TTL=86400
+
+# Change default limit on number of cached objects
+#SIZE=10000
+
+# Rate-limit flush operations: if less than that number of seconds has
+# passed since last flush, next flush will be delayed.
+#FLUSHDELAY=
+FLUSHDELAY=5
diff --git a/debian/syncache.docs b/debian/syncache.docs
new file mode 100644
index 0000000..6d29741
--- /dev/null
+++ b/debian/syncache.docs
@@ -0,0 +1,2 @@
+README.rdoc
+rdoc
diff --git a/debian/syncache.init b/debian/syncache.init
new file mode 100755
index 0000000..3ae8a00
--- /dev/null
+++ b/debian/syncache.init
@@ -0,0 +1,110 @@
+#! /bin/sh
+
+# SynCache dRuby object cache server init script
+# May 2005
+# Dmitry Borodaenko
+
+# Borrowed from spamassassin init script by Duncan Findlay
+# Based on skeleton by Miquel van Smoorenburg and Ian Murdock
+
+### BEGIN INIT INFO
+# Provides: syncache
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# X-Start-Before: apache2 lighttpd nginx
+# X-Stop-After: apache2 lighttpd nginx
+# Short-Description: Start and stop SynCache DRB server
+# Description: A DRb server that exports a SynCache::Cache object providing
+# thread-safe time-limited cache for use in Ruby programs.
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+CHUID=syncache
+DAEMON=/usr/bin/syncache-drb
+NAME=syncache-drb
+SNAME=syncache
+DESC="SynCache object cache"
+PIDFILE="/var/run/$NAME/$NAME.pid"
+ERROR_LOG="/var/log/$NAME.log"
+PNAME=$NAME
+
+# use dummy lsb init-functions if lsb-base is not installed
+if [ -r /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+else
+ log_begin_msg() { echo -n "$@"; }
+ log_progress_msg() { echo -n " $@"; }
+ log_success_msg() { echo "$@"; }
+ log_failure_msg() { echo "$@"; }
+ log_warning_msg() { echo "$@"; }
+ log_end_msg() { if [ "$1" = "0" ]; then echo "."; else echo " failed!"; fi }
+fi
+
+# Apparently people have trouble if this isn't explicitly set...
+export TMPDIR=/tmp
+
+# Defaults - don't touch, edit /etc/default/syncache
+ENABLED=0
+OPTIONS="--user $CHUID --pidfile $PIDFILE --error-log $ERROR_LOG"
+NICE=
+
+test -f "/etc/default/$SNAME" && . "/etc/default/$SNAME"
+
+if [ "$ENABLED" = "0" ]; then
+ log_success_msg "$DESC: disabled, see /etc/default/$SNAME"
+ exit 0
+fi
+
+test -f $DAEMON || exit 0
+
+[ -n "$TTL" ] && OPTIONS="$OPTIONS --ttl $TTL"
+[ -n "$SIZE" ] && OPTIONS="$OPTIONS --size $SIZE"
+[ -n "$FLUSHDELAY" ] && OPTIONS="$OPTIONS --flush-delay $FLUSHDELAY"
+[ -n "$URI" ] && OPTIONS="$OPTIONS $URI"
+
+set -e
+
+case "$1" in
+ start)
+ log_begin_msg "Starting $DESC:"
+ log_progress_msg $NAME
+ start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
+ $NICE --oknodo --startas $DAEMON -- $OPTIONS
+ log_end_msg $?
+ ;;
+
+ stop)
+ log_begin_msg "Stopping $DESC:"
+ log_progress_msg "$NAME"
+ start-stop-daemon --stop --pidfile $PIDFILE --oknodo
+ log_end_msg $?
+ ;;
+
+ reload|force-reload)
+ log_begin_msg "Reloading $DESC:"
+ log_progress_msg $NAME
+ start-stop-daemon --stop --pidfile $PIDFILE --signal HUP
+ log_end_msg $?
+ ;;
+
+ restart)
+ log_begin_msg "Restarting $DESC:"
+ log_progress_msg $NAME
+ start-stop-daemon --stop --pidfile $PIDFILE --oknodo
+ start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
+ $NICE --oknodo --startas $DAEMON -- $OPTIONS
+ log_end_msg $?
+ ;;
+
+ *)
+ N=/etc/init.d/$SNAME
+ log_failure_msg "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/syncache.manpages b/debian/syncache.manpages
new file mode 100644
index 0000000..b47e1d4
--- /dev/null
+++ b/debian/syncache.manpages
@@ -0,0 +1 @@
+man/syncache-drb.1
diff --git a/debian/watch b/debian/watch
index f695494..a220d27 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
version=3
-http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/syncache .*/syncache-(.*).tar.gz
+http://savannah.nongnu.org/download/samizdat .*/syncache-([\d\.]*).tar.gz
--
syncache.git
More information about the Pkg-ruby-extras-commits
mailing list