From eff511c8f2ed987ff930208f1346ef07782b8be3d63248677b82f91c031fd758 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Dec 2006 23:17:06 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/man?expand=0&rev=1 --- .gitattributes | 23 + .gitignore | 1 + cron.daily.clean_catman | 42 + cron.daily.do_mandb | 53 + man-db-2.3.19deb4.0-groff.dif | 61 + man-db-2.4.1-error.dif | 53 + man-db-2.4.1-security2.dif | 18 + man-db-2.4.1-security4.dif | 32 + man-db-2.4.3-3.diff.bz2 | 3 + man-db-2.4.3-section.dif | 30 + man-db-2.4.3.dif | 2750 +++++++++++++++++++++++++++++++++ man-db-2.4.3.tar.bz2 | 3 + man.changes | 623 ++++++++ man.spec | 459 ++++++ ready | 0 sysconfig.cron-man | 23 + 16 files changed, 4174 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cron.daily.clean_catman create mode 100644 cron.daily.do_mandb create mode 100644 man-db-2.3.19deb4.0-groff.dif create mode 100644 man-db-2.4.1-error.dif create mode 100644 man-db-2.4.1-security2.dif create mode 100644 man-db-2.4.1-security4.dif create mode 100644 man-db-2.4.3-3.diff.bz2 create mode 100644 man-db-2.4.3-section.dif create mode 100644 man-db-2.4.3.dif create mode 100644 man-db-2.4.3.tar.bz2 create mode 100644 man.changes create mode 100644 man.spec create mode 100644 ready create mode 100644 sysconfig.cron-man diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cron.daily.clean_catman b/cron.daily.clean_catman new file mode 100644 index 0000000..5f2c434 --- /dev/null +++ b/cron.daily.clean_catman @@ -0,0 +1,42 @@ +#!/bin/sh +# +# +# clean_catman. This script was split off cron.daily +# Please add your local changes to cron.daily.local +# since this file will be overwritten, when updating your system. +# +# Copyright (c) 1996-2002 SuSE GmbH Nuernberg, Germany. +# +# please send bugfixes or comments to feedback@suse.de. +# +# Author: Burchard Steinbild , 1996 +# Florian La Roche , 1996 +# + + +# +# paranoia settings +# +umask 022 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +export PATH + +if [ -f /etc/sysconfig/cron ] ; then + . /etc/sysconfig/cron +fi + +# +# Delete too old preformatted man-pages. +# +if test "$DELETE_OLD_CATMAN" = yes ; then + if test -z "$CATMAN_ATIME" ; then + # Default is 7 days + CATMAN_ATIME=7 + fi + test -e /var/cache/man -a -x /usr/bin/safe-rm && \ + find /var/cache/man -name '*.gz' -type f -atime +$CATMAN_ATIME -print0 | \ + xargs --no-run-if-empty --max-lines=200 --null -- /usr/bin/safe-rm +fi + +exit 0 diff --git a/cron.daily.do_mandb b/cron.daily.do_mandb new file mode 100644 index 0000000..ce3c4f5 --- /dev/null +++ b/cron.daily.do_mandb @@ -0,0 +1,53 @@ +#!/bin/sh +# +# +# do_mandb. This script was split off cron.daily. +# Please add your local changes to cron.daily.local +# since this file will be overwritten, when updating your system. +# +# Copyright (c) 1996-2002 SuSE GmbH Nuernberg, Germany. +# +# please send bugfixes or comments to feedback@suse.de. +# +# Author: Burchard Steinbild , 1996 +# Florian La Roche , 1996 +# + +# +# paranoia settings +# +umask 022 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +export PATH + +# +# get information from /etc/sysconfig/cron +# +if test -f /etc/sysconfig/cron ; then + . /etc/sysconfig/cron +fi + + +# +# now we do the man page stuff +# +if test "$REINIT_MANDB" = yes -o ! -s /var/cache/man/index.db ; then + if test -x /usr/bin/mandb ; then + test -x /usr/bin/safe-rm -a -e /var/cache/man/index.bt && \ + /usr/bin/safe-rm /var/cache/man/index.bt + /usr/bin/mandb -q -s 2> /dev/null || { + echo There seem to be trouble with mandb. + echo + echo please run /usr/bin/mandb an check the output... + } + fi + # + # some applications need whatis database. If makewhatis exists, call it + # + if test -x /usr/sbin/makewhatis ; then + /usr/sbin/makewhatis + fi +fi + +exit 0 diff --git a/man-db-2.3.19deb4.0-groff.dif b/man-db-2.3.19deb4.0-groff.dif new file mode 100644 index 0000000..c91a6a5 --- /dev/null +++ b/man-db-2.3.19deb4.0-groff.dif @@ -0,0 +1,61 @@ +--- groff/tmac.andb ++++ groff/tmac.andb Fri Apr 6 19:08:58 2001 +@@ -0,0 +1,29 @@ ++.\" tmac.(m)andb ++.\" ++.\" This is part of the man(db) package of SuSE Linux ++.\" Author: Werner Fink ++.\" ++.\" Load tmac.an ++.\" ++.mso tmac.an ++.\" ++.\" Remember the original macros for headers and footers ++.\" and Overwrite them. The original footers macros will ++.\" be called at the bitter end. ++.\" ++.rn an-header db@header ++.de an-header ++. if (\\n% == 1) \ ++. db@header ++.. ++.rn an-footer db@footer ++.de an-footer ++.. ++.rn an-p-footer db@p-footer ++.de an-p-footer ++.. ++.de db@end ++. wh -1i db@footer ++. wh -.5i db@p-footer ++.. ++.em db@end +--- groff/tmac.andocdb ++++ groff/tmac.andocdb Fri Apr 6 19:08:58 2001 +@@ -0,0 +1,26 @@ ++.\" tmac.(m)andocdb ++.\" ++.\" This is part of the man(db) package of SuSE Linux ++.\" Author: Werner Fink ++.\" ++.\" Just like tmac.andoc but ++.\" load either tmac.andb or tmac.doc ++.\" ++.if !\n(.g .ab These macros require groff. ++.de Dd ++.rm Dd ++.do mso tmac.doc ++\\*(Dd\\ ++.. ++.de TH ++.rm TH ++.do mso tmac.andb ++\\*(TH\\ ++.. ++.if '\*[.T]'utf8' \{\ ++. char \- \N'45' ++. char - \N'45' ++. char ' \N'39' ++. char ` \N'96' ++.\} ++.. diff --git a/man-db-2.4.1-error.dif b/man-db-2.4.1-error.dif new file mode 100644 index 0000000..26ac5c7 --- /dev/null +++ b/man-db-2.4.1-error.dif @@ -0,0 +1,53 @@ +--- lib/error.c ++++ lib/error.c Fri Mar 16 16:48:40 2001 +@@ -69,12 +69,15 @@ + #define strerror private_strerror + #endif + ++#include "lib/error.h" ++ + /* Print the program name and error message MESSAGE, which is a printf-style + format string with optional args. + If ERRNUM is nonzero, print its corresponding system error message. + Exit with status STATUS if it is nonzero. */ + /* VARARGS */ + ++#ifndef __GLIBC__ /* glibc exports this function */ + void + #if defined(VA_START) && __STDC__ + error (int status, int errnum, const char *message, ...) +@@ -117,3 +120,4 @@ + if (status) + exit (status); + } ++#endif +--- lib/error.h ++++ lib/error.h Fri Mar 16 16:45:18 2001 +@@ -7,10 +7,11 @@ + extern int errno; + #endif + ++/* Use error() function of glibc */ + #if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT) +-void error (int, int, const char *, ...); ++extern void error (int, int, const char *, ...); + #else +-void error (); ++extern void error (); + #endif + + #endif +--- lib/xmalloc.c ++++ lib/xmalloc.c Fri Mar 16 16:45:37 2001 +@@ -44,9 +44,9 @@ + int xmalloc_exit_failure = EXIT_FAILURE; + + #if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT) +-void error (int, int, const char *, ...); ++extern void error (int, int, const char *, ...); + #else +-void error (); ++extern void error (); + #endif + + #include "manconfig.h" diff --git a/man-db-2.4.1-security2.dif b/man-db-2.4.1-security2.dif new file mode 100644 index 0000000..ceaf562 --- /dev/null +++ b/man-db-2.4.1-security2.dif @@ -0,0 +1,18 @@ +--- src/straycats.c ++++ src/straycats.c Wed Jul 9 19:33:23 2003 +@@ -366,6 +366,7 @@ + int fd; + drop_effective_privs (); + fd = create_tempfile ("zcat", &temp_name); ++ regain_effective_privs (); + if (fd == -1) { + error (0, errno, + _("warning: can't create temp file %s"), +@@ -373,7 +374,6 @@ + return 0; + } + close (fd); +- regain_effective_privs (); + } + + dbf = MYDBM_RWOPEN (database); diff --git a/man-db-2.4.1-security4.dif b/man-db-2.4.1-security4.dif new file mode 100644 index 0000000..6e73e6f --- /dev/null +++ b/man-db-2.4.1-security4.dif @@ -0,0 +1,32 @@ +--- src/mandb.c ++++ src/mandb.c Fri Jul 11 17:48:41 2003 +@@ -34,6 +34,7 @@ + #include + #include + #include /* for chmod() */ ++#include /* for open () */ + + #if defined(STDC_HEADERS) + # include +@@ -328,11 +331,20 @@ + char pid[23]; + short amount; + char *dbname; ++ int fd; + + dbname = mkdbname (catpath); + sprintf (pid, "%d", getpid ()); + database = strappend (NULL, catpath, "/", pid, NULL); +- ++ ++ /* Just for the case that catpath isn't a system catpath */ ++ drop_effective_privs (); ++ fd = open (database, O_WRONLY | O_CREAT | O_EXCL, 0644); ++ regain_effective_privs (); ++ if (fd < 0) ++ error (FATAL, errno, _("can't create a temporary filename")); ++ close(fd); ++ + if (!quiet) + printf (_("Processing manual pages under %s...\n"), manpath); + #ifdef NDBM diff --git a/man-db-2.4.3-3.diff.bz2 b/man-db-2.4.3-3.diff.bz2 new file mode 100644 index 0000000..9f2158a --- /dev/null +++ b/man-db-2.4.3-3.diff.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b937020bb5eb0bcbe712dd877469e618509a120800e9145f9ed8d126c2310a2c +size 2027 diff --git a/man-db-2.4.3-section.dif b/man-db-2.4.3-section.dif new file mode 100644 index 0000000..fc4cb3f --- /dev/null +++ b/man-db-2.4.3-section.dif @@ -0,0 +1,30 @@ +--- src/man.c ++++ src/man.c 2006-06-13 16:01:19.000000000 +0200 +@@ -1312,7 +1312,7 @@ + { + const char **vs; + +- for (vs = section_list; *vs; vs++) { ++ for (vs = section_list; vs && *vs; vs++) { + if (STREQ (*vs, name)) + return name; + if (strlen (*vs) == 1 && STRNEQ (*vs, name, 1)) +@@ -2714,7 +2714,8 @@ + * section_list. + */ + const char **sp; +- for (sp = section_list; *sp; ++sp) { ++ ++ for (sp = section_list; sp && *sp; ++sp) { + if (!*(*sp + 1)) { + /* No extension */ + if (!sec_left && **sp == *(left->ext)) +@@ -3397,7 +3398,7 @@ + } else { + const char **sp; + +- for (sp = section_list; *sp; sp++) { ++ for (sp = section_list; sp && *sp; sp++) { + char **mp; + + for (mp = manpathlist; *mp; mp++) diff --git a/man-db-2.4.3.dif b/man-db-2.4.3.dif new file mode 100644 index 0000000..77d7981 --- /dev/null +++ b/man-db-2.4.3.dif @@ -0,0 +1,2750 @@ +Index: .pkgextract +=================================================================== +--- /dev/null ++++ .pkgextract +@@ -0,0 +1,6 @@ ++bzcat ../man-db-2.4.3-3.diff.bz2 | patch -p1 -s --suffix=.debian ++patch -p0 -s --suffix=.groff < ../man-db-2.3.19deb4.0-groff.dif ++patch -p0 -s --suffix=.err < ../man-db-2.4.1-error.dif ++patch -p0 -s --suffix=.sect < ../man-db-2.4.3-section.dif ++patch -p0 -s --suffix=.secu2 < ../man-db-2.4.1-security2.dif ++patch -p0 -s --suffix=.secu4 < ../man-db-2.4.1-security4.dif +Index: GNUmakefile.in +=================================================================== +--- GNUmakefile.in.orig ++++ GNUmakefile.in +@@ -35,7 +35,7 @@ + # Make targets are: # + # # + # all install uninstall mostlyclean clean distclean realclean TAGS ID # +-# FILES lib src man intl libdb zsoelim update RCS dist # ++# FILES lib src man libdb zsoelim update RCS dist # + #------------------------------------------------------------------------# + + srcdir = @srcdir@ +@@ -51,9 +51,9 @@ USE_NLS = @USE_NLS@ + # GNUmakefile and include/Defines are automatic targets, don't add below. + INCLUDES := config.h $(addprefix include/, manconfig.h comp_src.h) + CONF = src/man_db.conf +-EVERYTHING = lib intl libdb src zsoelim man po +-ALL = lib intl libdb src zsoelim man po +-INSTALL = src zsoelim man intl po ++EVERYTHING = lib libdb src zsoelim man po ++ALL = lib libdb src zsoelim man po ++INSTALL = src zsoelim man po + + include include/Defines + +@@ -162,7 +162,7 @@ __TAGS: + install: $(INCLUDES) $(CONF) + + install uninstall: +- for i in $(INSTALL); do $(MAKE) prefix=$(prefix) -C $$i $@; done ++ for i in $(INSTALL); do $(MAKE) prefix=$(prefix) DESTDIR=$(DESTDIR) -C $$i $@; done + + TAGS realclean distclean mostlyclean clean: + for i in $(EVERYTHING); do $(MAKE) prefix=$(prefix) -C $$i $@ clean=yes; done +@@ -220,7 +220,6 @@ dist: update + for file in $(FILES); do \ + cp -p $(srcdir)/$$file $(man_db)/$$file; \ + done +- $(MAKE) -C intl dist + # Maintainers may wish to run 'make -C po update-po' beforehand. + # This is not done automatically, since the .po files are stored + # in revision control. +Index: Makefile.Linux +=================================================================== +--- /dev/null ++++ Makefile.Linux +@@ -0,0 +1,71 @@ ++# ++# ++# ++# Makefile.Linux to integrate package into source tree of SuSE Linux. ++# ++# Copyright (c) 1996-2001 SuSE GmbH Nuernberg, Germany. ++# ++# please send bugfixes or comments to feedback@suse.de. ++# ++# ++ ++ARCH = $(shell uname -m | sed 's@\(i\)[34567]\(86\)@\13\2@') ++CFLAGS = $(RPM_OPT_FLAGS) -funroll-loops -pipe \ ++ -D_GNU_SOURCE -D_SVID_SOURCE -Wall ++MANDIR = /usr/share/man ++SYSCONFDIR = /etc ++export DESTDIR ++ ++flags = CFLAGS="$(CFLAGS)" LDFLAGS= LIBS= ++ ++GNUmakefile config.cache: ++ aclocal ++ autoconf ++ $(flags) sh configure --prefix=/usr --enable-dups \ ++ --enable-setuid=man --with-device=latin1 \ ++ --mandir=$(MANDIR) \ ++ --with-zio \ ++ --with-gnu-ld \ ++ --disable-rpath \ ++ --enable-mb-groff \ ++ --with-db=gdbm \ ++ --enable-nls \ ++ --with-config-file=$(SYSCONFDIR)/manpath.config \ ++ --without-included-gettext ++ ++compile: GNUmakefile ++ make nls=all $(flags) ++ ++install: ++ mkdir -p $(DESTDIR)/usr/lib/man-db ++ mkdir -p $(DESTDIR)/usr/bin ++ make nls=all install $(flags) DESTDIR=$(DESTDIR) ++ { \ ++ if test -x $(DESTDIR)/usr/bin/wrapper ; then \ ++ rm -f $(DESTDIR)/usr/bin/mandb; \ ++ rm -f $(DESTDIR)/usr/bin/man; \ ++ mv $(DESTDIR)/usr/bin/wrapper $(DESTDIR)/usr/bin/mandb; \ ++ ln -sf mandb $(DESTDIR)/usr/bin/man; \ ++ fi; \ ++ chown root.root $(DESTDIR)/usr/bin/mandb $(DESTDIR)/usr/bin/man; \ ++ chmod 4711 $(DESTDIR)/usr/bin/mandb $(DESTDIR)/usr/bin/man; \ ++ chown root.root $(DESTDIR)/usr/lib/man-db/*; \ ++ chmod 0711 $(DESTDIR)/usr/lib/man-db/*; \ ++ } ++ { \ ++ mkdir -p $(DESTDIR)/usr/share/man ; \ ++ cd $(DESTDIR)/usr/share/man ; \ ++ rm -rf *.ascii/ ; \ ++ for d in *.88591 *.eucJP ; do \ ++ mkdir -p $${d%_*} ; \ ++ (cd $${d}/ > /dev/null ; tar cfps - * ) | tar xfC - $${d%_*} ; \ ++ rm -rf $${d}/ ; \ ++ done ; \ ++ find -name '*.[1-9nlop]' | xargs gzip -9f ; \ ++ for d in `find -name manpath.5.gz -printf '%h '` ; do \ ++ ln -sf manpath.5.gz $$d/manpath.config.5.gz ; \ ++ done; \ ++ } ++ install -m 644 src/man_db.conf $(DESTDIR)/etc/manpath.config ++ sh ./mk_catdirs $(DESTDIR) ++ +Index: config.h.in +=================================================================== +--- config.h.in.orig ++++ config.h.in +@@ -380,6 +380,9 @@ + /* Define to 1 if `vfork' works. */ + #undef HAVE_WORKING_VFORK + ++/* Define to 1 if you have libzio for opening compressed manuals */ ++#undef HAVE_ZIO ++ + /* Define to 1 if you have the `__argz_count' function. */ + #undef HAVE___ARGZ_COUNT + +Index: configure.in +=================================================================== +--- configure.in.orig ++++ configure.in +@@ -10,6 +10,18 @@ AC_CONFIG_HEADER(config.h) + AC_CANONICAL_HOST + AC_ARG_PROGRAM + dnl ++dnl Check $PATH for the following progs and append suitable options. ++dnl ++AC_PROG_CC ++AC_PROG_CPP ++AC_GNU_SOURCE ++dnl ++dnl check for system defaults ++dnl ++AC_AIX ++AC_MINIX ++AC_ISC_POSIX ++dnl + dnl Define below date and version information to be put into man pages etc. + dnl + datemark=20050703 +@@ -97,6 +109,18 @@ AC_ARG_WITH(config-file, + config_file=$withval + fi], + : ${config_file=\$\{sysconfdir\}/man_db.conf}) ++AC_ARG_WITH(zio, ++[ --with-zio=LIBRARY use zlib/libbz2 wrapper library LIBRARY (libzio)], ++ [if test -z "$withval" -o "$withval" = "yes" ++ then ++ zio=libzio ++ elif test "$withval" = "no" ++ then ++ AC_MSG_ERROR(--with-zio requires an argument) ++ else ++ zio=$withval ++ fi], ++ : ${zio=no}) + dnl + dnl Finish the argument parsing + dnl +@@ -115,10 +139,10 @@ fi + AC_PROG_INSTALL + AC_PROG_RANLIB + AC_PATH_PROG(cat, cat) +-AC_PATH_PROG(lynx, lynx) ++AC_PATH_PROG(lynx, lynx, /usr/bin/lynx) + AC_PATH_PROG(tr, tr) + AC_PATH_PROG(grep, grep) +-AC_PATH_PROGS(pager, pager less more) ++AC_PATH_PROGS(pager, less more) + test -n "$pager" && pager="$pager -s" + dnl + dnl define below (in list of preference) *roff macros to check for. +@@ -214,6 +238,14 @@ else + fi + dnl + AC_PATH_PROGS(eqn, eqn geqn) ++AC_PATH_PROG(geqn, geqn) ++dnl ++dnl if geqn is found and geqn is identical with eqn we use a GNU eqn ++dnl which its self can use -Tlatin1 ++dnl ++if test -n "$geqn" -a -n "$eqn" ; then ++ test $geqn -ef $eqn && neqn="$eqn $nroff_device" ++fi + AC_PATH_PROGS(neqn, neqn gneqn) + dnl + dnl if we fail to find an neqn, use eqn and try to force it to output +@@ -242,10 +274,16 @@ then + decompressor="$gunzip" + fi + AC_PATH_PROG(compress, compress) +-if test -n "$compress" ++if test -n "$compress" || test -n "$gzip" + then + AC_DEFINE(HAVE_COMPRESS, 1, [Define if you have compress.]) +- uncompress="$compress -dc" ++ if test -n "$gzip" ++ then ++ uncompress="$gzip -dc" ++ elif test -n "$compress" ++ then ++ uncompress="$compress -dc" ++ fi + if test -z "$gzip" + then + compressor="$compress -c" +@@ -299,9 +337,6 @@ AC_ARG_ENABLE(mandirs, + dnl + dnl check for various header files and associated libraries. + dnl +-AC_AIX +-AC_MINIX +-AC_ISC_POSIX + dnl AC_PROG_LEX calls AC_TRY_LINK: must come after above 3 + AC_PROG_LEX + AC_HEADER_STDC +@@ -313,7 +348,7 @@ dnl + dnl Internationalization support. + dnl + AM_GNU_GETTEXT +-AM_GNU_GETTEXT_VERSION(0.12.1) ++AM_GNU_GETTEXT_VERSION([0.15]) + AC_SUBST(LINGUAS)dnl + dnl + dnl Checks for structures and compiler characteristics. +@@ -336,6 +371,30 @@ MAN_FUNC_ANSI_SPRINTF + MAN_FUNC_PCLOSE + MAN_FUNC_STRSIGNAL + dnl ++dnl Check for zlib and libbz2 libraries to use this together ++dnl with SuSE's libzio to open compressed info files. ++dnl ++if test "$zio" = "no" || test -n "$zio" ++then ++ AC_CHECK_HEADER(zlib.h,[ ++ for lib in z gz ++ do ++ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib" ; LEXLIB="$LEXLIB -l$lib" ; break]) ++ done]) ++ AC_CHECK_HEADER(bzlib.h,[ ++ for lib in bz2 bzip2 ++ do ++ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; LEXLIB="$LEXLIB -l$lib" ; break]) ++ done]) ++ AC_CHECK_HEADER(zio.h,[ ++ for lib in ${zio#lib} zio ++ do ++ AC_CHECK_LIB($lib, fzopen, [LIBS="$LIBS -l$lib" ; LEXLIB="$LEXLIB -l$lib" ++ AC_DEFINE([COMP_SRC],[],[]) ++ AC_DEFINE([HAVE_ZIO],[],[])]) ++ done]) ++fi ++dnl + dnl Find a suitable database interface header and library + dnl + dnl Check for Berkeley db routines (first version API) +@@ -492,7 +551,6 @@ AC_CONFIG_FILES(GNUmakefile + include/Defines + include/comp_src.h + include/manconfig.h +- intl/Makefile + po/Makefile.in) + AC_OUTPUT + +Index: mk_catdirs +=================================================================== +--- /dev/null ++++ mk_catdirs +@@ -0,0 +1,24 @@ ++#!/bin/sh ++ ++OLDPWD="`pwd`" ++CACHE="$1/var/cache/man" ++ ++ cats="cat{0,1,2,3,4,5,6,7,8,9,n}" ++locale="{cs,da,de,es,fi,fr,ga,hu,is,it,ja,ko,nl,no,pl,pt,ru,sr,sv}" ++ dirs="{local,X11R6,openwin,allman,opt}" ++ ++umask 022 ++test -d ${CACHE} && rm -rf ${CACHE} ++mkdir -p ${CACHE} ++ ++cd ${CACHE} ++eval echo ${cats} \ ++ ${locale}/${cats} \ ++ ${dirs}/${cats} \ ++ ${dirs}/${locale}/${cats} \ ++ | xargs mkdir -p ++sync ++cd ${OLDPWD} ++ ++chown man:root -R ${CACHE} ++ +Index: include/comp_src.h.in +=================================================================== +--- include/comp_src.h.in.orig ++++ include/comp_src.h.in +@@ -53,7 +53,7 @@ struct compression comp_list[] = { + #endif /* HAVE_GZIP */ + + /* If we have compress, incorporate the following */ +-#ifdef HAVE_COMPRESS ++#if defined(HAVE_COMPRESS) || defined(HAVE_GZIP) + {UNCOMPRESS, "Z", NULL}, + #endif /* HAVE_COMPRESS */ + +Index: include/manconfig.h.in +=================================================================== +--- include/manconfig.h.in.orig ++++ include/manconfig.h.in +@@ -68,7 +68,7 @@ + MAN_DB_UPDATES - to allow man to update databases + MAN_CATS - to allow man to create/update cat files */ + +-#define MAN_DB_CREATES ++/* #define MAN_DB_CREATES */ + #define MAN_DB_UPDATES + #define MAN_CATS + +@@ -134,6 +134,8 @@ + #ifndef NROFF_MISSING + # ifndef NROFF + # define NROFF "@nroff@" ++# undef NROFF ++# define NROFF "/usr/bin/nroff -mandocdb" + # endif + #endif + +@@ -238,8 +240,12 @@ + #ifdef inline + /* autoconf #defines inline to be either "__inline", "__inline__" + or "" if the compiler doesn't like inline */ +-# define __inline__ inline +-# define __inline inline ++# ifndef __inline__ ++# define __inline__ inline ++# endif ++# ifndef __inline ++# define __inline inline ++# endif + #endif /* inline */ + + /* my gcc specs file is hacked to define __profile__ if I compile with +@@ -307,14 +313,17 @@ extern struct compression *comp_file (co + extern char *decompress (const char *filename, const struct compression *comp); + extern __inline__ void remove_ztemp (void); + extern __inline__ char *get_ztemp (void); ++extern __inline__ void set_wbuf(const char* whatis); ++extern __inline__ char *get_wbuf(void); ++ + + /* straycats.c */ + extern int straycats (char *mandir); + + /* lexgrog.l */ + struct lexgrog; +-extern int find_name (const char *file, const char *filename, +- struct lexgrog *p_lg); ++extern int find_name (const char *file, const char *filename, struct lexgrog *p_lg); ++extern int find_name_str(char *buffer, const char *filename, struct lexgrog *p_lg); + + /* util.c */ + struct pipeline; +@@ -327,11 +336,17 @@ extern int remove_directory (const char + extern char *trim_spaces (const char *s); + + #ifndef HAVE_BASENAME +-extern char *basename (); ++# ifndef _STRING_H ++# include ++# endif + #endif /* HAVE_BASENAME */ + + #ifndef HAVE_STRSEP + extern char *strsep (char **stringp, const char *delim); ++#else ++# ifndef _STRING_H ++# include ++# endif + #endif /* !HAVE_STRSEP */ + + #ifndef HAVE_GETCWD +@@ -356,7 +371,6 @@ extern char *program_name; /* the basena + #define FAIL 1 /* usage or syntax error */ + #define FATAL 2 /* operational error */ + #define CHILD_FAIL 3 /* child failed */ +-#define INTERRUPTED 4 /* Interrupted by signal */ + #define NOT_FOUND 16 /* No action was taken */ + + /* System or user catpaths? Allow bitwise disjunctions of these. */ +Index: intl/Makefile.in +=================================================================== +--- intl/Makefile.in.orig ++++ intl/Makefile.in +@@ -133,7 +133,7 @@ COPYING.LIB-2 gettext.h libgettext.h plu + + all: all-@USE_INCLUDED_LIBINTL@ + all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed +-all-no: all-no-@BUILD_INCLUDED_LIBINTL@ ++all-no: all-no-@USE_INCLUDED_LIBINTL@ + all-no-yes: libgnuintl.$la + all-no-no: + +Index: lib/basename.c +=================================================================== +--- lib/basename.c.orig ++++ lib/basename.c +@@ -37,11 +37,13 @@ + extern char *strrchr(); + #endif /* STDC_HEADERS */ + ++#ifndef HAVE_BASENAME + /* return basename of given filename */ +-char *basename(char *filename) ++char *basename(const char *filename) + { + char *base; + + base = strrchr(filename, '/'); + return base ? base + 1 : filename; + } ++#endif +Index: lib/cleanup.c +=================================================================== +--- lib/cleanup.c.orig ++++ lib/cleanup.c +@@ -101,7 +101,7 @@ trap_signal (int signo, struct sigaction + + act.sa_handler = sighandler; + sigemptyset (&act.sa_mask); +- act.sa_flags = 0; ++ act.sa_flags = SA_ONESHOT; + return sigaction (signo, &act, oldact); + } + +Index: lib/xmalloc.c +=================================================================== +--- lib/xmalloc.c.orig ++++ lib/xmalloc.c +@@ -43,6 +43,8 @@ extern void error (int, int, const char + extern void error (); + #endif + ++#include "manconfig.h" ++ + static void * + fixup_null_alloc (size_t n) + { +Index: libdb/Makefile.in +=================================================================== +--- libdb/Makefile.in.orig ++++ libdb/Makefile.in +@@ -34,10 +34,7 @@ include $(top_srcdir)/include/Defines + .PHONY: $(DEFAULT_TARGETS) + + MANDEFS = +-MANCPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) -I- +-ifeq ($(USE_NLS),yes) +-MANCPPFLAGS += -I$(top_srcdir)/intl +-endif ++MANCPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) + + # The default programs to build + ALL = db_store.o db_delete.o db_lookup.o \ +Index: libdb/mydbm.h +=================================================================== +--- libdb/mydbm.h.orig ++++ libdb/mydbm.h +@@ -144,7 +144,7 @@ extern __inline__ int btree_nextkeydata( + # define DB_EXT ".bt" + # define MYDBM_FILE DB* + # define MYDBM_CTRWOPEN(file) btree_flopen(file, O_TRUNC|O_CREAT|O_RDWR, DBMODE) +-# define MYDBM_CRWOPEN(file) btree_flopen(file, O_CREAT|O_RDWR, DBMODE) ++# define MYDBM_CRWOPEN(file) btree_flopen(file, O_CREAT|O_RDWR, DBMODE) + # define MYDBM_RWOPEN(file) btree_flopen(file, O_RDWR, DBMODE) + # define MYDBM_RDOPEN(file) btree_flopen(file, O_RDONLY, DBMODE) + # define MYDBM_INSERT(dbf, key, cont) btree_insert(dbf, key, cont) +Index: man/de_DE.88591/man1/man.man1 +=================================================================== +--- man/de_DE.88591/man1/man.man1.orig ++++ man/de_DE.88591/man1/man.man1 +@@ -98,6 +98,7 @@ der Manualseiten gefolgt vom Typ der dor + .TS + tab (@); + l l. ++0@Dateiheader (gewöhnlich in \fI/usr/include\fR) + 1@Ausführbare Programme oder Shellbefehle + 2@Systemaufrufe (Kernelfunktionen) + 3@Bibliotheksaufrufe (Funktionen in System-Bibliotheken) +Index: man/es_ES.88591/man1/man.man1 +=================================================================== +--- man/es_ES.88591/man1/man.man1.orig ++++ man/es_ES.88591/man1/man.man1 +@@ -101,6 +101,7 @@ del manual y los tipos de páginas que co + .TS + tab (@); + l l. ++0@Ficheros (se encuentran generalmente en \fI/usr/include\fR) + 1@Programas ejecutables y guiones del intérprete de + @órdenes + 2@Llamadas del sistema (funciones servidas por el núcleo) +Index: man/it_IT.88591/man1/man.man1 +=================================================================== +--- man/it_IT.88591/man1/man.man1.orig ++++ man/it_IT.88591/man1/man.man1 +@@ -104,6 +104,7 @@ del manuale seguiti dai tipi di pagine c + .TS + tab (@); + l l. ++0@File (di solito trovabili in \fI/usr/include\fR) + 1@Programmi eseguibili e comandi della shell + 2@Chiamate al sistema (funzioni fornite dal kernel) + 3@Chiamate alle librerie (funzioni all'interno delle +Index: man/ja_JP.eucJP/man1/man.man1 +=================================================================== +--- man/ja_JP.eucJP/man1/man.man1.orig ++++ man/ja_JP.eucJP/man1/man.man1 +@@ -104,6 +104,7 @@ + .TS + tab (@); + l l. ++0@ + 1@¼Â¹Ô¥×¥í¥°¥é¥à¤Þ¤¿¤Ï¥·¥§¥ë¤Î¥³¥Þ¥ó¥É + 2@¥·¥¹¥Æ¥à¥³¡¼¥ë (¥«¡¼¥Í¥ë¤¬Ä󶡤¹¤ë´Ø¿ô) + 3@¥é¥¤¥Ö¥é¥ê¥³¡¼¥ë (¥·¥¹¥Æ¥à¥é¥¤¥Ö¥é¥ê¤Ë´Þ¤Þ¤ì¤ë´Ø¿ô) +Index: man/man1/man.man1 +=================================================================== +--- man/man1/man.man1.orig ++++ man/man1/man.man1 +@@ -110,6 +110,7 @@ numbers of the manual followed by the ty + .TS + tab (@); + l l. ++0@Header files (usually found in \fI/usr/include\fR) + 1@Executable programs or shell commands + 2@System calls (functions provided by the kernel) + 3@Library calls (functions within program libraries) +Index: po/stamp-cat-id +=================================================================== +--- /dev/null ++++ po/stamp-cat-id +@@ -0,0 +1 @@ ++timestamp +Index: src/Makefile.in +=================================================================== +--- src/Makefile.in.orig ++++ src/Makefile.in +@@ -40,7 +40,7 @@ include ../include/Defines + + MANDEFS = -DCONFIG_FILE=\"$(config_file)\" \ + -DLOCALEDIR=\"$(gnulocaledir)\" $(DEFS_$(subst /,_,$@)) +-MANCPPFLAGS = -I../include -I$(top_srcdir) -I$(srcdir) -I- -I../intl ++MANCPPFLAGS = -I../include -I$(top_srcdir) -I$(srcdir) -I. + + #----------------------------------------------------------------# + # user changeable definitions can be found in ../include/Defines # +@@ -117,7 +117,7 @@ apropos: whatis.c + + # Rules to test code as program unit + lexgrog: lexgrog.c compression.o fake_security.o ult_src.o util.o +- $(LINK.c) -DTEST $^ $(LDLIBS) -o $@ ++ $(LINK.c) -g -DTEST $^ $(LDLIBS) -o $@ + + globbing: globbing.c util.o + $(LINK.c) -DTEST $^ $(LDLIBS) -o $@ +@@ -126,8 +126,10 @@ globbing: globbing.c util.o + install: + $(MKINSTALLDIRS) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) \ + $(DESTDIR)$(libdir)/man-db +- $(INSTALL_PROGRAM) $(man_install_flags) man $(DESTDIR)$(bindir)/$(man) +- $(INSTALL_PROGRAM) $(man_install_flags) mandb $(DESTDIR)$(bindir)/$(mandb) ++ $(INSTALL_PROGRAM) $(man_install_flags) man $(DESTDIR)$(libdir)/man-db/$(man) ++ $(INSTALL_PROGRAM) $(man_install_flags) mandb $(DESTDIR)$(libdir)/man-db/$(mandb) ++ $(INSTALL_PROGRAM) $(man_install_flags) wrapper $(DESTDIR)$(bindir)/$(mandb) ++ ln -f $(DESTDIR)$(bindir)/$(mandb) $(DESTDIR)$(bindir)/$(man) + $(INSTALL_PROGRAM) manpath $(DESTDIR)$(bindir)/$(manpath) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(bindir)/$(catman) + $(INSTALL_PROGRAM) whatis $(DESTDIR)$(bindir)/$(whatis) +Index: src/check_mandirs.c +=================================================================== +--- src/check_mandirs.c.orig ++++ src/check_mandirs.c +@@ -161,7 +161,7 @@ void test_manfile (const char *file, con + } + + /* see if we already have it, before going any further, this will +- save both an ult_src() a find_name(), amongst other time wastes */ ++ save both an ult_src() a find_name()/find_name_str(), amongst other time wastes */ + exists = dblookup_exact (base_name, info.ext, 1); + + /* Ensure we really have the actual page. Gzip keeps the mtime +@@ -236,13 +236,20 @@ void test_manfile (const char *file, con + '.so manx/foo.x', which will give us an unobtainable + whatis for the entry. */ + ult = ult_src (file, path, &buf, ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ SO_LINK | SOFT_LINK | HARD_LINK | WHATISBUF); ++#else /* !COMP_SRC || !HAVE_ZIO */ + SO_LINK | SOFT_LINK | HARD_LINK); ++#endif /* !COMP_SRC || !HAVE_ZIO */ + } + + if (!ult) { + error (0, 0, + _("warning: %s: bad symlink or ROFF `.so' request"), + file); ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ set_wbuf(NULL); /* get rid of temp buffer */ ++#endif /* COMP_SRC && HAVE_ZIO */ + free (manpage); + return; + } +@@ -256,7 +263,7 @@ void test_manfile (const char *file, con + + /* Ok, here goes: Use a hash tree to store the ult_srcs with + * their whatis. Anytime after, check the hash tree, if it's there, +- * use it. This saves us a find_name() which is a real hog. ++ * use it. This saves us a find_name()/find_name_str() which is a real hog. + * + * Use the full path in ult as the hash key so we don't have to + * clear the hash between calls. +@@ -268,21 +275,38 @@ void test_manfile (const char *file, con + /* go get the whatis info in its raw state */ + char *file_copy = xstrdup (file); + #ifdef COMP_SRC ++# ifdef HAVE_ZIO ++ /* if the nroff was compressed, an uncompressed copy is ++ shown by a call to get_wbuf(), grog this for a whatis ++ rather than ult. This is a bit difficult to follow, sorry: ++ ult_src() will leave a buffer with the head of the last ++ uncompressed nroff file it has to deal with in get_wbuf() */ ++# else + /* if the nroff was compressed, an uncompressed version is + shown by a call to get_ztemp(), grog this for a whatis + rather than ult. This is a bit difficult to follow, sorry: + ult_src() will leave the last uncompressed nroff file it + has to deal with in get_ztemp() */ ++# endif + char *ztemp; + #endif /* COMP_SRC */ + + lg.type = MANPAGE; + drop_effective_privs (); + #ifdef COMP_SRC ++# ifdef HAVE_ZIO ++ ztemp = get_wbuf (); ++# else + ztemp = get_ztemp (); ++# endif + if (ztemp) { ++# ifdef HAVE_ZIO ++ find_name_str (ztemp, basename ((char*)file), &lg); ++ set_wbuf(NULL); /* get rid of temp file identifier */ ++# else + find_name (ztemp, basename (file_copy), &lg); + remove_ztemp (); /* get rid of temp file identifier */ ++# endif + } else + #endif /* COMP_SRC */ + find_name (ult, basename (file_copy), &lg); +@@ -415,10 +439,10 @@ static short testmandirs (const char *pa + } + + if (!quiet) { +- fprintf (stderr, "\r"); + fprintf (stderr, + _("Updating index cache for path " + "`%s/%s'. Wait..."), path, mandir->d_name); ++ putc ('\n', stderr); + } + add_dir_entries (path, mandir->d_name); + MYDBM_CLOSE (dbf); +@@ -576,7 +600,7 @@ short update_db (const char *manpath) + } + + if (debug) +- fprintf (stderr, "failed to open %s O_RDONLY\n", database); ++ fprintf (stderr, "failed to open database %s O_RDONLY\n", database); + + return EOF; + } +@@ -762,6 +786,7 @@ static short purge_whatis (const char *p + name, info->ext); + return 1; + } ++ return 1; + } + + /* Check that multi keys are correctly constructed. */ +@@ -822,6 +847,11 @@ short purge_missing (const char *manpath + gripe_rwopen_failed (database); + return 0; + } ++ if (dbver_rd (dbf)) { ++ MYDBM_CLOSE (dbf); ++ dbf = NULL; ++ return 0; ++ } + + key = MYDBM_FIRSTKEY (dbf); + +@@ -840,6 +870,14 @@ short purge_missing (const char *manpath + continue; + } + ++ /* Ignore db identifier keys. */ ++ if (*key.dptr == '.' && *(key.dptr+1) == 0) { ++ nextkey = MYDBM_NEXTKEY (dbf, key); ++ MYDBM_FREE (key.dptr); ++ key = nextkey; ++ continue; ++ } ++ + content = MYDBM_FETCH (dbf, key); + if (!content.dptr) + return count; +Index: src/compression.c +=================================================================== +--- src/compression.c.orig ++++ src/compression.c +@@ -60,26 +60,30 @@ extern int errno; + #ifdef COMP_SRC /* must come after manconfig.h */ + + #include "lib/error.h" ++#include "lib/cleanup.h" + #include "lib/pipeline.h" + #include "security.h" + #include "comp_src.h" + + static char *file; /* pointer to temp file name */ + static int file_fd = -1; ++static char *wbuf = NULL; /* temporary buffer for the whatis scan */ + ++#ifndef HAVE_ZIO + /* initialise temp filename */ + static __inline__ void create_ztemp (void) + { + int oldmask = umask (022); + drop_effective_privs (); + file_fd = create_tempfile ("zman", &file); ++ regain_effective_privs (); + + if (file_fd < 0) + error (FATAL, errno, _("can't create a temporary filename")); +- regain_effective_privs (); +- umask (oldmask); +- atexit (remove_ztemp); ++ (void) umask (oldmask); ++ push_cleanup ((void (*)())remove_ztemp, NULL); + } ++#endif + + /* Take filename as arg, return structure containing decompressor + and extension, or NULL if no comp extension found. +@@ -152,6 +156,7 @@ struct compression *comp_file (const cha + return NULL; + } + ++#ifndef HAVE_ZIO + /* Set up a pointer to a unique temp filename on first call. + * If this returns NULL, an error message will have been printed and the + * caller should abort the current operation as appropriate. +@@ -215,6 +220,7 @@ void remove_ztemp (void) + (void) remove_with_dropped_privs (file); + free (file); + file = NULL; ++ pop_cleanup(); + } + } + +@@ -223,4 +229,22 @@ char *get_ztemp (void) + { + return file; + } ++#endif ++ ++/* remember temporary the head of an nroff buffer */ ++void set_wbuf(const char* whatis) ++{ ++ if (wbuf) ++ free(wbuf); ++ wbuf = NULL; ++ if (whatis) ++ wbuf = xstrdup(whatis); ++} ++ ++/* return temporary buffer for whatis */ ++char *get_wbuf(void) ++{ ++ return wbuf; ++} ++ + #endif /* COMP_SRC */ +Index: src/encodings.c +=================================================================== +--- src/encodings.c.orig ++++ src/encodings.c +@@ -112,7 +112,7 @@ static struct directory_entry directory_ + { "ru", "KOI8-R", "KOI8-R" }, /* Russian */ + { "sk", "ISO-8859-2", "ISO-8859-2" }, /* Slovak */ + { "tr", "ISO-8859-9", "ISO-8859-9" }, /* Turkish */ +-#endif /* MULTIBYTE_GROFF */ ++#endif /* !MULTIBYTE_GROFF */ + + { NULL, NULL, "NULL" } + }; +Index: src/fake_security.c +=================================================================== +--- src/fake_security.c.orig ++++ src/fake_security.c +@@ -45,6 +45,7 @@ extern int errno; + #include "security.h" + + uid_t ruid, euid, uid; ++gid_t rgid, egid; + + #ifdef SECURE_MAN_UID + static struct passwd *man_owner; +Index: src/lexgrog.l +=================================================================== +--- src/lexgrog.l.orig ++++ src/lexgrog.l +@@ -45,6 +45,10 @@ extern int errno; + # include + #endif /* HAVE_UNISTD_H */ + ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++# include ++#endif /* COMP_SRC && HAVE_ZIO */ ++ + #ifdef HAVE_STRING_H + # include + #elif defined (HAVE_STRINGS_H) +@@ -64,7 +68,7 @@ extern int errno; + #include "security.h" + #include "ult_src.h" + +-#define YY_READ_BUF_SIZE 1024 ++#define YY_READ_BUF_SIZE YY_BUF_SIZE + #define MAX_NAME 2048 + + #ifdef PROFILE +@@ -72,10 +76,10 @@ static int ctr[YY_NUM_RULES]; + # define YY_USER_ACTION ++ctr[yy_act]; + #endif + +-static void add_str_to_whatis (const char *string, size_t length); +-static void add_char_to_whatis (unsigned char c); +-static void add_separator_to_whatis (void); +-static void newline_found (void); ++static __inline__ void add_str_to_whatis (const char *string, size_t length); ++static __inline__ void add_char_to_whatis (unsigned char c); ++static __inline__ void add_separator_to_whatis (const char *, size_t); ++static __inline__ void newline_found (void); + + static char newname[MAX_NAME]; + static char *p_name; +@@ -84,6 +88,7 @@ static char filters[MAX_FILTERS]; + + static int fill_mode; + static int waiting_for_quote; ++static int have_separator; + + #ifdef TEST + +@@ -114,7 +119,7 @@ static const char args[] = "mcwfhV"; + %} + + %option ecs meta-ecs +-%option 8bit batch caseful never-interactive ++%option 8bit batch caseful never-interactive align + %option nostdinit + %option warn + %option noyywrap nounput +@@ -143,8 +148,9 @@ font_change \\f([[:upper:]1-4]|\({upper} + size_change \\s[+-]?{digit} + style_change ({font_change}{size_change}?|{size_change}{font_change}?) + typeface \.(B[IR]?|I[BR]?|R[BI]) ++paragr \.[PITLH][Pp] + sec_request \.[Ss][HhYySs] +-comment ['.]\\{dbl_quote} ++comment (['.]\\{dbl_quote}|\'\-+|\\&) + + /* Please add to this list if you know how. */ + cs_name J[Mm][ÉéEe][Nn][Oo] +@@ -162,7 +168,26 @@ nl_name N[Aa][Aa][Mm] + pl_name N[Aa][Zz][Ww][Aa] + sv_name N[Aa][Mm][Nn] + name ({cs_name}|{de_name}|{en_name}|{es_name}|{fi_name}|{fr_name}|{hu_name}|{it_name}|{ja_name}|{latin_name}|{nl_name}|{pl_name}|{sv_name}) +-name_sec {dbl_quote}?{style_change}?{name}{style_change}?({blank}*{dbl_quote})? ++name_sec {dbl_quote}?{style_change}?{name}{style_change}?({blank}*{dbl_quote})?\r? ++start {sec_request}{blank_eol}+{name_sec} ++ ++N N(\bN)? ++n (N(\bN)?|n(\bn)?) ++a (A(\bA)?|a(\ba)?) ++o (O(\bO)?|o(\bo)?) ++m (M(\bM)?|M(\bM)?) ++e (E(\bE)?|e(\be)?) ++B B(\bB) ++b (B(\bB)?|b(\bb)?) ++r (R(\bR)?|r(\br)?) ++z (Z(\bZ)?|z(\bz)?) ++i (I(\bI)?|i(\bi)?) ++c (C(\bC)?|c(\bc)?) ++h (H(\bH)?|h(\bh)?) ++u (U(\bU)?|u(\bu)?) ++g (G(\bG)?|g(\bg)?) ++ ++cname (({N}({a}|{o}){m}({n}|{e})|{N}{o}{m}|{N}{o}{m}{b}{r}{e}|{B}{e}{z}{e}{i}{c}{h}{n}{u}{n}{g})|{ja_name}) + + /* eptgrv : eqn, pic, tbl, grap, refer, vgrind */ + tbl_request \.TS +@@ -176,8 +201,13 @@ vgrind_request \.vS + %% + + /* begin NAME section processing */ +-{sec_request}{blank_eol}+{name_sec}{blank}* BEGIN (MAN_PRENAME); +-{empty}{2,}{name}{blank}*{indent} BEGIN (CAT_NAME); ++{ ++ {start}{blank}*{bol}{blank}*{paragr} | /* strange format */ ++ {start}{blank}* { /* default */ ++ BEGIN (MAN_PRENAME); ++ } ++} ++{empty}{2,}{cname}{blank}*{indent} BEGIN (CAT_NAME); + + /* general text matching */ + \.[^Ss\r\n].* | +@@ -228,6 +258,7 @@ vgrind_request \.vS + {bol}\.sp{blank}* | /* vertical spacing */ + {bol}\.ig{blank}* | /* block comment */ + {bol}\.de[1i]?{blank}* | /* macro definition */ ++{bol}\.V[be]{blank}* | /* special in perl pages */ + {empty}{bol}.+ | + <> { /* terminate the string */ + *p_name = '\0'; +@@ -251,28 +282,31 @@ vgrind_request \.vS + } + + {bol}{typeface}{blank}+ | /* type face commands */ +- {bol}\.IX{blank}.* | /* .IX line */ ++ {bol}\.IX{blank}.* | /* index request */ + {next}{comment}.* { /* per line comments */ + newline_found (); + } + } + + /* No-op requests */ +-{bol}\.{blank}*$ newline_found (); +-{bol}\.\.$ newline_found (); ++{bol}\.{blank}*/{eol} newline_found (); ++{bol}\.\./{eol} newline_found (); + +- /* Toggle fill mode */ +-{bol}\.nf.* fill_mode = 0; +-{bol}\.fi.* fill_mode = 1; ++ /* Toggle fill mode, also for roff macro definitions */ ++{bol}\.(nf|de).* fill_mode = 0; ++{bol}\.(fi|\.).* fill_mode = 1; + + -{eol}{blank_eol}* /* strip continuations */ + + /* convert to DASH */ + {next}{blank}*\\\((mi|hy|em){blank}* | ++{bol}\.sp{bol}{blank}+\\-{blank}* | /* strange spacing in NAME section */ ++{blank}+[-\\]?-{bol} | /* dash at end of line */ ++{next}{blank_eol}+(\\?-){2}{blank}+ | /* some man pages use -- as dash */ + {next}{blank_eol}+[-\\]-{blank}* | + {next}{blank_eol}*[-\\]-{blank}+ | + {next}{blank}+-{1,2}{blank_eol}+ | +-{bol}\.Nd{blank}* add_separator_to_whatis (); ++{bol}\.Nd{blank}* add_separator_to_whatis (yytext, yyleng); + + /* escape sequences and special characters */ + { +@@ -288,6 +322,7 @@ vgrind_request \.vS + {next}\\[|^&!%acdpruz{}\r\n] /* various useless control chars */ + {next}\\[bhlLvx]{blank}*'[^']+' /* various inline functions */ + ++ {next}\\\\\$[1-9] /* roff macro argument */ + {next}\\\$[1-9] /* interpolate arg */ + + {next}\\\*(\({alpha})?{alpha} /* interpolate string */ +@@ -316,8 +351,7 @@ vgrind_request \.vS + for later processing */ + { + {bol}\.br{blank}* | +- {bol}\.LP{blank}* | +- {bol}\.PP{blank}* | ++ {bol}{paragr}{blank}* | + {bol}\.P{blank}* add_char_to_whatis ((char) 0x11); + } + +@@ -329,7 +363,7 @@ vgrind_request \.vS + [[:alnum:]]* add_str_to_whatis (yytext, yyleng); + + /* normalise the period (,) separators */ +-{blank}*,[ \t\r\n]* | ++{blank}*,{blank_eol}* | + {blank}*,{blank}* add_str_to_whatis (", ", 2); + + {bol}. { +@@ -345,7 +379,7 @@ vgrind_request \.vS + %% + + /* print warning and force scanner to terminate */ +-static void too_big (void) ++static __inline__ void too_big (void) + { + error (0, 0, + _("warning: whatis for %s exceeds %d bytes, truncating."), +@@ -355,7 +389,7 @@ static void too_big (void) + } + + /* append a string to newname if enough room */ +-static void add_str_to_whatis (const char *string, size_t length) ++static __inline__ void add_str_to_whatis (const char *string, size_t length) + { + if (p_name - newname + length >= MAX_NAME) + too_big (); +@@ -366,8 +400,10 @@ static void add_str_to_whatis (const cha + } + + /* append a char to newname if enough room */ +-static void add_char_to_whatis (unsigned char c) ++static __inline__ void add_char_to_whatis (unsigned char c) + { ++ if (c == (char) 0x11 && *p_name == (char) 0x11) ++ return; + if (p_name - newname + 1 >= MAX_NAME) + too_big (); + else if (waiting_for_quote && c == '"') +@@ -379,14 +415,30 @@ static void add_char_to_whatis (unsigned + /* append the " - " separator to newname, trimming the first space if one's + * already there + */ +-static void add_separator_to_whatis (void) ++static __inline__ void add_separator_to_whatis (const char *string, size_t len) + { ++ if (have_separator) { ++ unsigned int n; ++ unsigned char c; ++ ++ for (n = 0; (n < len) && (c = string[n]); n++) { ++ switch (c) { ++ case '-': ++ case ' ': ++ add_char_to_whatis (c); ++ default: ++ break; ++ } ++ } ++ return; ++ } ++ have_separator = 1; + if (p_name != newname && *(p_name - 1) != ' ') + add_char_to_whatis (' '); + add_str_to_whatis ("- ", 2); + } + +-static void newline_found (void) ++static __inline__ void newline_found (void) + { + /* If we are mid p_name and the last added char was not a space, + * best add one. +@@ -423,6 +475,10 @@ int find_name (const char *file, const c + } + + #ifdef COMP_SRC ++# ifdef HAVE_ZIO ++ /* See if we need to use fzopen(). */ ++ comp = comp_info (file, 0); ++# else + /* See if we need to decompress the file(s) first. */ + comp = comp_info (file, 0); + if (comp) { +@@ -430,18 +486,25 @@ int find_name (const char *file, const c + if (!file) + return 0; + } ++# endif + #endif /* COMP_SRC */ + drop_effective_privs (); ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ if (comp) ++ yyin = fzopen (file, "r"); ++ else ++#endif + yyin = fopen (file, "r"); + regain_effective_privs (); + if (!yyin) { + error (0, errno, _("can't open %s"), file); +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + remove_ztemp (); + #endif /* COMP_SRC */ + return 0; + } + } ++ setvbuf(yyin, NULL, _IOFBF, YY_READ_BUF_SIZE); + + fname = filename; + *(p_name = newname) = '\0'; +@@ -449,6 +512,7 @@ int find_name (const char *file, const c + + fill_mode = 1; + waiting_for_quote = 0; ++ have_separator = 0; + + if (p_lg->type) + BEGIN (CAT_FILE); +@@ -461,7 +525,7 @@ int find_name (const char *file, const c + ret = yylex (); + fclose (yyin); + +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + remove_ztemp (); + #endif + +@@ -493,6 +557,58 @@ int find_name (const char *file, const c + } + } + ++int find_name_str(char *buffer, const char *filename, lexgrog *p_lg) ++{ ++ int i; ++ ++ if (!buffer || (i = strlen(buffer)) < 14) ++ return 0; ++ ++ fname = filename; ++ *(p_name = newname) = '\0'; ++ memset(filters, '_', sizeof(filters)); ++ ++ fill_mode = 1; ++ waiting_for_quote = 0; ++ have_separator = 0; ++ ++ if (p_lg->type) ++ BEGIN(CAT_FILE); ++ else ++ BEGIN(MAN_FILE); ++ ++ buffer[i-1] = buffer[i-2] = YY_END_OF_BUFFER_CHAR; ++ ++ yy_switch_to_buffer(yy_scan_buffer(buffer, i)); ++ i = yylex(); ++ yy_delete_buffer(YY_CURRENT_BUFFER); ++ ++ if (i) ++ return 0; ++ else { ++ char f_tmp[MAX_FILTERS]; ++ int j, k; ++ ++ /* wipe out any leading or trailing spaces */ ++ if (*newname) { ++ for (p_name = strchr (newname, '\0'); ++ *(p_name - 1) == ' '; ++ p_name--); ++ if (*p_name == ' ') ++ *p_name = '\0'; ++ } ++ for (p_name = newname; *p_name == ' '; p_name++); ++ p_lg->whatis = xstrdup (p_name); ++ memset(f_tmp, '\0', MAX_FILTERS); ++ f_tmp[0] = '-'; ++ for (j = k = 0; j < MAX_FILTERS; j++ ) ++ if (filters[j] != '_' ) ++ f_tmp[k++] = filters[j]; ++ p_lg->filters = xstrdup (f_tmp); ++ return p_name[0]; ++ } ++} ++ + #ifdef TEST + + static void usage (int status) +@@ -595,7 +711,7 @@ int main (int argc, char **argv) + &statbuf, SO_LINK); + if (path) + free (path); +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + if (file) { + char *ztemp = get_ztemp (); + if (ztemp) +@@ -617,7 +733,24 @@ int main (int argc, char **argv) + } + ++optind; + } +- ++#if 0 ++ printf("Tests with strings instead of files\n\n"); ++ { ++ int type; ++ for (type = 0; type <= 1; type++) { ++ lexgrog lg; ++ lg.type = type; ++ if (lg.type == MANPAGE) { ++ printf("man: \"%d %s\"\n", find_name_str(xstrdup(".SH NAME\nman \\- String1\n.SH"), "-", &lg), lg.whatis); ++ printf("man: \"%d %s\"\n", find_name_str(xstrdup(".SH NAME\nman \\- String2\n.SH"), "-", &lg), lg.whatis); ++ } ++ if (lg.type == CATPAGE) { ++ printf("cat: \"%d %s\"\n", find_name_str(xstrdup("\n\nNAME\n cat - String1\n\nD"), "-", &lg), lg.whatis); ++ printf("cat: \"%d %s\"\n", find_name_str(xstrdup("\n\nNAME\n cat - String2\n\nD"), "-", &lg), lg.whatis); ++ } ++ } ++ } ++#endif + if (some_failed) + return FATAL; + else +Index: src/man.c +=================================================================== +--- src/man.c.orig ++++ src/man.c +@@ -98,11 +98,16 @@ static char *cwd; + #include + #include + #include ++#include + + #if HAVE_SYS_WAIT_H + # include + #endif + ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++# include ++#endif ++ + #ifndef STDC_HEADERS + extern char *getenv(); + extern int errno; +@@ -144,6 +149,8 @@ extern int errno; + #ifdef SECURE_MAN_UID + extern uid_t ruid; + extern uid_t euid; ++extern gid_t rgid; ++extern gid_t egid; + #endif /* SECURE_MAN_UID */ + + /* the magic cookie to request preprocessing */ +@@ -177,6 +184,10 @@ const char *lang; + + static int global_manpath = -1; /* global or user manual page hierarchy? */ + static int skip; /* page exists but has been skipped */ ++static struct termios tms; /* To save terminal settings in */ ++static int tms_set = 0; /* Do we have saved terminal settings? */ ++ ++static void set_term(void) { if (tms_set) tcsetattr(fileno(stdin), TCSANOW, &tms); } + + #if defined _AIX || defined __sgi + char **global_argv; +@@ -372,9 +383,9 @@ static const struct option long_options[ + static const char args[] = "7DlM:P:S:adfhH::kVum:p:tT::wWe:L:Zcr:X::E:iIC:"; + + # ifdef TROFF_IS_GROFF +-static int ditroff; ++static int ditroff = 0; + static const char *gxditview; +-static int htmlout; ++static int htmlout = 0; + static const char *html_pager; + # endif /* TROFF_IS_GROFF */ + +@@ -475,26 +486,6 @@ static void gripe_no_name (const char *s + exit (FAIL); + } + +-static struct termios tms; +-static int tms_set = 0; +- +-static void set_term (void) +-{ +- if (tms_set) +- tcsetattr (fileno (stdin), TCSANOW, &tms); +-} +- +-static void get_term (void) +-{ +- if (isatty (fileno (stdout))) { +- if (debug) +- fprintf(stderr, "is a tty\n"); +- tcgetattr (fileno (stdin), &tms); +- if (!tms_set++) +- atexit (set_term); +- } +-} +- + /* Line length detection code adapted from Andries Brouwer's man. */ + + /* Try to determine the line length to use. +@@ -637,11 +628,11 @@ static __inline__ char **manopt_to_env ( + { + char *manopt, *opt_start, **argv; + +- manopt = getenv ("MANOPT"); ++ opt_start = manopt = getenv ("MANOPT"); + if (manopt == NULL || *manopt == '\0') + return NULL; + +- opt_start = manopt = xstrdup (manopt); ++ manopt = xstrdup (manopt); + + /* allocate space for the program name */ + *argc = 0; +@@ -758,43 +749,56 @@ static int local_man_loop (const char *a + display (NULL, "", NULL, "(stdin)", NULL); + else { + struct stat st; +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + struct compression *comp; + #endif /* COMP_SRC */ ++ char *pwd = cwd; ++ char *file = basename((char*)argv); ++ ++ if (strcmp(argv, file)) { ++ char *dlm; ++ pwd = strdupa(argv); ++ ++ if ((dlm = strrchr(pwd, '/'))) ++ *dlm = '\0'; ++ } + + /* See if we need to decompress the file(s) first */ +- if (cwd[0]) { ++ if (pwd[0]) { + if (debug) +- fprintf (stderr, "chdir %s\n", cwd); +- if (chdir (cwd)) { +- error (0, errno, _("can't chdir to %s"), cwd); ++ fprintf (stderr, "chdir %s\n", pwd); ++ if (chdir (pwd)) { ++ error (0, errno, _("can't chdir to %s"), pwd); + regain_effective_privs (); + return 0; + } + } + + /* Check that the file exists and isn't e.g. a directory */ +- if (stat (argv, &st)) { ++ if (stat (file, &st)) { + error (0, errno, "%s", argv); ++ regain_effective_privs (); + return NOT_FOUND; + } + + if (S_ISDIR (st.st_mode)) { + error (0, EISDIR, "%s", argv); ++ regain_effective_privs (); + return NOT_FOUND; + } + +-#ifdef COMP_SRC +- comp = comp_info (argv, 0); ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) ++ comp = comp_info (file, 0); + if (comp) +- if (!decompress(argv, comp)) ++ if (!decompress(file, comp)) + exit_status = CHILD_FAIL; +-#endif /* COMP_SRC */ ++#endif /* COMP_SRC && !HAVE_ZIO */ + if (exit_status == OK) { + char *argv_copy = xstrdup (argv); + lang = lang_dir (argv); +- if (!display (NULL, argv, NULL, basename (argv_copy), +- NULL)) { ++ if (!lang || !*lang) ++ lang = internal_locale; ++ if (!display (NULL, file, NULL, file, NULL)) { + if (local_mf) + error (0, errno, "%s", argv); + exit_status = NOT_FOUND; +@@ -802,22 +806,15 @@ static int local_man_loop (const char *a + free (argv_copy); + } + +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + remove_ztemp (); +-#endif /* COMP_SRC */ ++#endif /* COMP_SRC && !HAVE_ZIO*/ + } + local_man_file = local_mf; + regain_effective_privs (); + return exit_status; + } + +-static void int_handler (int signo) +-{ +- if (debug) +- fprintf (stderr, "\ninterrupt signal %d handler\n", signo); +- exit (INTERRUPTED); +-} +- + int main (int argc, char *argv[]) + { + int argc_env, exit_status = OK; +@@ -836,7 +833,16 @@ int main (int argc, char *argv[]) + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + +- internal_locale = setlocale (LC_MESSAGES, NULL); ++ internal_locale = setlocale (LC_MESSAGES, ""); ++#if defined(__GLIBC__) ++# if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) ++ if (!internal_locale) { ++ if ( !(internal_locale = getenv ("LC_ALL")) ++ && !(internal_locale = getenv ("LC_MESSAGES"))) ++ internal_locale = getenv ("LANG"); ++ } ++# endif ++#endif + /* Use LANGUAGE only when LC_MESSAGES locale category is + * neither "C" nor "POSIX". */ + if (internal_locale && strcmp (internal_locale, "C") && +@@ -889,8 +895,6 @@ int main (int argc, char *argv[]) + init_security (); + #endif /* SECURE_MAN_UID */ + +- signal (SIGINT, int_handler); +- + pipeline_install_sigchld (); + + if (!catman) +@@ -902,11 +906,16 @@ int main (int argc, char *argv[]) + if (external) + do_extern (argc, argv); + +- get_term (); /* stores terminal settings */ + #ifdef SECURE_MAN_UID + if (debug) +- fprintf (stderr, "real user = %d; effective user = %d\n", +- ruid, euid); ++ fprintf (stderr, "real user = %d; effective user = %d\n", ruid, euid); ++ else { ++ if (isatty(fileno(stdin)) && isatty(fileno(stdout))) { ++ tcgetattr(fileno(stdin), &tms); ++ if (!tms_set++) ++ atexit(set_term); ++ } ++ } + #endif /* SECURE_MAN_UID */ + + #ifdef HAVE_SETLOCALE +@@ -927,6 +936,7 @@ int main (int argc, char *argv[]) + setenv ("LANGUAGE", internal_locale, 1); + ++_nl_msg_cat_cntr; + multiple_locale = NULL; ++#define MULTIPLE_LOCALE_IS_NULL 1 + } + } + +@@ -984,6 +994,22 @@ int main (int argc, char *argv[]) + } + + if (manp == NULL) { ++#if MULTIPLE_LOCALE_IS_NULL ++ char * tmp_locale = xstrdup(internal_locale); ++ char * ptr; ++ ++ manp = manpath (alt_system_name); ++ ++ /* ++ * Use strsep () to not intermix with strtok () ++ */ ++ for (ptr = strsep (&tmp_locale, ":"); ptr; ptr = strsep (&tmp_locale, ":")) { ++ if (debug) ++ fprintf (stderr, "checking for locale %s\n", ptr); ++ manp = add_nls_manpath (manp, ptr); ++ } ++ free(tmp_locale); ++#else + char tmp_locale[3]; + int idx; + +@@ -1007,6 +1033,7 @@ int main (int argc, char *argv[]) + tmp_locale); + manp = add_nls_manpath (manp, tmp_locale); + } ++#endif + } else + free (manpath (NULL)); + +@@ -1333,10 +1360,15 @@ static const char *get_preprocessors_fro + return NULL; + + drop_effective_privs (); ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ fp = fzopen(file, "r"); ++#else + fp = fopen (file, "r"); ++#endif + if (fp) { + if (fgets (line, sizeof (line), fp)) { +- if (!memcmp (line, PP_COOKIE, 4)) { ++ if (!memcmp (line, PP_COOKIE, 4) || ++ (strlen(line) == 6 && !memcmp (line, ".\\\" ", 4))) { + int len; + directive = line + 4; + /* strip trailing newline */ +@@ -1397,8 +1429,8 @@ static const char *get_preprocessors (co + /* This is so that we can store the temp file name used when input is + * stdin and remove it on exit. + */ +-static char *stdin_tmpfile; +-static int stdin_tmpfile_fd; ++static char *stdin_tmpfile = NULL; ++static int stdin_tmpfile_fd = -1; + + static void remove_stdintmp (void) + { +@@ -1406,6 +1438,7 @@ static void remove_stdintmp (void) + if (stdin_tmpfile_fd >= 0) + close (stdin_tmpfile_fd); + (void) remove_with_dropped_privs (stdin_tmpfile); ++ pop_cleanup(); + free (stdin_tmpfile); + stdin_tmpfile = NULL; + } +@@ -1419,12 +1452,12 @@ static __inline__ void create_stdintmp ( + int oldmask = umask (022); + drop_effective_privs (); + stdin_tmpfile_fd = create_tempfile ("sman", &stdin_tmpfile); ++ regain_effective_privs (); + + if (stdin_tmpfile_fd < 0) + error (FATAL, errno, _("can't create a temporary filename")); +- regain_effective_privs (); +- umask (oldmask); +- atexit (remove_stdintmp); ++ (void)umask (oldmask); ++ push_cleanup((void (*)())remove_stdintmp, NULL); + } + + /* Return pipeline to format file to stdout. */ +@@ -1551,9 +1584,22 @@ static pipeline *make_roff_command (cons + const char *output_encoding = NULL, *locale_charset = NULL; + + if (*file) { ++#ifdef COMP_SRC ++ struct compression *comp; ++ ++ cmd = command_new_argstr (get_def ("soelim", SOELIM)); ++ if ((comp = comp_info(file, 1))) { ++ /* zsoelim handels gziped files without extension */ ++ command_arg(cmd, comp->stem); ++ free(comp->stem); ++ } else ++ command_arg (cmd, file); ++ pipeline_command (p, cmd); ++#else + cmd = command_new_argstr (get_def ("soelim", SOELIM)); + command_arg (cmd, file); + pipeline_command (p, cmd); ++#endif + } else { + /* Reading from stdin: use cat to pick up the part we + * read in to figure out the format pipeline. +@@ -1887,6 +1933,18 @@ static void setenv_less (const char *tit + free (less_opts); + } + ++static void disable_x(void) ++{ ++ char *bname = basename((char*)pager); ++ if (bname) { ++ if (!strcmp(bname, "less")) ++ unsetenv("DISPLAY"); ++#if 0 ++ free(bname); ++#endif ++ } ++} ++ + /* Return pipeline to display file. NULL means stdin. + * + * TODO: htmlout case is pretty weird now. I'd like the intelligence to be +@@ -1899,6 +1957,9 @@ static pipeline *make_display_command (c + + setenv_less (title); + ++ if (!htmlout) ++ disable_x(); ++ + if (file) { + if (ascii) { + p = pipeline_new (); +@@ -2360,16 +2421,24 @@ static int display (const char *dir, con + if (debug) + fprintf (stderr, "chdir %s\n", dir); + ++ if (global_manpath) ++ drop_effective_privs(); ++ + if (chdir (dir)) { + error (0, errno, _("can't chdir to %s"), dir); ++ if (global_manpath) ++ regain_effective_privs(); + return 0; + } ++ ++ if (global_manpath) ++ regain_effective_privs(); + } + + /* define format_cmd */ + { + const char *source_file = NULL; +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + if (man_file) { + source_file = get_ztemp (); + if (!source_file) +@@ -2377,11 +2446,10 @@ static int display (const char *dir, con + } + #else + source_file = man_file; +-#endif /* COMP_SRC */ ++#endif /* COMP_SRC && !HAVE_ZIO */ + + if (source_file) +- format_cmd = make_roff_command (dir, source_file, +- dbfilters); ++ format_cmd = make_roff_command (dir, source_file, dbfilters); + else + format_cmd = NULL; + } +@@ -2585,8 +2653,12 @@ static int display (const char *dir, con + } + } + +- pipeline_free (format_cmd); +- ++ if (format_cmd) ++ pipeline_free (format_cmd); ++ ++ if (stdin_tmpfile) ++ remove_stdintmp(); ++ + if (!pause) + pause = found; + +@@ -2925,13 +2997,13 @@ static int display_filesystem (struct ca + if (cat_file) + free (cat_file); + free (title); +- +-#ifdef COMP_SRC ++ ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + /* If ult_src() produced a ztemp file, we need to remove it + * before proceeding. + */ + remove_ztemp (); +-#endif /* COMP_SRC */ ++#endif /* COMP_SRC && !HAVE_ZIO */ + + return found; + } +@@ -3018,11 +3090,11 @@ static int display_database (struct cand + title, in->filter); + if (cat_file) + free (cat_file); +-#ifdef COMP_SRC ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) + /* if ult_src() produced a ztemp file, we need to + remove it (and unexist it) before proceeding */ + remove_ztemp (); +-#endif /* COMP_SRC */ ++#endif /* COMP_SRC && !HAVE_ZIO */ + + } /* else {drop through to the bottom and return 0 anyway} */ + } else +@@ -3099,8 +3171,8 @@ static int display_database_check (struc + #ifdef MAN_DB_UPDATES + if (!exists && !skip) { + if (debug) +- fprintf (stderr, "dbdelete_wrapper (%s, %p)\n", +- candp->req_name, candp->source); ++ fprintf (stderr, "dbdelete_wrapper (%s, %s)\n", ++ candp->req_name, candp->source->addr); + dbdelete_wrapper (candp->req_name, candp->source); + } + #endif /* MAN_DB_UPDATES */ +Index: src/man_db.conf.in +=================================================================== +--- src/man_db.conf.in.orig ++++ src/man_db.conf.in +@@ -17,10 +17,17 @@ + # + #MANDATORY_MANPATH /usr/src/pvm3/man + # +-MANDATORY_MANPATH /usr/man + MANDATORY_MANPATH /usr/share/man ++MANDATORY_MANPATH /usr/share/man/allman ++MANDATORY_MANPATH /usr/openwin/man + MANDATORY_MANPATH /usr/X11R6/man + MANDATORY_MANPATH /usr/local/man ++MANDATORY_MANPATH /usr/local/share/man ++MANDATORY_MANPATH /opt/man ++MANDATORY_MANPATH /opt/gnome/man ++MANDATORY_MANPATH /opt/gnome/share/man ++MANDATORY_MANPATH /opt/sniff/man ++MANDATORY_MANPATH /opt/sniff/share/man + #--------------------------------------------------------- + # set up PATH to MANPATH mapping + # ie. what man tree holds man pages for what binary directory. +@@ -37,9 +44,15 @@ MANPATH_MAP /usr/local/sbin /usr/local/ + MANPATH_MAP /usr/local/sbin /usr/local/share/man + MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man + MANPATH_MAP /usr/bin/X11 /usr/X11R6/man ++MANPATH_MAP /usr/bin/mh /usr/share/man + MANPATH_MAP /usr/games /usr/share/man ++MANPATH_MAP /usr/openwin/bin /usr/openwin/man + MANPATH_MAP /opt/bin /opt/man + MANPATH_MAP /opt/sbin /opt/man ++## MANPATH_MAP /opt/gnome/bin /opt/gnome/man ++MANPATH_MAP /opt/sniff/bin /opt/sniff/man ++MANPATH_MAP /opt/gnome/bin /opt/gnome/share/man ++## MANPATH_MAP /opt/sniff/bin /opt/sniff/share/man + #--------------------------------------------------------- + # For a manpath element to be treated as a system manpath (as most of those + # above should normally be), it must be mentioned below. Each line may have +@@ -64,12 +77,221 @@ MANPATH_MAP /opt/sbin /opt/man + # + # *MANPATH* -> *CATPATH* + # +-MANDB_MAP /usr/man /var/cache/man/fsstnd ++MANDB_MAP /usr/share/man/cs /var/cache/man/cs ++MANDB_MAP /usr/share/man/cs_CZ /var/cache/man/cs ++MANDB_MAP /usr/share/man/da /var/cache/man/da ++MANDB_MAP /usr/share/man/de /var/cache/man/de ++MANDB_MAP /usr/share/man/de_AT /var/cache/man/de ++MANDB_MAP /usr/share/man/de_DE /var/cache/man/de ++MANDB_MAP /usr/share/man/es /var/cache/man/es ++MANDB_MAP /usr/share/man/es_ES /var/cache/man/es ++MANDB_MAP /usr/share/man/fi /var/cache/man/fi ++MANDB_MAP /usr/share/man/fr_FR /var/cache/man/fr ++MANDB_MAP /usr/share/man/ga /var/cache/man/ga ++MANDB_MAP /usr/share/man/is /var/cache/man/is ++MANDB_MAP /usr/share/man/it /var/cache/man/it ++MANDB_MAP /usr/share/man/ja /var/cache/man/ja ++MANDB_MAP /usr/share/man/ja_JP /var/cache/man/ja ++MANDB_MAP /usr/share/man/ja_JP.eucJP /var/cache/man/ja ++MANDB_MAP /usr/share/man/ko /var/cache/man/ko ++MANDB_MAP /usr/share/man/nl /var/cache/man/nl ++MANDB_MAP /usr/share/man/no /var/cache/man/no ++MANDB_MAP /usr/share/man/pl /var/cache/man/pl ++MANDB_MAP /usr/share/man/pt /var/cache/man/pt ++MANDB_MAP /usr/share/man/pt_BR /var/cache/man/pt ++MANDB_MAP /usr/share/man/ru /var/cache/man/ru ++MANDB_MAP /usr/share/man/sr /var/cache/man/sr ++MANDB_MAP /usr/share/man/sv /var/cache/man/sv + MANDB_MAP /usr/share/man /var/cache/man +-MANDB_MAP /usr/local/man /var/cache/man/oldlocal +-MANDB_MAP /usr/local/share/man /var/cache/man/local ++# ++MANDB_MAP /usr/local/man/cs /var/cache/man/local/cs ++MANDB_MAP /usr/local/man/cs_CZ /var/cache/man/local/cs ++MANDB_MAP /usr/local/man/da /var/cache/man/local/da ++MANDB_MAP /usr/local/man/de /var/cache/man/local/de ++MANDB_MAP /usr/local/man/de_AT /var/cache/man/local/de ++MANDB_MAP /usr/local/man/de_DE /var/cache/man/local/de ++MANDB_MAP /usr/local/man/es /var/cache/man/local/es ++MANDB_MAP /usr/local/man/es_ES /var/cache/man/local/es ++MANDB_MAP /usr/local/man/fi /var/cache/man/local/fi ++MANDB_MAP /usr/local/man/fr_FR /var/cache/man/local/fr ++MANDB_MAP /usr/local/man/ga /var/cache/man/local/ga ++MANDB_MAP /usr/local/man/is /var/cache/man/local/is ++MANDB_MAP /usr/local/man/it /var/cache/man/local/it ++MANDB_MAP /usr/local/man/ja /var/cache/man/local/ja ++MANDB_MAP /usr/local/man/ja_JP /var/cache/man/local/ja ++MANDB_MAP /usr/local/man/ja_JP.eucJP /var/cache/man/local/ja ++MANDB_MAP /usr/local/man/ko /var/cache/man/local/ko ++MANDB_MAP /usr/local/man/nl /var/cache/man/local/nl ++MANDB_MAP /usr/local/man/no /var/cache/man/local/no ++MANDB_MAP /usr/local/man/pl /var/cache/man/local/pl ++MANDB_MAP /usr/local/man/pt /var/cache/man/local/pt ++MANDB_MAP /usr/local/man/pt_BR /var/cache/man/local/pt ++MANDB_MAP /usr/local/man/ru /var/cache/man/local/ru ++MANDB_MAP /usr/local/man/sr /var/cache/man/local/sr ++MANDB_MAP /usr/local/man/sv /var/cache/man/local/sv ++MANDB_MAP /usr/local/man /var/cache/man/local ++# ++MANDB_MAP /usr/local/share/man/cs /var/cache/man/local/cs ++MANDB_MAP /usr/local/share/man/cs_CZ /var/cache/man/local/cs ++MANDB_MAP /usr/local/share/man/da /var/cache/man/local/da ++MANDB_MAP /usr/local/share/man/de /var/cache/man/local/de ++MANDB_MAP /usr/local/share/man/de_AT /var/cache/man/local/de ++MANDB_MAP /usr/local/share/man/de_DE /var/cache/man/local/de ++MANDB_MAP /usr/local/share/man/es /var/cache/man/local/es ++MANDB_MAP /usr/local/share/man/es_ES /var/cache/man/local/es ++MANDB_MAP /usr/local/share/man/fi /var/cache/man/local/fi ++MANDB_MAP /usr/local/share/man/fr_FR /var/cache/man/local/fr ++MANDB_MAP /usr/local/share/man/ga /var/cache/man/local/ga ++MANDB_MAP /usr/local/share/man/is /var/cache/man/local/is ++MANDB_MAP /usr/local/share/man/it /var/cache/man/local/it ++MANDB_MAP /usr/local/share/man/ja /var/cache/man/local/ja ++MANDB_MAP /usr/local/share/man/ja_JP /var/cache/man/local/ja ++MANDB_MAP /usr/local/share/man/ja_JP.eucJP /var/cache/man/local/ja ++MANDB_MAP /usr/local/share/man/ko /var/cache/man/local/ko ++MANDB_MAP /usr/local/share/man/nl /var/cache/man/local/nl ++MANDB_MAP /usr/local/share/man/no /var/cache/man/local/no ++MANDB_MAP /usr/local/share/man/pl /var/cache/man/local/pl ++MANDB_MAP /usr/local/share/man/pt /var/cache/man/local/pt ++MANDB_MAP /usr/local/share/man/pt_BR /var/cache/man/local/pt ++MANDB_MAP /usr/local/share/man/ru /var/cache/man/local/ru ++MANDB_MAP /usr/local/share/man/sr /var/cache/man/local/sr ++MANDB_MAP /usr/local/share/man/sv /var/cache/man/local/sv ++MANDB_MAP /usr/local/share/man /var/cache/man/local ++# ++MANDB_MAP /usr/X11R6/man/cs /var/cache/man/X11R6/cs ++MANDB_MAP /usr/X11R6/man/cs_CZ /var/cache/man/X11R6/cs ++MANDB_MAP /usr/X11R6/man/da /var/cache/man/X11R6/da ++MANDB_MAP /usr/X11R6/man/de /var/cache/man/X11R6/de ++MANDB_MAP /usr/X11R6/man/de_AT /var/cache/man/X11R6/de ++MANDB_MAP /usr/X11R6/man/de_DE /var/cache/man/X11R6/de ++MANDB_MAP /usr/X11R6/man/es /var/cache/man/X11R6/es ++MANDB_MAP /usr/X11R6/man/es_ES /var/cache/man/X11R6/es ++MANDB_MAP /usr/X11R6/man/fi /var/cache/man/X11R6/fi ++MANDB_MAP /usr/X11R6/man/fr_FR /var/cache/man/X11R6/fr ++MANDB_MAP /usr/X11R6/man/ga /var/cache/man/X11R6/ga ++MANDB_MAP /usr/X11R6/man/is /var/cache/man/X11R6/is ++MANDB_MAP /usr/X11R6/man/it /var/cache/man/X11R6/it ++MANDB_MAP /usr/X11R6/man/ja /var/cache/man/X11R6/ja ++MANDB_MAP /usr/X11R6/man/ja_JP /var/cache/man/X11R6/ja ++MANDB_MAP /usr/X11R6/man/ja_JP.eucJP /var/cache/man/X11R6/ja ++MANDB_MAP /usr/X11R6/man/ko /var/cache/man/X11R6/ko ++MANDB_MAP /usr/X11R6/man/nl /var/cache/man/X11R6/nl ++MANDB_MAP /usr/X11R6/man/no /var/cache/man/X11R6/no ++MANDB_MAP /usr/X11R6/man/pl /var/cache/man/X11R6/pl ++MANDB_MAP /usr/X11R6/man/pt /var/cache/man/X11R6/pt ++MANDB_MAP /usr/X11R6/man/pt_BR /var/cache/man/X11R6/pt ++MANDB_MAP /usr/X11R6/man/ru /var/cache/man/X11R6/ru ++MANDB_MAP /usr/X11R6/man/sr /var/cache/man/X11R6/sr ++MANDB_MAP /usr/X11R6/man/sv /var/cache/man/X11R6/sv + MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6 +-MANDB_MAP /opt/man /var/cache/man/opt ++# ++MANDB_MAP /usr/openwin/man/cs /var/cache/man/openwin/cs ++MANDB_MAP /usr/openwin/man/cs_CZ /var/cache/man/openwin/cs ++MANDB_MAP /usr/openwin/man/da /var/cache/man/openwin/da ++MANDB_MAP /usr/openwin/man/de /var/cache/man/openwin/de ++MANDB_MAP /usr/openwin/man/de_AT /var/cache/man/openwin/de ++MANDB_MAP /usr/openwin/man/de_DE /var/cache/man/openwin/de ++MANDB_MAP /usr/openwin/man/es /var/cache/man/openwin/es ++MANDB_MAP /usr/openwin/man/es_ES /var/cache/man/openwin/es ++MANDB_MAP /usr/openwin/man/fi /var/cache/man/openwin/fi ++MANDB_MAP /usr/openwin/man/fr_FR /var/cache/man/openwin/fr ++MANDB_MAP /usr/openwin/man/ga /var/cache/man/openwin/ga ++MANDB_MAP /usr/openwin/man/is /var/cache/man/openwin/is ++MANDB_MAP /usr/openwin/man/it /var/cache/man/openwin/it ++MANDB_MAP /usr/openwin/man/ja /var/cache/man/openwin/ja ++MANDB_MAP /usr/openwin/man/ja_JP /var/cache/man/openwin/ja ++MANDB_MAP /usr/openwin/man/ja_JP.eucJP /var/cache/man/openwin/ja ++MANDB_MAP /usr/openwin/man/ko /var/cache/man/openwin/ko ++MANDB_MAP /usr/openwin/man/nl /var/cache/man/openwin/nl ++MANDB_MAP /usr/openwin/man/no /var/cache/man/openwin/no ++MANDB_MAP /usr/openwin/man/pl /var/cache/man/openwin/pl ++MANDB_MAP /usr/openwin/man/pt /var/cache/man/openwin/pt ++MANDB_MAP /usr/openwin/man/pt_BR /var/cache/man/openwin/pt ++MANDB_MAP /usr/openwin/man/ru /var/cache/man/openwin/ru ++MANDB_MAP /usr/openwin/man/sr /var/cache/man/openwin/sr ++MANDB_MAP /usr/openwin/man/sv /var/cache/man/openwin/sv ++MANDB_MAP /usr/openwin/man /var/cache/man/openwin ++# ++MANDB_MAP /usr/share/man/allman/cs /var/cache/man/allman/cs ++MANDB_MAP /usr/share/man/allman/cs_CZ /var/cache/man/allman/cs ++MANDB_MAP /usr/share/man/allman/da /var/cache/man/allman/da ++MANDB_MAP /usr/share/man/allman/de /var/cache/man/allman/de ++MANDB_MAP /usr/share/man/allman/de_AT /var/cache/man/allman/de ++MANDB_MAP /usr/share/man/allman/de_DE /var/cache/man/allman/de ++MANDB_MAP /usr/share/man/allman/es /var/cache/man/allman/es ++MANDB_MAP /usr/share/man/allman/es_ES /var/cache/man/allman/es ++MANDB_MAP /usr/share/man/allman/fi /var/cache/man/allman/fi ++MANDB_MAP /usr/share/man/allman/fr_FR /var/cache/man/allman/fr ++MANDB_MAP /usr/share/man/allman/ga /var/cache/man/allman/ga ++MANDB_MAP /usr/share/man/allman/is /var/cache/man/allman/is ++MANDB_MAP /usr/share/man/allman/it /var/cache/man/allman/it ++MANDB_MAP /usr/share/man/allman/ja /var/cache/man/allman/ja ++MANDB_MAP /usr/share/man/jallman/a_JP /var/cache/man/allman/ja ++MANDB_MAP /usr/share/man/allman/ja_JP.eucJP /var/cache/man/allman/ja ++MANDB_MAP /usr/share/man/allman/ko /var/cache/man/allman/ko ++MANDB_MAP /usr/share/man/allman/nl /var/cache/man/allman/nl ++MANDB_MAP /usr/share/man/allman/no /var/cache/man/allman/no ++MANDB_MAP /usr/share/man/allman/pl /var/cache/man/allman/pl ++MANDB_MAP /usr/share/man/allman/pt /var/cache/man/allman/pt ++MANDB_MAP /usr/share/man/allman/pt_BR /var/cache/man/allman/pt ++MANDB_MAP /usr/share/man/allman/ru /var/cache/man/allman/ru ++MANDB_MAP /usr/share/man/allman/sr /var/cache/man/allman/sr ++MANDB_MAP /usr/share/man/allman/sv /var/cache/man/allman/sv ++MANDB_MAP /usr/share/man/allman /var/cache/man/allman ++# ++MANDB_MAP /opt/share/man/cs /var/cache/man/opt/cs ++MANDB_MAP /opt/share/man/cs_CZ /var/cache/man/opt/cs ++MANDB_MAP /opt/share/man/da /var/cache/man/opt/da ++MANDB_MAP /opt/share/man/de /var/cache/man/opt/de ++MANDB_MAP /opt/share/man/de_AT /var/cache/man/opt/de ++MANDB_MAP /opt/share/man/de_DE /var/cache/man/opt/de ++MANDB_MAP /opt/share/man/es /var/cache/man/opt/es ++MANDB_MAP /opt/share/man/es_ES /var/cache/man/opt/es ++MANDB_MAP /opt/share/man/fi /var/cache/man/opt/fi ++MANDB_MAP /opt/share/man/fr_FR /var/cache/man/opt/fr ++MANDB_MAP /opt/share/man/ga /var/cache/man/opt/ga ++MANDB_MAP /opt/share/man/is /var/cache/man/opt/is ++MANDB_MAP /opt/share/man/it /var/cache/man/opt/it ++MANDB_MAP /opt/share/man/ja /var/cache/man/opt/ja ++MANDB_MAP /opt/share/man/a_JP /var/cache/man/opt/ja ++MANDB_MAP /opt/share/man/ja_JP.eucJP /var/cache/man/opt/ja ++MANDB_MAP /opt/share/man/ko /var/cache/man/opt/ko ++MANDB_MAP /opt/share/man/nl /var/cache/man/opt/nl ++MANDB_MAP /opt/share/man/no /var/cache/man/opt/no ++MANDB_MAP /opt/share/man/pl /var/cache/man/opt/pl ++MANDB_MAP /opt/share/man/pt /var/cache/man/opt/pt ++MANDB_MAP /opt/share/man/pt_BR /var/cache/man/opt/pt ++MANDB_MAP /opt/share/man/ru /var/cache/man/opt/ru ++MANDB_MAP /opt/share/man/sr /var/cache/man/opt/sr ++MANDB_MAP /opt/share/man/sv /var/cache/man/opt/sv ++MANDB_MAP /opt/share/man /var/cache/man/opt ++# ++MANDB_MAP /opt/gnome/share/man/cs /var/cache/man/opt/cs ++MANDB_MAP /opt/gnome/share/man/cs_CZ /var/cache/man/opt/cs ++MANDB_MAP /opt/gnome/share/man/da /var/cache/man/opt/da ++MANDB_MAP /opt/gnome/share/man/de /var/cache/man/opt/de ++MANDB_MAP /opt/gnome/share/man/de_AT /var/cache/man/opt/de ++MANDB_MAP /opt/gnome/share/man/de_DE /var/cache/man/opt/de ++MANDB_MAP /opt/gnome/share/man/es /var/cache/man/opt/es ++MANDB_MAP /opt/gnome/share/man/es_ES /var/cache/man/opt/es ++MANDB_MAP /opt/gnome/share/man/fi /var/cache/man/opt/fi ++MANDB_MAP /opt/gnome/share/man/fr_FR /var/cache/man/opt/fr ++MANDB_MAP /opt/gnome/share/man/ga /var/cache/man/opt/ga ++MANDB_MAP /opt/gnome/share/man/is /var/cache/man/opt/is ++MANDB_MAP /opt/gnome/share/man/it /var/cache/man/opt/it ++MANDB_MAP /opt/gnome/share/man/ja /var/cache/man/opt/ja ++MANDB_MAP /opt/gnome/share/man/a_JP /var/cache/man/opt/ja ++MANDB_MAP /opt/gnome/share/man/ja_JP.eucJP /var/cache/man/opt/ja ++MANDB_MAP /opt/gnome/share/man/ko /var/cache/man/opt/ko ++MANDB_MAP /opt/gnome/share/man/nl /var/cache/man/opt/nl ++MANDB_MAP /opt/gnome/share/man/no /var/cache/man/opt/no ++MANDB_MAP /opt/gnome/share/man/pl /var/cache/man/opt/pl ++MANDB_MAP /opt/gnome/share/man/pt /var/cache/man/opt/pt ++MANDB_MAP /opt/gnome/share/man/pt_BR /var/cache/man/opt/pt ++MANDB_MAP /opt/gnome/share/man/ru /var/cache/man/opt/ru ++MANDB_MAP /opt/gnome/share/man/sr /var/cache/man/opt/sr ++MANDB_MAP /opt/gnome/share/man/sv /var/cache/man/opt/sv ++MANDB_MAP /opt/gnome/share/man /var/cache/man/opt + # + #--------------------------------------------------------- + # Program definitions. These are commented out by default as the value +@@ -81,7 +303,7 @@ MANDB_MAP /opt/man /var/cache/man/opt + #DEFINE tr @tr@ '\255\267\264\327' '\055\157\047\170' + #DEFINE grep @grep@ + #DEFINE troff @troff@ +-#DEFINE nroff @nroff@ ++#DEFINE nroff /usr/bin/nroff -mandocdb + #DEFINE eqn @eqn@ + #DEFINE neqn @neqn@ + #DEFINE tbl @tbl@ +@@ -109,4 +331,4 @@ MANDB_MAP /opt/man /var/cache/man/opt + # is that you only need to explicitly list extensions if you want to force a + # particular order. Sections with extensions should usually be adjacent to + # their main section (e.g. "1 1mh 8 ..."). +-SECTION 1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7 ++SECTION 0 1 n l 8 3 2 5 4 9 6 7 1x 3x 4x 5x 6x 8x 1bind 3bind 5bind 7bind 8bind 1cn 8cn 1m 1mh 5mh 8mh 1netpbm 3netpbm 5netpbm 0p 1p 3p 1pgsql 3C++ 3blt 3blt 3curses 3ncurses 3form 3menu 3db 3gdbm 3f 3gk 3mm 3paper 3perl 3pgsql 3pm 3posix 3pq 3qt 3pub 3readline 1ssl 3ssl 5ssl 7ssl 3t 3tk 3tcl 3tclx 3tix 5mm 5pgsql 7l 7nr 8C++ 8c +Index: src/mandb.c +=================================================================== +--- src/mandb.c.orig ++++ src/mandb.c +@@ -138,6 +138,8 @@ static char *xtmpfile; + #ifdef SECURE_MAN_UID + extern uid_t ruid; + extern uid_t euid; ++extern gid_t rgid; ++extern gid_t egid; + #endif /* SECURE_MAN_UID */ + + extern char *optarg; +@@ -502,8 +504,14 @@ int main (int argc, char *argv[]) + error (FAIL, 0, + _("the setuid man user \"%s\" does not exist"), + MAN_OWNER); +- if (!user && euid != 0 && euid != man_owner->pw_uid) +- user = 1; ++ if (!user) { ++ if (!ruid && euid != man_owner->pw_uid) { ++ seteuid(man_owner->pw_uid); ++ euid = geteuid(); ++ } ++ if (euid != man_owner->pw_uid) ++ user = 1; ++ } + #endif /* SECURE_MAN_UID */ + + +@@ -579,7 +587,7 @@ int main (int argc, char *argv[]) + if (!opt_test && amount_changed) { + finish_up (); + #ifdef SECURE_MAN_UID +- if (global_manpath && euid == 0) ++ if (global_manpath && (euid == 0 || ruid == 0)) + do_chown (man_owner->pw_uid); + #endif /* SECURE_MAN_UID */ + } else +Index: src/manp.c +=================================================================== +--- src/manp.c.orig ++++ src/manp.c +@@ -54,6 +54,7 @@ + # include + #else /* no string(s) header */ + extern char *strtok(); ++extern char *strsep(); + extern char *strchr(); + extern char *strstr(); + #endif +@@ -75,6 +76,7 @@ extern int errno; + #include "lib/getcwdalloc.h" + #include "security.h" + #include "manp.h" ++#include "security.h" + + struct list { + char *key; +@@ -403,7 +405,7 @@ char *add_nls_manpath (char *manpathlist + fprintf (stderr, "add_nls_manpath(): processing %s\n", + manpathlist); + +- if (locale == NULL || *locale == '\0' || *locale == 'C') ++ if (locale == NULL || *locale == '\0' || *locale == 'C' || (strcmp(locale, "POSIX") == 0)) + return manpathlist; + + temp_locale = xstrdup (locale); +@@ -411,7 +413,7 @@ char *add_nls_manpath (char *manpathlist + for (path = strsep (&manpathlist_ptr, ":"); path; + path = strsep (&manpathlist_ptr, ":") ) { + +- static char locale_delims[] = "@,._"; ++ static char locale_delims[] = ":@,._"; + char *delim, *tempo; + char *testpath; + +@@ -423,7 +425,7 @@ char *add_nls_manpath (char *manpathlist + free (testpath); + } + for (delim = locale_delims; *delim != '\0'; ++delim) { +- tempo = strchr (temp_locale, *delim); ++ tempo = strrchr (temp_locale, *delim); + if (tempo) { + /* Strip out the rest of the line */ + *tempo = '\0'; +@@ -633,6 +635,8 @@ char *manpath (const char *systems) + #ifdef SECURE_MAN_UID + extern uid_t ruid; /* initial real user id */ + extern uid_t euid; /* initial effective user id */ ++extern gid_t rgid; /* initial real group id */ ++extern gid_t egid; /* initial effective group id */ + #endif /* SECURE_MAN_UID */ + + /* create the catman hierarchy if it doesn't exist */ +@@ -664,6 +668,8 @@ mkcatdirs (const char *mandir, const cha + #ifdef SECURE_MAN_UID + if (ruid == 0) + chown (catdir, man_owner->pw_uid, 0); ++ if (rgid == 0) ++ chown (catdir, -1, man_owner->pw_gid); + #endif /* SECURE_MAN_UID */ + drop_effective_privs (); + } +@@ -677,9 +683,14 @@ mkcatdirs (const char *mandir, const cha + fprintf (stderr, + "creating catdir hierarchy %s ", + catdir); +- for (j = 1; j <= 9; j++) { +- catname[strlen (catname) - 1] = '0' + j; +- manname[strlen (manname) - 1] = '0' + j; ++ for (j = 0; j <= 10; j++) { ++ unsigned int c; ++ if (j < 10) ++ c = '0' + j; ++ else ++ c = 'n'; ++ catname[strlen (catname) - 1] = c; ++ manname[strlen (manname) - 1] = c; + if ((is_directory (manname) == 1) + && (is_directory (catname) != 1)) { + if (mkdir (catname, +@@ -689,11 +700,12 @@ mkcatdirs (const char *mandir, const cha + if (debug) + fprintf (stderr, "warning: cannot create catdir %s\n", catname); + } else if (debug) +- fprintf (stderr, " cat%d", j); ++ fprintf (stderr, " cat%c", c); + #ifdef SECURE_MAN_UID + if (ruid == 0) +- chown (catname, +- man_owner->pw_uid, 0); ++ chown (catname, man_owner->pw_uid, 0); ++ if (rgid == 0) ++ chown (catdir, -1, man_owner->pw_gid); + #endif /* SECURE_MAN_UID */ + } + } +@@ -819,7 +831,7 @@ static char *def_path (int flag) + + /* If we have complete config file failure... */ + if (!manpath) +- return xstrdup ("/usr/man"); ++ return xstrdup ("/usr/share/man"); + + return manpath; + } +@@ -1095,16 +1107,18 @@ char *get_catpath (const char *name, int + + if (*suffix == '/') { + ++suffix; +- catpath = strappend (catpath, "/", +- NULL); ++ catpath = strappend (catpath, "/", NULL); + } + if (STRNEQ (suffix, "man", 3)) { + suffix += 3; +- catpath = strappend (catpath, "cat", +- NULL); ++ catpath = strappend (catpath, "cat", NULL); + } + catpath = strappend (catpath, suffix, NULL); +- return catpath; ++ ++ if (is_directory (catpath) == 1) ++ return catpath; ++ else ++ free (catpath); + } + } + +Index: src/security.c +=================================================================== +--- src/security.c.orig ++++ src/security.c +@@ -87,10 +87,13 @@ extern int errno; + # ifdef POSIX_SAVED_IDS + # if defined (HAVE_SETEUID) + # define SET_EUID(euid) seteuid(euid) ++# define SET_EGID(egid) setegid(egid) + # elif defined (HAVE_SETREUID) + # define SET_EUID(euid) setreuid(-1, euid) ++# define SET_EGID(egid) setregid(-1, egid) + # elif defined (HAVE_SETRESUID) + # define SET_EUID(euid) setresuid(-1, euid, -1) ++# define SET_EGID(egid) setresgid(-1, egid, -1) + # endif /* HAVE_SETEUID */ + + /* Sort out the function to use to swap ruid with euid. Used if no suid. */ +@@ -98,8 +101,10 @@ extern int errno; + # else /* !POSIX_SAVED_IDS */ + # if defined (HAVE_SETREUID) + # define SWAP_UIDS(ida, idb) setreuid(idb, ida) ++# define SWAP_GIDS(ida, idb) setregid(idb, ida) + # elif defined (HAVE_SETRESUID) + # define SWAP_UIDS(ida, idb) setresuid(idb, ida, -1) ++# define SWAP_GIDS(ida, idb) setresgid(idb, ida, -1) + # warning Using setresuid() whithout _POSIX_SAVED_IDS! + # endif /* HAVE_SETREUID */ + # endif /* POSIX_SAVED_IDS */ +@@ -111,7 +116,10 @@ extern int errno; + + uid_t ruid; /* initial real user id */ + uid_t euid; /* initial effective user id */ ++gid_t rgid; /* initial real group id */ ++gid_t egid; /* initial effective group id */ + uid_t uid; /* current euid */ ++gid_t gid; /* current egid */ + + static struct passwd *man_owner; + +@@ -125,10 +133,17 @@ static __inline__ void gripe_set_euid (v + error (FATAL, errno, _("can't set effective uid")); + } + ++static __inline__ void gripe_set_egid () ++{ ++ error (FATAL, errno, _( "can't set effective gid")); ++} ++ + void init_security (void) + { + ruid = getuid (); ++ rgid = getgid (); + uid = euid = geteuid (); ++ gid = egid = getegid (); + if (debug) + fprintf (stderr, "ruid=%d, euid=%d\n", (int) ruid, (int) euid); + priv_drop_count = 0; +@@ -208,6 +223,28 @@ void regain_effective_privs (void) + + uid = euid; + } ++ ++ if (gid != rgid) { ++# ifdef POSIX_SAVED_IDS ++ if (SET_EGID (rgid)) ++# else ++ if (SWAP_GIDS (egid, rgid)) ++# endif ++ gripe_set_egid(); ++ ++ gid = rgid; ++ } ++ ++ if (gid != egid) { ++# ifdef POSIX_SAVED_IDS ++ if (SET_EGID (egid)) ++# else ++ if (SWAP_GIDS (rgid, egid)) ++# endif ++ gripe_set_egid(); ++ ++ gid = egid; ++ } + #endif /* SECURE_MAN_UID */ + } + +Index: src/straycats.c +=================================================================== +--- src/straycats.c.orig ++++ src/straycats.c +@@ -48,6 +48,7 @@ extern char *strrchr(); + + #include + #include ++#include + + #if defined(HAVE_UNISTD_H) + # include +@@ -92,8 +93,8 @@ extern char *canonicalize_file_name __P + #include "manp.h" + #include "security.h" + +-static char *temp_name; +-static char *catdir, *mandir; ++static char *temp_name = NULL; ++static char *catdir = NULL, *mandir = NULL; + + static int check_for_stray (void) + { +@@ -101,12 +102,6 @@ static int check_for_stray (void) + struct dirent *catlist; + size_t lenman, lencat; + int strays = 0; +-#ifdef HAVE_CANONICALIZE_FILE_NAME +- /* no PATH_MAX then */ +- char *fullpath; +-#else +- char fullpath[PATH_MAX]; +-#endif + + cdir = opendir (catdir); + if (!cdir) { +@@ -198,6 +193,11 @@ static int check_for_stray (void) + found = 0; + + if (!found) { ++#ifdef HAVE_CANONICALIZE_FILE_NAME ++ char *fullpath; /* no PATH_MAX then */ ++#else ++ char fullpath[PATH_MAX]; ++#endif + pipeline *filter; + struct mandata *exists; + lexgrog lg; +@@ -306,7 +306,8 @@ static int check_for_stray (void) + char *filter_str = + pipeline_tostring (filter); + remove_with_dropped_privs (temp_name); +- perror (filter_str); ++ if (debug) ++ perror (filter_str); + free (filter_str); + } else { + struct page_description *descs; +@@ -338,8 +339,11 @@ static int check_for_stray (void) + } + } + +- pipeline_free (filter); +- free (mandir_copy); ++ if (filter) ++ pipeline_free (filter); ++ ++ if (mandir_copy) ++ free (mandir_copy); + + if (lg.whatis) + free (lg.whatis); +Index: src/ult_src.c +=================================================================== +--- src/ult_src.c.orig ++++ src/ult_src.c +@@ -37,6 +37,9 @@ + #include + #include + #include ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++# include ++#endif + + #ifndef STDC_HEADERS + extern int errno; +@@ -229,7 +232,7 @@ const char *ult_src (const char *name, c + struct stat *buf, int flags) + { + static char *basename; /* must be static */ +- static short recurse; /* must be static */ ++ static short recurse = 0; /* must be static */ + + /* initialise the function */ + +@@ -297,10 +300,10 @@ const char *ult_src (const char *name, c + FILE *fp; + #ifdef COMP_SRC + struct compression *comp; +- ++# ifndef HAVE_ZIO + /* get rid of the previous ztemp file (if any) */ + remove_ztemp (); +- ++# endif + /* if we are handed the name of a compressed file, remove + the compression extension? */ + comp = comp_info (basename, 1); +@@ -309,7 +312,7 @@ const char *ult_src (const char *name, c + basename = comp->stem; + comp->stem = NULL; /* steal memory */ + } +- ++# ifndef HAVE_ZIO + /* if the open fails, try looking for compressed */ + fp = fopen (basename, "r"); + if (fp == NULL) { +@@ -334,6 +337,21 @@ const char *ult_src (const char *name, c + return NULL; + } + } ++# else ++ if ((comp = comp_file(basename))) { ++ free(comp->stem); ++ basename = strappend (basename, ".", comp->ext, NULL); ++ } ++ ++ drop_effective_privs (); ++ fp = fzopen(basename, "r"); ++ regain_effective_privs (); ++ ++ if (fp == NULL) { ++ error (0, errno, _( "can't open %s"), basename); ++ return NULL; ++ } ++# endif + #else + fp = fopen (basename, "r"); + if (fp == NULL) { +@@ -341,18 +359,35 @@ const char *ult_src (const char *name, c + return NULL; + } + #endif +- /* make sure that we skip over any comments */ ++ /* ++ * make sure that we skip over any comments ++ * ... even if we handle TCL/TK manual pages ++ */ + do { + bptr = fgets (buffer, 1024, fp); +- } while (bptr && STRNEQ (buffer, ".\\\"", 3)); +- ++ } while (bptr && *bptr && ++ (STRNEQ (buffer, ".\\\"", 3) || ++ STRNEQ (buffer, "'\\\"", 3) ++ )); ++ ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ /* ++ * Isn't very useful to close it now ... maybe we need it ++ * later for further handling. ++ */ ++ if (!(flags & WHATISBUF)) ++#endif + fclose(fp); + +- if (buffer) { ++ if (bptr && *bptr) { + char *include = test_for_include (buffer); + if (include) { + const char *ult; + ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ if (flags & WHATISBUF) /* not needed */ ++ fclose(fp); ++#endif + /* Restore the original path from before + * ult_softlink() etc., in case it went + * outside the mantree. +@@ -373,7 +408,32 @@ const char *ult_src (const char *name, c + + return ult; + } ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ else if (flags & WHATISBUF) { ++ char whatis[8192], *w; ++ int len = 0; ++ ++ while (bptr && *bptr && !(strncasecmp(buffer, ".SH", 3) == 0 || ++ strncasecmp(buffer, ".SS", 3) == 0 || ++ strncasecmp(buffer, ".SY", 3) == 0)) ++ bptr = fgets(buffer, 1024, fp); ++ ++ w = strcpy(whatis, buffer); ++ len = strlen(whatis); ++ w += len; ++ ++ if ((len = fread(w, (8192 - len), sizeof(char), fp)) > 0) { ++ whatis[sizeof(whatis)-1] = '\0'; ++ } ++ set_wbuf(whatis); ++ } ++#endif + } ++#if defined(COMP_SRC) && defined(HAVE_ZIO) ++ /* Now we've handled whatis, close the manual page */ ++ if (flags & WHATISBUF) ++ fclose(fp); ++#endif + } + + /* We have the ultimate source */ +Index: src/ult_src.h +=================================================================== +--- src/ult_src.h.orig ++++ src/ult_src.h +@@ -21,9 +21,10 @@ + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#define SO_LINK 0001 +-#define SOFT_LINK 0002 +-#define HARD_LINK 0004 ++#define SO_LINK 0x0001 ++#define SOFT_LINK 0x0002 ++#define HARD_LINK 0x0004 ++#define WHATISBUF 0x0008 + + extern const char *ult_src (const char *name, const char *path, + struct stat *buf, int flags); +Index: src/util.c +=================================================================== +--- src/util.c.orig ++++ src/util.c +@@ -58,6 +58,9 @@ extern char *strcpy(); + # include + #endif /* HAVE_UNISTD_H */ + ++#include ++#define _(String) gettext (String) ++ + #include "manconfig.h" + #include "libdb/mydbm.h" /* for full definition of MAN_DB */ + #include "lib/pipeline.h" +Index: src/wrapper.c +=================================================================== +--- src/wrapper.c.orig ++++ src/wrapper.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -51,7 +52,7 @@ + * it is fixed at compile time to avoid a full class of + * dangers ... + */ +-struct { ++static struct { + const char *prog; + const char *run; + const char *user; +@@ -65,12 +66,13 @@ struct { + { "mandb", "/usr/lib/man-db/mandb", "man" }, + { 0, 0, 0, }}; + +-char *program_name; ++static char *program_name; + +-int main (int argc, char **argv) ++int main (int argc, char *argv[], char *envp[]) + { +- uid_t ruid; +- char *fakeroot; ++ uid_t ruid, euid; ++ gid_t rgid; ++// char *fakeroot; + char *p; + struct passwd *pwd; + +@@ -88,57 +90,49 @@ int main (int argc, char **argv) + program_name = (p ? ++p : argv[0]); + + ruid = getuid (); +- fakeroot = getenv ("FAKEROOTKEY"); ++ euid = geteuid(); ++ rgid = getgid (); ++// fakeroot = getenv ("FAKEROOTKEY"); + + #ifdef DEBUG + printf ("%s:\n", program_name); +- printf ("real = %d, = %d, fakeroot = %d\n", +- (int) ruid, (fakeroot != 0)); ++// printf ("real = %d, = %d, fakeroot = %d\n", (int) ruid, (fakeroot != 0)); + #endif + +- for (wlp = wrapped_list; wlp->prog && strcmp (program_name, wlp->prog); +- ++wlp) +- ; ++ for (wlp = wrapped_list; wlp->prog && strcmp (program_name, wlp->prog); ++wlp) ++ /* __asm__ __volatile__("": : :"memory") */; + if (!wlp->prog) { + fprintf (stderr, _("Don't know which program should I run being >%s<\n"), + program_name); + return -ENOENT; + } +- +- if (!fakeroot && ruid == 0) { ++#ifdef DEBUG ++ printf ("%s\n", wlp->run); ++#endif ++ if (/* !fakeroot && */ (ruid == 0 || euid == 0)) { + pwd = getpwnam (wlp->user); +- /* +- if (!pwd +- || setgid (pwd->pw_gid) +- || initgroups (wlp->user, pwd->pw_gid) +- || setuid (pwd->pw_uid)) { +- fprintf (stderr, _("%s: Failed su to user %s\n"), +- wlp->prog, wlp->user); +- return -EACCES; +- } +- */ + if (!pwd) { +- fprintf (stderr, _("%s: Failed su to user %s\n"), +- wlp->prog, wlp->user); ++ fprintf (stderr, _("%s: Failed su to user %s\n"), wlp->prog, wlp->user); + return -EACCES; + } +- if (setgid (pwd->pw_gid)) { +- fprintf (stderr, _("%s: Failed su to user %s\n"), +- wlp->prog, wlp->user); ++ if (ruid == 0) { ++ ruid = pwd->pw_uid; ++ rgid = pwd->pw_gid; ++ } ++ if (setregid (rgid, pwd->pw_gid)) { ++ fprintf (stderr, _("%s: Failed su to user %s\n"), wlp->prog, wlp->user); + return -EACCES; + } +- if (initgroups (wlp->user, pwd->pw_gid)) { +- fprintf (stderr, _("%s: Failed su to user %s\n"), +- wlp->prog, wlp->user); ++ if (initgroups (wlp->user, rgid)) { ++ fprintf (stderr, _("%s: Failed su to user %s\n"), wlp->prog, wlp->user); + return -EACCES; + } +- if (setuid (pwd->pw_uid)) { +- fprintf (stderr, _("%s: Failed su to user %s\n"), +- wlp->prog, wlp->user); ++ if (setreuid (ruid, pwd->pw_uid)) { ++ fprintf (stderr, _("%s: Failed su to user %s\n"), wlp->prog, wlp->user); + return -EACCES; + } + } +- execv (wlp->run, argv); +- perror ("execv"); ++ execve (wlp->run, argv, envp); ++ perror ("execve"); + return -errno; + } +Index: zsoelim/zsoelim.l +=================================================================== +--- zsoelim/zsoelim.l.orig ++++ zsoelim/zsoelim.l +@@ -31,8 +31,20 @@ + * - added changes that were done to .c instead of -l source + * - added new start condition to avoid execution of .so requests + * inside a macro definition. ++ * ++ * Fri Jun 4 18:18:34 CEST 1999 Werner Fink ++ * - Create temporary file exclusive before decompresion ++ * ++ * Wed Jun 30 21:46:20 CEST 1999 Werner Fink ++ * - Use cleanup functions, kill possible childs to close all ++ * open file handles of our temporary files. ++ * - Use fopencookie combined with zlib and a workaround to ++ * make cookie_close_function working. ++ * ++ * Wed Apr 21 15:00:21 CEST 2004 Werner Fink ++ * - Use libzio together with libz and libbz2 ++ * + */ +- + #define MAX_SO_DEPTH 10 /* max .so recursion depth */ + #undef ACCEPT_QUOTES /* accept quoted roff requests */ + +@@ -60,6 +72,7 @@ extern int strncmp(); + #include + #include + #include ++#include + + #ifndef STDC_HEADERS + extern int errno; +@@ -88,8 +101,12 @@ extern int errno; + #endif /* HAVE_GETOPT_H */ + + #ifdef COMP_SRC +-#include "comp_src.h" ++# ifdef HAVE_ZIO ++# include ++# else + static char* so_delete[MAX_SO_DEPTH]; ++# endif ++# include "comp_src.h" + #endif /* COMP_SRC */ + + static int open_file (char *filename); +@@ -284,9 +301,13 @@ W [ \t] + <> { + fclose (yyin); + +-#ifdef COMP_SRC +- if (so_delete[so_stack_ptr]) ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) ++ if (so_delete[so_stack_ptr]) { + remove (so_delete[so_stack_ptr]); ++ pop_cleanup(); ++ /* was allocated by tempnam */ ++ free(so_delete[so_stack_ptr]); ++ } + #endif + if (no_newline) + putchar ('\n'); +@@ -346,6 +367,19 @@ static void parse_file (void) + yylex (); + } + ++#if defined(COMP_SRC) && !defined(HAVE_ZIO) ++static int do_emergency_unlink(const char* filename) ++{ ++ /* kill pending childs because unlink only ++ works if no processes have the file open */ ++ if ( setpgrp() == 0 ) { ++ signal(SIGHUP, SIG_IGN); ++ kill(-getpid(), SIGHUP); ++ } ++ return unlink (filename); ++} ++#endif ++ + int main (int argc, char *argv[]) + { + int c, option_index; +@@ -382,6 +416,7 @@ int main (int argc, char *argv[]) + } + } + ++ pop_all_cleanups(); + return status; + } + +@@ -446,6 +481,7 @@ static int open_file (char *filename) + compfile = filename; + + if (comp->ext) { ++#ifndef HAVE_ZIO + command *decompress_cmd; + pipeline *decompress; + int exit_status; +@@ -459,8 +495,13 @@ static int open_file (char *filename) + decompress = pipeline_new_commands + (decompress_cmd, NULL); + decompress->want_out = file_fd; ++ ++ so_delete[so_stack_ptr] = filename; ++ push_cleanup ((void (*)())do_emergency_unlink, filename); ++ + pipeline_start (decompress); + exit_status = pipeline_wait (decompress); ++ + close (file_fd); + + if (exit_status != 0) { +@@ -483,8 +524,14 @@ static int open_file (char *filename) + yyin = oldyyin; + return 1; + } +- +- so_delete[so_stack_ptr] = filename; ++#else /* HAVE_ZIO */ ++ if ( !(yyin = fzopen(compfile, "r")) ) { ++ error (0, errno, "open compressed stream: %s", ++ compfile); ++ yyin = oldyyin; ++ return 1; ++ } ++#endif /* HAVE_ZIO */ + NAME = compfile; + return 0; + } diff --git a/man-db-2.4.3.tar.bz2 b/man-db-2.4.3.tar.bz2 new file mode 100644 index 0000000..4d74ef0 --- /dev/null +++ b/man-db-2.4.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be7487221716d5f53ca93c9fe373b33b6703626ee47d973e59128decab501b5e +size 636060 diff --git a/man.changes b/man.changes new file mode 100644 index 0000000..022bbab --- /dev/null +++ b/man.changes @@ -0,0 +1,623 @@ +------------------------------------------------------------------- +Mon Sep 4 15:40:44 CEST 2006 - rguenther@suse.de + +- Remove unused sharutils dependency. + +------------------------------------------------------------------- +Mon Sep 4 13:11:09 CEST 2006 - rguenther@suse.de + +- Remove lynx build dependency. Set default for AC_PATH_PROG for + lynx to /usr/bin/lynx. + +------------------------------------------------------------------- +Mon Aug 7 15:43:06 CEST 2006 - werner@suse.de + +- Make it work even with new gettext package + +------------------------------------------------------------------- +Thu Aug 3 10:52:50 CEST 2006 - sndirsch@suse.de + +- read also manual pages in man4x subdirectories; required for + conflicting 'mouse' manual page and i810 driver manual page, + which has been moved to man4x directory + +------------------------------------------------------------------- +Wed Jun 14 18:27:48 CEST 2006 - werner@suse.de + +- Update to man-db 2.4.3 patchlevel 3 to get the first part of bug + #183796 fixed. +- Change lex scanner to set sperator ony onece per whatis/apropos + line to get second part of bug #183796 fixed +- Support several language types/locations +- Do not fail on verbatim macro of perl man pages on whatis/apropos +- Do not fail on DOS formated manual pages on whatis/apropos + +------------------------------------------------------------------- +Fri Apr 7 13:05:49 CEST 2006 - werner@suse.de + +- Do not reset terminal if stdout is not a tty (bug #152793) + +------------------------------------------------------------------- +Wed Jan 25 21:30:31 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Fri Jan 13 15:32:27 CET 2006 - schwab@suse.de + +- Don't strip binaries. + +------------------------------------------------------------------- +Wed Dec 14 16:12:26 CET 2005 - werner@suse.de + +- Make cron job files word readable (bug #138549) + +------------------------------------------------------------------- +Tue Dec 13 18:51:22 CET 2005 - werner@suse.de + +- Add section 0 for header files + +------------------------------------------------------------------- +Wed Jun 1 11:04:56 CEST 2005 - kukuk@suse.de + +- Make cron.daily script names LSB conform + +------------------------------------------------------------------- +Thu Feb 10 16:59:37 CET 2005 - mfabian@suse.de + +- Bugzilla #50694: add another request to tmac.andocdb: + ". char ` \N'96'" + makes sure U+0060 (GRAVE ACCENT) doesn't get replaced by + U+2018 (LEFT SINGLE QUOTATION MARK) + +------------------------------------------------------------------- +Wed Sep 22 19:03:33 CEST 2004 - werner@suse.de + +- Use safe-rm for deleting straycats (bug #45612, comment #14) + +------------------------------------------------------------------- +Thu Sep 9 15:56:34 CEST 2004 - werner@suse.de + +- Be ready for flex-2.5.31 + +------------------------------------------------------------------- +Wed Apr 21 18:16:27 CEST 2004 - werner@suse.de + +- Use libzio together with zlib and libbz2 to support bz2 manual + pages to avoids pipe()/fork()/execve() calls in mandb/man. + +------------------------------------------------------------------- +Tue Mar 16 13:41:00 CET 2004 - werner@suse.de + +- Activate path for bug #35821 due its fixed now. + +------------------------------------------------------------------- +Fri Mar 12 17:12:20 CET 2004 - werner@suse.de + +- Be prepared for bug #35821 + +------------------------------------------------------------------- +Thu Sep 4 17:28:52 CEST 2003 - werner@suse.de + +- It seems that basename(3) results shouldn't be freed even if + the manual page says they should. (bug #30093) + +------------------------------------------------------------------- +Fri Aug 29 15:56:30 CEST 2003 - werner@suse.de + +- Add workaround for less using xselection even if no -A is + specified for bug #29612. Nevertheless less has to be fixed. + +------------------------------------------------------------------- +Wed Aug 20 19:13:50 CEST 2003 - werner@suse.de + +- Update to 2.4.1-13 security only, due missed fixes in previous + patches. + +------------------------------------------------------------------- +Fri Aug 15 15:35:57 CEST 2003 - kukuk@suse.de + +- Use same permissions for man/mandb as in permissions package + +------------------------------------------------------------------- +Thu Aug 7 18:33:41 CEST 2003 - werner@suse.de + +- YaSP: Added more security +- Ensure that no version conflict happens during db purge (#28414) + +------------------------------------------------------------------- +Fri Jul 11 17:59:15 CEST 2003 - werner@suse.de + +- Update to 2.4.1-10 +- Security fix: create the temporary database exclusive + +------------------------------------------------------------------- +Mon Jul 7 14:59:10 CEST 2003 - werner@suse.de + +- Security fix (bug #27474) + +------------------------------------------------------------------- +Fri Jun 20 21:53:29 CEST 2003 - ro@suse.de + +- fix build with current gettext + +------------------------------------------------------------------- +Thu Jun 12 16:14:52 CEST 2003 - olh@suse.de + +- disable sync call in install section + +------------------------------------------------------------------- +Thu Jun 12 11:17:18 CEST 2003 - kukuk@suse.de + +- /var/cache/man is part of filesystem + +------------------------------------------------------------------- +Fri Jan 17 15:20:50 CET 2003 - mfabian@suse.de + +- add another request to tmac.andocdb: ". char ' \N'39'" + makes sure U+0027 (APOSTROPHE) doesn't get replaced by + U+2019 (RIGHT SINGLE QUOTATION MARK) + +------------------------------------------------------------------- +Sun Jan 12 14:13:37 CET 2003 - mfabian@suse.de + +- fix header of de.po to enable gettext to convert to locale + encoding +- fix and update some translations in de.po + +------------------------------------------------------------------- +Wed Jan 8 11:50:47 CET 2003 - werner@suse.de + +- bug #22628 -- add missed meta data within sysconfig file + +------------------------------------------------------------------- +Mon Dec 2 18:33:29 CET 2002 - werner@suse.de + +- Make compress local manuals work if placed in a writable dir for + the user man (bug #22215). + +------------------------------------------------------------------- +Fri Oct 11 18:09:54 CEST 2002 - mfabian@suse.de + +- add another request to tmac.andocdb similar to the one + in the last changelog entry to make the regular minus '-' + (without backslash) get rendered as U+002D (HYPHEN-MINUS) + in man-pages as well. + +------------------------------------------------------------------- +Fri Sep 6 19:27:08 CEST 2002 - mfabian@suse.de + +- add the two lines + .if '\*[.T]'utf8' \ + . char \- \N'45' + to /usr/share/groff/site-tmac/tmac.andocdb in order to get + U+002D (HYPHEN-MINUS) instead of U+2212 (MINUS SIGN) as the + minus sign in front of options in man-pages rendered in UTF-8 + locales. U+2212 (MINUS SIGN) makes searching in man-pages for + options unnecessarily difficult. + +------------------------------------------------------------------- +Fri Aug 23 16:53:50 CEST 2002 - werner@suse.de + +- Use LESSCHARSET=japanese-euc for japanese to support even konsole + (bug #18222) + +------------------------------------------------------------------- +Fri Aug 16 13:51:44 CEST 2002 - werner@suse.de + +- Add PreReq (bug #17927) + +------------------------------------------------------------------- +Wed Jul 31 18:51:16 CEST 2002 - poeml@suse.de + +- add ssl to the list of man sections (bug #17239) + +------------------------------------------------------------------- +Sat Jul 27 15:39:15 CEST 2002 - adrian@suse.de + +- fix neededforbuild + +------------------------------------------------------------------- +Wed Jun 5 12:26:35 CEST 2002 - ro@suse.de + +- run suse_update_config for subdir tools + +------------------------------------------------------------------- +Fri May 10 16:05:29 CEST 2002 - werner@suse.de + +- Use buildroot (fix bug #12158) +- Don't cache utf8 formatted man pages (fix bug #16067) + +------------------------------------------------------------------- +Thu Apr 4 11:20:50 CEST 2002 - ro@suse.de + +- fix for autoconf LIBOBJS vs AC_LIBOBJ + +------------------------------------------------------------------- +Wed Mar 27 16:58:22 CET 2002 - werner@suse.de + +- Add space between grep command and its options for whatis + text file fallback. + +------------------------------------------------------------------- +Thu Mar 14 17:13:54 CET 2002 - werner@suse.de + +- Use nroff asci8 character set for korean (nippon does not work). + +------------------------------------------------------------------- +Wed Feb 6 13:32:03 CET 2002 - ro@suse.de + +- sysconfig/cron_daily -> sysconfig/cron + +------------------------------------------------------------------- +Thu Jan 31 18:41:27 CET 2002 - werner@suse.de + +- Add security patch from Olaf Kirch + +------------------------------------------------------------------- +Thu Jan 31 18:33:02 CET 2002 - ro@suse.de + +- moved cron.daily scripts do_mandb and clean_catman to this pkg + +------------------------------------------------------------------- +Fri Jan 11 18:31:44 CET 2002 - werner@suse.de + +- Add security patch from Thomas Biege + +------------------------------------------------------------------- +Thu Dec 20 14:59:11 CET 2001 - werner@suse.de + +- Check existence of user man + +------------------------------------------------------------------- +Tue Sep 25 14:30:14 CEST 2001 - werner@suse.de + +- Close nonsens bug report #9419 + +------------------------------------------------------------------- +Tue Sep 18 11:32:24 CEST 2001 - werner@suse.de + +- Avoid possible crash in mandb + +------------------------------------------------------------------- +Fri Aug 31 14:14:15 CEST 2001 - werner@suse.de + +- I vote to remove strtok() from ANSI-C: Use strsep() within + pathappend() because thew calling function add_nls_manpath() + uses strtok(). + +------------------------------------------------------------------- +Wed Aug 29 18:47:28 CEST 2001 - werner@suse.de + +- More work on the whatis data base storage + +------------------------------------------------------------------- +Tue Aug 28 20:33:31 CEST 2001 - werner@suse.de + +- Whatis: Avoid error messages caused by buggy manual pages + to see the wrong man pages one may use -v for verbose + +------------------------------------------------------------------- +Thu Aug 16 14:44:04 CEST 2001 - werner@suse.de + +- Global UTF-8 handling instead of two different ways + +------------------------------------------------------------------- +Wed Aug 15 18:47:34 CEST 2001 - werner@suse.de + +- Better UTF-8 man page handling: use curent locale even if we + overwrite man page locale. +- Sometime there is no man page path for local man page files, + therefore force language if not found. + +------------------------------------------------------------------- +Mon Aug 13 16:53:54 CEST 2001 - werner@suse.de + +- Initialize variable used in lexgrog.l + +------------------------------------------------------------------- +Mon Jul 30 13:40:47 CEST 2001 - werner@suse.de + +- Update to vesion 2.3.19deb4.0 +- Port libz patch to this version +- Map UTF-8 man pages to appropiate groff command +- Make it work + +------------------------------------------------------------------- +Sun Jun 17 22:33:11 CEST 2001 - bk@suse.de + +- new location of tmac files is /usr/share/groff/site-tmac, + needed for groff 1.17 and does not work with older versions + +------------------------------------------------------------------- +Thu Jun 7 15:13:49 CEST 2001 - werner@suse.de + +- Fix autoconf trouble + +------------------------------------------------------------------- +Wed May 16 19:30:31 CEST 2001 - werner@suse.de + +- Make xcopy more handy (bug#8499) + +------------------------------------------------------------------- +Tue May 15 13:26:58 CEST 2001 - werner@suse.de + +- Fix segfault on option -S parser + +------------------------------------------------------------------- +Sat Apr 21 21:44:03 CEST 2001 - schwab@suse.de + +- Fix inapproriate mixing of pointer and integers. + +------------------------------------------------------------------- +Mon Apr 9 11:46:00 CEST 2001 - werner@suse.de + +- Make it work + +------------------------------------------------------------------- +Fri Apr 6 19:48:23 CEST 2001 - werner@suse.de + +- Use own tmac groff files to avoid page headers and footers + on ttys only + +------------------------------------------------------------------- +Tue Mar 20 11:03:30 CET 2001 - werner@suse.de + +- Avoid deleting of data bases if we've newer version around + +------------------------------------------------------------------- +Mon Mar 19 18:45:22 CET 2001 - werner@suse.de + +- Remove data bases at install time + +------------------------------------------------------------------- +Mon Mar 19 17:51:07 CET 2001 - werner@suse.de + +- Update to 2.3.17-3.2 + * Port our patches and bugfixes to this new version + * Change the wrapper to use setre(r|g)id and use + this wrapper suid root + +------------------------------------------------------------------- +Thu Feb 8 19:10:04 CET 2001 - werner@suse.de + +- Avoid error() call without format + +------------------------------------------------------------------- +Mon Dec 11 17:15:37 CET 2000 - werner@suse.de + +- Correct depth level of patch + +------------------------------------------------------------------- +Mon Dec 11 12:29:41 GMT 2000 - werner@suse.de + +- Make `setlocale'zing more reliable accordingly to Andreas + Jaeger. + +------------------------------------------------------------------- +Sat Dec 9 02:15:38 CET 2000 - mfabian@suse.de + +- replaced all setlocale(LC_MESSAGES,"") with + setlocale(LC_MESSAGES,"") *and* setlocale(LC_CTYPE,""). + + After the upgrade to Glibc 2.2, 8 bit characters in the + French, Czech, and Japanese messages were displayed as "?". + Changing the setlocale calls in the above way fixed it. + Messages in all languages now display correctly again. + + First I replaced all setlocale(LC_MESSAGES,"") by + setlocale(LC_ALL,""), but this causes problems. In that case, + the messages display correctly, but "LANG=ja_JP man man" + incorrectly displays the English manpage. Strange. + When using both setlocale(LC_MESSAGES,"") *and* + setlocale(LC_CTYPE,"") but not setlocale(LC_ALL,""), + everything seems to work correctly. + +------------------------------------------------------------------- +Tue Dec 5 20:48:29 PST 2000 - bk@suse.de + +- added %dir /usr/share/man/{de,es,it,ja}+man[158] to file list + +------------------------------------------------------------------- +Fri Sep 15 17:15:21 MEST 2000 - pthomas@suse.de + +- Add 3C++, 3C++std and 8C++ to the list of man sections, the + Compaq man pages for C++ use these. + +------------------------------------------------------------------- +Thu May 25 11:45:15 CEST 2000 - werner@suse.de + +- Fix the man path problem (hint from Michael Reichardt + ) +- Make mandir depending on the RPM macro %_mandir +- Make zsoemlin zlib interface functions more compatible to cookie + I/O functions (type changed in new glibc 2.1 and higher) + +------------------------------------------------------------------- +Thu Mar 16 22:10:07 CET 2000 - werner@suse.de + +- Make lexgrog knowing the japanese multibyte string of section NAME +- Make flex use memory aligned tables. + +------------------------------------------------------------------- +Wed Mar 8 22:15:55 CET 2000 - werner@suse.de + +- Security fix in straycats: Check if we got a temporary file! + +------------------------------------------------------------------- +Thu Mar 2 10:33:47 CET 2000 - ro@suse.de + +- added usr/share/man/allman + +------------------------------------------------------------------- +Tue Dec 14 21:18:20 CET 1999 - werner@suse.de + +- New version 2.3.10-69s + * better NLS support +- Add all languages to /etc/manpatch.config before english default +- Make mandb usable only for root (avoid DOS attacks) + +------------------------------------------------------------------- +Fri Nov 26 16:46:16 CET 1999 - ro@suse.de + +- printout full path-name on check + +------------------------------------------------------------------- +Fri Nov 26 16:04:08 CET 1999 - ro@suse.de + +- patched configure.in to prefer gdbm + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Mon Sep 6 23:38:44 CEST 1999 - ro@suse.de + +- removed (now) conflicting redeclarations from zsoelim.l + +------------------------------------------------------------------- +Thu Sep 2 20:37:21 CEST 1999 - werner@suse.de + +- Make man.c work again +- Use RPM_OPT_FLAGS + +------------------------------------------------------------------- +Mon Aug 30 23:10:01 MEST 1999 - werner@suse.de + +- Few simple changes + * drop privileges before chdir back into current directory + * do not search for local man page if not given `-l' + +------------------------------------------------------------------- +Mon Jul 19 18:02:32 MEST 1999 - bs@suse.de + +- fixed file list (/var/cache/man) + +------------------------------------------------------------------- +Thu Jul 15 17:29:46 CEST 1999 - werner@suse.de + +- Don't use carriage return but newline in messages. + +------------------------------------------------------------------- +Wed Jul 14 12:29:54 MEST 1999 - kukuk@suse.de + +- Fix %pre section (use rm -rf) + +------------------------------------------------------------------- +Mon Jul 12 14:59:16 CEST 1999 - werner@suse.de + +- Add allman sub tree to fsstnd tree + +------------------------------------------------------------------- +Fri Jul 9 07:57:34 MEST 1999 - ro@suse.de + +- fixed filelist + +------------------------------------------------------------------- +Tue Jul 6 23:01:33 CEST 1999 - werner@suse.de + +- Update to debian version 2.3.10-69i + * Change from /var/catman/ to /var/cache/man/ + * Make /usr/share/man/ possible + * Buildin NLS support +- Fix some debian bugs (sig handlers!) +- Add SuSE bug fixes (sig handler) and zlib feature + +------------------------------------------------------------------- +Wed Jun 30 23:31:03 CEST 1999 - werner@suse.de + +- First changes for SuSE 6.2 + * Use fopencookie in zsoelim if glibc 2.1 or higher to avoid any + possible link attack in /tmp/ + * Kill all possible childs (e.g. gunzip) of zsoelim for glibc 2.0 + to be able to unlink the temporary files during signal handling. + * Use better sig and exit handling + +------------------------------------------------------------------- +Fri Jun 4 21:41:48 CEST 1999 - werner@suse.de + +- Fix security leak in zsoelim +- Set sig and exit handler for removing temporary files +- ToDo: use libz instead of gzip + +------------------------------------------------------------------ +Mon May 3 15:08:05 MEST 1999 - ro@suse.de + +- removed forgotten debug message + +------------------------------------------------------------------- +Thu Mar 11 16:07:26 MET 1999 - werner@suse.de + +- Use -Tlatin1 if eqn is geqn +- Remove the index.bt's in /var/catman before being installed +- Support stupid manual pages using .\" instead of '\" for + preprocessor cockies + +------------------------------------------------------------------- +Thu Mar 11 00:28:20 MET 1999 - werner@suse.de + +- Use db2 if available + +------------------------------------------------------------------- +Wed Mar 10 21:51:14 MET 1999 - werner@suse.de + +- Work around of a buffer/pointer cludge of strncat and strncpy + (glibc/axp) +- Make CAT_FILE work +- ToDo: libdb1 is broken on axp + +------------------------------------------------------------------- +Wed Feb 10 17:20:02 MET 1999 - werner@suse.de + +- Fix the SIGHUP/SIGTERM bug +- Use seteuid for LINUX_VERSION_CODE >= ((1<<16)+(1<<8)+37) +- Remove temp files for man -l even if signaled +- Fix some more possible SIGSEGV's + +------------------------------------------------------------------- +Tue Sep 29 17:07:04 MEST 1998 - ro@suse.de + +- restarted from stable-man: + use usr/include/db1 and libdb1 for db lib + added HAVE_STRSEP to include/config.h.in (this file is broken) + libdb/Makefile.in, src/Makefile.in : removed -I- from CFLAGS + +------------------------------------------------------------------- +Fri Aug 7 11:52:57 MEST 1998 - bs@suse.de + +- added catman dirs for es, fr & it to file list. + +------------------------------------------------------------------- +Thu Aug 6 20:21:23 MEST 1998 - bs@suse.de + +- added es, fr & it. + +------------------------------------------------------------------- +Wed Jul 15 14:09:01 MEST 1998 - bs@suse.de + +- fixed /usr/man/allman/de + +------------------------------------------------------------------------------ +Thu Apr 23 00:27:06 MET DST 1998 - werner@suse.de + + - Fix preprocessor handling: + was missed since libz was used instead of gzip -dc + +------------------------------------------------------------------------------ +Thu Mar 19 17:44:43 MET 1998 - werner@suse.de + + - Use lib(g)z for mandb + * no temporary nroff files for parsing of the manual pages + * handle only the first 4096 bytes from the first .SH down + * now zsoelim gets the gezipped man page without extension + instead a temporary nroff file + * extend lexgrog.l-2.4a to catch most pages as possible + * add -funroll-loop to the compile options, use -O2 + +------------------------------------------------------------------------------ +Fri Jun 6 17:49:08 MEST 1997 - bs@suse.e + +- added allman stuff + diff --git a/man.spec b/man.spec new file mode 100644 index 0000000..6f7d56e --- /dev/null +++ b/man.spec @@ -0,0 +1,459 @@ +# +# spec file for package man (Version 2.4.3) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: man +BuildRequires: flex groff libzio util-linux +Version: 2.4.3 +Release: 7 +Summary: A Program for Displaying man Pages +License: GPL +Group: System/Base +PreReq: fileutils fillup +Provides: man_db +Requires: groff >= 1.18 less +Autoreqprov: on +Source: man-db-%{version}.tar.bz2 +Source1: sysconfig.cron-man +Source2: cron.daily.do_mandb +Source3: cron.daily.clean_catman +Patch0: man-db-%{version}.dif +Patch1: man-db-%{version}-3.diff.bz2 +Patch2: man-db-2.3.19deb4.0-groff.dif +Patch3: man-db-2.4.1-error.dif +Patch4: man-db-%{version}-section.dif +Patch5: man-db-2.4.1-security2.dif +Patch6: man-db-2.4.1-security4.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +A program for displaying man pages on the screen or sending them to a +printer (using groff). + + + +Authors: +-------- + G. Wilford + +%prep +%setup -n man-db-%{version} +%patch1 -p1 -b .debian +%patch2 -p0 -b .groff +%patch3 -p0 -b .err +%patch4 -p0 -b .sect +%patch5 -p0 -b .secu2 +%patch6 -p0 -b .secu4 +%patch -p0 + +%build +%{?suse_update_config:%{suse_update_config -f tools }} + gettextize --force --copy --no-changelog + rm -f configure GNUmakefile + echo $RPM_OPT_FLAGS + make -f Makefile.Linux compile MANDIR=%{_mandir} SYSCONFDIR=%{_sysconfdir} + +%install +set +o posix +#touch /tmp/bstamp; sleep 3; sync + rm -rf ${RPM_BUILD_ROOT}/var/cache/man + DESTDIR=${RPM_BUILD_ROOT} + export DESTDIR + make -f Makefile.Linux install MANDIR=%{_mandir} + mkdir -p ${RPM_BUILD_ROOT}/usr/share/groff/site-tmac + install -m 0644 groff/tmac.andb ${RPM_BUILD_ROOT}/usr/share/groff/site-tmac/ + install -m 0644 groff/tmac.andocdb ${RPM_BUILD_ROOT}/usr/share/groff/site-tmac/ + mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates + mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily + install -m 0644 %{SOURCE1} ${RPM_BUILD_ROOT}/var/adm/fillup-templates + install -m 0744 %{SOURCE2} ${RPM_BUILD_ROOT}/etc/cron.daily/suse-do_mandb + install -m 0744 %{SOURCE3} ${RPM_BUILD_ROOT}/etc/cron.daily/suse-clean_catman + Check +#touch /tmp/estamp; sleep 3; sync +#( +# find / -xdev \( -newer /tmp/bstamp -a \( -not -newer /tmp/estamp \) \) -a \( \ +# \( \( \( -not -type d \) -a \( -not -type l \) \) -printf '%%p\n' \) -o \ +# \( -type d -printf '%%p/\n' \) -o \( -type l -printf '%%p\n' \) \) +#) > >(sort -u -t / | grep -vE '^(/tmp|/proc|/usr/src/packages)' > /tmp/man.list) +#rm /tmp/estamp /tmp/bstamp + +%pre +test -d var/catman/ && rm -rf var/catman/ || true + +%post +%{fillup_only -an cron} + +%files +%config /etc/manpath.config +%attr(0744,root,root) /etc/cron.daily/suse-clean_catman +%attr(0744,root,root) /etc/cron.daily/suse-do_mandb +/usr/bin/apropos +/usr/bin/catman +/usr/bin/lexgrog +%attr(4755,root,root) /usr/bin/man +%attr(4755,root,root) /usr/bin/mandb +/usr/bin/manpath +/usr/bin/whatis +/usr/bin/zsoelim +%dir %attr(0711,root,root) /usr/lib/man-db +%attr(0711,root,root) /usr/lib/man-db/man +%attr(0711,root,root) /usr/lib/man-db/mandb +/usr/sbin/accessdb +/usr/share/groff/site-tmac/tmac.andb +/usr/share/groff/site-tmac/tmac.andocdb +/usr/share/locale/*/LC_MESSAGES/man?db.mo +%dir %{_mandir}/de +%dir %{_mandir}/de/man1 +%doc %{_mandir}/de/man1/*.1.gz +%dir %{_mandir}/de/man5 +%doc %{_mandir}/de/man5/*.5.gz +%dir %{_mandir}/de/man8 +%doc %{_mandir}/de/man8/*.8.gz +%dir %{_mandir}/es +%dir %{_mandir}/es/man1 +%doc %{_mandir}/es/man1/*.1.gz +%dir %{_mandir}/es/man5 +%doc %{_mandir}/es/man5/*.5.gz +%dir %{_mandir}/es/man8 +%doc %{_mandir}/es/man8/*.8.gz +%dir %{_mandir}/it +%dir %{_mandir}/it/man1 +%doc %{_mandir}/it/man1/*.1.gz +%dir %{_mandir}/it/man5 +%doc %{_mandir}/it/man5/*.5.gz +%dir %{_mandir}/it/man8 +%doc %{_mandir}/it/man8/*.8.gz +%dir %{_mandir}/ja +%dir %{_mandir}/ja/man1 +%doc %{_mandir}/ja/man1/*.1.gz +%dir %{_mandir}/ja/man5 +%doc %{_mandir}/ja/man5/*.5.gz +%dir %{_mandir}/ja/man8 +%doc %{_mandir}/ja/man8/*.8.gz +%doc %{_mandir}/man1/*.1.gz +%doc %{_mandir}/man5/*.5.gz +%doc %{_mandir}/man8/*.8.gz +%defattr(-,man,daemon) +/var/cache/man/* +/var/adm/fillup-templates/sysconfig.cron-man + +%changelog -n man +* Mon Sep 04 2006 - rguenther@suse.de +- Remove unused sharutils dependency. +* Mon Sep 04 2006 - rguenther@suse.de +- Remove lynx build dependency. Set default for AC_PATH_PROG for + lynx to /usr/bin/lynx. +* Mon Aug 07 2006 - werner@suse.de +- Make it work even with new gettext package +* Thu Aug 03 2006 - sndirsch@suse.de +- read also manual pages in man4x subdirectories; required for + conflicting 'mouse' manual page and i810 driver manual page, + which has been moved to man4x directory +* Wed Jun 14 2006 - werner@suse.de +- Update to man-db 2.4.3 patchlevel 3 to get the first part of bug + [#183796] fixed. +- Change lex scanner to set sperator ony onece per whatis/apropos + line to get second part of bug #183796 fixed +- Support several language types/locations +- Do not fail on verbatim macro of perl man pages on whatis/apropos +- Do not fail on DOS formated manual pages on whatis/apropos +* Fri Apr 07 2006 - werner@suse.de +- Do not reset terminal if stdout is not a tty (bug #152793) +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Fri Jan 13 2006 - schwab@suse.de +- Don't strip binaries. +* Wed Dec 14 2005 - werner@suse.de +- Make cron job files word readable (bug #138549) +* Tue Dec 13 2005 - werner@suse.de +- Add section 0 for header files +* Wed Jun 01 2005 - kukuk@suse.de +- Make cron.daily script names LSB conform +* Thu Feb 10 2005 - mfabian@suse.de +- Bugzilla #50694: add another request to tmac.andocdb: + ". char ` \N'96'" + makes sure U+0060 (GRAVE ACCENT) doesn't get replaced by + U+2018 (LEFT SINGLE QUOTATION MARK) +* Wed Sep 22 2004 - werner@suse.de +- Use safe-rm for deleting straycats (bug #45612, comment #14) +* Thu Sep 09 2004 - werner@suse.de +- Be ready for flex-2.5.31 +* Wed Apr 21 2004 - werner@suse.de +- Use libzio together with zlib and libbz2 to support bz2 manual + pages to avoids pipe()/fork()/execve() calls in mandb/man. +* Tue Mar 16 2004 - werner@suse.de +- Activate path for bug #35821 due its fixed now. +* Fri Mar 12 2004 - werner@suse.de +- Be prepared for bug #35821 +* Thu Sep 04 2003 - werner@suse.de +- It seems that basename(3) results shouldn't be freed even if + the manual page says they should. (bug #30093) +* Fri Aug 29 2003 - werner@suse.de +- Add workaround for less using xselection even if no -A is + specified for bug #29612. Nevertheless less has to be fixed. +* Wed Aug 20 2003 - werner@suse.de +- Update to 2.4.1-13 security only, due missed fixes in previous + patches. +* Fri Aug 15 2003 - kukuk@suse.de +- Use same permissions for man/mandb as in permissions package +* Thu Aug 07 2003 - werner@suse.de +- YaSP: Added more security +- Ensure that no version conflict happens during db purge (#28414) +* Fri Jul 11 2003 - werner@suse.de +- Update to 2.4.1-10 +- Security fix: create the temporary database exclusive +* Mon Jul 07 2003 - werner@suse.de +- Security fix (bug #27474) +* Fri Jun 20 2003 - ro@suse.de +- fix build with current gettext +* Thu Jun 12 2003 - olh@suse.de +- disable sync call in install section +* Thu Jun 12 2003 - kukuk@suse.de +- /var/cache/man is part of filesystem +* Fri Jan 17 2003 - mfabian@suse.de +- add another request to tmac.andocdb: ". char ' \N'39'" + makes sure U+0027 (APOSTROPHE) doesn't get replaced by + U+2019 (RIGHT SINGLE QUOTATION MARK) +* Sun Jan 12 2003 - mfabian@suse.de +- fix header of de.po to enable gettext to convert to locale + encoding +- fix and update some translations in de.po +* Wed Jan 08 2003 - werner@suse.de +- bug #22628 -- add missed meta data within sysconfig file +* Mon Dec 02 2002 - werner@suse.de +- Make compress local manuals work if placed in a writable dir for + the user man (bug #22215). +* Fri Oct 11 2002 - mfabian@suse.de +- add another request to tmac.andocdb similar to the one + in the last changelog entry to make the regular minus '-' + (without backslash) get rendered as U+002D (HYPHEN-MINUS) + in man-pages as well. +* Fri Sep 06 2002 - mfabian@suse.de +- add the two lines + .if '\*[.T]'utf8' \ + . char \- \N'45' + to /usr/share/groff/site-tmac/tmac.andocdb in order to get + U+002D (HYPHEN-MINUS) instead of U+2212 (MINUS SIGN) as the + minus sign in front of options in man-pages rendered in UTF-8 + locales. U+2212 (MINUS SIGN) makes searching in man-pages for + options unnecessarily difficult. +* Fri Aug 23 2002 - werner@suse.de +- Use LESSCHARSET=japanese-euc for japanese to support even konsole + (bug #18222) +* Fri Aug 16 2002 - werner@suse.de +- Add PreReq (bug #17927) +* Wed Jul 31 2002 - poeml@suse.de +- add ssl to the list of man sections (bug #17239) +* Sat Jul 27 2002 - adrian@suse.de +- fix neededforbuild +* Wed Jun 05 2002 - ro@suse.de +- run suse_update_config for subdir tools +* Fri May 10 2002 - werner@suse.de +- Use buildroot (fix bug #12158) +- Don't cache utf8 formatted man pages (fix bug #16067) +* Thu Apr 04 2002 - ro@suse.de +- fix for autoconf LIBOBJS vs AC_LIBOBJ +* Wed Mar 27 2002 - werner@suse.de +- Add space between grep command and its options for whatis + text file fallback. +* Thu Mar 14 2002 - werner@suse.de +- Use nroff asci8 character set for korean (nippon does not work). +* Wed Feb 06 2002 - ro@suse.de +- sysconfig/cron_daily -> sysconfig/cron +* Thu Jan 31 2002 - werner@suse.de +- Add security patch from Olaf Kirch +* Thu Jan 31 2002 - ro@suse.de +- moved cron.daily scripts do_mandb and clean_catman to this pkg +* Fri Jan 11 2002 - werner@suse.de +- Add security patch from Thomas Biege +* Thu Dec 20 2001 - werner@suse.de +- Check existence of user man +* Tue Sep 25 2001 - werner@suse.de +- Close nonsens bug report #9419 +* Tue Sep 18 2001 - werner@suse.de +- Avoid possible crash in mandb +* Fri Aug 31 2001 - werner@suse.de +- I vote to remove strtok() from ANSI-C: Use strsep() within + pathappend() because thew calling function add_nls_manpath() + uses strtok(). +* Wed Aug 29 2001 - werner@suse.de +- More work on the whatis data base storage +* Tue Aug 28 2001 - werner@suse.de +- Whatis: Avoid error messages caused by buggy manual pages + to see the wrong man pages one may use -v for verbose +* Thu Aug 16 2001 - werner@suse.de +- Global UTF-8 handling instead of two different ways +* Wed Aug 15 2001 - werner@suse.de +- Better UTF-8 man page handling: use curent locale even if we + overwrite man page locale. +- Sometime there is no man page path for local man page files, + therefore force language if not found. +* Mon Aug 13 2001 - werner@suse.de +- Initialize variable used in lexgrog.l +* Mon Jul 30 2001 - werner@suse.de +- Update to vesion 2.3.19deb4.0 +- Port libz patch to this version +- Map UTF-8 man pages to appropiate groff command +- Make it work +* Sun Jun 17 2001 - bk@suse.de +- new location of tmac files is /usr/share/groff/site-tmac, + needed for groff 1.17 and does not work with older versions +* Thu Jun 07 2001 - werner@suse.de +- Fix autoconf trouble +* Wed May 16 2001 - werner@suse.de +- Make xcopy more handy (bug#8499) +* Tue May 15 2001 - werner@suse.de +- Fix segfault on option -S parser +* Sat Apr 21 2001 - schwab@suse.de +- Fix inapproriate mixing of pointer and integers. +* Mon Apr 09 2001 - werner@suse.de +- Make it work +* Fri Apr 06 2001 - werner@suse.de +- Use own tmac groff files to avoid page headers and footers + on ttys only +* Tue Mar 20 2001 - werner@suse.de +- Avoid deleting of data bases if we've newer version around +* Mon Mar 19 2001 - werner@suse.de +- Remove data bases at install time +* Mon Mar 19 2001 - werner@suse.de +- Update to 2.3.17-3.2 + * Port our patches and bugfixes to this new version + * Change the wrapper to use setre(r|g)id and use + this wrapper suid root +* Thu Feb 08 2001 - werner@suse.de +- Avoid error() call without format +* Mon Dec 11 2000 - werner@suse.de +- Correct depth level of patch +* Mon Dec 11 2000 - werner@suse.de +- Make `setlocale'zing more reliable accordingly to Andreas + Jaeger. +* Sat Dec 09 2000 - mfabian@suse.de +- replaced all setlocale(LC_MESSAGES,"") with + setlocale(LC_MESSAGES,"") *and* setlocale(LC_CTYPE,""). + After the upgrade to Glibc 2.2, 8 bit characters in the + French, Czech, and Japanese messages were displayed as "?". + Changing the setlocale calls in the above way fixed it. + Messages in all languages now display correctly again. + First I replaced all setlocale(LC_MESSAGES,"") by + setlocale(LC_ALL,""), but this causes problems. In that case, + the messages display correctly, but "LANG=ja_JP man man" + incorrectly displays the English manpage. Strange. + When using both setlocale(LC_MESSAGES,"") *and* + setlocale(LC_CTYPE,"") but not setlocale(LC_ALL,""), + everything seems to work correctly. +* Tue Dec 05 2000 - bk@suse.de +- added %%dir /usr/share/man/{de,es,it,ja}+man[158] to file list +* Fri Sep 15 2000 - pthomas@suse.de +- Add 3C++, 3C++std and 8C++ to the list of man sections, the + Compaq man pages for C++ use these. +* Thu May 25 2000 - werner@suse.de +- Fix the man path problem (hint from Michael Reichardt + ) +- Make mandir depending on the RPM macro %%_mandir +- Make zsoemlin zlib interface functions more compatible to cookie + I/O functions (type changed in new glibc 2.1 and higher) +* Thu Mar 16 2000 - werner@suse.de +- Make lexgrog knowing the japanese multibyte string of section NAME +- Make flex use memory aligned tables. +* Wed Mar 08 2000 - werner@suse.de +- Security fix in straycats: Check if we got a temporary file! +* Thu Mar 02 2000 - ro@suse.de +- added usr/share/man/allman +* Tue Dec 14 1999 - werner@suse.de +- New version 2.3.10-69s + * better NLS support +- Add all languages to /etc/manpatch.config before english default +- Make mandb usable only for root (avoid DOS attacks) +* Fri Nov 26 1999 - ro@suse.de +- printout full path-name on check +* Fri Nov 26 1999 - ro@suse.de +- patched configure.in to prefer gdbm +* Mon Sep 13 1999 - bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Mon Sep 06 1999 - ro@suse.de +- removed (now) conflicting redeclarations from zsoelim.l +* Thu Sep 02 1999 - werner@suse.de +- Make man.c work again +- Use RPM_OPT_FLAGS +* Mon Aug 30 1999 - werner@suse.de +- Few simple changes + * drop privileges before chdir back into current directory + * do not search for local man page if not given `-l' +* Mon Jul 19 1999 - bs@suse.de +- fixed file list (/var/cache/man) +* Thu Jul 15 1999 - werner@suse.de +- Don't use carriage return but newline in messages. +* Wed Jul 14 1999 - kukuk@suse.de +- Fix %%pre section (use rm -rf) +* Mon Jul 12 1999 - werner@suse.de +- Add allman sub tree to fsstnd tree +* Fri Jul 09 1999 - ro@suse.de +- fixed filelist +* Tue Jul 06 1999 - werner@suse.de +- Update to debian version 2.3.10-69i + * Change from /var/catman/ to /var/cache/man/ + * Make /usr/share/man/ possible + * Buildin NLS support +- Fix some debian bugs (sig handlers!) +- Add SuSE bug fixes (sig handler) and zlib feature +* Wed Jun 30 1999 - werner@suse.de +- First changes for SuSE 6.2 + * Use fopencookie in zsoelim if glibc 2.1 or higher to avoid any + possible link attack in /tmp/ + * Kill all possible childs (e.g. gunzip) of zsoelim for glibc 2.0 + to be able to unlink the temporary files during signal handling. + * Use better sig and exit handling +* Fri Jun 04 1999 - werner@suse.de +- Fix security leak in zsoelim +- Set sig and exit handler for removing temporary files +- ToDo: use libz instead of gzip +* Mon May 03 1999 - ro@suse.de +- removed forgotten debug message +* Thu Mar 11 1999 - werner@suse.de +- Use -Tlatin1 if eqn is geqn +- Remove the index.bt's in /var/catman before being installed +- Support stupid manual pages using .\" instead of '\" for + preprocessor cockies +* Thu Mar 11 1999 - werner@suse.de +- Use db2 if available +* Wed Mar 10 1999 - werner@suse.de +- Work around of a buffer/pointer cludge of strncat and strncpy + (glibc/axp) +- Make CAT_FILE work +- ToDo: libdb1 is broken on axp +* Wed Feb 10 1999 - werner@suse.de +- Fix the SIGHUP/SIGTERM bug +- Use seteuid for LINUX_VERSION_CODE >= ((1<<16)+(1<<8)+37) +- Remove temp files for man -l even if signaled +- Fix some more possible SIGSEGV's +* Tue Sep 29 1998 - ro@suse.de +- restarted from stable-man: + use usr/include/db1 and libdb1 for db lib + added HAVE_STRSEP to include/config.h.in (this file is broken) + libdb/Makefile.in, src/Makefile.in : removed -I- from CFLAGS +* Fri Aug 07 1998 - bs@suse.de +- added catman dirs for es, fr & it to file list. +* Thu Aug 06 1998 - bs@suse.de +- added es, fr & it. +* Wed Jul 15 1998 - bs@suse.de +- fixed /usr/man/allman/de +* Thu Apr 23 1998 - werner@suse.de +- Fix preprocessor handling: + was missed since libz was used instead of gzip -dc +* Thu Mar 19 1998 - werner@suse.de +- Use lib(g)z for mandb + * no temporary nroff files for parsing of the manual pages + * handle only the first 4096 bytes from the first .SH down + * now zsoelim gets the gezipped man page without extension + instead a temporary nroff file + * extend lexgrog.l-2.4a to catch most pages as possible + * add -funroll-loop to the compile options, use -O2 +* Fri Jun 06 1997 - bs@suse.e +- added allman stuff diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/sysconfig.cron-man b/sysconfig.cron-man new file mode 100644 index 0000000..de32513 --- /dev/null +++ b/sysconfig.cron-man @@ -0,0 +1,23 @@ +## Path: System/Cron/Man +## Description: cron configuration for man utility +## Type: yesno +## Default: yes +# +# Should mandb and whatis be recreated by cron.daily ("yes" or "no") +# +REINIT_MANDB=yes + +## Type: yesno +## Default: yes +# +# Should old preformatted man pages (in /var/catman) be deleted? (yes/no) +# +DELETE_OLD_CATMAN=yes + +## Type: integer +## Default: 7 +# +# How long should old preformatted man pages be kept before deletion? (days) +# +CATMAN_ATIME=7 +