* [Buildroot] [PATCH] samba: Swap libnss_win*.so* files and symlinks
@ 2014-12-14 15:28 Benoît Thébaudeau
2014-12-21 22:03 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Benoît Thébaudeau @ 2014-12-14 15:28 UTC (permalink / raw)
To: buildroot
The libnss_wins and libnss_winbind libraries were installed in this way:
/lib/libnss_<service>.so
/lib/libnss_<service>.so.<major> -> /lib/libnss_<service>.so
This had been done like this in order to get something similar to the
other NSS libraries, which are usually installed in this way:
/lib/libnss_<service>-<version>.so
/lib/libnss_<service>.so.<major> -> /lib/libnss_<service>-<version>.so
However, besides these files, these other NSS libraries usually come
installed with:
/usr/lib/libnss_<service>.so -> /lib/libnss_<service>.so.<major>
This means that the NSS libraries follow the usual library installation
practice, i.e. that the non-versioned .so is a symlink to the versioned
.so, so that switching versions is easy. In the case of the NSS
libraries, the versioned .so is just also a symlink to a .so with a more
accurate version.
Hence, follow the same rules for libnss_win*.so*, and install these
libraries the other way around:
/lib/libnss_<service>.so -> /lib/libnss_<service>.so.<major>
/lib/libnss_<service>.so.<major>
This is also how these libraries are installed by a major OS like Ubuntu
14.10:
/lib/x86_64-linux-gnu/libnss_winbind.so -> libnss_winbind.so.2
/lib/x86_64-linux-gnu/libnss_winbind.so.2
/lib/x86_64-linux-gnu/libnss_wins.so -> libnss_wins.so.2
/lib/x86_64-linux-gnu/libnss_wins.so.2
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau.dev@gmail.com>
---
package/samba/samba.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/samba/samba.mk b/package/samba/samba.mk
index 0e4db95..d25e94e 100644
--- a/package/samba/samba.mk
+++ b/package/samba/samba.mk
@@ -137,16 +137,16 @@ SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES
ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINS),y)
define SAMBA_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
+ $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_wins.so $(TARGET_DIR)/lib/libnss_wins.so.2
+ ln -snf libnss_wins.so.2 $(TARGET_DIR)/lib/libnss_wins.so
endef
SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINS
endif
ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINBIND),y)
define SAMBA_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
+ $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_winbind.so $(TARGET_DIR)/lib/libnss_winbind.so.2
+ ln -snf libnss_winbind.so.2 $(TARGET_DIR)/lib/libnss_winbind.so
endef
SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINBIND
endif
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] samba: Swap libnss_win*.so* files and symlinks
2014-12-14 15:28 [Buildroot] [PATCH] samba: Swap libnss_win*.so* files and symlinks Benoît Thébaudeau
@ 2014-12-21 22:03 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-12-21 22:03 UTC (permalink / raw)
To: buildroot
Dear Beno?t Th?baudeau,
On Sun, 14 Dec 2014 16:28:16 +0100, Beno?t Th?baudeau wrote:
> The libnss_wins and libnss_winbind libraries were installed in this way:
> /lib/libnss_<service>.so
> /lib/libnss_<service>.so.<major> -> /lib/libnss_<service>.so
>
> This had been done like this in order to get something similar to the
> other NSS libraries, which are usually installed in this way:
> /lib/libnss_<service>-<version>.so
> /lib/libnss_<service>.so.<major> -> /lib/libnss_<service>-<version>.so
>
> However, besides these files, these other NSS libraries usually come
> installed with:
> /usr/lib/libnss_<service>.so -> /lib/libnss_<service>.so.<major>
>
> This means that the NSS libraries follow the usual library installation
> practice, i.e. that the non-versioned .so is a symlink to the versioned
> .so, so that switching versions is easy. In the case of the NSS
> libraries, the versioned .so is just also a symlink to a .so with a more
> accurate version.
>
> Hence, follow the same rules for libnss_win*.so*, and install these
> libraries the other way around:
> /lib/libnss_<service>.so -> /lib/libnss_<service>.so.<major>
> /lib/libnss_<service>.so.<major>
>
> This is also how these libraries are installed by a major OS like Ubuntu
> 14.10:
> /lib/x86_64-linux-gnu/libnss_winbind.so -> libnss_winbind.so.2
> /lib/x86_64-linux-gnu/libnss_winbind.so.2
> /lib/x86_64-linux-gnu/libnss_wins.so -> libnss_wins.so.2
> /lib/x86_64-linux-gnu/libnss_wins.so.2
>
> Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau.dev@gmail.com>
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-21 22:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14 15:28 [Buildroot] [PATCH] samba: Swap libnss_win*.so* files and symlinks Benoît Thébaudeau
2014-12-21 22:03 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox