mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Stéphane Massoni" <stephane.massoni@nexvision.fr>
To: ptxdist@pengutronix.de
Cc: "Stéphane Massoni" <stephane.massoni@nexvision.fr>
Subject: [ptxdist] [PATCH] redis : new package
Date: Thu, 24 Jul 2014 14:26:18 +0200	[thread overview]
Message-ID: <1406204778-25490-1-git-send-email-stephane.massoni@nexvision.fr> (raw)
In-Reply-To: <20140724104658.GR25193@pengutronix.de>

Hi,

>Stephane,
>
>Am Do, 24 Jul 2014 schrieb ptxdist-bounces@pengutronix.de:
>> Pending posts:
>> From: stephane.massoni@nexvision.fr on Tue Jul 22 11:19:06 2014
>> Subject: [PATCH] redis : new package
>> Cause: Post by non-member to a members-only list
>
>I've accidently discarded your message instead of forwarding 
>it to the list. Sorry about that. 
>
>Please consider resending it :-)
>
>Greetings, 
>Bjørn

no problem.

The Redis-2.8.13 package.

Regards,
Stef

Signed-off-by: Stéphane Massoni <stephane.massoni@nexvision.fr>
---
 redis-2.8.13/0001-use-libc_malloc.diff           |  15 ++++
 redis-2.8.13/0002-configurable-install-path.diff |  13 +++
 redis-2.8.13/0003-only-one-instance.diff         |  11 +++
 redis-2.8.13/0004-config.diff                    |  29 +++++++
 redis-2.8.13/series                              |   4 +
 redis-bbinit.in                                  |   8 ++
 redis.in                                         |  34 ++++++++
 redis.make                                       | 106 +++++++++++++++++++++++
 8 files changed, 220 insertions(+)
 create mode 100644 redis-2.8.13/0001-use-libc_malloc.diff
 create mode 100644 redis-2.8.13/0002-configurable-install-path.diff
 create mode 100644 redis-2.8.13/0003-only-one-instance.diff
 create mode 100644 redis-2.8.13/0004-config.diff
 create mode 100644 redis-2.8.13/series
 create mode 100644 redis-bbinit.in
 create mode 100644 redis.in
 create mode 100644 redis.make

diff --git a/redis-2.8.13/0001-use-libc_malloc.diff b/redis-2.8.13/0001-use-libc_malloc.diff
new file mode 100644
index 0000000..725fbd3
--- /dev/null
+++ b/redis-2.8.13/0001-use-libc_malloc.diff
@@ -0,0 +1,15 @@
+--- a/src/Makefile	2014-06-05 11:02:23.000000000 +0200
++++ b/src/Makefile	2014-06-10 12:00:27.285831368 +0200
+@@ -27,11 +27,7 @@
+ INSTALL=install
+ 
+ # Default allocator
+-ifeq ($(uname_S),Linux)
+-	MALLOC=jemalloc
+-else
+-	MALLOC=libc
+-endif
++MALLOC=libc
+ 
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
diff --git a/redis-2.8.13/0002-configurable-install-path.diff b/redis-2.8.13/0002-configurable-install-path.diff
new file mode 100644
index 0000000..bf725c4
--- /dev/null
+++ b/redis-2.8.13/0002-configurable-install-path.diff
@@ -0,0 +1,13 @@
+--- a/utils/redis_init_script	2014-06-05 11:02:23.000000000 +0200
++++ b/utils/redis_init_script	2014-06-10 16:34:09.263313766 +0200
+@@ -4,8 +4,8 @@
+ # as it does use of the /proc filesystem.
+ 
+ REDISPORT=6379
+-EXEC=/usr/local/bin/redis-server
+-CLIEXEC=/usr/local/bin/redis-cli
++EXEC=XXX_INSTALL_PATH_XXX/redis-server
++CLIEXEC=XXX_INSTALL_PATH_XXX/redis-cli
+ 
+ PIDFILE=/var/run/redis_${REDISPORT}.pid
+ CONF="/etc/redis/${REDISPORT}.conf"
diff --git a/redis-2.8.13/0003-only-one-instance.diff b/redis-2.8.13/0003-only-one-instance.diff
new file mode 100644
index 0000000..a078bef
--- /dev/null
+++ b/redis-2.8.13/0003-only-one-instance.diff
@@ -0,0 +1,11 @@
+--- a/utils/redis_init_script	2014-06-10 16:39:01.975633874 +0200
++++ b/utils/redis_init_script	2014-06-10 17:03:14.457373706 +0200
+@@ -10,5 +10,6 @@
+-PIDFILE=/var/run/redis_${REDISPORT}.pid
+-CONF="/etc/redis/${REDISPORT}.conf"
++PIDFILE=/var/run/redis.pid
++CONF="/etc/redis.conf"
++REDISPORT=$(grep "^port" ${CONF} | cut -d" " -f2)
+ 
+ case "$1" in
+     start)
diff --git a/redis-2.8.13/0004-config.diff b/redis-2.8.13/0004-config.diff
new file mode 100644
index 0000000..7c4f249
--- /dev/null
+++ b/redis-2.8.13/0004-config.diff
@@ -0,0 +1,29 @@
+--- no_backup/platform-sc/build-target/redis-2.8.10/redis.conf	2014-06-05 11:02:23.000000000 +0200
++++ ../redis.conf	2014-06-10 17:30:42.108659924 +0200
+@@ -34,7 +34,7 @@
+ 
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+-daemonize no
++daemonize yes
+ 
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+@@ -115,7 +115,7 @@
+ # Set the number of databases. The default database is DB 0, you can select
+ # a different one on a per-connection basis using SELECT <dbid> where
+ # dbid is a number between 0 and 'databases'-1
+-databases 16
++databases 2
+ 
+ ################################ SNAPSHOTTING  ################################
+ #
+@@ -184,7 +184,7 @@
+ # The Append Only File will also be created inside this directory.
+ # 
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/
+ 
+ ################################# REPLICATION #################################
+ 
diff --git a/redis-2.8.13/series b/redis-2.8.13/series
new file mode 100644
index 0000000..934d5ee
--- /dev/null
+++ b/redis-2.8.13/series
@@ -0,0 +1,4 @@
+0001-use-libc_malloc.diff
+0002-configurable-install-path.diff
+0003-only-one-instance.diff
+0004-config.diff
diff --git a/redis-bbinit.in b/redis-bbinit.in
new file mode 100644
index 0000000..f4b642e
--- /dev/null
+++ b/redis-bbinit.in
@@ -0,0 +1,8 @@
+## SECTION=initmethod_bbinit
+
+config REDIS_BBINIT_LINK
+	string
+	depends on REDIS_STARTSCRIPT
+	prompt "redis-server"
+	default "S98redis-server"
+
diff --git a/redis.in b/redis.in
new file mode 100644
index 0000000..9a91300
--- /dev/null
+++ b/redis.in
@@ -0,0 +1,34 @@
+## SECTION=communication
+
+menuconfig REDIS
+	tristate
+	prompt "redis                         "
+	select ROOTFS_VAR_RUN
+	select LIBC_DL
+	select LIBC_PTHREAD
+	select ROOTFS_VAR_LIB
+	select BUSYBOX_START_STOP_DAEMON            if REDIS_STARTSCRIPT
+	select BUSYBOX_FEATURE_START_STOP_DAEMON_FANCY      if REDIS_STARTSCRIPT
+	select BUSYBOX_FEATURE_START_STOP_DAEMON_LONG_OPTIONS   if REDIS_STARTSCRIPT
+	help
+	  Redis is an open source, BSD licensed, advanced key-value store.
+	  It is often referred to as a data structure server since keys
+	  can contain strings, hashes, lists, sets and sorted sets.
+
+if REDIS
+
+config REDIS_PATH
+	string
+	prompt "install path"
+	default "/usr/bin"
+	help
+	  Install path for redis binaries
+
+config REDIS_STARTSCRIPT
+	bool
+	prompt "init script for redis-server"
+	default y
+	help
+	  Install this script to be able to run this service at system startup
+
+endif
diff --git a/redis.make b/redis.make
new file mode 100644
index 0000000..c3dfb2f
--- /dev/null
+++ b/redis.make
@@ -0,0 +1,106 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Salvatore Sanfilippo
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_REDIS) += redis
+
+#
+# Paths and names
+#
+REDIS_VERSION	:= 2.8.13
+REDIS_MD5	:= ea92053cbb6f4eb8a4347dbaac7d7dff
+REDIS		:= redis-$(REDIS_VERSION)
+REDIS_SUFFIX	:= tar.gz
+REDIS_URL		:= http://download.redis.io/releases/$(REDIS).$(REDIS_SUFFIX)
+REDIS_SOURCE	:= $(SRCDIR)/$(REDIS).$(REDIS_SUFFIX)
+REDIS_DIR		:= $(BUILDDIR)/$(REDIS)
+REDIS_LICENSE	:= BSD
+
+ifneq ($(call remove_quotes,$(PTXCONF_REDIS_PATH)),)
+	REDIS_INSTALL_PATH := $(PTXCONF_REDIS_PATH)
+else
+	REDIS_INSTALL_PATH := /usr/local/bin
+endif
+
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/redis.prepare:
+	@$(call targetinfo)
+	@$(call clean, $(REDIS_DIR)/src/release.h)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+REDIS_MAKE_ENV := $(CROSS_ENV)
+
+$(STATEDIR)/redis.compile:
+	@$(call targetinfo)
+	cd $(REDIS_DIR) && \
+		$(REDIS_MAKE_ENV) $(MAKE) $(REDIS_MAKE_OPT)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/redis.install:
+	@$(call targetinfo)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/redis.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, redis)
+	@$(call install_fixup, redis,PRIORITY,optional)
+	@$(call install_fixup, redis,SECTION,communication)
+	@$(call install_fixup, redis,AUTHOR,"Stéphane Massoni <stephane.massoni@nexvision.fr>")
+	@$(call install_fixup, redis,DESCRIPTION,missing)
+
+	@$(call install_copy, redis, 0, 0, 0500, $(REDIS_DIR)/src/redis-server, $(REDIS_INSTALL_PATH)/redis-server, y)
+	@$(call install_copy, redis, 0, 0, 0500, $(REDIS_DIR)/src/redis-cli, $(REDIS_INSTALL_PATH)/redis-client, y)
+	@$(call install_copy, redis, 0, 0, 0500, $(REDIS_DIR)/redis.conf, /etc/redis.conf, n)
+
+ifdef PTXCONF_INITMETHOD_BBINIT
+ifdef PTXCONF_REDIS_STARTSCRIPT
+
+	@sed "s#XXX_INSTALL_PATH_XXX#$(REDIS_INSTALL_PATH)#g" $(REDIS_DIR)/utils/redis_init_script > $(REDIS_DIR)/utils/redis_init_script_mod
+	@$(call install_copy, redis, 0, 0, 0500, $(REDIS_DIR)/utils/redis_init_script_mod, /etc/init.d/redis-server, n)
+
+ifneq ($(call remove_quotes,$(PTXCONF_REDIS_BBINIT_LINK)),)
+	@$(call install_link, redis, ../init.d/redis-server, /etc/rc.d/$(PTXCONF_REDIS_BBINIT_LINK))
+endif
+
+endif
+endif
+
+	@$(call install_finish, redis)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

       reply	other threads:[~2014-07-24 12:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140724104658.GR25193@pengutronix.de>
2014-07-24 12:26 ` Stéphane Massoni [this message]
2021-12-02 15:09 [ptxdist] [PATCH] redis: " Clemens Gruber
2021-12-03 15:17 ` Roland Hieber
2021-12-03 15:28   ` Clemens Gruber
2021-12-03 15:40     ` Alexander Dahl
2021-12-03 15:50       ` Clemens Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406204778-25490-1-git-send-email-stephane.massoni@nexvision.fr \
    --to=stephane.massoni@nexvision.fr \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox