From patchwork Tue Jun 11 15:11:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7856 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VzBwh150Yz3ws3 for ; Tue, 11 Jun 2024 15:12:04 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VzBwf2kWrz1wq; Tue, 11 Jun 2024 15:12:02 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VzBwf0S0Fz334k; Tue, 11 Jun 2024 15:12:02 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VzBwb2LgPz2xK6 for ; Tue, 11 Jun 2024 15:11:59 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4VzBwZ4nyRz12x; Tue, 11 Jun 2024 15:11:58 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1718118718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5omo8zwwI4MNesnZrbmB/+UHsCAXLwG+3s6V/O8R1Zo=; b=LHJFEIbGgBCvHY2YaU0pVDSWcTtFfpMgP2cyrlCp4vg3N4KLn18YNsDJ3ZOkRISnKV+o9N PMh6zJ/Zhug57IDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1718118718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5omo8zwwI4MNesnZrbmB/+UHsCAXLwG+3s6V/O8R1Zo=; b=LUe7MWH5x2WeXV2wJp3ve7/dH1tl/L3gaA1YooJCZ900ig2O2jlBFHhz11kB3a2HlDqxvg J62E4J7dAIQcCK6cAXTsfx7tGd2vbEaUmHIPO2QdKnXyHuLWqAJnXY27Ti6dvvjDD1qXin K4zl5UnBpcqGzGJ25PRAaUF6dBGzTLryuXHM61Loy5X1pIGMIyhEeM8xpF+dfRt3P2wjYD 83vo8NWCnVNDyTPpe8lnzszGKH3fV+EZ77Ljr5o3kNagsEJ7Fm202Y69tvWszgUzo+TZTo hqzN51+l4S+TTBRwFwNnmwqccFvlKq2DT1yXGLXHQJfoPoqThVrekgyBjY+aGg== 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 Message-ID-Hash: 2FS2QYPU665YWNCSHLWWRWXZVOI3RJFQ X-Message-ID-Hash: 2FS2QYPU665YWNCSHLWWRWXZVOI3RJFQ X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - When ppp was updated from version 2.5.0 to e1266c7 I missed that a new configure option was introduced. This is --with-runtime-dir=DIR. - If this option is used then the run time directory for the pid files is defined by that DIR entry. If the option is not used then the pid directory is fixed as /var/run/pppd/ - Even if the --runstatedir=DIR option is used then it is ignored if the --with-runtime-dir=DIR option is used or not used even though both effectively 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 pid 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=/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/ as 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 needs to be modified. - I hope that @adamgibbo and @markadewwet will be able to test out this change in CU187 Testing when it is accepted. Those two users have got the pid error messages. - Even if the ppp pid file can not be stored ppp will still successfully start. However the likelihood is that stoppinf ppp will not work as would be expected. This patch ensures that ppp will be able to store its pid files asa required whyen starting 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-don-t-want-to-accidentally-leak-fds.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ppp/ppp-e1266c7-2-everywhere-O_CLOEXEC-harder.patch cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/ppp/ppp-2.5.0-3-everywhere-use-SOCK_CLOEXEC-when-creating-socket.patch @@ -84,6 +84,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --sysconfdir=/etc \ --with-logfile-dir=/var/log \ --localstatedir=/var \ + --with-runtime-dir=/var/run \ cc="gcc" \ cflags="$(CFLAGS)" cd $(DIR_APP) && make $(MAKETUNING)