diff --git a/.gitignore b/.gitignore index 292c7d2..725a297 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,2 @@ /man-db-2.7.5.tar.xz /man-db-2.7.6.1.tar.xz -/man-db-2.8.3.tar.xz -/man-db-2.8.4.tar.xz -/man-db-2.8.6.1.tar.xz -/man-db-2.8.7.tar.xz -/man-db-2.9.0.tar.xz -/man-db-2.9.1.tar.xz -/man-db-2.9.2.tar.xz -/man-db-2.9.3.tar.xz -/man-db-2.9.4.tar.xz -/man-db-2.10.0.tar.xz -/man-db-2.10.1.tar.xz -/man-db-2.10.2.tar.xz -/man-db-2.11.0.tar.xz -/man-db-2.11.1.tar.xz -/man-db-2.11.2.tar.xz -/man-db-2.12.0.tar.xz -/man-db-2.12.0.tar.xz.asc -/0xac0a4ff12611b6fccf01c111393587d97d86500b -/man-db-2.12.1.tar.xz -/man-db-2.12.1.tar.xz.asc -/man-db-2.13.0.tar.xz -/man-db-2.13.0.tar.xz.asc -/man-db-2.13.1.tar.xz -/man-db-2.13.1.tar.xz.asc diff --git a/.packit.yaml b/.packit.yaml deleted file mode 100644 index 774fcc5..0000000 --- a/.packit.yaml +++ /dev/null @@ -1,30 +0,0 @@ -specfile_path: man-db.spec - -upstream_package_name: man-db -downstream_package_name: man-db - -upstream_project_url: https://gitlab.com/man-db/man-db - -jobs: - - job: pull_from_upstream - trigger: release - dist_git_branches: - - fedora-rawhide - - - job: koji_build - trigger: commit - allowed_pr_authors: - - packit - - all_admins - allowed_committers: - - all_admins - dist_git_branches: - - fedora-all - - - job: bodhi_update - trigger: commit - allowed_builders: - - packit - - all_admins - dist_git_branches: - - fedora-branched # rawhide updates are created automatically diff --git a/README.packit b/README.packit deleted file mode 100644 index 3331d79..0000000 --- a/README.packit +++ /dev/null @@ -1,3 +0,0 @@ -This repository is maintained by packit. -https://packit.dev/ -The file was generated using packit 0.100.3.post1.dev9+g7a8deb2b. diff --git a/man-db-2.11.2-groff-1.23.patch b/man-db-2.11.2-groff-1.23.patch deleted file mode 100644 index 776b721..0000000 --- a/man-db-2.11.2-groff-1.23.patch +++ /dev/null @@ -1,209 +0,0 @@ -From bbf7701c4f8269090a12791f3c9bde80d45c8765 Mon Sep 17 00:00:00 2001 -From: "G. Branden Robinson" -Date: Wed, 19 Jul 2023 01:58:07 -0500 -Subject: [PATCH 17/30] Improve lexgrog(1) portability - -This fixes a test failure in man1/lexgrog.1 when building against groff -1.23.0. - -Borrow code from groff 1.23.0's "an-ext.tmac" file (licensed as -permissively as a decadent society) to implement `EX` and `EE` extension -macros from Ninth Edition Research Unix (1986) (and groff) to get -monospaced code displays in a more portable way. There is no way to -portably change font families in pure man(7) itself, and the names of -troff typefaces aren't very portable either. There is also no portable -way to test for the _existence_ of a font. FTW. - -("Portable" here largely means "to AT&T device-independent troff -implementations", for which there has been no official source since the -mid-1990s.[1] Several AT&T Unix System V licensees/descendants have -continued to ship their own vendored versions, but these have enjoyed -little or no development for the past 3 decades.) - -* Define a string `mC` to store the name of a presumed monospaced roman - typeface. Use "CW", which is portable to AT&T device-independent - troff of the early 1980s before it occurred to anyone that Courier - might someday be available in italic and bold styles (and budget - available to purchase them). -* Define `mC` as "CR" if using a typesetting device and the formatter is - groff, or claims groff compatibility by the setting the `.g` register. - This is reasonably portable to modern implementations given - traditional troff font naming practices and the pervasive influence of - Adobe Software and the "base fonts" of its PostScript and PDF - specifications. -* If not typesetting (i.e., if using nroff), define `mC` as "R", which - is certain to be available. -* Define `EX` and `EE` macros as groff does, if the formatter does not - set the `.g` register. -* Migrate from `ft CW` and `nf` requests to `EX` macro calls. -* Migrate from `ft P` and `fi` requests to `EE` macro calls. -* Replace an inline use of `\f(CW` with a change to inline bold. There - is to date no portable way to inline a font family change. - -Test passes now. Tested as-is and with the `EX` and `EE` macro -definitions forcibly enabled. - -[1] https://groups.google.com/g/comp.text/c/COkqrii4W0E/m/7HarA8Ha2dAJ ---- - man/man1/lexgrog.man1 | 57 ++++++++++++++++++++++++++++++++----------- - 1 file changed, 43 insertions(+), 14 deletions(-) - -diff --git a/man/man1/lexgrog.man1 b/man/man1/lexgrog.man1 -index 37b9d287..f9f708f8 100644 ---- a/man/man1/lexgrog.man1 -+++ b/man/man1/lexgrog.man1 -@@ -5,6 +5,41 @@ - .\" You may distribute under the terms of the GNU General Public - .\" License as specified in the file docs/COPYING.GPLv2 that comes with the - .\" man-db distribution. -+.\" -+.ds mC CW -+.if t .if \n(.g .ds mC CR -+.if n .ds mC R -+. -+.nr mE 0 \" in an example (EX/EE)? -+. -+.if \n(.g \{\ -+.de EX -+. br -+. if !\\n(mE \{\ -+. nr mF \\n(.f -+. nr mP \\n(PD -+. nr PD 1v -+. nf -+. ft \\*(mC -+. nr mE 1 -+. \} -+.. -+.\} -+. -+. -+.\" End example. -+.if \n(.g \{\ -+.de EE -+. br -+. if \\n(mE \{\ -+. ft \\n(mF -+. nr PD \\n(mP -+. fi -+. nr mE 0 -+. \} -+.. -+.\} -+. - .pc - .TH LEXGROG 1 "%date%" "%version%" "Manual pager utils" - .SH NAME -@@ -133,12 +168,10 @@ macro set, a correct - section looks something like this: - .PP - .RS --.ft CW --.nf -+.EX - \&.SH NAME - foo \e\- program to do something --.fi --.ft P -+.EE - .RE - .PP - Some manual pagers require the \(oq\e\-\(cq to be exactly as shown; -@@ -157,18 +190,16 @@ If several features with different descriptions are being documented in the - same manual page, the following form is therefore used: - .PP - .RS --.ft CW --.nf -+.EX - \&.SH NAME - foo, bar \e\- programs to do something - \&.br - baz \e\- program to do nothing --.fi --.ft P -+.EE - .RE - .PP --(A macro which starts a new paragraph, like \f(CW.PP\fP, may be used instead --of the break macro \f(CW.br\fP.) -+(A macro which starts a new paragraph, like \fB.PP\fP, may be used instead -+of the break macro \fB.br\fP.) - .PP - When using the BSD-derived - .I mdoc -@@ -177,13 +208,11 @@ macro set, a correct - section looks something like this: - .PP - .RS --.ft CW --.nf -+.EX - \&.Sh NAME - \&.Nm foo - \&.Nd program to do something --.fi --.ft P -+.EE - .RE - - There are several common reasons why whatis parsing fails. --- -2.41.0 - -From 043c3cb83ce179e4c49528742df24b3b53923c4d Mon Sep 17 00:00:00 2001 -From: Colin Watson -Date: Wed, 19 Jul 2023 23:14:20 +0100 -Subject: [PATCH 18/30] Avoid translation fallout from lexgrog(1) fix - -* man/man1/lexgrog.man1: Protect `.ds mC CW` with `.if !'po4a'hide'`, to -avoid "CW" showing up as a string for translation. ---- - man/man1/lexgrog.man1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/man1/lexgrog.man1 b/man/man1/lexgrog.man1 -index f9f708f8..5a5f4206 100644 ---- a/man/man1/lexgrog.man1 -+++ b/man/man1/lexgrog.man1 -@@ -6,7 +6,7 @@ - .\" License as specified in the file docs/COPYING.GPLv2 that comes with the - .\" man-db distribution. - .\" --.ds mC CW -+.if !'po4a'hide' .ds mC CW - .if t .if \n(.g .ds mC CR - .if n .ds mC R - . --- -2.41.0 - -From b12ffb9df7a6a8956b08206c36be70fac78508bd Mon Sep 17 00:00:00 2001 -From: Colin Watson -Date: Thu, 20 Jul 2023 00:18:59 +0100 -Subject: [PATCH 19/30] 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:" --- -2.41.0 - diff --git a/man-db-2.7.6.1-change-owner-of-man-cache.patch b/man-db-2.7.6.1-change-owner-of-man-cache.patch new file mode 100644 index 0000000..eec8069 --- /dev/null +++ b/man-db-2.7.6.1-change-owner-of-man-cache.patch @@ -0,0 +1,19 @@ +From b872ee2e8ba470ed869db7dcf37eeb96563a62fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 19 Jan 2017 14:06:30 +0100 +Subject: [PATCH] Set owner of man cache to root instead of man + +--- + init/systemd/man-db.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init/systemd/man-db.conf b/init/systemd/man-db.conf +index 1eb40ce..21936d5 100644 +--- a/init/systemd/man-db.conf ++++ b/init/systemd/man-db.conf +@@ -1 +1 @@ +-d /var/cache/man 0755 man man 1w ++d /var/cache/man 0755 root root 1w +-- +2.7.4 + diff --git a/man-db-2.7.6.1-fix-override-dir-handling.patch b/man-db-2.7.6.1-fix-override-dir-handling.patch new file mode 100644 index 0000000..89461d0 --- /dev/null +++ b/man-db-2.7.6.1-fix-override-dir-handling.patch @@ -0,0 +1,177 @@ +From 84d6b3fab40be5e1ea288fb296df6cd8be06c985 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 19 Jan 2017 10:45:57 +0100 +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ó +Tested-by: Nikola Forró +--- + src/man.c | 33 +++++++++++++++++++++++++++++++++ + src/manp.c | 52 +++++++++++++++++++++------------------------------- + 2 files changed, 54 insertions(+), 31 deletions(-) + +diff --git a/src/man.c b/src/man.c +index 15a568a..8b11f43 100644 +--- a/src/man.c ++++ b/src/man.c +@@ -2665,6 +2665,32 @@ static int 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) + { +@@ -2749,6 +2775,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 0d864f1..b78a50f 100644 +--- a/src/manp.c ++++ b/src/manp.c +@@ -931,23 +931,6 @@ static char *def_path (int flag) + } + + /* +- * If specified with configure, append OVERRIDE_DIR to dir param and add it +- * to the lp list. +- */ +-static void insert_override_dir (char **lp, 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 (lp, 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 + * not already in the manpath, add it. If the directory is not listed +@@ -994,8 +977,6 @@ char *get_manpath_from_path (const char *path, int mandatory) + if (mandir_list) { + debug ("is in the config file\n"); + while (mandir_list) { +- insert_override_dir (tmplist, +- mandir_list->cont); + add_dir_to_list (tmplist, mandir_list->cont); + mandir_list = iterate_over_list + (mandir_list, p, MANPATH_MAP); +@@ -1014,7 +995,6 @@ char *get_manpath_from_path (const char *path, int mandatory) + "../share/man, or share/man " + "subdirectory\n"); + +- insert_override_dir (tmplist, t); + add_dir_to_list (tmplist, t); + free (t); + } else +@@ -1030,10 +1010,8 @@ char *get_manpath_from_path (const char *path, int mandatory) + debug ("\nadding mandatory man directories\n\n"); + + for (list = namestore; list; list = list->next) +- if (list->flag == MANDATORY) { +- insert_override_dir (tmplist, list->key); ++ if (list->flag == MANDATORY) + add_dir_to_list (tmplist, list->key); +- } + } + + len = 0; +@@ -1201,18 +1179,30 @@ void create_pathlist (const char *manp, char **mp) + const char *p, *end; + char **mphead = mp; + +- /* Expand the manpath into a list for easier handling. */ ++ /* Expand the manpath into a list for easier handling. ++ * For each entry, add corresponding OVERRIDE_DIR. ++ * */ + + 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); +- mp = add_dir_to_path_list (mphead, mp, element); +- free (element); +- } else { +- mp = add_dir_to_path_list (mphead, mp, 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); ++ mp = add_dir_to_path_list (mphead, mp, element_override); ++ free (element_override); + } ++ ++ mp = add_dir_to_path_list (mphead, mp, element); ++ free (element); ++ ++ if (!end) ++ break; + } + *mp = NULL; + +-- +2.7.4 + diff --git a/man-db-2.7.6.1-fix_rhbz1495507.patch b/man-db-2.7.6.1-fix_rhbz1495507.patch new file mode 100644 index 0000000..a3237f5 --- /dev/null +++ b/man-db-2.7.6.1-fix_rhbz1495507.patch @@ -0,0 +1,90 @@ +From 79308ac147be9e9c889798cba78bab2af05048e1 Mon Sep 17 00:00:00 2001 +From: Jiri Kucera +Date: Wed, 17 Jan 2018 13:57:34 +0100 +Subject: [PATCH] Fix a segfault in 'man -D --help' + +This patch is an adjusted version (due to the patch rejected hunk issues) of its original (by Colin Watson) from: https://git.savannah.gnu.org/cgit/man-db.git/patch/?id=b32977ff73220cd351387abe558fb523d1deedbb + +Reported by Jiri Kucera. + +* src/man.c (init_html_pager): New function. +(parse_opt): Call init_html_pager rather than setting html_pager to +NULL. +(help_filter): Assert that browser is non-NULL. +(main): Call init_html_pager rather than doing the same thing directly. +* NEWS: Document this. +--- + NEWS | 10 ++++++++++ + src/man.c | 17 +++++++++++------ + 2 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/NEWS b/NEWS +index 366a0263..ff35e884 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,3 +1,13 @@ ++man-db 2.7.7 ++============ ++ ++Major changes since man-db 2.7.6.1: ++ ++ Fixes: ++ ------ ++ ++ o Fix a segfault in 'man -D --help'. ++ + man-db 2.7.6.1 (12 December 2016) + ================================= + +diff --git a/src/man.c b/src/man.c +index 8b11f43e..cb0930b8 100644 +--- a/src/man.c ++++ b/src/man.c +@@ -345,6 +345,13 @@ static struct argp_option options[] = { + { 0 } + }; + ++static void init_html_pager (void) ++{ ++ html_pager = getenv ("BROWSER"); ++ if (!html_pager) ++ html_pager = WEB_BROWSER; ++} ++ + static error_t parse_opt (int key, char *arg, struct argp_state *state) + { + static int apropos, whatis; /* retain values between calls */ +@@ -369,7 +376,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) + ditroff = 0; + gxditview = NULL; + htmlout = 0; +- html_pager = NULL; ++ init_html_pager (); + #endif + roff_device = want_encoding = extension = pager = + locale = alt_system_name = external = +@@ -582,6 +589,7 @@ static char *help_filter (int key, const char *text, + # ifdef TROFF_IS_GROFF + case 'H': + browser = html_pager; ++ assert (browser); + if (STRNEQ (browser, "exec ", 5)) + browser += 5; + return xasprintf (text, browser); +@@ -4018,11 +4026,8 @@ int main (int argc, char *argv[]) + + #ifdef TROFF_IS_GROFF + /* used in --help, so initialise early */ +- if (!html_pager) { +- html_pager = getenv ("BROWSER"); +- if (!html_pager) +- html_pager = WEB_BROWSER; +- } ++ if (!html_pager) ++ init_html_pager (); + #endif /* TROFF_IS_GROFF */ + + /* First of all, find out if $MANOPT is set. If so, put it in +-- +2.14.3 + diff --git a/man-db-cache-update.service b/man-db-cache-update.service index fdf08d7..dc218af 100644 --- a/man-db-cache-update.service +++ b/man-db-cache-update.service @@ -1,11 +1,14 @@ [Unit] +DefaultDependencies=no After=local-fs.target +Before=reboot.target shutdown.target halt.target +JobTimeoutSec=15min [Service] Type=oneshot +TimeoutStartSec=infinity Environment=MAN_NO_LOCALE_WARNING=1 EnvironmentFile=/etc/sysconfig/man-db ExecStart=/bin/sh -c '[ "$SERVICE" != "no" ] && /usr/bin/mandb $OPTS || true' -ExecStopPost=/bin/sh -c '[ "$SERVICE_RESULT" == "signal" ] && /usr/bin/systemctl enable man-db-restart-cache-update.service || true' Nice=19 IOWeight=20 diff --git a/man-db-restart-cache-update.service b/man-db-restart-cache-update.service deleted file mode 100644 index 1d0d6ef..0000000 --- a/man-db-restart-cache-update.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Before=multi-user.target - -[Service] -Type=oneshot -ExecStartPre=/usr/bin/rm -rf /var/cache/man/* -ExecStart=/usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update.service -ExecStartPost=/usr/bin/systemctl disable man-db-restart-cache-update.service - -[Install] -WantedBy=multi-user.target diff --git a/man-db.spec b/man-db.spec index 970167c..a8dbd75 100644 --- a/man-db.spec +++ b/man-db.spec @@ -1,43 +1,38 @@ %global cache /var/cache/man +%global gnulib_ver 20140202 Summary: Tools for searching and reading man pages Name: man-db -Version: 2.13.1 -Release: 2%{?dist} +Version: 2.7.6.1 +Release: 9%{?dist} # GPLv2+ .. man-db # GPLv3+ .. gnulib -License: GPL-2.0-or-later AND GPL-3.0-or-later +License: GPLv2+ and GPLv3+ +Group: System Environment/Base URL: http://www.nongnu.org/man-db/ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz -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 +Source1: man-db.crondaily +Source2: man-db.sysconfig +Source3: man-db-cache-update.service +Patch0: man-db-2.7.6.1-change-owner-of-man-cache.patch -Source3: man-db.crondaily -Source4: man-db.sysconfig -Source5: man-db-cache-update.service -Source6: man-db-restart-cache-update.service +# http://lists.nongnu.org/archive/html/man-db-devel/2017-01/msg00013.html +Patch1: man-db-2.7.6.1-fix-override-dir-handling.patch +# http://lists.nongnu.org/archive/html/man-db-devel/2018-01/msg00005.html +# https://bugzilla.redhat.com/show_bug.cgi?id=1495507 +Patch2: man-db-2.7.6.1-fix_rhbz1495507.patch 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) +Provides: bundled(gnulib) = %{gnulib_ver} Requires: coreutils, grep, groff-base, gzip, less -BuildRequires: make -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 -Requires(preun): %{_sbindir}/update-alternatives +BuildRequires: po4a, perl, perl-version %description The man-db package includes five tools for browsing man-pages: @@ -49,6 +44,7 @@ manual pages. %package cron Summary: Periodic update of man-db cache +Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: crontabs @@ -59,32 +55,21 @@ BuildArch: noarch This package provides periodic update of man-db cache. %prep -%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 %build %configure \ - --with-sections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \ + --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \ --disable-setuid --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}" +make CC="%{__cc} %{optflags}" %{?_smp_mflags} V=1 %check make check %install -%make_install prefix=%{_prefix} - -# rename files for alternative usage -for f in man apropos whatis; do - mv %{buildroot}%{_bindir}/$f %{buildroot}%{_bindir}/$f.%{name} - touch %{buildroot}%{_bindir}/$f - mv %{buildroot}%{_mandir}/man1/$f.1 %{buildroot}%{_mandir}/man1/$f.%{name}.1 - touch %{buildroot}%{_mandir}/man1/$f.1 -done +make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} INSTALL='install -p' # move the documentation to the relevant place mv $RPM_BUILD_ROOT%{_datadir}/doc/man-db/* ./ @@ -100,91 +85,59 @@ 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 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/man-db.cron +install -D -p -m 0755 %{SOURCE1} $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 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/man-db +install -D -p -m 0644 %{SOURCE2} $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 %{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 +# man-db-cache-update.service +install -D -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/man-db-cache-update.service %find_lang %{name} %find_lang %{name}-gnulib -%pre -# remove alternativized files if they are not symlinks -for f in man apropos whatis; do - [ -L %{_bindir}/$f ] || %{__rm} -f %{_bindir}/$f >/dev/null 2>&1 || : - [ -L %{_mandir}/man1/$f.1.gz ] || %{__rm} -f %{_mandir}/man1/$f.1.gz >/dev/null 2>&1 || : -done - # stop and disable timer from previous builds +%pre if [ -e /usr/lib/systemd/system/mandb.timer ]; then - if test -d /run/systemd; then - systemctl stop man-db.timer >/dev/null 2>&1 || : - systemctl -q disable man-db.timer >/dev/null 2>&1 || : - fi + if test -d /run/systemd; then + systemctl stop man-db.timer + systemctl -q disable man-db.timer + fi fi -%post -# set up the alternatives files -%{_sbindir}/update-alternatives --install %{_bindir}/man man %{_bindir}/man.%{name} 300 \ - --slave %{_bindir}/apropos apropos %{_bindir}/apropos.%{name} \ - --slave %{_bindir}/whatis whatis %{_bindir}/whatis.%{name} \ - --slave %{_mandir}/man1/man.1.gz man.1.gz %{_mandir}/man1/man.%{name}.1.gz \ - --slave %{_mandir}/man1/apropos.1.gz apropos.1.gz %{_mandir}/man1/apropos.%{name}.1.gz \ - --slave %{_mandir}/man1/whatis.1.gz whatis.1.gz %{_mandir}/man1/whatis.%{name}.1.gz \ - >/dev/null 2>&1 || : - # clear the old cache -%{__rm} -rf %{cache}/* >/dev/null 2>&1 || : - -%preun -if [ $1 -eq 0 ]; then - %{_sbindir}/update-alternatives --remove man %{_bindir}/man.%{name} >/dev/null 2>&1 || : -fi - -%postun -if [ $1 -ge 1 ]; then - if [ "$(readlink %{_sysconfdir}/alternatives/man)" == "%{_bindir}/man.%{name}" ]; then - %{_sbindir}/update-alternatives --set man %{_bindir}/man.%{name} >/dev/null 2>&1 || : - fi -fi +%post +%{__rm} -rf %{cache}/* +# update cache %transfiletriggerin -- %{_mandir} -# update cache if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then - /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update >/dev/null 2>&1 || : + /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update || : fi -%transfiletriggerpostun -- %{_mandir} # update cache +%transfiletriggerpostun -- %{_mandir} if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then - /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update >/dev/null 2>&1 || : + /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update || : fi + %files -f %{name}.lang -f %{name}-gnulib.lang %{!?_licensedir:%global license %%doc} -%license COPYING -%doc README.md man-db-manual.txt man-db-manual.ps ChangeLog NEWS.md +%license docs/COPYING +%doc README man-db-manual.txt man-db-manual.ps ChangeLog NEWS %config(noreplace) %{_sysconfdir}/man_db.conf %config(noreplace) %{_sysconfdir}/sysconfig/man-db -%config(noreplace) %{_tmpfilesdir}/man-db.conf +%config(noreplace) /usr/lib/tmpfiles.d/man-db.conf %{_unitdir}/man-db-cache-update.service -%{_unitdir}/man-db-restart-cache-update.service %{_sbindir}/accessdb -%ghost %{_bindir}/man -%ghost %{_bindir}/apropos -%ghost %{_bindir}/whatis -%{_bindir}/man.%{name} -%{_bindir}/apropos.%{name} -%{_bindir}/whatis.%{name} -%{_bindir}/man-recode +%{_bindir}/man +%{_bindir}/whatis +%{_bindir}/apropos %{_bindir}/manpath %{_bindir}/lexgrog %{_bindir}/catman @@ -197,280 +150,57 @@ fi %{_libexecdir}/man-db/zsoelim %verify(not mtime) %dir %{cache} # documentation and translation -%ghost %{_mandir}/man1/man.1* -%ghost %{_mandir}/man1/apropos.1* -%ghost %{_mandir}/man1/whatis.1* -%{_mandir}/man1/man.%{name}.1* -%{_mandir}/man1/apropos.%{name}.1* -%{_mandir}/man1/whatis.%{name}.1* -%{_mandir}/man1/man-recode.1* +%{_mandir}/man1/apropos.1* %{_mandir}/man1/lexgrog.1* +%{_mandir}/man1/man.1* %{_mandir}/man1/manconv.1* %{_mandir}/man1/manpath.1* +%{_mandir}/man1/whatis.1* %{_mandir}/man5/manpath.5* %{_mandir}/man8/accessdb.8* %{_mandir}/man8/catman.8* %{_mandir}/man8/mandb.8* -%lang(da) %{_datadir}/man/da/man*/* -%lang(de) %{_datadir}/man/de/man*/* -%lang(es) %{_datadir}/man/es/man*/* -%lang(fr) %{_datadir}/man/fr/man*/* -%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*/* -%lang(tr) %{_datadir}/man/tr/man*/* -%lang(zh_CN) %{_datadir}/man/zh_CN/man*/* -%lang(uk) %{_datadir}/man/uk/man*/* +%lang(da) %{_datadir}/man/da/man*/* +%lang(de) %{_datadir}/man/de/man*/* +%lang(es) %{_datadir}/man/es/man*/* +%lang(fr) %{_datadir}/man/fr/man*/* +%lang(id) %{_datadir}/man/id/man*/* +%lang(it) %{_datadir}/man/it/man*/* +%lang(ja) %{_datadir}/man/ja/man*/* +%lang(nl) %{_datadir}/man/nl/man*/* +%lang(pl) %{_datadir}/man/pl/man*/* +%lang(ru) %{_datadir}/man/ru/man*/* +%lang(sv) %{_datadir}/man/sv/man*/* +%lang(zh_CN) %{_datadir}/man/zh_CN/man*/* %files cron %config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron %changelog -* Thu Jul 24 2025 Fedora Release Engineering - 2.13.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon May 05 2025 Lukas Javorsky - 2.13.1-1 -- Rebase to version 2.13.1 - -* Fri Jan 17 2025 Fedora Release Engineering - 2.13.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Aug 29 2024 Packit - 2.13.0-1 -- Update to version 2.13.0 -- Resolves: rhbz#2308476 - -* Thu Jul 18 2024 Fedora Release Engineering - 2.12.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Apr 08 2024 Lukas Javorsky - 2.12.1-1 -- Rebase to version 2.12.1 - -* Mon Jan 29 2024 Fedora Release Engineering - 2.12.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 2.12.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 2.12.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Oct 10 2023 Lukas Javorsky - 2.12.0-3 -- Fix the Source numbering in installation -- Resolves: BZ#2242757 - -* Fri Sep 29 2023 Lukas Javorsky - 2.12.0-2 -- Add GPG verify on the package - -* Wed Sep 27 2023 Lukas Javorsky - 2.12.0-1 -- Rebase to version 2.12.0 -- Patch0 was upstreamed - -* Tue Jul 25 2023 Lukas Javorsky - 2.11.2-5 -- Release bump after added Patch0 from yselkowitz - -* Thu Jul 20 2023 Fedora Release Engineering - 2.11.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 10 2023 Lukas Javorsky - 2.11.2-3 -- Add Recommends to package glibc-gconv-extra -- Justification in BZ#2182414 - -* Thu Jan 19 2023 Fedora Release Engineering - 2.11.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Jan 09 2023 Lukas Javorsky - 2.11.2-1 -- Rebase to version 2.11.2 - -* Fri Nov 18 2022 Lukas Javorsky - 2.11.1-1 -- Rebase to version 2.11.1 -- Add Korean translations -- Resolves: #2142761 - -* Fri Oct 14 2022 Lukas Javorsky - 2.11.0-1 -- Rebase to version 2.11.0 - -* Thu Jul 21 2022 Fedora Release Engineering - 2.10.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Mar 18 2022 Nikola Forró - 2.10.2-1 -- update to 2.10.2 - resolves: #2065447 - -* Fri Feb 11 2022 Nikola Forró - 2.10.1-1 -- update to 2.10.1 - resolves #2053020 - -* Tue Feb 08 2022 Nikola Forró - 2.10.0-3 -- backport upstream fixes for the unstable test - -* Tue Feb 08 2022 Nikola Forró - 2.10.0-2 -- skip unstable test - -* Sun Feb 06 2022 Nikola Forró - 2.10.0-1 -- update to 2.10.0 - resolves #2050778 - -* Thu Jan 20 2022 Fedora Release Engineering - 2.9.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Jul 22 2021 Fedora Release Engineering - 2.9.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Feb 11 2021 Nikola Forró - 2.9.4-1 -- update to 2.9.4 - resolves #1926527 - -* Tue Jan 26 2021 Fedora Release Engineering - 2.9.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Oct 09 2020 Jeff Law - 2.9.3-2 -- Re-enable LTO - -* Tue Oct 06 2020 Nikola Forró - 2.9.3-1 -- update to 2.9.3 - resolves #1849809 - -* Thu Sep 03 2020 Nikola Forró - 2.9.2-6 -- disable LTO to workaround a possible linker bug - related to #1871971 - -* Tue Aug 04 2020 Nikola Forró - 2.9.2-5 -- reenable LTO - -* Tue Jul 28 2020 Nikola Forró - 2.9.2-4 -- disable LTO to avoid linker bug - -* Tue Jul 28 2020 Fedora Release Engineering - 2.9.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 13 2020 Tom Stellard - 2.9.2-2 -- Use make macros -- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro - -* Tue Jun 02 2020 Nikola Forró - 2.9.2-1 -- update to 2.9.2 - resolves #1842624 - -* Sun Mar 01 2020 Nikola Forró - 2.9.1-6 -- fix %pre scriptlet - -* Fri Feb 28 2020 Nikola Forró - 2.9.1-5 -- fix upgrades from non-alternativized versions properly - -* Fri Feb 28 2020 Nikola Forró - 2.9.1-4 -- fix upgrades from non-alternativized versions - -* Wed Feb 26 2020 Nikola Forró - 2.9.1-3 -- fix %postun scriptlet - -* Wed Feb 26 2020 Nikola Forró - 2.9.1-2 -- use alternatives for man, apropos and whatis - -* Wed Feb 26 2020 Nikola Forró - 2.9.1-1 -- update to 2.9.1 - resolves #1807144 - -* Wed Jan 29 2020 Fedora Release Engineering - 2.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jan 09 2020 Nikola Forró - 2.9.0-1 -- update to 2.9.0 - resolves #1764582 - -* Fri Sep 27 2019 Nikola Forró - 2.8.7-2 -- schedule interrupted cache update for the next boot, instead of blocking - system reboot/shutdown - resolves #1678464 - -* Fri Aug 30 2019 Nikola Forró - 2.8.7-1 -- update to 2.8.7 - resolves #1747042 - -* Tue Aug 27 2019 Nikola Forró - 2.8.6.1-1 -- update to 2.8.6.1 - resolves #1742475 - -* Thu Jul 25 2019 Fedora Release Engineering - 2.8.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 2.8.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 07 2019 Nikola Forró - 2.8.4-3 -- prioritize POSIX man pages over perl manuals - resolves #1663919 - -* Wed Nov 07 2018 Nikola Forró - 2.8.4-2 -- get rid of hardcoded path - -* Mon Jul 30 2018 Nikola Forró - 2.8.4-1 -- update to 2.8.4 - resolves #1609438 - -* Fri Jul 13 2018 Fedora Release Engineering - 2.8.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Jul 12 2018 Igor Gnatenko - 2.8.3-3 -- Rebuild for new gdbm - -* Fri Apr 06 2018 Nikola Forró - 2.8.3-2 -- fix version in the name of change-owner-of-man-cache patch - -* Fri Apr 06 2018 Nikola Forró - 2.8.3-1 -- update to 2.8.3 - resolves #1564220 - -* Tue Feb 20 2018 Nikola Forró - 2.7.6.1-15 -- add missing gcc build dependency - -* Thu Feb 08 2018 Fedora Release Engineering - 2.7.6.1-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Feb 03 2018 Todd Zullinger - 2.7.6.1-13 -- Avoid noisy output from man-db-cache-update triggers - -* Tue Jan 16 2018 Jiri Kucera - 2.7.6.1-12 +* Tue Jan 16 2018 Jiri Kucera - 2.7.6.1-9 - fix segmentation fault caused by 'man -D?' resolves: #1495507 -* Tue Jan 16 2018 Nikola Forró - 2.7.6.1-11 -- rebuild with gdbm-1.14 - -* Tue Dec 19 2017 Nikola Forró - 2.7.6.1-10 +* Tue Dec 19 2017 Nikola Forró - 2.7.6.1-8 - fix failure of man-db-cache-update service when configured not to run resolves: #1526715 -* Tue Nov 21 2017 Nikola Forró - 2.7.6.1-9 +* Tue Nov 21 2017 Nikola Forró - 2.7.6.1-7 - allow configuration of man-db-cache-update service through sysconfig resolves: #1514909 -* Tue Nov 21 2017 Nikola Forró - 2.7.6.1-8 +* Tue Nov 21 2017 Nikola Forró - 2.7.6.1-6 - set group of /var/cache/man to root and drop setgid bit resolves: #1515823 -* Thu Nov 16 2017 Nikola Forró - 2.7.6.1-7 +* Thu Nov 16 2017 Nikola Forró - 2.7.6.1-5 - make file trigger scriptlets not to fail in case systemd is unavailable - drop systemd dependency -* Wed Nov 08 2017 Nikola Forró - 2.7.6.1-6 +* Wed Nov 08 2017 Nikola Forró - 2.7.6.1-4 - run cache update in a transient service using systemd-run resolves #1318058 -* Thu Aug 03 2017 Fedora Release Engineering - 2.7.6.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 2.7.6.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - * Fri Feb 10 2017 Fedora Release Engineering - 2.7.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 3118843..90d7f85 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -SHA512 (man-db-2.13.1.tar.xz) = 9b39f512fe940e648ca7f47803f42e473064253b67eb96995d28da30fd322de31a4466bf821e9391e6041af2318a6d2c2d74102b73f4b42a63966b41d2df0578 -SHA512 (man-db-2.13.1.tar.xz.asc) = 0d7f5b58430ce779261f68517c212b0517485300d8ea3d6a8232b0ac6c892671346ce7a4f4c6621b512516ca4c70bc09d5d828ed54a2a27c30ca70d3c77f7cdd -SHA512 (0xac0a4ff12611b6fccf01c111393587d97d86500b) = 6509ce7ccd1b60b71e180e6ea9c6b63788d55c27f013e03609e649ef1e5b4f28b5358a7a7160e192b20c09e16ba5b24c111bd8275f8218029febe872a016448e +SHA512 (man-db-2.7.6.1.tar.xz) = 623c5e7f8b7c289908b2c926f8777293b8d39aeceef0d2509d701a8b0bfa81408650f655c8608318221786c751a79ee91124b07993de5298cd7fa6d8bb737301