Closed Corin-EU closed 2 years ago
Upon further investigation, I made a mistake above about the behavior of configure.
For this project there is a fixed Makefile which pulls in the variables from Makedefs.
When I run configure with
configure --prefix=/usr/local --localstatedir=/var --sharedstatedir=/run
the Makedefs file is generated with localstatedir and sharestedir withthe correct values of "/var" and "/run" but the problem remains that the generated "config.h" does not contain these values but the default values of "/usr/local/var" and "/usr/local/var/run" so the problem is at the level of the generation of the config.h
@Corin-EU I will update the defaults for this to use the localstatedir value (sharedstatedir never gets used), but I explicitly made these separate configure options (--with-papplstatedir
and --with-papplsockdir
) since these are the directories other applications will end up using and not necessarily where PAPPL gets installed...
[master 15bd0cd] Fix default values of PAPPL_SOCKDIR and PAPPL_STATEDIR, also update CUPS_SERVERROOT on macOS (Issue #219)
Thank you for the fix.
This relates to the latest papl r.1446335
As is standard for the GNU autotools "configure" script, parameters are provided to set paths, eg
as well as others so that the prefix (default /usr/local)
However the paths for the state and run directories are hardcoded in config.h.in and config.h
It would be helpful if this code was modified to use those values as backups if the symbolic constants are not defined by the Makefile invocation which gets the specified value via localstatedir and runstatedir parameters when the Makefile is created by the configure script.
However as a test I deleted the Makefile, ran configure but no Makefile was created as is normally expected for the execution of configure.
Also, I edited the config.h.in file which I thought was being used to create the config.h and after editing it to change the STATEDIR and SOCKDIR paths, and then running confgure found that it had made no difference, so it appears that those lines in config.h.in are being iignored and configure is just stuffing the prefix value + var [+ run] into config.h regardless of the localstatedir and runstatedir being specified.
Although /usr/local/var and /usr/local/var/run are consistent with the default prefix /usr/local, I would suggest that for practical use, the defaults should be the system /var and system /run (/var/run is now almost always a symbolic link to /run, a transitory tmpfs directory)