[Buildroot] [PATCH 40/40] package/wpa_supplicant: preserve /usr/sbin symlink

James Hilliard james.hilliard1 at gmail.com
Wed May 6 22:33:41 UTC 2026


With BR2_ROOTFS_MERGED_BIN=y, /usr/sbin is a symlink to bin.
Using install -D for files below $(TARGET_DIR)/usr/sbin can create
the parent directory path and replace that symlink with a real
directory.

With per-package directories, this can later make rsync fail when a
package target directory contains a non-empty usr/sbin directory and
the skeleton provides usr/sbin -> bin.

The skeleton dependency has already created /usr/sbin, either as a
directory or as the merged-bin symlink, so use plain install and let it
follow the existing path.

Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
---
 package/wpa_supplicant/wpa_supplicant.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
index fe4bc34d55..a0f7922f24 100644
--- a/package/wpa_supplicant/wpa_supplicant.mk
+++ b/package/wpa_supplicant/wpa_supplicant.mk
@@ -245,14 +245,14 @@ endef
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y)
 define WPA_SUPPLICANT_INSTALL_CLI
-	$(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_cli \
+	$(INSTALL) -m 0755 $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_cli \
 		$(TARGET_DIR)/usr/sbin/wpa_cli
 endef
 endif
 
 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y)
 define WPA_SUPPLICANT_INSTALL_PASSPHRASE
-	$(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_passphrase \
+	$(INSTALL) -m 0755 $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_passphrase \
 		$(TARGET_DIR)/usr/sbin/wpa_passphrase
 endef
 endif
@@ -281,7 +281,7 @@ endef
 endif
 
 define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
-	$(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \
+	$(INSTALL) -m 0755 $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \
 		$(TARGET_DIR)/usr/sbin/wpa_supplicant
 	$(INSTALL) -m 644 -D package/wpa_supplicant/wpa_supplicant.conf \
 		$(TARGET_DIR)/etc/wpa_supplicant.conf
-- 
2.53.0



More information about the buildroot mailing list