diff options
author | Stuart Shelton <stuart@shelton.me> | 2017-11-02 00:02:36 +0000 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2017-11-02 00:02:36 +0000 |
commit | d1f8ede3cb43be92a87c918eb36bc00f071c6089 (patch) | |
tree | 5c993afd0f3aececfe4c778c771a9b74f90d1245 /dev-db | |
parent | Add dev-lang/python-2.7.14 (diff) | |
download | srcshelton-d1f8ede3cb43be92a87c918eb36bc00f071c6089.tar.gz srcshelton-d1f8ede3cb43be92a87c918eb36bc00f071c6089.tar.bz2 srcshelton-d1f8ede3cb43be92a87c918eb36bc00f071c6089.zip |
Add dev-db/redis-4.0.2-r1
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/redis/Manifest | 6 | ||||
-rw-r--r-- | dev-db/redis/files/redis-4.0.1-shared.patch | 32 | ||||
-rw-r--r-- | dev-db/redis/files/redis-4.0.1-sharedlua.patch | 60 | ||||
-rw-r--r-- | dev-db/redis/files/redis.confd-r1 | 20 | ||||
-rw-r--r-- | dev-db/redis/files/redis.initd-5 | 25 | ||||
-rw-r--r-- | dev-db/redis/redis-4.0.2-r1.ebuild | 132 |
6 files changed, 275 insertions, 0 deletions
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest index 42ec34ce..21b7be18 100644 --- a/dev-db/redis/Manifest +++ b/dev-db/redis/Manifest @@ -2,9 +2,15 @@ AUX configure.ac-3.2 1882 SHA256 abc988876ec5e00afec596ff27430403a248805fe5872db AUX redis-3.2.3-config.patch 1495 SHA256 48988330395b43a7551e7a285f597a4052b50e17616d5ea7763daa561d184149 SHA512 d71c918ea4952ecb55cc4c87649745ee468587c289d60bd1bee87a2948a6e882d42afe36bb113392b5aaab17d315732cabfc472804204d3a043305a5488a4124 WHIRLPOOL 1360d39ba816e9cc6adefff587f7773743250a518bf3351c0afa6e94aaa394710ef3de0a6deea3fe15d54ae506d5abdb02795d9bcb19b445408ffef3e67951e1 AUX redis-3.2.3-sharedlua.patch 2535 SHA256 0056ddcb8552da5ce424d0f016fabafbff552734e632377403521f611f667bcf SHA512 4b60271a24a27f69292450575f9316dd009e154980db2b70d7035794bc1f332fe54957558037c75de625d1eaf98cc0f1ec02fcd0ef510c86a3c605c474c1117e WHIRLPOOL 672185942783ccd8d5c635a8d8d2aec839ff68770b42d7acd8cd059aa046b2b5550164564a6b63696cfb4e4bcb31fc04de2b427ca7dcd85f3dfe2806207a457d AUX redis-3.2.5-shared.patch 754 SHA256 008cd244b40d6a3bef804a6aa30c4592a7ad8480ea1358112071f079ed284d47 SHA512 dcb0755a0cc24b4dc21c7a20891df5fa0c643beb8f411779548893ac9681c41510ecba79b0ba031d7eeeccbf5b15ae32be04241b197524de4f8f9aafa02ccaab WHIRLPOOL be653deb553aa59102ea6af2c7870b90f0b9d2f989aee677bb6e9e81b89ce818e49484fba83d813cf0902c714da42ec6dd86a8daa20c32e50bdb65c8b8b8eaec +AUX redis-4.0.1-shared.patch 866 SHA256 d0b6186ddbe0f7912405e06c01987d5fbbcb4ea2759b93cbf4ea44ab6df6ad72 SHA512 f58ae83d3370949187325b1f1f75feb7d85d3112ae65e7cd330d193490c42aa6288f05cd4d2309dbde5d32015a067ec831255a3dab937cd0889970c8eecfb3f1 WHIRLPOOL 3601bf1a7e743819e8191a19639d62dec8e929c15b2010d82b2b109605eb7997f36d9c15ba8e3778640dbced8e23637c0c03ae6385308e4c02c6eac64a4ac556 +AUX redis-4.0.1-sharedlua.patch 2568 SHA256 76a14354c456cdcb50507392d34a6b126706fd9780e38ded66eecd420dfdf8a3 SHA512 c7c08b67c09425876da513bbeb52667fe5917b56a43749a914dac356fa37c091b696765eabca100f2506cf461107abdbf22bce075879a8aa82a0e8d54f696fee WHIRLPOOL b15f8c5c57a6da05577894a7bd8eb7bcca420184d0c80435fbaa884d23f125de6d9b6bcb93ec4c6ab7409d2fc878906dcbc988551105d8958d3aa6aef350a475 AUX redis.confd 450 SHA256 8c68e29dc88c8ad99b9212a448d313d1406ef02c7638398b2e48ea1ca8aa937b SHA512 c6347cc6e17e9ce93fd081608b19c4977c3e1ffd58d2a417804ca3e647967800ac11859bd05d5437c36310dcd7552c11f35965e4521c5266c3414387d4796a6b WHIRLPOOL 72fb07431293f0e382af98c5a0b7eeca146cab84153befdd808328aa27404cd74d55d524b5442ad10de5989917351299bc7610e0be75d11d2e31fb5353beb45a +AUX redis.confd-r1 511 SHA256 d995e4b96a4e11e8012edd470288f9b48b87b5a144a357bbaedd411c9bb1329d SHA512 f041e6b1da2c579a7dcf40e411ff47bc4675e5931e04f4353888ed5864b7e0c94d53fc98faee982c65a69d0154ee1f624fbadbbcc3a324aec583eefee6fb7133 WHIRLPOOL e819dddfbfe2730a30e1d85b85a68908abe573788b2ef13fb73d2e0e561c22845e2e564643ee93a76df2f22508280de753fc8f4708b23436d3599dd70d478635 AUX redis.initd-4 784 SHA256 0f08a89833ec63278efd20b71d3cde80d4b9de9f51b97584309a206d131aa018 SHA512 025981d95bb28e3838aab5d86ae75524d5901515543c1640aa0e2d7a48d3583f433e103f2389fa05329da697d2d9779212946a8fa2d7c413178cd0ccbd57b23a WHIRLPOOL a76acd65375f45626cc86a68621b468c10bebadbc89078fb07df3dc276bc9c5ab249da21480dbff98d34ab2bb97507cf4cedb0e87e55d8678a56b70bf71088c6 +AUX redis.initd-5 700 SHA256 3f4b94e4051019c54a3e44c96716e2e94027d1ac89ce957e17917b36b5e4cbc9 SHA512 e72d6d7106d46da0020f23edd1060d3cf887cb9c06fbeaa5c04f97c10481ca5fe2c2e3eea70b6c58a20b99df5f57339196116ae3f1ddc46b485a0cd9280fa7ae WHIRLPOOL 28f8a832fb34f0c094a4b903a2bfbd6d7cf47b891d7430d69c9755ede8b35f58ea4411c68f8ab1a47d0e15ec639c1f67fe3243c7a8efed79c00bfbf3d17e0959 AUX redis.service-2 253 SHA256 e65ec7fdac98f30fb72ab73656e4467e74c8900d2664cba64d9baf9e16eaee1b SHA512 b42b73bb54ccc0d16adafb91aabe010092f548ec7979d8a0ed1c4563d9fca378eeb74c0c556f7565a32199ed30ca8a13d6b610d9cda39fd23da1428a410f62cc WHIRLPOOL e2b041b37bf95cbe4ed6684238034497c971352db602a86adbb5ef0626967b4ab20dd9ae412c0cae009a8470e502426b0135e4c676858c11d6e10c97a677baee AUX redis.tmpfiles 61 SHA256 68e4c7e3159068400cbc7d07e84b5618f9d829dc7a4f18253783c6256a53031a SHA512 741ff5a4df5b04e7af4e81357812bf5b6cf992bc18b6052074aef134401d0a92703a2e41f52966012c05ea80fac5636435c8d3e6ed55e62a5711526ba67ee738 WHIRLPOOL 2c6f4d9e5382c43e935db16bf120b24cd8de517bc067dcab91b3230a8ddced7ecc5ed37626464d3f1a7880d2d41efdf3cecfd1029a38aaa2edf3d20de74489b4 DIST redis-3.2.8.tar.gz 1547237 SHA256 61b373c23d18e6cc752a69d5ab7f676c6216dc2853e46750a8c4ed791d68482c SHA512 7334faf73af3644f7f9dcaddd322955d5df1e88a1640b509ae623f322615a20f6dc143eb57dd89ff3a278557df309ac4215c3fb458235682ce28e16c817068ba WHIRLPOOL 50ffecd1891051a3e28028065bfaf090b2eec42a757cdf61c6d22b051c8ba4fc78809b3198182d2333bedb4715d9a8d70bf04f605030abe6e33cc6b9b7161cf7 +DIST redis-4.0.2.tar.gz 1713990 SHA256 b1a0915dbc91b979d06df1977fe594c3fa9b189f1f3d38743a2948c9f7634813 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4 WHIRLPOOL 24834b1fbedaea75f245c9f3f7dc29444b34bccdac08b060dee5ff78b23ee60cb029d8a255f69df7a7a3a54c7440bb37390361a2d995eb0bc7534273570adfc3 EBUILD redis-3.2.8-r2.ebuild 3615 SHA256 547a6435292356ed3471c1fed786b2e3da2d53821b1fdf6f2a173b2522948f7b SHA512 6951254129a0a8aa66c8ac7c19abc28b1e0ce9947fac1b765f6fcab29e95b48b41139fd60134eee4675a754a22ceb25c21a3216b559bfdc44a66899182c6cde2 WHIRLPOOL 030a40a1181127dc5be12fdb998e69d1d90528b068192e38d9ae51fb06640a687f09e3f72d2f78acf727713f22a4ae9f762b851c384350b14df50ca755ba37da +EBUILD redis-4.0.2-r1.ebuild 3847 SHA256 652e9a8b529ddb8d1a724064e798577838dae5ad4443db1a0ac89261248fe644 SHA512 520c37a5ae0be35a72f704f61f56865e819118ebcf2e41a08f3ca9bd0f458aa0b1aded6ddfccf3092b1b932ec7971535a052d6409f91e6f3cbf22b519cd0cdb1 WHIRLPOOL 0c8f3add705e3161ecd18385ecf698062bb4963ac1968bf1ad94b1470e03e53d811c69e780d548c1601669b0cd58da10e39b77e57ab399e09e792636c38a9870 diff --git a/dev-db/redis/files/redis-4.0.1-shared.patch b/dev-db/redis/files/redis-4.0.1-shared.patch new file mode 100644 index 00000000..945d114a --- /dev/null +++ b/dev-db/redis/files/redis-4.0.1-shared.patch @@ -0,0 +1,32 @@ +diff --git a/src/Makefile b/src/Makefile +index 86e0b3fe..c7db0ee9 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,14 +29,7 @@ INSTALL_BIN=$(PREFIX)/bin + INSTALL=install + + # Default allocator defaults to Jemalloc if it's not an ARM +-MALLOC=libc +-ifneq ($(uname_M),armv6l) +-ifneq ($(uname_M),armv7l) +-ifeq ($(uname_S),Linux) +- MALLOC=jemalloc +-endif +-endif +-endif ++MALLOC?=jemalloc + + # To get ARM stack traces if Redis crashes we need a special C flag. + ifneq (,$(findstring armv,$(uname_M))) +@@ -120,9 +113,8 @@ ifeq ($(MALLOC),tcmalloc_minimal) + endif + + ifeq ($(MALLOC),jemalloc) +- DEPENDENCY_TARGETS+= jemalloc +- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include +- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a ++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE ++ FINAL_LIBS+= -ljemalloc -ldl + endif + + REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) diff --git a/dev-db/redis/files/redis-4.0.1-sharedlua.patch b/dev-db/redis/files/redis-4.0.1-sharedlua.patch new file mode 100644 index 00000000..d2b57225 --- /dev/null +++ b/dev-db/redis/files/redis-4.0.1-sharedlua.patch @@ -0,0 +1,60 @@ +diff --git a/deps/lua/src/lua_cjson.c b/deps/lua/src/lua_cjson.c +index c26c0d7b..fa50c410 100644 +--- a/deps/lua/src/lua_cjson.c ++++ b/deps/lua/src/lua_cjson.c +@@ -46,7 +46,7 @@ + #include "strbuf.h" + #include "fpconv.h" + +-#include "../../../src/solarisfixes.h" ++#include "solarisfixes.h" + + #ifndef CJSON_MODNAME + #define CJSON_MODNAME "cjson" +diff --git a/src/Makefile b/src/Makefile +index 86e0b3fe..09630321 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -16,7 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh') + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua ++DEPENDENCY_TARGETS=hiredis linenoise + NODEPS:=clean distclean + + # Default settings +@@ -66,6 +66,7 @@ endif + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm ++FINAL_LIBS+=@LUA_LIBS@ + DEBUG=-g -ggdb + + ifeq ($(uname_S),SunOS) +@@ -107,7 +108,7 @@ endif + endif + endif + # Include paths to dependencies +-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src ++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise @LUA_CFLAGS@ + + ifeq ($(MALLOC),tcmalloc) + FINAL_CFLAGS+= -DUSE_TCMALLOC +@@ -145,6 +146,7 @@ endif + REDIS_SERVER_NAME=redis-server + REDIS_SENTINEL_NAME=redis-sentinel + REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o ++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o + REDIS_CLI_NAME=redis-cli + REDIS_CLI_OBJ=anet.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o + REDIS_BENCHMARK_NAME=redis-benchmark +@@ -196,7 +198,7 @@ endif + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/dev-db/redis/files/redis.confd-r1 b/dev-db/redis/files/redis.confd-r1 new file mode 100644 index 00000000..1f4ff23f --- /dev/null +++ b/dev-db/redis/files/redis.confd-r1 @@ -0,0 +1,20 @@ +# Redis user. +REDIS_USER="redis" + +# Redis group. +REDIS_GROUP="redis" + +# Redis configuration file. +REDIS_CONF="/etc/redis.conf" + +# Redis dump directory. +REDIS_DIR="/var/lib/redis" + +# Redis options. +# (Redis expects the first argument to be the configuration file.) +REDIS_OPTS="${REDIS_CONF}" + +# Specify the network service that corresponds to the "bind" setting +# in your redis.conf. For example, if you bind to 127.0.0.1, this should +# be set to "net.lo" which provides the loopback interface. +rc_need="net.lo" diff --git a/dev-db/redis/files/redis.initd-5 b/dev-db/redis/files/redis.initd-5 new file mode 100644 index 00000000..54596687 --- /dev/null +++ b/dev-db/redis/files/redis.initd-5 @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${REDIS_DIR:=/var/lib/redis} +: ${REDIS_CONF:=/etc/redis.conf} +: ${REDIS_OPTS:="${REDIS_CONF}"} +: ${REDIS_USER:=redis} +: ${REDIS_GROUP:=redis} +: ${REDIS_TIMEOUT:=30} + +# https://bugs.gentoo.org/631002#c10 +# Force '--daemonize no' to override the config file +command="/usr/sbin/redis-server" +command_args="${REDIS_OPTS} --daemonize no" +command_background="true" +command_user="${REDIS_USER}:${REDIS_GROUP}" +pidfile="/var/run/${RC_SVCNAME}.pid" +retry="${REDIS_TIMEOUT}" +start_stop_daemon_args="--chdir \"${REDIS_DIR}\"" + +depend() { + use localmount logger + after keepalived +} diff --git a/dev-db/redis/redis-4.0.2-r1.ebuild b/dev-db/redis/redis-4.0.2-r1.ebuild new file mode 100644 index 00000000..b614fc92 --- /dev/null +++ b/dev-db/redis/redis-4.0.2-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc luajit systemd test" +SLOT="0" + +# Redis does NOT build with Lua 5.2 or newer at this time. +# This should link correctly with both unslotted & slotted Lua, without +# changes. +RDEPEND="luajit? ( dev-lang/luajit:2 ) + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-4.0.1-shared.patch \ + "${FILESDIR}"/${PN}-3.2.3-config.patch \ + "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch + eapply_user + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-3.2 configure.ac + + # Use the correct pkgconfig name for Lua + has_version 'dev-lang/lua:5.1' \ + && LUAPKGCONFIG=lua5.1 \ + || LUAPKGCONFIG=lua + sed -i \ + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf \ + $(use_with luajit) + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r1" redis + newinitd "${FILESDIR}/redis.initd-5" redis + + if use systemd; then + systemd_newunit "${FILESDIR}/redis.service-2" redis.service + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + fi + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} |