Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 804825 - net-dns/libidn: Broken idn command
Summary: net-dns/libidn: Broken idn command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-28 03:30 UTC by Haelwenn (lanodan) Monnier
Modified: 2022-06-21 22:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haelwenn (lanodan) Monnier 2021-07-28 03:30:16 UTC
Command: "idn læwifi.fr"
Expected: "xn--lwifi-sra.fr"
Got: "idn: could not convert from ASCII to UTF-8"

I can reproduce it on all my gentoo systems, but I can't reproduce it against alpine (same libidn version, no patches done).


$ emerge --info libidn
Portage 3.0.20 (python 3.8.10-final-0, platforms/pc, gcc-10.3.0, glibc-2.33-r1, 5.12.14-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.12.14-gentoo-x86_64-AMD_Ryzen_5_PRO_3500U_w-_Radeon_Vega_Mobile_Gfx-with-glibc2.2.5
KiB Mem:    13907152 total,   1290572 free
KiB Swap:    8388604 total,   3205064 free
Timestamp of repository cg: Wed, 21 Jul 2021 06:16:11 +0000
Head commit of repository cg: 24c83b37e92ab2cf4d8a9bcf95e6567be8478ad8

Head commit of repository flussence: 8dab16e50532ff80eef9da7865842058a17441b7

Head commit of repository guru: dbcc26695945d7f726c3bf04b4990697842446e8

Timestamp of repository ixit: Sun, 11 Jul 2021 09:37:09 +0000
Head commit of repository ixit: 81dc9097dd0584855ef2d67b4e3ddb39672315fb

Timestamp of repository pentoo: Tue, 27 Jul 2021 02:07:20 +0000
Head commit of repository pentoo: ee7d48518b36357efe0b0ac26147693a6e0108e7

Timestamp of repository poly-c: Mon, 26 Jul 2021 22:07:22 +0000
Head commit of repository poly-c: 53d3f35d37a329d2dd82ccfa0567a7a774ef5148

Head commit of repository privateOverlay: ade7dbf4cfeb5fb6dd3974764fe650de9e0cdd19

Timestamp of repository science: Tue, 27 Jul 2021 06:27:01 +0000
Head commit of repository science: 5006eb99b463445fe81db9243de7bac9e963dfae

Timestamp of repository src_prepare-overlay: Tue, 27 Jul 2021 06:27:01 +0000
Head commit of repository src_prepare-overlay: 133e487b6da01fc62b66358e689a0b6204deb6e4

Timestamp of repository wayland-desktop: Sun, 25 Jul 2021 23:22:02 +0000
Head commit of repository wayland-desktop: 0ada1e7e213840ffed958cbd5038b09c3a87a1e8

Timestamp of repository gentoo: Mon, 26 Apr 2021 12:39:51 +0000
Head commit of repository gentoo: c3b66212506321b9bb56cf0f5a5f4cc8c7d40f56

Timestamp of repository lanodanOverlay: Mon, 26 Apr 2021 12:38:50 +0000
Head commit of repository lanodanOverlay: 611a50ba7dfddab16a83edbcb8e39b6c8e3df829

sh lksh
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0::gentoo
dev-lang/python:          3.7.10_p6::gentoo, 3.8.10_p2::gentoo, 3.9.5_p2::gentoo
dev-lang/rust-bin:        1.52.1::gentoo
dev-util/cmake:           3.21.0::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.64-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.3.0-r1::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

cg
    location: /var/db/repos/cg
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/cg.git
    masters: gentoo
    priority: 0

flussence
    location: /var/db/repos/flussence
    sync-type: git
    sync-uri: https://repo.or.cz/flussence-overlay.git
    masters: gentoo
    priority: 0

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 0

ixit
    location: /var/db/repos/ixit
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/ixit.git
    masters: gentoo
    priority: 0

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    priority: 0

poly-c
    location: /var/db/repos/poly-c
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/poly-c.git
    masters: gentoo
    priority: 0

privateOverlay
    location: /var/db/repos/privateOverlay
    sync-type: git
    sync-uri: git@git.sr.ht:~lanodan/privateOverlay
    masters: gentoo lanodanOverlay
    priority: 0

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.git
    masters: gentoo
    priority: 0

src_prepare-overlay
    location: /var/db/repos/src_prepare-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/src_prepare-overlay.git
    masters: gentoo
    priority: 0

wayland-desktop
    location: /var/db/repos/wayland-desktop
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git
    masters: gentoo
    priority: 0

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/lanodan/gentoo.git
    priority: 100

lanodanOverlay
    location: /var/db/repos/lanodanOverlay
    sync-type: git
    sync-uri: https://hacktivis.me/git/overlay.git
    masters: gentoo guru
    priority: 200

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -D_FORTIFY_SOURCE=2 -Werror=format-security -fstack-protector-strong -fPIC -Qunused-arguments"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib/udev/rules.d/ /usr/share/config /usr/share/gnupg/qualified.txt /var/games/atris/"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -D_FORTIFY_SOURCE=2 -Werror=format-security -fstack-protector-strong -fPIC -Qunused-arguments"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --usepkg --binpkg-changed-deps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -D_FORTIFY_SOURCE=2 -Werror=format-security -fstack-protector-strong -fPIC"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg ccache cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news noinfo parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned python-trace qa-unresolved-soname-deps sandbox sfperms sign splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -D_FORTIFY_SOURCE=2 -Werror=format-security -fstack-protector-strong -fPIC"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ https://mirrors.dotsrc.org/gentoo/ https://gentoo.osuosl.org/ http://distfiles.gentoo.org"
INSTALL_MASK="/sbin/reboot /sbin/poweroff /sbin/shutdown /usr/share/applications/"
LANG="en_DK.UTF-8"
LDFLAGS="-Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="true"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="(cuda) (pgo) acl acpi alsa amd64 apparmor bzip2 cacert caps ccache cjk clang crypt cryptsetup d3d9 dane device-mapper dri egl eglfs eme-free gentoo-dev glamor gles gles1 gles2 gpg gtk3 hardened harfbuzz iconv icu idn iproute2 ipv6 jingle jpeg jumbo-build ldns libcxx libglvnd libproxy libtirpc libtommath libzfs lm-sensors mandoc metric mikmod modplug multilib multitarget ncurses nls nptl opencl opengl openmp opus pcre pie png portaudio qt3support readline sanitize sasl sctp seatd seccomp smp sndio spell split-usr ssl ssp symlink system-* system-act system-av1 system-binutils system-boost system-bootloader system-bootstrap system-cairo system-cmark system-crontab system-ffmpeg system-harfbuzz system-heimdal system-icu system-info system-ipxe system-jpeg system-jsoncpp system-lcms system-leveldb system-libcxx system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-man system-mathjax system-mesa system-mitkrb5 system-numpy system-openjfx system-python system-qemu system-renpy system-seabios system-sqlite system-ssl system-tbb system-unicode system-webp system-wfconfig system-wide system-wlroots system-zlib theora threads tre truetype udev unicode urandom usb uvm vaapi vorbis vulkan wayland wayland-only webp xattr xcsecurity xft xtpax zfs zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en en-US en-GB fr fr-CA ja is jbo de de-DE ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-3" LUA_TARGETS="lua5-3 lua5-4" NGINX_MODULES_HTTP="access autoindex charset fastcgi gzip gzip_static limit_conn limit_req map memcached metrics mirror proxy push_stream rewrite scgi split_clients ssi upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi vhost_traffic_status headers_more stub_status" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_8 python3_9" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

=================================================================
                        Package Settings
=================================================================

net-dns/libidn-1.37::gentoo was built with the following:
USE="nls -doc -emacs -java -mono -verify-sig" ABI_X86="(64) -32 (-x32)"
CFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -Wextra -D_FORTIFY_SOURCE=2 -Werror=format-security -fstack-protector-strong -Qunused-arguments"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -Wextra -D_FORTIFY_SOURCE=2 -Werror=format-security -fstack-protector-strong -Qunused-arguments"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg ccache cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news noinfo parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned python-trace qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
LDFLAGS="-Wl,-z,relro -Wl,-z,now -Wl,-O1"
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-07-28 03:37:12 UTC
Thanks for the report.
Does libidn-1.36 work?
Comment 2 Haelwenn (lanodan) Monnier 2021-07-28 22:45:50 UTC
(In reply to Sam James from comment #1)
> Thanks for the report.
> Does libidn-1.36 work?

Yes, libidn-1.36 works fine (just did a checkout of net-dns/libidn before the cleanup commit).
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-31 03:23:45 UTC
(In reply to Haelwenn (lanodan) Monnier from comment #2)
> (In reply to Sam James from comment #1)
> > Thanks for the report.
> > Does libidn-1.36 work?
> 
> Yes, libidn-1.36 works fine (just did a checkout of net-dns/libidn before
> the cleanup commit).

Have you managed to report this upstream yet?
Comment 4 Bogdan 2022-06-20 23:59:15 UTC
I have an error:

  $ echo "прехидент.укр" | idn2   # Works fine
  xn--d1abbk1ahhvw.xn--j1amh

  $ echo "прехидент.укр" | idn    # Error
  idn: could not convert from ASCII to UTF-8

I send bug to <bug-libidn@gnu.org> (see https://www.gnu.org/software/libidn/#bugs)

He reply, that error was resolved in version 1.39.

Now, version 1.40 available.

Please, update ebuild version.
Comment 5 Bogdan 2022-06-21 00:04:09 UTC
Error was:
  generates a non-ASCII string if you have UTF-8 in the console


Workaround for current version 1.38-r1:

  $ echo "прехидент.укр" | CHARSET=UTF-8 idn2
  xn--d1abbk1ahhvw.xn--j1amh
  
  $ echo "прехидент.укр" | CHARSET=UTF-8 idn
  xn--d1abbk1ahhvw.xn--j1amh
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-21 00:05:53 UTC
(In reply to Bogdan from comment #4)
> I have an error:
> 
>   $ echo "прехидент.укр" | idn2   # Works fine
>   xn--d1abbk1ahhvw.xn--j1amh
> 
>   $ echo "прехидент.укр" | idn    # Error
>   idn: could not convert from ASCII to UTF-8
> 
> I send bug to <bug-libidn@gnu.org> (see
> https://www.gnu.org/software/libidn/#bugs)
> 
> He reply, that error was resolved in version 1.39.
> 
> Now, version 1.40 available.
> 
> Please, update ebuild version.

I think 1.39 and 1.40 were released on the same day, fwiw. Anyway, thanks for reporting it, I'll be bumping shortly.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-21 21:24:54 UTC
For posterity:

+* Noteworthy changes in release 1.39 (2022-06-20) [stable]
+
+** lib: Code detecting current locale broken since 1.36.
+The code always returned ASCII.  The precise cause is complicated to
+track down but likely boils down to the new autotools/gettext
+bootstrapping sequence introduced in release 1.36.  Reported by Богдан
+Пилипенко <bogdan.pylypenko107@gmail.com>.
+
Comment 8 Larry the Git Cow gentoo-dev 2022-06-21 22:01:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0052d62f6f3c2bb45fca98fb1ea546b4ae67ccec

commit 0052d62f6f3c2bb45fca98fb1ea546b4ae67ccec
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-21 21:23:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-21 22:00:20 +0000

    net-dns/libidn: add 1.40
    
    Drops mono and java support because not worth the maintenance hassle.
    
    mono-env.eclass doesn't support EAPI 8 and the Java build broke for
    some reason (think it was trivial, but...)
    
    Can restore if someone really needs them.
    
    Bug: https://bugs.gentoo.org/723272
    Closes: https://bugs.gentoo.org/804825
    Signed-off-by: Sam James <sam@gentoo.org>

 net-dns/libidn/Manifest           |  2 +
 net-dns/libidn/libidn-1.40.ebuild | 89 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)