--- memcached-1.4.13.orig/debian/docs +++ memcached-1.4.13/debian/docs @@ -0,0 +1,3 @@ +NEWS +README +doc/protocol.txt --- memcached-1.4.13.orig/debian/memcached.postinst +++ memcached-1.4.13/debian/memcached.postinst @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +GROUP="memcache" +USER="memcache" +DATADIR="/nonexistent" + +# shamelessly copied from debian gearman-job-server package... + +case "$1" in +configure) + # creating memcache group if it isn't already there + if ! getent group $GROUP >/dev/null ; then + # Adding system group + addgroup --system $GROUP >/dev/null + fi + + # creating memcache user if it isn't already there + if ! getent passwd $USER >/dev/null ; then + # Adding system user + adduser \ + --system \ + --disabled-login \ + --ingroup $GROUP \ + --home $DATADIR \ + --gecos "Memcached" \ + --shell /bin/false \ + $USER >/dev/null + fi + if [ ! -e /etc/memcached.conf ] + then + mkdir -p /etc + cp /usr/share/memcached/memcached.conf.default /etc/memcached.conf + fi + ;; +esac + +#DEBHELPER# --- memcached-1.4.13.orig/debian/README.source +++ memcached-1.4.13/debian/README.source @@ -0,0 +1,4 @@ +This package uses quilt for patch management. Refer to /usr/share/doc/quilt/README.source +from the package 'quilt' for more information about this system. + + -- David Martínez Moreno Fri, 18 Sep 2009 02:43:54 +0200 --- memcached-1.4.13.orig/debian/memcached.postrm +++ memcached-1.4.13/debian/memcached.postrm @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +USER=memcache +GROUP=memcache + +if [ "$1" = "purge" ] + then + rm -f /etc/memcached.conf + rm -f /var/log/memcached.log + + deluser --system $USER || true + delgroup --system --only-if-empty $GROUP || true +fi + + rm -f /var/run/memcached.pid + +#DEBHELPER# --- memcached-1.4.13.orig/debian/memcached.default +++ memcached-1.4.13/debian/memcached.default @@ -0,0 +1,2 @@ +# Set this to no to disable memcached. +ENABLE_MEMCACHED=yes --- memcached-1.4.13.orig/debian/changelog +++ memcached-1.4.13/debian/changelog @@ -0,0 +1,379 @@ +memcached (1.4.13-0.1ubuntu2) quantal; urgency=low + + * d/p/start-memcached-fix-hash.patch: Apply patch to allow passing + # as a value for memcached options such as -D to use # as a prefix + delimiter for stats collection. (LP: #1005821) + + -- Clint Byrum Sun, 29 Jul 2012 00:14:09 -0700 + +memcached (1.4.13-0.1ubuntu1) quantal; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Run as 'memcache' user instead of nobody. + - Depend on adduser for preinst/postrm. + - Create user in postinst. + - d/rules: run test suite on build. + - d/patches/50_fix_racey_test.patch: Cherry picked patch from + upstream bug tracker which endeavours to avoid the race condition. + Thanks to Clint Byrum for this fix. + - d/patches/50_add_init_retry.patch: Dropped - superceeded by Debian + patch. + + -- James Page Mon, 28 May 2012 15:21:53 +0100 + +memcached (1.4.13-0.1) unstable; urgency=low + + * Non-maintainer upload. + + Include changes of my previous NMU (filed as #641770 back then) + * Package new upstream release + + this fixes "Please package upstream version 1.4.13" (Closes: #667746) + + enable support for SASL authentication in debian/rules and add + build-dependencies accordingly (Closes: #616148) + + Include support for "-o maxconns_fast" which causes clients not to block + for a long time on busy servers + * Build package with hardened build flags. Thanks to Moritz Muehlenhoff for + providing a patch. Moreover, add a build-dependency for dpkg-dev (>= + 1.15.7) for people considering to make a backport on very old systems + (Closes: #655134) + * Update patches: + + 03_fix_ftbfs4hurd.patch: Refresh hunk offsets, leave changes untouched + + Drop 04_fix_double_fork_in_start-memcached.patch: applied upstream + + Apply patch supplied by Clint Byrum as 04_add_init_retry.patch which + causes start-stop-daemon to wait up to 5 seconds upon termination of + memached (Closes: #659300) + + -- Arno Töll Tue, 08 May 2012 19:24:27 +0200 + +memcached (1.4.13-0ubuntu2) precise; urgency=low + + * Fix FTBFS due to racey test case: + - d/patches/50_fix_racey_test.patch: Cherry picked patch from + upstream bug tracker which endeavours to avoid the race condition. + Thanks to Clint Byrum for this fix. + + -- James Page Wed, 04 Apr 2012 17:21:16 +0100 + +memcached (1.4.13-0ubuntu1) precise; urgency=low + + * New upstream release. + * Refreshed patches + * d/p/50_add_init_retry.patch: use --retry to wait up to 5 seconds + for memcached to die. (LP: #795673) + * d/rules: run test suite on build (LP: #586632) + + -- Clint Byrum Thu, 09 Feb 2012 15:35:15 -0800 + +memcached (1.4.11-0ubuntu1) precise; urgency=low + + * New upstream release + - Fix race condition issue introduced in 1.4.10 + - Multiple other bug fixes + - Initial (beta - API may change) implementation of slab reassingment + + -- Scott Kitterman Sun, 22 Jan 2012 14:12:32 -0500 + +memcached (1.4.10-0ubuntu1) precise; urgency=low + + * New upstream release + - Multiple bug fixes + - General work on performance improvement + - Improvements in speed between 3 and 6 worker threads + + -- Scott Kitterman Tue, 20 Dec 2011 11:10:01 -0500 + +memcached (1.4.9-0ubuntu1) precise; urgency=low + + * New upstream release + - Drop debian/patches/04_fix_double_fork_in_start-memcached.patch since + it is included in this release + + -- Scott Kitterman Tue, 18 Oct 2011 11:16:01 -0400 + +memcached (1.4.7-0.1ubuntu1) oneiric; urgency=low + + * Merge from debian unstable. Remaining changes: + - Run as 'memcache' user instead of nobody (LP #599461) + - Depend on adduser for preinst/postrm + - Create user in postinst + + -- Scott Kitterman Wed, 05 Oct 2011 13:27:39 -0500 + +memcached (1.4.7-0.1) unstable; urgency=low + + * Non-maintainer upload. + * Refresh patches, keep all changed hunks except some changes in + `01_init_script_additions.patch' untouched. + * New upstream release. Closes: + - "FTBFS: memcached.c:1023:16: error: dereferencing type-punned + pointer will break strict-aliasing rules" (Closes: #618096) + - "ftbfs with gcc-4.6 -Werror" (Closes: #625397) + - "FTBFS with libevent 2.0 in experimental" This is actually a duplicate + of #625397 above (Closes: #632764) + - Fix "please package new upstream release" (Closes: #641059) + * Fix "Fix FTBFS on hurd-i386" add proposed patch as + `03_fix_ftbfs4hurd.patch'. Thanks Svante Signell (Closes: #637695) + * Fix "initscript on restart ignore $ENABLE_MEMCACHED" Add a sanity check + to the init script (Closes: #636496) + * Fix "debian/watch doesn't work" Replace the watch file to match the new + Google Code layout (taken from the sinntp package) (Closes: #641520) + * Add `04_fix_double_fork_in_start-memcached.patch'. This patch causes the + start-memcached script to correctly write its PIDFILE, which, in turn, + allows the init script correct operations. This also fixes "status + operation on init.d not working correctly (needs to pass $PIDFILE to + status_of_proc)", however add the $PIDFILE argument additionally none- + theless as suggested (Closes: #622281) + + -- Arno Töll Thu, 15 Sep 2011 12:43:27 +0200 + +memcached (1.4.5-1ubuntu3) oneiric; urgency=low + + * Fix build failure with GCC 4.6 (LP: #829468). + + -- Colin Watson Mon, 22 Aug 2011 14:30:56 +0100 + +memcached (1.4.5-1ubuntu2) natty; urgency=low + + * Cherry-pick patch from upstream to fix FTBFS with gcc 4.5 (LP: #687984) + - Add 03_fix_ftbfs_gcc_45.patch + + -- Felix Geyer Fri, 10 Dec 2010 16:23:30 +0100 + +memcached (1.4.5-1ubuntu1) maverick; urgency=low + + * Run as 'memcache' user instead of nobody (LP: #599461) + * depend on adduser for preinst/postrm + * create user in postinst + + -- Clint Byrum Tue, 29 Jun 2010 06:37:17 -0700 + +memcached (1.4.5-1) unstable; urgency=high + + * New upstream release. Main changes since 1.4.2 are: + New features: + - Support for SASL authentication. + - New script damemtop - a memcached top. + - Slab optimizations. + - New stats, for reclaimed memory and SASL events. + Bugs fixed: + - Malicious input can crash server (CVE-2010-1152). Closes: #579913. + - Fixed several problems with slab handling and growth. + - Provide better error reporting. + - Fix get stats accounting. + - Fixed backwards compatibility with delete 0. + - Documentation fixes. + - Various build fixes, among others, fixed FTBFS with gcc-4.5 (closes: + #565033). + * Refreshed and renamed 01_init_script_compliant_with_LSB.patch. + * Fixed lintian warnings by adding $remote_fs to init.d script. + * Removed non-existent document (doc/memory_management.txt). + * debian/control: Bumped Standards-Version to 3.8.4 (no changes). + * + + -- David Martínez Moreno Wed, 12 May 2010 11:41:22 +0200 + +memcached (1.4.2-1) unstable; urgency=medium + + * New upstream release, primarily bugfixes, some of them critical, hence + the urgency: + - Reject keys larger than 250 bytes in the binary protocol. + - Bounds checking on stats cachedump. + - Binary protocol set+cas wasn't returning a new cas ID. + - Binary quitq didn't actually close the connection + - Slab boundary checking cleanup (bad logic in unreachable code) + - Get hit memory optimizations + - Disallow -t options that cause the server to not work + - Killed off incomplete slab rebalance feature. + * debian/patches: + - 01_init_script_compliant_with_LSB.patch: Remade as upstream applied a + whitespace cleanup script that broke the patch. + - 02_manpage_additions.patch: Added missing parameters to the memcached + manpage. + * Removed TODO from debian/docs. + + -- David Martínez Moreno Fri, 16 Oct 2009 15:09:43 +0200 + +memcached (1.4.1-1) unstable; urgency=high + + * New upstream release (closes: #545883): + - Finally addressed CVE-2009-2415: heap-based buffer overflow in length + processing (closes: #540379). + - Boundary condition during pipelined decoding caused crash. + - Bad initialization during buffer realloc. + - Buffer overrun in stats_prefix_find. + - Other fixes and cleanups. + * Changed the default start to yes in /etc/init.d/memcached as well. + * debian/watch updated with new format and URL in code.google.com. Thanks, + Monty Taylor. + * Added get-orig-source target, thanks to Monty Taylor. + * debian/control: + - Upgraded Standards-Version to 3.8.3 (no changes). + - Added Suggests: libmemcached. + - Bumped debhelper dependency and debian/compat to 6. + - Added Depends on quilt 0.46-7 in order to use dh_quilt_* helpers. + * debian/rules: Added dh_quilt_* helpers. + * Added direct patches to source as quilt patches. + * debian/README.source: Created such file to shut up lintian pedantic. + + -- David Martínez Moreno Fri, 18 Sep 2009 02:43:54 +0200 + +memcached (1.4.0-1) unstable; urgency=low + + * New upstream release (closes: #484301, #537239): + - New binary protocol, supporting CAS (compare-and-swap). + - Non-threaded version is no longer possible, you just choose to run 1 + thread to have similar behaviour. + - Lots of performance bottlenecks fixed (connection starvation, + contention, disabling of CAS, locks for hash table expansion...). + - Lots of new stats. Main change is that stats now are per-slab where + possible. + - Code cleanup, lots of bugs fixed, added tests, enhanced documentation. + + -- David Martínez Moreno Sat, 01 Aug 2009 23:26:45 +0200 + +memcached (1.2.8-2) unstable; urgency=low + + * After some thinking, probably making memcached starting by default is the + right thing to do (closes: #536524). + * Added status support to init.d script (closes: #528689). Thanks, Peter! + * debian/control: Added dependency on lsb-base (>= 3.2-13). + + -- David Martínez Moreno Sat, 11 Jul 2009 00:29:51 +0200 + +memcached (1.2.8-1) unstable; urgency=high + + * New upstream release, urgency=high because of two critical bugs prior + to this release: + - In 1.2.7 under multithreaded mode, memcached would never restart + accepting connections after hitting the maximum connection limit. + - Remove 'stats maps' command, as it is a potential information leak, + usable if versions prior to 1.2.8 ever have buffer overflows discovered + (CVE-2009-1494). Closes: #526554. + - Make -b command (setting the TCP listen backlog) actually work. + * debian/rules: Removed obsolete --disable-static. + + -- David Martínez Moreno Sat, 02 May 2009 19:15:49 +0200 + +memcached (1.2.7-1) unstable; urgency=low + + * New upstream release, released on 4/3/2009. + - New statistics. + - Added -R option. Limit the number of requests processed by a connection + at once. Prevents starving other threads if bulk loading. + - Added -b command for setting the tcp listen backlog. + - Many minor bugfixes. + + -- David Martínez Moreno Sat, 02 May 2009 18:13:39 +0200 + +memcached (1.2.6-1) unstable; urgency=low + + * New upstream release (closes: #505037). Released on 29/7/2008. + - Major crash fixes. + - DTrace support. + - Minor updates. + * debian/memcached.postrm: Now /var/log/memcached.log is removed on purge. + Thanks, jidanni! (closes: #447288). + + -- David Martínez Moreno Sat, 28 Feb 2009 09:43:24 +0000 + +memcached (1.2.5-1) unstable; urgency=low + + * New upstream release, released on 3/2/2008: + - Minor bugfixes. + - Added support for Opensolaris. + - IPv6 support. + - "noreply" mode for many commands. + - Made "out of memory· errors more clear. + - Added eviction/OOM tracking per slab class. + + -- David Martínez Moreno Fri, 27 Feb 2009 10:48:14 +0000 + +memcached (1.2.4-1) unstable; urgency=low + + * New upstream release (closes: #454699). Released on 6/12/2007: + - Many bug and platform fixes since 1.2.2. + - New threading support for stat queries. + - New commands 'append', 'prepend', 'gets', and 'cas'. + - Updates to the manpage (closes: #441067). + - Now memcached has a flag -a to restrict the socket to a group (closes: + #446606). + * debian/rules: Added memcached-tool to the set of installed scripts. + Thanks, Cyril! (closes: #512400). + + -- David Martínez Moreno Thu, 26 Feb 2009 12:07:03 +0000 + +memcached (1.2.3-1) unstable; urgency=low + + * Take over memcached package. + * New upstream release. Mostly a documentation and warning fixing release. + This one was released on 6/7/2007. + * Added an /etc/default/memcached, thanks to Mark Ferlatte (closes: + #467356). + * debian/rules: Added --enable-threads to configure. It's amazing how this + could be missing from mainstream packages in Debian. + * debian/control: + - Put myself as Maintainer. + - Added Homepage field. + - Bumped Standards-Version to 3.8.0. + - Added ${misc:Depends} to Depends line. + * debian/copyright: Added a lot of information. + * debian/memcached.post{inst,rm}: Added set -e in order to catch errors. + + -- David Martínez Moreno Thu, 26 Feb 2009 09:51:46 +0000 + +memcached (1.2.2-1) unstable; urgency=low + + * New upstream release + + -- Jay Bonci Fri, 29 Jun 2007 10:18:03 -0400 + +memcached (1.2.1-1) unstable; urgency=low + + * New upstream release (Closes: #405054) + * Fix to logfile output so logrotate will work (Closes: #417941) + * Listen in on localhost by default (Closes: #383660) + * Default configuration suggests nobody by default (Closes: #391351) + * Bumped policy version to 3.7.2.2 (No other changes) + + -- Jay Bonci Wed, 02 May 2007 11:35:42 -0400 + +memcached (1.1.12-1) unstable; urgency=low + + * New upstream version + * Updates watchfile so uupdate will work + + -- Jay Bonci Mon, 11 Apr 2005 11:54:39 -0400 + +memcached (1.1.11-3) unstable; urgency=low + + * Rebuild against non-broken libevent + + -- Jay Bonci Fri, 18 Feb 2005 09:11:55 -0500 + +memcached (1.1.11-2) unstable; urgency=low + + * Adds debian/watch file so uscan will work + * Added additional paragraph to debian/control (Closes: #262069) + + -- Jay Bonci Wed, 27 Oct 2004 13:49:22 -0400 + +memcached (1.1.11-1) unstable; urgency=low + + * New upstream version + * Fix silly typo that kept daemon from running as www-data (Closes: #239854) + - Thanks to Karaszi Istvan for the report + * Fix to reopen fds as the logfile, adds logfile support (Closes: #243522) + + -- Jay Bonci Wed, 5 May 2004 17:25:25 -0400 + +memcached (1.1.10-1) unstable; urgency=low + + * New upstream version + + -- Jay Bonci Wed, 31 Dec 2003 10:01:27 -0500 + +memcached (1.1.9-1) unstable; urgency=low + + * Initial Release (Closes: #206268). + + -- Jay Bonci Wed, 15 Oct 2003 15:53:51 -0400 + --- memcached-1.4.13.orig/debian/compat +++ memcached-1.4.13/debian/compat @@ -0,0 +1 @@ +6 --- memcached-1.4.13.orig/debian/memcached.dirs +++ memcached-1.4.13/debian/memcached.dirs @@ -0,0 +1,4 @@ +etc/ +usr/share/doc/memcached +usr/share/memcached/scripts +usr/bin --- memcached-1.4.13.orig/debian/README.Debian +++ memcached-1.4.13/debian/README.Debian @@ -0,0 +1,14 @@ +Memcached has two logical uses in this package, a system daemon that can be run +from the standard /etc/init.d/ interface, or one that can be run from userland +from a the command line such as + /usr/bin/memcached -d + +The former has been setup to run through the start-memcached script, reading in +the configuration from /etc/memcached.conf. The start-memcached script ignores +certain parameters as discussed in the configuration file itself. + +The latter is the binary as provided by Danga, and reads in options from the +command line, ignoring the Debian-specific configuration file entirely. + + --Jay Bonci + jaybonci@debian.org --- memcached-1.4.13.orig/debian/memcached.manpages +++ memcached-1.4.13/debian/memcached.manpages @@ -0,0 +1 @@ +doc/memcached.1 --- memcached-1.4.13.orig/debian/memcached.conf +++ memcached-1.4.13/debian/memcached.conf @@ -0,0 +1,47 @@ +# memcached default config file +# 2003 - Jay Bonci +# This configuration file is read by the start-memcached script provided as +# part of the Debian GNU/Linux distribution. + +# Run memcached as a daemon. This command is implied, and is not needed for the +# daemon to run. See the README.Debian that comes with this package for more +# information. +-d + +# Log memcached's output to /var/log/memcached +logfile /var/log/memcached.log + +# Be verbose +# -v + +# Be even more verbose (print client commands as well) +# -vv + +# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default +# Note that the daemon will grow to this size, but does not start out holding this much +# memory +-m 64 + +# Default connection port is 11211 +-p 11211 + +# Run the daemon as root. The start-memcached will default to running as root if no +# -u command is present in this config file +-u memcache + +# Specify which IP address to listen on. The default is to listen on all IP addresses +# This parameter is one of the only security measures that memcached has, so make sure +# it's listening on a firewalled interface. +-l 127.0.0.1 + +# Limit the number of simultaneous incoming connections. The daemon default is 1024 +# -c 1024 + +# Lock down all paged memory. Consult with the README and homepage before you do this +# -k + +# Return error when memory is exhausted (rather than removing items) +# -M + +# Maximize core file limit +# -r --- memcached-1.4.13.orig/debian/control +++ memcached-1.4.13/debian/control @@ -0,0 +1,29 @@ +Source: memcached +Section: web +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: David Martínez Moreno +Build-Depends: debhelper (>= 6), libevent-dev, quilt (>= 0.46-7), libsasl2-dev, + dpkg-dev (>= 1.15.7) +Homepage: http://www.danga.com/memcached/ +Standards-Version: 3.8.4 + +Package: memcached +Architecture: any +Depends: ${shlibs:Depends}, perl, ${misc:Depends}, lsb-base (>= 3.2-13) + , adduser +Suggests: libcache-memcached-perl, libmemcached +Description: A high-performance memory object caching system + Danga Interactive developed memcached to enhance the speed of LiveJournal.com, + a site which was already doing 20 million+ dynamic page views per day for 1 + million users with a bunch of webservers and a bunch of database servers. + memcached dropped the database load to almost nothing, yielding faster page + load times for users, better resource utilization, and faster access to the + databases on a memcache miss. + . + memcached optimizes specific high-load serving applications that are designed + to take advantage of its versatile no-locking memory access system. Clients + are available in several different programming languages, to suit the needs + of the specific application. Traditionally this has been used in mod_perl + apps to avoid storing large chunks of data in Apache memory, and to share + this burden across several machines. --- memcached-1.4.13.orig/debian/rules +++ memcached-1.4.13/debian/rules @@ -0,0 +1,104 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +PACKAGE=memcached +PKGBASE=debian/$(PACKAGE)/usr/share/memcached/ +SCRIPTS=$(PKGBASE)/scripts + +CFLAGS = `dpkg-buildflags --get CFLAGS` +CFLAGS += -Wall +LDFLAGS = `dpkg-buildflags --get LDFLAGS` +CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +get-orig-source: + uscan --verbose --force-download --rename --repack --destdir=.. + +config.status: configure + dh_testdir + CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --enable-sasl + +build: build-stamp + +build-stamp: config.status + dh_quilt_patch + dh_testdir + + $(MAKE) + dh_auto_test + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp config.log + rm -f debian/memcached.init + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + + dh_quilt_unpatch + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/memcached. + $(MAKE) install DESTDIR=$(CURDIR)/debian/memcached + #install -d $(CURDIR)/$(PKGBASE) + install -m 644 $(CURDIR)/debian/memcached.conf $(CURDIR)/$(PKGBASE)/memcached.conf.default + #install -d $(SCRIPTS) + install -m 744 $(CURDIR)/scripts/start-memcached $(SCRIPTS) + install -m 744 $(CURDIR)/scripts/memcached-tool $(SCRIPTS) + install -m 755 $(CURDIR)/scripts/memcached-init $(CURDIR)/debian/memcached.init + + +# Build architecture-independent files here. +binary-indep:; +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_install + dh_installdebconf + dh_installinit + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- memcached-1.4.13.orig/debian/copyright +++ memcached-1.4.13/debian/copyright @@ -0,0 +1,58 @@ +This package was debianized by Jay Bonci on +Wed, 15 Oct 2003 15:53:51 -0400. + +It was downloaded from http://www.danga.com/memcached + +Upstream authors: Brad Fitzpatrick and Danga Interactive + +Copyright: + +memcached is (C) Danga Interactive 2003-2007 + +This product includes software developed by Niels Provos (libevent). + +libevent is copyright 2000-2003 Niels Provos +All rights reserved. + +autotools code is Copyright (C) 1992-2007 Free Software Foundation, Inc. + + +License: + +The memcached server is licensed under the BSD-style license. The full text of +that license may be found on a Debian GNU/Linux system in: + +/usr/share/common-licenses/BSD + +autotools code is licensed under GNU Public License. You may find a copy of this +license in a Debian GNU/Linux system in: + +/usr/share/common-licenses/GPL + + +For libevent: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by Niels Provos. +4. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- memcached-1.4.13.orig/debian/watch +++ memcached-1.4.13/debian/watch @@ -0,0 +1,5 @@ +version=3 +opts=\ +downloadurlmangle=s|.*[?]name=(.*?)&.*|http://memcached.googlecode.com/files/$1|,\ +filenamemangle=s|[^/]+[?]name=(.*?)&.*|$1| \ +http://code.google.com/p/memcached/downloads/detail[?]name=memcached-([0-9.]+).tar.gz&.* --- memcached-1.4.13.orig/debian/patches/04_add_init_retry.patch +++ memcached-1.4.13/debian/patches/04_add_init_retry.patch @@ -0,0 +1,31 @@ +Author: Clint Byrum +Description: Uses --retry to wait up to 5 seconds for the killed process to die. +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/795673 +Bug: http://code.google.com/p/memcached/issues/detail?id=250 +Forwarded: yes, http://code.google.com/p/memcached/issues/detail?id=250 + +Index: memcached/scripts/memcached-init +=================================================================== +--- memcached.orig/scripts/memcached-init 2012-02-09 15:07:20.834152608 -0800 ++++ memcached/scripts/memcached-init 2012-02-09 15:22:44.424307457 -0800 +@@ -92,7 +92,7 @@ + ;; + stop) + echo -n "Stopping $DESC: " +- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON ++ start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile $PIDFILE --exec $DAEMON + echo "$NAME." + rm -f $PIDFILE + ;; +@@ -104,10 +104,9 @@ + # just the same as "restart". + # + echo -n "Restarting $DESC: " +- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE ++ start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile $PIDFILE + rm -f $PIDFILE + if [ $ENABLE_MEMCACHED = yes ]; then +- sleep 1 + start-stop-daemon --start --quiet --exec "$DAEMONBOOTSTRAP" -- /etc/${NAME}.conf $PIDFILE + echo "$NAME." + else --- memcached-1.4.13.orig/debian/patches/60_fix_racey_test.patch +++ memcached-1.4.13/debian/patches/60_fix_racey_test.patch @@ -0,0 +1,32 @@ +Description: Avoid race condition in test by re-trying up to 5 times +Author: Clint Byrum +Origin: http://code.google.com/p/memcached/issues/detail?id=252 + +Index: memcached/testapp.c +=================================================================== +--- memcached.orig/testapp.c 2012-04-04 17:19:28.610145255 +0100 ++++ memcached/testapp.c 2012-04-04 17:29:03.231682461 +0100 +@@ -382,8 +382,8 @@ + if (daemon) { + /* loop and wait for the pid file.. There is a potential race + * condition that the server just created the file but isn't +- * finished writing the content, but I'll take the chance.... +- */ ++ * finished writing the content, so we loop a few times ++ * reading as well */ + while (access(pid_file, F_OK) == -1) { + usleep(10); + } +@@ -394,7 +394,11 @@ + strerror(errno)); + assert(false); + } +- assert(fgets(buffer, sizeof(buffer), fp) != NULL); ++ ++ /* Avoid race by retrying 20 times */ ++ for (int x = 0; x < 20 && fgets(buffer, sizeof(buffer), fp) == NULL; x++) { ++ usleep(10); ++ } + fclose(fp); + + int32_t val; --- memcached-1.4.13.orig/debian/patches/01_init_script_additions.patch +++ memcached-1.4.13/debian/patches/01_init_script_additions.patch @@ -0,0 +1,120 @@ +--- a/scripts/memcached-init ++++ b/scripts/memcached-init +@@ -1,14 +1,14 @@ + #! /bin/bash +-### BEGIN INIT INFO +-# Provides: memcached +-# Required-Start: $syslog +-# Required-Stop: $syslog +-# Should-Start: $local_fs +-# Should-Stop: $local_fs +-# Default-Start: 2 3 4 5 +-# Default-Stop: 0 1 6 +-# Short-Description: memcached - Memory caching daemon +-# Description: memcached - Memory caching daemon ++### BEGIN INIT INFO ++# Provides: memcached ++# Required-Start: $remote_fs $syslog ++# Required-Stop: $remote_fs $syslog ++# Should-Start: $local_fs ++# Should-Stop: $local_fs ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 ++# Short-Description: Start memcached daemon ++# Description: Start up memcached, a high-performance memory caching daemon + ### END INIT INFO + + # Usage: +@@ -35,6 +35,13 @@ + + set -e + ++. /lib/lsb/init-functions ++ ++# Edit /etc/default/memcached to change this. ++ENABLE_MEMCACHED=no ++test -r /etc/default/memcached && . /etc/default/memcached ++ ++ + FILES=(/etc/memcached_*.conf) + # check for alternative config schema + if [ -r "${FILES[0]}" ]; then +@@ -74,37 +81,47 @@ + PIDFILE="/var/run/${NAME}.pid" + + case "$1" in +- start) +- echo -n "Starting $DESC: " +- start-stop-daemon --start --quiet --exec "$DAEMONBOOTSTRAP" -- /etc/${NAME}.conf $PIDFILE +- echo "$NAME." +- ;; +- stop) +- echo -n "Stopping $DESC: " +- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON +- echo "$NAME." +- rm -f $PIDFILE +- ;; +- +- restart|force-reload) +- # +- # If the "reload" option is implemented, move the "force-reload" +- # option to the "reload" entry above. If not, "force-reload" is +- # just the same as "restart". +- # +- echo -n "Restarting $DESC: " +- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE +- rm -f $PIDFILE +- sleep 1 +- start-stop-daemon --start --quiet --exec "$DAEMONBOOTSTRAP" -- /etc/${NAME}.conf $PIDFILE +- echo "$NAME." +- ;; +- *) +- N=/etc/init.d/$NAME +- # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 +- echo "Usage: $N {start|stop|restart|force-reload}" >&2 +- exit 1 +- ;; ++ start) ++ echo -n "Starting $DESC: " ++ if [ $ENABLE_MEMCACHED = yes ]; then ++ start-stop-daemon --start --quiet --exec "$DAEMONBOOTSTRAP" -- /etc/${NAME}.conf $PIDFILE ++ echo "$NAME." ++ else ++ echo "$NAME disabled in /etc/default/memcached." ++ fi ++ ;; ++ stop) ++ echo -n "Stopping $DESC: " ++ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON ++ echo "$NAME." ++ rm -f $PIDFILE ++ ;; ++ ++ restart|force-reload) ++ # ++ # If the "reload" option is implemented, move the "force-reload" ++ # option to the "reload" entry above. If not, "force-reload" is ++ # just the same as "restart". ++ # ++ echo -n "Restarting $DESC: " ++ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE ++ rm -f $PIDFILE ++ if [ $ENABLE_MEMCACHED = yes ]; then ++ sleep 1 ++ start-stop-daemon --start --quiet --exec "$DAEMONBOOTSTRAP" -- /etc/${NAME}.conf $PIDFILE ++ echo "$NAME." ++ else ++ echo "$NAME disabled in /etc/default/memcached." ++ fi ++ ;; ++ status) ++ status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? ++ ;; ++ *) ++ N=/etc/init.d/$NAME ++ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 ++ exit 1 ++ ;; + esac + done; + --- memcached-1.4.13.orig/debian/patches/03_fix_ftbfs4hurd.patch +++ memcached-1.4.13/debian/patches/03_fix_ftbfs4hurd.patch @@ -0,0 +1,48 @@ +Description: Replace unconditional use of PATH_MAX + The patch below fixes an unconditional use of PATH_MAX which causes the + GNU/Hurd platform to fail to build from source the memcached package. +Forwarded: no +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637695 +Author: Svante Signell +Reviewed-by: Arno Töll +Last-Update: 2011-09-15 + +Index: memcached/memcached.c +=================================================================== +--- memcached.orig/memcached.c 2012-02-09 13:52:15.242054000 -0800 ++++ memcached/memcached.c 2012-02-09 13:53:59.891412592 -0800 +@@ -49,7 +49,7 @@ + + /* FreeBSD 4.x doesn't have IOV_MAX exposed. */ + #ifndef IOV_MAX +-#if defined(__FreeBSD__) || defined(__APPLE__) ++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__GNU__) + # define IOV_MAX 1024 + #endif + #endif +@@ -5161,12 +5161,15 @@ + /* create the listening socket, bind it, and init */ + if (settings.socketpath == NULL) { + const char *portnumber_filename = getenv("MEMCACHED_PORT_FILENAME"); +- char temp_portnumber_filename[PATH_MAX]; ++ char *temp_portnumber_filename = NULL; ++ size_t len; + FILE *portnumber_file = NULL; + + if (portnumber_filename != NULL) { ++ len = strlen(portnumber_filename)+4+1; ++ temp_portnumber_filename = malloc(len); + snprintf(temp_portnumber_filename, +- sizeof(temp_portnumber_filename), ++ len, + "%s.lck", portnumber_filename); + + portnumber_file = fopen(temp_portnumber_filename, "a"); +@@ -5201,6 +5204,7 @@ + if (portnumber_file) { + fclose(portnumber_file); + rename(temp_portnumber_filename, portnumber_filename); ++ free(temp_portnumber_filename); + } + } + --- memcached-1.4.13.orig/debian/patches/series +++ memcached-1.4.13/debian/patches/series @@ -0,0 +1,6 @@ +01_init_script_additions.patch +02_manpage_additions.patch +03_fix_ftbfs4hurd.patch +04_add_init_retry.patch +60_fix_racey_test.patch +start-memcached-fix-hash.patch --- memcached-1.4.13.orig/debian/patches/02_manpage_additions.patch +++ memcached-1.4.13/debian/patches/02_manpage_additions.patch @@ -0,0 +1,56 @@ +--- a/doc/memcached.1 ++++ b/doc/memcached.1 +@@ -1,4 +1,4 @@ +-.TH MEMCACHED 1 "April 11, 2005" ++.TH MEMCACHED 1 "October 16, 2009" + .SH NAME + memcached \- high-performance memory object caching system + .SH SYNOPSIS +@@ -95,29 +95,39 @@ + Be even more verbose; same as \-v but also print client commands and + responses. + .TP ++.B \-vvv ++Be extremely verbose; same of the above and also print internal state transitions. ++.TP + .B \-i + Print memcached and libevent licenses. + .TP ++.B \-I ++Override the size of each slab page in bytes. In mundane words, it adjusts the ++maximum item size that memcached will accept. You can use the suffixes \fBK\fR and ++\fBM\fR to specify the size as well, so use 2000000 or 2000K or 2M if you want a ++maximum size of 2 MB per object. It is not recommended to raise this limit above ++1 MB due just to performance reasons. The default value is 1 MB. ++.TP + .B \-P + Print pidfile to , only used under \-d option. + .TP + .B \-t +-Number of threads to use to process incoming requests. This option is only +-meaningful if memcached was compiled with thread support enabled. It is ++Number of threads to use to process incoming requests. It is + typically not useful to set this higher than the number of CPU cores on the +-memcached server. The default is 4. ++memcached server. Setting a high number (64 or more) of worker ++threads is not recommended. The default is 4. + .TP + .B \-D +-Use as the delimiter between key prefixes and IDs. This is used for +-per-prefix stats reporting. The default is ":" (colon). If this option is ++Use as the delimiter between key prefixes and IDs. This is used for ++per-prefix stats reporting. The default is ":" (colon). If this option is + specified, stats collection is turned on automatically; if not, then it may + be turned on by sending the "stats detail on" command to the server. + .TP + .B \-L +-Try to use large memory pages (if available). Increasing the memory page size +-could reduce the number of TLB misses and improve the performance. In order to ++Try to use large memory pages (if available). Increasing the memory page size ++could reduce the number of TLB misses and improve the performance. In order to + get large pages from the OS, memcached will allocate the total item-cache in +-one large chunk. Only available if supported on your OS. ++one large chunk. Only available if supported on your OS. + .TP + .B \-B + Specify the binding protocol to use. By default, the server will --- memcached-1.4.13.orig/debian/patches/start-memcached-fix-hash.patch +++ memcached-1.4.13/debian/patches/start-memcached-fix-hash.patch @@ -0,0 +1,18 @@ +Author: kamil.swiatkowski@gmail.com +Description: fixes using # in /etc/memcached.conf as a value for options +Bug: http://code.google.com/p/memcached/issues/detail?id=283 +Bug-Ubuntu: http://pad.lv/1005821 +Forwarded: yes + +--- a/scripts/start-memcached 2012-04-04 18:49:46.000000000 +0200 ++++ b/scripts/start-memcached 2012-05-29 11:13:28.181568485 +0200 +@@ -62,7 +62,7 @@ + foreach my $line (<$etchandle>) + { + $line ||= ""; +- $line =~ s/\#.*//g; ++ $line =~ s/^\s*\#.*//g; + $line =~ s/\s+$//g; + $line =~ s/^\s+//g; + next unless $line; +