diff options
author | Matthew Thode <prometheanfire@gentoo.org> | 2013-12-23 00:56:17 +0000 |
---|---|---|
committer | Matthew Thode <prometheanfire@gentoo.org> | 2013-12-23 00:56:17 +0000 |
commit | 5eb1a3d325c50bded8746fe3c1e7616771d08721 (patch) | |
tree | 3f66b950cdfadb88f4208466fd66377f25ca3234 /net-misc/memcached | |
parent | [QA] Remove unused files. (diff) | |
download | gentoo-2-5eb1a3d325c50bded8746fe3c1e7616771d08721.tar.gz gentoo-2-5eb1a3d325c50bded8746fe3c1e7616771d08721.tar.bz2 gentoo-2-5eb1a3d325c50bded8746fe3c1e7616771d08721.zip |
update to 1.4.17 and eapi5 and bug 493036
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
Diffstat (limited to 'net-misc/memcached')
-rw-r--r-- | net-misc/memcached/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/memcached/files/1.3.3/init | 1 | ||||
-rw-r--r-- | net-misc/memcached/files/memcached.confd | 40 | ||||
-rw-r--r-- | net-misc/memcached/files/memcached.init | 93 | ||||
-rw-r--r-- | net-misc/memcached/memcached-1.4.17.ebuild | 79 |
5 files changed, 219 insertions, 2 deletions
diff --git a/net-misc/memcached/ChangeLog b/net-misc/memcached/ChangeLog index f994d03d71dc..f386d7a91c85 100644 --- a/net-misc/memcached/ChangeLog +++ b/net-misc/memcached/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/memcached # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/ChangeLog,v 1.133 2013/12/22 13:47:35 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/ChangeLog,v 1.134 2013/12/23 00:56:17 prometheanfire Exp $ + +*memcached-1.4.17 (23 Dec 2013) + + 23 Dec 2013; Matthew Thode <prometheanfire@gentoo.org> +files/memcached.confd, + +files/memcached.init, +memcached-1.4.17.ebuild, files/1.3.3/init: + update to 1.4.17 and eapi5 and bug 493036 22 Dec 2013; Agostino Sarubbo <ago@gentoo.org> memcached-1.4.13-r1.ebuild: Stable for ppc64, wrt bug #485644 diff --git a/net-misc/memcached/files/1.3.3/init b/net-misc/memcached/files/1.3.3/init index facaf5cc64a6..e10adbd73518 100644 --- a/net-misc/memcached/files/1.3.3/init +++ b/net-misc/memcached/files/1.3.3/init @@ -1,5 +1,4 @@ #!/sbin/runscript -# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.3.3/init,v 1.3 2012/12/23 18:05:21 robbat2 Exp $ CONF="${SVCNAME#*.}" CONFBASE="/etc/conf.d/memcached" diff --git a/net-misc/memcached/files/memcached.confd b/net-misc/memcached/files/memcached.confd new file mode 100644 index 000000000000..886f779aed40 --- /dev/null +++ b/net-misc/memcached/files/memcached.confd @@ -0,0 +1,40 @@ +# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+# Specify memory usage in megabytes (do not use letters)
+# 64MB is default
+MEMUSAGE="64"
+
+# User to run as
+MEMCACHED_RUNAS="memcached"
+
+# Specify maximum number of concurrent connections
+# 1024 is default
+MAXCONN="1024"
+
+# Listen for connections on what address?
+# If this is empty, memcached will listen on 0.0.0.0
+# be sure you have a firewall in place!
+LISTENON=""
+
+# Listen for connections on what port?
+PORT="11211"
+
+# Listen for UDP connecitons on what port? 0 means turn off UDP
+UDPPORT="${PORT}"
+
+# PID file location
+# '-${PORT}.${CONF}.pid' will be appended to this!
+# You do not normally need to change this.
+PIDBASE="/var/run/memcached/memcached"
+
+# Socket to listen on
+#SOCKET="/var/run/memcached/memcached.sock"
+
+# Socket mask
+# 0700 is default
+#SOCKET_MASK="0700"
+
+# Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/memcached.init b/net-misc/memcached/files/memcached.init new file mode 100644 index 000000000000..4d16a36de2a6 --- /dev/null +++ b/net-misc/memcached/files/memcached.init @@ -0,0 +1,93 @@ +#!/sbin/runscript
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/run/memcached/memcached"
+[ "${CONF}" == "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+ PIDFILE="${PIDBASE}.${CONF}.pid"
+ CONFSRC="${CONFBASE}.${CONF}"
+ if [ -f "${CONFSRC}" ]; then
+ source "${CONFSRC}"
+ else
+ eerror "The configuration file $CONFSRC was not found!"
+ fi
+else
+ PIDFILE="${PIDBASE}.pid"
+ CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+ if [ -z "${SOCKET}" ]; then
+ need net
+ fi
+ # per bug #269022, accurate time is important for memcached!
+ # We include the full list of ways it might be set on boot.
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ] && [ -z "${SOCKET}" ]; then
+ ewarn "You should edit $CONFSRC and specify an address or socket to listen on."
+ ewarn "Listening on any address (check your firewall!)"
+ fi
+}
+
+start() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Starting memcached (${CONF})"
+ else
+ ebegin "Starting memcached"
+ fi
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f "${PIDFILE}" ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f "${PIDFILE}" 1>/dev/null
+ fi
+
+
+ if [ -n "${SOCKET}" ]; then
+ CONNECTION="-s ${SOCKET}"
+
+ if [ -n "${SOCKET_MASK}" ]; then
+ CONNECTION="${CONNECTION} -a ${SOCKET_MASK}"
+ fi
+ else
+ CONNECTION="-p ${PORT} -U ${UDPPORT}"
+
+ if [ -n "${LISTENON}" ]; then
+ CONNECTION="${CONNECTION} -l ${LISTENON}"
+ fi
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+ --exec "${MEMCACHED_BINARY}" -- \
+ -d ${CONNECTION} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+ ${MISC_OPTS}
+
+ eend $?
+}
+
+stop() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Stopping memcached (${CONF})"
+ else
+ ebegin "Stopping memcached"
+ fi
+
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+
+ rm -f "${PIDFILE}"
+
+ eend $?
+}
diff --git a/net-misc/memcached/memcached-1.4.17.ebuild b/net-misc/memcached/memcached-1.4.17.ebuild new file mode 100644 index 000000000000..f7d1146102c2 --- /dev/null +++ b/net-misc/memcached/memcached-1.4.17.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/memcached-1.4.17.ebuild,v 1.1 2013/12/23 00:56:17 prometheanfire Exp $ + +EAPI=5 +inherit eutils autotools flag-o-matic + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://code.google.com/p/memcached/" +SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="test slabs-reassign debug sasl" # hugetlbfs later + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl + sasl? ( dev-libs/cyrus-sasl )" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" + # Handled different upstream + #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch" + epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch" + epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch" + sed -i -e 's,-Werror,,g' configure.ac || die "sed failed" + eautoreconf + use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN +} + +src_configure() { + econf \ + --disable-docs \ + $(use_enable sasl) + # The xml2rfc tool to build the additional docs requires TCL :-( + # `use_enable doc docs` +} + +src_compile() { + # There is a heavy degree of per-object compile flags + # Users do NOT know better than upstream. Trying to compile the testapp and + # the -debug version with -DNDEBUG _WILL_ fail. + append-flags -UNDEBUG -pthread + emake testapp memcached-debug CFLAGS="${CFLAGS}" + filter-flags -UNDEBUG + emake +} + +src_install() { + emake DESTDIR="${D}" install + dobin scripts/memcached-tool + use debug && dobin memcached-debug + + dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}/memcached.confd" memcached + newinitd "${FILESDIR}/memcached.init" memcached +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you should create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test +} |