From patchwork Mon Aug 4 18:14:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 376414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 047411400F1 for ; Tue, 5 Aug 2014 04:21:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 11DB88A86A; Mon, 4 Aug 2014 18:21:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yCyqMcJ6Mzlk; Mon, 4 Aug 2014 18:21:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 292AE89077; Mon, 4 Aug 2014 18:21:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 62BC61C2207 for ; Mon, 4 Aug 2014 18:21:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5F3BF883F1 for ; Mon, 4 Aug 2014 18:21:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KpYdfXr7NcFE for ; Mon, 4 Aug 2014 18:21:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zose-mta02.web4all.fr (zose-mta02.web4all.fr [185.49.20.43]) by fraxinus.osuosl.org (Postfix) with ESMTP id A0BCD8837D for ; Mon, 4 Aug 2014 18:21:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zose-mta02.web4all.fr (Postfix) with ESMTP id ADFB443BB2 for ; Mon, 4 Aug 2014 20:15:07 +0200 (CEST) Received: from zose-mta02.web4all.fr ([127.0.0.1]) by localhost (zose-mta02.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id l-AkdHtuIq04; Mon, 4 Aug 2014 20:15:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta02.web4all.fr (Postfix) with ESMTP id 49C1343BB1; Mon, 4 Aug 2014 20:15:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-02.w4a.fr Received: from zose-mta02.web4all.fr ([127.0.0.1]) by localhost (zose-mta02.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IfZwpoSrwHr5; Mon, 4 Aug 2014 20:15:03 +0200 (CEST) Received: from localhost.localdomain (cie44-1-88-188-188-147.fbx.proxad.net [88.188.188.147]) by zose-mta02.web4all.fr (Postfix) with ESMTPSA id 0CCE143BB0; Mon, 4 Aug 2014 20:15:03 +0200 (CEST) From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: Date: Mon, 4 Aug 2014 20:14:17 +0200 Message-Id: <1407176057-13180-2-git-send-email-benoit.thebaudeau@advansee.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407176057-13180-1-git-send-email-benoit.thebaudeau@advansee.com> References: <1407176057-13180-1-git-send-email-benoit.thebaudeau@advansee.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [Buildroot] [PATCH 2/2] samba: Add support for libnss_win*.so* installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The libnss_wins and libnss_winbind libraries are required in order to add support for the wins and winbind sources to the Name Service Switch (NSS), so make it possible to install them. This is useful in order to resolve NetBIOS names or user and group information from a Windows NT server. These libraries are installed to /lib/ like the standard libnss_* libraries from (E)GLIBC. These libraries require the --with-winbind configuration option, but not the files installed by BR2_PACKAGE_SAMBA_WINBINDD. That's why BR2_PACKAGE_SAMBA_LIBNSS_* are not made to depend on BR2_PACKAGE_SAMBA_WINBINDD. These libraries are designed to be used by the NSS provided by (E)GLIBC, but nothing forbids to use them directly without (E)GLIBC. That's why BR2_PACKAGE_SAMBA_LIBNSS_* are not made to depend on BR2_TOOLCHAIN_USES_GLIBC. BR2_PACKAGE_SAMBA_WINBINDD is enabled by default, so enable BR2_PACKAGE_SAMBA_LIBNSS_* by default, but only if BR2_TOOLCHAIN_USES_GLIBC is enabled since using these libraries without (E)GLIBC is unusual. Signed-off-by: Benoît Thébaudeau --- package/samba/Config.in | 15 +++++++++++++++ package/samba/samba.mk | 22 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/package/samba/Config.in b/package/samba/Config.in index 8dd0bf2..8448784 100644 --- a/package/samba/Config.in +++ b/package/samba/Config.in @@ -240,6 +240,21 @@ config BR2_PACKAGE_SAMBA_LIBSMBCLIENT standards POSIX functions available for manipulating local files. +config BR2_PACKAGE_SAMBA_LIBNSS_WINS + bool "libnss_wins" + default y if BR2_TOOLCHAIN_USES_GLIBC + help + libnss_wins is a library that permits the Name Service Switch + to resolve NetBIOS names. + +config BR2_PACKAGE_SAMBA_LIBNSS_WINBIND + bool "libnss_winbind" + default y if BR2_TOOLCHAIN_USES_GLIBC + help + libnss_winbind is a library that permits the Name Service + Switch to resolve user and group information from a Windows + NT server. + endmenu diff --git a/package/samba/samba.mk b/package/samba/samba.mk index 84e525f..20cccbc 100644 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -58,7 +58,7 @@ SAMBA_CONF_OPT = \ \ $(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),--with-readline=$(STAGING_DIR)) \ $(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),--with-readline=$(STAGING_DIR)) \ - $(if $(BR2_PACKAGE_SAMBA_WINBINDD),--with-winbind,--without-winbind) + $(if $(BR2_PACKAGE_SAMBA_WINBINDD)$(BR2_PACKAGE_SAMBA_LIBNSS_WINS)$(BR2_PACKAGE_SAMBA_LIBNSS_WINBIND),--with-winbind,--without-winbind) SAMBA_INSTALL_TARGET_OPT = \ DESTDIR=$(TARGET_DIR) -C $(SAMBA_DIR)/$(SAMBA_SUBDIR) \ @@ -135,6 +135,26 @@ endef SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES +define SAMBA_INSTALL_LIBNSS_WINS + # install libnss_wins + $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_wins.so $(TARGET_DIR)/lib/ + ln -snf libnss_wins.so $(TARGET_DIR)/lib/libnss_wins.so.2 +endef + +ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINS),y) +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINS +endif + +define SAMBA_INSTALL_LIBNSS_WINBIND + # install libnss_winbind + $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_winbind.so $(TARGET_DIR)/lib/ + ln -snf libnss_winbind.so $(TARGET_DIR)/lib/libnss_winbind.so.2 +endef + +ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINBIND),y) +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINBIND +endif + define SAMBA_REMOVE_SWAT_DOCUMENTATION # Remove the documentation rm -rf $(TARGET_DIR)/usr/swat/help/manpages