[man-db] - resolves: #833312 update to 2.6.2 - resolves: #657409 fixed warning when invoking col by the m
pschiffe
pschiffe at fedoraproject.org
Tue Jul 10 18:23:10 UTC 2012
commit 11f6dece83e11ae7fb3888da10de37a9c3f7f04b
Author: Peter Schiffer <pschiffe at redhat.com>
Date: Tue Jul 10 20:22:20 2012 +0200
- resolves: #833312
update to 2.6.2
- resolves: #657409
fixed warning when invoking col by the mandb program in cron
- resolves: #829935
enabled support for man pages compressed with lzip
- resolves: #821778
added virtual provides for bundled gnulib library
- resolves: #824825
apropos returns correct exit code for invalid man page
.gitignore | 2 +-
man-db-2.6.1-locale-fallback.patch | 31 +++++++++++++
man-db-2.6.2-gnulib.patch | 86 ++++++++++++++++++++++++++++++++++++
man-db.spec | 39 ++++++++++++-----
sources | 2 +-
5 files changed, 147 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2ce497b..2999bce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/man-db-2.6.1.tar.gz
+/man-db-2.6.2.tar.xz
diff --git a/man-db-2.6.1-locale-fallback.patch b/man-db-2.6.1-locale-fallback.patch
new file mode 100644
index 0000000..7a81d78
--- /dev/null
+++ b/man-db-2.6.1-locale-fallback.patch
@@ -0,0 +1,31 @@
+diff -upr man-db-2.6.1.orig/lib/encodings.c man-db-2.6.1/lib/encodings.c
+--- man-db-2.6.1.orig/lib/encodings.c 2011-05-31 02:03:02.000000000 +0200
++++ man-db-2.6.1/lib/encodings.c 2012-06-15 18:32:37.393496286 +0200
+@@ -585,14 +585,23 @@ char *find_charset_locale (const char *c
+ if (STREQ (charset, get_locale_charset ()))
+ return NULL;
+
+- supported = fopen (supported_path, "r");
+- if (!supported)
+- return NULL;
+-
+ saved_locale = setlocale (LC_CTYPE, NULL);
+ if (saved_locale)
+ saved_locale = xstrdup (saved_locale);
+
++ supported = fopen (supported_path, "r");
++ if (!supported) {
++ if (strlen (charset) >= (size_t) 5
++ && strncmp (charset, "UTF-8", (size_t) 5) == 0) {
++ locale = "en_US.UTF-8";
++ if (setlocale (LC_CTYPE, locale)) {
++ setlocale (LC_CTYPE, saved_locale);
++ return locale;
++ }
++ }
++ return NULL;
++ }
++
+ while (getline (&line, &n, supported) >= 0) {
+ const char *space = strchr (line, ' ');
+ if (space) {
diff --git a/man-db-2.6.2-gnulib.patch b/man-db-2.6.2-gnulib.patch
new file mode 100644
index 0000000..c36447e
--- /dev/null
+++ b/man-db-2.6.2-gnulib.patch
@@ -0,0 +1,86 @@
+diff -upr man-db-2.6.2.orig/gnulib/lib/stdio.in.h man-db-2.6.2/gnulib/lib/stdio.in.h
+--- man-db-2.6.2.orig/gnulib/lib/stdio.in.h 2012-06-18 06:11:22.000000000 +0200
++++ man-db-2.6.2/gnulib/lib/stdio.in.h 2012-06-19 15:29:56.812604417 +0200
+@@ -698,26 +698,14 @@ _GL_WARN_ON_USE (getline, "getline is un
+ # endif
+ #endif
+
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef gets
+-# define gets rpl_gets
+-# endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-# undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+- so any use of gets warrants an unconditional warning. Assume it is
+- always declared, since it is required by C89. */
++ so any use of gets warrants an unconditional warning; besides, C11
++ removed it. */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+
+-
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+ struct obstack;
+ /* Grow an obstack with formatted output. Return the number of
+@@ -1053,9 +1041,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is
+ # endif
+ #endif
+
+-/* Some people would argue that sprintf should be handled like gets
+- (for example, OpenBSD issues a link warning for both functions),
+- since both can cause security holes due to buffer overruns.
++/* Some people would argue that all sprintf uses should be warned about
++ (for example, OpenBSD issues a link warning for it),
++ since it can cause security holes due to buffer overruns.
+ However, we believe that sprintf can be used safely, and is more
+ efficient than snprintf in those safe cases; and as proof of our
+ belief, we use sprintf in several gnulib modules. So this header
+diff -upr man-db-2.6.2.orig/gnulib/m4/stdio_h.m4 man-db-2.6.2/gnulib/m4/stdio_h.m4
+--- man-db-2.6.2.orig/gnulib/m4/stdio_h.m4 2012-06-18 06:11:25.000000000 +0200
++++ man-db-2.6.2/gnulib/m4/stdio_h.m4 2012-06-19 15:29:56.812604417 +0200
+@@ -1,4 +1,4 @@
+-# stdio_h.m4 serial 40
++# stdio_h.m4 serial 41
+ dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -18,7 +18,6 @@ AC_DEFUN([gl_STDIO_H],
+ GNULIB_GETC=1
+ GNULIB_GETCHAR=1
+ GNULIB_FGETS=1
+- GNULIB_GETS=1
+ GNULIB_FREAD=1
+ dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
+ dnl "expected source file, required through AC_LIBSOURCES, not found". It is
+@@ -72,10 +71,10 @@ AC_DEFUN([gl_STDIO_H],
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+- dnl guaranteed by C89.
++ dnl guaranteed by both C89 and C11.
+ gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+- ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat
+- snprintf tmpfile vdprintf vsnprintf])
++ ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
++ renameat snprintf tmpfile vdprintf vsnprintf])
+ ])
+
+ AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
+@@ -113,7 +112,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
+ GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
+ GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
+ GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
+- GNULIB_GETS=0; AC_SUBST([GNULIB_GETS])
+ GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
+ GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])
diff --git a/man-db.spec b/man-db.spec
index c3e0a90..cd20da0 100644
--- a/man-db.spec
+++ b/man-db.spec
@@ -1,26 +1,33 @@
%global cache /var/cache/man
+%global gnulib_ver 20120404-stable
Summary: Tools for searching and reading man pages
Name: man-db
-Version: 2.6.1
-Release: 4%{?dist}
+Version: 2.6.2
+Release: 1%{?dist}
# project man-db GPLv2+
# Gnulib part GPLv3+
License: GPLv2+ and GPLv3+
Group: System Environment/Base
URL: http://www.nongnu.org/man-db/
-Source0: http://mirrors.igsobe.com/nongnu/man-db/%{name}-%{version}.tar.gz
+
+Source0: http://download.savannah.gnu.org/releases/man-db/%{name}-%{version}.tar.xz
Source1: man-db.crondaily
Source2: man-db.sysconfig
+
# Resolves: #655385 - use old format of nroff output
Patch1: man-db-2.5.9-sgr.patch
Patch2: man-db-2.6.1-wildcards.patch
Patch3: man-db-2.6.1-so-links.patch
-Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch4: man-db-2.6.1-locale-fallback.patch
+Patch5: man-db-2.6.2-gnulib.patch
+
Obsoletes: man < 2.0
-Provides: man-pages-reader = %{version}
Provides: man = %{version}
-BuildRequires: less
+Provides: man-pages-reader = %{version}
+# FPC exception for gnulib - copylib - https://fedorahosted.org/fpc/ticket/174
+Provides: bundled(gnulib) = %{gnulib_ver}
+
Requires: less, coreutils, grep, groff-base, gzip
BuildRequires: gdbm-devel, groff, gettext, zlib-devel, libtool
BuildRequires: libpipeline-devel, autoconf, gettext-devel, automake
@@ -38,17 +45,18 @@ manual pages.
%patch1 -p1 -b .sgr
%patch2 -p1 -b .wildcards
%patch3 -p1 -b .so-links
+%patch4 -p1 -b .locale-fallback
+%patch5 -p1 -b .gnulib-fix
%build
./autogen.sh
%configure\
--with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \
- --disable-setuid --with-browser=elinks
+ --disable-setuid --with-browser=elinks --with-lzip=lzip
make CC="%{__cc} %{optflags}" %{?_smp_mflags} V=1
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} \
INSTALL='install -p'
@@ -74,9 +82,6 @@ install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/man-db
%find_lang %{name}
%find_lang %{name}-gnulib
-%clean
-rm -rf $RPM_BUILD_ROOT
-
# update the man db after install or update
%post
/bin/bash %{_sysconfdir}/cron.daily/man-db.cron
@@ -116,6 +121,18 @@ rm -rf $RPM_BUILD_ROOT
%lang(it) %{_datadir}/man/it/man*/*
%changelog
+* Tue Jul 10 2012 Peter Schiffer <pschiffe at redhat.com> - 2.6.2-1
+- resolves: #833312
+ update to 2.6.2
+- resolves: #657409
+ fixed warning when invoking col by the mandb program in cron
+- resolves: #829935
+ enabled support for man pages compressed with lzip
+- resolves: #821778
+ added virtual provides for bundled gnulib library
+- resolves: #824825
+ apropos returns correct exit code for invalid man page
+
* Tue Apr 24 2012 Peter Schiffer <pschiffe at redhat.com> - 2.6.1-4
- related: #693458
updated patch for .so links because previous one wasn't working very well
diff --git a/sources b/sources
index 04fc5e9..894c562 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-79658e8695c7b9b3be1ee340d78a4692 man-db-2.6.1.tar.gz
+647c48d46c464419185d031d04481ee5 man-db-2.6.2.tar.xz
More information about the scm-commits
mailing list