Re: UPDATE: databases/redis 4.0.2 -> 4.0.8

2018-04-12 Thread Klemens Nanni
On Sat, Mar 17, 2018 at 09:52:02AM +, Stuart Henderson wrote:
> On 2018/03/17 08:33, Klemens Nanni wrote:
> > Patches have been dropped or simplified a lot by passing variables
> > through MAKE_ENV or adding to post-install instead,
> > patch-src_mkreleasehdr_sh was useless on its own already.
Here's an updated diff without whitespace nits after the 4.0.8 update.

> It's a lot to change in one go. The version update makes sense, but
> I'm not sure about the rest of the shuffling (and in any event,
> that sort of thing is better separated from a routine update).
I also refrained from compacting the targets for now to keep the focus
on reducing the patches.

> > +MAKE_FLAGS =   DEBUG=${DEBUG} \
> > +   DEBUG_FLAGS=${DEBUG} \
> > +   DEPENDENCY_TARGETS="hiredis linenoise" \
> > +   INSTALL_SBIN="${PREFIX}/sbin" \
> > +   MALLOC=libc \
> > +   OPT= \
> > +   OPTIMIZATION= \
> > V=1
> 
> Overrides seem sensible for things like DEBUG (but should be quoted).
> For things like DEPENDENCY_TARGETS it's better if a change in the upstream
> Makefile causes a patch failure during an update because it will need to
> be adapted anyway.
Now quoted and with DEPENDENCY_TARGETS kept in patches.

Feedback? OK?

Index: Makefile
===
RCS file: /cvs/ports/databases/redis/Makefile,v
retrieving revision 1.101
diff -u -p -r1.101 Makefile
--- Makefile19 Mar 2018 18:15:57 -  1.101
+++ Makefile12 Apr 2018 21:19:00 -
@@ -17,7 +17,13 @@ MASTER_SITES =   http://download.redis.io
 MODULES =  lang/lua \
lang/tcl
 
-MAKE_FLAGS =   CC=${CC} \
+MAKE_FLAGS =   CC="${CC}" \
+   DEBUG="${DEBUG}" \
+   DEBUG_FLAGS="${DEBUG}" \
+   INSTALL_SBIN="${PREFIX}/sbin" \
+   MALLOC=libc \
+   OPT="" \
+   OPTIMIZATION="" \
V=1
 
 FAKE_FLAGS =   INSTALL="${INSTALL_PROGRAM}" \
Index: patches/patch-deps_hiredis_Makefile
===
RCS file: /cvs/ports/databases/redis/patches/patch-deps_hiredis_Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 patch-deps_hiredis_Makefile
--- patches/patch-deps_hiredis_Makefile 9 Aug 2017 09:16:09 -   1.7
+++ patches/patch-deps_hiredis_Makefile 12 Apr 2018 21:19:00 -
@@ -1,31 +1,9 @@
 $OpenBSD: patch-deps_hiredis_Makefile,v 1.7 2017/08/09 09:16:09 dcoppa Exp $
+
 Index: deps/hiredis/Makefile
 --- deps/hiredis/Makefile.orig
 +++ deps/hiredis/Makefile
-@@ -38,9 +38,9 @@ export REDIS_TEST_CONFIG
- # Fallback to gcc when $CC is not in $PATH.
- CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo 
gcc')
- CXX:=$(shell sh -c 'type $(CXX) >/dev/null 2>/dev/null && echo $(CXX) || echo 
g++')
--OPTIMIZATION?=-O3
-+# OPTIMIZATION?=-O3
- WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
--DEBUG_FLAGS?= -g -ggdb
-+# DEBUG_FLAGS?= -g -ggdb
- REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(ARCH)
- REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
- 
-@@ -167,6 +167,10 @@ endif
- 
- INSTALL?= cp -a
- 
-+ifndef INSTALL_DIR
-+  INSTALL_DIR= mkdir -p
-+endif
-+
- $(PKGCONFNAME): hiredis.h
-   @echo "Generating $@ for pkgconfig..."
-   @echo prefix=$(PREFIX) > $@
-@@ -181,7 +185,7 @@ $(PKGCONFNAME): hiredis.h
+@@ -181,12 +181,12 @@ $(PKGCONFNAME): hiredis.h
@echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
  
  install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME)
@@ -34,3 +12,9 @@ Index: deps/hiredis/Makefile
$(INSTALL) hiredis.h async.h read.h sds.h adapters 
$(INSTALL_INCLUDE_PATH)
$(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIBNAME)
+   $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
+-  mkdir -p $(INSTALL_PKGCONF_PATH)
++  $(INSTALL_DIR) $(INSTALL_PKGCONF_PATH)
+   $(INSTALL) $(PKGCONFNAME) $(INSTALL_PKGCONF_PATH)
+ 
+ 32bit:
Index: patches/patch-deps_linenoise_Makefile
===
RCS file: patches/patch-deps_linenoise_Makefile
diff -N patches/patch-deps_linenoise_Makefile
--- patches/patch-deps_linenoise_Makefile   3 Dec 2013 06:50:17 -   
1.6
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,16 +0,0 @@
-$OpenBSD: patch-deps_linenoise_Makefile,v 1.6 2013/12/03 06:50:17 dcoppa Exp $
 deps/linenoise/Makefile.orig   Mon Dec  2 16:07:46 2013
-+++ deps/linenoise/MakefileTue Dec  3 07:52:03 2013
-@@ -1,10 +1,10 @@
- STD=
- WARN= -Wall
--OPT= -Os
-+# OPT= -Os
- 
- R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
- R_LDFLAGS= $(LDFLAGS)
--DEBUG= -g
-+# DEBUG= -g
- 
- R_CC=$(CC) $(R_CFLAGS)
- R_LD=$

Re: UPDATE: databases/redis 4.0.2 -> 4.0.8

2018-03-17 Thread Stuart Henderson
On 2018/03/17 08:33, Klemens Nanni wrote:
> Numerous critical bugs have piled up including data corruption, see
> https://raw.githubusercontent.com/antirez/redis/4.0/00-RELEASENOTES
> 
> Works fine in my setup, all tests passing on amd64.
> 
> Patches have been dropped or simplified a lot by passing variables
> through MAKE_ENV or adding to post-install instead,
> patch-src_mkreleasehdr_sh was useless on its own already.
> 
> Whitespace fixes, switch to HTTPS and minor reordering included, too.
> 
> Feedback? OK?

It's a lot to change in one go. The version update makes sense, but
I'm not sure about the rest of the shuffling (and in any event,
that sort of thing is better separated from a routine update).

> -MASTER_SITES =   http://download.redis.io/releases/
> +MASTER_SITES =   https://download.redis.io/releases/

curl: (7) Failed to connect to download.redis.io port 443: Connection refused

> +MAKE_FLAGS = DEBUG=${DEBUG} \
> + DEBUG_FLAGS=${DEBUG} \
> + DEPENDENCY_TARGETS="hiredis linenoise" \
> + INSTALL_SBIN="${PREFIX}/sbin" \
> + MALLOC=libc \
> + OPT= \
> + OPTIMIZATION= \
>   V=1

Overrides seem sensible for things like DEBUG (but should be quoted).
For things like DEPENDENCY_TARGETS it's better if a change in the upstream
Makefile causes a patch failure during an update because it will need to
be adapted anyway.

How about just

Index: Makefile
===
RCS file: /cvs/ports/databases/redis/Makefile,v
retrieving revision 1.100
diff -u -p -r1.100 Makefile
--- Makefile11 Jan 2018 19:27:02 -  1.100
+++ Makefile17 Mar 2018 09:49:31 -
@@ -1,10 +1,9 @@
 # $OpenBSD: Makefile,v 1.100 2018/01/11 19:27:02 rpe Exp $
 
 COMMENT =  persistent key-value database
-DISTNAME = redis-4.0.2
+DISTNAME = redis-4.0.8
 CATEGORIES =   databases
-HOMEPAGE = http://redis.io/
-REVISION = 0
+HOMEPAGE = https://redis.io/
 
 MAINTAINER =   David Coppa 
 
Index: distinfo
===
RCS file: /cvs/ports/databases/redis/distinfo,v
retrieving revision 1.78
diff -u -p -r1.78 distinfo
--- distinfo22 Sep 2017 05:46:35 -  1.78
+++ distinfo17 Mar 2018 09:49:31 -
@@ -1,2 +1,2 @@
-SHA256 (redis-4.0.2.tar.gz) = saCRXbyRuXnQbfGXf+WUw/qbGJ8fPTh0OilIyfdjSBM=
-SIZE (redis-4.0.2.tar.gz) = 1713990
+SHA256 (redis-4.0.8.tar.gz) = /ww4uMFWMZJJ/sYeUBjPW1/mOmW2FpC+x5j0yZjCMq0=
+SIZE (redis-4.0.8.tar.gz) = 1729973