Accepting request 1118949 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1118949
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/man?expand=0&rev=97
This commit is contained in:
Ana Guerrero 2023-10-20 21:16:25 +00:00 committed by Git OBS Bridge
commit d571a90990
8 changed files with 128 additions and 88 deletions

BIN
man-db-2.11.2.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmO7P18ACgkQOTWH2X2G
UAsAVxAAjbkxD9Ji+FhO8VoJ40FnSlK7vwaX+1REswSBmaSCmrt7ey9s60r6sAcM
OjphmTMHNJqxmBS/fsvKnuRiaUv/a+PPKOxEZg85F9uUmArnDphaTH9PzXPpxHgV
jwda7v3BSxPV0YjFyj1FzfpTQjhZX9+0NwVUXUga0ViCExi8yAk3lS+Vhkz3JdkK
PWY9QjD7GwH5G+8ojHOZralBNCEQdcej9/3B1FGPq9EoZ270emybJBmHAF9K+2Y9
2jH4HWcSjhwCAxEXYkzmBtmkYvfE4HdDTCzo5TR51PflizD2RylIYmNO4vdyETIP
KPYK2fzpkSODTUgeSfLfupv1sq9MqIDLEtpWLgZT5BTJCHjG14KAgDfnUmqZB2Iv
w4wHyfAJ+7MrVqCHbLtjcdVVfAxDajhrRLwZZkQrd/lT6ykZ0q0wQjXP+xL2yTxR
70lRgMFnEzezHtiEiW2xjWQDehNiQ+7NK1vNUgnugXBdsb7MO6dwtL/30JMtapOA
60vlGlDejGvfae9OYeNCQc/b7GYJwFQ7vQ3iM2c1PVF1KfaqY71WrrC3hP03gs9j
EzmrA9xLdfkKGmALD8579KukEiWitcIikm8NlkQ/0mLF7CKIjXVSJmGjz4xrsDAg
zN2qdp8cJG6R4PmKQdCFS+YNlBp07xkqO/CCqKjBpLNBN+r9lAQ=
=uREj
-----END PGP SIGNATURE-----

3
man-db-2.12.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:415a6284a22764ad22ff0f66710d853be7790dd451cd71436e3d25c74d996a95
size 1987444

16
man-db-2.12.0.tar.xz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmUPU7oACgkQOTWH2X2G
UAvabRAAg0khOyBa7rrJmTyasc3yfOhInwjGjn9ootqTXXIuexEU+fHaVONBG9ji
NGzBrZKeEoW7VXxdbNP1uowFGpqUeqbblBCypMImLwa/RZ7lcvmmJh2mAwkqlYzy
6WlB02WItllofWLoGB/uTLPed4NmHn1H1ilN8cLEu3GpawV6+CiXu41G40WscVQp
sVtOkRgOky1qlpv1f1qlhBCoftBZfXghg6Jo9E32STddOFg59JzBKxRSoKq07qMm
i2bi+wwZHGhSvorhwKFqACw4JhwPapU62G77gWwgJ2bdls7j1fvJauosmBdOQ4ti
OpV4nUAUgO62FqzH46j4GDNuf8sPQq4LVfqE/KREBiBGA/ymip8aqlup7gVpoyKZ
ks3xibRVtKMMjOrCRE/qQmyyZBmsYYx8gPFSd4TGFLaQLBp8BLorLoUC7obZz/0H
aI/C1Kc1rkt9DJzAyPTWzvS8SV2QxRzojzJsgnjosUGucktGLWYZ39do1OxUQxi+
eO+HDxPoOFS9c0OcFQIu2rle2vt/C4z+3UZEx0lM/QRIPTH6Onw6vZlJn2/Kazis
VTcK9JZPB5/HYu2r59cgZ6MdNkh8ls1h4K34dnpafoHL4/hevUskSSDy2rs0i99s
TvoMTfDOYz872QaKWHkHbzUgOCX+v29FV12f7xR/GZtcy6CsFXw=
=vkB0
-----END PGP SIGNATURE-----

View File

@ -12,8 +12,10 @@
src/ult_src.c | 9 ++++-
11 files changed, 235 insertions(+), 47 deletions(-)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac 2023-08-15 08:31:31.135097942 +0000
+++ b/configure.ac
@@ -302,6 +302,14 @@ fi
MAN_CHECK_PROGS([eqn], [EQN], [use EQN to preprocess equations], [eqn geqn])
@ -47,8 +49,10 @@
if test -z "$gzip"
then
compressor="$compress -c"
Index: b/lib/security.c
===================================================================
--- a/lib/security.c
+++ b/lib/security.c 2023-08-15 08:31:31.135097942 +0000
+++ b/lib/security.c
@@ -80,6 +80,11 @@ static void gripe_set_euid (void)
fatal (errno, _("can't set effective uid"));
}
@ -93,8 +97,10 @@
#endif /* MAN_OWNER */
}
--- a/mk_catdirs
+++ b/mk_catdirs 2023-08-15 08:31:31.135097942 +0000
Index: b/mk_catdirs
===================================================================
--- /dev/null
+++ b/mk_catdirs
@@ -0,0 +1,30 @@
+#!/bin/sh
+
@ -126,8 +132,10 @@
+cd ${OLDPWD}
+
+test "$(id -u)" -ne 0 || chown man:man -R ${CACHE}
Index: b/src/check_mandirs.c
===================================================================
--- a/src/check_mandirs.c
+++ b/src/check_mandirs.c 2023-08-15 08:31:31.139097869 +0000
+++ b/src/check_mandirs.c
@@ -381,7 +381,7 @@ void chown_if_possible (const char *path
#endif /* MAN_OWNER */
@ -213,8 +221,10 @@
content = MYDBM_FETCH (dbf, key);
if (!MYDBM_DPTR (content)) {
nextkey = MYDBM_NEXTKEY (dbf, key);
Index: b/src/lexgrog.l
===================================================================
--- a/src/lexgrog.l
+++ b/src/lexgrog.l 2023-08-15 08:33:23.053105426 +0000
+++ b/src/lexgrog.l
@@ -70,7 +70,7 @@
#include "manconv.h"
#include "manconv_client.h"
@ -350,8 +360,10 @@
{next}{blank_eol}+[-\\]-{blank}* |
{next}{blank_eol}*[-\\]-{blank}+ |
{bol}\.Nd{blank}* {
Index: b/src/man.c
===================================================================
--- a/src/man.c
+++ b/src/man.c 2023-08-15 08:45:27.956189368 +0000
+++ b/src/man.c
@@ -56,6 +56,7 @@
#include <time.h>
#include <sys/types.h>
@ -360,7 +372,7 @@
#include "argp.h"
#include "attribute.h"
@@ -116,6 +117,8 @@
@@ -118,6 +119,8 @@
#ifdef MAN_OWNER
extern uid_t ruid;
extern uid_t euid;
@ -369,7 +381,7 @@
#endif /* MAN_OWNER */
/* the default preprocessor sequence */
@@ -239,10 +242,10 @@ static int first_arg;
@@ -241,10 +244,10 @@ static int first_arg;
#ifdef MAN_CATS
static char *tmp_cat_file; /* for open_cat_stream(), close_cat_stream() */
static bool created_tmp_cat; /* dto. */
@ -381,7 +393,7 @@
# ifdef TROFF_IS_GROFF
static bool ditroff;
@@ -1561,6 +1564,18 @@ static void setenv_less (pipecmd *cmd, c
@@ -1576,6 +1579,18 @@ static void setenv_less (pipecmd *cmd, c
free (less_opts);
}
@ -400,7 +412,7 @@
static void add_output_iconv (pipeline *p,
const char *source, const char *target)
{
@@ -1691,6 +1706,8 @@ static pipeline *make_display_command (c
@@ -1706,6 +1721,8 @@ static pipeline *make_display_command (c
if (pager_cmd) {
setenv_less (pager_cmd, title);
@ -409,7 +421,7 @@
pipeline_command (p, pager_cmd);
}
pipeline_ignore_signals (p, 1);
@@ -1701,7 +1718,7 @@ static pipeline *make_display_command (c
@@ -1716,7 +1733,7 @@ static pipeline *make_display_command (c
return p;
}
@ -418,7 +430,7 @@
/* return a (malloced) temporary name in cat_file's directory */
static char *tmp_cat_filename (const char *cat_file)
{
@@ -1729,7 +1746,6 @@ static char *tmp_cat_filename (const cha
@@ -1744,7 +1761,6 @@ static char *tmp_cat_filename (const cha
return name;
}
@ -426,7 +438,7 @@
/* If delete unlink tmp_cat, else commit tmp_cat to cat_file.
Return non-zero on error.
*/
@@ -1802,6 +1818,7 @@ static int commit_tmp_cat (const char *c
@@ -1817,6 +1833,7 @@ static int commit_tmp_cat (const char *c
return status;
}
@ -434,7 +446,7 @@
/* TODO: This should all be refactored after work on the decompression
* library is complete.
@@ -1838,7 +1855,6 @@ static void cleanup_unlink (void *arg)
@@ -1853,7 +1870,6 @@ static void cleanup_unlink (void *arg)
}
#ifdef MAN_CATS
@ -442,7 +454,7 @@
/* Return pipeline to write formatted manual page to for saving as cat file. */
static pipeline *open_cat_stream (const char *cat_file, const char *encoding)
{
@@ -2070,6 +2086,7 @@ static void format_display (decompress *
@@ -2085,6 +2101,7 @@ static void format_display (decompress *
regain_effective_privs ();
}
@ -450,15 +462,15 @@
/* "Display" a page in catman mode, which amounts to saving it. */
/* TODO: merge with format_display_and_save? */
static void display_catman (const char *cat_file, decompress *d,
@@ -2115,6 +2132,7 @@ static void display_catman (const char *
@@ -2130,6 +2147,7 @@ static void display_catman (const char *
pop_cleanup (cleanup_unlink, tmpcat);
free (tmpcat);
}
+#endif /* MAN_CATS */
#ifndef TROFF_IS_GROFF
static void disable_hyphenation (void *data MAYBE_UNUSED)
{
@@ -2317,7 +2335,7 @@ static int display (const char *dir, con
@@ -2349,7 +2367,7 @@ static int display (const char *dir, con
format_cmd = NULL;
decomp_errno = errno;
}
@ -467,7 +479,7 @@
/* Get modification time, for commit_tmp_cat(). */
if (man_file && *man_file) {
struct stat stb;
@@ -2327,7 +2345,7 @@ static int display (const char *dir, con
@@ -2359,7 +2377,7 @@ static int display (const char *dir, con
} else
man_modtime = get_stat_mtime (&stb);
}
@ -476,7 +488,7 @@
display_to_stdout = troff;
#ifdef TROFF_IS_GROFF
if (htmlout || gxditview)
@@ -2468,6 +2486,7 @@ static int display (const char *dir, con
@@ -2500,6 +2518,7 @@ static int display (const char *dir, con
}
if (printed)
putchar ('\n');
@ -484,7 +496,7 @@
} else if (catman) {
if (format) {
if (!save_cat)
@@ -2480,6 +2499,7 @@ static int display (const char *dir, con
@@ -2512,6 +2531,7 @@ static int display (const char *dir, con
format_cmd,
formatted_encoding);
}
@ -492,7 +504,7 @@
} else if (format) {
/* no cat or out of date */
pipeline *disp_cmd;
@@ -4011,17 +4031,20 @@ static int local_man_loop (const char *a
@@ -4050,17 +4070,20 @@ static int local_man_loop (const char *a
/* Check that the file exists and isn't e.g. a directory */
if (stat (argv, &st)) {
error (0, errno, "%s", argv);
@ -513,7 +525,7 @@
return NOT_FOUND;
}
@@ -4085,6 +4108,11 @@ executable_out:
@@ -4124,6 +4147,11 @@ executable_out:
argv_abs = xstrdup (argv);
}
lang = lang_dir (argv_abs);
@ -525,7 +537,7 @@
free (argv_abs);
if (!display (NULL, argv, NULL, argv_base, NULL)) {
if (local_mf)
@@ -4340,7 +4368,16 @@ int main (int argc, char *argv[])
@@ -4379,7 +4407,16 @@ int main (int argc, char *argv[])
umask (022);
init_locale ();
@ -543,7 +555,7 @@
/* Use LANGUAGE only when LC_MESSAGES locale category is
* neither "C" nor "POSIX". */
if (internal_locale && strcmp (internal_locale, "C") &&
@@ -4385,7 +4422,16 @@ int main (int argc, char *argv[])
@@ -4424,7 +4461,16 @@ int main (int argc, char *argv[])
if (external)
do_extern (argc, argv);
@ -560,8 +572,10 @@
/* close this locale and reinitialise if a new locale was
issued as an argument or in $MANOPT */
Index: b/src/man_db.conf.in
===================================================================
--- a/src/man_db.conf.in
+++ b/src/man_db.conf.in 2023-08-15 08:31:31.139097869 +0000
+++ b/src/man_db.conf.in
@@ -20,6 +20,14 @@
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
@ -600,8 +614,10 @@
MANDB_MAP @snapdir@/man /var/cache/man/snap
#
#---------------------------------------------------------
Index: b/src/mandb.c
===================================================================
--- a/src/mandb.c
+++ b/src/mandb.c 2023-08-15 08:35:07.783240325 +0000
+++ b/src/mandb.c
@@ -213,6 +213,8 @@ struct dbpaths {
#ifdef MAN_OWNER
extern uid_t ruid;
@ -638,25 +654,39 @@
dbpaths_chown_if_possible (dbpaths);
#endif /* MAN_OWNER */
reorganize (catpath, global_manpath);
@@ -896,8 +902,14 @@ int main (int argc, char *argv[])
@@ -896,14 +902,20 @@ int main (int argc, char *argv[])
#ifdef MAN_OWNER
man_owner = get_man_owner ();
- if (!user && euid != 0 && euid != man_owner->pw_uid)
- if (!user && euid != 0 && euid != man_owner->pw_uid) {
- user = true;
- if (!quiet)
- fprintf (stderr,
- _("Only the '%s' user can create or update "
- "system-wide databases; acting as if the "
- "--user-db option was used.\n"),
- man_owner->pw_name);
+ if (!user) {
+ if (!ruid && euid != man_owner->pw_uid) {
+ seteuid(man_owner->pw_uid);
+ euid = geteuid();
+ }
+ if (euid != man_owner->pw_uid)
+ if (euid != man_owner->pw_uid) {
+ user = true;
+ }
+ if (!quiet)
+ fprintf (stderr,
+ _("Only the '%s' user can create or update "
+ "system-wide databases; acting as if the "
+ "--user-db option was used.\n"),
+ man_owner->pw_name);
+ }
}
#endif /* MAN_OWNER */
read_config_file (user);
Index: b/src/manp.c
===================================================================
--- a/src/manp.c
+++ b/src/manp.c 2023-08-15 08:31:31.139097869 +0000
+++ b/src/manp.c
@@ -907,7 +907,7 @@ static char *def_path (enum config_flag
/* If we have complete config file failure... */
@ -666,8 +696,10 @@
return manpath;
}
Index: b/src/straycats.c
===================================================================
--- a/src/straycats.c
+++ b/src/straycats.c 2023-08-15 08:31:31.139097869 +0000
+++ b/src/straycats.c
@@ -38,6 +38,7 @@
#include <sys/types.h>
#include <sys/stat.h>
@ -676,8 +708,10 @@
#include <dirent.h>
#include "canonicalize.h"
Index: b/src/ult_src.c
===================================================================
--- a/src/ult_src.c
+++ b/src/ult_src.c 2023-08-15 08:37:50.940333586 +0000
+++ b/src/ult_src.c
@@ -160,10 +160,15 @@ static char *find_include_directive (cha
}
decompress_start (decomp);

View File

@ -1,29 +0,0 @@
From b12ffb9df7a6a8956b08206c36be70fac78508bd Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Thu, 20 Jul 2023 00:18:59 +0100
Subject: [PATCH] Update warning regex for groff 1.23.0
Part of https://gitlab.com/man-db/man-db/-/issues/25.
* man/check-man: groff 1.23.0 says "cannot break line" rather than
"can't break line"; update regular expression.
---
man/check-man | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/check-man b/man/check-man
index a58b7f9d..f8985a0d 100755
--- a/man/check-man
+++ b/man/check-man
@@ -31,7 +31,7 @@ errors="$(LC_ALL=C MANWIDTH=80 MAN_KEEP_FORMATTING=1 "$top_builddir/libtool" \
# Indeed, even for other languages we're going to get "cannot adjust line"
# if %manpath_config_file% expands to something long. Hmm. We'll just ignore
# this across the board for now.
-errors="$(echo "$errors" | $EGREP -v "(cannot adjust line|can't break line)")" || true
+errors="$(echo "$errors" | $EGREP -v "(cannot adjust line|(can't|cannot) break line)")" || true
if [ "$code" != 0 ]; then
echo "man -E UTF-8 -l $1 failed with exit status $code and error output:"
--
GitLab

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Sun Oct 1 12:19:14 UTC 2023 - Antonio Teixeira <antonio.teixeira@suse.com>
- Update to 2.12.0:
* Fix some manual page portability issues with groff 1.23.0.
* Fix test failures when a working `iconv` is not available.
* Ensure that timestamps read from the database can go past the year 2038,
even on systems where this is not the default.
* Fix `manpath` not parsing `PATH` entries with trailing slash correctly
for guessing `MANPATH` entries.
* More accurately document the behaviour of passing file names as arguments
to `man` without the `-l`/`--local-file` option.
* Avoid duplicate cleanup of old cat pages by both `man-db.service` and
`systemd-tmpfiles-clean.service`.
Improvements:
* Update system call lists in `seccomp` sandbox from `systemd`.
* Upgrade to Gnulib `stable-202307`.
* Work around the Firebuild accelerator in `seccomp` sandbox: if this is in
use then we need to allow some socket-related system calls.
* `man -K` now deduplicates search results that point to the same page.
* Warn if `mandb` drops to `--user-db` mode due to running as the wrong
user.
* Change section title recommendations in `man(1)` to mention `STANDARDS`
rather than `CONFORMING TO`, in line with `man-pages(7)`.
* Add a `STANDARDS` section to `man(1)` itself.
* Document that `man -K` may suffer from false negatives as well as false
positives.
* Take advantage of newer `groff` facilities to implement `man
--no-hyphenation` and `man --no-justification`, if available.
* `man -f` and `man -k` now pass any `-r`/`--regex` or `-w`/`--wildcard`
options on to `whatis` and `apropos` respectively.
* Always pass a line length to `nroff`, even if we believe that it matches
the default.
* Allow disabling `groff` warnings via `man --warnings`, by prefixing a
warning name with `!`.
- Drop man-db-groff-1.23.0-warnings.patch
- Refresh man-db-2.9.4.patch
-------------------------------------------------------------------
Fri Sep 8 19:48:53 UTC 2023 - Antonio Teixeira <antonio.teixeira@suse.com>

View File

@ -26,7 +26,7 @@
%global optflags %{optflags} %{**}
%bcond_without sdtimer
Name: man
Version: 2.11.2
Version: 2.12.0
Release: 0
Summary: A Program for Displaying man Pages
License: GPL-2.0-or-later
@ -59,8 +59,6 @@ Patch9: man-db-2.6.3-man0.dif
Patch10: man-db-2.9.4-alternitive.dif
# PATCH-FEATURE-OPENSUSE -- Propose to read man pages online
Patch12: man-propose-online.patch
# PATCH-FIX-UPSTREAM -- Update warning regex for groff 1.23.0
Patch13: man-db-groff-1.23.0-warnings.patch
BuildRequires: automake
BuildRequires: flex
BuildRequires: gdbm-devel
@ -111,7 +109,6 @@ printer (using groff).
%patch10 -b .libalernative
rm -f configure
%patch12 -p1 -b .p12
%patch13 -p1 -b .p13
%build
%global optflags %{optflags} -funroll-loops -pipe -Wall