Compare commits

...

No commits in common. 'c9' and 'c10-beta' have entirely different histories.
c9 ... c10-beta

2
.gitignore vendored

@ -1 +1 @@
SOURCES/man-db-2.9.3.tar.xz
SOURCES/man-db-2.12.0.tar.xz

@ -1 +1 @@
76ec7a9f5222fbd6fc5364929270a4790094a617 SOURCES/man-db-2.9.3.tar.xz
1b01ad1d8ea246a11a320b416a7b2c2469df4ef5 SOURCES/man-db-2.12.0.tar.xz

File diff suppressed because it is too large Load Diff

@ -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-----

@ -1,19 +0,0 @@
From 99dd120b952a2a27fa31ae005149e6aaaed28755 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Fri, 6 Apr 2018 11:52:33 +0200
Subject: [PATCH] Set owner of man cache to root
---
init/systemd/man-db.conf.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/systemd/man-db.conf.in b/init/systemd/man-db.conf.in
index 7a461e8..cac2b52 100644
--- a/init/systemd/man-db.conf.in
+++ b/init/systemd/man-db.conf.in
@@ -1 +1 @@
-d /var/cache/man 0755 @cache_top_owner@ @cache_top_owner@ 1w
+d /var/cache/man 0755 root root 1w
--
2.13.6

@ -1,206 +0,0 @@
From c73e7dd16b7915ac9c67a376e014ea1220095348 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Tue, 27 Aug 2019 17:53:03 +0200
Subject: [PATCH] man(1): Fix override dir handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously, override dir was affecting only some cases
of manpath determination.
Apply it only when all paths has been gathered instead.
(Depending on the definition of when the override dir applies,
this might not be correct).
Also look for override dir when sorting candidates.
Fixes src/tests/man-9 failing when --with-override-dir=od
is passed to ./configure.
Reported-by: Nikola Forró <nforro@redhat.com>
Tested-by: Nikola Forró <nforro@redhat.com>
---
src/man.c | 33 ++++++++++++++++++++++++++++++++
src/manp.c | 55 +++++++++++++++++++++---------------------------------
2 files changed, 54 insertions(+), 34 deletions(-)
diff --git a/src/man.c b/src/man.c
index 6d1cba7..b3d13d1 100644
--- a/src/man.c
+++ b/src/man.c
@@ -2712,6 +2712,32 @@ static bool duplicate_candidates (struct candidate *left,
return ret;
}
+static int cand1_differs_by_override_dir (const struct candidate *left,
+ const struct candidate *right)
+{
+ size_t ov_len, pre_ov_len;
+
+ ov_len = strlen (OVERRIDE_DIR);
+ if (!ov_len)
+ return 0;
+
+ if (!STREQ (left->source->name, right->source->name))
+ return 0;
+
+ pre_ov_len = strlen(right->path);
+ if (!STRNEQ (left->path, right->path, pre_ov_len))
+ return 0;
+
+ if (left->path[pre_ov_len] != '/')
+ return 0;
+ pre_ov_len++;
+
+ if (STREQ (left->path + pre_ov_len, OVERRIDE_DIR))
+ return 1;
+
+ return 0;
+}
+
static int compare_candidates (const struct candidate *left,
const struct candidate *right)
{
@@ -2801,6 +2827,13 @@ static int compare_candidates (const struct candidate *left,
if (cmp)
return cmp;
+ /* Sort override dir first
+ */
+ if (cand1_differs_by_override_dir(left, right))
+ return -1;
+ if (cand1_differs_by_override_dir(right, left))
+ return 1;
+
/* Try comparing based on language. We used to prefer to display a
* page in the user's preferred language than a page from a better
* section, but that attracted objections, so now we prefer to get
diff --git a/src/manp.c b/src/manp.c
index 5441339..e437183 100644
--- a/src/manp.c
+++ b/src/manp.c
@@ -903,23 +903,6 @@ static char *def_path (enum config_flag flag)
return manpath;
}
-/*
- * If specified with configure, append OVERRIDE_DIR to dir param and add it
- * to list.
- */
-static void insert_override_dir (gl_list_t list, const char *dir)
-{
- char *override_dir = NULL;
-
- if (!strlen (OVERRIDE_DIR))
- return;
-
- if ((override_dir = xasprintf ("%s/%s", dir, OVERRIDE_DIR))) {
- add_dir_to_list (list, override_dir);
- free (override_dir);
- }
-}
-
/*
* For each directory in the user's path, see if it is one of the
* directories listed in the man_db.config file. If so, and it is
@@ -968,7 +951,6 @@ char *get_manpath_from_path (const char *path, int mandatory)
if (!manpath_map_found)
debug ("is in the config file\n");
manpath_map_found = true;
- insert_override_dir (tmplist, config_item->cont);
add_dir_to_list (tmplist, config_item->cont);
} GL_LIST_FOREACH_END (config);
@@ -989,11 +971,8 @@ char *get_manpath_from_path (const char *path, int mandatory)
debug ("adding mandatory man directories\n");
GL_LIST_FOREACH_START (config, config_item) {
- if (config_item->flag == MANDATORY) {
- insert_override_dir (tmplist,
- config_item->key);
+ if (config_item->flag == MANDATORY)
add_dir_to_list (tmplist, config_item->key);
- }
} GL_LIST_FOREACH_END (config);
}
@@ -1078,7 +1057,6 @@ static void add_man_subdirs (gl_list_t list, const char *path)
if (subdir) {
newpath = xasprintf ("%.*s/man", (int) (subdir - path), path);
if (is_directory (newpath) == 1) {
- insert_override_dir (list, newpath);
add_dir_to_list (list, newpath);
}
free (newpath);
@@ -1086,7 +1064,6 @@ static void add_man_subdirs (gl_list_t list, const char *path)
newpath = xasprintf ("%s/man", path);
if (is_directory (newpath) == 1) {
- insert_override_dir (list, newpath);
add_dir_to_list (list, newpath);
}
free (newpath);
@@ -1095,7 +1072,6 @@ static void add_man_subdirs (gl_list_t list, const char *path)
newpath = xasprintf ("%.*s/share/man",
(int) (subdir - path), path);
if (is_directory (newpath) == 1) {
- insert_override_dir (list, newpath);
add_dir_to_list (list, newpath);
}
free (newpath);
@@ -1103,7 +1079,6 @@ static void add_man_subdirs (gl_list_t list, const char *path)
newpath = xasprintf ("%s/share/man", path);
if (is_directory (newpath) == 1) {
- insert_override_dir (list, newpath);
add_dir_to_list (list, newpath);
}
free (newpath);
@@ -1199,7 +1174,9 @@ gl_list_t create_pathlist (const char *manp)
const struct canonicalized_path *cp;
/* Expand the manpath into a list of (path, canonicalized path)
- * pairs for easier handling. add_dir_to_path_list only adds items
+ * pairs for easier handling. For each entry, add corresponding
+ * OVERRIDE_DIR.
+ * add_dir_to_path_list only adds items
* if they do not have the same canonicalized path as an existing
* item, thereby eliminating duplicates due to symlinks.
*/
@@ -1208,15 +1185,25 @@ gl_list_t create_pathlist (const char *manp)
(GL_LINKEDHASH_LIST, canonicalized_path_equals,
canonicalized_path_hash, canonicalized_path_free, false);
for (p = manp;; p = end + 1) {
+ char *element, *element_override;
+ ssize_t p_len;
+
end = strchr (p, ':');
- if (end) {
- char *element = xstrndup (p, end - p);
- add_dir_to_path_list (canonicalized_list, element);
- free (element);
- } else {
- add_dir_to_path_list (canonicalized_list, p);
- break;
+ p_len = end ? end - p : (ssize_t)strlen(p);
+
+ element = xstrndup (p, p_len);
+
+ if (strlen(OVERRIDE_DIR)) {
+ element_override = xasprintf("%s/%s", element, OVERRIDE_DIR);
+ add_dir_to_path_list (canonicalized_list, element_override);
+ free (element_override);
}
+
+ add_dir_to_path_list (canonicalized_list, element);
+ free (element);
+
+ if (!end)
+ break;
}
list = new_string_list (GL_ARRAY_LIST, false);
--
2.26.2

@ -1,13 +0,0 @@
diff --git a/src/man_db.conf.in b/src/man_db.conf.in
index 2942000..6365ca0 100644
--- a/src/man_db.conf.in
+++ b/src/man_db.conf.in
@@ -69,7 +69,7 @@ MANDB_MAP /usr/local/man /var/cache/man/oldlocal
MANDB_MAP /usr/local/share/man /var/cache/man/local
MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6
MANDB_MAP /opt/man /var/cache/man/opt
-MANDB_MAP /snap/man /var/cache/man/snap
+MANDB_MAP /var/lib/snapd/snap/man /var/cache/man/snap
#
#---------------------------------------------------------
# Program definitions. These are commented out by default as the value

@ -1,58 +0,0 @@
diff --git a/src/man.c b/src/man.c
index b3d13d1..030a5d1 100644
--- a/src/man.c
+++ b/src/man.c
@@ -991,11 +991,17 @@ static char *get_preprocessors_from_file (pipeline *decomp, int prefixes)
if (!strncmp (line, PP_COOKIE, 4)) {
const char *newline = strchr (line, '\n');
- if (newline)
- return xstrndup (line + 4, newline - (line + 4));
- else
- return xstrdup (line + 4);
+ if (newline) {
+ char *ret = xstrndup (line + 4, newline - (line + 4));
+ free (line);
+ return ret;
+ } else {
+ char *ret = xstrdup (line + 4);
+ free (line);
+ return ret;
+ }
}
+ free (line);
return NULL;
}
@@ -2401,6 +2407,7 @@ static int display (const char *dir, const char *man_file,
if (!found) {
pipeline_free (format_cmd);
pipeline_free (decomp);
+ free (formatted_encoding);
return found;
}
diff --git a/src/zsoelim.c b/src/zsoelim.c
index bf5c8ff..6a484c4 100644
--- a/src/zsoelim.c
+++ b/src/zsoelim.c
@@ -2528,6 +2528,7 @@ int zsoelim_open_file (const char *filename, gl_list_t manpathlist,
if (decomp) {
NAME = xstrdup (found_name);
gl_list_free (names);
+ free (name);
goto out;
}
} GL_LIST_FOREACH_END (names);
diff --git a/src/zsoelim.l b/src/zsoelim.l
index a8a7e3b..3cb552b 100644
--- a/src/zsoelim.l
+++ b/src/zsoelim.l
@@ -473,6 +473,7 @@ int zsoelim_open_file (const char *filename, gl_list_t manpathlist,
if (decomp) {
NAME = xstrdup (found_name);
gl_list_free (names);
+ free (name);
goto out;
}
} GL_LIST_FOREACH_END (names);

@ -1,37 +1,30 @@
%global cache /var/cache/man
%global gnulib_ver 20140202
Summary: Tools for searching and reading man pages
Name: man-db
Version: 2.9.3
Version: 2.12.0
Release: 7%{?dist}
# GPLv2+ .. man-db
# GPLv3+ .. gnulib
License: GPLv2+ and GPLv3+
License: GPL-2.0-or-later AND GPL-3.0-or-later
URL: http://www.nongnu.org/man-db/
Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz
Source1: man-db.crondaily
Source2: man-db.sysconfig
Source3: man-db-cache-update.service
Source4: man-db-restart-cache-update.service
Patch0: man-db-2.8.3-change-owner-of-man-cache.patch
Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz.asc
# Man-db GPG key is stored in a different name which makes it hard to fetch
# It was downloaded here: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xac0a4ff12611b6fccf01c111393587d97d86500b
Source2: 0xac0a4ff12611b6fccf01c111393587d97d86500b
# http://lists.nongnu.org/archive/html/man-db-devel/2017-01/msg00013.html
Patch1: man-db-2.8.7-fix-override-dir-handling.patch
# change snap system directory from /snap to /var/lib/snapd/snap
# https://lists.gnu.org/archive/html/man-db-devel/2020-02/msg00000.html
Patch2: man-db-2.9.1-snap.patch
# fix important Covscan defects
Patch3: man-db-2.9.3-coverity.patch
Source3: man-db.crondaily
Source4: man-db.sysconfig
Source5: man-db-cache-update.service
Source6: man-db-restart-cache-update.service
Obsoletes: man < 2.0
Provides: man = %{version}
Provides: man-pages-reader = %{version}
# FPC exception for gnulib - copylib - https://fedorahosted.org/fpc/ticket/174
Provides: bundled(gnulib) = %{gnulib_ver}
Provides: bundled(gnulib)
Requires: coreutils, grep, groff-base, gzip, less
BuildRequires: make
@ -39,6 +32,8 @@ BuildRequires: gcc
BuildRequires: systemd
BuildRequires: gdbm-devel, gettext, groff, less, libpipeline-devel, zlib-devel
BuildRequires: po4a, perl-interpreter, perl-version
BuildRequires: gnupg2
Recommends: glibc-gconv-extra
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
@ -64,6 +59,7 @@ BuildArch: noarch
This package provides periodic update of man-db cache.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1
%build
@ -72,6 +68,7 @@ This package provides periodic update of man-db cache.
--disable-setuid --disable-cache-owner \
--with-systemdsystemunitdir=no \
--with-browser=elinks --with-lzip=lzip \
--with-snapdir=/var/lib/snapd/snap \
--with-override-dir=overrides
%make_build CC="%{__cc} %{optflags}"
@ -103,18 +100,18 @@ install -d -m 0755 $RPM_BUILD_ROOT%{cache}
# install cron script for man-db creation/update
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/man-db.cron
install -D -p -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/man-db.cron
# config for cron script
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/man-db
install -D -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/man-db
# config for tmpfiles.d
install -D -p -m 0644 init/systemd/man-db.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/.
# man-db-cache-update.service and man-db-restart-cache-update.service
install -D -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/man-db-cache-update.service
install -D -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/man-db-restart-cache-update.service
install -D -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_unitdir}/man-db-cache-update.service
install -D -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/man-db-restart-cache-update.service
%find_lang %{name}
%find_lang %{name}-gnulib
@ -173,8 +170,8 @@ fi
%files -f %{name}.lang -f %{name}-gnulib.lang
%{!?_licensedir:%global license %%doc}
%license docs/COPYING
%doc README man-db-manual.txt man-db-manual.ps ChangeLog NEWS
%license COPYING
%doc README.md man-db-manual.txt man-db-manual.ps ChangeLog NEWS.md
%config(noreplace) %{_sysconfdir}/man_db.conf
%config(noreplace) %{_sysconfdir}/sysconfig/man-db
%config(noreplace) %{_tmpfilesdir}/man-db.conf
@ -221,10 +218,12 @@ fi
%lang(id) %{_datadir}/man/id/man*/*
%lang(it) %{_datadir}/man/it/man*/*
%lang(ja) %{_datadir}/man/ja/man*/*
%lang(ko) %{_datadir}/man/ko/man*/*
%lang(nl) %{_datadir}/man/nl/man*/*
%lang(pl) %{_datadir}/man/pl/man*/*
%lang(pt) %{_datadir}/man/pt/man*/*
%lang(pt_BR) %{_datadir}/man/pt_BR/man*/*
%lang(ro) %{_datadir}/man/ro/man*/*
%lang(ru) %{_datadir}/man/ru/man*/*
%lang(sr) %{_datadir}/man/sr/man*/*
%lang(sv) %{_datadir}/man/sv/man*/*
@ -235,20 +234,83 @@ fi
%config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron
%changelog
* Mon Sep 19 2022 Lukas Javorsky <ljavorsk@redhat.com> - 2.9.3-7
- Rebuild for man-db-cron compose change.
Changing from buildroot to Appstream compose.
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.12.0-7
- Bump release for June 2024 mass rebuild
* Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Oct 10 2023 Lukas Javorsky <ljavorsk@redhat.com> - 2.12.0-3
- Fix the Source numbering in installation
- Resolves: BZ#2242757
* Fri Sep 29 2023 Lukas Javorsky <ljavorsk@redhat.com> - 2.12.0-2
- Add GPG verify on the package
* Wed Sep 27 2023 Lukas Javorsky <ljavorsk@redhat.com> - 2.12.0-1
- Rebase to version 2.12.0
- Patch0 was upstreamed
* Tue Jul 25 2023 Lukas Javorsky <ljavorsk@redhat.com> - 2.11.2-5
- Release bump after added Patch0 from yselkowitz
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jul 10 2023 Lukas Javorsky <ljavorsk@redhat.com> - 2.11.2-3
- Add Recommends to package glibc-gconv-extra
- Justification in BZ#2182414
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 09 2023 Lukas Javorsky <ljavorsk@redhat.com> - 2.11.2-1
- Rebase to version 2.11.2
* Fri Nov 18 2022 Lukas Javorsky <ljavorsk@redhat.com> - 2.11.1-1
- Rebase to version 2.11.1
- Add Korean translations
- Resolves: #2142761
* Fri Oct 14 2022 Lukas Javorsky <ljavorsk@redhat.com> - 2.11.0-1
- Rebase to version 2.11.0
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Mar 18 2022 Nikola Forró <nforro@redhat.com> - 2.10.2-1
- update to 2.10.2
resolves: #2065447
* Fri Feb 11 2022 Nikola Forró <nforro@redhat.com> - 2.10.1-1
- update to 2.10.1
resolves #2053020
* Tue Feb 08 2022 Nikola Forró <nforro@redhat.com> - 2.10.0-3
- backport upstream fixes for the unstable test
* Tue Feb 08 2022 Nikola Forró <nforro@redhat.com> - 2.10.0-2
- skip unstable test
* Sun Feb 06 2022 Nikola Forró <nforro@redhat.com> - 2.10.0-1
- update to 2.10.0
resolves #2050778
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.3-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 30 2021 Nikola Forró <nforro@redhat.com> - 2.9.3-5
- fix important Covscan defects
resolves #1938814
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.3-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Feb 11 2021 Nikola Forró <nforro@redhat.com> - 2.9.4-1
- update to 2.9.4
resolves #1926527
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save