summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* Order files by first physical extent before readingColin Watson2014-09-16
| | | | | | | | | | | | | | | | | | | | | Inspired by a similar change in dpkg. This takes 'mandb -c' from 104 to 32 seconds in a test installation, and 'man -K' from 74 to 38 seconds. On non-Linux systems where FIEMAP is not available, use posix_fadvise instead to preload files. Fixes Debian bug #574410. * gnulib: Import nonblocking and openat modules. * configure.ac: Check for <linux/fiemap.h> and posix_fadvise. * lib/orderfiles.c: New file. * lib/orderfiles.h: New file. * lib/Makefile.am (libman_la_SOURCES): Add orderfiles.c and orderfiles.h. * src/check_mandirs.c (add_dir_entries): Order files before reading them. * src/man.c (try_section, do_global_apropos_section): Likewise. * src/straycats.c (check_for_stray): Likewise. * NEWS: Document this.
* * tools/README: Update heading to reflect moves to build-aux.Colin Watson2014-09-16
|
* Move argument handling out of configure to new MAN_ARG_* macrosColin Watson2014-09-15
| | | | | | | | | | | * m4/man-arg-automatic-create.m4, m4/man-arg-automatic-update.m4, m4/man-arg-cats.m4, m4/man-arg-config-file.m4, m4/man-arg-db.m4, m4/man-arg-device.m4, m4/man-arg-mandirs.m4, m4/man-arg-override-dir.m4, m4/man-arg-sections.m4, m4/man-arg-setuid.m4, m4/man-arg-systemdtmpfilesdir.m4, m4/man-arg-undoc.m4: New files. * configure.ac: Call new macros rather than inlining argument handling.
* Speed up the test suite if we have high-precision file timestampsColin Watson2014-09-11
| | | | | | | | | * configure.ac: Substitute STAT_HAS_NSEC as "yes" or "no" depending on whether high-precision file timestamps are available. * src/tests/Makefile.am (TESTS_ENVIRONMENT): Export STAT_HAS_NSEC to tests. * src/tests/testlib.sh (next_second): Do nothing if STAT_HAS_NSEC is "yes".
* Move database mtime out of the database into file metadataColin Watson2014-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the database reproducible between installations, as long as the underlying database has predictable behaviour and the set of installed manual pages (including their timestamps) remains identical. As a bonus, we now use high-precision times in several places. Fixes Debian bug #760895. * gnulib: Import futimens and timespec modules. * libdb/db_btree.c (btree_get_time, btree_set_time): New functions. * libdb/db_gdbm.c (man_gdbm_get_time, man_gdbm_set_time): New functions. * libdb/db_ndbm.c (ndbm_get_time, ndbm_set_time): New functions. * libdb/mydbm.h (man_gdbm_get_time, man_gdbm_set_time, ndbm_get_time, ndbm_set_time, btree_get_time, btree_set_time): Add prototypes. (MYDBM_GET_TIME, MYDBM_SET_TIME): New macros. * src/check_mandirs.c (testmandirs, create_db, count_glob_matches, purge_normal, purge_whatis, purge_missing): Use high-precision times. (update_db_time): Set file modification times rather than updating a database row. (create_db, purge_missing): Get database file modification times rather than fetching a database row. (purge_missing): If the new will_run_mandb argument is true, reset the database mtime to its value before purging; this ensures that mandb will still run as expected afterwards. * src/check_mandirs.h (purge_missing): Update prototype. * src/mandb.c (xcopy): Copy access and modification times. (process_manpath): Work out in advance of purging whether we will need to run mandb, and pass that to purge_missing. * include/manconfig.h.in (VER_ID): Bump to 2.5.0. (KEY): Remove. * man/man8/accessdb.man8 (DESCRIPTION), man/it/man8/accessdb.man8 (DESCRIZIONE): Remove sample output, as it is of limited usefulness compared to how awkward it is to maintain, especially in text intended for translation. * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update. * manual/db.me (Contents of an index database): Remove mention of $mtime$. (Example database): Remove $mtime$. Update $version. * NEWS: Document this. Bump version to 2.7.0 to correspond to the database version change.
* Switch away from obsolescent utime functionColin Watson2014-09-09
| | | | | | | | | | | | POSIX.1-2008 marks utime as obsolescent. Switch to variants of the futimens/utimensat family instead, via Gnulib. Use higher-precision times for cat pages. * gnulib: Import stat-time and utimens modules. * src/man.c (man_modtime): Change type to struct timespec. (commit_tmp_cat): Use utimens rather than utime. (display): Store a higher-precision modification timestamp for man_file.
* Add systemd tmpfiles snippet to clean up old cat files after a weekColin Watson2014-06-17
| | | | | | | | | | | | Fixes Fedora bug #1110274. * configure.ac: Accept --with-systemdtmpfilesdir option. (AC_CONFIG_FILES): Add init/Makefile and init/systemd/Makefile. * Makefile.am (SUBDIRS): Add init. * init/Makefile.am: New file. * init/systemd/Makefile.am: New file. * init/systemd/man-db.conf: New file. * .gitignore: Add init/Makefile and init/systemd/Makefile.
* Move Autotools auxiliary build files from tools to build-aux.Colin Watson2014-02-20
| | | | | This keeps man-db's own tools separate, reducing confusion, and "build-aux" is a more conventional location for the Autotools files.
* Upgrade to Gnulib 20140202 and Libtool 2.4.2-1.7 (from Debian).Colin Watson2014-02-18
|
* Add support for override directory in search pathPeter Schiffer2014-01-23
| | | | | | | | | | | | * configure.ac: Add --with-override-dir option. * include/manconfig.h.in (OVERRIDE_DIR): New definition. * src/manp.c (insert_override_dir): New function. (get_manpath_from_path): Call it before add_dir_to_list. * src/tests/man-9: New file. * src/tests/Makefile.am (TESTS_ENVIRONMENT): Set and export OVERRIDE_DIR. (ALL_TESTS): Add man-9. * NEWS: Document this.
* Upgrade to Automake 1.14.1 and Libtool 2.4.2-1.6 (from Debian).Colin Watson2014-01-23
|
* gnulib: Import gnupload module.Colin Watson2013-12-09
|
* Automatically generate ChangeLog from gitColin Watson2013-12-09
| | | | | | | | | * ChangeLog: Move to ... * ChangeLog-2013: ... here. * Makefile.am (EXTRA_DIST): Add ChangeLog-2013. (dist-hook): Add gen-ChangeLog. (gen-ChangeLog): New rule, based on that in coreutils. * gnulib: Import gitlog-to-changelog module.
* Upgrade to Automake 1.14 and Gnulib 20130805.Colin Watson2013-11-27
|
* Upgrade to Automake 1.13.3.Colin Watson2013-06-23
|
* * configure.ac: Check whether tbl supports the 'x' format characterColin Watson2013-06-06
| | | | | | (e.g. versions of groff before 1.20), and substitute TBL_X_FORMAT accordingly. * man/replace.sin.in: Replace "l lx." with "l l." if tbl does not support the 'x' format character.
* * configure.ac: Set MANDIR_LAYOUT using AC_SUBST as well asColin Watson2013-06-06
| | | | | | AC_DEFINE/AC_DEFINE_UNQUOTED. * src/tests/Makefile.am (TESTS_ENVIRONMENT): Export MANDIR_LAYOUT. * src/tests/testlib.sh (skip): New function. * src/tests/man-3: Skip unless the GNU layout is in use.
* * tools/config.guess: Update to 2013-05-16.Colin Watson2013-06-06
| | | * tools/config.sub: Update to 2013-04-24.
* Quieten most warnings from compiling Gnulib (Debian bug #668429).Colin Watson2013-06-03
| | | | | | | | * configure.ac: Add gl_WARN_ADD results to WARN_CFLAGS rather than CFLAGS. * lib/Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS). * libdb/Makefile.am (AM_CFLAGS): Likewise. * src/Makefile.am (AM_CFLAGS): Likewise. Move $(libpipeline_CFLAGS) here from AM_CPPFLAGS.
* Upgrade to Automake 1.13.2 and Gnulib 20130529.Colin Watson2013-05-30
| | | | | | | | | | | | | * .bzrignore: Add gnulib/lib/locale.h, man/**/*.log, man/**/*.trs, src/tests/*.log, and src/tests/*.trs. * autogen.sh: Drop gnulib/gets.patch backport. * gnulib/gets.patch: Remove. * configure.ac (AM_INIT_AUTOMAKE): Set minimum Automake version to 1.11. Add parallel-tests option for compatibility with 1.11. * man/Rules.man (TESTS_ENVIRONMENT): Move to ... (LOG_COMPILER): ... this. * src/tests/Makefile.am (TESTS_ENVIRONMENT): Rewrite as a list of variable exports rather than as a command prefix, for compatibility with parallel-tests.
* Upgrade to Libtool 2.4.2-1.2 (from Debian).Colin Watson2013-01-21
|
* * configure.ac: Use AM_PROG_AR before LT_INIT, for compatibilityColin Watson2012-09-17
| | | | with Automake 1.12. * NEWS: Document this.
* Backport Gnulib commit 66712c23388e93e5c518ebc8515140fa0c807348 toColin Watson2012-09-17
| | | | | | stop assuming gets. * gnulib/gets.patch: New file. * autogen.sh: Apply gnulib/gets.patch. * NEWS: Document this.
* Upgrade to Automake 1.11.6.Colin Watson2012-09-17
|
* Upgrade to Autoconf 2.69, Automake 1.11.5, and GnulibColin Watson2012-06-18
| | | 20120404-stable.
* Upgrade to Automake 1.11.3.Colin Watson2012-02-09
|
* Add support for Lzip-compressed manual pages.Matias A. Fonzo2012-02-02
| | | | | | | * configure.ac: Check for lzip. Don't test for lzma if lzip is present, as was already the case for xz. * include/comp_src.h.in (comp_list): Add lzip. * include/manconfig.h.in: Define UNLZIP. * NEWS: Document this.
* Upgrade to Automake 1.11.2 and Gnulib 20111211-stable.Colin Watson2012-02-01
| | | * gnulib: Import closedir, fstat, and opendir modules.
* * gnulib: Import getline module (used in lib/encodings.c).Colin Watson2011-10-09
|
* Upgrade to Gnulib 20110908-stable.Colin Watson2011-10-09
|
* Upgrade to Gnulib 20110609-stable.Colin Watson2011-07-08
|
* Upgrade to Autoconf 2.68 and Gnulib 20110412-stable.Colin Watson2011-04-23
|
* Upgrade to Libtool 2.4.Colin Watson2011-04-09
|
* * gnulib: Import flock module.Colin Watson2011-03-28
| | | | | * lib/Makefile.am (libman_la_SOURCES): Remove flock.h. * lib/README: Remove flock.*. * lib/flock.c, lib/flock.h: Remove.
* * m4/man-gcc-warning.m4: Remove.Colin Watson2011-03-28
| | | | * gnulib: Import warnings module. * configure.ac: Replace MAN_GCC_WARNING with gl_WARN_ADD.
* Rewrite all remaining subprocess handling in terms of libpipeline.Colin Watson2011-03-24
| | | | | | | | | | | | | | | | | | | | | | | * lib/security.c (do_system_drop_privs_child): New function. (do_system_drop_privs): Rewrite using libpipeline. * src/catman.c (post_fork): New function. (catman): Rewrite using libpipeline. (add_arg): Rewrite as a wrapper around pipecmd_arg. (do_catman): Remove. (reset_cursor): Remove. (parse_for_sec): Use libpipeline for subprocess handling. (main): Install custom post-fork handler. * src/man.c (gripe_no_man) [_AIX || __sgi]: Rewrite vendor fallback using libpipeline. * src/Makefile.am (catman_LDADD): Add $(libpipeline_LIBS). * src/catman.c (main): Duplicate the output of setlocale if non-NULL. * configure.ac (AC_FUNC_VFORK): Remove. (AC_REPLACE_FUNCS): Remove waitpid. * gnulib: Remove waitpid module. * lib/README: Remove waitpid.c. * lib/waitpid.c: Remove.
* * gnulib: Import waitpid module.Colin Watson2011-03-20
|
* Upgrade to Gnulib 20110216-stable.Colin Watson2011-03-20
|
* Add basic support for the Heirloom Documentation Tools.Colin Watson2011-01-03
| | | | | | | | | | | | | | | | | | | | | | | * m4/man-heirloom-nroff.m4: New file. * configure.ac: Call MAN_PROG_HEIRLOOM_NROFF. If successful and an nroff macro was found, prepend -mg -msafe -mpadj to the nroff and troff options. * lib/encodings.c (charset_table) [HEIRLOOM_NROFF]: Disable latin1 and nippon devices. (device_table) [HEIRLOOM_NROFF]: Add locale device. * src/man.c (heirloom_line_length) [HEIRLOOM_NROFF]: New function. (add_roff_line_length): Optionally return a command, which should be inserted before troff. (add_roff_line_length) [HEIRLOOM_NROFF]: Support Heirloom, which needs text inserted at the start of the input. (make_roff_command) [HEIRLOOM_NROFF]: Use locale device instead of utf8 in UTF-8 locales. Handle add_roff_line_length return value. Unset TROFFMACS if running setuid. (make_browser): Compile only if TROFF_IS_GROFF. (format_display): Only declare variables related to HTML output if TROFF_IS_GROFF. * src/tests/zsoelim-1: Ignore .ll and .lt lines inserted by heirloom_line_length. * NEWS: Document this.
* * gnulib: Import idpriv-drop and idpriv-droptemp modules.Colin Watson2010-12-19
| | | | | | | | | * configure.ac: Stop checking for seteuid, setreuid, and setresuid. * lib/security.c (POSIX_SAVED_IDS, SET_EUID, SWAP_UIDS): Remove in favour of idpriv.h. (drop_effective_privs): Use idpriv_temp_drop. (regain_effective_privs): Use idpriv_temp_restore. (do_system_drop_privs): Use idpriv_drop. Drop saved-IDs case; avoiding a fork doesn't justify having two code paths.
* Remove internal copy of libpipeline.Colin Watson2010-11-28
| | | | | | | | | | | | * configure.ac: Remove --enable-socketpair-pipe and --with-external-pipeline options. Remove INTERNAL_PIPELINE Automake conditional. Check for libpipeline unconditionally. * docs/INSTALL.quick: Mention the need to install libpipeline. * gnulib: Remove strsignal and sys_select modules. * lib/Makefile.am (libman_la_SOURCES): Never add pipeline.c or pipeline.h. * lib/pipeline.c, lib/pipeline.h: Remove. * m4/man-socketpair.m4: Remove. * NEWS: Document this. Bump to 2.6.0.
* Allow building with an external libpipeline.Colin Watson2010-10-24
| | | | | | | | | * configure.ac: Add --with-external-pipeline option. * lib/Makefile.am (libman_la_CPPFLAGS): Add $(libpipeline_CFLAGS). (libman_la_SOURCES): Include pipeline.c and pipeline.h only conditionally. (libman_la_LDFLAGS): Add $(libpipeline_LIBS). * src/Makefile.am (AM_CPPFLAGS): Add $(libpipeline_CFLAGS). * NEWS: Document this.
* It turns out that AM_GNU_GETTEXT([use-libtool]) is unsupported.Colin Watson2010-10-05
| | | | | | | | | | | | | | | | | | | Switch to external libintl instead. * configure.ac (AM_GNU_GETTEXT): Set external. (AC_CONFIG_FILES): Remove intl/Makefile. * Makefile.am (SUBDIRS): Remove intl. (EXTRA_DIST): Add gnulib/m4/glibc2.m4, gnulib/m4/intdiv0.m4, gnulib/m4/intl.m4, gnulib/m4/intmax.m4, gnulib/m4/inttypes-pri.m4, gnulib/m4/lcmessage.m4, gnulib/m4/printf-posix.m4, gnulib/m4/uintmax_t.m4, and gnulib/m4/visibility.m4. * intl: Remove. * lib/Makefile.am (libman_la_CPPFLAGS): Remove -I$(top_builddir)/intl. * libdb/Makefile.am (libmandb_la_CPPFLAGS): Likewise. * src/Makefile.am (AM_CPPFLAGS): Likewise. * .bzrignore: Remove intl/Makefile, intl/charset.alias, intl/libgnuintl.h, intl/libintl.h, intl/ref-add.sed, and intl/ref-del.sed. * NEWS: Document this.
* * gnulib/m4/gnulib-cache.m4: Remove obsolete modules atexit, memcmp,Colin Watson2010-09-27
| | | and strcspn.
* make executableColin Watson2010-09-26
|
* Build libman and libmandb as shared libraries, reducing ourColin Watson2010-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | installed footprint by about 200K. * configure.ac: Add LT_INIT. Move AC_GNU_SOURCE up to above it. Remove redundant AC_PROG_RANLIB. * gnulib/m4/gnulib-cache.m4: Enable libtool support. * gnulib/m4/libtool.m4, gnulib/m4/ltoptions.m4, gnulib/m4/ltsugar.m4, gnulib/m4/ltversion.m4, gnulib/m4/lt~obsolete.m4, tools/ltmain.sh: New files, created by libtoolize. * autogen.sh: Export LIBTOOLIZE_OPTIONS=--quiet. * lib/Makefile.am: Switch to libtool. Add ../gnulib/lib/libgnu.la, $(LIBCOMPRESS), and @LIBINTL@ to LIBADD. Install the library in $(pkglibdir), and instruct libtool to set an RPATH on binaries built against this library. * libdb/Makefile.am: Switch to libtool. Add ../lib/libman.la to LIBADD. Install the library in $(pkglibdir), and instruct libtool to set an RPATH on binaries built against this library. * src/Makefile.am (LIBMAN): Reduce to libman. (LIBMANDB): Reduce to libmandb. (accessdb_LDADD, catman_LDADD, globbing_LDADD, lexgrog_LDADD, man_LDADD, manconv_LDADD, mandb_LDADD, manpath_LDADD, whatis_LDADD, zsoelim_LDADD): Remove dependencies of libman and libmandb. * .bzrignore: Add **/*.la, **/*.lo, **/.libs, and ./libtool. * NEWS: Document this. Avoid symbol clashes between libgnu and libman. * lib/hashtable.c (null_hash_free, plain_hash_free, hash_create, hash_lookup_structure, hash_lookup, hash_install, hash_remove, hash_free): Rename to ... (null_hashtable_free, plain_hashtable_free, hashtable_create, hashtable_lookup_structure, hashtable_lookup, hashtable_install, hashtable_remove, hashtable_free): ... these. Update all callers and prototypes. * lib/hashtable.h (hash_free_ptr): Rename to ... (hashtable_free_ptr): ... this. Update all users.
* Upgrade to Gnulib 20100704.Colin Watson2010-07-20
| | | * configure.ac (AM_GNU_GETTEXT_VERSION): Upgrade to gettext 0.18.1.
* Upgrade to Gnulib 20100424.Colin Watson2010-04-27
|
* Upgrade to Gnulib 20100308.Colin Watson2010-03-13
|
* * configure.ac: Add AM_MAINTAINER_MODE. In the modern world,Colin Watson2010-03-11
| | | | timestamps are often just too fragile for those make targets to work well; use ./autogen.sh instead.