From patchwork Wed Nov 26 00:00:15 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: 414928 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 370B114014D for ; Wed, 26 Nov 2014 11:01:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B246A21C9; Wed, 26 Nov 2014 00:01:30 +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 jqRc01wWFzja; Wed, 26 Nov 2014 00:01:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E7488A21CC; Wed, 26 Nov 2014 00:01:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id ADEBF1CE6F9 for ; Wed, 26 Nov 2014 00:01:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AA49F31A9A for ; Wed, 26 Nov 2014 00:01:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cy+VWNc-Envd for ; Wed, 26 Nov 2014 00:01:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by silver.osuosl.org (Postfix) with ESMTPS id 51AF83152D for ; Wed, 26 Nov 2014 00:01:26 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hi2so3211067wib.17 for ; Tue, 25 Nov 2014 16:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=/79ovWowokUYUFJPuHSyFYZSmtN3WXI0H1jJmoYXSSI=; b=TMUwlsJTNsKPvN3vUhnd4S8rcNdldrBGuewJz2zb8mcMDTpJSSU44BQ6oVwumWwC80 Y/8dqiAL/ItyPXs2PwOIgC9XbVW+F7FoHloubVeZdTh4cm/+D8hv16Qz899PPL0UPT6/ M7vbLOrDJfVRabpY/EnAThctDPq3lMUcXKYvgdadNwSV8D3To20sxj558oBBCSYoDAD5 f7M5LY/YaG5Fd6iChGM0VNsw2hciid87oh0kZRJY7CYxIPUs5Ui9AOdAw1rUDqJ3ZSMA PNsoRAM9hgSRswnEnx7tQNwDwfbcCg0SS3bPO6aU/03+t0LGQc5Z4TxqH+qPQBKJRQWK sKVQ== X-Received: by 10.180.10.231 with SMTP id l7mr10769444wib.1.1416960084930; Tue, 25 Nov 2014 16:01:24 -0800 (PST) Received: from localhost.localdomain (vno44-1-88-172-188-148.fbx.proxad.net. [88.172.188.148]) by mx.google.com with ESMTPSA id gi5sm3983080wjd.26.2014.11.25.16.01.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 16:01:23 -0800 (PST) From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: buildroot@buildroot.org Date: Wed, 26 Nov 2014 01:00:15 +0100 Message-Id: <1416960016-5956-1-git-send-email-benoit.thebaudeau.dev@gmail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] samba: Add support for libnss_win*.so* installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" 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. Signed-off-by: Benoît Thébaudeau --- Changes in v2: - Make BR2_PACKAGE_SAMBA_LIBNSS_WIN* depend on BR2_TOOLCHAIN_USES_GLIBC and BR2_PACKAGE_SAMBA_WINBINDD. - Use full path for target in 'install -D'. - Move the definitions of the hook functions inside the corresponding conditional blocks. --- package/samba/Config.in | 19 +++++++++++++++++++ package/samba/samba.mk | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/package/samba/Config.in b/package/samba/Config.in index 8dd0bf2..e2cac9e 100644 --- a/package/samba/Config.in +++ b/package/samba/Config.in @@ -240,6 +240,25 @@ config BR2_PACKAGE_SAMBA_LIBSMBCLIENT standards POSIX functions available for manipulating local files. +config BR2_PACKAGE_SAMBA_LIBNSS_WINS + bool "libnss_wins" + default y + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_SAMBA_WINBINDD + 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 + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_SAMBA_WINBINDD + 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 1957997..c87b391 100644 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -135,6 +135,24 @@ endef SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES +ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINS),y) +define SAMBA_INSTALL_LIBNSS_WINS + # install libnss_wins + $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_wins.so $(TARGET_DIR)/lib/libnss_wins.so + ln -snf libnss_wins.so $(TARGET_DIR)/lib/libnss_wins.so.2 +endef +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINS +endif + +ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINBIND),y) +define SAMBA_INSTALL_LIBNSS_WINBIND + # install libnss_winbind + $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_winbind.so $(TARGET_DIR)/lib/libnss_winbind.so + ln -snf libnss_winbind.so $(TARGET_DIR)/lib/libnss_winbind.so.2 +endef +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