diff options
author | Colin Watson <cjwatson@debian.org> | 2022-02-04 15:11:47 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-02-04 15:11:47 +0000 |
commit | 828b489c68a5a022c106656cfdff19bb9b584eec (patch) | |
tree | 7225919cd6e445d94080fa108a1a6b05fb890cf7 /ChangeLog | |
parent | a2d4ffce13a855f29a63bac2099ebe0f5a4e50bd (diff) | |
parent | bfe34108bc20e9d75e3f08bfc8305e4f4cd632a9 (diff) |
Import man-db_2.10.0.orig.tar.xz
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 1469 |
1 files changed, 1441 insertions, 28 deletions
@@ -1,3 +1,1416 @@ +2022-02-04 Colin Watson <cjwatson@debian.org> + + Release man-db 2.10.0 + +2022-01-31 Colin Watson <cjwatson@debian.org> + + gitlab-ci: Run tests with VERBOSE=1 + + This makes it easier to diagnose test failures. + + * .gitlab-ci.yml (build-distcheck:script, build-out-of-tree:script): Set + VERBOSE=1. + +2022-01-31 Colin Watson <cjwatson@debian.org> + + man: Avoid spurious error messages due to subpages + + Since man-db 2.4.2, `man` has behaved as if the `-l` option was given if + a manual page argument contains a slash. Since man-db 2.5.6, this has + interacted slightly poorly with the subpage feature, emitting spurious + error messages if given multiple manual page arguments some of which + include a slash. `man` no longer emits spurious error messages in this + case. + + Fixes Savannah bug #53708. + + * src/man.c (man): Move name-contains-slash case to ... + (man_maybe_local): ... here (new function). + (main): Call man_maybe_local instead of man where checking for names + containing slashes is acceptable. + * NEWS.md: Document this. + +2022-01-31 Colin Watson <cjwatson@debian.org> + + mandb: Fix handling of link target mtimes + + Depending on directory iteration order, mandb sometimes incorrectly + stored the mtime of a symlink as the mtime of its target as well. + + Fixes Debian bug #691643. + + * src/descriptions_store.c (store_descriptions): When adding entries + based on an ult_src trace, use the mtime of the target file if possible + rather than the mtime of the base entry. + * src/tests/Makefile.am (ALL_TESTS): Add mandb-symlink-target-timestamp. + * src/tests/get-mtime.c (main): Use lstat rather than stat. + * src/tests/mandb-symlink-target-timestamp: New file. + * NEWS.md: Document this. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + Update translation files + + * po/man-db.pot, po/*.po: Update. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + Update to Gnulib 20220130 + + * bootstrap: Sync to Gnulib 735f319cde4ab7e98294557181d682564241d846. + * bootstrap.conf (GNULIB_REVISION): Set to + 735f319cde4ab7e98294557181d682564241d846. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + Simplify static analysis of fatal errors + + The usual idiom for fatal error reporting in man-db is `error (FATAL, + ...)` (there are a few cases using different exit codes, but they're + less common). Unfortunately, there's no easy way to tell the compiler + that this call doesn't return, because `error (0, ...)` *does* return. + As a result, some call sites required extra work to give the compiler + this information, which can sometimes make a difference to static + analysis. + + To simplify this, add a new `fatal` helper function which always exits + `FATAL` (i.e. 2) and never returns. This is declared with `_Noreturn` + so that the compiler can straightforwardly know what's going on. + + * bootstrap.conf (gnulib_modules): Add verror. + (XGETTEXT_OPTIONS): Add --flag=fatal:2:c-format. + * lib/fatal.c, lib/fatal.h: New files. + * lib/Makefile.am (libman_la_SOURCES): Add fatal.c and fatal.h. + * src/tests/Makefile.am (AM_CPPFLAGS): Add -I$(top_srcdir)/lib. + (get_mtime_LDADD): Add $(top_builddir)/lib/libman.la. + + * lib/pathsearch.c (pathsearch, directory_on_path): Use fatal. + * lib/sandbox.c (can_load_seccomp, make_seccomp_filter, _sandbox_load): + Likewise. + * lib/security.c (gripe_set_euid): Likewise. + * lib/xregcomp.c (xregcomp): Likewise. + * libdb/db_lookup.c (gripe_corrupt_data, dblookup_pattern): Likewise. + * libdb/db_ver.c (dbver_wr): Likewise. + * src/accessdb.c (main): Likewise. + * src/catman.c (parse_for_sec): Likewise. + * src/check_mandirs.c (chown_if_possible): Likewise. + * src/man-recode.c (recode): Likewise. + * src/man.c (open_cat_stream, format_display, gripe_converting_name): + Likewise. + * src/manconv.c (add_output): Likewise. + * src/manp.c (add_dir_to_path_list): Likewise. + * src/tests/get-mtime.c (main): Likewise. + * src/whatis.c (do_apropos): Likewise. + * src/zsoelim.l (<so>\"?[^ \t\n\"]+\"?): Likewise. + + * libdb/db_lookup.c (gripe_corrupt_data, gripe_replace_key): Declare as + _Noreturn. + + * src/accessdb.c (main): Remove now-unnecessary assertion. + * src/man.c (gripe_converting_name): Remove now-unnecessary abort. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + docs: Move COPYING and COPYING.LIB to top level + + I think people are more likely to expect to find them here - I recently + even found myself confused by their previous placement. + + * docs/COPYING, docs/COPYING.LIB: Move to ... + * COPYING, COPYING.LIB: ... here, respectively. + * lib/README: Update references. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + man: Don't modify MANSECT environment variable + + Reported and diagnosed by Rob Hoelz. Fixes Savannah bug #58896. + + * src/man.c (get_section_list): Copy colon_sep_section_list before + passing it to strtok. + * NEWS.md: Document this. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + libdb: Pacify gcc -Wempty-body + + * libdb/mydbm.h (MYDBM_REORG) [NDBM, BTREE]: Change no-op macro + definition to avoid "suggest braces around empty body" warning in mandb. + +2022-01-30 Alejandro Cendejas Tena <alex.cendejas@gmail.com> + + Update Spanish manual page translation + + * man/po4a/po/es.po: Update from Translation Project. + +2022-01-30 Colin Watson <cjwatson@debian.org> + + mandb: Don't modify DB without changing its mtime + + In d9ebedad15 (man-db 2.7.0), mandb started relying on the modification + times of database files themselves rather than using a special row, in + order to make databases reproducible between otherwise-identical + installations (subject to predictable behaviour from the underlying + database). + + There was a difficulty with this change. Because purging deleted pages + from the database opened and closed the database in a separate phase + before the main phase of looking for updated manual pages, and because + the main phase relies on comparing against the mtime of the database to + find changed files, I had to arrange to restore the original mtime at + the end of the purge phase in order to avoid confusing the main phase + into being a no-op. However, in some cases (perhaps due to other bugs, + but nevertheless), it's possible for the purge phase to find work to do + without the main phase ever finding any modified directories, which + meant that the net effect of mandb would be to modify its database + without changing its mtime. This is bad form, and confused some backup + systems into believing that the filesystem had been corrupted, since + files having their contents changed without updating their mtime is + indeed a likely symptom of filesystem corruption. + + To avoid this, restructure our database-handling code so that a given + mandb run opens any given database at most once. This means that we no + longer need to modify mtimes manually, so the usual filesystem rules + apply. + + Fixes Debian bug #1004355 and Ubuntu bug #1411633. + + * bootstrap.conf (gnulib_modules): Remove futimens. + * libdb/db_btree.c (man_btree_close): Rename to ... + (man_btree_free): ... this. Check whether wrap->file is set. Free + wrap->mtime. + (man_btree_new): New function. + (man_btree_open): Convert to running on the result of man_btree_new. + (man_btree_get_time): Cache return value in wrap->mtime. + (man_btree_set_time): Remove. + * libdb/db_gdbm.c (man_gdbm_new): New function. + (man_gdbm_open_wrapper): Convert to running on the result of + man_gdbm_new. + (man_gdbm_get_time): Cache return value in wrap->mtime. + (man_gdbm_set_time): Remove. + (raw_close): Check whether wrap->file is set. + (man_gdbm_close): Rename to ... + (man_gdbm_free): ... this. + * libdb/db_ndbm.c (raw_close): Check whether wrap->file is set. + (man_ndbm_close): Rename to ... + (man_ndbm_free): ... this. + (man_ndbm_new): New function. + (man_ndbm_open): Convert to running on the result of man_ndbm_new. + (man_ndbm_get_time): Cache return value in wrap->mtime. + (man_ndbm_set_time): Remove. + * libdb/db_xdbm.c (man_xdbm_close): Rename to ... + (man_xdbm_free): ... this. Update all callers. Free dbf->mtime. + * libdb/db_xdbm.h (man_xdbm_close): Rename to ... + (man_xdbm_free): ... this. + * libdb/mydbm.h (man_gdbm_wrapper, man_ndbm_wrapper, man_btree_wrapper): + Add mtime. + (man_gdbm_new, man_ndbm_new, man_btree_new): Add prototypes. + (man_gdbm_open_wrapper, man_ndbm_open, man_btree_open): Update + prototypes. + (man_gdbm_set_time, man_ndbm_set_time, man_btree_set_time): Remove + prototypes. + (man_gdbm_close, man_ndbm_close, man_btree_close): Rename to ... + (man_gdbm_free, man_ndbm_free, man_btree_free): ... these, respectively. + (MYDBM_NEW): New macro. + (MYDBM_CTRWOPEN, MYDBM_RWOPEN, MYDBM_RDOPEN): Rename file argument to + wrap. + (MYDBM_CLOSE): Rename to ... + (MYDBM_FREE): ... this. + (MYDBM_SET_TIME): Remove macro. + + * src/catman.c (parse_for_sec): Take a MYDBM_FILE argument rather than a + database path. + * src/check_mandirs.c (gripe_rwopen_failed, testmandirs, create_db, + update_db, purge_missing): Likewise. + * src/mandb.c (update_one_file, update_db_wrapper): Likewise. + * src/straycats.c (straycats): Likewise. + * src/check_mandirs.h (create_db, update_db, purge_missing): Update + prototypes. + * src/straycats.h (straycats): Likewise. + + * src/check_mandirs.c (ensure_db_open): New function. + (testmandirs): Only open the database if it wasn't already open, and + don't close it. + (update_db, purge_missing): Likewise. + * src/mandb.c (update_one_file): Likewise. + * src/straycats.c (straycats): Assert that the database is already open, + and don't close it. + + * src/accessdb.c (main): Update database opening code. + * src/catman.c (post_fork): Update database closing code. + (parse_for_sec): Move database opening and closing code to ... + (main): ... here, and update it. + * src/man.c (dbdelete_wrapper): Update database opening and closing + code. + * src/whatis.c (search): Update database opening and closing code. + + * src/check_mandirs.c (purge_missing): Don't reorganize the database. + * src/mandb.c (mandb): Create a MYDBM_FILE from the database path, and + close and free it before returning. Rearrange purging so that it runs + on the temporary database copy, which we close and remove if + purge_missing finds a consistency problem requiring us to rescan from + scratch. Unless purging requires a rescan, all of the purge, main, and + stray cats phases now run on the same open database file. Reorganize + the database before closing it if the purge phase did any work. + (process_manpath): Rename the temporary database into place if either of + the purge or stray cats phases did any work, even if the main phase + didn't. + + * src/check_mandirs.c (update_db_time): Remove. + (create_db): Don't manually update the database mtime. + (update_db, purge_missing): Likewise. + + * src/tests/Makefile.am (ALL_TESTS): Add mandb-purge-updates-timestamp. + (check_PROGRAMS): Add get-mtime. + (get_mtime_SOURCES, get_mtime_LDADD): Add. + * src/tests/get-mtime.c: New file: test helper to get a file's mtime + portably. + * src/tests/mandb-purge-updates-timestamp: New file. + * .gitignore: Add src/tests/get-mtime. + + * NEWS: Document this. + +2022-01-29 Colin Watson <cjwatson@debian.org> + + man: Make dbdelete_wrapper use the correct database + + Even if it has permissions to delete stale entries from the database, + dbdelete_wrapper can't assume that the most recently opened database is + the one from which it should delete the entry; it needs to use the + database to which the candidate in question belongs. + + * src/man.c (database): Remove global variable. + (dbdelete_wrapper): Add a manpath argument, and attempt to open the + associated database locally. + (display_database_check): Pass the candidate's path (i.e. manpath) to + dbdelete_wrapper. + (try_db): Make the database path a local variable. Reorganize cleanup + paths. + (main): Stop freeing database, since it's no longer a global variable. + +2022-01-29 Colin Watson <cjwatson@debian.org> + + mandb: Fix some details of error handling + + * src/check_mandirs.c (testmandirs): Return -1 rather than -errno on + failure to create the database. + (create_db, update_db): Only call update_db_time if amount > 0, rather + than if it is non-zero (since it may be negative to indicate an error, + and updating the database time doesn't make sense in that case). + (update_db): Return -1 rather than EOF. + * src/mandb.c (update_db_wrapper): Check whether amount is non-zero + rather than whether it is unequal to EOF. + +2022-01-29 Colin Watson <cjwatson@debian.org> + + libdb: Remove unused MYDBM_CRWOPEN macro + + * libdb/mydbm.h (MYDBM_CRWOPEN): Remove. + +2022-01-29 Colin Watson <cjwatson@debian.org> + + mandb: Call purge_missing and straycats from mandb + + We can simplify some logic by pushing these down a layer. + + * src/check_mandirs.c (purge_missing): Remove will_run_mandb argument, + which was always true due to --filename implying --no-purge. + * src/check_mandirs.h (purge_missing): Update prototype. + * src/mandb.c (process_manpath): Move purge_missing and straycats calls + to ... + (mandb): ... here. + +2022-01-29 Colin Watson <cjwatson@debian.org> + + mandb: Factor out some duplicate code + + * src/mandb.c (mandb): Move common create/update logic outside the + database-type-specific #ifdefs. + +2022-01-26 Colin Watson <cjwatson@debian.org> + + Use bool in more places in mandb + + * src/check_mandirs.c (testmandirs): Change "create" parameter and + "created" local variable types to bool. Update all callers. + (check_multi_key): Change "valid" local variable to bool. + (purge_missing): Change "will_run_mandb" parameter and "db_exists" local + variable types to bool. Update all callers. + * src/check_mandirs.h (purge_missing): Update prototype. + * src/mandb.c (struct tried_catdirs_entry): Change "seen" element type + to bool. Update all users. + (mandb): Change "should_create" and "cachedir_tag_exists" local variable + types to bool. + (process_manpath): Change "run_mandb" local variable type to bool. + (is_lang_dir): Return bool. + +2022-01-26 Yi-Jyun Pan <pan93412@gmail.com> + + Update Traditional Chinese translation + + * po/zh_TW.po: Update from Translation Project. + * man/THANKS: Update translator credit. + +2022-01-25 Colin Watson <cjwatson@debian.org> + + Add Spanish translator credit + + * man/THANKS: Add translator credit. + +2022-01-25 Petr Pisar <petr.pisar@atlas.cz> + + Update Czech translation + + * po/cs.po: Update from Translation Project. + * man/THANKS: Add translator credit. + +2022-01-24 Mario Blättermann <mario.blaettermann@gmail.com> + + Update German manual page translation + + * man/po4a/po/de.po: Update from Translation Project. + +2022-01-24 Alejandro Cendejas Tena <alex.cendejas@gmail.com> + + Update Spanish manual page translation + + * man/po4a/po/es.po: Update from Translation Project. + +2022-01-24 Alejandro Cendejas Tena <alex.cendejas@gmail.com> + + Update Spanish manual page translation + + * man/po4a/po/es.po: Update from Translation Project. + +2022-01-24 Colin Watson <cjwatson@debian.org> + + Fix upload/release machinery to handle .tar.xz + + Release man-db 2.10.0-pre1 + +2022-01-24 Colin Watson <cjwatson@debian.org> + + Improve documentation of search path handling + + Fixes Savannah bug #61862. + + * man/man5/manpath.man5 (SEARCH PATH): New section. + * man/man1/apropos.man1 (ENVIRONMENT): Refer to manpath(5) for details + of MANPATH. + * man/man1/man.man1 (ENVIRONMENT): Likewise. + * man/man1/manpath.man1 (ENVIRONMENT): Likewise. + * man/man1/whatis.man1 (ENVIRONMENT): Likewise. + * man/man8/catman.man8 (ENVIRONMENT): Likewise. + +2022-01-24 Colin Watson <cjwatson@debian.org> + + Fix typos in descriptions of --systems + + Fixes Savannah bug #61861. + + * man/man1/apropos.man1 (OPTIONS): "system's" → "systems'". + * man/man1/man.man1 (Finding manual pages): Likewise. + * man/man1/manpath.man1 (OPTIONS): Likewise. + * man/man1/whatis.man1 (OPTIONS): Likewise. + +2022-01-24 Colin Watson <cjwatson@chiark.greenend.org.uk> + + Merge branch 'optimize-decompression' into 'main' + + Significantly improve mandb performance + + See merge request cjwatson/man-db!2 + +2022-01-24 Colin Watson <cjwatson@debian.org> + + Optimize manconv_inprocess for UTF-8 target encoding + + If the target encoding is UTF-8, then manconv's first stage (trial + conversion from UTF-8) can more efficiently be replaced with UTF-8 + validation, leaving the original decompressed buffer unchanged on + success. Suggested by Steinar H. Gunderson. + + * src/manconfig.h (UNLIKELY): New macro. + * src/decompress.c (decompress_inprocess_buf): New function. + * src/decompress.h (decompress_inprocess_buf): Add prototype. + * src/utf8.c, src/utf8.h: New files, based on glib's UTF-8 validation + code. + * src/manconv_client.c (manconv_inprocess): Optimize case where + source_encoding is not UTF-8 and target_encoding is UTF-8 by returning + early if UTF-8 validation passes. + * src/Makefile.am (lexgrog_SOURCES, man_SOURCES, man_recode_SOURCES, + mandb_SOURCES): Add utf8.c and utf8.h. + +2022-01-24 Colin Watson <cjwatson@debian.org> + + Significantly improve mandb performance + + Forking large numbers of subprocesses is slow. An ideal fix would + involve work in libpipeline (e.g. generator functions or + multithreading), but in the meantime we can do much better in the common + case of moderately-sized pages compressed using zlib by doing in-process + decompression. On my test system, this takes `mandb -c` from 344 + seconds (or 152 seconds with `MAN_DISABLE_SECCOMP=1` before 50200d151d, + or 78 seconds with `MAN_DISABLE_SECCOMP=1` after 50200d151d) to 10 + seconds. + + Thanks to Steinar H. Gunderson for a proof of concept, which I reworked + extensively. + + Fixes Debian bugs #630799 and #1003089, and Ubuntu bug #1858777. + + * NEWS.md: Document this. Bump version to 2.10.0. + * src/decompress.c (enum decompress_tag): Add DECOMPRESS_INPROCESS. + (struct decompress_inprocess): New structure. + (struct decompress): Add an inprocess element. + (decompress_new_inprocess, decompress_try_zlib, decompress_is_pipeline, + decompress_inprocess_len, decompress_inprocess_replace): New functions. + (decompress_open): Add flags argument. Try in-process zlib + decompression if requested via DECOMPRESS_ALLOW_INPROCESS. Update all + callers to pass a flags argument (0 unless otherwise stated). + (decompress_start, decompress_read, decompress_peek, + decompress_peek_skip, decompress_readline, decompress_peekline, + decompress_wait, decompress_free): Implement in-process mode. + * src/decompress.h (DECOMPRESS_ALLOW_INPROCESS): Define. + (decompress_open): Update prototype. + (decompress_fdopen): Update comment to indicate that this always uses + pipeline-based decompression. + (decompress_is_pipeline, decompress_inprocess_len, + decompress_inprocess_replace): Add prototypes. + (decompress_start, decompress_wait): Update comments to document + behaviour for in-process decompressors. + + * src/manconv.c (add_output): Add output buffer argument; append to + output buffer if given, otherwise write to stdout as before. + (try_iconv): Add and pass output buffer argument. + (manconv): Likewise. Update all callers to pass output buffer argument + (NULL unless otherwise stated). + * src/manconv.h (struct manconv_outbuf): New structure. + (manconv): Update prototype. + * src/manconv_client.c (manconv_inprocess): New function. + * src/manconv_client.h (manconv_inprocess): Add prototype. + + * src/lexgrog.l (find_name): Request in-process decompression unless + operating on a cat page. Use manconv_inprocess rather than add_manconv + in the in-process case. + * src/man.c (grep): Request in-process decompression. + * src/ult_src.c (ult_src): Likewise. + * src/zsoelim.l (try_compressed, zsoelim_open_file): Likewise. + +2022-01-24 Colin Watson <cjwatson@debian.org> + + Avoid a manconv subprocess in more cases + + Suggested by Steinar H. Gunderson. + + * src/manconv_client.c (add_manconv): Return early if the source and + target encodings are equal, not just if they're both UTF-8. + +2022-01-22 Colin Watson <cjwatson@debian.org> + + Make manconv error handling less abrupt + + Exiting immediately on errors works OK if manconv is only ever used in a + subprocess, but that approach makes it hard to use in an in-process + context. + + * src/manconv.c (add_output): New function, factored out of try_iconv + and manconv. + (tried_iconv): New enumeration. + (try_iconv): Use add_output. Return TRIED_ICONV_FATAL where we would + previously have exited the process. + (manconv): Use add_output. Return non-zero if add_output returns + non-zero or try_iconv returns TRIED_ICONV_FATAL. + * src/manconv.h (manconv): Update prototype. + * src/manconv_client.c (manconv_stdin): Exit with FATAL if manconv + returns non-zero. + * src/manconv_main.c (main): Likewise. + +2022-01-22 Colin Watson <cjwatson@debian.org> + + Clarify argument naming in add_manconv + + Suggested by Steinar H. Gunderson. + + * src/manconv_client.c (add_manconv): Rename source to source_encoding, + and target to target_encoding. + * src/manconv_client.h (add_manconv): Update prototype. + +2022-01-19 Colin Watson <cjwatson@debian.org> + + Add a layer of abstraction to decompression + + It would be useful to have an optimized version of the common case of + zlib decompression that doesn't involve forking subprocesses. As + preparation for this, insert an abstraction layer around code that reads + from decompressors. This abstraction layer looks almost identical to + the `libpipeline` API except for name changes, but having it allows us + to implement decompression in some other way. + + Code that requires `libpipeline`-based decompression can use + `decompress_get_pipeline` to assert that the decompressor uses + `libpipeline` and return the underlying `pipeline *`. + + * src/decompress.c (enum decompress_tag, struct decompress, + decompress_new_pipeline, decompress_get_pipeline, decompress_start, + decompress_read, decompress_peek, decompress_peek_skip, + decompress_readline, decompress_peekline, decompress_wait, + decompress_free): Add. + (decompress_open, decompress_fdopen): Return `decompress *` rather than + `pipeline *`. + * src/decompress.h (decompress): New typedef. + (decompress_open, decompress_fdopen): Update prototypes. + (decompress_get_pipeline, decompress_start, decompress_read, + decompress_peek, decompress_peek_skip, decompress_readline, + decompress_peekline, decompress_wait, decompress_free): Add prototypes. + + * src/lexgrog.l (YY_INPUT, find_name, find_name_decompressed): Use + decompression API. + * src/man-recode.c (recode): Likewise. + * src/man.c (get_preprocessors_from_file, get_preprocessors, + make_roff_command, format_display_and_save, format_display, + display_catman, display, display_pages, grep): Likewise. + * src/manconv.c (check_preprocessor_encoding, try_iconv, manconv): + Likewise. + * src/manconv_client.c (manconv_stdin): Likewise. + * src/manconv_main.c (main): Likewise. + * src/straycats.c (check_for_stray): Likewise. + * src/ult_src.c (ult_src): Likewise. + * src/zsoelim.l (YY_INPUT, <<EOF>>, zsoelim_parse_file, try_compressed, + zsoelim_open_file): Likewise. + + * src/lexgrog.h (find_name_decompressed): Update prototype. + * src/manconv.h (check_preprocessor_encoding, manconv): Likewise. + +2022-01-19 Alejandro Cendejas Tena <alex.cendejas@gmail.com> + + Update Spanish manual page translation + + * man/po4a/po/es.po: Update from Translation Project. + +2022-01-18 Colin Watson <cjwatson@debian.org> + + Fix missing options when invoking troff + + Broken by 000cda3ec5. + + * configure.ac: Move PROG_TROFF definition after all assignments to + $troff. + +2022-01-18 Colin Watson <cjwatson@debian.org> + + Fix override-dir handling + + Broken by 000cda3ec5. + + * m4/man-arg-override-dir.m4 (MAN_ARG_OVERRIDE_DIR): Remove superfluous + "$" from AC_DEFINE_UNQUOTED call. + +2022-01-17 Colin Watson <cjwatson@debian.org> + + Remove AM_MAINTAINER_MODE + + I enabled this in fb4afb0b75, saying that timestamps were too fragile + for the rebuild rules to work well. However, I've changed my mind: git + is good at making sure that file modification times are updated when + checking out a different commit, and tarballs include timestamp + information. Moreover, with `AM_MAINTAINER_MODE` and without passing + `--enable-maintainer-mode`, flex output isn't automatically regenerated, + which is impossibly annoying and has tripped me up countless times since + 2010. + + * configure.ac (AM_MAINTAINER_MODE): Remove. + +2022-01-17 Colin Watson <cjwatson@debian.org> + + NEWS.md: Document previous commit + +2022-01-17 Colin Watson <cjwatson@chiark.greenend.org.uk> + + Merge branch 'C0rn3j-main-patch-74046' into 'main' + + man-db.timer: Use RandomizedDelaySec over AccuracySec + + See merge request cjwatson/man-db!1 + +2022-01-17 Colin Watson <cjwatson@debian.org> + + Avoid libpipeline linkage in libman + + Since it's only used by one function, and not all of man-db's tools need + libpipeline in their own right (e.g. accessdb), it seems worth pushing + this up a layer. + + * lib/encodings.c (struct conversion_entry, conversion_table, + convert_encoding, check_preprocessor_encoding): Move to ... + * src/manconv.c: ... here. + * lib/encodings.h (check_preprocessor_encoding): Move to ... + * src/manconv.h: ... here. + * lib/Makefile.am (libman_la_CPPFLAGS): Remove $(libpipeline_CFLAGS). + (libman_la_LDFLAGS): Remove $(libpipeline_LIBS). + * src/man-recode.c, src/man.c, src/manconv.c: Include manconv.h. + +2022-01-17 Colin Watson <cjwatson@debian.org> + + Pacify cppcheck in check_preprocessor_encoding + + * lib/encoding.c (check_preprocessor_encoding): Explicitly initialize + directive_end and ppsearch. If directive is non-NULL by the time these + are used then they're always initialized, but cppcheck didn't manage to + spot that. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Update to Gnulib 20220116 + + * bootstrap: Sync to Gnulib 1eae0f7ea3c220d054025f2c9211700665f9f4a0. + * bootstrap.conf (GNULIB_REVISION): Set to + 1eae0f7ea3c220d054025f2c9211700665f9f4a0. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move some more declarations out of manconfig.h + + Header includes should be in the same translation unit as the code that + uses them rather than being ambient across the whole project. + + * include/manconfig.h: Remove obsolete header comment about program + paths. + + * include/manconfig.h: Remove includes of "xvasprintf.h", <stddef.h>, + "xalloc.h", and "xstrndup.h", as well as "struct pipeline" declaration. + Update all files that relied on these to include/declare them directly + instead as needed. + + * include/manconfig.h (MAN_DB, mkdbname): Move to ... + * libdb/mydbm.h: ... here. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move appendstr out of manconfig.h + + * include/manconfig.h (appendstr): Move to ... + * lib/appendstr.h: ... here (new file). + * lib/Makefile.am (libman_la_SOURCES): Add appendstr.h. + * lib/README: Update file names. + * lib/appendstr.c, libdb/db_delete.c, src/catman.c, src/check_mandirs.c, + src/compression.c, src/filenames.c, src/globbing.c, src/man.c, + src/manconv_client.c, src/manconv_main.c, src/manp.c, src/straycats.c, + src/whatis.c, src/zsoelim.l: Include appendstr.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move debug-related declarations out of manconfig.h + + * include/manconfig.h (debug_level, init_debug, debug, debug_error): + Move to ... + * lib/debug.h: ... here (new file). + * lib/Makefile.am (libman_la_SOURCES): Add debug.h. + * lib/README: Update file names. + * lib/debug.c, lib/encodings.c, lib/sandbox.c, lib/security.c, + lib/util.c, libdb/db_btree.c, libdb/db_delete.c, libdb/db_gdbm.c, + libdb/db_lookup.c, libdb/db_store.c, libdb/db_ver.c, src/accessdb.c, + src/catman.c, src/check_mandirs.c, src/descriptions.c, + src/descriptions_store.c, src/filenames.c, src/globbing.c, + src/globbing_test.c, src/lexgrog_test.c, src/man-recode.c, src/man.c, + src/manconv.c, src/manconv_main.c, src/mandb.c, src/manp.c, + src/manpath.c, src/straycats.c, src/ult_src.c, src/whatis.c, + src/zsoelim.l, src/zsoelim_main.c: Include debug.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move create_tempdir out of manconfig.h + + * include/manconfig.h (create_tempdir): Move to ... + * lib/tempfile.h: ... here (new file). + * lib/Makefile.am (libman_la_SOURCES): Add tempfile.h. + * lib/tempfile.c, src/man.c: Include tempfile.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move util.c-related declarations out of manconfig.h + + * include/manconfig.h (is_changed, is_directory, escape_shell, + remove_directory, trim_spaces, lang_dir, init_locale): Move to ... + * lib/util.h: ... here (new file). + * lib/Makefile.am (libman_la_SOURCES): Add util.h. + * lib/util.c, src/accessdb.c, src/catman.c, src/check_mandirs.c, + src/descriptions.c, src/globbing.c, src/globbing_test.c, src/lexgrog.l, + src/lexgrog_test.c, src/man-recode.c, src/man.c, src/manconv_main.c, + src/mandb.c, src/manp.c, src/manpath.c, src/straycats.c, src/whatis.c, + src/zsoelim_main.c: Include util.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move comp_info and comp_file out of manconfig.h + + * include/manconfig.h (comp_info, comp_file): Move to ... + * src/compression.h: ... here (new file). + * src/Makefile.am (lexgrog_SOURCES, man_SOURCES, man_recode_SOURCES, + mandb_SOURCES): Add compression.h. + * src/compression.c, src/filenames.c, src/man-recode.c, src/man.c, + src/straycats.c, src/ult_src.c: Include compression.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move straycats out of manconfig.h + + * include/manconfig.h (straycats): Move to ... + * src/straycats.h: ... here (new file). + * src/Makefile.am (mandb_SOURCES): Add straycats.h. + * src/mandb.c, src/straycats.c: Include straycats.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Use lexgrog type definitions consistently + + * include/manconfig.h (MANPAGE, CATPAGE): Move to ... + * src/lexgrog.h (MANPAGE, CATPAGE): ... here. + * src/lexgrog.l (find_name, find_name_decompressed): Compare p_lg->type + against CATPAGE rather than testing its truth value. + * src/lexgrog_test.c (main): Set type to MANPAGE/CATPAGE rather than + 0/1. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Update translation files + + * po/man-db.pot, po/*.po: Update. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Fix build system following changes to include/*.h + + * Makefile.am (noinst_HEADERS): Add include/comp_src.h and + include/manconfig.h. + * lib/Makefile.am (libman_la_CPPFLAGS): Replace + -I$(top_builddir)/include with -I$(top_srcdir)/include. + * libdb/Makefile.am (libmandb_la_CPPFLAGS): Likewise. + * src/Makefile.am (AM_CPPFLAGS): Likewise. + * src/tests/Makefile.am (AM_CPPFLAGS): Likewise. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Remove Checker support + + The GNU Checker package was last released in 2005, and its web page + (https://www.gnu.org/software/checker/) says that it has been + decommissioned in favour of Valgrind. + + * include/manconfig.h (chkr_garbage_detector): Remove. + * src/man.c (main): Remove call to chkr_garbage_detector. + * src/mandb.c (main): Likewise. + * src/whatis.c (search): Likewise. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Remove obsolete include/README + + * include/README: Remove; it claimed that this directory contains files + created by configure, which is no longer true, and it said nothing else + useful. + * Makefile.am (dist_noinst_DATA): Remove include/README. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Stop generating include/*.h from configure + + This was inconvenient when making changes to those central header files. + All `configure`-generated preprocessor symbols are now in `config.h`. + + * configure.ac: Define various PROG_* symbols. Remove AC_SUBST calls + for compressors and decompressors. + (AC_CONFIG_FILES): Remove include/comp_src.h and include/manconfig.h. + * m4/man-arg-override-dir.m4: Define OVERRIDE_DIR symbol. + * include/manconfig.h.in: Rename to ... + * include/manconfig.h: ... this. Remove PROG_*, OVERRIDE_DIR, and + COMPRESS_EXT definitions. + * include/comp_src.h.in: Rename to ... + * include/comp_src.h: ... this. + * README.md: Update references to include/manconfig.h. + * .gitignore: Remove include/*.h. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Rename program preprocessor symbols to PROG_* + + This is mainly in order to avoid potential confusion with `PIC` (defined + when building position-independent code), but I renamed all these + variables for consistency. + + * include/manconfig.h.in (PAGER, CAT, WEB_BROWSER, TR, GREP, TROFF, + NROFF, EQN, NEQN, TBL, COL, VGRIND, REFER, GRAP, PIC, COMPRESSOR, + GUNZIP, UNCOMPRESS, BUNZIP2, UNLZMA, UNXZ, LZIP, UNZSTD): Rename to ... + (PROG_PAGER, PROG_CAT, PROG_BROWSER, PROG_TR, PROG_GREP, PROG_TROFF, + PROG_NROFF, PROG_EQN, PROG_NEQN, PROG_TBL, PROG_COL, PROG_VGRIND, + PROG_REFER, PROG_GRAP, PROG_PIC, PROG_COMPRESSOR, PROG_GUNZIP, + PROG_UNCOMPRESS, PROG_BUNZIP2, PROG_UNLZMA, PROG_UNXZ, PROG_LZIP, + PROG_UNZSTD): ... these (respectively). Update all references. + +2022-01-16 Colin Watson <cjwatson@debian.org> + + Move lexgrog-related bits out of manconfig.h + + It's generally cleaner for things like this to be in a dedicated header + file. + + * include/manconfig.h.in (struct lexgrog, find_name, + find_name_decompressed): Move to ... + * src/lexgrog.h: ... here (new file). Simplify declarations slightly. + * include/manconfig.h.in (lexgrog filter enum): Move to ... + * src/lexgrog.l: ... here. + * src/Makefile.am (lexgrog_SOURCES, mandb_SOURCES): Add lexgrog.h. + * src/check_mandirs.c, src/lexgrog.l, src/lexgrog_test.c, + src/straycats.c: Include lexgrog.h. + +2022-01-16 Martin <spleefer90@gmail.com> + + man-db.timer: Use RandomizedDelaySec Avoids congesting resources, otherwise this runs daily at 12:00 and 00:00 https://www.freedesktop.org/software/systemd/man/systemd.timer.html + +2022-01-09 Colin Watson <cjwatson@debian.org> + + Recognize Arabic and Persian translations of NAME + + * src/lexgrog.l (ar_name, fa_name): Add. + (name): Add ar_name and fa_name. + * NEWS.md: Document this. + +2022-01-09 Colin Watson <cjwatson@debian.org> + + Note Macedonian support + + * src/lexgrog.l: Note that bg_name also works for mk (Macedonian). + +2022-01-09 Colin Watson <cjwatson@debian.org> + + Downgrade "malformed .lf request" warning to debug + + Fixes Debian bug #998426. + + * src/zsoelim.l (<lfnumber,lfname>.): Downgrade and rephrase message, + since *roff arithmetic expressions are valid here and we can't + reasonably parse them. + * NEWS.md: Document this. + +2022-01-09 Colin Watson <cjwatson@debian.org> + + NEWS.md: Fix rendering with some parsers + +2022-01-09 Colin Watson <cjwatson@debian.org> + + Use MAYBE_UNUSED rather than _GL_UNUSED + + We should be using the public name from Gnulib's `attribute.h`. + + * lib/orderfiles.c (order_files) [!HAVE_LINUX_FIEMAP_H && + !HAVE_POSIX_FADVISE]: Use MAYBE_UNUSED rather than _GL_UNUSED. + * lib/sandbox.c (_sandbox_load) [!HAVE_LIBSECCOMP]: Likewise. + * lib/security.c (drop_privs): Likewise. + * libdb/db_ndbm.c (unsorted_nextkey): Likewise. + * src/accessdb.c (help_filter): Likewise. + * src/check_mandirs.c (chown_if_possible) [!MAN_OWNER]: Likewise. + * src/convert.c (close_conv_to_locale): Likewise. + * src/decompress.c (decompress_zlib): Likewise. + * src/lexgrog_test.c (help_filter): Likewise. + * src/man.c (help_filter, squeeze_blank_lines, disable_hyphenation, + disable_justification): Likewise. + * src/manconv.c (manconv): Likewise. + * src/manp.c (free_config_file): Likewise. + * src/tests/fspause.c (main): Likewise. + * src/whatis.c (help_filter): Likewise. + * src/zsoelim_main.c (parse_opt): Likewise. + +2022-01-09 Colin Watson <cjwatson@debian.org> + + lexgrog: Produce output in the user's locale + + Fixes Debian bug #970482. + + * src/whatis.c (simple_convert): Move to ... + * src/convert.c: ... here (new file). Rename to convert_to_locale, and + automatically handle setup/teardown of the iconv descriptor. + * src/convert.h: New file. + + * src/whatis.c (display): Use convert_to_locale instead of + simple_convert. + (main): Remove setup/teardown of iconv descriptor, now handled + automatically by convert_to_locale. + * src/lexgrog_test.c (main): Convert name and whatis to the user's + locale. + * src/Makefile.am (lexgrog_SOURCES, whatis_SOURCES): Add convert.c and + convert.h. + * NEWS.md: Document this. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Add man-pages(7) reference to man(1) + + Fixes Debian bug #974174. + + * man/man1/man.man1 (DESCRIPTION): Add man-pages(7) reference to + description of section 7. + * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update. + * NEWS.md: Document this. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Document MAN_DISABLE_SECCOMP and PIPELINE_DEBUG + + Fixes Debian bug #941622. + + * man/man1/man.man1 (ENVIRONMENT): Document MAN_DISABLE_SECCOMP and + PIPELINE_DEBUG. + * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update. + * NEWS: Document this. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + NEWS: Document previous commit + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Reduce overhead of MAN_DISABLE_SECCOMP=1 + + If MAN_DISABLE_SECCOMP=1 is set (or if seccomp is otherwise + unavailable), then there's no need to call seccomp_init and friends, + which can have significant overhead even if we never actually load the + resulting filter. + + Pointed out by Steinar H. Gunderson in https://bugs.debian.org/1003089. + + * lib/sandbox.c (make_seccomp_filter): Return NULL early if + can_load_seccomp returns false. + (_sandbox_load): Return early if the relevant context is NULL. + (sandbox_free): Only call seccomp_release if the relevant context is + non-NULL. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Indicate that merge requests are preferred + + * docs/HACKING.md (Sending patches): Describe merge request workflow and + indicate that it is preferred. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Reformat hacking documentation as Markdown + + * docs/HACKING: Move to ... + * docs/HACKING.md: ... here. Reformat as Markdown. + * docs/Makefile.am (dist_noinst_DATA): Replace HACKING with HACKING.md. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Add release automation + + When a tag is pushed to GitLab, upload the bootstrapped source tarball + to the package registry, and create a release in GitLab associated with + the tag. + + * .gitlab-ci.yml (stages): Remove test, since it had no jobs. Add + upload and release. + (build-distcheck:script): Configure with --enable-maintainer-mode, to + ensure that flex-generated scanners are fresh. + (upload, release): New jobs. + * release.sh: Remove. GitLab CI handles building releases now. + * Makefile.am (EXTRA_DIST): Remove release.sh. + * docs/HACKING: Update for GitLab-based release process. + +2022-01-03 Colin Watson <cjwatson@debian.org> + + Reformat release notes as Markdown + + * NEWS: Move to ... + * NEWS.md: ... here. Reformat as Markdown. + * Makefile.am (dist_noinst_DATA): Remove NEWS; Automake automatically + includes this file (or NEWS.md) in the distribution without help. + * README.md, docs/HACKING: Refer to NEWS.md instead of NEWS. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Remove superfluous quotes + + * Makefile.am (gen_start_date): Remove superfluous quotes. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Add build-distcheck CI artifact + + This should eventually allow publishing release tarballs built by a CI + process rather than on my laptop. + + * .gitlab-ci.yml (variables): Set GIT_DEPTH to 0; we need full history + in order to build the ChangeLog file. + (bootstrap:before_script): Add wget, needed to fetch Gnulib PO files. + (build-distcheck:before_script): Add git, needed by gitlog-to-changelog. + (build-distcheck:artifacts): Add bootstrapped/*.tar.xz. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Switch CI image to debian:unstable + + This gives us newer versions of various dependencies such as the + autotools. + + * .gitlab-ci.yml (default:image): Switch from gcc to debian:unstable. + (pre-commit:before_script, bootstrap:before_script): Explicitly install + git. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Pacify gcc -fanalyzer in manconv + + * src/manconv_main.c (main): Assert that from_code is non-NULL; this is + guaranteed by the argp state machine, but the compiler can't prove that. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Fix crash in globbing if run with no arguments + + * src/globbing_test.c (parse_opt): Emit a usage message if there are no + non-option arguments. + (main): Assert that remaining_args is non-NULL; this is now guaranteed + by the argp state machine, but the compiler can't prove that. + * NEWS: Document this. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Pacify gcc -fanalyzer in catman + + It isn't actually possible for sections to be NULL after argp parsing + has finished, but "gcc -fanalyzer" can't easily determine that, and it's + easy enough to arrange for it not to matter. + + * src/catman.c (main): Handle case where sections is NULL. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Pacify gcc -fanalyzer in some database functions + + In GCC 11.2.0, -fanalyzer seems to get confused by copies by assignment + of "struct datum", and thinks that there are use-after-free or + double-free possibilities with multiple loop iterations. These seem to + be false positives, so ignore them for now. + + * libdb/db_lookup.c (dblookup_pattern): Ignore false use-after-free + diagnostic. + * src/accessdb.c (main): Ignore false double-free diagnostics. + * src/catman.c (parse_for_sec): Ignore false use-after-free diagnostics. + * src/check_mandirs.c (sanity_check_db): Ignore false double-free + diagnostics. + (purge_pointers, purge_missing): Ignore false use-after-free + diagnostics. + * src/whatis.c (do_apropos): Ignore false use-after-free and double-free + diagnostics. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Pacify gcc -fanalyzer in dbdelete + + The refs list can't in fact be empty by this point (because we checked + earlier that we could look up this_ref in it), but it's hard for "gcc + -fanalyzer" to prove that, so help it understand that multi_content can + never end up being NULL. + + * libdb/db_delete.c (dbdelete): Initialize multi_content before looping + over refs. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Assert that some xasprintf calls return non-NULL + + "gcc -fanalyzer" notices that xasprintf can return NULL in some + situations (string length > INT_MAX, invalid format string, or multibyte + conversion error), and that we weren't handling this in various cases + where we use the return value in contexts that require non-NULL values. + The situations seem obscure enough for simple asserts to be appropriate. + + * lib/pathsearch.c (pathsearch): Assert that xasprintf returns non-NULL. + * lib/tempfile.c (create_tempdir): Likewise. + * lib/util.c (remove_directory): Likewise. + * libdb/db_lookup.c (make_multi_key): Likewise. + * libdb/db_store.c (make_content, dbstore): Likewise. + * src/check_mandirs.c (add_dir_entries, fix_permissions_tree): Likewise. + * src/compression.c (comp_file): Likewise. + * src/globbing.c (look_for_file): Likewise. + * src/man.c (main): Likewise. + * src/mandb.c (mandb, purge_catsubdirs): Likewise. + * src/manp.c (pathappend): Likewise. + * src/ult_src.c (find_include): Likewise. + * src/whatis.c (use_grep): Likewise. + * src/zsoelim.l (zsoelim_open_file): Likewise. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Fix path searching crash if getcwd fails + + xgetcwd can return NULL if getcwd returns NULL for reasons other than + ENOMEM, so we should handle this. Found by "gcc -fanalyzer". + + * lib/pathsearch.c (pathsearch, directory_on_path): Emit a fatal error + if xgetcwd returns NULL. + * po/POTFILES.in: Add lib/pathsearch.c. + * NEWS: Document this. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Update to Gnulib 20211231 + + In line with Gnulib, we now require Autoconf 2.64. + + * bootstrap: Sync to Gnulib 14db2b71b5bd05b94ec6126617fd32cd5f1016cd. + * bootstrap.conf (GNULIB_REVISION): Set to + 14db2b71b5bd05b94ec6126617fd32cd5f1016cd. + (buildreq): Bump required autoconf version to 2.64. + * configure.ac (AC_PREREQ): Bump to 2.64. + (--enable-gcc-warnings): New option, based on code in coreutils. Use + this to enable -fanalyzer only if --enable-gcc-warnings=expensive is + used; it's useful but slow. + * include/manconfig.h.in (create_tempdir, appendstr): Move NODISCARD to + the start of these function declarations, required by draft C2x. + * patches/argp-domain.patch: Rebase. + * NEWS: Document this. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Fix NULL dereference in get_locale_charset callers + + * lib/encodings.c (get_canonical_charset_name): Declare argument and + return value as non-NULL. + (get_locale_charset): Declare return value as non-NULL. Fall back to + "ANSI_X3.4-1968" if locale_charset returned NULL or the empty string. + +2022-01-02 Colin Watson <cjwatson@debian.org> + + Trim down direct Gnulib dependencies a little + + * bootstrap.conf (gnulib_modules): Add c99 (already used indirectly, but + seems like a good idea to request directly now). Remove getopt-gnu, + lock, and unsetenv, none of which we use directly. Replace fcntl with + fcntl-h and signal with signal-h, since we use the corresponding header + files directly but not the corresponding functions. + * .gitignore: Remove lib/getopt.h. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Fix warnings with Autoconf >= 2.70 + + * configure.ac (AC_PROG_LEX): Add noyywrap argument (new in Autoconf + 2.70, but ignored in previous versions). + * m4/man-bdb.m4 (MAN_CHECK_BDB): Autoconf 2.70 warns about non-literal + arguments to AC_CHECK_HEADERS. Refactor loops so that the header and + library names are visible to m4. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Add an SC_ALLOW_PERMISSIVE macro + + This plays slightly better with clang-format. + + * lib/sandbox.c (SC_ALLOW_PERMISSIVE): New macro. + (make_seccomp_filter): Use SC_ALLOW_PERMISSIVE instead of forms such as + "if (permissive) SC_ALLOW (name);". + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Use Gnulib attribute.h properly + + manconfig.h previously used _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM without + first including "stdio.h", which caused build failures. We should be + using the public names anyway. + + * bootstrap.conf (gnulib_modules): Add attribute. + + * include/manconfig.h.in (create_tempdir, appendstr): Use NODISCARD + rather than _GL_ATTRIBUTE_NODISCARD. + + * include/manconfig.h.in (debug, debug_error): Use ATTRIBUTE_FORMAT + rather than _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM. + * lib/debug.c (vdebug): Likewise. + + * include/manconfig.h.in (appendstr): Use ATTRIBUTE_SENTINEL rather than + _GL_ATTRIBUTE_SENTINEL. + + * lib/encodings.c (get_page_encoding): Use ATTRIBUTE_MALLOC rather than + _GL_ATTRIBUTE_MALLOC. + * lib/util.c (trim_spaces): Likewise. + + * lib/encodings.c (is_roff_device, get_output_encoding, + get_less_charset, get_jless_charset): Use ATTRIBUTE_PURE rather than + _GL_ATTRIBUTE_PURE. + * lib/glcontainers.c (string_equals, string_hash): Likewise. + * lib/security.c (running_setuid): Likewise. + * src/manp.c (canonicalized_path_equals, canonicalized_path_hash): + Likewise. + * src/whatis.c (match): Likewise. + + * libdb/db_lookup.c (dash_if_unset): Use ATTRIBUTE_CONST rather than + _GL_ATTRIBUTE_CONST. + * libdb/db_store.c (compare_ids): Likewise. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Reduce indentation depth using C99 + + * src/man.c (parse_opt): Remove an enclosing block and associated + indentation level, since C99 allows mixing declarations and code. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Pacify pre-commit + + * lib/mp.h: Remove trailing whitespace. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Simplify interface to container iterator macros + + The Gnulib container iterator macros (GL_LIST_FOREACH_* and + GL_MAP_FOREACH_*) have to run code both before and after a chunk of + user-supplied code. This previously required a START/END macro pair + used something like this: + + GL_LIST_FOREACH_START (names, name) { + ... + } GL_LIST_FOREACH_END (names); + + This doesn't look natural in C, and so it was easy to get it wrong. + + It's possible to do better, at the cost of some tricky macros. + Fortunately, Simon Tatham has already done the hard work in + https://www.chiark.greenend.org.uk/~sgtatham/mp/, and the necessary + header file is MIT-licensed, so we can incorporate it. Now these + iterator macros are used more like this, which is a much more natural C + style: + + GL_LIST_FOREACH (names, name) { + ... + } + + * lib/mp.h: New file. + * lib/Makefile.am (libman_la_SOURCES): Add mp.h. + * lib/README: Add mp.h. Rephrase introductory text about licensing to + account for an MIT-licensed file. + * lib/glcontainers.h (GL_LIST_FOREACH_START, GL_LIST_FOREACH_END): + Rewrite as ... + (GL_LIST_FOREACH): ... this. Update all callers. + (GL_MAP_FOREACH_START, GL_MAP_FOREACH_END): Rewrite as ... + (GL_MAP_FOREACH): ... this. Update all callers. + * NEWS, README.md, docs/HACKING: Document C99 compiler requirement. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Simplify some GCC attribute handling + + * include/manconfig.h.in (ATTRIBUTE_FORMAT_PRINTF, + ATTRIBUTE_WARN_UNUSED_RESULT, ATTRIBUTE_SENTINEL): Remove in favour of + Gnulib-provided macros. + (create_tempdir, appendstr): Use _GL_ATTRIBUTE_NODISCARD rather than + ATTRIBUTE_WARN_UNUSED_RESULT. + (debug, debug_error): Use _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM rather than + ATTRIBUTE_FORMAT_PRINTF. + (appendstr): Use _GL_ATTRIBUTE_SENTINEL rather than ATTRIBUTE_SENTINEL. + * lib/debug.c (vdebug): Use _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM rather + than ATTRIBUTE_FORMAT_PRINTF. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Introduce pre-commit + + * .pre-commit-config.yaml: New file. + * .gitlab-ci.yml (stages): Add bootstrap. + (pre-commit): New job. + (bootstrap): Move to bootstrap stage. + + Remove trailing whitespace from all files. + +2022-01-01 Colin Watson <cjwatson@debian.org> + + Update licence texts + + There are no substantive licensing changes here, only formatting + adjustments and referring to the "GNU Lesser General Public License" + rather than the "GNU Library General Public License". + + * docs/COPYING: Update from current contents of + https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + * docs/COPYING.LIB: Update from current contents of + https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt. + +2021-12-31 Colin Watson <cjwatson@debian.org> + + Document migration to GitLab + + * README.md: Add link to GitLab repository. + (Contacting the maintainer): Add GitLab issues link. + * docs/HACKING (Revision control): Update for GitLab. + * man/man1/apropos.man1 (BUGS): Add GitLab issues link. + * man/man1/lexgrog.man1 (BUGS): Likewise. + * man/man1/man-recode.man1 (BUGS): Likewise. + * man/man1/man.man1 (BUGS): Likewise. + * man/man1/manconv.man1 (BUGS): Likewise. + * man/man1/manpath.man1 (BUGS): Likewise. + * man/man1/whatis.man1 (BUGS): Likewise. + * man/man1/zsoelim.man1 (BUGS): Likewise. + * man/man5/manpath.man5 (BUGS): Likewise. + * man/man8/accessdb.man8 (BUGS): Likewise. + * man/man8/catman.man8 (BUGS): Likewise. + * man/man8/mandb.man8 (BUGS): Likewise. + * NEWS: Document this. + +2021-11-17 Colin Watson <cjwatson@debian.org> + + Reformat README + + * README: Move to ... + * README.md: ... here. Reformat as Markdown. + * Makefile.am (dist_noinst_DATA): Replace README with README.md. + * docs/INSTALL.quick: Likewise. + +2021-11-16 Colin Watson <cjwatson@debian.org> + + Add .gitlab-ci.yml + +2021-09-19 Colin Watson <cjwatson@debian.org> + + Update some obsolete Autoconf macros + + * configure.ac: Replace AC_GNU_SOURCE and AC_ISC_POSIX with + AC_USE_SYSTEM_EXTENSIONS. Replace AC_CONFIG_HEADER with + AC_CONFIG_HEADERS. Remove an obsolete comment. + +2021-09-19 Colin Watson <cjwatson@debian.org> + + Stop using obsolete AC_TRY_LINK + + This has been obsolete since Autoconf 2.55. Use its AC_LINK_IFELSE + expansion instead. + + * m4/man-bdb.m4 (MAN_CHECK_BDB): Expand AC_TRY_LINK call using + AC_LINK_IFELSE. + +2021-09-18 Mario Blättermann <mario.blaettermann@gmail.com> + + Update German manual page translation + + * man/po4a/po/de.po: Update from Translation Project. + +2021-09-18 Mario Blättermann <mario.blaettermann@gmail.com> + + Update German manual page translation + + * man/po4a/po/de.po: Update from Translation Project. + +2021-07-11 Colin Watson <cjwatson@debian.org> + + Fix mishandling of suffix matches in manpath + + Fixes Savannah bug #60906. + + * src/manp.c (pathappend): strstr might return matches that are not at + the start of a manpath element, resulting in incorrect truncation. Skip + any such matches. + 2021-02-08 Colin Watson <cjwatson@debian.org> Release man-db 2.9.4 @@ -89,7 +1502,7 @@ * man/man8/mandb.man8 (DATABASE CACHES): Remove "Type" column from table. -2020-07-03 Colin Watson <cjwatson@debian.org> +2020-07-02 Colin Watson <cjwatson@debian.org> Recognise Romanian translations of NAME @@ -231,7 +1644,7 @@ NEWS: Remove superfluous ")" -2020-04-04 Boyuan Yang <073plan@gmail.com> +2020-04-03 Boyuan Yang <073plan@gmail.com> Update Simplified Chinese manual page translation @@ -368,7 +1781,7 @@ * man/po4a/po/es.po: Update from Translation Project. -2019-10-11 Mario Blättermann <mario.blaettermann@gmail.com> +2019-10-10 Mario Blättermann <mario.blaettermann@gmail.com> Update German manual page translation @@ -861,7 +2274,7 @@ * man/man1/man.man1 (DEFAULTS): Remove two stray words from the description of how the pager is specified. -2019-09-06 Colin Watson <cjwatson@debian.org> +2019-09-05 Colin Watson <cjwatson@debian.org> Adjust encoding declarations when recoding @@ -947,7 +2360,7 @@ * src/man.c (get_preprocessors_from_file): Likewise. * src/zsoelim.l (zsoelim_parse_file): Likewise. -2019-09-01 Colin Watson <cjwatson@debian.org> +2019-08-31 Colin Watson <cjwatson@debian.org> Remove ability to undefine COMP_SRC @@ -1131,7 +2544,7 @@ * lib/linelength.c: Include "linelength.h". * lib/orderfiles.c: Include "orderfiles.h". -2019-08-24 Colin Watson <cjwatson@debian.org> +2019-08-23 Colin Watson <cjwatson@debian.org> Simplify some GCC attribute handling @@ -1154,7 +2567,7 @@ shorter _GL_UNUSED. (ATTRIBUTE_MALLOC): Remove; it was unused. -2019-08-24 Colin Watson <cjwatson@debian.org> +2019-08-23 Colin Watson <cjwatson@debian.org> Use C11/Gnulib's _Noreturn @@ -1163,7 +2576,7 @@ ATTRIBUTE_NORETURN. * include/manconfig.h.in (ATTRIBUTE_NORETURN): Remove. -2019-08-24 Colin Watson <cjwatson@debian.org> +2019-08-23 Colin Watson <cjwatson@debian.org> Update to Gnulib 20190821 @@ -2707,14 +4120,14 @@ * src/check_mandirs.c (testmandirs, update_db): Likewise. * src/man.c (maybe_update_file): Likewise. -2018-04-05 Colin Watson <cjwatson@debian.org> +2018-04-04 Colin Watson <cjwatson@debian.org> Fix broken test * src/tests/man-8: Fix expected output to account for recent change to locale_macros. -2018-04-05 Colin Watson <cjwatson@debian.org> +2018-04-04 Colin Watson <cjwatson@debian.org> man: Only change directory in child processes @@ -3290,7 +4703,7 @@ * docs/INSTALL.quick: Bump minimum libpipeline version to 1.4.0. -2017-07-18 Colin Watson <cjwatson@debian.org> +2017-07-17 Colin Watson <cjwatson@debian.org> Fix formatting error in Turkish translation @@ -4342,23 +5755,23 @@ * configure.ac: Require libpipeline >= 1.4.0. * NEWS: Document this. -2014-10-23 Colin Watson <cjwatson@debian.org> +2014-10-22 Colin Watson <cjwatson@debian.org> NEWS: Document recent Solaris portability changes -2014-10-23 Colin Watson <cjwatson@debian.org> +2014-10-22 Colin Watson <cjwatson@debian.org> Fix linking of fspause on Solaris * src/tests/fspause.c (main): Set program_name. Patch by Peter Bray. -2014-10-23 Colin Watson <cjwatson@debian.org> +2014-10-22 Colin Watson <cjwatson@debian.org> autogen.sh: Avoid "export VARIABLE=value" syntax Older Solaris shells do not support this. Patch by Peter Bray. -2014-10-23 Colin Watson <cjwatson@debian.org> +2014-10-22 Colin Watson <cjwatson@debian.org> gnulib: Import strcasestr module. @@ -4368,11 +5781,11 @@ * man/po4a/po/da.po: Update from Translation Project. -2014-09-28 Colin Watson <cjwatson@debian.org> +2014-09-27 Colin Watson <cjwatson@debian.org> * Version: 2.7.0.2. -2014-09-28 Colin Watson <cjwatson@debian.org> +2014-09-27 Colin Watson <cjwatson@debian.org> Work around lack of UTIME_* on GNU/Hurd @@ -4402,7 +5815,7 @@ * Makefile.am (EXTRA_DIST): Add gnulib/m4/sockpfaf.m4. -2014-09-24 Colin Watson <cjwatson@debian.org> +2014-09-23 Colin Watson <cjwatson@debian.org> Fix tests when build fs does not support high-precision timestamps @@ -4589,7 +6002,7 @@ * NEWS: Document a couple more changes since 2.6.7.1. -2014-09-16 Colin Watson <cjwatson@debian.org> +2014-09-15 Colin Watson <cjwatson@debian.org> Merge convert_name into man.c @@ -4603,11 +6016,11 @@ * po/POTFILES.in: Remove src/convert_name.c. * po/man-db.pot, po/*.po: Update. -2014-09-16 Colin Watson <cjwatson@debian.org> +2014-09-15 Colin Watson <cjwatson@debian.org> * tools/README: Update heading to reflect moves to build-aux. -2014-09-16 Colin Watson <cjwatson@debian.org> +2014-09-15 Colin Watson <cjwatson@debian.org> Make a few libdb functions static @@ -4617,7 +6030,7 @@ * libdb/db_storage.h (split_data, make_content, copy_if_set): Remove prototypes. -2014-09-16 Colin Watson <cjwatson@debian.org> +2014-09-15 Colin Watson <cjwatson@debian.org> Make various functions static @@ -4629,14 +6042,14 @@ purge_catsubdirs, purge_catdirs): Likewise. * src/zsoelim.l (try_compressed): Likewise. -2014-09-16 Colin Watson <cjwatson@debian.org> +2014-09-15 Colin Watson <cjwatson@debian.org> Remove unused code in lexgrog * src/lexgrog.l (rule_profile): Remove unused function and associated global declarations. -2014-09-16 Colin Watson <cjwatson@debian.org> +2014-09-15 Colin Watson <cjwatson@debian.org> Reorder functions in man to remove need for header file @@ -4669,7 +6082,7 @@ * build-aux/config.sub: Upgrade to 2014-09-11. -2014-09-13 Colin Watson <cjwatson@debian.org> +2014-09-12 Colin Watson <cjwatson@debian.org> Simplify <dirent.h> handling using Gnulib @@ -4680,7 +6093,7 @@ * src/straycats.c: Likewise. * src/ult_src.c: Likewise. -2014-09-13 Colin Watson <cjwatson@debian.org> +2014-09-12 Colin Watson <cjwatson@debian.org> Remove old and broken FAST_BTREE code @@ -4825,11 +6238,11 @@ * src/catman.c (parse_for_sec): Execute MAN rather than "man". -2014-09-09 Colin Watson <cjwatson@debian.org> +2014-09-08 Colin Watson <cjwatson@debian.org> * man/po4a/po/da.po: Fix po4a syntax error. -2014-09-09 Colin Watson <cjwatson@debian.org> +2014-09-08 Colin Watson <cjwatson@debian.org> Various autotools upgrades |