My gentoo install seems to use bzipped man pages, but the stable man2html 1.5l-r2 doesn't support them. This patch adds that support simply and simplifies the code that was there for determining the compression type. Reproducible: Always Steps to Reproduce: 1.install gentoo 2.install man2html 3.use man2html to view a manpage Actual Results: Invalid Manpage The requested file /usr/share/man/man3/printf.3.bz2 is not a valid (unformatted) man page. If the file is a formatted manpage, you could try to load the plain file. Expected Results: The manpage, formatted nicely in html. --- man2html 2007-05-23 12:56:23.000000000 -0400 +++ man2html.save 2007-05-23 12:56:09.000000000 -0400 @@ -84,20 +84,29 @@ if [ x"$PAGE" = x ]; then exit 0 fi -if [ -r "$PAGE" ] +if [ ! -r "$PAGE" ] then - case "$PAGE" in - *.gz) - zcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE" - ;; - *) - "$MAN2HTML" "$LL" "$PAGE" - ;; - esac -elif [ -r "$PAGE".gz ] -then - zcat "$PAGE".gz | "$MAN2HTML" "$LL" -D "$PAGE" -else - "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE." + # If PAGE is not found, see if it is compressed + if [ -r "$PAGE".gz ] + then + PAGE="$PAGE".gz + elif [ -r "$PAGE".bz2 ] + then + PAGE="$PAGE".bz2 + else + "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE." + fi fi + +case "$PAGE" in +*.bz2) + bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE" + ;; +*.gz) + zcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE" + ;; +*) + "$MAN2HTML" "$LL" "$PAGE" + ;; +esac exit 0
Created attachment 120104 [details, diff] Patch to add bzip support to man2html correct formatting
I didn't exactly match the formatting of the original file. I probably should have done that. The file uses a 4 space indent, but compresses multiples of 8 spaces with TABs <ugly>. There are three lines that would need to be fixed. I'm attaching the new patch file. ------ Portage 2.1.2.7 (default-linux/x86/2007.0/server, gcc-4.1.2, glibc-2.5-r2, 2.6.17-gentoo-r8 i686) ================================================================= System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 2500+ Gentoo Base System release 1.12.9 Timestamp of tree: Wed, 23 May 2007 11:00:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [disabled] dev-lang/python: 2.3.5-r3, 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r7 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-mtune=athlon-xp -march=athlon-xp -pipe -O3 -ffast-math -maccumulate-outgoing-args -ftracer -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/init.d /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-mtune=athlon-xp -march=athlon-xp -pipe -O3 -ffast-math -maccumulate-outgoing-args -ftracer -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.osuosl.org/ http://mirror.datapipe.net/gentoo ftp://linux.thai.net/pub/mirrors/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="alsa apache2 berkdb bitmap-fonts bzip2 cli cracklib crypt cups dba dcraw dri emacs ethereal fortran gd gdbm iconv imagemagick imap ipv6 isdnlog jpeg ldap libg++ maildir memlimit midi mudflap mysql ncurses nls nptl nptlonly offensive openmp pam pcre perl png postgres pppd prelude python readline reflection sasl session snmp spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts unzip usb vhosts virus-scan x86 xml xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 128671 [details, diff] Patch for inclusion in the "files" directory of the ebuild Just modified the paths at the top of the patch so it can be used with the ebuild
Created attachment 128673 [details, diff] Patch to modify the ebuild script to add the patch file for this bug.
reassigning to proper alias
*** Bug 195856 has been marked as a duplicate of this bug. ***
*** Bug 198071 has been marked as a duplicate of this bug. ***
Supported in man2html-1.6f which is now in the tree.