installing Squid: /run dir creation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

installing Squid: /run dir creation

Vieri
Hi,

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?

Shouldn't the /run/* files be created at runtime anyway?

The /run dir is also created by the OS.

Thanks,

Vieri
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: installing Squid: /run dir creation

Amos Jeffries
Administrator
On 29/01/19 11:56 pm, Vieri wrote:

> Hi,
>
> 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
absolutely anywhere.


> 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.


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: installing Squid: /run dir creation

Vieri

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:

--with-pidfile=/run/squid.pid

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.

Thanks,

Vieri
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: installing Squid: /run dir creation

Vieri
In reply to this post by Amos Jeffries
I can add the following info to my previous e-mail. Here's the configure command (the pid file name is always the same -- other options may vary according to user preferences or system deps):

$ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/squid-4.5 --htmldir=/usr/share/doc/squid-4.5/html --with-sysroot=/ --libdir=/usr/lib64 --sysconfdir=/etc/squid --libexecdir=/usr/libexec/squid --localstatedir=/var --with-pidfile=/run/squid.pid --datadir=/usr/share/squid --with-logdir=/var/log/squid --with-default-user=squid --enable-removal-policies=lru,heap --enable-storeio=aufs,diskd,rock,ufs --enable-disk-io --enable-auth-basic=NCSA,POP3,getpwnam,SMB,SMB_LM,LDAP,PAM,RADIUS --enable-auth-digest=file,LDAP,eDirectory --enable-auth-ntlm=SMB_LM --enable-auth-negotiate=kerberos,wrapper --enable-external-acl-helpers=file_userip,session,unix_group,delayer,time_quota,wbinfo_group,LDAP_group,eDirectory_userip,kerberos_ldap_group --enable-log-daemon-helpers --enable-url-rewrite-helpers --enable-cache-digests --enable-delay-pools --enable-eui --enable-icmp --enable-follow-x-forwarded-for --with-large-files --with-build-environment=default --disable-strict-error-checking --disable-arch-native --with-included-ltdl=/usr/include --with-ltdl-libdir=/usr/lib64 --with-libcap --enable-ipv6 --disable-snmp --with-openssl --with-nettle --with-gnutls --enable-ssl-crtd --disable-ecap --disable-esi --enable-htcp --enable-wccp --enable-wccpv2 --enable-linux-netfilter --enable-zph-qos --with-netfilter-conntrack --with-mit-krb5 --without-heimdal-krb5

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users