> My Linux distro warns me that when trying to install Squid an attempt is made to write to a "volatile" dir.
> The Makefile in the src subdir contains:
> $(mkinstalldirs) $(DESTDIR)`dirname $(DEFAULT_PID_FILE)`
> The default PID file being /run/squid.pid, the above tries to make the /run dir.
> Is it necessary to keep this in the Makefile?
Yes. The path is configurable with --with-pidfile=PATH, so it can be
> Shouldn't the /run/* files be created at runtime anyway?
> The /run dir is also created by the OS.
The Squid default path for this file is $localstatedir/run/squid.pid as
specified by older versions of FHS. It is not clear whether your local
state dir is '/' or the above option is being used to place it exactly.
Normally these would expand to /var/run/squid.pid.
It would help to have a hint about what OS you are using and what
./configure parameters you used.
Please be aware that Makefile are auto-generated. Only a small portion
of their contents is anything we wrote and attempts at patching can be
erased midway through a build by the toolchain detecting files as out of
sync with the actual source.
On Tuesday, January 29, 2019, 1:06:22 PM GMT+1, Amos Jeffries <[hidden email]> wrote:
>> Is it necessary to keep this in the Makefile?
> Yes. The path is configurable with --with-pidfile=PATH, so it can be
> absolutely anywhere.
> It would help to have a hint about what OS you are using and what
> /configure parameters you used.
I'm using Gentoo and the ebuild (package manager) hardcodes the PID file name when calling the configure script:
So if this is the case then maybe it would make sense to remove that mkinstalldirs line in the Makefile, at least only downstream by the Gentoo devs as a patch before configuring/compiling.
Makefiles might change in the future, but that would be up to the Gentoo devs to update.
I don't know for sure yet if this is why Gentoo "warns" me that the Squid installation is trying to write to /run, or if there are other parts of the installation code that might do so too.
I'll make a few tests first, but correct me if I'm wrog when I say that if one *always* passes the same PID file path to the configure script then that mkinstalldirs can be safely removed from the Makefile.