Daniel Jakots <[email protected]> writes:

> Hi,

Hi,

> So I finally succeed in updating haproxy to 1.6 branch. Thanks to
> sthen@ and jca@ for their help.

yw :)

> Upstream removed a bunch of documentation files including the
> haproxy.cfg. I created a very simple one so a new user can easily test
> haproxy (or even to check an update is still working).

The config file looks good as is.  You could also add a bunch of
SSL-related stuff later, for the same reasons.

A time_t related issue appeared in dumpstats.c; below you'll find an
additional patch, are you fine with it?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/haproxy/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile    5 Nov 2015 20:00:24 -0000       1.25
+++ Makefile    9 Nov 2015 12:30:01 -0000
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.25 2015/11/05 20:00:24 jca Exp $
+# $OpenBSD: Makefile,v 1.20.4.1 2015/10/24 14:34:46 ajacoutot Exp $
 
 COMMENT =      reliable, high performance TCP/HTTP load balancer
 
-DISTNAME =     haproxy-1.5.15
+DISTNAME =     haproxy-1.6.2
 CATEGORIES =   net www
 HOMEPAGE =     http://www.haproxy.org/
 MAINTAINER =   Daniel Jakots <[email protected]>
@@ -12,7 +12,7 @@ PERMIT_PACKAGE_CDROM =                Yes
 
 WANTLIB =      c crypto pcre pcreposix ssl
 
-MASTER_SITES = ${HOMEPAGE}/download/1.5/src/
+MASTER_SITES = ${HOMEPAGE}/download/1.6/src/
 
 HAPROXYCONF =  ${SYSCONFDIR}/haproxy
 HAPROXYSTATE = /var/haproxy
@@ -35,16 +35,15 @@ MAKE_FLAGS +=       USE_PRIVATE_CACHE=1
 NO_TEST =      Yes
 LIB_DEPENDS =  devel/pcre
 
-DOCS =         architecture configuration gpl haproxy-en haproxy-fr lgpl
-EXAMPLES =     acl-content-sw content-sw-sample haproxy \
-                       option-http_proxy tarpit url-switching
+DOCS =         architecture configuration gpl lgpl
+EXAMPLES =     acl-content-sw content-sw-sample option-http_proxy 
 
 DOCSDIR =      ${PREFIX}/share/doc/haproxy
 EXAMPLESDIR =  ${PREFIX}/share/examples/haproxy
 
 
 pre-install:
-       ${SUBST_CMD} ${WRKSRC}/doc/haproxy.1 ${WRKSRC}/examples/haproxy.cfg
+       ${SUBST_CMD} ${WRKSRC}/doc/haproxy.1
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin
@@ -57,6 +56,7 @@ do-install:
 .for file in ${EXAMPLES}
        ${INSTALL_DATA} ${WRKSRC}/examples/${file}.cfg ${EXAMPLESDIR}
 .endfor
+       ${INSTALL_DATA} ${FILESDIR}/haproxy.cfg ${EXAMPLESDIR}
 
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/haproxy/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo    5 Nov 2015 20:00:24 -0000       1.13
+++ distinfo    9 Nov 2015 12:30:01 -0000
@@ -1,2 +1,2 @@
-SHA256 (haproxy-1.5.15.tar.gz) = WvRuFDhgHQkZ9WKAgfZg+VMwh9iK89knTyRTlUdWY+E=
-SIZE (haproxy-1.5.15.tar.gz) = 1356790
+SHA256 (haproxy-1.6.2.tar.gz) = vUp+7nnhv9Ja9Z2Va7YOgqy7bxRvP7OzBjYDb0yVSNM=
+SIZE (haproxy-1.6.2.tar.gz) = 1538976
Index: files/haproxy.cfg
===================================================================
RCS file: files/haproxy.cfg
diff -N files/haproxy.cfg
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/haproxy.cfg   9 Nov 2015 12:30:01 -0000
@@ -0,0 +1,25 @@
+global
+       log 127.0.0.1   local0 debug
+       maxconn 1024
+       chroot /var/haproxy
+       uid 604
+       gid 604
+       daemon
+       pidfile /var/run/haproxy.pid
+
+defaults
+       log     global
+       mode    http
+       option  httplog
+       option  dontlognull
+       option  redispatch
+       retries 3
+       maxconn 2000
+
+frontend haproxy
+       bind *:80
+       default_backend httpd
+
+backend httpd
+       option forwardfor
+       server www 127.0.0.1:8080 check
Index: patches/patch-examples_haproxy_cfg
===================================================================
RCS file: patches/patch-examples_haproxy_cfg
diff -N patches/patch-examples_haproxy_cfg
--- patches/patch-examples_haproxy_cfg  17 Jul 2008 04:31:45 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-$OpenBSD: patch-examples_haproxy_cfg,v 1.1.1.1 2008/07/17 04:31:45 jdixon Exp $
---- examples/haproxy.cfg.orig  Sat Jun 21 15:59:05 2008
-+++ examples/haproxy.cfg       Sun Jul 13 20:13:01 2008
-@@ -1,28 +1,30 @@
--# this config needs haproxy-1.1.28 or haproxy-1.2.1
- 
- global
-       log 127.0.0.1   local0
-       log 127.0.0.1   local1 notice
-       #log loghost    local0 info
--      maxconn 4096
--      chroot /usr/share/haproxy
--      uid 99
--      gid 99
-+      maxconn 1024
-+      chroot ${HAPROXYSTATE}
-+      uid ${HAPROXYUID}
-+      gid ${HAPROXYGID}
-       daemon
-       #debug
-       #quiet
-+      pidfile /var/run/haproxy.pid
- 
- defaults
-       log     global
-       mode    http
-       option  httplog
-       option  dontlognull
-+      option  redispatch
-       retries 3
--      redispatch
-       maxconn 2000
-       contimeout      5000
-       clitimeout      50000
-       srvtimeout      50000
-+      stats enable
-+      stats auth admin:mekmitasdigoat
- 
- listen        appli1-rewrite 0.0.0.0:10001
-       cookie  SERVERID rewrite
-@@ -59,22 +61,4 @@ listen      ssl-relay 0.0.0.0:8443
-       server  inst1 192.168.110.56:443 check inter 2000 fall 3
-       server  inst2 192.168.110.57:443 check inter 2000 fall 3
-       server  back1 192.168.120.58:443 backup
--
--listen        appli5-backup 0.0.0.0:10005
--      option  httpchk *
--      balance roundrobin
--      cookie  SERVERID insert indirect nocache
--      server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
--      server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
--      server  inst3 192.168.114.57:80 backup check inter 2000 fall 3
--      capture cookie ASPSESSION len 32
--      srvtimeout      20000
--
--      option  httpclose               # disable keep-alive
--      option  checkcache              # block response if set-cookie & 
cacheable
--
--      rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our 
internal IP address
--      
--      errorloc        502     http://192.168.114.58/error502.html
--      errorfile       503     /etc/haproxy/errors/503.http
- 
Index: patches/patch-src_dumpstats_c
===================================================================
RCS file: patches/patch-src_dumpstats_c
diff -N patches/patch-src_dumpstats_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_dumpstats_c       9 Nov 2015 12:30:01 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Fix time_t printing.
+
+--- src/dumpstats.c.orig       Mon Nov  9 03:54:23 2015
++++ src/dumpstats.c    Mon Nov  9 03:55:37 2015
+@@ -2766,13 +2766,13 @@ static void dump_servers_state(struct proxy *backend, 
+               chunk_appendf(buf,
+                               "%d %s "
+                               "%d %s %s "
+-                              "%d %d %d %d %ld "
++                              "%d %d %d %d %lld "
+                               "%d %d %d %d %d "
+                               "%d %d"
+                               "\n",
+                               backend->uuid, backend->id,
+                               srv->puid, srv->id, srv_addr,
+-                              srv->state, srv->admin, srv->uweight, 
srv->iweight, srv_time_since_last_change,
++                              srv->state, srv->admin, srv->uweight, 
srv->iweight, (long long)srv_time_since_last_change,
+                               srv->check.status, srv->check.result, 
srv->check.health, srv->check.state, srv->agent.state,
+                               bk_f_forced_id, srv_f_forced_id);
+ 
Index: patches/patch-src_ssl_sock_c
===================================================================
RCS file: patches/patch-src_ssl_sock_c
diff -N patches/patch-src_ssl_sock_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_ssl_sock_c        9 Nov 2015 12:30:01 -0000
@@ -0,0 +1,42 @@
+$OpenBSD$
+
+Commited upstream 
http://git.haproxy.org/?p=haproxy-1.6.git;a=commit;h=96414cce6acd7617bcbfedfa0584ebecb5404a30
+
+--- src/ssl_sock.c.orig        Tue Nov  3 11:22:06 2015
++++ src/ssl_sock.c     Fri Nov  6 09:53:11 2015
+@@ -714,7 +714,7 @@ out:
+ 
+ #endif
+ 
+-#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL)
++#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
+ 
+ #define CT_EXTENSION_TYPE 18
+ 
+@@ -1736,7 +1736,7 @@ static int ssl_sock_load_cert_file(const char *path, s
+       }
+ #endif
+ 
+-#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL)
++#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
+       if (sctl_ex_index >= 0) {
+               ret = ssl_sock_load_sctl(ctx, path);
+               if (ret < 0) {
+@@ -5348,7 +5348,7 @@ struct xprt_ops ssl_sock = {
+       .init     = ssl_sock_init,
+ };
+ 
+-#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL)
++#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
+ 
+ static void ssl_sock_sctl_free_func(void *parent, void *ptr, CRYPTO_EX_DATA 
*ad, int idx, long argl, void *argp)
+ {
+@@ -5381,7 +5381,7 @@ static void __ssl_sock_init(void)
+       SSL_library_init();
+       cm = SSL_COMP_get_compression_methods();
+       sk_SSL_COMP_zero(cm);
+-#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL)
++#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && 
!defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
+       sctl_ex_index = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, 
ssl_sock_sctl_free_func);
+ #endif
+       sample_register_fetches(&sample_fetch_keywords);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/haproxy/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   27 Aug 2012 13:03:06 -0000      1.3
+++ pkg/PLIST   9 Nov 2015 12:30:01 -0000
@@ -9,8 +9,6 @@ share/doc/haproxy/
 share/doc/haproxy/architecture.txt
 share/doc/haproxy/configuration.txt
 share/doc/haproxy/gpl.txt
-share/doc/haproxy/haproxy-en.txt
-share/doc/haproxy/haproxy-fr.txt
 share/doc/haproxy/lgpl.txt
 share/examples/haproxy/
 share/examples/haproxy/acl-content-sw.cfg
@@ -18,6 +16,4 @@ share/examples/haproxy/content-sw-sample
 share/examples/haproxy/haproxy.cfg
 @sample ${HAPROXYCONF}/haproxy.cfg
 share/examples/haproxy/option-http_proxy.cfg
-share/examples/haproxy/tarpit.cfg
-share/examples/haproxy/url-switching.cfg
 @rcscript ${RCDIR}/haproxy


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to