Distro maintainers: any interest in backporting EXTRAVERSION ?

2020-09-30 Thread Willy Tarreau
Hi all,

after discussing with some of my coworkers who were adding a few paches
to their local package builds, we figured that in their case the SUBVERS
field was not being updated as doing so was quite painful. I realized
that we simply reached exactly the same situation as the linux kernel
where the subversion got filled automatically and it required to append
the local version into another string!

In order to simplify this, I added a new EXTRAVERSION variable so that
you can simply do this if you're dealing with a local patch queue:

   $ make TARGET=foo EXTRAVERSION=+$(quilt applied|wc -l)

and get:

   2.3-dev5-5018aa-15+1

It could also be used to indicate a feature set (e.g. -debug, etc).

Since the patch is trivial (it mechanically adds $(EXTRAVERSION) after
all $(SUBVERS)), I was wondering if there's any interest for distro
maintainers in it being backported, and if so, how far. Those interested,
please just let me know.

Willy



Re: [PATCH] BUILD: makefile: Enable closefrom() support on Solaris

2020-09-30 Thread Brad Smith

On 9/30/2020 4:22 PM, Илья Шипицин wrote:

there also several documentation files like this one
https://github.com/haproxy/haproxy/blob/master/INSTALL#L159 



can you please review documentation as well ?


That seems to be the only file. I will update the relevant bits there too.

Thanks.




Re: [PATCH] BUILD: makefile: Enable closefrom() support on Solaris

2020-09-30 Thread Илья Шипицин
there also several documentation files like this one
https://github.com/haproxy/haproxy/blob/master/INSTALL#L159

can you please review documentation as well ?

чт, 1 окт. 2020 г. в 00:49, Brad Smith :

> Solaris 9 (released 2002) added support for closefrom().
>
> I bumped the version in the comment to 10 as the default feature
> flags already has event ports enabled which were introduced in
> Solaris 10.
>
>
> diff --git a/Makefile b/Makefile
> index 197126db5..e7d716dd3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -353,12 +353,11 @@ ifneq ($(shell echo __arm__/__aarch64__ | $(CC) -E
> -xc - | grep '^[^\#]'),__arm_
>  endif
>  endif
>
> -# Solaris 8 and above
> +# Solaris 10 and above
>  ifeq ($(TARGET),solaris)
> -  # We also enable getaddrinfo() which works since solaris 8.
>set_target_defaults = $(call default_opts, \
>  USE_POLL USE_TPROXY USE_LIBCRYPT USE_CRYPT_H USE_GETADDRINFO
> USE_THREAD \
> -USE_RT USE_OBSOLETE_LINKER USE_EVPORTS)
> +USE_RT USE_OBSOLETE_LINKER USE_EVPORTS USE_CLOSEFROM)
>TARGET_CFLAGS  = -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500
> -D__EXTENSIONS__
>TARGET_LDFLAGS = -lnsl -lsocket
>  endif
>
>


[PR] SOCKS4(A)

2020-09-30 Thread PR Bot
Dear list!

Author: alexzk1 
Number of patches: 30

This is an automated relay of the Github pull request:
   SOCKS4(A)

Patch title(s): 
   trying to resolve server domain using SOCKS4A
   added htonl for IP
   fixed access to non-existing address
   more checks
   moved domen dump to backend
   fixed wrong paste in wrong file
   added error message
   updated error text
   made socks4 to use fake 10.10.10.10
   moved struct socks4_request back to header as it could have alignment there
   added domain to debug out
   removed htonl call for fake ip
   fixed user_length
   added explicit #pragma pack
   added debug out of socks4a header
   added back htonl
   fixed userid, domain must follow it, not replace
   made single block send for socks4a
   updated debug text
   fixed "correction"
   removed extra if ()?:
   changed dumper to use unsigned char*
   updated debug text
   removed closing domain string in connection
   updated debug texts, added domain set to tcp check
   updated conn_set_domain to allow nullptr which just frees then, moved 
conn_set_domain in tcp_check as it can be couple cases
   updated debug text
   moved fake host definitions to separated file, made connection check for 
fake IP not conditional to debug
   updated debug output
   more text update

Link:
   https://github.com/haproxy/haproxy/pull/883

Edit locally:
   wget https://github.com/haproxy/haproxy/pull/883.patch && vi 883.patch

Apply locally:
   curl https://github.com/haproxy/haproxy/pull/883.patch | git am -

Description:
   So I completely understand that you will dislike what my formatter did
   there, but you can just reject. I don't care as it was paid update.
   So what it do:
   1. adds support for socks4A, if it cannot resolve
   dns localy it does ..read file "fake_host.h"
   2. you forgot to
   copy-paste setup from "backend.c" to "tcpcheck.c" for socks4. So since
   2.1 it does not do check over socks.
   I fixed that and removed
   copy-paste by doing function.
   Also it is generic rule, if any
   piece of code met twice -> do a function. 90% of your current can be
   changed in that way.
   3. and at then end I have rhetoric question:
   if you invented there virtual functions and virtual table, why the
   hell you keep using C and don't switch to C++ ?

Instructions:
   This github pull request will be closed automatically; patch should be
   reviewed on the haproxy mailing list (haproxy@formilux.org). Everyone is
   invited to comment, even the patch's author. Please keep the author and
   list CCed in replies. Please note that in absence of any response this
   pull request will be lost.



[PATCH] BUILD: makefile: Enable closefrom() support on Solaris

2020-09-30 Thread Brad Smith
Solaris 9 (released 2002) added support for closefrom().

I bumped the version in the comment to 10 as the default feature
flags already has event ports enabled which were introduced in
Solaris 10.


diff --git a/Makefile b/Makefile
index 197126db5..e7d716dd3 100644
--- a/Makefile
+++ b/Makefile
@@ -353,12 +353,11 @@ ifneq ($(shell echo __arm__/__aarch64__ | $(CC) -E -xc - 
| grep '^[^\#]'),__arm_
 endif
 endif
 
-# Solaris 8 and above
+# Solaris 10 and above
 ifeq ($(TARGET),solaris)
-  # We also enable getaddrinfo() which works since solaris 8.
   set_target_defaults = $(call default_opts, \
 USE_POLL USE_TPROXY USE_LIBCRYPT USE_CRYPT_H USE_GETADDRINFO USE_THREAD \
-USE_RT USE_OBSOLETE_LINKER USE_EVPORTS)
+USE_RT USE_OBSOLETE_LINKER USE_EVPORTS USE_CLOSEFROM)
   TARGET_CFLAGS  = -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500 
-D__EXTENSIONS__
   TARGET_LDFLAGS = -lnsl -lsocket
 endif



Re: Easy but useful feature missing, anyone interested ?

2020-09-30 Thread Amaury Denoyelle
Willy Tarreau  wrote:

> Hi all,
> while revisiting pending issues, I've come across this one, about
> the impossibility for an environment variable to produce multiple
> words in the configuration:
> https://github.com/haproxy/haproxy/issues/165
> It can be trivially addressed by adding support for ${VAR[*]} to the
> config language. This addition is relatively simple to do, roughly
> speaking, simply add the code in parse_line() in the "if" block dealing
> with "$", detect the presence of '[', terminate the variable name here,
> raise a flag, then once the variable is resolved, increase arg for each
> space found.
> We've missed it for 2.2 already, it would be nice if someone interested
> in this feature could have a look at it before we release 2.3. I'm OK
> with merging it slightly late given that the side effects are quickly
> tested.

FIY, I have looked upon the issue and seems to have now a working
implementation. I will probably be able to produce a clean patch soon.

-- 
Amaury Denoyelle



Re: [PATCH] BUILD: makefile: Fix building with closefrom() support enabled

2020-09-30 Thread Willy Tarreau
On Wed, Sep 30, 2020 at 01:04:48AM -0400, Brad Smith wrote:
> I noticed the USE_CLOSEFROM define was not being passed along like the rest
> during the build.
(...)

Not that much surprised considering it's seldom used. Now applied with
your backport note. Thanks!

Willy



Re: Easy but useful feature missing, anyone interested ?

2020-09-30 Thread Willy Tarreau
On Wed, Sep 30, 2020 at 08:40:40AM +0200, Amaury Denoyelle wrote:
> At the moment I'm always interested to add simple feature, but I also
> would like to progress with my patch serie on stats so I'm not sure if I
> will have the time for this :/

Yes please, I'd like to merge your final stats series ASAP so that we
still have a bit of time left for final adjustments before the release.

Willy



Re: Easy but useful feature missing, anyone interested ?

2020-09-30 Thread Amaury Denoyelle
Willy Tarreau  wrote:

> Hi all,
> while revisiting pending issues, I've come across this one, about
> the impossibility for an environment variable to produce multiple
> words in the configuration:
> https://github.com/haproxy/haproxy/issues/165
> It can be trivially addressed by adding support for ${VAR[*]} to the
> config language. This addition is relatively simple to do, roughly
> speaking, simply add the code in parse_line() in the "if" block dealing
> with "$", detect the presence of '[', terminate the variable name here,
> raise a flag, then once the variable is resolved, increase arg for each
> space found.
> We've missed it for 2.2 already, it would be nice if someone interested
> in this feature could have a look at it before we release 2.3. I'm OK
> with merging it slightly late given that the side effects are quickly
> tested.
> In the same vein, I've long been saying that we're missing an ifdef
> mechanism, but if we had $(if,cond,true,false) like makefiles, we could
> already do a lot, particularly in the regtests. There's quite more work
> here (define expressions for the condition, internal variable names for
> version and builtin options, recursive resolving of variable names), but
> it's likely that the same person(s) might be interested.
> If someone's interested in having a look at that, please let me know.
> There's no shame in trying and not succeeding, don't worry :-)

At the moment I'm always interested to add simple feature, but I also
would like to progress with my patch serie on stats so I'm not sure if I
will have the time for this :/

-- 
Amaury Denoyelle