Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] system/skeleton: make nsswitch install conditional
@ 2014-10-20 12:28 Gustavo Zacarias
  2014-10-20 12:28 ` [Buildroot] [PATCH 2/2] glibc/nsswitch.conf: also lookup on dns for networks Gustavo Zacarias
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Gustavo Zacarias @ 2014-10-20 12:28 UTC (permalink / raw)
  To: buildroot

Don't blindly install the /etc/nsswitch.conf file, it's useless for
toolchains that aren't (e)glibc-based and misleading.
Make the installation conditional on a (e)glibc toolchain.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 {system/skeleton/etc => package/glibc}/nsswitch.conf |  0
 toolchain/toolchain.mk                               | 10 ++++++++++
 2 files changed, 10 insertions(+)
 rename {system/skeleton/etc => package/glibc}/nsswitch.conf (100%)

diff --git a/system/skeleton/etc/nsswitch.conf b/package/glibc/nsswitch.conf
similarity index 100%
rename from system/skeleton/etc/nsswitch.conf
rename to package/glibc/nsswitch.conf
diff --git a/toolchain/toolchain.mk b/toolchain/toolchain.mk
index 8fe06ff..3f3534a 100644
--- a/toolchain/toolchain.mk
+++ b/toolchain/toolchain.mk
@@ -3,6 +3,16 @@
 # TARGET_FINALIZE_HOOKS, to be applied just after all packages
 # have been built.
 
+# Install default nsswitch.conf file if the skeleton doesn't provide it
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
+define GLIBC_COPY_NSSWITCH_FILE
+	$(Q)if [ ! -f "$(TARGET_DIR)/etc/nsswitch.conf" ]; then \
+		cp -a package/glibc/nsswitch.conf $(TARGET_DIR)/etc; \
+	fi
+endef
+TARGET_FINALIZE_HOOKS += GLIBC_COPY_NSSWITCH_FILE
+endif
+
 # Install the gconv modules
 ifeq ($(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY),y)
 GCONV_LIBS = $(call qstrip,$(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST))
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-10-25 10:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20 12:28 [Buildroot] [PATCH 1/2] system/skeleton: make nsswitch install conditional Gustavo Zacarias
2014-10-20 12:28 ` [Buildroot] [PATCH 2/2] glibc/nsswitch.conf: also lookup on dns for networks Gustavo Zacarias
2014-10-20 13:02 ` [Buildroot] [PATCH 1/2] system/skeleton: make nsswitch install conditional Thomas Petazzoni
2014-10-20 13:19   ` Gustavo Zacarias
2014-10-20 13:27     ` Thomas Petazzoni
2014-10-20 13:34       ` Gustavo Zacarias
2014-10-20 13:37         ` Thomas Petazzoni
2014-10-20 13:43           ` Gustavo Zacarias
2014-10-20 13:54             ` Thomas Petazzoni
2014-10-20 14:12               ` Gustavo Zacarias
2014-10-20 14:28                 ` Thomas Petazzoni
2014-10-22 14:10                   ` Maxime Hadjinlian
2014-10-22 19:44                     ` Gustavo Zacarias
2014-10-22 19:49                       ` Gustavo Zacarias
2014-10-23 17:47                         ` Maxime Hadjinlian
2014-10-21 18:49   ` Arnout Vandecappelle
2014-10-25 10:49 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox