[less] Use `groff' instead of `man -s' for rendering manpages

Vojtěch Vítek vvitek at fedoraproject.org
Tue Nov 22 17:19:12 UTC 2011


commit e2a2557c3961906d0d877c674ae2489f8e3d8b55
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date:   Tue Nov 22 17:52:58 2011 +0100

    Use `groff' instead of `man -s' for rendering manpages
    
    - This prevents options incompatibility between man and man-db packages (#718498).
    - Add groff to .spec Requires

 less.spec   |    6 +++++-
 lesspipe.sh |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/less.spec b/less.spec
index f632a40..3996bea 100644
--- a/less.spec
+++ b/less.spec
@@ -15,7 +15,7 @@ Patch6: less-436-manpage-add-old-bot-option.patch
 Patch8: less-436-help.patch
 Patch9: less-436-empty-lessopen-pipe.patch
 URL: http://www.greenwoodsoftware.com/less/
-Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
+Requires: groff
 BuildRequires: ncurses-devel
 BuildRequires: pcre-devel
 BuildRequires: autoconf automake libtool
@@ -68,6 +68,10 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+- Use `groff' instead of `man -s' for rendering manpages to prevent
+  options incompatibility between man and man-db packages (#718498)
+- Add groff to Requires
+
 * Mon Aug 23 2011 Vojtech Vitek (V-Teq) <vvitek at redhat.com> - 444-3
 - Substitute %%makeinstall macro with make DESTDIR* install (#732557)
 
diff --git a/lesspipe.sh b/lesspipe.sh
index 819ce62..dcfc5db 100755
--- a/lesspipe.sh
+++ b/lesspipe.sh
@@ -30,7 +30,7 @@ case "$1" in
 	*.xz|*.lzma)	DECOMPRESSOR="xz -dc" ;;
 	esac
 	if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then
-		$DECOMPRESSOR -- "$1" | man -l - | cat -s
+		$DECOMPRESSOR -- "$1" | groff -Tascii -mandoc -
 		exit $?
 	fi ;;&
 *.[1-9n]|*.[1-9]x|*.man)


More information about the scm-commits mailing list