dynomite icon indicating copy to clipboard operation
dynomite copied to clipboard

sysconfdir not honored by configure script

Open breauxaj opened this issue 7 years ago • 3 comments

Trying to build the project for CentOS as an RPM and when executing the configure script with:

./configure
--prefix=%{_sysconfdir}/%{name}
--exec-prefix=%{_prefix}
--bindir=%{_bindir}
--sbindir=%{_sbindir}
--mandir=%{_mandir}
--libdir=%{_libdir}
--sysconfdir=%{_sysconfdir}/%{name}

The values never seem to propagate to the resulting binary. The error reported:

conf_open:1664 conf: failed to open configuration 'conf/dynomite.yml': No such file or directory

If _sysconfdir was being used, it should be /etc/dynomite and not simply conf as the error reports.

breauxaj avatar Apr 20 '17 15:04 breauxaj

@breauxaj how are you running dynomite?

Since this project as been adapted and I lack the expertise in autoconf, and other build process, but I am investigating on how to do this with minimal regression or whether it should be done at all. I see I need to add AM_CPPFLAGS += -DSYSCONFDIR='$(sysconfdir)' to the makefile.am and use that in the code. I also see the conf file is default to conf/dynomite.yml. If you provide the conf file as -c arg, it should work.

shailesh33 avatar Apr 20 '17 22:04 shailesh33

The application builds successfully but assumes it will be deployed as is instead of packaged. This limits its adoption. I'm proposing that fixing these issues will increase it's potential audience.

If I run the application after build, it finds the config file, etc since its still in the build tree but that's not the way to deploy software. I'm following the RedHat model for deploying application software, putting the binary in /usr/bin, putting the configuration in /etc/dynomite, etc. By supporting the parameters, a builder can package this consistently.

breauxaj avatar Apr 21 '17 00:04 breauxaj

Hello. I've done my best to implement the functionality from the topic without a backward compatibility breaking in #604. Could you take a look, please, @ipapapa or @smukil ?

Felixoid avatar Sep 12 '18 10:09 Felixoid