The recently stabilised sys-apps/man-1.6g-r1 corrupts the output when running in a pager (i.e., whenever standard output is connected to a terminal). Open any manpage, then scroll to the bottom. A small portion of the document is missing, replaced with the text '(nlu+10'. For example: % MANPAGER=cat man man [...] SEE ALSO apropos(1), whatis(1), less(1), groff(1), man.conf(5). (nlu+10 Expected results, as seen in sys-apps/man-1.6g: % MANPAGER=cat man man [...] SEE ALSO apropos(1), whatis(1), less(1), groff(1), man.conf(5). September 19, 2005 man(1) (Note that the bottom few lines are missing). The problem is in the (Gentoo-specific) man-1.6g-echo-escape.patch, which is rather misguided. The key thing to note is that the \n wasn't intended as a newline: it is part of a roff directive that got mangled by this patch. (The intended directive is \n(nl to obtain the value of the nl register) Since it is difficult to portably print the sequence '\n' using echo a solution is to use printf. Changing the patch to something like this should work OK: strcat(buft, "; printf '%s\\n' \".\\\\\\\"\" \".pl \\n(nlu+10\"") Which produces the intended roff directives: .\" .pl \n(nlu+10 and the display is correct again, yay. Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0, gcc-6.4.0, glibc-2.25-r10, 4.15.11 x86_64) ================================================================= System uname: Linux-4.15.11-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8300_@_2.50GHz-with-gentoo-2.4.1 KiB Mem: 4038996 total, 149332 free KiB Swap: 1993724 total, 1989628 free Timestamp of repository gentoo: Mon, 19 Mar 2018 00:55:01 +0000 Head commit of repository palemoon: bb6da539e7cc3814006cf3be9a1433e4bccd64aa sh bash 4.4_p12 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.2.4 [enabled] app-shells/bash: 4.4_p12::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.9.6::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.12::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.15.1-r2::gentoo sys-devel/binutils: 2.29.1-r1::gentoo sys-devel/gcc: 3.4.6-r2::gentoo, 4.1.2::gentoo, 4.2.4-r1::gentoo, 4.8.5-r1::gentoo, 4.9.4::gentoo, 5.4.0-r4::gentoo, 6.4.0-r1::gentoo, 7.3.0::gentoo sys-devel/gcc-config: 1.9.0-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r10::gentoo Repositories: gentoo location: /srv/repos/gentoo sync-type: webrsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage sync-user: portage priority: -1000 gentoo-draconx location: /srv/repos/gentoo-draconx masters: gentoo gentoo-fixes location: /srv/repos/gentoo-fixes masters: gentoo palemoon location: /srv/repos/palemoon sync-type: git sync-uri: https://github.com/deuiore/palemoon-overlay.git masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE @OTHER-FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=core2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /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/ssl/certs/ca-certificates.crt /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=core2 -pipe" DISTDIR="/var/cache/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --quiet-build --autounmask-write=n --dynamic-deps=n --unordered-display --verbose-conflicts --with-bdeps-auto=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs binpkg-multi-instance ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://distfiles.gentoo.org/" INSTALL_MASK="/usr/share/cursors/xorg-x11/default /usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf /etc/portage/*postsync.d /etc/profile.d/qtgui4.sh /etc/portage/bin/post_sync" LANG="en_CA.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en_CA en ja" MAKEOPTS="-j5" PKGDIR="/var/cache/portage/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 acl alsa amd64 berkdb bzip2 cairo cjk cli crypt cups curl cvs cxx doc dri enca exif fbcon fdt ffmpeg flac fontconfig fontforge fortran gdbm gnutls gpm graphviz gtk iconv icu idn imagemagick ipv6 jadetex jpeg jpeg2k kerberos kpathsea latex lcms libass lto mad modules mp3 mp4 multilib ncurses nls nptl ogg opengl openmp otr pam pcre perl png python readline sdl seccomp smp ssl svg tcpd tex4ht theora threads tiff truetype unicode vim-syntax vorbis xattr xcb xft xinerama xulrunner xv zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" KERNEL="linux" L10N="en-CA en ja ko" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm mips mipsel ppc ppc64" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel radeon" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 524624 [details, diff] fix nonportable echo properly Suggested replacement for man-1.6g-echo-escape.patch
(In reply to Nick Bowler from comment #1) > Created attachment 524624 [details, diff] [details, diff] > fix nonportable echo properly > > Suggested replacement for man-1.6g-echo-escape.patch I confirm that the replacement patch does correct the "(nlu+10" problem. If sys-apps/man is no longer going to be maintained, shouldn't it be removed from the tree? I personally am not looking forward to switching to sys-apps/man-db, as it looks to be over-engineered from my perspective, but I also don't want to use a man implementation that is going to slowly rot.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce370f012e25ad2eb756cbcaf768bf053161d067 commit ce370f012e25ad2eb756cbcaf768bf053161d067 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-03-07 21:54:44 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-03-07 21:59:07 +0000 sys-apps/man: remove package Closes: https://bugs.gentoo.org/468428 Closes: https://bugs.gentoo.org/515534 Closes: https://bugs.gentoo.org/524588 Closes: https://bugs.gentoo.org/589738 Closes: https://bugs.gentoo.org/605352 Closes: https://bugs.gentoo.org/651038 Closes: https://bugs.gentoo.org/683494 Signed-off-by: Mike Gilbert <floppym@gentoo.org> profiles/package.mask | 6 - sys-apps/man/Manifest | 1 - sys-apps/man/files/makewhatis.cron | 5 - sys-apps/man/files/man-1.5m2-apropos.patch | 16 --- sys-apps/man/files/man-1.6-cross-compile.patch | 61 ---------- .../files/man-1.6c-cut-duplicate-manpaths.patch | 83 ------------- sys-apps/man/files/man-1.6e-headers.patch | 13 -- .../man-1.6f-makewhatis-compression-cleanup.patch | 69 ----------- .../files/man-1.6f-man2html-compression-2.patch | 61 ---------- sys-apps/man/files/man-1.6f-parallel-build.patch | 78 ------------ sys-apps/man/files/man-1.6f-so-search-2.patch | 34 ------ sys-apps/man/files/man-1.6f-unicode.patch | 28 ----- sys-apps/man/files/man-1.6g-compress.patch | 17 --- sys-apps/man/files/man-1.6g-echo-escape.patch | 15 --- sys-apps/man/files/man-1.6g-fbsd.patch | 15 --- sys-apps/man/files/man-1.6g-xz.patch | 53 --------- sys-apps/man/man-1.6g-r1.ebuild | 131 --------------------- sys-apps/man/metadata.xml | 8 -- 18 files changed, 694 deletions(-)