All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexis Lothoré via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Bernd Kuhls <bernd@kuhls.net>,
	Nicolas Carrier <nicolas.carrier@nav-timing.safrangroup.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 1/3] package/pppd: revert lock path
Date: Fri, 29 Mar 2024 15:31:36 +0100	[thread overview]
Message-ID: <20240329143138.214780-2-alexis.lothore@bootlin.com> (raw)
In-Reply-To: <20240329143138.214780-1-alexis.lothore@bootlin.com>

From: Alexis Lothoré <alexis.lothore@bootlin.com>

pppd fails to start on buildroot 2024.02, because of non-existing directory
pppd in /var/run

Upstream: https://github.com/ppp-project/ppp/commit/99cbf5e269994482edaf64624be8b1c806f9587c
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
Backport to: 2024.02.x
---
 ...005-Revert-lock-path-to-var-lock-435.patch | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 package/pppd/0005-Revert-lock-path-to-var-lock-435.patch

diff --git a/package/pppd/0005-Revert-lock-path-to-var-lock-435.patch b/package/pppd/0005-Revert-lock-path-to-var-lock-435.patch
new file mode 100644
index 000000000000..bbff884f2113
--- /dev/null
+++ b/package/pppd/0005-Revert-lock-path-to-var-lock-435.patch
@@ -0,0 +1,64 @@
+From 99cbf5e269994482edaf64624be8b1c806f9587c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= <alexis.lothore@bootlin.com>
+Date: Tue, 10 Oct 2023 10:05:50 +0900
+Subject: [PATCH 1/3] Revert lock path to /var/lock (#435)
+
+From: Dominique Martinet <asmadeus@codewreck.org>
+
+lock dir changed on linux from /var/lock to /run/pppd/lock with
+pppd-2.5.0, which makes pppd fail to start if the distribution does not
+pre-create the directory.
+
+This reverts it back to /var/lock.
+
+The paths for other OS should be identical as LOCALSTATEDIR should be
+/var, but also revert them back as well just in case.
+Since the variable is no longer used remove it from makefiles.
+
+Fixes: 66a8c74c3f73 ("Let ./configure control the paths for pppd")
+Fixes: #419
+
+Upstream: https://github.com/ppp-project/ppp/commit/99cbf5e269994482edaf64624be8b1c806f9587c
+Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
+Co-authored-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
+---
+ pppd/Makefile.am | 2 +-
+ pppd/pathnames.h | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pppd/Makefile.am b/pppd/Makefile.am
+index e5bedf26af96..7cb30053322e 100644
+--- a/pppd/Makefile.am
++++ b/pppd/Makefile.am
+@@ -83,7 +83,7 @@ pppd_SOURCES = \
+     upap.c \
+     utils.c
+ 
+-pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLOCALSTATEDIR=\"${localstatedir}\" -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"'
++pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"'
+ pppd_LDFLAGS =
+ pppd_LIBS =
+ 
+diff --git a/pppd/pathnames.h b/pppd/pathnames.h
+index de2fb6889005..12609a969429 100644
+--- a/pppd/pathnames.h
++++ b/pppd/pathnames.h
+@@ -120,12 +120,12 @@
+ #define PPP_PATH_PPPDB          PPP_PATH_VARRUN  "/pppd2.tdb"
+ 
+ #ifdef __linux__
+-#define PPP_PATH_LOCKDIR        PPP_PATH_VARRUN  "/lock"
++#define PPP_PATH_LOCKDIR        "/var/lock"
+ #else
+ #ifdef SVR4
+-#define PPP_PATH_LOCKDIR        LOCALSTATEDIR "/spool/locks"
++#define PPP_PATH_LOCKDIR        "/var/spool/locks"
+ #else
+-#define PPP_PATH_LOCKDIR        LOCALSTATEDIR "/spool/lock"
++#define PPP_PATH_LOCKDIR        "/var/spool/lock"
+ #endif
+ #endif
+ 
+-- 
+2.43.1
+
-- 
2.43.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-03-29 14:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 14:31 [Buildroot] [PATCH 0/3] package/pppd: fix pppd startup with upstream patches Alexis Lothoré via buildroot
2024-03-29 14:31 ` Alexis Lothoré via buildroot [this message]
2024-03-29 14:31 ` [Buildroot] [PATCH 2/3] package/pppd: add mkdir recursive Alexis Lothoré via buildroot
2024-03-29 14:31 ` [Buildroot] [PATCH 3/3] package/pppd: create rundir when it is missing Alexis Lothoré via buildroot
2024-04-10 21:20 ` [Buildroot] [PATCH 0/3] package/pppd: fix pppd startup with upstream patches Thomas Petazzoni via buildroot
2024-04-11  8:49   ` Alexis Lothoré via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240329143138.214780-2-alexis.lothore@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=alexis.lothore@bootlin.com \
    --cc=bernd@kuhls.net \
    --cc=nicolas.carrier@nav-timing.safrangroup.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.