Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 956746 - app-arch/unzip fails to extract any file (6.0_p27-r1,6.0_p28) causing firefox, thunderbird and brave build error
Summary: app-arch/unzip fails to extract any file (6.0_p27-r1,6.0_p28) causing firefox...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-28 13:54 UTC by jlm
Modified: 2025-06-03 16:49 UTC (History)
2 users (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 jlm 2025-05-28 13:54:36 UTC
unzip from app-arch/unzip only print the help message, the only option that works is the -Z that call zipinfo



Reproducible: Always

Steps to Reproduce:
1. try to unzip a valid zip file with unzip command
Actual Results:  
firefox and thunderbird both fails at configure step :

0:08.36 checking for unzip... not found
0:08.36 DEBUG: unzip: Looking for '-O utf-8'
0:08.36 ERROR: Cannot find unzip

brave-bin from brave overlay is a bit more verbose and display the real issue :
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment only
  -v  list verbosely/show version info       -T  timestamp archive to latest
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
modifiers:
  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
  -j  junk paths (do not make directories)   -aa treat ALL files as text
  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
See "unzip -hh" or unzip.txt for more help.  Examples:
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer



workaround (for brave-bin) : 
using https://bugs.gentoo.org/922331 :
# emerge app-arch/libarchive
# rm /usr/bin/unzip
# ln -s /usr/bin/bsdunzip /usr/bin/unzip

the workaround don't work for firefox and thunderbird that will still fail on same error
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-28 13:58:08 UTC
Please share: emerge --info app-arch/unzip. In particular, I'm wondering if 'natspec' and/or 'unicode' are enabled. I think it's normal for '-O utf8' to be maybe missing if those are off.

Can you tell me if *any* zip files in /var/cache/distfiles work okay with unzip -t or unzip -l?

Please also put emerge --info here.
Comment 2 jlm 2025-05-28 20:05:59 UTC
# emerge --info app-arch/unzip
WARNING: One or more repositories have missing repo_name entries:

        /var/lib/layman/gnunet-overlay/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


Portage 3.0.68 (python 3.13.3-final-0, default/linux/amd64/23.0/no-multilib, gcc-14, glibc-2.41-r2, 6.12.28-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.12.28-gentoo-dist-x86_64-AMD_Ryzen_7_5700U_with_Radeon_Graphics-with-glibc2.41
KiB Mem:    65144860 total,   8824408 free
KiB Swap:   67633148 total,  67632636 free
Timestamp of repository gentoo: Tue, 27 May 2025 23:45:00 +0000
Head commit of repository gentoo: a428b11e4cb16826f2d747fc70d24a85c030a42c
Head commit of repository gnunet-overlay: 90e54abb5fb5264563c70feb0a44704a8753bb06

Head commit of repository brave-overlay: c5b1283998f8e980e4273860c21029107fdf893d

Head commit of repository guru: f3e08eb2519e1f2bb263e5af4769c0bfc01952aa

Head commit of repository science: fbd0d4ba4f7b468c901d85f3314b36af2cbbc16c

Head commit of repository torbrowser: 38485982abf18e7ed03ad590726d86c3accaeeca

Head commit of repository waebbl: 3e2bd16aec3e607eaf53ae8bc1d3ca9649e2d05d

sh bash 5.2_p37-r3
ld GNU ld (Gentoo 2.44 p4) 2.44.0
ccache version 4.11.3 [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37-r3::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.17-r2::gentoo
dev-build/cmake:           3.31.7-r1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.8.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.2::gentoo
dev-lang/python:           3.12.10::gentoo, 3.13.3::gentoo, 3.14.0_beta1::gentoo
dev-lang/rust-bin:         1.86.0-r1::gentoo, 1.87.0::gentoo
dev-util/ccache:           4.11.3::gentoo
llvm-core/clang:           19.1.7::gentoo, 20.1.5::gentoo
llvm-core/lld:             19.1.7::gentoo
llvm-core/llvm:            19.1.7::gentoo, 20.1.5::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.62.2::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-devel/binutils:        2.44-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo, 15.1.0::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.14::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

gnunet-overlay
    location: /var/lib/layman/gnunet-overlay
    sync-type: git
    sync-uri: https://github.com/jlmxyz/gnunet-overlay
    masters: gentoo
    priority: 1
    volatile: True

brave-overlay
    location: /var/lib/layman/brave-overlay
    sync-type: git
    sync-uri: https://gitlab.com/jason.oliveira/brave-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

guru
    location: /var/lib/layman/guru
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50
    volatile: True

science
    location: /var/lib/layman/science
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/sci.git
    masters: gentoo
    priority: 50
    volatile: True

torbrowser
    location: /var/lib/layman/torbrowser
    sync-type: git
    sync-uri: https://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

waebbl
    location: /var/lib/layman/waebbl
    sync-type: git
    sync-uri: https://github.com/waebbl/waebbl-gentoo.git
    masters: gentoo
    priority: 50
    volatile: True

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -pipe -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 15 --load-average 15 --getbinpkg"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-request-signature buildpkg-live config-protect-if-modified distlocks ebuild-locks export-pms-vars fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/     http://ftp.free.fr/mirrors/ftp.gentoo.org/     https://gentoo.mirrors.ovh.net/gentoo-distfiles/     http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j16 -l15"
PKGDIR="/var/cache/binpkgs"
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"
RUSTFLAGS=" -C target-cpu=native"
SHELL="/bin/bash"
USE="X acl amd64 avif bzip2 cet crypt cups dist-kernel dvd egl elogind gcrypt gdbm heif iconv icu ipv6 jpeg jpeg2k jpegxl libaom libtirpc modules-sign ncurses nls openal opencl opengl openh264 openmp openmpt pam pcre pdf pipewire png rav1e readline seccomp secureboot shaderc ssl svg svt-av1 test-rust unicode vaapi vdpau vulkan wayland webp x265 xattr xine zlib" ABI_X86="64" ADA_TARGET="gcc_14" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_13" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

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

app-arch/unzip-6.0_p29::gentoo was built with the following:
USE="bzip2 (unicode) -natspec"
Comment 3 jlm 2025-05-28 20:07:46 UTC
Can you tell me if *any* zip files in /var/cache/distfiles work okay with unzip -t or unzip -l?

all zip fail with unzip from app-arch/unzip : only displaying the help message

all zip are ok according to bsdunzip
Comment 4 jlm 2025-05-28 20:08:54 UTC Comment hidden (obsolete)
Comment 5 Mike Gilbert gentoo-dev 2025-05-28 21:22:58 UTC
I wonder if you have a bogus script called "unzip" somewhere in PATH.

Does it work if you call it with the full path /usr/bin/unzip?
Comment 6 jlm 2025-05-29 19:57:02 UTC
(In reply to Mike Gilbert from comment #5)
> I wonder if you have a bogus script called "unzip" somewhere in PATH.
> 
> Does it work if you call it with the full path /usr/bin/unzip?

no all the test were done with full path call '/usr/bin/unzip' so no luck... I searched for file called unzip, there is only one, which unzip also returns /usr/bin/unzip....
Comment 7 Mike Gilbert gentoo-dev 2025-05-29 20:25:34 UTC
Could you please share the full command line you are using when testing? Including any/all options passed to unzip.
Comment 8 Mike Gilbert gentoo-dev 2025-05-29 20:27:10 UTC
Also, is the UNZIP environment variable set?
Comment 9 jlm 2025-06-03 16:21:53 UTC
(In reply to Mike Gilbert from comment #8)
> Also, is the UNZIP environment variable set?

ah!!!! that's it! ok don't remember why I set the unzip to force use UTF-8 option, and don't know why it isn't supported anymore, but this was the root cause... maybe portage should wipe UNZIP environment variable?