Re: Haproxy: support for Haiku

2015-11-02 Thread Jérôme Duval
2015-11-01 21:27 GMT+01:00 Willy Tarreau :
> Ah OK indeed! Then that's fine. I'd prefer to split your patch in two
> because then it fixes a bug since the installation is forced on platforms
> which do not build it and will necessarily result in an error. And of
> course, I'm seeing that just a few minutes after I've tagged 1.5.15, as
> usual :-/

I agree, two commits are better in this case.

>
> If you can split it, I'd appreciate it, otherwise I'll do it once I'm
> done with the 1.5.15 changelog and announce.

Here is an updated patchset for git HEAD.

Bye,
Jérôme


haproxy-1.7.0.git.patchset
Description: Binary data


Re: Haproxy: support for Haiku

2015-11-02 Thread Willy Tarreau
Hi Jérôme,

On Mon, Nov 02, 2015 at 06:21:31PM +0100, Jérôme Duval wrote:
> 2015-11-01 21:27 GMT+01:00 Willy Tarreau :
> > Ah OK indeed! Then that's fine. I'd prefer to split your patch in two
> > because then it fixes a bug since the installation is forced on platforms
> > which do not build it and will necessarily result in an error. And of
> > course, I'm seeing that just a few minutes after I've tagged 1.5.15, as
> > usual :-/
> 
> I agree, two commits are better in this case.
> 
> >
> > If you can split it, I'd appreciate it, otherwise I'll do it once I'm
> > done with the 1.5.15 changelog and announce.
> 
> Here is an updated patchset for git HEAD.

Nice, I've merged the new target into 1.7-dev and the bug into 1.7, 1.6,
and 1.5.

Thank you!
Willy




Haproxy: support for Haiku

2015-11-01 Thread Jérôme Duval
Hello all,

here is a patch to add Haiku as a supported target. It builds against
git version.
* links against libnetwork.so when target is Haiku
* don't install the systemd-wrapper for all platforms, replace it with
$(EXTRA) like the "all" target already does.

Please consider applying.

Best regards,
Jerome Duval


haproxy-1.7.0.git.patchset
Description: Binary data


Re: Haproxy: support for Haiku

2015-11-01 Thread Willy Tarreau
On Sun, Nov 01, 2015 at 09:20:53PM +0100, Jérôme Duval wrote:
> Hello Willy,
> 
> 2015-11-01 20:20 GMT+01:00 Willy Tarreau :
> > On Sun, Nov 01, 2015 at 01:18:00PM +0100, Jérôme Duval wrote:
> >> * don't install the systemd-wrapper for all platforms, replace it with
> >> $(EXTRA) like the "all" target already does.
> >
> > This case is not specific to your operating system, in fact only a
> > minority of platforms need the systemd-wrapper. I personally build
> > with "make ... EXTRA=" to avoid building it and installing it. I
> > think we took the wrong approach by enabling it by default, since
> > we're bothering all platforms. We should probably change this to
> > have a "linux-systemd" target which enables it.
> >
> > If nobody objects, I'd rather do that so that you don't have to add
> > a specific if/elif/endif just for this. What do you think ?
> 
> EXTRA is already correctly set to haproxy-systemd-wrapper for
> platforms which might care (linux26 and linux2628). Please note that
> the systemd-wrapper isn't built by default, only installed by default,
> which is the problem I met, and tried to fix in this patch (I could
> have better worded my commit message). I hope it helps.

Ah OK indeed! Then that's fine. I'd prefer to split your patch in two
because then it fixes a bug since the installation is forced on platforms
which do not build it and will necessarily result in an error. And of
course, I'm seeing that just a few minutes after I've tagged 1.5.15, as
usual :-/

If you can split it, I'd appreciate it, otherwise I'll do it once I'm
done with the 1.5.15 changelog and announce.

Thanks!
Willy




Re: Haproxy: support for Haiku

2015-11-01 Thread Vincent Bernat
 ❦  1 novembre 2015 21:21 +0100, Willy Tarreau  :

>> > If nobody objects, I'd rather do that so that you don't have to add
>> > a specific if/elif/endif just for this. What do you think ?
>> 
>> On the other hand, it is not really systemd-specific (and could be made
>> not Linux-specific if it wasn't using /proc/self/exe to find its own
>> name). It could be useful on other systems as well, as a way to turn
>> HAProxy into a "regular" daemon. It could also be used to simplify the
>> current init.d script. I could be renamed to just "haproxy-wrapper".
>
> Sure, I've thought the same, but always with the same question in the
> end : "for what purpose ?". If we provide binaries which provide useless
> features whose purpose cannot easily be explained to their users, probably
> the binary in question should not be there. If it provides a real benefit,
> then that's different, it's a matter of packaging choice and we should not
> remove it by default. Given that I never needed it and still failed to see
> a benefit outside of systemd, I'm inclined to think we don't need it, but
> I could be wrong.

The current scripts work fine, so, yes, there is little interest in
adding a binary to do the same thing. It could be useful with other
supervisors (like supervisor, runit) or inside containers.

I don't use it outside systemd either, so it was just an idea. It can be
removed from the default build until someone needs it outside systemd
(and provide the patches to make it generic).
-- 
Keep it simple to make it faster.
- The Elements of Programming Style (Kernighan & Plauger)



Re: Haproxy: support for Haiku

2015-11-01 Thread Willy Tarreau
Hello Jérôme,

On Sun, Nov 01, 2015 at 01:18:00PM +0100, Jérôme Duval wrote:
> Hello all,
> 
> here is a patch to add Haiku as a supported target. It builds against
> git version.
> * links against libnetwork.so when target is Haiku

Thanks,

> * don't install the systemd-wrapper for all platforms, replace it with
> $(EXTRA) like the "all" target already does.

This case is not specific to your operating system, in fact only a
minority of platforms need the systemd-wrapper. I personally build
with "make ... EXTRA=" to avoid building it and installing it. I
think we took the wrong approach by enabling it by default, since
we're bothering all platforms. We should probably change this to
have a "linux-systemd" target which enables it.

If nobody objects, I'd rather do that so that you don't have to add
a specific if/elif/endif just for this. What do you think ?

Thanks,
Willy




Re: Haproxy: support for Haiku

2015-11-01 Thread Willy Tarreau
On Sun, Nov 01, 2015 at 09:37:50PM +0100, Vincent Bernat wrote:
>  ???  1 novembre 2015 21:21 +0100, Willy Tarreau  :
> 
> >> > If nobody objects, I'd rather do that so that you don't have to add
> >> > a specific if/elif/endif just for this. What do you think ?
> >> 
> >> On the other hand, it is not really systemd-specific (and could be made
> >> not Linux-specific if it wasn't using /proc/self/exe to find its own
> >> name). It could be useful on other systems as well, as a way to turn
> >> HAProxy into a "regular" daemon. It could also be used to simplify the
> >> current init.d script. I could be renamed to just "haproxy-wrapper".
> >
> > Sure, I've thought the same, but always with the same question in the
> > end : "for what purpose ?". If we provide binaries which provide useless
> > features whose purpose cannot easily be explained to their users, probably
> > the binary in question should not be there. If it provides a real benefit,
> > then that's different, it's a matter of packaging choice and we should not
> > remove it by default. Given that I never needed it and still failed to see
> > a benefit outside of systemd, I'm inclined to think we don't need it, but
> > I could be wrong.
> 
> The current scripts work fine, so, yes, there is little interest in
> adding a binary to do the same thing. It could be useful with other
> supervisors (like supervisor, runit) or inside containers.
> 
> I don't use it outside systemd either, so it was just an idea. It can be
> removed from the default build until someone needs it outside systemd
> (and provide the patches to make it generic).

Jérôme made me realize it was removed already, the issue was the install-bin
target which was still trying to install it even when not built. So that's
a fix instead.

Cheers,
Willy




Re: Haproxy: support for Haiku

2015-11-01 Thread Vincent Bernat
 ❦  1 novembre 2015 20:20 +0100, Willy Tarreau  :

> This case is not specific to your operating system, in fact only a
> minority of platforms need the systemd-wrapper. I personally build
> with "make ... EXTRA=" to avoid building it and installing it. I
> think we took the wrong approach by enabling it by default, since
> we're bothering all platforms. We should probably change this to
> have a "linux-systemd" target which enables it.
>
> If nobody objects, I'd rather do that so that you don't have to add
> a specific if/elif/endif just for this. What do you think ?

On the other hand, it is not really systemd-specific (and could be made
not Linux-specific if it wasn't using /proc/self/exe to find its own
name). It could be useful on other systems as well, as a way to turn
HAProxy into a "regular" daemon. It could also be used to simplify the
current init.d script. I could be renamed to just "haproxy-wrapper".
-- 
Use the fundamental control flow constructs.
- The Elements of Programming Style (Kernighan & Plauger)



Re: Haproxy: support for Haiku

2015-11-01 Thread Willy Tarreau
Hi Vincent,

On Sun, Nov 01, 2015 at 09:09:46PM +0100, Vincent Bernat wrote:
>  ???  1 novembre 2015 20:20 +0100, Willy Tarreau  :
> 
> > This case is not specific to your operating system, in fact only a
> > minority of platforms need the systemd-wrapper. I personally build
> > with "make ... EXTRA=" to avoid building it and installing it. I
> > think we took the wrong approach by enabling it by default, since
> > we're bothering all platforms. We should probably change this to
> > have a "linux-systemd" target which enables it.
> >
> > If nobody objects, I'd rather do that so that you don't have to add
> > a specific if/elif/endif just for this. What do you think ?
> 
> On the other hand, it is not really systemd-specific (and could be made
> not Linux-specific if it wasn't using /proc/self/exe to find its own
> name). It could be useful on other systems as well, as a way to turn
> HAProxy into a "regular" daemon. It could also be used to simplify the
> current init.d script. I could be renamed to just "haproxy-wrapper".

Sure, I've thought the same, but always with the same question in the
end : "for what purpose ?". If we provide binaries which provide useless
features whose purpose cannot easily be explained to their users, probably
the binary in question should not be there. If it provides a real benefit,
then that's different, it's a matter of packaging choice and we should not
remove it by default. Given that I never needed it and still failed to see
a benefit outside of systemd, I'm inclined to think we don't need it, but
I could be wrong.

Regards,
Willy




Re: Haproxy: support for Haiku

2015-11-01 Thread Jérôme Duval
Hello Willy,

2015-11-01 20:20 GMT+01:00 Willy Tarreau :
> On Sun, Nov 01, 2015 at 01:18:00PM +0100, Jérôme Duval wrote:
>> * don't install the systemd-wrapper for all platforms, replace it with
>> $(EXTRA) like the "all" target already does.
>
> This case is not specific to your operating system, in fact only a
> minority of platforms need the systemd-wrapper. I personally build
> with "make ... EXTRA=" to avoid building it and installing it. I
> think we took the wrong approach by enabling it by default, since
> we're bothering all platforms. We should probably change this to
> have a "linux-systemd" target which enables it.
>
> If nobody objects, I'd rather do that so that you don't have to add
> a specific if/elif/endif just for this. What do you think ?

EXTRA is already correctly set to haproxy-systemd-wrapper for
platforms which might care (linux26 and linux2628). Please note that
the systemd-wrapper isn't built by default, only installed by default,
which is the problem I met, and tried to fix in this patch (I could
have better worded my commit message). I hope it helps.

Bye,
Jérôme