From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] ppp: Fix definition of directory for pid files Date: Tue, 11 Jun 2024 17:11:50 +0200 Message-ID: <20240611151150.127838-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3786299938612590156==" List-Id: --===============3786299938612590156== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - When ppp was updated from version 2.5.0 to e1266c7 I missed that a new conf= igure option was introduced. This is --with-runtime-dir=3DDIR. - If this option is used then the run time directory for the pid files is def= ined by that DIR entry. If the option is not used then the pid directory is fixed as /v= ar/run/pppd/ - Even if the --runstatedir=3DDIR option is used then it is ignored if the --with-runtime-dir=3DDIR option is used or not used even though both effec= tively deal with the same aspect. - Some users in the forum had noticed that they had log messages saying that = pid files could not be created because the files or directories did not exist. The p= id files were being tried to be stored in /var/run/pppd/ but the pppd directory did= not exist. - This patch submission adds the --with-runtime-dir=3D/var/run option to the = ppp configure command. This basically makes ppp act the same as it used to do previously= with version 2.5.0 and earlier. - Changing IPFire to use /var/run/pppd/ is not a good idea as then there are = several locations in IPFire that specify the pid directory location to /var/run/ a= s hard coded path. All of these locations would need to be identified and changed. - Leaving IPFire to use /var/run means that only the ppp configure command ne= eds to be modified. - I hope that @adamgibbo and @markadewwet will be able to test out this chang= e in CU187 Testing when it is accepted. Those two users have got the pid error messag= es. - Even if the ppp pid file can not be stored ppp will still successfully star= t. However the likelihood is that stoppinf ppp will not work as would be expected. Th= is patch ensures that ppp will be able to store its pid files asa required whyen st= arting up. Signed-off-by: Adolf Belka --- lfs/ppp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lfs/ppp b/lfs/ppp index a16859002..9290a7c41 100644 --- a/lfs/ppp +++ b/lfs/ppp @@ -72,7 +72,7 @@ $(subst %,%_BLAKE2,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && ./autogen.sh + cd $(DIR_APP) && autoreconf -vfi cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/ppp/ppp-2.5.0-1-we-do= n-t-want-to-accidentally-leak-fds.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ppp/ppp-e1266c7-2-eve= rywhere-O_CLOEXEC-harder.patch cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/ppp/ppp-2.5.0-3-every= where-use-SOCK_CLOEXEC-when-creating-socket.patch @@ -84,6 +84,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --sysconfdir=3D/etc \ --with-logfile-dir=3D/var/log \ --localstatedir=3D/var \ + --with-runtime-dir=3D/var/run \ cc=3D"gcc" \ cflags=3D"$(CFLAGS)" cd $(DIR_APP) && make $(MAKETUNING) --=20 2.45.2 --===============3786299938612590156==--