Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking
@ 2018-05-19 18:58 Romain Naour
  2018-05-19 18:58 ` [Buildroot] [PATCH v4 for-next 2/2] Revert "glibc: install the obsolete libnsl" Romain Naour
  2018-05-19 19:49 ` [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Romain Naour @ 2018-05-19 18:58 UTC (permalink / raw)
  To: buildroot

glibc now considers its built-in libnsl as being obsolete, and requires
passing --enable-obsolete-libnsl to have it built and installed. libnsl
is now provided as a separate project [1], but it isn't packaged yet in
Buildroot.

In preparation for dropping --enable-obsolete-libnsl from the glibc
package, this commit ensures that exim doesn't use libnsl. It was
already the case for uclibc and musl toolchains, so this commit simply
extends that to make sure libnsl is also not used with glibc toolchains.

Only Exim's nis.so and nisplus.so lookup modules require libnsl,
but they are not build by default. So we can safely remove -lnsl
from the Makefile-Linux. If someone want these modules, a new libnsl
package must be added first to provide nsl library.

Since we remove -lnsl unconditionally, use a patch instead of a sed command.

[1] https://github.com/thkukuk/libnsl.git
[2] https://fedoraproject.org/wiki/Changes/NISIPv6

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
---
v4: remove -lnsl by a patch instread of a sed (Baruch).
v3: Also comment the buildconfig build issue on the host with Fedora 28 (Luca)
    Add a comment about this issue in exim.mk
---
 package/exim/0006-remove-libnsl.patch | 37 +++++++++++++++++++++++++++++++++++
 package/exim/exim.mk                  |  9 ---------
 2 files changed, 37 insertions(+), 9 deletions(-)
 create mode 100644 package/exim/0006-remove-libnsl.patch

diff --git a/package/exim/0006-remove-libnsl.patch b/package/exim/0006-remove-libnsl.patch
new file mode 100644
index 0000000000..8ca53c9acb
--- /dev/null
+++ b/package/exim/0006-remove-libnsl.patch
@@ -0,0 +1,37 @@
+From b722f8fc01f6b1d71c98c0c66f759935b0dac136 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sat, 19 May 2018 20:36:41 +0200
+Subject: [PATCH] remove libnsl
+
+glibc now considers its built-in libnsl as being obsolete, and requires
+passing --enable-obsolete-libnsl to have it built and installed. libnsl
+is now provided as a separate project [1], but it isn't packaged yet in
+Buildroot.
+
+Exim's nis.so and nisplus.so lookup modules require libnsl,
+but they are not build by default. So we can safely remove -lnsl
+from the Makefile-Linux.
+
+[1] https://github.com/thkukuk/libnsl.git
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ OS/Makefile-Linux | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/OS/Makefile-Linux b/OS/Makefile-Linux
+index 990f884..ea5644b 100644
+--- a/OS/Makefile-Linux
++++ b/OS/Makefile-Linux
+@@ -19,7 +19,7 @@ CFLAGS_DYNAMIC ?= -shared -rdynamic
+ DBMLIB = -ldb
+ USE_DB = yes
+ 
+-LIBS = -lnsl -lcrypt -lm
++LIBS = -lcrypt -lm
+ LIBRESOLV = -lresolv
+ 
+ X11=/usr/X11R6
+-- 
+2.14.3
+
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 37eab501a4..bde2df1153 100644
--- a/package/exim/exim.mk
+++ b/package/exim/exim.mk
@@ -72,14 +72,6 @@ define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL
 endef
 endif
 
-# only glibc provides libnsl, remove -lnsl for all other toolchains
-# http://bugs.exim.org/show_bug.cgi?id=1564
-ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
-define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE
-	$(SED) 's/-lnsl//g' $(@D)/OS/Makefile-Linux
-endef
-endif
-
 # musl does not provide struct ip_options nor struct ip_opts (but it is
 # available with both glibc and uClibc)
 ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
@@ -96,7 +88,6 @@ define EXIM_CONFIGURE_TOOLCHAIN
 	$(call exim-config-add,RANLIB,$(TARGET_RANLIB))
 	$(call exim-config-add,HOSTCC,$(HOSTCC))
 	$(call exim-config-add,HOSTCFLAGS,$(HOSTCFLAGS))
-	$(EXIM_REMOVE_LIBNSL_FROM_MAKEFILE)
 	$(EXIM_FIX_IP_OPTIONS_FOR_MUSL)
 endef
 
-- 
2.14.3

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

* [Buildroot] [PATCH v4 for-next 2/2] Revert "glibc: install the obsolete libnsl"
  2018-05-19 18:58 [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking Romain Naour
@ 2018-05-19 18:58 ` Romain Naour
  2018-05-19 19:49 ` [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Romain Naour @ 2018-05-19 18:58 UTC (permalink / raw)
  To: buildroot

libnsl from Glibc is deprecated and should not be used anymore.
Remove libnsl.so.* from GLIBC_LIBS_LIB.

libnsl is now an separate library that can be packaged later if
necessary [1].

Note: libnsl from Glibc doesn't build with gcc 8 due new warning [2].

[1] https://github.com/thkukuk/libnsl.git
[2] http://patchwork.sourceware.org/patch/26437

This reverts commit 398747f5fafca8c07e696612d8eded53d4f935c7.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
---
v2: remove libnsl.so.* from GLIBC_LIBS_LIB
---
 package/glibc/glibc.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 3ab673c0cc..c1c5ac687f 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -100,7 +100,6 @@ define GLIBC_CONFIGURE_CMDS
 		--disable-profile \
 		--without-gd \
 		--enable-obsolete-rpc \
-		--enable-obsolete-nsl \
 		--enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
 		--with-headers=$(STAGING_DIR)/usr/include)
 	$(GLIBC_ADD_MISSING_STUB_H)
@@ -113,7 +112,7 @@ endef
 
 GLIBC_LIBS_LIB = \
 	ld*.so.* libanl.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* \
-	libm.so.* libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* \
+	libm.so.* libpthread.so.* libresolv.so.* librt.so.* \
 	libutil.so.* libnss_files.so.* libnss_dns.so.* libmvec.so.*
 
 ifeq ($(BR2_PACKAGE_GDB),y)
-- 
2.14.3

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

* [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking
  2018-05-19 18:58 [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking Romain Naour
  2018-05-19 18:58 ` [Buildroot] [PATCH v4 for-next 2/2] Revert "glibc: install the obsolete libnsl" Romain Naour
@ 2018-05-19 19:49 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-05-19 19:49 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 19 May 2018 20:58:26 +0200, Romain Naour wrote:
> glibc now considers its built-in libnsl as being obsolete, and requires
> passing --enable-obsolete-libnsl to have it built and installed. libnsl
> is now provided as a separate project [1], but it isn't packaged yet in
> Buildroot.
> 
> In preparation for dropping --enable-obsolete-libnsl from the glibc
> package, this commit ensures that exim doesn't use libnsl. It was
> already the case for uclibc and musl toolchains, so this commit simply
> extends that to make sure libnsl is also not used with glibc toolchains.
> 
> Only Exim's nis.so and nisplus.so lookup modules require libnsl,
> but they are not build by default. So we can safely remove -lnsl
> from the Makefile-Linux. If someone want these modules, a new libnsl
> package must be added first to provide nsl library.
> 
> Since we remove -lnsl unconditionally, use a patch instead of a sed command.
> 
> [1] https://github.com/thkukuk/libnsl.git
> [2] https://fedoraproject.org/wiki/Changes/NISIPv6
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> ---
> v4: remove -lnsl by a patch instread of a sed (Baruch).
> v3: Also comment the buildconfig build issue on the host with Fedora 28 (Luca)
>     Add a comment about this issue in exim.mk
> ---
>  package/exim/0006-remove-libnsl.patch | 37 +++++++++++++++++++++++++++++++++++
>  package/exim/exim.mk                  |  9 ---------
>  2 files changed, 37 insertions(+), 9 deletions(-)
>  create mode 100644 package/exim/0006-remove-libnsl.patch

Both patches applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-05-19 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-19 18:58 [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking Romain Naour
2018-05-19 18:58 ` [Buildroot] [PATCH v4 for-next 2/2] Revert "glibc: install the obsolete libnsl" Romain Naour
2018-05-19 19:49 ` [Buildroot] [PATCH v4 for-next 1/2] package/exim: remove libnsl linking Thomas Petazzoni

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