debian/0000755000000000000000000000000011675630772007204 5ustar debian/copyright0000644000000000000000000000127311675630772011142 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: syncache Source: http://samizdat.nongnu.org/ Files: * Copyright: 2002-2009 Dmitry Borodaenko License: GPL-3+ Files: debian/* Copyright: 2005-2011 Dmitry Borodaenko 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'. debian/control0000644000000000000000000000263211675630772010612 0ustar Source: syncache Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Dmitry Borodaenko DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.8~) Standards-Version: 3.9.2 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, 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. debian/syncache.default0000644000000000000000000000066311675630772012354 0ustar # /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 debian/postrm0000644000000000000000000000050111675630772010447 0ustar #!/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 debian/compat0000644000000000000000000000000211675630772010402 0ustar 7 debian/postinst0000644000000000000000000000070511675630772011014 0ustar #!/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 ;; 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 debian/watch0000644000000000000000000000012311675630772010231 0ustar version=3 https://github.com/angdraug/syncache/tags .*/syncache/tarball/v([\d\.]*) debian/syncache.manpages0000644000000000000000000000002311675630772012511 0ustar man/syncache-drb.1 debian/syncache.docs0000644000000000000000000000002111675630772011644 0ustar README.rdoc rdoc debian/patches/0000755000000000000000000000000011675630772010633 5ustar debian/patches/series0000644000000000000000000000000011675630772012036 0ustar debian/rules0000755000000000000000000000117611675630772010271 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby override_dh_installdocs: rdoc --inline-source --op rdoc --main README.rdoc \ --exclude syncache_sync_patch.rb README.rdoc lib dh_installdocs override_dh_clean: rm -rf rdoc dh_clean debian/ruby-test-files.yaml0000644000000000000000000000003311675630772013122 0ustar --- - test/ts_syncache.rb debian/changelog0000644000000000000000000000155611675630772011065 0ustar syncache (1.2-1) unstable; urgency=low * New upstream version: - multiple syncache-drb daemon fixes - RemoteCache marshallability fix - migrated from Sync to Mutex (monkey patch dropped). * Another debian/watch fix. -- Dmitry Borodaenko Sun, 25 Dec 2011 17:22:27 +0300 syncache (1.1-1) unstable; urgency=low * New upstream version: - Ruby 1.9 compatibility patch merged upstream - new RemoteCache wrapper class. * Point debian/watch at GitHub. * Use --retry when stopping syncache-drb. * Move piddir creation from postinst to init script. * Exclude monkey patches from rdoc. -- Dmitry Borodaenko Tue, 27 Sep 2011 01:33:27 +0300 syncache (1.0-1) unstable; urgency=low * Initial release. Closes: #573966 (ITP). -- Dmitry Borodaenko Wed, 14 Sep 2011 11:58:51 +0300 debian/source/0000755000000000000000000000000011675630772010504 5ustar debian/source/format0000644000000000000000000000001411675630772011712 0ustar 3.0 (quilt) debian/syncache.init0000755000000000000000000000575311675630772011703 0ustar #! /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 syncache_start () { PIDDIR=`dirname "$PIDFILE"` if [ -d "$PIDDIR" ]; then chmod 755 "$PIDDIR" else install -o syncache -g syncache -m 755 -d "$PIDDIR" fi start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \ $NICE --oknodo --startas $DAEMON -- $OPTIONS } syncache_stop () { start-stop-daemon --stop --pidfile $PIDFILE --oknodo --retry 3 rm -f $PIDFILE } syncache_reload () { start-stop-daemon --stop --pidfile $PIDFILE --signal HUP } case "$1" in start) log_begin_msg "Starting $DESC:" log_progress_msg $NAME syncache_start log_end_msg $? ;; stop) log_begin_msg "Stopping $DESC:" log_progress_msg "$NAME" syncache_stop log_end_msg $? ;; reload|force-reload) log_begin_msg "Reloading $DESC:" log_progress_msg $NAME syncache_reload log_end_msg $? ;; restart) log_begin_msg "Restarting $DESC:" log_progress_msg $NAME syncache_stop syncache_start 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