Hi Jeff, 

That was my 1st time doing that, but apparently it has been already merged. 
Regarding scripts/fixconfig.in it has been merged as well. This is better than 
nothing, but my comment was, while it fixes the issue, is IMHO a bad solution 
and I was asking for better solution. 

If a skilled autoconf developer is reading this, please help as IMHO, it's an 
easy fix for someone that is used in autotools. 

To be more precise, I'm using @envdir@ and @runstatedir@ to set correct paths 
in systemd service files. 
This support is added in fixconfig.in, and IMHO, I think that it's bad doing 
everything here. 
The sed of course is needed, but the 
runstatedir="@localstatedir@/run" and the if -d "@sysconfigdir@/sysconfig" used 
to set envdir should be moved to configure.ac IMHO 

That would permit to set them using --runstatedir and --envdir in the 
./configure script. 
In the fixconfig.in we should only have 
runstatedir="@runstatedir@" 
envdir="@envdir@" 
... 
$SED -e ... 
... 

I have absolutely no skills (or almost none) in autotools unfortunately, 
otherwise I would have fixed that as well for a clean config. 
Right now, as sysconfigdir is set to points to /etc/ganglia, the env files goes 
to /etc/ganglia/sysconfig/gmetad which is strange and not FSH compliant I 
suppose. 

In configure.ac, we should handle the 2 following parameters: 
1/ --runstatedir set to /var/run by default. 
Note that autoconf >= 2.70 handles that by default, so either we required 
autoconf 2.70 => AC_PREREQ(2.70) (see if it's acceptable: rhel-6 which is an 
old distro has 2.63 for instance) or we set @runstatedir@ to 
@localstatedir@/run (making sure that is autoconf >=2.60 is used it doesn't 
conflict. 

2/ --envdir set to /etc/sysconfig on a redhat variant or /etc/default on a 
debian variant. 
I think that for that, the correct test is to 1st test /etc/sysconfig and use 
it if present. Indeed, /etc/default is also present on redhat variants due to 
some bad packaging that do not fix hardcoded debian env directory. In the 
opposite, on debian variant, I've never seen any /etc/sysconfig directory. 
That's why I think that the safest way to test is to test for /etc/sysconfig 
and there after /etc/default. 
This directory contains files that are sourced before starting a daemon (either 
using init script or systemd service) to set its environment. 

Aside that, (IMHO), I think that installing config files in @sysconfdir@ is a 
bad thing as it forces the installation to use the --syconfdir=/etc/ganglia and 
also triggers problems when dealing with envdir for exemple. IMHO, config files 
should be installed in @sysconfdir@/ganglia. this would result in the same 
installation except that --syconfdir=/etc/ganglia would not be required anymore 
and could be used to install init scripts using Makefile instead of doing so 
thru the packaging files. the systemd logic exists (HAVE_SYSTEMD), aand thus, 
depending on systemd or not, the make install would install the init scripts or 
the service files accordingly. 

Thanks a lot for so long reading and help. 

Best regards, 

Olivier. 
----- Mail original -----

> De: "Jeff Buchbinder" <rufustfire...@gmail.com>
> À: "olivier lahaye1" <olivier.laha...@free.fr>
> Cc: "Ganglia Developers" <ganglia-developers@lists.sourceforge.net>
> Envoyé: Jeudi 27 Février 2014 21:31:40
> Objet: Re: [Ganglia-developers] request to merge some corrective
> patches (specfile, systemd service files, INSTALL, fixconfig)

> On Thu, Feb 27, 2014 at 2:26 PM, < olivier.laha...@free.fr > wrote:

> > Hi Jeff,
> 

> > I think I committed to my fork and sent a pull request.
> 
> > Can you see my pull request?
> 

> It isn't showing up here :
> https://github.com/ganglia/monitor-core/pulls

> Are you sure that you created a new pull request?

> Jeff
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to