Skip to contentSkip to conversation

package/dhcpcd: enhance syntax

PATCH New Fabrice Fontaine 3 participants 7 messages Dec 26, 2020 – Dec 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/dhcpcd: enhance syntax

Add all configure options through DHCP_CONFIG_OPTS and avoid splitting lines when they are less than 80 characters

---
 package/dhcpcd/dhcpcd.mk | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
package/dhcpcd/dhcpcd.mk +6 -7
index 0dcd36f369..11d78e1847 100644
@@ -11,6 +11,10 @@ DHCPCD_DEPENDENCIES = host-pkgconf
 DHCPCD_LICENSE = BSD-2-Clause
 DHCPCD_LICENSE_FILES = LICENSE
 
+DHCPCD_CONFIG_OPTS = \
+	--libexecdir=/lib/dhcpcd \
+	--os=linux
+
 ifeq ($(BR2_STATIC_LIBS),y)
 DHCPCD_CONFIG_OPTS += --enable-static
 endif
@@ -20,16 +24,11 @@ DHCPCD_CONFIG_OPTS += --disable-fork --disable-privsep
 endif
 
 define DHCPCD_CONFIGURE_CMDS
-	(cd $(@D); \
-	$(TARGET_CONFIGURE_OPTS) ./configure \
-		--os=linux \
-		--libexecdir=/lib/dhcpcd \
-		$(DHCPCD_CONFIG_OPTS) )
+	(cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(DHCPCD_CONFIG_OPTS))
 endef
 
 define DHCPCD_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) \
-		-C $(@D) all
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all
 endef
 
 define DHCPCD_INSTALL_TARGET_CMDS
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/3 package/dhcpcd: create dhcpcd user

privsep is supported since version 9.0.0 and
https://github.com/rsmarples/dhcpcd/commit/d5786118da1bad4c247631cae86344f1b249a8cb
It is enabled by default since
https://github.com/rsmarples/dhcpcd/commit/3a4c2e5604d72151b06ed365aa71493740a3ad75

So use --privsepuser to avoid that the detection mechanism finds a wrong value from host and create it on the target

Fixes:
- https://bugs.buildroot.org/show_bug.cgi?id=13416

---
 package/dhcpcd/dhcpcd.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/dhcpcd/dhcpcd.mk +6 -1
index 11d78e1847..7b69602605 100644
@@ -13,7 +13,8 @@ DHCPCD_LICENSE_FILES = LICENSE
 
 DHCPCD_CONFIG_OPTS = \
 	--libexecdir=/lib/dhcpcd \
-	--os=linux
+	--os=linux \
+	--privsepuser=dhcpcd
 
 ifeq ($(BR2_STATIC_LIBS),y)
 DHCPCD_CONFIG_OPTS += --enable-static
@@ -50,6 +51,10 @@ define DHCPCD_INSTALL_INIT_SYSTEMD
 endef
 endif
 
+define DHCPCD_USERS
+	dhcpcd -1 dhcpcd -1 * - - - dhcpcd user
+endef
+
 # NOTE: Even though this package has a configure script, it is not generated
 # using the autotools, so we have to use the generic package infrastructure.
 
Signature · 1 line
2.29.2
#2 lore raw

PATCH 2/3 package/dhcpcd: create dhcpcd user

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

privsep is supported since version 9.0.0 and
https://github.com/rsmarples/dhcpcd/commit/d5786118da1bad4c247631cae86344f1b249a8cb
It is enabled by default since
https://github.com/rsmarples/dhcpcd/commit/3a4c2e5604d72151b06ed365aa71493740a3ad75

Quoted 7 lines

So use --privsepuser to avoid that the detection mechanism finds a wrong value from host and create it on the target

Fixes:
- https://bugs.buildroot.org/show_bug.cgi?id=13416

Committed to 2020.08.x and 2020.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 3/3 package/dhcpcd: add udev optional dependency

In reply to Fabrice Fontaine

udev is an optional dependency (enabled by default) since version 6.1.0:
https://github.com/rsmarples/dhcpcd/commit/12bbc8cb5c7507be15a7e0af4140c3d81125c46c

---
 package/dhcpcd/dhcpcd.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/dhcpcd/dhcpcd.mk +7 -0
index 7b69602605..4900e0581f 100644
@@ -16,6 +16,13 @@ DHCPCD_CONFIG_OPTS = \
 	--os=linux \
 	--privsepuser=dhcpcd
 
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+DHCPCD_CONFIG_OPTS += --with-udev
+DHCPCD_DEPENDENCIES += udev
+else
+DHCPCD_CONFIG_OPTS += --without-udev
+endif
+
 ifeq ($(BR2_STATIC_LIBS),y)
 DHCPCD_CONFIG_OPTS += --enable-static
 endif
Signature · 1 line
2.29.2
#4 lore raw

PATCH 3/3 package/dhcpcd: add udev optional dependency

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

udev is an optional dependency (enabled by default) since version 6.1.0:
https://github.com/rsmarples/dhcpcd/commit/12bbc8cb5c7507be15a7e0af4140c3d81125c46c

Committed to 2020.02.x, 2020.08.x and 2020.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/3 package/dhcpcd: enhance syntax

In reply to Fabrice Fontaine
Quoted 7 lines · On Sat, 26 Dec 2020 18:17:43 +0100 Fabrice Fontaine…

Add all configure options through DHCP_CONFIG_OPTS and avoid splitting lines when they are less than 80 characters

---
 package/dhcpcd/dhcpcd.mk | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Series applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com