The parameter "--quiet" is not really quiet and outputs empty rows. In the past - I guess, one year ago - the behaviour was, that it only outputs (un)fixable vulnerabilities without empty rows. This affects the following version: root@lenovo ~ # glsa-check --version glsa-check, version 1.0.1 Author: Marius Mauch <genone@gentoo.org> This program is licensed under the GPL, version 2 root@lenovo ~ # Reproducible: Always Steps to Reproduce: 1. glsa-check --fix --quiet all 2. Watch scrolling empty rows Actual Results: <a lot of empty rows> Fixing GLSA YYYYMM-DD >>> cannot fix GLSA, no unaffected packages available [...] Expected Results: <no empty rows> Fixing GLSA YYYYMM-DD >>> cannot fix GLSA, no unaffected packages available [...]
System information: root@lenovo ~ # emerge --info Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.3.0, glibc-2.30-r8, 5.4.28-gentoo x86_64) ================================================================= System uname: Linux-5.4.28-gentoo-x86_64-Intel-R-_Core-TM-_i7-4700MQ_CPU_@_2.40GHz-with-gentoo-2.6 KiB Mem: 16296656 total, 9284812 free KiB Swap: 11007992 total, 10889720 free Timestamp of repository gentoo: Wed, 29 Apr 2020 11:38:59 +0000 Head commit of repository gentoo: a4ee36321912291ff0c0a2cc135d8a1367ccf7b4 sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.33.1 p2) 2.33.1 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo dev-util/cmake: 3.16.5::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.33.1-r1::gentoo sys-devel/gcc: 9.3.0::gentoo sys-devel/gcc-config: 2.2.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.30-r8::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 pf4public location: /var/db/repos/layman/pf4public sync-type: laymansync sync-uri: https://github.com/PF4Public/gentoo-overlay.git masters: gentoo priority: 50 stefantalpalaru location: /var/db/repos/layman/stefantalpalaru sync-type: laymansync sync-uri: https://github.com/stefantalpalaru/gentoo-overlay.git masters: gentoo priority: 50 torbrowser location: /var/db/repos/layman/torbrowser sync-type: laymansync sync-uri: https://github.com/MeisterP/torbrowser-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-ftree-vectorize -O3 -pipe -march=haswell" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" 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 /etc/terminfo /usr/bin/startx" CXXFLAGS="-ftree-vectorize -O3 -pipe -march=haswell" DISTDIR="/var/db/repos/gentoo/distfiles" EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 7.2" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/" LANG="en_GB.utf8" LC_ALL="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="--jobs 4 --load-average 7.2" PKGDIR="/var/db/repos/gentoo/packages" 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="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode exif ffmpeg flac fortran gdbm gif gpm iconv icu ipv6 jpeg kdesu kipi kwallet lcms ldap libnotify libtirpc lm_sensors mad mng mp3 mp4 mpeg multilib ncurses networkmanager nptl ogg opengl openmp p2p pam pango pcre pdf phonon plasma png policykit ppds pulseaudio python qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 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="efi-64" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon intel mesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS root@lenovo ~ # These bug reports might relate to this issue: Portage version 2.3.74: https://bugs.gentoo.org/587930 https://bugs.gentoo.org/692872 https://bugs.gentoo.org/693088 Portage version 2.3.75: https://bugs.gentoo.org/235970 https://bugs.gentoo.org/692134
I found the culprit at "/usr/lib/python-exec/python3.8/glsa-check" line 293. There is the following line: sys.stdout.write("\n") After removing it, I get the expected results.
I've also noticed this for glsa-check -p -q all It now outputs tons of empty lines, instead of just the pertinent GLSAs.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=482177991dd27f2e776176233c097dfa6ea84439 commit 482177991dd27f2e776176233c097dfa6ea84439 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-29 00:27:26 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-29 00:29:53 +0000 glsa-check: suppress line 293 newline for --quiet (bug 719260) Bug: https://bugs.gentoo.org/719260#c2 Reported-by: Ramon Fischer <Ramon_Fischer@hotmail.de> Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/glsa-check | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Removing "sys.stdout.write("\n")" causes the verbose output to change like so: $ glsa-check --fix all Fixing GLSA 200711-11 >>> no vulnerable packages installed Fixing GLSA 201612-06 >>> no vulnerable packages installed Without removing it: $ glsa-check --fix all Fixing GLSA 200711-11 >>> no vulnerable packages installed Fixing GLSA 201612-06 >>> no vulnerable packages installed So "sys.stdout.write("\n")" has to be added at certain lines to fix this. In my opinion very trivial, but it might have bigger impact; I am no Python expert. -Ramon
I do not know what happened with my previous comment. The output is just without newline like so: Without removing it: $ glsa-check --fix all Fixing GLSA 200711-11 >>> no vulnerable packages installed Fixing GLSA 201612-06 >>> no vulnerable packages installed Hopefully, it is displayed correctly now. -Ramon
I only changed the behavior for --quiet: https://gitweb.gentoo.org/proj/portage.git/commit/?id=482177991dd27f2e776176233c097dfa6ea84439 Let me know if I should make it unconditional.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b227821cc18ee50ede6b9cb6493820a0460cd1bb commit b227821cc18ee50ede6b9cb6493820a0460cd1bb Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-29 07:31:19 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-29 07:34:04 +0000 sys-apps/portage: Bump to version 3.0.18 #651208 profile-repo-deps profile-formats support #719260 remove glsa --quiet blank line #722748 suppress emerge --oneshot portage suggestion Bug: https://bugs.gentoo.org/778869 Bug: https://bugs.gentoo.org/651208 Bug: https://bugs.gentoo.org/719260 Bug: https://bugs.gentoo.org/722748 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.18.ebuild | 279 +++++++++++++++++++++++++++++++++ 2 files changed, 280 insertions(+)
Thanks Zac! Looks good to me! -Ramon