All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/7] libidn2: new package
@ 2018-05-01 20:40 Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 2/7] libcurl: replace libidn by libidn2 Fabrice Fontaine
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

Libidn2 is an implementation of the IDNA2008 + TR46
specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
TR 46).

http://www.gnu.org/software/libidn/

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/libidn2/Config.in    | 17 +++++++++++++++++
 package/libidn2/libidn2.hash |  8 ++++++++
 package/libidn2/libidn2.mk   | 29 +++++++++++++++++++++++++++++
 5 files changed, 56 insertions(+)
 create mode 100644 package/libidn2/Config.in
 create mode 100644 package/libidn2/libidn2.hash
 create mode 100644 package/libidn2/libidn2.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index d27c03c96a..ea93da0508 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -687,6 +687,7 @@ F:	package/libgee/
 F:	package/libglib2/
 F:	package/libgtk2/
 F:	package/libgtk3/
+F:	package/libidn2/
 F:	package/libmatroska/
 F:	package/libmpdclient/
 F:	package/libupnp/
diff --git a/package/Config.in b/package/Config.in
index dd61789181..552cbf3ea2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1410,6 +1410,7 @@ menu "Networking"
 	source "package/libgsasl/Config.in"
 	source "package/libhttpparser/Config.in"
 	source "package/libidn/Config.in"
+	source "package/libidn2/Config.in"
 	source "package/libiscsi/Config.in"
 	source "package/libkrb5/Config.in"
 	source "package/libldns/Config.in"
diff --git a/package/libidn2/Config.in b/package/libidn2/Config.in
new file mode 100644
index 0000000000..38b1378990
--- /dev/null
+++ b/package/libidn2/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_LIBIDN2
+	bool "libidn2"
+	help
+	  Libidn2 is an implementation of the IDNA2008 + TR46
+	  specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
+	  TR 46).
+
+	  http://www.gnu.org/software/libidn/
+
+if BR2_PACKAGE_LIBIDN2
+
+config BR2_PACKAGE_LIBIDN2_BINARY
+	bool "idn2 binary"
+	help
+	  Install idn2 command line tool
+
+endif
diff --git a/package/libidn2/libidn2.hash b/package/libidn2/libidn2.hash
new file mode 100644
index 0000000000..980f78f50d
--- /dev/null
+++ b/package/libidn2/libidn2.hash
@@ -0,0 +1,8 @@
+# From Calculated locally after checking signature
+sha256	644b6b03b285fb0ace02d241d59483d98bc462729d8bb3608d5cad5532f3d2f0	libidn2-2.0.4.tar.gz
+
+# Hash for license files:
+sha256	4fa501e804195b4136c9cec4bc510365b8cbaf4bc075d6401a77ae0213370457	COPYING
+sha256	8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643	COPYINGv2
+sha256	da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768	COPYING.LESSERv3
+sha256	01d621eef165cf4d3d3dbb737aa0699178d94c6f18cf87e9dde6db3ca7790f46	COPYING.unicode
diff --git a/package/libidn2/libidn2.mk b/package/libidn2/libidn2.mk
new file mode 100644
index 0000000000..e6331d730c
--- /dev/null
+++ b/package/libidn2/libidn2.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# libidn2
+#
+################################################################################
+
+LIBIDN2_VERSION = 2.0.4
+LIBIDN2_SITE = $(BR2_GNU_MIRROR)/libidn
+LIBIDN2_LICENSE = GPL-2.0+, LGPL-3.0+
+LIBIDN2_LICENSE_FILES = COPYING COPYINGv2 COPYING.LESSERv3 COPYING.unicode
+LIBIDN2_DEPENDENCIES = \
+	host-pkgconf \
+	$(TARGET_NLS_DEPENDENCIES) \
+	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN2_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
+LIBIDN2_DEPENDENCIES += libunistring
+endif
+
+define LIBIDN2_REMOVE_BINARY
+	rm -f $(TARGET_DIR)/usr/bin/idn2
+endef
+
+ifneq ($(BR2_PACKAGE_LIBIDN2_BINARY),y)
+LIBIDN2_POST_INSTALL_TARGET_HOOKS += LIBIDN2_REMOVE_BINARY
+endif
+
+$(eval $(autotools-package))
-- 
2.14.1

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

* [Buildroot] [PATCH 2/7] libcurl: replace libidn by libidn2
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
@ 2018-05-01 20:40 ` Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 3/7] wget: add optional dependency for libidn2 Fabrice Fontaine
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

libidn has been replaced by libidn2 since 7.51.0 (October 2016):
https://github.com/curl/curl/commit/9c91ec778104ae3b744b39444d544e82d5ee9ece

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libcurl/libcurl.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index a3e66d094c..b75e9fb2e9 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -9,7 +9,6 @@ LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.xz
 LIBCURL_SITE = https://curl.haxx.se/download
 LIBCURL_DEPENDENCIES = host-pkgconf \
 	$(if $(BR2_PACKAGE_ZLIB),zlib) \
-	$(if $(BR2_PACKAGE_LIBIDN),libidn) \
 	$(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump)
 LIBCURL_LICENSE = curl
 LIBCURL_LICENSE_FILES = COPYING
@@ -68,6 +67,13 @@ else
 LIBCURL_CONF_OPTS += --disable-ares
 endif
 
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+LIBCURL_DEPENDENCIES += libidn2
+LIBCURL_CONF_OPTS += --with-libidn2
+else
+LIBCURL_CONF_OPTS += --without-libidn2
+endif
+
 # Configure curl to support libssh2
 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
 LIBCURL_DEPENDENCIES += libssh2
-- 
2.14.1

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

* [Buildroot] [PATCH 3/7] wget: add optional dependency for libidn2
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 2/7] libcurl: replace libidn by libidn2 Fabrice Fontaine
@ 2018-05-01 20:40 ` Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 4/7] gnutls: add optional libidn2 support Fabrice Fontaine
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/wget/wget.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/wget/wget.mk b/package/wget/wget.mk
index 23e4c8acca..c3c792f1e8 100644
--- a/package/wget/wget.mk
+++ b/package/wget/wget.mk
@@ -26,6 +26,13 @@ else
 WGET_CONF_OPTS += --without-ssl
 endif
 
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+WGET_CONF_OPTS += --with-libidn
+WGET_DEPENDENCIES += libidn2
+else
+WGET_CONF_OPTS += --without-libidn
+endif
+
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
 WGET_DEPENDENCIES += util-linux
 endif
-- 
2.14.1

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

* [Buildroot] [PATCH 4/7] gnutls: add optional libidn2 support
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 2/7] libcurl: replace libidn by libidn2 Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 3/7] wget: add optional dependency for libidn2 Fabrice Fontaine
@ 2018-05-01 20:40 ` Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 5/6] lftp: switch from libidn to libidn2 Fabrice Fontaine
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/gnutls/gnutls.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 6be7c6e27e..3d1a627781 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -68,6 +68,13 @@ else
 GNUTLS_CONF_OPTS += --without-idn
 endif
 
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+GNUTLS_CONF_OPTS += --with-libidn2
+GNUTLS_DEPENDENCIES += libidn2
+else
+GNUTLS_CONF_OPTS += --without-libidn2
+endif
+
 ifeq ($(BR2_PACKAGE_P11_KIT),y)
 GNUTLS_CONF_OPTS += --with-p11-kit
 GNUTLS_DEPENDENCIES += p11-kit
-- 
2.14.1

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

* [Buildroot] [PATCH 5/6] lftp: switch from libidn to libidn2
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
                   ` (2 preceding siblings ...)
  2018-05-01 20:40 ` [Buildroot] [PATCH 4/7] gnutls: add optional libidn2 support Fabrice Fontaine
@ 2018-05-01 20:40 ` Fabrice Fontaine
  2018-05-01 20:40 ` [Buildroot] [PATCH 6/7] systemd: add optional dependency on libidn2 Fabrice Fontaine
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

libidn has been removed since 4.8.1 (August 2017):
https://github.com/lavv17/lftp/commit/731abec393f3deff490c77d1d55eb7219bc6b556

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/lftp/lftp.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/lftp/lftp.mk b/package/lftp/lftp.mk
index e1ca0533ee..68f3dfce2c 100644
--- a/package/lftp/lftp.mk
+++ b/package/lftp/lftp.mk
@@ -41,11 +41,11 @@ else
 LFTP_CONF_OPTS += --without-openssl
 endif
 
-ifeq ($(BR2_PACKAGE_LIBIDN),y)
-LFTP_DEPENDENCIES += libidn
-LFTP_CONF_OPTS += --with-libidn=$(STAGING_DIR)/usr
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+LFTP_DEPENDENCIES += libidn2
+LFTP_CONF_OPTS += --with-libidn2=$(STAGING_DIR)/usr
 else
-LFTP_CONF_OPTS += --without-libidn
+LFTP_CONF_OPTS += --without-libidn2
 endif
 
 # Remove /usr/share/lftp
-- 
2.14.1

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

* [Buildroot] [PATCH 6/7] systemd: add optional dependency on libidn2
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
                   ` (3 preceding siblings ...)
  2018-05-01 20:40 ` [Buildroot] [PATCH 5/6] lftp: switch from libidn to libidn2 Fabrice Fontaine
@ 2018-05-01 20:40 ` Fabrice Fontaine
  2018-05-20 14:16   ` Thomas Petazzoni
  2018-05-01 20:40 ` [Buildroot] [PATCH 7/7] whois: add libidn2 support Fabrice Fontaine
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/systemd/systemd.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index db7fb43636..bdf4fb32f2 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -75,12 +75,19 @@ else
 SYSTEMD_CONF_OPTS += -Daudit=false
 endif
 
+# Both options can't be selected at the same time so prefer libidn2
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+SYSTEMD_DEPENDENCIES += libidn2
+SYSTEMD_CONF_OPTS += -Dlibidn2=true
+else
+SYSTEMD_CONF_OPTS += -Dlibidn2=false
 ifeq ($(BR2_PACKAGE_LIBIDN),y)
 SYSTEMD_DEPENDENCIES += libidn
 SYSTEMD_CONF_OPTS += -Dlibidn=true
 else
 SYSTEMD_CONF_OPTS += -Dlibidn=false
 endif
+endif
 
 ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
 SYSTEMD_DEPENDENCIES += libseccomp
-- 
2.14.1

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

* [Buildroot] [PATCH 7/7] whois: add libidn2 support
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
                   ` (4 preceding siblings ...)
  2018-05-01 20:40 ` [Buildroot] [PATCH 6/7] systemd: add optional dependency on libidn2 Fabrice Fontaine
@ 2018-05-01 20:40 ` Fabrice Fontaine
  2018-05-02 21:51 ` [Buildroot] [PATCH 1/7] libidn2: new package Arnout Vandecappelle
  2018-05-20 14:15 ` Thomas Petazzoni
  7 siblings, 0 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-01 20:40 UTC (permalink / raw)
  To: buildroot

libidn2 support is enabled since February 2017 (5.2.15):
https://github.com/rfc1036/whois/commit/8ed6d730959b1f988dd43a511c40b9419bb2b0db

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/whois/whois.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/whois/whois.mk b/package/whois/whois.mk
index 22117cf3aa..18071ab6bd 100644
--- a/package/whois/whois.mk
+++ b/package/whois/whois.mk
@@ -27,6 +27,11 @@ WHOIS_DEPENDENCIES += libidn
 WHOIS_MAKE_ENV += HAVE_LIBIDN=1
 endif
 
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+WHOIS_DEPENDENCIES += libidn2
+WHOIS_MAKE_ENV += HAVE_LIBIDN2=1
+endif
+
 ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
 WHOIS_BUILD_TARGETS =
 WHOIS_INSTALL_TARGETS = install
-- 
2.14.1

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

* [Buildroot] [PATCH 1/7] libidn2: new package
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
                   ` (5 preceding siblings ...)
  2018-05-01 20:40 ` [Buildroot] [PATCH 7/7] whois: add libidn2 support Fabrice Fontaine
@ 2018-05-02 21:51 ` Arnout Vandecappelle
  2018-05-03 10:13   ` Fabrice Fontaine
  2018-05-20 14:15 ` Thomas Petazzoni
  7 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2018-05-02 21:51 UTC (permalink / raw)
  To: buildroot

 Hi Fabrice,

On 01-05-18 22:40, Fabrice Fontaine wrote:
> Libidn2 is an implementation of the IDNA2008 + TR46
> specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
> TR 46).
> 
> http://www.gnu.org/software/libidn/

 So, basically libidn2 replaces libidn. Do we really want to support both? Yes,
obviously the API changed, but that happens all the time when bumping packages.
So, the question is what gives the best user experience...

 The problem with adding libidn2 is that a user who currently has libidn and
libcurl enabled, after updating Buildroot, will suddenly loose IDN support with
no warning...

 On the other hand, if a user has selected libidn and is using it in some
package outside of Buildroot, then that package will fail to build entirely,
with no (easy) way to recovery. But how likely is it that libidn is used in an
external package?

 But first, of course, if we want to just bump libidn then we have to make sure
that all packages support libidn2. That means the following packages have to be
checked: dnsmasq, ghostscript, libgsasl, mutt, omxplayer, prosody.

> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[snip]

> diff --git a/package/libidn2/Config.in b/package/libidn2/Config.in
> new file mode 100644
> index 0000000000..38b1378990
> --- /dev/null
> +++ b/package/libidn2/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_LIBIDN2
> +	bool "libidn2"

 Can it be parallel-installed with libidn or does it need a depends on
!BR2_PACKAGE_LIBIDN?

> +	help
> +	  Libidn2 is an implementation of the IDNA2008 + TR46
> +	  specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
> +	  TR 46).
> +
> +	  http://www.gnu.org/software/libidn/
[snip]
> +LIBIDN2_VERSION = 2.0.4
> +LIBIDN2_SITE = $(BR2_GNU_MIRROR)/libidn
> +LIBIDN2_LICENSE = GPL-2.0+, LGPL-3.0+
> +LIBIDN2_LICENSE_FILES = COPYING COPYINGv2 COPYING.LESSERv3 COPYING.unicode
> +LIBIDN2_DEPENDENCIES = \
> +	host-pkgconf \
> +	$(TARGET_NLS_DEPENDENCIES) \
> +	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
> +LIBIDN2_INSTALL_STAGING = YES
> +
> +ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
> +LIBIDN2_DEPENDENCIES += libunistring

 No --enable/disable option for this?

 Also, don't the java and C# bindings exist any more?

> +endif
> +
> +define LIBIDN2_REMOVE_BINARY
> +	rm -f $(TARGET_DIR)/usr/bin/idn2
> +endef

 Small nit: we prefer to have the define of the hook inside the condition as well.

 Regards,
 Arnout

> +
> +ifneq ($(BR2_PACKAGE_LIBIDN2_BINARY),y)
> +LIBIDN2_POST_INSTALL_TARGET_HOOKS += LIBIDN2_REMOVE_BINARY
> +endif
> +
> +$(eval $(autotools-package))
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/7] libidn2: new package
  2018-05-02 21:51 ` [Buildroot] [PATCH 1/7] libidn2: new package Arnout Vandecappelle
@ 2018-05-03 10:13   ` Fabrice Fontaine
  0 siblings, 0 replies; 11+ messages in thread
From: Fabrice Fontaine @ 2018-05-03 10:13 UTC (permalink / raw)
  To: buildroot

Dear Arnout,

2018-05-02 23:51 GMT+02:00 Arnout Vandecappelle <arnout@mind.be>:

>  Hi Fabrice,
>
> On 01-05-18 22:40, Fabrice Fontaine wrote:
> > Libidn2 is an implementation of the IDNA2008 + TR46
> > specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
> > TR 46).
> >
> > http://www.gnu.org/software/libidn/
>
>  So, basically libidn2 replaces libidn. Do we really want to support both?
> Yes,
> obviously the API changed, but that happens all the time when bumping
> packages.
> So, the question is what gives the best user experience...
>
>  The problem with adding libidn2 is that a user who currently has libidn
> and
> libcurl enabled, after updating Buildroot, will suddenly loose IDN support
> with
> no warning...
>
Actually, IDN support on libcurl is already broken in buildroot since
November 2016 as libcurl only supports libidn2 since version 7.51.0:
https://github.com/curl/curl/commit/9c91ec778104ae3b744b39444d544e82d5ee9ece
.

>
>  On the other hand, if a user has selected libidn and is using it in some
> package outside of Buildroot, then that package will fail to build
> entirely,
> with no (easy) way to recovery. But how likely is it that libidn is used
> in an
> external package?
>
>  But first, of course, if we want to just bump libidn then we have to make
> sure
> that all packages support libidn2. That means the following packages have
> to be
> checked: dnsmasq, ghostscript, libgsasl, mutt, omxplayer, prosody.
>
Actually, that's what I have tried to do (see my patch's serie):
- dnsmaq supports both packages: libidn and libidn2 (and it prefers libidn2)
- systemd supports both packages but only one can enable at the same time
(see my patch)
- ghostscript, ligsasl, mutt, omxplayer, prosody supports only libidn
- libcurl, wget, gnutls, lftp supports only libidn2 (again that means that
IDN support is currently broken with libcurl/lftp)
- whois supports both packages in the version embedded in buildroot
(5.2.17) but libidn supports will be removed if we bump to latest release
(5.3.0).
So, I think the only option is to support both packages in buildroot. Most
recent packages made the jump to libidn2  but old ones won't be updated any
time soon.

> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> [snip]
>
> > diff --git a/package/libidn2/Config.in b/package/libidn2/Config.in
> > new file mode 100644
> > index 0000000000..38b1378990
> > --- /dev/null
> > +++ b/package/libidn2/Config.in
> > @@ -0,0 +1,17 @@
> > +config BR2_PACKAGE_LIBIDN2
> > +     bool "libidn2"
>
>  Can it be parallel-installed with libidn or does it need a depends on
> !BR2_PACKAGE_LIBIDN?
>
Yes, it can be parallel-installed.

>
> > +     help
> > +       Libidn2 is an implementation of the IDNA2008 + TR46
> > +       specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
> > +       TR 46).
> > +
> > +       http://www.gnu.org/software/libidn/
> [snip]
> > +LIBIDN2_VERSION = 2.0.4
> > +LIBIDN2_SITE = $(BR2_GNU_MIRROR)/libidn
> > +LIBIDN2_LICENSE = GPL-2.0+, LGPL-3.0+
> > +LIBIDN2_LICENSE_FILES = COPYING COPYINGv2 COPYING.LESSERv3
> COPYING.unicode
> > +LIBIDN2_DEPENDENCIES = \
> > +     host-pkgconf \
> > +     $(TARGET_NLS_DEPENDENCIES) \
> > +     $(if $(BR2_PACKAGE_LIBICONV),libiconv)
> > +LIBIDN2_INSTALL_STAGING = YES
> > +
> > +ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
> > +LIBIDN2_DEPENDENCIES += libunistring
>
>  No --enable/disable option for this?
>
 Nope, there is only a test "$ac_cv_libunistring" = "yes" in configure.ac

>
>  Also, don't the java and C# bindings exist any more?
>
Yes, these bindings don't exist anymore

>
> > +endif
> > +
> > +define LIBIDN2_REMOVE_BINARY
> > +     rm -f $(TARGET_DIR)/usr/bin/idn2
> > +endef
>
>  Small nit: we prefer to have the define of the hook inside the condition
> as well.
>
OK, I can fix this if you want, I have just copy/paste libidn.mk.

>
>  Regards,
>  Arnout
>
> > +
> > +ifneq ($(BR2_PACKAGE_LIBIDN2_BINARY),y)
> > +LIBIDN2_POST_INSTALL_TARGET_HOOKS += LIBIDN2_REMOVE_BINARY
> > +endif
> > +
> > +$(eval $(autotools-package))
> >
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
>
Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180503/a5746874/attachment.html>

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

* [Buildroot] [PATCH 1/7] libidn2: new package
  2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
                   ` (6 preceding siblings ...)
  2018-05-02 21:51 ` [Buildroot] [PATCH 1/7] libidn2: new package Arnout Vandecappelle
@ 2018-05-20 14:15 ` Thomas Petazzoni
  7 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2018-05-20 14:15 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 May 2018 22:40:32 +0200, Fabrice Fontaine wrote:
> Libidn2 is an implementation of the IDNA2008 + TR46
> specifications (RFC 5890, RFC 5891, RFC 5892, RFC 5893,
> TR 46).
> 
> http://www.gnu.org/software/libidn/
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  DEVELOPERS                   |  1 +
>  package/Config.in            |  1 +
>  package/libidn2/Config.in    | 17 +++++++++++++++++
>  package/libidn2/libidn2.hash |  8 ++++++++
>  package/libidn2/libidn2.mk   | 29 +++++++++++++++++++++++++++++
>  5 files changed, 56 insertions(+)
>  create mode 100644 package/libidn2/Config.in
>  create mode 100644 package/libidn2/libidn2.hash
>  create mode 100644 package/libidn2/libidn2.mk

I've applied the entire series to next. I've made a few changes, so
I'll comment on the two patches on which I did changes.

On this patch, here are the changes I made:

    [Thomas:
     - Use positive logic to test the BR2_PACKAGE_LIBIDN2_BINARY
       condition.
     - Put the definition of LIBIDN2_REMOVE_BINARY inside the
       BR2_PACKAGE_LIBIDN2_BINARY condition, as suggested by Arnout.
     - Adjust license details: library is under GPL-2.0+ or LGPL-3.0+,
       while the command line tool is under GPL-3.0+.]

Best regards,

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

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

* [Buildroot] [PATCH 6/7] systemd: add optional dependency on libidn2
  2018-05-01 20:40 ` [Buildroot] [PATCH 6/7] systemd: add optional dependency on libidn2 Fabrice Fontaine
@ 2018-05-20 14:16   ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2018-05-20 14:16 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 May 2018 22:40:37 +0200, Fabrice Fontaine wrote:

> +# Both options can't be selected at the same time so prefer libidn2
> +ifeq ($(BR2_PACKAGE_LIBIDN2),y)
> +SYSTEMD_DEPENDENCIES += libidn2
> +SYSTEMD_CONF_OPTS += -Dlibidn2=true
> +else
> +SYSTEMD_CONF_OPTS += -Dlibidn2=false
>  ifeq ($(BR2_PACKAGE_LIBIDN),y)
>  SYSTEMD_DEPENDENCIES += libidn
>  SYSTEMD_CONF_OPTS += -Dlibidn=true
>  else
>  SYSTEMD_CONF_OPTS += -Dlibidn=false
>  endif
> +endif

This was a bit complicated so I've replaced with:

# Both options can't be selected at the same time so prefer libidn2
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
SYSTEMD_DEPENDENCIES += libidn2
SYSTEMD_CONF_OPTS += -Dlibidn2=true -Dlibidn=false
else ifeq ($(BR2_PACKAGE_LIBIDN),y)
SYSTEMD_DEPENDENCIES += libidn
SYSTEMD_CONF_OPTS += -Dlibidn=true -Dlibidn2=false
else
SYSTEMD_CONF_OPTS += -Dlibidn=false -Dlibidn2=true
endif

which I believe is simpler and more in line with what we do in
Buildroot usually.

Thanks!

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

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

end of thread, other threads:[~2018-05-20 14:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 20:40 [Buildroot] [PATCH 1/7] libidn2: new package Fabrice Fontaine
2018-05-01 20:40 ` [Buildroot] [PATCH 2/7] libcurl: replace libidn by libidn2 Fabrice Fontaine
2018-05-01 20:40 ` [Buildroot] [PATCH 3/7] wget: add optional dependency for libidn2 Fabrice Fontaine
2018-05-01 20:40 ` [Buildroot] [PATCH 4/7] gnutls: add optional libidn2 support Fabrice Fontaine
2018-05-01 20:40 ` [Buildroot] [PATCH 5/6] lftp: switch from libidn to libidn2 Fabrice Fontaine
2018-05-01 20:40 ` [Buildroot] [PATCH 6/7] systemd: add optional dependency on libidn2 Fabrice Fontaine
2018-05-20 14:16   ` Thomas Petazzoni
2018-05-01 20:40 ` [Buildroot] [PATCH 7/7] whois: add libidn2 support Fabrice Fontaine
2018-05-02 21:51 ` [Buildroot] [PATCH 1/7] libidn2: new package Arnout Vandecappelle
2018-05-03 10:13   ` Fabrice Fontaine
2018-05-20 14:15 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.