Compare commits
11 Commits
Author | SHA256 | Date | |
---|---|---|---|
e416cc3061 | |||
d80c8157bf | |||
8ab3d09959 | |||
b77cfdbf20 | |||
c3e8577365 | |||
a9a99967ae | |||
a2ceae7578 | |||
59aabc4876 | |||
5d8a6d1ef2 | |||
ca4dcfa67e | |||
21918718d9 |
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ddee249daeb78cf92bab794ccd069cc8b575992265ea20e239e887156e880265
|
|
||||||
size 2041380
|
|
@@ -1,16 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iQIzBAABCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmYPse4ACgkQOTWH2X2G
|
|
||||||
UAvBxw/7BDtS8DeH3qM05clHDjeiG+/qzopxcRJAgw8OV6t3wcHGy34bjPug3qWo
|
|
||||||
BWHyT6jYw6tMJK63pSso5b99acB16uOIx480icEk9U8aOMjyaamat3Rdq2aXnM7t
|
|
||||||
5XybWoGCtIFF9AKJNes7B+SzesjYM6xc1R8YHWu53Ihz9yktVHUtNsQE/aop5tuJ
|
|
||||||
8G+qapUjNPrnytEUHog+Id7uwXx8/fwU/K+nGsYSVNUrXp833TKsUKmgywWoV9ER
|
|
||||||
3mS0Qu558MuWFX91o6hxu3dg0aE86oS8Xn/EaX5V9S0TaVtgvj5XgO+ookZFKMbZ
|
|
||||||
e98j2ZNvWz7vPH9xgAxD7i3/lJJ0UUGLquSAzdFcxKEPjGvhXWdb8AMEMCJJR2VI
|
|
||||||
lwNlu/0jzGuH+IU6UiIBg2bHA3CJ/AlYuqutwtTZluuXQJlUOkMj1KKTMREKlHCP
|
|
||||||
Jqhf5ezC9/Hnv6q+fnRZFKDwYZ2UR844QcS5LA5DIEcTiRV41Ixn1nBPV3MnTfNK
|
|
||||||
UjlaetT5T/xuEXv4yNnE6eLmPyOmFwUD7fd8CBUwX8pA4O41OINKCwp5jOrZvbeZ
|
|
||||||
okIiCdtbT964YymstD4v+DSbMfvEzw41rzPeV3Zt3Nstb6zq3LyCXhXDM5UIl9VA
|
|
||||||
f3J7HWzMtZ4/3L8W0sqUTOSW1A0DwCFYigHjSUyGY6ce/kwD6hE=
|
|
||||||
=5v8w
|
|
||||||
-----END PGP SIGNATURE-----
|
|
60
man-db-2.13.0-no_abort.patch
Normal file
60
man-db-2.13.0-no_abort.patch
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Avoid abort() in regain_effective_privs() if mandb is called by root
|
||||||
|
that is always initialize saved_uid and saved_gid!
|
||||||
|
|
||||||
|
--- gl/lib/idpriv-droptemp.c 2024-08-29 13:17:12.000000000 +0200
|
||||||
|
+++ gl/lib/idpriv-droptemp.c 2024-11-11 09:55:45.539212073 +0100
|
||||||
|
@@ -31,19 +31,24 @@
|
||||||
|
static gid_t saved_gid = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-int
|
||||||
|
-idpriv_temp_drop (void)
|
||||||
|
+void
|
||||||
|
+idpriv_initial (void)
|
||||||
|
{
|
||||||
|
-#if HAVE_GETEUID && HAVE_GETEGID && (HAVE_SETRESUID || HAVE_SETREUID) && (HAVE_SETRESGID || HAVE_SETREGID)
|
||||||
|
- uid_t uid = getuid ();
|
||||||
|
- gid_t gid = getgid ();
|
||||||
|
-
|
||||||
|
/* Find out about the privileged uid and gid at the first call. */
|
||||||
|
if (saved_uid == -1)
|
||||||
|
saved_uid = geteuid ();
|
||||||
|
if (saved_gid == -1)
|
||||||
|
saved_gid = getegid ();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+idpriv_temp_drop (void)
|
||||||
|
+{
|
||||||
|
+#if HAVE_GETEUID && HAVE_GETEGID && (HAVE_SETRESUID || HAVE_SETREUID) && (HAVE_SETRESGID || HAVE_SETREGID)
|
||||||
|
+ uid_t uid = getuid ();
|
||||||
|
+ gid_t gid = getgid ();
|
||||||
|
|
||||||
|
+ idpriv_initial ();
|
||||||
|
/* Drop the gid privilege first, because in some cases the gid privilege
|
||||||
|
cannot be dropped after the uid privilege has been dropped. */
|
||||||
|
|
||||||
|
--- gl/lib/idpriv.h 2024-08-29 13:17:12.000000000 +0200
|
||||||
|
+++ gl/lib/idpriv.h 2024-11-11 09:50:35.047999910 +0100
|
||||||
|
@@ -95,6 +95,9 @@
|
||||||
|
|
||||||
|
/* For approach 3. */
|
||||||
|
|
||||||
|
+/* Initialize internal variable saved_uid as well as saved_gid */
|
||||||
|
+extern void idpriv_initial (void);
|
||||||
|
+
|
||||||
|
/* Drop the uid and gid privileges of the current process in a way that allows
|
||||||
|
them to be restored later.
|
||||||
|
Return 0 if successful, or -1 with errno set upon failure. The recommended
|
||||||
|
--- lib/security.c 2024-11-11 09:10:13.044830286 +0100
|
||||||
|
+++ lib/security.c 2024-11-11 09:51:16.688162468 +0100
|
||||||
|
@@ -138,7 +138,8 @@
|
||||||
|
gripe_set_euid ();
|
||||||
|
uid = ruid;
|
||||||
|
gid = rgid;
|
||||||
|
- }
|
||||||
|
+ } else
|
||||||
|
+ idpriv_initial ();
|
||||||
|
|
||||||
|
priv_drop_count++;
|
||||||
|
#endif /* MAN_OWNER */
|
3
man-db-2.13.1.tar.xz
Normal file
3
man-db-2.13.1.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8afebb6f7eb6bb8542929458841f5c7e6f240e30c86358c1fbcefbea076c87d9
|
||||||
|
size 2110328
|
16
man-db-2.13.1.tar.xz.asc
Normal file
16
man-db-2.13.1.tar.xz.asc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIzBAABCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmgUw78ACgkQOTWH2X2G
|
||||||
|
UAvftQ/+JxYBvnxB8YqOkBer50jBy0yQiQ3MtGus8Y1PxJLr/49vwAjdD5JWZJzV
|
||||||
|
kkxSW8/3qLow0joJtOSalwZMFDP85ykzGm45/PIo/qSJXM8gRlsan99X99ZdFMXd
|
||||||
|
LO2YoTojNXaTtiO4wDWm20HdiVPamf/m0QQcm9+3lUDKh9dxgC44f9dNk9MgNFVC
|
||||||
|
W747Vkt1FLEobtcnLj/8KL0wRRDywJudrOcSkchAvIUUn15OSTwL+8Bco8W5l5hg
|
||||||
|
Qr1TVcjmmwBHyf/lgTaS2D0+qJHSyaO+roO1WuzEAImIMFAu0enxAYl8uqLADgdR
|
||||||
|
OvCHBAm1e4nMOgnAdr4tSb6pL+nW7llgtPNWD0U24JcApFB1MX70D9o1UyIfSUzj
|
||||||
|
z5ZNx4hpYjR3r/m9i/n4C4/dgd437u+Ka8sjDxHDJTp8WjSNqsIPOQMe6RHQx7gj
|
||||||
|
TuUz2dG1FKsUssGcbqrC+KZh2nacmXNLFg2Tn5sjCFvmmhexGIWFbVy0cxxPtPnG
|
||||||
|
5iNRzPidfSYRW+dbCoqOxy1JkSB9AtbGxICXjW8yPA6zRdoMgciW2R1uaBgGxp8H
|
||||||
|
jyb8LqNIv+fuuccLKcdQC6OInF+ak/MwbuqjAxLOaXFPlFbtW6je20ydgonGcGbh
|
||||||
|
a5Mzwnmy5NbxvthYYDMruuGZoggOALwLxrMCdVFKQk1nFfGtXNI=
|
||||||
|
=pOVh
|
||||||
|
-----END PGP SIGNATURE-----
|
@@ -1,54 +0,0 @@
|
|||||||
---
|
|
||||||
lib/encodings.c | 13 +++++++++++--
|
|
||||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- lib/encodings.c
|
|
||||||
+++ lib/encodings.c 2016-12-15 14:07:01.072034899 +0000
|
|
||||||
@@ -227,6 +227,7 @@ static struct charset_entry charset_tabl
|
|
||||||
{ "EUC-CN", "nippon" },
|
|
||||||
{ "EUC-JP", "nippon" },
|
|
||||||
{ "EUC-TW", "nippon" },
|
|
||||||
+ { "GB18030", "nippon" },
|
|
||||||
{ "GBK", "nippon" },
|
|
||||||
# else /* !MULTIBYTE_GROFF */
|
|
||||||
/* If we have a smarter version of groff, this is better dealt with
|
|
||||||
@@ -314,6 +315,7 @@ static struct less_charset_entry less_ch
|
|
||||||
|
|
||||||
#ifdef MULTIBYTE_GROFF
|
|
||||||
{ "CP1251", "windows", NULL },
|
|
||||||
+ { "GB18030", "zh", NULL },
|
|
||||||
{ "EUC-JP", "iso8859", "japanese-ujis" },
|
|
||||||
{ "KOI8-R", "koi8-r", NULL },
|
|
||||||
/* close enough? */
|
|
||||||
@@ -452,6 +454,13 @@ char *get_page_encoding (const char *lan
|
|
||||||
* roff encoding = ISO-8859-15
|
|
||||||
* output encoding = ISO-8859-15
|
|
||||||
* ISO-8859-15 -> groff -Tascii8 -> ISO-8859-15 -> iconv -> UTF-8
|
|
||||||
+ *
|
|
||||||
+ * /usr/share/man/zh_CN.GB18030, locale zh_CN.UTF-8
|
|
||||||
+ * page encoding = GB18030
|
|
||||||
+ * source encoding = GB18030
|
|
||||||
+ * roff encoding = UTF-8
|
|
||||||
+ * output encoding = UTF-8
|
|
||||||
+ * GB18030 -> iconv -> UTF-8 -> groff -Tutf8 -> UTF-8
|
|
||||||
*/
|
|
||||||
const char *get_source_encoding (const char *lang)
|
|
||||||
{
|
|
||||||
@@ -620,7 +629,7 @@ static int compatible_encodings (const c
|
|
||||||
*/
|
|
||||||
if ((STREQ (input, "BIG5") || STREQ (input, "BIG5HKSCS") ||
|
|
||||||
STREQ (input, "EUC-JP") ||
|
|
||||||
- STREQ (input, "EUC-CN") || STREQ (input, "GBK") ||
|
|
||||||
+ STREQ (input, "EUC-CN") || STREQ (input, "GB18030") || STREQ (input, "GBK") ||
|
|
||||||
STREQ (input, "EUC-KR") ||
|
|
||||||
STREQ (input, "EUC-TW")) &&
|
|
||||||
STREQ (output, "UTF-8"))
|
|
||||||
@@ -724,7 +733,7 @@ const char *get_roff_encoding (const cha
|
|
||||||
STRNEQ (ctype, "zh_HK", 5) ||
|
|
||||||
STRNEQ (ctype, "zh_SG", 5) ||
|
|
||||||
STRNEQ (ctype, "zh_TW", 5))
|
|
||||||
- roff_encoding = "UTF-8";
|
|
||||||
+ roff_encoding = source_encoding; /* "UTF-8"; */
|
|
||||||
}
|
|
||||||
#endif /* MULTIBYTE_GROFF */
|
|
||||||
|
|
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
man/man1/man.man1 | 8 ++
|
man/man1/man.man1 | 8 ++
|
||||||
src/man.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
|
src/man.c | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
2 files changed, 186 insertions(+), 2 deletions(-)
|
2 files changed, 188 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
--- man/man1/man.man1
|
--- man/man1/man.man1
|
||||||
+++ man/man1/man.man1 2022-08-17 13:11:29.974677243 +0000
|
+++ man/man1/man.man1 2025-04-07 09:22:13.196358321 +0000
|
||||||
@@ -1246,6 +1246,14 @@ However, some users want to see them any
|
@@ -1237,6 +1237,14 @@ However, some users want to see them any
|
||||||
.RB $ MAN_KEEP_STDERR
|
.RB $ MAN_KEEP_STDERR
|
||||||
is set to any non-empty value, error output will be displayed as usual.
|
is set to any non-empty value, error output will be displayed as usual.
|
||||||
.TP
|
.TP
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
On Linux,
|
On Linux,
|
||||||
.B %man%
|
.B %man%
|
||||||
--- src/man.c
|
--- src/man.c
|
||||||
+++ src/man.c 2022-08-17 13:10:07.436205495 +0000
|
+++ src/man.c 2025-04-07 09:41:34.647095968 +0000
|
||||||
@@ -3671,12 +3671,141 @@ static int locate_page (const char *manp
|
@@ -3658,12 +3658,143 @@ static int locate_page (const char *manp
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +54,8 @@
|
|||||||
+ struct sigaction sa;
|
+ struct sigaction sa;
|
||||||
+ int used = 0x2A;
|
+ int used = 0x2A;
|
||||||
+
|
+
|
||||||
|
+ if (section)
|
||||||
|
+ break;
|
||||||
+ if (findall)
|
+ if (findall)
|
||||||
+ break;
|
+ break;
|
||||||
+ if (external)
|
+ if (external)
|
||||||
@@ -73,7 +75,7 @@
|
|||||||
+
|
+
|
||||||
+ fputs("Man: ", stderr);
|
+ fputs("Man: ", stderr);
|
||||||
+ fputs(_("find all matching manual pages"), stderr);
|
+ fputs(_("find all matching manual pages"), stderr);
|
||||||
+ fputs(" (set MAN_POSIXLY_CORRECT to avoid this)", stderr);
|
+ fputs(" (export MAN_POSIXLY_CORRECT=1 to avoid this)", stderr);
|
||||||
+ fputc('\n', stderr);
|
+ fputc('\n', stderr);
|
||||||
+
|
+
|
||||||
+ lext = NULL;
|
+ lext = NULL;
|
||||||
@@ -102,7 +104,7 @@
|
|||||||
+
|
+
|
||||||
+ sigaction(SIGALRM, &sa, (struct sigaction*)0);
|
+ sigaction(SIGALRM, &sa, (struct sigaction*)0);
|
||||||
+
|
+
|
||||||
+ alarm(7);
|
+ alarm(15);
|
||||||
+ len = read(STDIN_FILENO, reqsect, sizeof(reqsect)-1);
|
+ len = read(STDIN_FILENO, reqsect, sizeof(reqsect)-1);
|
||||||
+ alarm(0);
|
+ alarm(0);
|
||||||
+
|
+
|
||||||
@@ -164,7 +166,7 @@
|
|||||||
global_manpath = is_global_mandir (candp->path);
|
global_manpath = is_global_mandir (candp->path);
|
||||||
if (!global_manpath)
|
if (!global_manpath)
|
||||||
drop_effective_privs ();
|
drop_effective_privs ();
|
||||||
@@ -3698,9 +3827,56 @@ static int display_pages (struct candida
|
@@ -3686,9 +3817,56 @@ static int display_pages (struct candida
|
||||||
regain_effective_privs ();
|
regain_effective_privs ();
|
||||||
|
|
||||||
if (found && !findall)
|
if (found && !findall)
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
config.h.in | 3 +
|
config.h.in | 3 +
|
||||||
configure.ac | 52 ++++++++++++++++++++++++++++++
|
configure.ac | 52 +++++++++++++++++++++++++++++++++
|
||||||
src/decompress.c | 70 ++++++++++++++++++++++++++++++++++++++++-
|
src/decompress.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||||
3 files changed, 124 insertions(+), 1 deletion(-)
|
3 files changed, 138 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
--- config.h.in
|
--- config.h.in
|
||||||
+++ config.h.in 2023-08-15 08:21:20.473974597 +0000
|
+++ config.h.in 2024-11-11 10:43:01.369880933 +0000
|
||||||
@@ -1138,6 +1138,9 @@
|
@@ -1148,6 +1148,9 @@
|
||||||
/* Define to 1 if you have the `z' library (-lz). */
|
/* Define to 1 if you have the `z' library (-lz). */
|
||||||
#undef HAVE_LIBZ
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
#undef HAVE_LIB_BCRYPT
|
#undef HAVE_LIB_BCRYPT
|
||||||
|
|
||||||
--- configure.ac
|
--- configure.ac
|
||||||
+++ configure.ac 2023-08-15 08:21:20.473974597 +0000
|
+++ configure.ac 2024-11-11 10:43:01.369880933 +0000
|
||||||
@@ -35,6 +35,18 @@ MAN_ARG_DEVICE
|
@@ -35,6 +35,18 @@ MAN_ARG_DEVICE
|
||||||
MAN_ARG_DB
|
MAN_ARG_DB
|
||||||
MAN_ARG_CONFIG_FILE
|
MAN_ARG_CONFIG_FILE
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
MAN_ARG_AUTOMATIC_CREATE
|
MAN_ARG_AUTOMATIC_CREATE
|
||||||
MAN_ARG_AUTOMATIC_UPDATE
|
MAN_ARG_AUTOMATIC_UPDATE
|
||||||
MAN_ARG_CATS
|
MAN_ARG_CATS
|
||||||
@@ -401,6 +413,46 @@ AC_DEFINE_UNQUOTED([PROG_UNXZ], ["$unxz"
|
@@ -374,6 +386,46 @@ AC_DEFINE_UNQUOTED([PROG_UNXZ], ["$unxz"
|
||||||
AC_DEFINE_UNQUOTED([PROG_UNLZIP], ["$unlzip"], [Program to use as unlzip.])
|
AC_DEFINE_UNQUOTED([PROG_UNLZIP], ["$unlzip"], [Program to use as unlzip.])
|
||||||
AC_DEFINE_UNQUOTED([PROG_UNZSTD], ["$unzstd"], [Program to use as unzstd.])
|
AC_DEFINE_UNQUOTED([PROG_UNZSTD], ["$unzstd"], [Program to use as unzstd.])
|
||||||
MAN_COMPRESS_LIB([z], [gzopen])
|
MAN_COMPRESS_LIB([z], [gzopen])
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
# Check for various header files and associated libraries.
|
# Check for various header files and associated libraries.
|
||||||
--- src/decompress.c
|
--- src/decompress.c
|
||||||
+++ src/decompress.c 2023-08-15 08:23:12.947968440 +0000
|
+++ src/decompress.c 2024-11-11 10:44:24.036386441 +0000
|
||||||
@@ -40,12 +40,17 @@
|
@@ -40,12 +40,17 @@
|
||||||
|
|
||||||
#include "pipeline.h"
|
#include "pipeline.h"
|
||||||
@@ -104,12 +104,68 @@
|
|||||||
#include "manconfig.h"
|
#include "manconfig.h"
|
||||||
|
|
||||||
#include "compression.h"
|
#include "compression.h"
|
||||||
@@ -189,6 +194,33 @@ static decompress *decompress_try_zlib (
|
@@ -146,7 +151,11 @@ static void decompress_zlib (void *data
|
||||||
|
|
||||||
|
static decompress *decompress_try_zlib (const char *filename)
|
||||||
|
{
|
||||||
|
+#ifdef HAVE_ZIO
|
||||||
|
+ FILE *file;
|
||||||
|
+#else
|
||||||
|
gzFile zlibfile;
|
||||||
|
+#endif
|
||||||
|
/* We only ever call this from the parent process (and don't
|
||||||
|
* currently use threads), and this lets us skip per-file memory
|
||||||
|
* allocation.
|
||||||
|
@@ -154,18 +163,32 @@ static decompress *decompress_try_zlib (
|
||||||
|
static char buffer[MAX_INPROCESS];
|
||||||
|
int len = 0;
|
||||||
|
|
||||||
|
+#ifdef HAVE_ZIO
|
||||||
|
+ file = fzopen(filename, "r");
|
||||||
|
+ if (!file)
|
||||||
|
+ return NULL;
|
||||||
|
+#else
|
||||||
|
zlibfile = gzopen (filename, "r");
|
||||||
|
if (!zlibfile)
|
||||||
|
return NULL;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
while (len < MAX_INPROCESS) {
|
||||||
|
/* Read one more byte than we're prepared to return, in
|
||||||
|
* order to detect EOF at the right position. The "len >=
|
||||||
|
* MAX_INPROCESS" check below catches the boundary case.
|
||||||
|
*/
|
||||||
|
+#ifdef HAVE_ZIO
|
||||||
|
+ int r = fread(buffer + len, sizeof(char), MAX_INPROCESS - len, file);
|
||||||
|
+#else
|
||||||
|
int r = gzread (zlibfile, buffer + len, MAX_INPROCESS - len);
|
||||||
|
+#endif
|
||||||
|
if (r < 0) {
|
||||||
|
+#ifdef HAVE_ZIO
|
||||||
|
+ fclose(file);
|
||||||
|
+#else
|
||||||
|
gzclose (zlibfile);
|
||||||
|
+#endif
|
||||||
|
return NULL;
|
||||||
|
} else if (r == 0)
|
||||||
|
break;
|
||||||
|
@@ -173,7 +196,11 @@ static decompress *decompress_try_zlib (
|
||||||
|
len += r;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef HAVE_ZIO
|
||||||
|
+ fclose(file);
|
||||||
|
+#else
|
||||||
|
gzclose (zlibfile);
|
||||||
|
+#endif
|
||||||
|
if (len >= MAX_INPROCESS)
|
||||||
|
return NULL;
|
||||||
|
/* Copy input data so that we don't have potential data corruption
|
||||||
|
@@ -189,33 +216,86 @@ static decompress *decompress_try_zlib (
|
||||||
# define OPEN_FLAGS_UNUSED MAYBE_UNUSED
|
# define OPEN_FLAGS_UNUSED MAYBE_UNUSED
|
||||||
#endif /* HAVE_LIBZ */
|
#endif /* HAVE_LIBZ */
|
||||||
|
|
||||||
+#ifdef HAVE_ZIO
|
+#ifdef HAVE_ZIO
|
||||||
+
|
|
||||||
+static void decompress_zio (void *data)
|
+static void decompress_zio (void *data)
|
||||||
+{
|
+{
|
||||||
+ const char *what = (const char*)data;
|
+ const char *what = (const char*)data;
|
||||||
@@ -131,65 +187,70 @@
|
|||||||
+ fclose(file);
|
+ fclose(file);
|
||||||
+ return;
|
+ return;
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
+#endif /* HAVE_ZIO */
|
+#endif /* HAVE_ZIO */
|
||||||
+
|
+
|
||||||
+
|
|
||||||
extern man_sandbox *sandbox;
|
|
||||||
|
|
||||||
decompress *decompress_open (const char *filename, int flags OPEN_FLAGS_UNUSED)
|
decompress *decompress_open (const char *filename, int flags OPEN_FLAGS_UNUSED)
|
||||||
@@ -205,6 +237,38 @@ decompress *decompress_open (const char
|
{
|
||||||
|
pipecmd *cmd;
|
||||||
|
pipeline *p;
|
||||||
|
struct stat st;
|
||||||
|
#ifdef HAVE_LIBZ
|
||||||
|
+# ifdef HAVE_ZIO
|
||||||
|
+ char *ext;
|
||||||
|
+# else
|
||||||
|
size_t filename_len;
|
||||||
|
+# endif
|
||||||
|
#endif /* HAVE_LIBZ */
|
||||||
|
- char *ext;
|
||||||
|
struct compression *comp;
|
||||||
|
|
||||||
if (stat (filename, &st) < 0 || S_ISDIR (st.st_mode))
|
if (stat (filename, &st) < 0 || S_ISDIR (st.st_mode))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBZ
|
||||||
+# ifdef HAVE_ZIO
|
+# ifdef HAVE_ZIO
|
||||||
+ ext = strrchr (filename, '.');
|
+ ext = strrchr (filename, '.');
|
||||||
+ if (ext) {
|
+ if (ext && (
|
||||||
+ const char *opt;
|
+ STREQ (ext, ".gz") ||
|
||||||
|
+ STREQ (ext, ".z") ||
|
||||||
|
+ STREQ (ext, ".bz2") ||
|
||||||
|
+ STREQ (ext, ".xz") ||
|
||||||
|
+ STREQ (ext, ".lzma") ||
|
||||||
|
+ STREQ (ext, ".Z")
|
||||||
|
+ )) {
|
||||||
|
+# else
|
||||||
|
filename_len = strlen (filename);
|
||||||
|
if (filename_len > 3 && STREQ (filename + filename_len - 3, ".gz")) {
|
||||||
|
+# endif
|
||||||
|
if (flags & DECOMPRESS_ALLOW_INPROCESS) {
|
||||||
|
decompress *d = decompress_try_zlib (filename);
|
||||||
|
if (d)
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+# ifdef HAVE_ZIO
|
||||||
|
+ static char opt[2] = {'\0','\0'};
|
||||||
+ char *name = NULL;
|
+ char *name = NULL;
|
||||||
+
|
+
|
||||||
+ if (STREQ (ext, ".gz"))
|
+ opt[0] = ext[1];
|
||||||
+ opt = "g";
|
|
||||||
+ else if (STREQ (ext, ".z"))
|
|
||||||
+ opt = "z";
|
|
||||||
+ else if (STREQ (ext, ".bz2"))
|
|
||||||
+ opt = "b";
|
|
||||||
+ else if (STREQ (ext, ".xz"))
|
|
||||||
+ opt = "x";
|
|
||||||
+ else if (STREQ (ext, ".lzma"))
|
|
||||||
+ opt = "l";
|
|
||||||
+ else if (STREQ (ext, ".Z"))
|
|
||||||
+ opt = "Z";
|
|
||||||
+ else
|
|
||||||
+ goto nozio;
|
|
||||||
+
|
+
|
||||||
+ /* informational only; no shell quoting concerns */
|
+ /* informational only; no shell quoting concerns */
|
||||||
+ name = appendstr (NULL, "libzio < ", filename, (void *) 0);
|
+ name = appendstr (NULL, "libzio < ", filename, (void *) 0);
|
||||||
+ cmd = pipecmd_new_function (name, &decompress_zio, NULL,
|
+ cmd = pipecmd_new_function (name, &decompress_zio, NULL,
|
||||||
+ (void *)opt);
|
+ (void *)opt);
|
||||||
+ pipecmd_pre_exec (cmd, sandbox_load, sandbox_free, sandbox);
|
+# else
|
||||||
+ p = pipeline_new_commands (cmd, (void *) 0);
|
cmd = pipecmd_new_function ("zcat", &decompress_zlib, NULL,
|
||||||
|
NULL);
|
||||||
|
+# endif
|
||||||
|
pipecmd_pre_exec (cmd, sandbox_load, sandbox_free, sandbox);
|
||||||
|
p = pipeline_new_commands (cmd, nullptr);
|
||||||
|
+# ifdef HAVE_ZIO
|
||||||
+ free (name);
|
+ free (name);
|
||||||
+ goto got_pipeline;
|
+# endif
|
||||||
+ }
|
goto got_pipeline;
|
||||||
+#endif /* HAVE_ZIO */
|
|
||||||
+
|
|
||||||
#ifdef HAVE_LIBZ
|
|
||||||
filename_len = strlen (filename);
|
|
||||||
if (filename_len > 3 && STREQ (filename + filename_len - 3, ".gz")) {
|
|
||||||
@@ -222,7 +286,11 @@ decompress *decompress_open (const char
|
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBZ */
|
#endif /* HAVE_LIBZ */
|
||||||
|
@@ -313,7 +393,7 @@ void decompress_inprocess_replace (decom
|
||||||
+#ifdef HAVE_ZIO
|
|
||||||
+nozio:
|
|
||||||
+#else
|
|
||||||
ext = strrchr (filename, '.');
|
|
||||||
+#endif /* HAVE_LIBZ */
|
|
||||||
if (ext) {
|
|
||||||
++ext;
|
|
||||||
|
|
||||||
@@ -315,7 +383,7 @@ void decompress_inprocess_replace (decom
|
|
||||||
|
|
||||||
void decompress_start (decompress *d)
|
void decompress_start (decompress *d)
|
||||||
{
|
{
|
||||||
|
@@ -1,22 +1,21 @@
|
|||||||
---
|
---
|
||||||
configure.ac | 18 +++++++++-
|
configure.ac | 18 ++++++++++-
|
||||||
lib/security.c | 30 +++++++++++++++++
|
lib/security.c | 30 +++++++++++++++++++
|
||||||
mk_catdirs | 30 +++++++++++++++++
|
mk_catdirs | 30 +++++++++++++++++++
|
||||||
src/check_mandirs.c | 33 ++++++++++++-------
|
src/check_mandirs.c | 33 +++++++++++++--------
|
||||||
src/lexgrog.l | 64 +++++++++++++++++++++++++++-----------
|
src/lexgrog.l | 64 ++++++++++++++++++++++++++++++-----------
|
||||||
src/man.c | 60 +++++++++++++++++++++++++++++++++++++++++++-----
|
src/man.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++------
|
||||||
src/man_db.conf.in | 17 ++++++++--
|
src/man_db.conf.in | 17 ++++++++--
|
||||||
src/mandb.c | 18 ++++++++--
|
src/mandb.c | 30 +++++++++++++------
|
||||||
src/manp.c | 2 -
|
src/manp.c | 2 -
|
||||||
src/straycats.c | 1
|
src/straycats.c | 1
|
||||||
src/ult_src.c | 9 ++++-
|
src/ult_src.c | 9 ++++-
|
||||||
11 files changed, 235 insertions(+), 47 deletions(-)
|
11 files changed, 261 insertions(+), 54 deletions(-)
|
||||||
|
|
||||||
Index: b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
===================================================================
|
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -302,6 +302,14 @@ fi
|
@@ -275,6 +275,14 @@ fi
|
||||||
|
|
||||||
MAN_CHECK_PROGS([eqn], [EQN], [use EQN to preprocess equations], [eqn geqn])
|
MAN_CHECK_PROGS([eqn], [EQN], [use EQN to preprocess equations], [eqn geqn])
|
||||||
AC_DEFINE_UNQUOTED([PROG_EQN], ["$eqn"], [Program to use as eqn.])
|
AC_DEFINE_UNQUOTED([PROG_EQN], ["$eqn"], [Program to use as eqn.])
|
||||||
@@ -31,7 +30,7 @@ Index: b/configure.ac
|
|||||||
MAN_CHECK_PROGS([neqn], [NEQN], [use NEQN to preprocess equations for character devices], [neqn gneqn])
|
MAN_CHECK_PROGS([neqn], [NEQN], [use NEQN to preprocess equations for character devices], [neqn gneqn])
|
||||||
# If we fail to find an neqn, use eqn and try to force it to output for an
|
# If we fail to find an neqn, use eqn and try to force it to output for an
|
||||||
# ascii device. As this is only relevant for equations (?), not using latin1
|
# ascii device. As this is only relevant for equations (?), not using latin1
|
||||||
@@ -352,9 +360,15 @@ then
|
@@ -325,9 +333,15 @@ then
|
||||||
compress_ext="gz"
|
compress_ext="gz"
|
||||||
fi
|
fi
|
||||||
MAN_CHECK_PROGS([compress], [COMPRESS], [use COMPRESS as UNIX compression utility], [compress])
|
MAN_CHECK_PROGS([compress], [COMPRESS], [use COMPRESS as UNIX compression utility], [compress])
|
||||||
@@ -49,8 +48,7 @@ Index: b/configure.ac
|
|||||||
if test -z "$gzip"
|
if test -z "$gzip"
|
||||||
then
|
then
|
||||||
compressor="$compress -c"
|
compressor="$compress -c"
|
||||||
Index: b/lib/security.c
|
diff --git a/lib/security.c b/lib/security.c
|
||||||
===================================================================
|
|
||||||
--- a/lib/security.c
|
--- a/lib/security.c
|
||||||
+++ b/lib/security.c
|
+++ b/lib/security.c
|
||||||
@@ -80,6 +80,11 @@ static void gripe_set_euid (void)
|
@@ -80,6 +80,11 @@ static void gripe_set_euid (void)
|
||||||
@@ -59,13 +57,13 @@ Index: b/lib/security.c
|
|||||||
|
|
||||||
+static inline void gripe_set_egid (void)
|
+static inline void gripe_set_egid (void)
|
||||||
+{
|
+{
|
||||||
+ error (FATAL, errno, _("can't set effective gid"));
|
+ fatal (errno, _ ("can't set effective gid"));
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
|
|
||||||
void init_security (void)
|
void init_security (void)
|
||||||
@@ -164,6 +169,31 @@ void regain_effective_privs (void)
|
@@ -166,6 +171,31 @@ void regain_effective_privs (void)
|
||||||
uid = euid;
|
uid = euid;
|
||||||
gid = egid;
|
gid = egid;
|
||||||
}
|
}
|
||||||
@@ -97,9 +95,8 @@ Index: b/lib/security.c
|
|||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: b/mk_catdirs
|
diff --git a/mk_catdirs b/mk_catdirs
|
||||||
===================================================================
|
--- a/mk_catdirs
|
||||||
--- /dev/null
|
|
||||||
+++ b/mk_catdirs
|
+++ b/mk_catdirs
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,30 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
@@ -132,11 +129,10 @@ Index: b/mk_catdirs
|
|||||||
+cd ${OLDPWD}
|
+cd ${OLDPWD}
|
||||||
+
|
+
|
||||||
+test "$(id -u)" -ne 0 || chown man:man -R ${CACHE}
|
+test "$(id -u)" -ne 0 || chown man:man -R ${CACHE}
|
||||||
Index: b/src/check_mandirs.c
|
diff --git a/src/check_mandirs.c b/src/check_mandirs.c
|
||||||
===================================================================
|
|
||||||
--- a/src/check_mandirs.c
|
--- a/src/check_mandirs.c
|
||||||
+++ b/src/check_mandirs.c
|
+++ b/src/check_mandirs.c
|
||||||
@@ -381,7 +381,7 @@ void chown_if_possible (const char *path
|
@@ -383,7 +383,7 @@ void chown_if_possible (const char *path
|
||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
|
|
||||||
/* create the catman hierarchy if it doesn't exist */
|
/* create the catman hierarchy if it doesn't exist */
|
||||||
@@ -145,7 +141,7 @@ Index: b/src/check_mandirs.c
|
|||||||
{
|
{
|
||||||
if (catdir) {
|
if (catdir) {
|
||||||
char *manname, *catname;
|
char *manname, *catname;
|
||||||
@@ -409,9 +409,14 @@ static void mkcatdirs (const char *mandi
|
@@ -412,9 +412,14 @@ static void mkcatdirs (const char *mandi
|
||||||
int j;
|
int j;
|
||||||
regain_effective_privs ();
|
regain_effective_privs ();
|
||||||
debug ("creating catdir hierarchy %s ", catdir);
|
debug ("creating catdir hierarchy %s ", catdir);
|
||||||
@@ -160,19 +156,19 @@ Index: b/src/check_mandirs.c
|
|||||||
+ c = 'n';
|
+ c = 'n';
|
||||||
+ catname[strlen (catname) - 1] = c;
|
+ catname[strlen (catname) - 1] = c;
|
||||||
+ manname[strlen (manname) - 1] = c;
|
+ manname[strlen (manname) - 1] = c;
|
||||||
if ((is_directory (manname) == 1)
|
if ((is_directory (manname) == 1) &&
|
||||||
&& (is_directory (catname) != 1)) {
|
(is_directory (catname) != 1)) {
|
||||||
if (mkdir (catname, 0755) < 0) {
|
if (mkdir (catname, 0755) < 0) {
|
||||||
@@ -419,7 +424,7 @@ static void mkcatdirs (const char *mandi
|
@@ -429,7 +434,7 @@ static void mkcatdirs (const char *mandi
|
||||||
error (0, 0, _("warning: cannot create catdir %s"), catname);
|
"create catdir %s\n",
|
||||||
debug ("warning: cannot create catdir %s\n", catname);
|
catname);
|
||||||
} else
|
} else
|
||||||
- debug (" cat%d", j);
|
- debug (" cat%d", j);
|
||||||
+ debug (" cat%c", c);
|
+ debug (" cat%c", c);
|
||||||
chown_if_possible (catname);
|
chown_if_possible (catname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -562,15 +567,10 @@ static int testmandirs (MYDBM_FILE dbf,
|
@@ -573,16 +578,11 @@ static int testmandirs (MYDBM_FILE dbf,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
@@ -182,14 +178,15 @@ Index: b/src/check_mandirs.c
|
|||||||
- fprintf (stderr, "\r");
|
- fprintf (stderr, "\r");
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_ ("Updating index cache for path "
|
_ ("Updating index cache for path "
|
||||||
"`%s/%s'. Wait..."), path, mandir->d_name);
|
"`%s/%s'. Wait..."),
|
||||||
|
path, mandir->d_name);
|
||||||
- if (!tty)
|
- if (!tty)
|
||||||
- fprintf (stderr, "\n");
|
- fprintf (stderr, "\n");
|
||||||
+ fprintf (stderr, "\n");
|
+ fprintf (stderr, "\n");
|
||||||
}
|
}
|
||||||
add_dir_entries (dbf, path, mandir->d_name);
|
add_dir_entries (dbf, path, mandir->d_name);
|
||||||
amount++;
|
amount++;
|
||||||
@@ -639,7 +639,7 @@ int update_db (MYDBM_FILE dbf, const cha
|
@@ -652,7 +652,7 @@ int update_db (MYDBM_FILE dbf, const cha
|
||||||
int new;
|
int new;
|
||||||
|
|
||||||
if (!ensure_db_open (dbf) || !sanity_check_db (dbf)) {
|
if (!ensure_db_open (dbf) || !sanity_check_db (dbf)) {
|
||||||
@@ -198,15 +195,15 @@ Index: b/src/check_mandirs.c
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
mtime = MYDBM_GET_TIME (dbf);
|
mtime = MYDBM_GET_TIME (dbf);
|
||||||
@@ -847,6 +847,7 @@ static int purge_whatis (MYDBM_FILE dbf,
|
@@ -865,6 +865,7 @@ static int purge_whatis (MYDBM_FILE dbf,
|
||||||
"would delete\n", name, info->ext);
|
name, info->ext);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
+ return 1;
|
+ return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that multi keys are correctly constructed. */
|
/* Check that multi keys are correctly constructed. */
|
||||||
@@ -944,6 +945,14 @@ int purge_missing (MYDBM_FILE dbf, const
|
@@ -964,6 +965,14 @@ int purge_missing (MYDBM_FILE dbf, const
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
@@ -221,8 +218,7 @@ Index: b/src/check_mandirs.c
|
|||||||
content = MYDBM_FETCH (dbf, key);
|
content = MYDBM_FETCH (dbf, key);
|
||||||
if (!MYDBM_DPTR (content)) {
|
if (!MYDBM_DPTR (content)) {
|
||||||
nextkey = MYDBM_NEXTKEY (dbf, key);
|
nextkey = MYDBM_NEXTKEY (dbf, key);
|
||||||
Index: b/src/lexgrog.l
|
diff --git a/src/lexgrog.l b/src/lexgrog.l
|
||||||
===================================================================
|
|
||||||
--- a/src/lexgrog.l
|
--- a/src/lexgrog.l
|
||||||
+++ b/src/lexgrog.l
|
+++ b/src/lexgrog.l
|
||||||
@@ -70,7 +70,7 @@
|
@@ -70,7 +70,7 @@
|
||||||
@@ -231,10 +227,10 @@ Index: b/src/lexgrog.l
|
|||||||
|
|
||||||
-#define YY_READ_BUF_SIZE 1024
|
-#define YY_READ_BUF_SIZE 1024
|
||||||
+#define YY_READ_BUF_SIZE YY_BUF_SIZE
|
+#define YY_READ_BUF_SIZE YY_BUF_SIZE
|
||||||
#define MAX_NAME 8192
|
#define MAX_NAME 16384
|
||||||
|
|
||||||
/* defines the ordered list of filters detected by lexgrog */
|
/* defines the ordered list of filters detected by lexgrog */
|
||||||
@@ -229,15 +229,15 @@ static const struct macro perldocs[] = {
|
@@ -227,15 +227,15 @@ static const struct macro perldocs[] = {
|
||||||
{ "R\"", "\"" }
|
{ "R\"", "\"" }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -259,7 +255,7 @@ Index: b/src/lexgrog.l
|
|||||||
|
|
||||||
static char newname[MAX_NAME];
|
static char newname[MAX_NAME];
|
||||||
static char *p_name;
|
static char *p_name;
|
||||||
@@ -246,6 +246,7 @@ static char filters[MAX_FILTERS];
|
@@ -244,6 +244,7 @@ static char filters[MAX_FILTERS];
|
||||||
|
|
||||||
static bool fill_mode;
|
static bool fill_mode;
|
||||||
static bool waiting_for_quote;
|
static bool waiting_for_quote;
|
||||||
@@ -267,7 +263,7 @@ Index: b/src/lexgrog.l
|
|||||||
|
|
||||||
static decompress *decomp;
|
static decompress *decomp;
|
||||||
|
|
||||||
@@ -263,7 +264,7 @@ static decompress *decomp;
|
@@ -261,7 +262,7 @@ static decompress *decomp;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%option ecs meta-ecs
|
%option ecs meta-ecs
|
||||||
@@ -276,7 +272,7 @@ Index: b/src/lexgrog.l
|
|||||||
%option nostdinit
|
%option nostdinit
|
||||||
%option warn
|
%option warn
|
||||||
%option noyywrap nounput
|
%option noyywrap nounput
|
||||||
@@ -302,8 +303,9 @@ font_change \\f([[:upper:]1-4]|\({upper}
|
@@ -300,8 +301,9 @@ font_change \\f([[:upper:]1-4]|\({upper}
|
||||||
size_change \\s[+-]?{digit}
|
size_change \\s[+-]?{digit}
|
||||||
style_change ({font_change}{size_change}?|{size_change}{font_change}?)
|
style_change ({font_change}{size_change}?|{size_change}{font_change}?)
|
||||||
typeface \.(B[IR]?|I[BR]?|R[BI]|S[BM])
|
typeface \.(B[IR]?|I[BR]?|R[BI]|S[BM])
|
||||||
@@ -287,7 +283,7 @@ Index: b/src/lexgrog.l
|
|||||||
|
|
||||||
/* Please add to this list if you know how. */
|
/* Please add to this list if you know how. */
|
||||||
/* Note that, since flex only supports UTF-8 by accident, character classes
|
/* Note that, since flex only supports UTF-8 by accident, character classes
|
||||||
@@ -345,7 +347,26 @@ vi_name T(Ê|ê)[Nn]
|
@@ -343,7 +345,26 @@ vi_name T(Ê|ê)[Nn]
|
||||||
zh_CN_name 名{blank}?(称|字){blank}?.*
|
zh_CN_name 名{blank}?(称|字){blank}?.*
|
||||||
zh_TW_name (名{blank}?(稱|字)|命令名){blank}?.*
|
zh_TW_name (名{blank}?(稱|字)|命令名){blank}?.*
|
||||||
name ({ar_name}|{bg_name}|{cs_name}|{da_name}|{de_name}|{en_name}|{eo_name}|{es_name}|{fa_name}|{fi_name}|{fr_name}|{hu_name}|{id_name}|{it_name}|{ja_name}|{ko_name}|{latin_name}|{lt_name}|{nl_name}|{pl_name}|{ro_name}|{ru_name}|{sk_name}|{sr_name}|{srlatin_name}|{sv_name}|{ta_name}|{tr_name}|{uk_name}|{vi_name}|{zh_CN_name}|{zh_TW_name})
|
name ({ar_name}|{bg_name}|{cs_name}|{da_name}|{de_name}|{en_name}|{eo_name}|{es_name}|{fa_name}|{fi_name}|{fr_name}|{hu_name}|{id_name}|{it_name}|{ja_name}|{ko_name}|{latin_name}|{lt_name}|{nl_name}|{pl_name}|{ro_name}|{ru_name}|{sk_name}|{sr_name}|{srlatin_name}|{sv_name}|{ta_name}|{tr_name}|{uk_name}|{vi_name}|{zh_CN_name}|{zh_TW_name})
|
||||||
@@ -315,7 +311,7 @@ Index: b/src/lexgrog.l
|
|||||||
|
|
||||||
/* eptgrv : eqn, pic, tbl, grap, refer, vgrind */
|
/* eptgrv : eqn, pic, tbl, grap, refer, vgrind */
|
||||||
tbl_request \.TS
|
tbl_request \.TS
|
||||||
@@ -359,8 +380,13 @@ vgrind_request \.vS
|
@@ -357,8 +378,13 @@ vgrind_request \.vS
|
||||||
%%
|
%%
|
||||||
|
|
||||||
/* begin NAME section processing */
|
/* begin NAME section processing */
|
||||||
@@ -331,7 +327,7 @@ Index: b/src/lexgrog.l
|
|||||||
|
|
||||||
/* general text matching */
|
/* general text matching */
|
||||||
<MAN_FILE>{
|
<MAN_FILE>{
|
||||||
@@ -435,6 +461,7 @@ vgrind_request \.vS
|
@@ -433,6 +459,7 @@ vgrind_request \.vS
|
||||||
{bol}\.sp{blank}* | /* vertical spacing */
|
{bol}\.sp{blank}* | /* vertical spacing */
|
||||||
{bol}\.ig{blank}* | /* block comment */
|
{bol}\.ig{blank}* | /* block comment */
|
||||||
{bol}\.de[1i]?{blank}* | /* macro definition */
|
{bol}\.de[1i]?{blank}* | /* macro definition */
|
||||||
@@ -339,7 +335,7 @@ Index: b/src/lexgrog.l
|
|||||||
{bol}\.i[ef]{blank}* | /* conditional */
|
{bol}\.i[ef]{blank}* | /* conditional */
|
||||||
{empty}{bol}.+ |
|
{empty}{bol}.+ |
|
||||||
<<EOF>> { /* terminate the string */
|
<<EOF>> { /* terminate the string */
|
||||||
@@ -482,8 +509,8 @@ vgrind_request \.vS
|
@@ -480,8 +507,8 @@ vgrind_request \.vS
|
||||||
|
|
||||||
/* Toggle fill mode */
|
/* Toggle fill mode */
|
||||||
<MAN_NAME,MAN_DESC>{
|
<MAN_NAME,MAN_DESC>{
|
||||||
@@ -350,7 +346,7 @@ Index: b/src/lexgrog.l
|
|||||||
}
|
}
|
||||||
|
|
||||||
<CAT_NAME>-{eol}{blank_eol}* /* strip continuations */
|
<CAT_NAME>-{eol}{blank_eol}* /* strip continuations */
|
||||||
@@ -492,6 +519,9 @@ vgrind_request \.vS
|
@@ -490,6 +517,9 @@ vgrind_request \.vS
|
||||||
<MAN_NAME>{
|
<MAN_NAME>{
|
||||||
{next}{blank}*\\\((mi|hy|em|en){blank}* |
|
{next}{blank}*\\\((mi|hy|em|en){blank}* |
|
||||||
{next}{blank}*\\\[(mi|hy|em|en)\]{blank}* |
|
{next}{blank}*\\\[(mi|hy|em|en)\]{blank}* |
|
||||||
@@ -360,14 +356,13 @@ Index: b/src/lexgrog.l
|
|||||||
{next}{blank_eol}+[-\\]-{blank}* |
|
{next}{blank_eol}+[-\\]-{blank}* |
|
||||||
{next}{blank_eol}*[-\\]-{blank}+ |
|
{next}{blank_eol}*[-\\]-{blank}+ |
|
||||||
{bol}\.Nd{blank}* {
|
{bol}\.Nd{blank}* {
|
||||||
Index: b/src/man.c
|
diff --git a/src/man.c b/src/man.c
|
||||||
===================================================================
|
|
||||||
--- a/src/man.c
|
--- a/src/man.c
|
||||||
+++ b/src/man.c
|
+++ b/src/man.c 2025-08-08 06:51:32.192263735 +0000
|
||||||
@@ -56,6 +56,8 @@
|
@@ -56,6 +56,8 @@
|
||||||
|
#include <termios.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/types.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
+#include <sys/time.h>
|
+#include <sys/time.h>
|
||||||
+#include <libalternatives.h>
|
+#include <libalternatives.h>
|
||||||
|
|
||||||
@@ -382,7 +377,7 @@ Index: b/src/man.c
|
|||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
|
|
||||||
/* the default preprocessor sequence */
|
/* the default preprocessor sequence */
|
||||||
@@ -241,10 +245,10 @@ static int first_arg;
|
@@ -238,10 +242,10 @@ static int first_arg;
|
||||||
#ifdef MAN_CATS
|
#ifdef MAN_CATS
|
||||||
static char *tmp_cat_file; /* for open_cat_stream(), close_cat_stream() */
|
static char *tmp_cat_file; /* for open_cat_stream(), close_cat_stream() */
|
||||||
static bool created_tmp_cat; /* dto. */
|
static bool created_tmp_cat; /* dto. */
|
||||||
@@ -394,7 +389,7 @@ Index: b/src/man.c
|
|||||||
|
|
||||||
#ifdef TROFF_IS_GROFF
|
#ifdef TROFF_IS_GROFF
|
||||||
static bool ditroff;
|
static bool ditroff;
|
||||||
@@ -1574,6 +1583,18 @@ static void setenv_less (pipecmd *cmd, c
|
@@ -1576,6 +1585,18 @@ static void setenv_less (pipecmd *cmd, c
|
||||||
free (less_opts);
|
free (less_opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,8 +405,8 @@ Index: b/src/man.c
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
static void add_output_iconv (pipeline *p,
|
static void add_output_iconv (pipeline *p, const char *source,
|
||||||
const char *source, const char *target)
|
const char *target)
|
||||||
{
|
{
|
||||||
@@ -1704,6 +1725,8 @@ static pipeline *make_display_command (c
|
@@ -1704,6 +1725,8 @@ static pipeline *make_display_command (c
|
||||||
|
|
||||||
@@ -422,24 +417,15 @@ Index: b/src/man.c
|
|||||||
pipeline_command (p, pager_cmd);
|
pipeline_command (p, pager_cmd);
|
||||||
}
|
}
|
||||||
pipeline_ignore_signals (p, 1);
|
pipeline_ignore_signals (p, 1);
|
||||||
@@ -1714,7 +1737,7 @@ static pipeline *make_display_command (c
|
@@ -1714,6 +1737,7 @@ static pipeline *make_display_command (c
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
-
|
|
||||||
+#ifdef MAN_CATS
|
+#ifdef MAN_CATS
|
||||||
/* return a (malloced) temporary name in cat_file's directory */
|
/* return a (malloced) temporary name in cat_file's directory */
|
||||||
static char *tmp_cat_filename (const char *cat_file)
|
static char *tmp_cat_filename (const char *cat_file)
|
||||||
{
|
{
|
||||||
@@ -1742,7 +1765,6 @@ static char *tmp_cat_filename (const cha
|
@@ -1815,6 +1839,7 @@ static int commit_tmp_cat (const char *c
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
-
|
|
||||||
/* If delete unlink tmp_cat, else commit tmp_cat to cat_file.
|
|
||||||
Return non-zero on error.
|
|
||||||
*/
|
|
||||||
@@ -1815,6 +1837,7 @@ static int commit_tmp_cat (const char *c
|
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -447,7 +433,7 @@ Index: b/src/man.c
|
|||||||
|
|
||||||
/* TODO: This should all be refactored after work on the decompression
|
/* TODO: This should all be refactored after work on the decompression
|
||||||
* library is complete.
|
* library is complete.
|
||||||
@@ -1851,7 +1874,6 @@ static void cleanup_unlink (void *arg)
|
@@ -1851,7 +1876,6 @@ static void cleanup_unlink (void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAN_CATS
|
#ifdef MAN_CATS
|
||||||
@@ -455,7 +441,7 @@ Index: b/src/man.c
|
|||||||
/* Return pipeline to write formatted manual page to for saving as cat file. */
|
/* 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)
|
static pipeline *open_cat_stream (const char *cat_file, const char *encoding)
|
||||||
{
|
{
|
||||||
@@ -2083,6 +2105,7 @@ static void format_display (decompress *
|
@@ -2079,6 +2103,7 @@ static void format_display (decompress *
|
||||||
regain_effective_privs ();
|
regain_effective_privs ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,7 +449,7 @@ Index: b/src/man.c
|
|||||||
/* "Display" a page in catman mode, which amounts to saving it. */
|
/* "Display" a page in catman mode, which amounts to saving it. */
|
||||||
/* TODO: merge with format_display_and_save? */
|
/* TODO: merge with format_display_and_save? */
|
||||||
static void display_catman (const char *cat_file, decompress *d,
|
static void display_catman (const char *cat_file, decompress *d,
|
||||||
@@ -2128,6 +2151,7 @@ static void display_catman (const char *
|
@@ -2124,6 +2149,7 @@ static void display_catman (const char *
|
||||||
pop_cleanup (cleanup_unlink, tmpcat);
|
pop_cleanup (cleanup_unlink, tmpcat);
|
||||||
free (tmpcat);
|
free (tmpcat);
|
||||||
}
|
}
|
||||||
@@ -471,7 +457,7 @@ Index: b/src/man.c
|
|||||||
|
|
||||||
#ifndef TROFF_IS_GROFF
|
#ifndef TROFF_IS_GROFF
|
||||||
static void disable_hyphenation (void *data MAYBE_UNUSED)
|
static void disable_hyphenation (void *data MAYBE_UNUSED)
|
||||||
@@ -2347,7 +2371,7 @@ static int display (const char *dir, con
|
@@ -2334,7 +2360,7 @@ static int display (const char *dir, con
|
||||||
format_cmd = NULL;
|
format_cmd = NULL;
|
||||||
decomp_errno = errno;
|
decomp_errno = errno;
|
||||||
}
|
}
|
||||||
@@ -480,7 +466,7 @@ Index: b/src/man.c
|
|||||||
/* Get modification time, for commit_tmp_cat(). */
|
/* Get modification time, for commit_tmp_cat(). */
|
||||||
if (man_file && *man_file) {
|
if (man_file && *man_file) {
|
||||||
struct stat stb;
|
struct stat stb;
|
||||||
@@ -2357,7 +2381,7 @@ static int display (const char *dir, con
|
@@ -2344,7 +2370,7 @@ static int display (const char *dir, con
|
||||||
} else
|
} else
|
||||||
man_modtime = get_stat_mtime (&stb);
|
man_modtime = get_stat_mtime (&stb);
|
||||||
}
|
}
|
||||||
@@ -489,7 +475,7 @@ Index: b/src/man.c
|
|||||||
display_to_stdout = troff;
|
display_to_stdout = troff;
|
||||||
#ifdef TROFF_IS_GROFF
|
#ifdef TROFF_IS_GROFF
|
||||||
if (htmlout || gxditview)
|
if (htmlout || gxditview)
|
||||||
@@ -2498,6 +2522,7 @@ static int display (const char *dir, con
|
@@ -2481,6 +2507,7 @@ static int display (const char *dir, con
|
||||||
}
|
}
|
||||||
if (printed)
|
if (printed)
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
@@ -497,7 +483,7 @@ Index: b/src/man.c
|
|||||||
} else if (catman) {
|
} else if (catman) {
|
||||||
if (format) {
|
if (format) {
|
||||||
if (!save_cat)
|
if (!save_cat)
|
||||||
@@ -2510,6 +2535,7 @@ static int display (const char *dir, con
|
@@ -2493,6 +2520,7 @@ static int display (const char *dir, con
|
||||||
format_cmd,
|
format_cmd,
|
||||||
formatted_encoding);
|
formatted_encoding);
|
||||||
}
|
}
|
||||||
@@ -505,7 +491,7 @@ Index: b/src/man.c
|
|||||||
} else if (format) {
|
} else if (format) {
|
||||||
/* no cat or out of date */
|
/* no cat or out of date */
|
||||||
pipeline *disp_cmd;
|
pipeline *disp_cmd;
|
||||||
@@ -4048,17 +4074,20 @@ static int local_man_loop (const char *a
|
@@ -4037,17 +4065,20 @@ static int local_man_loop (const char *a
|
||||||
/* Check that the file exists and isn't e.g. a directory */
|
/* Check that the file exists and isn't e.g. a directory */
|
||||||
if (stat (argv, &st)) {
|
if (stat (argv, &st)) {
|
||||||
error (0, errno, "%s", argv);
|
error (0, errno, "%s", argv);
|
||||||
@@ -526,7 +512,7 @@ Index: b/src/man.c
|
|||||||
return NOT_FOUND;
|
return NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4122,6 +4151,11 @@ executable_out:
|
@@ -4111,6 +4142,11 @@ executable_out:
|
||||||
argv_abs = xstrdup (argv);
|
argv_abs = xstrdup (argv);
|
||||||
}
|
}
|
||||||
lang = lang_dir (argv_abs);
|
lang = lang_dir (argv_abs);
|
||||||
@@ -538,13 +524,13 @@ Index: b/src/man.c
|
|||||||
free (argv_abs);
|
free (argv_abs);
|
||||||
if (!display (NULL, argv, NULL, argv_base, NULL)) {
|
if (!display (NULL, argv, NULL, argv_base, NULL)) {
|
||||||
if (local_mf)
|
if (local_mf)
|
||||||
@@ -4180,9 +4214,25 @@ static void locate_page_in_manpath (cons
|
@@ -4167,9 +4203,25 @@ static void locate_page_in_manpath (cons
|
||||||
{
|
{
|
||||||
char *mp;
|
char *mp;
|
||||||
|
|
||||||
- GL_LIST_FOREACH (manpathlist, mp)
|
- GL_LIST_FOREACH (manpathlist, mp)
|
||||||
- *found += locate_page (mp, page_section, page_name,
|
- *found +=
|
||||||
- candidates);
|
- locate_page (mp, page_section, page_name, candidates);
|
||||||
+ GL_LIST_FOREACH (manpathlist, mp) {
|
+ GL_LIST_FOREACH (manpathlist, mp) {
|
||||||
+ int count = locate_page (mp, page_section, page_name, candidates);
|
+ int count = locate_page (mp, page_section, page_name, candidates);
|
||||||
+ if (count == 0) {
|
+ if (count == 0) {
|
||||||
@@ -567,7 +553,7 @@ Index: b/src/man.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -4377,7 +4427,16 @@ int main (int argc, char *argv[])
|
@@ -4363,7 +4415,16 @@ int main (int argc, char *argv[])
|
||||||
umask (022);
|
umask (022);
|
||||||
init_locale ();
|
init_locale ();
|
||||||
|
|
||||||
@@ -585,7 +571,7 @@ Index: b/src/man.c
|
|||||||
/* Use LANGUAGE only when LC_MESSAGES locale category is
|
/* Use LANGUAGE only when LC_MESSAGES locale category is
|
||||||
* neither "C" nor "POSIX". */
|
* neither "C" nor "POSIX". */
|
||||||
if (internal_locale && strcmp (internal_locale, "C") &&
|
if (internal_locale && strcmp (internal_locale, "C") &&
|
||||||
@@ -4422,7 +4481,16 @@ int main (int argc, char *argv[])
|
@@ -4408,7 +4469,16 @@ int main (int argc, char *argv[])
|
||||||
if (external)
|
if (external)
|
||||||
do_extern (argc, argv);
|
do_extern (argc, argv);
|
||||||
|
|
||||||
@@ -602,8 +588,7 @@ Index: b/src/man.c
|
|||||||
|
|
||||||
/* close this locale and reinitialise if a new locale was
|
/* close this locale and reinitialise if a new locale was
|
||||||
issued as an argument or in $MANOPT */
|
issued as an argument or in $MANOPT */
|
||||||
Index: b/src/man_db.conf.in
|
diff --git a/src/man_db.conf.in b/src/man_db.conf.in
|
||||||
===================================================================
|
|
||||||
--- a/src/man_db.conf.in
|
--- a/src/man_db.conf.in
|
||||||
+++ b/src/man_db.conf.in
|
+++ b/src/man_db.conf.in
|
||||||
@@ -20,6 +20,14 @@
|
@@ -20,6 +20,14 @@
|
||||||
@@ -644,11 +629,10 @@ Index: b/src/man_db.conf.in
|
|||||||
MANDB_MAP @snapdir@/man /var/cache/man/snap
|
MANDB_MAP @snapdir@/man /var/cache/man/snap
|
||||||
#
|
#
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
Index: b/src/mandb.c
|
diff --git a/src/mandb.c b/src/mandb.c
|
||||||
===================================================================
|
|
||||||
--- a/src/mandb.c
|
--- a/src/mandb.c
|
||||||
+++ b/src/mandb.c
|
+++ b/src/mandb.c
|
||||||
@@ -213,6 +213,8 @@ struct dbpaths {
|
@@ -205,6 +205,8 @@ struct dbpaths {
|
||||||
#ifdef MAN_OWNER
|
#ifdef MAN_OWNER
|
||||||
extern uid_t ruid;
|
extern uid_t ruid;
|
||||||
extern uid_t euid;
|
extern uid_t euid;
|
||||||
@@ -657,7 +641,7 @@ Index: b/src/mandb.c
|
|||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
|
|
||||||
static gl_list_t manpathlist;
|
static gl_list_t manpathlist;
|
||||||
@@ -638,6 +640,8 @@ static int mandb (struct dbpaths *dbpath
|
@@ -627,6 +629,8 @@ static int mandb (struct dbpaths *dbpath
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,7 +650,7 @@ Index: b/src/mandb.c
|
|||||||
static int process_manpath (const char *manpath, bool global_manpath,
|
static int process_manpath (const char *manpath, bool global_manpath,
|
||||||
gl_map_t tried_catdirs)
|
gl_map_t tried_catdirs)
|
||||||
{
|
{
|
||||||
@@ -679,6 +683,8 @@ static int process_manpath (const char *
|
@@ -668,6 +672,8 @@ static int process_manpath (const char *
|
||||||
} else
|
} else
|
||||||
run_mandb = true;
|
run_mandb = true;
|
||||||
|
|
||||||
@@ -675,7 +659,7 @@ Index: b/src/mandb.c
|
|||||||
dbpaths = XZALLOC (struct dbpaths);
|
dbpaths = XZALLOC (struct dbpaths);
|
||||||
push_cleanup ((cleanup_fun) dbpaths_free_elements, dbpaths, 0);
|
push_cleanup ((cleanup_fun) dbpaths_free_elements, dbpaths, 0);
|
||||||
push_cleanup ((cleanup_fun) dbpaths_unlink_tmp, dbpaths, 1);
|
push_cleanup ((cleanup_fun) dbpaths_unlink_tmp, dbpaths, 1);
|
||||||
@@ -697,7 +703,7 @@ static int process_manpath (const char *
|
@@ -686,7 +692,7 @@ static int process_manpath (const char *
|
||||||
if (!opt_test && (amount || new_purged || new_strays)) {
|
if (!opt_test && (amount || new_purged || new_strays)) {
|
||||||
dbpaths_rename_from_tmp (dbpaths);
|
dbpaths_rename_from_tmp (dbpaths);
|
||||||
#ifdef MAN_OWNER
|
#ifdef MAN_OWNER
|
||||||
@@ -684,7 +668,7 @@ Index: b/src/mandb.c
|
|||||||
dbpaths_chown_if_possible (dbpaths);
|
dbpaths_chown_if_possible (dbpaths);
|
||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
reorganize (catpath, global_manpath);
|
reorganize (catpath, global_manpath);
|
||||||
@@ -896,14 +902,20 @@ int main (int argc, char *argv[])
|
@@ -889,14 +895,20 @@ int main (int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef MAN_OWNER
|
#ifdef MAN_OWNER
|
||||||
man_owner = get_man_owner ();
|
man_owner = get_man_owner ();
|
||||||
@@ -713,11 +697,10 @@ Index: b/src/mandb.c
|
|||||||
}
|
}
|
||||||
#endif /* MAN_OWNER */
|
#endif /* MAN_OWNER */
|
||||||
|
|
||||||
Index: b/src/manp.c
|
diff --git a/src/manp.c b/src/manp.c
|
||||||
===================================================================
|
|
||||||
--- a/src/manp.c
|
--- a/src/manp.c
|
||||||
+++ b/src/manp.c
|
+++ b/src/manp.c
|
||||||
@@ -907,7 +907,7 @@ static char *def_path (enum config_flag
|
@@ -903,7 +903,7 @@ static char *def_path (enum config_flag
|
||||||
|
|
||||||
/* If we have complete config file failure... */
|
/* If we have complete config file failure... */
|
||||||
if (!manpath)
|
if (!manpath)
|
||||||
@@ -726,20 +709,18 @@ Index: b/src/manp.c
|
|||||||
|
|
||||||
return manpath;
|
return manpath;
|
||||||
}
|
}
|
||||||
Index: b/src/straycats.c
|
diff --git a/src/straycats.c b/src/straycats.c
|
||||||
===================================================================
|
|
||||||
--- a/src/straycats.c
|
--- a/src/straycats.c
|
||||||
+++ b/src/straycats.c
|
+++ b/src/straycats.c
|
||||||
@@ -38,6 +38,7 @@
|
@@ -39,6 +39,7 @@
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
+#include <fcntl.h>
|
+#include <fcntl.h>
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
#include "canonicalize.h"
|
#include "canonicalize.h"
|
||||||
Index: b/src/ult_src.c
|
#include "dirname.h"
|
||||||
===================================================================
|
diff --git a/src/ult_src.c b/src/ult_src.c
|
||||||
--- a/src/ult_src.c
|
--- a/src/ult_src.c
|
||||||
+++ b/src/ult_src.c
|
+++ b/src/ult_src.c
|
||||||
@@ -160,10 +160,15 @@ static char *find_include_directive (cha
|
@@ -160,10 +160,15 @@ static char *find_include_directive (cha
|
||||||
|
@@ -1,7 +1,11 @@
|
|||||||
diff -ur man-db-2.10.2/src/man.c man-db-2.10.2.patch/src/man.c
|
---
|
||||||
--- man-db-2.10.2/src/man.c 2022-03-17 19:41:27.000000000 +0100
|
man-db-2.13.0/src/man.c | 9 +++++++--
|
||||||
+++ man-db-2.10.2.patch/src/man.c 2023-04-03 17:13:05.944119389 +0200
|
man-db-2.13.0/src/tests/man-invalid-db-entry | 2 ++
|
||||||
@@ -774,11 +774,16 @@
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- man-db-2.13.0/src/man.c
|
||||||
|
+++ man-db-2.13.0/src/man.c 2024-10-18 12:56:52.431247186 +0000
|
||||||
|
@@ -769,11 +769,16 @@ static void gripe_no_man (const char *na
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -20,10 +24,9 @@ diff -ur man-db-2.10.2/src/man.c man-db-2.10.2.patch/src/man.c
|
|||||||
|
|
||||||
#ifdef UNDOC_COMMAND
|
#ifdef UNDOC_COMMAND
|
||||||
if (getenv ("MAN_TEST_DISABLE_UNDOCUMENTED") == NULL &&
|
if (getenv ("MAN_TEST_DISABLE_UNDOCUMENTED") == NULL &&
|
||||||
diff -ur man-db-2.10.2/src/tests/man-invalid-db-entry man-db-2.10.2.patch/src/tests/man-invalid-db-entry
|
--- man-db-2.13.0/src/tests/man-invalid-db-entry
|
||||||
--- man-db-2.10.2/src/tests/man-invalid-db-entry 2022-03-17 19:41:27.000000000 +0100
|
+++ man-db-2.13.0/src/tests/man-invalid-db-entry 2024-10-18 12:53:16.443176267 +0000
|
||||||
+++ man-db-2.10.2.patch/src/tests/man-invalid-db-entry 2023-04-03 17:13:55.256508193 +0200
|
@@ -25,6 +25,8 @@ run $MANDB -C "$tmpdir/manpath.config" -
|
||||||
@@ -25,6 +25,8 @@
|
|
||||||
rm -f "$tmpdir/usr/share/man/man1/test.1"
|
rm -f "$tmpdir/usr/share/man/man1/test.1"
|
||||||
|
|
||||||
echo "No manual entry for test" > "$tmpdir/1.exp"
|
echo "No manual entry for test" > "$tmpdir/1.exp"
|
||||||
|
62
man.changes
62
man.changes
@@ -1,3 +1,65 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 8 06:58:32 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Update to man-db 2.13.1 (2 May 2025)
|
||||||
|
* Update various manual page translation
|
||||||
|
* Fix various minor formatting issues in manual pages.
|
||||||
|
* Tolerate additional spaces in preprocessor strings.
|
||||||
|
* Fix check for generated source files in out-of-tree builds.
|
||||||
|
* Fix building with the `musl` C library.
|
||||||
|
* Recognize another Ukrainian translation of the `NAME` section.
|
||||||
|
* Increase the maximum size of the `NAME` section from 8192 to 16384 bytes.
|
||||||
|
- Port patches
|
||||||
|
* man-db-2.6.3-listall.dif
|
||||||
|
* man-db-2.9.4.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 10 11:53:11 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Avoid latest gettextize as it breaks build now
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 7 09:49:24 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Modify patch man-db-2.6.3-listall.dif
|
||||||
|
* If a section is specified do not show the list (boo#1240874)
|
||||||
|
* Wait 15 seconds instead of 7 instead for a choice
|
||||||
|
* Explicit mention `export' instead of `set' for MAN_POSIXLY_CORRECT
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 11 10:37:45 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Readd patch man-db-2.7.1-zio.dif
|
||||||
|
* Use also in-memory decompression
|
||||||
|
- Add patch man-db-2.13.0-no_abort.patch
|
||||||
|
* Avoid abort of mandb due switching to user man if executed by root
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 8 13:58:23 UTC 2024 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Drop libzio integration (man-db-2.7.1-zio.dif, BuildRequires and flag)
|
||||||
|
to restore acceptable performance (boo#1232837):
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 18 13:04:09 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Update to man-db 2.13.0 (29 August 2024)
|
||||||
|
* Drop support for versions of groff before 1.21 (released on 2010-12-31).
|
||||||
|
* Fix `man-suffixed-extension` test failure when not using the GNU
|
||||||
|
hierarchy organization.
|
||||||
|
* Fix `-Wmissing-variable-declarations` warnings with GCC 14.
|
||||||
|
* Fix `-Wflex-array-member-not-at-end` warning with GCC 14.
|
||||||
|
* Upgrade to Gnulib `stable-202407`.
|
||||||
|
* Support running the test suite against an installed package; this is
|
||||||
|
useful for systems such as Debian's autopkgtest framework.
|
||||||
|
- Remove patch man-db-2.6.3-chinese.dif as not supported anymore
|
||||||
|
due to newer groff versions
|
||||||
|
- Port patches
|
||||||
|
* man-db-2.6.3-listall.dif
|
||||||
|
* man-db-2.7.1-zio.dif
|
||||||
|
* man-db-2.9.4.patch
|
||||||
|
* man-propose-online.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 4 08:10:47 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
Tue Jun 4 08:10:47 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
15
man.spec
15
man.spec
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package man
|
# spec file for package man
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
%global optflags %{optflags} %{**}
|
%global optflags %{optflags} %{**}
|
||||||
%bcond_without sdtimer
|
%bcond_without sdtimer
|
||||||
Name: man
|
Name: man
|
||||||
Version: 2.12.1
|
Version: 2.13.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Program for Displaying man Pages
|
Summary: A Program for Displaying man Pages
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
@@ -43,7 +43,8 @@ Source7: man-db-create.service
|
|||||||
Source8: manpath.csh
|
Source8: manpath.csh
|
||||||
Source9: manpath.sh
|
Source9: manpath.sh
|
||||||
Patch0: man-db-2.3.19deb4.0-groff.dif
|
Patch0: man-db-2.3.19deb4.0-groff.dif
|
||||||
Patch3: man-db-2.6.3-chinese.dif
|
# PATCH-FIX-SUSE Fix a crash if mandb is directly executed by root
|
||||||
|
Patch3: man-db-2.13.0-no_abort.patch
|
||||||
# PATCH-FEATURE-OPENSUSE man-db-2.7.1-zio.dif -- Allow using libzio for decompression
|
# PATCH-FEATURE-OPENSUSE man-db-2.7.1-zio.dif -- Allow using libzio for decompression
|
||||||
Patch4: man-db-2.7.1-zio.dif
|
Patch4: man-db-2.7.1-zio.dif
|
||||||
# PATCH-FEATURE-OPENSUSE man-db-2.6.3-listall.dif -- If multiple matching pages are found show a list bnc#786679
|
# PATCH-FEATURE-OPENSUSE man-db-2.6.3-listall.dif -- If multiple matching pages are found show a list bnc#786679
|
||||||
@@ -96,7 +97,7 @@ printer (using groff).
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n man-db-%{version}
|
%setup -q -n man-db-%{version}
|
||||||
%patch -P 0 -b .groff
|
%patch -P 0 -b .groff
|
||||||
%patch -P3 -b .chinese
|
%patch -P3 -b .seteuid
|
||||||
%patch -P4 -b .zio
|
%patch -P4 -b .zio
|
||||||
%patch -P5 -b .listall
|
%patch -P5 -b .listall
|
||||||
%patch -P6 -p1 -b .p6
|
%patch -P6 -p1 -b .p6
|
||||||
@@ -109,7 +110,7 @@ rm -f configure
|
|||||||
%build
|
%build
|
||||||
%global optflags %{optflags} -funroll-loops -pipe -Wall
|
%global optflags %{optflags} -funroll-loops -pipe -Wall
|
||||||
|
|
||||||
gettextize --force --copy --no-changelog
|
#gettextize --copy --no-changelog
|
||||||
SEC=(0 1 n l 8 3 2 5 4 9 6 7
|
SEC=(0 1 n l 8 3 2 5 4 9 6 7
|
||||||
1x 3x 4x 5x 6x 8x
|
1x 3x 4x 5x 6x 8x
|
||||||
1bind 3bind 5bind 7bind 8bind
|
1bind 3bind 5bind 7bind 8bind
|
||||||
@@ -194,7 +195,7 @@ for man in $(find man/ -type f -a -name '*.[0-9]'); do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
#
|
#
|
||||||
gcc $CFLAGS -I gl/lib/ -I include/ --include config.h \
|
gcc $CFLAGS -I gl/lib/ -I ./ -I include/ --include config.h \
|
||||||
-D LOCALEDIR="\"%{_datarootdir}/locale\"" \
|
-D LOCALEDIR="\"%{_datarootdir}/locale\"" \
|
||||||
-D LIBEXECDIR="\"%{_libexecdir}\"" -o wrapper %{SOURCE5} -L gl/lib/.libs/ -lgnu
|
-D LIBEXECDIR="\"%{_libexecdir}\"" -o wrapper %{SOURCE5} -L gl/lib/.libs/ -lgnu
|
||||||
|
|
||||||
@@ -362,7 +363,9 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%if 0%{?suse_version} < 1500
|
||||||
%{fillup_only -an cron}
|
%{fillup_only -an cron}
|
||||||
|
%endif
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%if %{with sdtimer}
|
%if %{with sdtimer}
|
||||||
%service_add_post man-db-create.service
|
%service_add_post man-db-create.service
|
||||||
|
Reference in New Issue
Block a user