Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Aug 2022 05:31:48 GMT
From:      Yasuhiro Kimura <yasu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: da202ea08068 - main - databases/redis{6,62}: Fix problem that pkg-message is misleading
Message-ID:  <202208070531.2775Vm3g038519@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yasu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da202ea08068ed0be6487ea5f2bc368bbfb0d2c2

commit da202ea08068ed0be6487ea5f2bc368bbfb0d2c2
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-08-07 04:31:13 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-08-07 05:30:30 +0000

    databases/redis{6,62}: Fix problem that pkg-message is misleading
    
    When installing package of databases/redis62, following pkg-message is
    displayed.
    
              To setup "redis62" you need to edit the configuration file:
              /usr/local/etc/redis62.conf
    
              To run redis from startup, add redis62_enable="YES"
              in your /etc/rc.conf.
    
    But path of configuration file is /usr/local/etc/redis.conf and what
    should really be added to /etc/rc.conf is redis_enable="YES". Same
    problem also happens when installing databases/redis6
    
    The source of the problem is that the value of ${PORTNAME} is used to
    create pkg-message from file/pkg-message.in. So fix it by changing the
    value of ${PORTNAME} to "redis" and set PKGNAMESUFFIX in Makefile of
    each port.
    
    While I'm here,
    
    * Pet portlint and portclippy
    * Tidy up Makefile with portfmt.
    
    PR:             265623
    Reported by:    FiLiS
    MFH:            2022Q3
---
 databases/redis6/Makefile                          | 103 ++++++++++-----------
 databases/redis6/files/patch-deps-hiredis-net.c    |   4 +-
 databases/redis62/Makefile                         |   6 +-
 .../files/extra-patch-deps_lua_src_lua__cjson.c    |   4 +-
 .../redis62/files/extra-patch-src-Makefile.lua     |   4 +-
 .../redis62/files/extra-patch-src-Makefile.luajit  |   4 +-
 .../files/extra-patch-src-Makefile.luajit-or       |   4 +-
 databases/redis62/files/patch-deps-Makefile        |   4 +-
 .../redis62/files/patch-deps-hiredis-Makefile      |   4 +-
 databases/redis62/files/patch-deps-hiredis-net.c   |   4 +-
 databases/redis62/files/patch-deps_Makefile        |   4 +-
 databases/redis62/files/patch-redis.conf           |   4 +-
 12 files changed, 72 insertions(+), 77 deletions(-)

diff --git a/databases/redis6/Makefile b/databases/redis6/Makefile
index eda5704e9630..180f98183fad 100644
--- a/databases/redis6/Makefile
+++ b/databases/redis6/Makefile
@@ -1,9 +1,9 @@
-PORTNAME=	redis6
+PORTNAME=	redis
 PORTVERSION=	6.0.16
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	https://download.redis.io/releases/
-DISTNAME=	redis-${PORTVERSION}
+PKGNAMESUFFIX=	6
 
 MAINTAINER=	yasu@FreeBSD.org
 COMMENT=	Persistent key-value database with built-in net interface
@@ -13,60 +13,55 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES+=		compiler:c11 gmake
 
-OPTIONS_DEFINE=	JEMALLOC TESTS TLS TRIB
-OPTIONS_DEFAULT=	TLS
-OPTIONS_RADIO=	EXTLUA
-OPTIONS_RADIO_EXTLUA=	LUA LUAJIT LUAJITOR
-OPTIONS_SUB=	yes
-JEMALLOC_DESC=	Use jemalloc
-LUA_DESC=	Use lang/lua instead of builtin lua
-LUAJIT_DESC=	Use lang/luajit instead of builtin lua
-LUAJITOR_DESC=	Use lang/luajit-openresty instead of builtin lua
-TLS_DESC=	Use TLS (openssl req.)
-TESTS_DESC=	Install lang/tcl for redis unit tests
-TRIB_DESC=	Install redis-trib.rb (lang/ruby req.)
-
-MAKE_ENV=	V=yo OPTIMIZATION=
+MAKE_ENV=	OPTIMIZATION= \
+		V=yo
 
 CONFLICTS_INSTALL=	redis redis-devel # etc/rc.d/redis
 
-JEMALLOC_MAKE_ENV=	USE_JEMALLOC=yes
-
-LUA_USES=		lua:51
-LUA_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src-Makefile.lua
-LUA_VARS=		_addflags=true
-
-LUAJIT_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
-LUAJIT_BUILD_DEPENDS=	${LOCALBASE}/include/luajit-2.0/lua.h:lang/luajit
-LUAJIT_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src-Makefile.luajit
-LUAJIT_VARS=		_addflags=true
+OPTIONS_DEFINE=		JEMALLOC TESTS TLS TRIB
+OPTIONS_DEFAULT=	TLS
+OPTIONS_RADIO=		EXTLUA
+OPTIONS_RADIO_EXTLUA=	LUA LUAJIT LUAJITOR
+OPTIONS_SUB=		yes
+JEMALLOC_DESC=		Use jemalloc
+LUAJITOR_DESC=		Use lang/luajit-openresty instead of builtin lua
+LUAJIT_DESC=		Use lang/luajit instead of builtin lua
+LUA_DESC=		Use lang/lua instead of builtin lua
+TESTS_DESC=		Install lang/tcl for redis unit tests
+TLS_DESC=		Use TLS (openssl req.)
+TRIB_DESC=		Install redis-trib.rb (lang/ruby req.)
 
-LUAJITOR_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit-openresty
+JEMALLOC_MAKE_ENV=	USE_JEMALLOC=yes
 LUAJITOR_BUILD_DEPENDS=	${LOCALBASE}/include/luajit-2.1/lua.h:lang/luajit-openresty
+LUAJITOR_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit-openresty
 LUAJITOR_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src-Makefile.luajit-or \
 			${PATCHDIR}/extra-patch-deps_lua_src_lua__cjson.c
-LUAJITOR_VARS=		_addflags=true
-
-TESTS_USES=	tcl:build
-
-TLS_USES=	ssl
-TLS_MAKE_ENV=	BUILD_TLS=yes
-
+LUAJITOR_VARS=		_ADDFLAGS=true
+LUAJIT_BUILD_DEPENDS=	${LOCALBASE}/include/luajit-2.0/lua.h:lang/luajit
+LUAJIT_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
+LUAJIT_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src-Makefile.luajit
+LUAJIT_VARS=		_ADDFLAGS=true
+LUA_USES=		lua:51
+LUA_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src-Makefile.lua
+LUA_VARS=		_ADDFLAGS=true
+TESTS_USES=		tcl:build
+TLS_USES=		ssl
+TLS_MAKE_ENV=		BUILD_TLS=yes
 TRIB_CATEGORIES=	ruby
-TRIB_USE=		ruby=yes
 TRIB_RUN_DEPENDS=	rubygem-redis>=2.2:databases/rubygem-redis
+TRIB_USE=		RUBY=yes
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} == i386 && ! ${CFLAGS:M-march=*}
+.if ${ARCH} == i386 && !${CFLAGS:M-march=*}
 # Needed for __atomic_fetch_add_8
 USE_GCC=	yes
 CFLAGS+=	-march=i586
 .endif
 
 .if defined(_ADDFLAGS)
-CFLAGS=		-fPIC
-LDFLAGS=	-Wl,-E
+CFLAGS+=	-fPIC
+LDFLAGS+=	-Wl,-E
 .endif
 
 LDFLAGS+=	-lpthread -lm -lexecinfo
@@ -74,11 +69,11 @@ LDFLAGS+=	-lpthread -lm -lexecinfo
 CONFLICTS?=	redis-[1-9].* redis-devel-* redis62-*
 
 USE_RC_SUBR=	redis sentinel
-BIN_FILES=	redis-benchmark redis-check-aof redis-check-rdb \
-		redis-cli redis-sentinel redis-server
+BIN_FILES=	redis-benchmark redis-check-aof redis-check-rdb redis-cli \
+		redis-sentinel redis-server
 
-USERS=	redis
-GROUPS=	redis
+USERS=		redis
+GROUPS=		redis
 
 REDIS_DBDIR?=	/var/db/redis
 REDIS_RUNDIR?=	/var/run/redis
@@ -86,24 +81,24 @@ REDIS_LOGDIR?=	/var/log/redis
 
 SUB_FILES=	pkg-message
 SUB_LIST+=	PORTNAME=${PORTNAME} \
-	REDIS_USER=${USERS} \
-	REDIS_DBDIR=${REDIS_DBDIR} \
-	REDIS_LOGDIR=${REDIS_LOGDIR} \
-	REDIS_RUNDIR=${REDIS_RUNDIR}
+		REDIS_DBDIR=${REDIS_DBDIR} \
+		REDIS_LOGDIR=${REDIS_LOGDIR} \
+		REDIS_RUNDIR=${REDIS_RUNDIR} \
+		REDIS_USER=${USERS}
 
-PLIST_SUB+=	REDIS_USER=${USERS} \
-	REDIS_GROUP=${GROUPS} \
-	REDIS_LOGDIR=${REDIS_LOGDIR} \
-	REDIS_DBDIR=${REDIS_DBDIR} \
-	REDIS_RUNDIR=${REDIS_RUNDIR}
+PLIST_SUB+=	REDIS_DBDIR=${REDIS_DBDIR} \
+		REDIS_GROUP=${GROUPS} \
+		REDIS_LOGDIR=${REDIS_LOGDIR} \
+		REDIS_RUNDIR=${REDIS_RUNDIR} \
+		REDIS_USER=${USERS}
 
 post-patch-JEMALLOC-on:
 	@${REINPLACE_CMD} '35s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile
 
 post-patch-LUA-on:
 	@cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/
-post-patch-LUAJIT-on:	post-patch-LUA-on
-post-patch-LUAJITOR-on:	post-patch-LUA-on
+post-patch-LUAJIT-on: post-patch-LUA-on
+post-patch-LUAJITOR-on: post-patch-LUA-on
 
 post-build:
 	${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
diff --git a/databases/redis6/files/patch-deps-hiredis-net.c b/databases/redis6/files/patch-deps-hiredis-net.c
index 3fd2b5996f97..0dfde3135238 100644
--- a/databases/redis6/files/patch-deps-hiredis-net.c
+++ b/databases/redis6/files/patch-deps-hiredis-net.c
@@ -1,5 +1,5 @@
---- deps/hiredis/net.c.orig	2019-11-28 14:32:05.942453000 -0500
-+++ deps/hiredis/net.c	2019-11-28 14:39:08.326408000 -0500
+--- deps/hiredis/net.c.orig	2019-11-28 19:32:05 UTC
++++ deps/hiredis/net.c
 @@ -178,14 +178,34 @@
          __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
          return REDIS_ERR;
diff --git a/databases/redis62/Makefile b/databases/redis62/Makefile
index 09111d96983e..d9733798726c 100644
--- a/databases/redis62/Makefile
+++ b/databases/redis62/Makefile
@@ -1,9 +1,9 @@
-PORTNAME=	redis62
+PORTNAME=	redis
 DISTVERSION=	6.2.7
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	https://download.redis.io/releases/
-DISTNAME=	redis-${PORTVERSION}
+PKGNAMESUFFIX=	62
 
 MAINTAINER=	yasu@FreeBSD.org
 COMMENT=	Persistent key-value database with built-in net interface
diff --git a/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c b/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c
index 847b70d25dea..32e322d0d490 100644
--- a/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c
+++ b/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c
@@ -1,5 +1,5 @@
---- deps/lua/src/lua_cjson.c.orig	2019-12-08 07:56:31.419672000 -0500
-+++ deps/lua/src/lua_cjson.c	2019-12-08 07:56:52.389362000 -0500
+--- deps/lua/src/lua_cjson.c.orig	2019-12-08 12:56:31 UTC
++++ deps/lua/src/lua_cjson.c
 @@ -1299,7 +1299,7 @@
   *
   * luaL_setfuncs() is used to create a module table where the functions have
diff --git a/databases/redis62/files/extra-patch-src-Makefile.lua b/databases/redis62/files/extra-patch-src-Makefile.lua
index 937eeac680a2..398d415bd6e4 100644
--- a/databases/redis62/files/extra-patch-src-Makefile.lua
+++ b/databases/redis62/files/extra-patch-src-Makefile.lua
@@ -1,5 +1,5 @@
---- src/Makefile.orig	2021-01-12 09:21:03.000000000 -0500
-+++ src/Makefile	2021-01-13 11:52:33.070529000 -0500
+--- src/Makefile.orig	2021-01-12 14:21:03 UTC
++++ src/Makefile
 @@ -16,7 +16,7 @@
  uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
  uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
diff --git a/databases/redis62/files/extra-patch-src-Makefile.luajit b/databases/redis62/files/extra-patch-src-Makefile.luajit
index 3e40ea4a77a0..eef0a18eb74e 100644
--- a/databases/redis62/files/extra-patch-src-Makefile.luajit
+++ b/databases/redis62/files/extra-patch-src-Makefile.luajit
@@ -1,5 +1,5 @@
---- src/Makefile.orig	2021-01-12 09:21:03.000000000 -0500
-+++ src/Makefile	2021-01-13 12:25:07.823451000 -0500
+--- src/Makefile.orig	2021-01-12 14:21:03 UTC
++++ src/Makefile
 @@ -16,7 +16,7 @@
  uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
  uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
diff --git a/databases/redis62/files/extra-patch-src-Makefile.luajit-or b/databases/redis62/files/extra-patch-src-Makefile.luajit-or
index 3926e8169300..ca57ef49c35c 100644
--- a/databases/redis62/files/extra-patch-src-Makefile.luajit-or
+++ b/databases/redis62/files/extra-patch-src-Makefile.luajit-or
@@ -1,5 +1,5 @@
---- src/Makefile.orig	2021-01-12 09:21:03.000000000 -0500
-+++ src/Makefile	2021-01-13 12:27:19.444193000 -0500
+--- src/Makefile.orig	2021-01-12 14:21:03 UTC
++++ src/Makefile
 @@ -16,7 +16,7 @@
  uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
  uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
diff --git a/databases/redis62/files/patch-deps-Makefile b/databases/redis62/files/patch-deps-Makefile
index c2a757c59b33..84a2f6dcbc60 100644
--- a/databases/redis62/files/patch-deps-Makefile
+++ b/databases/redis62/files/patch-deps-Makefile
@@ -1,5 +1,5 @@
---- deps/Makefile.orig	2021-01-12 09:21:03.000000000 -0500
-+++ deps/Makefile	2021-01-13 11:37:45.979445000 -0500
+--- deps/Makefile.orig	2021-01-12 14:21:03 UTC
++++ deps/Makefile
 @@ -69,7 +69,7 @@
  	LUA_CFLAGS= -D__C99FEATURES__=1
  endif
diff --git a/databases/redis62/files/patch-deps-hiredis-Makefile b/databases/redis62/files/patch-deps-hiredis-Makefile
index 9422ba8d3245..aec6b29a7b2e 100644
--- a/databases/redis62/files/patch-deps-hiredis-Makefile
+++ b/databases/redis62/files/patch-deps-hiredis-Makefile
@@ -1,5 +1,5 @@
---- deps/hiredis/Makefile.orig	2021-01-12 09:21:03.000000000 -0500
-+++ deps/hiredis/Makefile	2021-01-13 11:40:26.109827000 -0500
+--- deps/hiredis/Makefile.orig	2021-01-12 14:21:03 UTC
++++ deps/hiredis/Makefile
 @@ -21,7 +21,7 @@
  HIREDIS_SONAME=$(shell grep HIREDIS_SONAME hiredis.h | awk '{print $$3}')
  
diff --git a/databases/redis62/files/patch-deps-hiredis-net.c b/databases/redis62/files/patch-deps-hiredis-net.c
index 3fd2b5996f97..0dfde3135238 100644
--- a/databases/redis62/files/patch-deps-hiredis-net.c
+++ b/databases/redis62/files/patch-deps-hiredis-net.c
@@ -1,5 +1,5 @@
---- deps/hiredis/net.c.orig	2019-11-28 14:32:05.942453000 -0500
-+++ deps/hiredis/net.c	2019-11-28 14:39:08.326408000 -0500
+--- deps/hiredis/net.c.orig	2019-11-28 19:32:05 UTC
++++ deps/hiredis/net.c
 @@ -178,14 +178,34 @@
          __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
          return REDIS_ERR;
diff --git a/databases/redis62/files/patch-deps_Makefile b/databases/redis62/files/patch-deps_Makefile
index 39dadb06b822..354558054689 100644
--- a/databases/redis62/files/patch-deps_Makefile
+++ b/databases/redis62/files/patch-deps_Makefile
@@ -1,5 +1,5 @@
---- deps/Makefile.orig	2021-01-13 11:43:05.174197000 -0500
-+++ deps/Makefile	2021-01-13 11:44:13.744658000 -0500
+--- deps/Makefile.orig	2021-01-13 16:43:05 UTC
++++ deps/Makefile
 @@ -83,12 +83,12 @@
  
  .PHONY: lua
diff --git a/databases/redis62/files/patch-redis.conf b/databases/redis62/files/patch-redis.conf
index f71797d9555e..b653f89a3211 100644
--- a/databases/redis62/files/patch-redis.conf
+++ b/databases/redis62/files/patch-redis.conf
@@ -1,5 +1,5 @@
---- redis.conf.orig	2021-01-12 09:21:03.000000000 -0500
-+++ redis.conf	2021-01-13 11:46:40.445746000 -0500
+--- redis.conf.orig	2021-01-12 14:21:03 UTC
++++ redis.conf
 @@ -244,7 +244,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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208070531.2775Vm3g038519>