diff --git a/COPYING b/COPYING index 1384f46..1a88dcf 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (C) 1998-2019 Ivo Timmermans, Guus Sliepen and others. +Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and others. See the AUTHORS file for a complete list. This program is free software; you can redistribute it and/or modify it under diff --git a/ChangeLog b/ChangeLog index 041bf3f..f2f43d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,26 +1,3 @@ -Version 1.0.36 August 26 2019 ------------------------------------------------------------------------- - -Guus Sliepen (8): - Remove the call to RAND_load_file(). - Update THANKS. - Backport tinc 1.1's str2net() function. - Update THANKS. - Fix spelling errors found by codespell. - Reformat all code using astyle. - Add a missing check for a pathname being too long. - Releasing 1.0.36. - -Rosen Penev (2): - Fix compilation when OpenSSL has no ENGINE support - Fix compilation without deprecated OpenSSL APIs - -Quentin Rameau (1): - Double-quote nodes in graphviz network file - -Werner Schreiber (1): - Fix segfault when dest->mtu is 0. - Version 1.0.35 October 05 2018 ------------------------------------------------------------------------ diff --git a/Makefile.in b/Makefile.in index 2940df5..526846b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -142,8 +142,8 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ - config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -166,7 +166,7 @@ CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README THANKS compile \ - config.guess config.sub depcomp install-sh missing + config.guess config.sub install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -558,10 +558,6 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) -dist-zstd: distdir - tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst - $(am__post_remove_distdir) - dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -604,8 +600,6 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ - *.tar.zst*) \ - zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -782,7 +776,7 @@ uninstall-am: am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - dist-zstd distcheck distclean distclean-generic distclean-hdr \ + distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/NEWS b/NEWS index c587e87..4a342f7 100644 --- a/NEWS +++ b/NEWS @@ -1,21 +1,7 @@ -Version 1.0.36 August 26 2019 - - * Fix compiling tinc with certain versions of the OpenSSL library. - * Fix parsing some IPv6 addresses with :: in them. - * Fix GraphDumpFile output to handle node names starting with a digit. - * Fix a potential segmentation fault when fragmenting packets. - -Thanks to Rosen Penev, Quentin Rameau and Werner Schreiber for their -contributions to this version of tinc. - Version 1.0.35 October 5 2018 * Prevent oracle attacks (CVE-2018-16737, CVE-2018-16738). * Prevent a MITM from forcing a NULL cipher for UDP (CVE-2018-16758). - * Minor fixes in the documentation. - -Thanks to Amine Amri and Rafael Sadowski for their contributions to this -version of tinc. Version 1.0.34 June 12 2018 diff --git a/README b/README index 127cde2..f47cc29 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ -This is the README file for tinc version 1.0.36. Installation +This is the README file for tinc version 1.0.35. Installation instructions may be found in the INSTALL file. -tinc is Copyright (C) 1998-2019 by: +tinc is Copyright (C) 1998-2018 by: Ivo Timmermans, Guus Sliepen , diff --git a/THANKS b/THANKS index a0f7966..d6f4af7 100644 --- a/THANKS +++ b/THANKS @@ -22,7 +22,6 @@ We would like to thank the following people for their contributions to tinc: * Delf Eldkraft * Dennis Joachimsthaler * dnk -* Егор Палкин * Élie Bouttier * Enrique Zanardi * Erik Tews @@ -43,7 +42,6 @@ We would like to thank the following people for their contributions to tinc: * James Cook * James MacLean * Jamie Briggs -* Jan Štembera * Jason Harper * Jason Livesay * Jasper Krijgsman @@ -73,7 +71,6 @@ We would like to thank the following people for their contributions to tinc: * Max Rijevski * Menno Smits * Mesar Hameed -* Michael Taylor * Michael Tokarev * Michael Yonli * Miles Nordin @@ -85,12 +82,10 @@ We would like to thank the following people for their contributions to tinc: * Philipp Babel * Pierre Emeriaud * Pierre-Olivier Mercier -* Rafael Wolf * Rafael Sadowski * Rafał Leśniak * Rhosyn Celyn * Robert van der Meulen -* Robert Waniek * Rumko * Ryan Miller * Sam Bryan @@ -109,7 +104,6 @@ We would like to thank the following people for their contributions to tinc: * Tonnerre Lombard * Ulrich Seifert * Vil Brekin -* Vincent Laurent * Vittorio Gambaletta * Wendy Willard * Wessel Dankers diff --git a/aclocal.m4 b/aclocal.m4 index a50e7c2..06685b5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.2], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.2])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,9 +371,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -400,7 +398,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -597,7 +595,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -618,7 +616,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -639,7 +637,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -682,7 +680,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -721,7 +719,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -750,7 +748,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -797,7 +795,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -816,7 +814,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -897,7 +895,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -957,7 +955,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -985,7 +983,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1004,7 +1002,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/compile b/compile index 23fcba0..99e5052 100755 --- a/compile +++ b/compile @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN* | MSYS*) + CYGWIN*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/* | msys/*) + cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff --git a/configure b/configure index 2f7cd24..26dd965 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tinc 1.0.36. +# Generated by GNU Autoconf 2.69 for tinc 1.0.35. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tinc' PACKAGE_TARNAME='tinc' -PACKAGE_VERSION='1.0.36' -PACKAGE_STRING='tinc 1.0.36' +PACKAGE_VERSION='1.0.35' +PACKAGE_STRING='tinc 1.0.35' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tinc 1.0.36 to adapt to many kinds of systems. +\`configure' configures tinc 1.0.35 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1392,7 +1392,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tinc 1.0.36:";; + short | recursive ) echo "Configuration of tinc 1.0.35:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tinc configure 1.0.36 +tinc configure 1.0.35 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1974,7 +1974,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tinc $as_me 1.0.36, which was +It was created by tinc $as_me 1.0.35, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2838,7 +2838,7 @@ fi # Define the identity of the package. PACKAGE='tinc' - VERSION='1.0.36' + VERSION='1.0.35' cat >>confdefs.h <<_ACEOF @@ -7333,7 +7333,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tinc $as_me 1.0.36, which was +This file was extended by tinc $as_me 1.0.35, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7399,7 +7399,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -tinc config.status 1.0.36 +tinc config.status 1.0.35 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -8211,9 +8211,7 @@ $as_echo X/"$am_mf" | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff --git a/configure.ac b/configure.ac index ca2948a..6de0313 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([tinc], [1.0.36]) +AC_INIT([tinc], [1.0.35]) AC_CONFIG_SRCDIR([src/tincd.c]) AM_INIT_AUTOMAKE([1.11 check-news std-options subdir-objects nostdinc silent-rules -Wall]) AC_CONFIG_HEADERS([config.h]) @@ -237,7 +237,7 @@ AC_ARG_ENABLE(jumbograms, ] ) -dnl Ensure runstatedir is set if we are using a version of autoconf that does not support it +dnl Ensure runstatedir is set if we are using a version of autoconf that does not suppport it if test "x$runstatedir" = "x"; then AC_SUBST([runstatedir], ['${localstatedir}/run']) fi diff --git a/debian/NEWS b/debian/NEWS deleted file mode 100644 index b3eb367..0000000 --- a/debian/NEWS +++ /dev/null @@ -1,14 +0,0 @@ -tinc (1.0.27-1) unstable; urgency=medium - - This package now provides native systemd service files, allowing multiple - instances of tinc to be managed. Existing networks listed in - /etc/tinc/nets.boot will be converted to service instances once during this - upgrade. Afterwards, you can enable and disable networks using: - - systemctl enable tinc@ - systemctl disable tinc@ - - If you do not have systemd installed, the SysV init script will continue to - work as usual. For more information, see README.Debian. - - -- Guus Sliepen Sun, 10 Apr 2016 01:33:55 +0200 diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index d911295..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,80 +0,0 @@ -tinc for Debian ---------------- - -The manual for tinc is also available as info pages, type `info tinc' -to read it. - -There are several ways in which tinc may be automatically started at boot: - -Systemd -------- - -Since 1.0.27-1, the tinc package comes with native systemd service files. -To enable and start a net, call: - -systemctl enable tinc@ -systemctl start tinc@ - -This will cause a tincd to be started which uses the configuration from -/etc/tinc/, and also makes sure that it will be started next time your -system boots. - -Apart from controlling individual instances, you can also start/stop/reload all -enabled instances simultaneously by omitting @, for example: - -systemctl reload tinc - -Note that when you have systemd installed on your system, the file -/etc/tinc/nets.boot will not be used anymore to automatically start tinc -daemons. If the variable EXTRA is defined in /etc/default/tinc, it will be -passed on to tinc. The variable LIMITS is however not used. - -The service files that come with this package start tinc unconditionally. -However, tinc does support socket activation. If you wish to write a socket -unit for tinc, use the ListenStream option to specify on which port(s) and -address(es) tinc should listen. - -SysVinit --------- - -The system startup script for tinc, /etc/init.d/tinc, uses the file -/etc/tinc/nets.boot to find out which networks have to be started. Use one -netname per line. Lines starting with a # are ignored. - -/etc/network/interfaces ------------------------ - -You can create a stanza in /etc/network/interfaces, and add a line with -"tinc-net ". This will cause a tincd to be started which uses the -configuration from /etc/tinc/. You can use an inet static (with -address and netmask options) or inet dhcp stanza, in which case the ifup will -configure the VPN interface and you do not need to have a tinc-up script. - -The following options are also recognized and map directly to the corresponding -command line options for tincd: - -tinc-config -tinc-debug -tinc-mlock yes -tinc-logfile -tinc-pidfile -tinc-chroot yes -tinc-user - -An example stanza: - -iface vpn inet static - address 192.168.2.42 - netmask 255.255.0.0 - tinc-net myvpn - tinc-debug 1 - tinc-mlock yes - tinc-user nobody - tinc-pidfile /tmp/tinc.pid - -This will start a tinc daemon that reads its configuration from -/etc/tinc/myvpn, logs at debug level 1, locks itself in RAM, runs as user -nobody, and creates a network interface called "vpn". Ifup then sets the -address and netmask on that interface. - - -- Guus Sliepen , Sun, 10 April 2016, 01:38:08 +0200 diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 04508d0..0000000 --- a/debian/changelog +++ /dev/null @@ -1,685 +0,0 @@ -tinc (1.0.36-2) unstable; urgency=medium - - * Disable support for libvdeplug. Closes: #973233 - - -- Guus Sliepen Sun, 22 Nov 2020 10:40:27 +0100 - -tinc (1.0.36-1) unstable; urgency=medium - - * New upstream version 1.0.36 - * Add Vcs tags to debian/control. - * Bump Standards-Version. - - -- Guus Sliepen Mon, 26 Aug 2019 14:17:21 +0200 - -tinc (1.0.35-2) unstable; urgency=medium - - * Bump Standards-Version and Build-Depend on debhelper-compat (= 12). - * Remove calls to dh_installinit and dh_systemd_start from debian/rules, - compat level 12 does the right thing by default. - * Ensure we clean up doc/tinc.info. - - -- Guus Sliepen Mon, 28 Jan 2019 21:54:45 +0100 - -tinc (1.0.35-1) unstable; urgency=medium - - * New upstream release. - - Includes fixes for CVE-2018-16737, CVE-2018-16738, CVE-2018-16758. - - -- Guus Sliepen Mon, 08 Oct 2018 16:09:06 +0200 - -tinc (1.0.34-1) unstable; urgency=medium - - [ Guus Sliepen ] - * New upstream release. - - Fixes a potential segmentation fault when connecting to an IPv6 - peer via a proxy. Closes: #887401 - * Add support for the $EXTRA variable in /etc/default/tinc when using - systemd. Closes: #887116 - - [ Benda Xu ] - * Prevent possible incorrect IPv6 checksums due to function inlining. - Closes: #891400 - - -- Guus Sliepen Tue, 12 Jun 2018 23:00:49 +0200 - -tinc (1.0.33-1) unstable; urgency=medium - - * New upstream release. - * Test for /etc/default/tinc before trying to source it. Closes: #777262 - * Use --runstatedir=/run. - - -- Guus Sliepen Sat, 04 Nov 2017 16:22:06 +0100 - -tinc (1.0.32-1) unstable; urgency=medium - - * New upstream release. - * Add a note to new nets.boot files that it is not used with systemd. - Closes: #841052 - * In the post-down script, read the pid file only once. Closes: #832784 - * Explicitly use /bin/sleep from coreutils. Closes: #772379 - * Bump Standards-Version. - - -- Guus Sliepen Tue, 05 Sep 2017 20:23:36 +0200 - -tinc (1.0.31-1) unstable; urgency=medium - - * New upstream release. - * Bump Standards-Version. - * Bump debian/compat. - * Add missing Depends: lsb-base. - - -- Guus Sliepen Sun, 15 Jan 2017 16:20:40 +0100 - -tinc (1.0.29-2) unstable; urgency=medium - - * Rebuild with libssl-dev from unstable. - - -- Guus Sliepen Thu, 27 Oct 2016 13:09:46 +0200 - -tinc (1.0.29-1) unstable; urgency=medium - - * New upstream release. - * Bump debian/compat. - - -- Guus Sliepen Mon, 10 Oct 2016 22:30:25 +0200 - -tinc (1.0.28-1) unstable; urgency=medium - - * New upstream release. - - Fixes FTBFS on kfreebsd. - * Systemd service files are now provided by upstream. - - -- Guus Sliepen Sun, 10 Apr 2016 15:44:28 +0200 - -tinc (1.0.27-2) unstable; urgency=medium - - * Fix tinc@.service. - - -- Guus Sliepen Sun, 10 Apr 2016 12:45:33 +0200 - -tinc (1.0.27-1) unstable; urgency=medium - - * New upstream release. - * Bump Standards-Version. - * Add native systemd unit files. - * Automatically convert networks listed in nets.boot to systemd service - instances on upgrade. - - -- Guus Sliepen Sun, 10 Apr 2016 01:39:16 +0200 - -tinc (1.0.26-1) unstable; urgency=medium - - * New upstream release. - * Use the contents, not the presence, of the pidfile to check that tincd is - shut down properly. Closes: #774682 - * Bump Standards-Version. - - -- Guus Sliepen Sun, 05 Jul 2015 17:23:08 +0200 - -tinc (1.0.24-2) unstable; urgency=medium - - * Improve the init script: stopping tinc now waits for the process to - terminate. If that doesn't happen in 5 seconds, it will send the TERM - signal again (which helps if tinc is waiting for a script to finish - executing). It now also detects whether the process mentioned in the PID - file is actually running, and if not it will exit early and without - warnings. Closes: #748107 - - -- Guus Sliepen Wed, 14 May 2014 21:44:16 +0200 - -tinc (1.0.24-1) unstable; urgency=medium - - [ Guus Sliepen ] - * New upstream release - * Add a debian/watch file. - * Bump Standards-Version. - - [ Gian Piero Carrubba ] - * Allow resource limits to be set in /etc/default/tinc. - Closes: #690685, #704702 - - -- Guus Sliepen Sun, 11 May 2014 21:17:13 +0200 - -tinc (1.0.23-2) unstable; urgency=low - - * Use if-statements instead of && in shell scripts. Closes: #731279 - The && operator does not clear the error status, and if the next statement - in a shell script does not change the error status it would cause the - script to prematurely exit. Thanks to Peter Reinholdtsen for spotting it. - * Use absolute path to tincd in the if-post-down script. - - -- Guus Sliepen Thu, 05 Dec 2013 09:41:13 +0000 - -tinc (1.0.23-1) unstable; urgency=low - - * New upstream release. - - -- Guus Sliepen Sat, 19 Oct 2013 21:06:05 +0200 - -tinc (1.0.22-1) unstable; urgency=low - - * New upstream release. - - Handles whitespace between command line flags and optional arguments. - Closes: #710267 - * Bump Standards-Version. - * Source /lib/lsb/init-functions in the init.d script. - * Don't use texi2html anymore, use automake's install-html target which uses - makeinfo. - - -- Guus Sliepen Wed, 14 Aug 2013 15:34:29 +0200 - -tinc (1.0.21-1) unstable; urgency=low - - * New upstream release. - - Includes fix for CVE-2013-1428. - - -- Guus Sliepen Sun, 05 May 2013 10:42:33 +0200 - -tinc (1.0.19-3) unstable; urgency=high - - * Drop packets forwarded via TCP if they are too big (CVE-2013-1428). - - -- Guus Sliepen Fri, 12 Apr 2013 22:52:10 +0200 - -tinc (1.0.19-2) unstable; urgency=low - - * Fix behaviour of tinc-pidfile. Closes: #679130 - * Enable parallel building in debian/rules. - - -- Guus Sliepen Tue, 26 Jun 2012 18:28:34 +0200 - -tinc (1.0.19-1) unstable; urgency=low - - * New upstream release. - * Bump debian/compat so tinc gets built with hardening flags. - * Allow tinc-pidfile in /etc/network/interfaces. - - -- Guus Sliepen Mon, 25 Jun 2012 20:29:22 +0200 - -tinc (1.0.18-1) unstable; urgency=low - - * New upstream release. - - -- Guus Sliepen Sun, 25 Mar 2012 18:52:15 +0200 - -tinc (1.0.17-1) unstable; urgency=low - - * New upstream release. - * Enable support for UML and VDE. - - -- Guus Sliepen Sat, 10 Mar 2012 14:50:00 +0100 - -tinc (1.0.16-1) unstable; urgency=low - - * New upstream release. - * Mention alarm option in /etc/init.d/tinc's usage information. - Closes: #631761 - - -- Guus Sliepen Sat, 23 Jul 2011 14:37:56 +0200 - -tinc (1.0.15-1) unstable; urgency=low - - * New upstream release. - * Send SIGALRM to running tinc daemons whenever an interface is brought up - with the ifupdown framework. Based on a patch from Joachim Breitner. - Closes: #629880 - * Allow tinc daemons to be started using ifupdown. - - -- Guus Sliepen Fri, 24 Jun 2011 18:21:51 +0200 - -tinc (1.0.14-1) unstable; urgency=low - - * New upstream release. - * Bump Standards-Version. - - -- Guus Sliepen Mon, 09 May 2011 00:25:37 +0200 - -tinc (1.0.13-1) unstable; urgency=low - - * New upstream release. - - -- Guus Sliepen Tue, 13 Apr 2010 12:06:36 +0200 - -tinc (1.0.12-2) unstable; urgency=low - - * Remove debconf questions. Closes: #572116 - Apparently debconf may not be used to ask a question at install time and - use the answer at upgrade time. Instead of kludging around this - restriction, no questions are asked anymore, and tinc will now always be - restarted when upgrading. - * Wait up to 5 seconds for tinc daemon to stop before restarting it. - - -- Guus Sliepen Tue, 02 Mar 2010 14:01:36 +0100 - -tinc (1.0.12-1) unstable; urgency=low - - * New upstream release. - * Bump Standards-Version. - * Migrate from CDBS to debhelper. - * Convert source package to 3.0 (quilt) format. - * Remove useless tinc.modules. - * Use init.d script from Michael Tokarev, allowing per-network arguments to - tincd. - * Remove update-rc.d calls from postinst and postrm. - * Let the init.d script depend on $remote_fs. - - -- Guus Sliepen Thu, 04 Feb 2010 00:56:45 +0100 - -tinc (1.0.11-1) unstable; urgency=low - - * New upstream release. - * Cope with texi2html arbitrarily changing its output directory. - Closes: #552927 - * Do not stop tinc when configuring a new version, just restart after - the upgrade. - - -- Guus Sliepen Sun, 01 Nov 2009 20:37:16 +0100 - -tinc (1.0.10-1) unstable; urgency=low - - * New upstream release. - * Include Russian debconf translation. Closes: #548759 - - -- Guus Sliepen Sun, 18 Oct 2009 16:31:49 +0200 - -tinc (1.0.9-1) unstable; urgency=low - - * New upstream release. - - Binds IPv6 sockets only to IPv6. Closes: #440150 - * Update copyright file. Closes: #482566 - - -- Guus Sliepen Fri, 26 Dec 2008 13:25:05 +0100 - -tinc (1.0.8-2) unstable; urgency=low - - * Include Portugese debconf translation. Closes: #434191 - - -- Guus Sliepen Tue, 14 Aug 2007 13:50:27 +0200 - -tinc (1.0.8-1) unstable; urgency=low - - * New upstream release. Closes: #173987 - * Include german debconf translation. Closes: #412351 - * Build-Depend on texinfo. Closes: #424209 - - -- Guus Sliepen Wed, 16 May 2007 17:59:16 +0200 - -tinc (1.0.7-1) unstable; urgency=low - - * New upstream release. - - -- Guus Sliepen Fri, 5 Jan 2007 15:55:42 +0100 - -tinc (1.0.6-1) unstable; urgency=low - - * New upstream release. - - -- Guus Sliepen Mon, 18 Dec 2006 15:41:03 +0100 - -tinc (1.0.5-1) unstable; urgency=low - - * New upstream release. Closes: #391610 - * Add an LSB section to the init script. - - -- Guus Sliepen Tue, 14 Nov 2006 16:32:20 +0100 - -tinc (1.0.4-4) unstable; urgency=low - - * Include swedish debconf translation. Closes: #332963 - * Remove nets.boot on purge. Closes: #333303 - - -- Guus Sliepen Mon, 17 Oct 2005 12:34:32 +0200 - -tinc (1.0.4-3) unstable; urgency=low - - * Depend on debconf | debconf-2.0. - * Include vietnamese debconf translation. Closes: #322305 - * Include japanese debconf translation. Closes: #319591 - - -- Guus Sliepen Thu, 29 Sep 2005 11:15:34 +0200 - -tinc (1.0.4-2) unstable; urgency=low - - * Compensate for change in texinfo's output directory. Closes: #318562 - * Include Czech translation of the debconf questions. Closes: #312982 - - -- Guus Sliepen Sat, 16 Jul 2005 11:42:04 +0200 - -tinc (1.0.4-1) unstable; urgency=low - - * New upstream release. Closes: #294819 - * Update french translation of debconf template. Closes: #293371, #296148 - * Allow dashes in nets.boot. Closes: #296281 - - -- Guus Sliepen Wed, 4 May 2005 21:56:22 +0200 - -tinc (1.0.3-4) unstable; urgency=low - - * Call debconf early in postinst so it won't get confused by output - from other commands in the postinst script. Closes: #292920 - * If MAKEDEV doesn't know about net/tun, fall back to tun. - - -- Guus Sliepen Mon, 31 Jan 2005 13:27:16 +0100 - -tinc (1.0.3-3) unstable; urgency=low - - * Fix clean rule in debian/rules. - - -- Guus Sliepen Thu, 27 Jan 2005 23:16:59 +0000 - -tinc (1.0.3-2) unstable; urgency=low - - * Don't check for /dev/tap* in postinst if we don't create them anyway. - * MAKEDEV expects net/tun instead of tun. - * Don't ask if /dev/net/tun should be created, just do it. - Closes: #259489, #292450 - * Move $EXTRA from init.d/tinc to /etc/default/tinc. Closes: #281366 - - -- Guus Sliepen Thu, 27 Jan 2005 14:10:02 +0100 - -tinc (1.0.3-1) unstable; urgency=low - - * New upstream release. - * Adopting the package from Ivo. - * Use invoke-rc.d, and tell user to do so as well. Closes: #223276 - * Let force-reload do the same thing as reload. Closes: #230180 - - -- Guus Sliepen Fri, 1 Oct 2004 21:04:14 +0200 - -tinc (1.0.2-2) unstable; urgency=low - - * debian/control: Oops, really make that automake1.7. - - -- Ivo Timmermans Sat, 8 Nov 2003 21:53:04 +0100 - -tinc (1.0.2-1) unstable; urgency=low - - * New upstream release: - * Fix broken replies to CHAL_RESP. (Closes: #217646) - * debian/control: Updated automake build dependency to automake1.7. - (Closes: #219360) - - -- Ivo Timmermans Sat, 8 Nov 2003 19:56:04 +0100 - -tinc (1.0.1-2) unstable; urgency=low - - * debian/dirs: Removed, moved contents to tinc.dirs. - (Closes: #208591) - * debian/docs: Renamed to tinc.docs. - * debian/rules: Install the contents of doc/sample-config.tar.gz in - /usr/share/doc/tinc/examples instead of /etc/tinc. - * debian/Makefile*: Removed. - - -- Ivo Timmermans Wed, 10 Sep 2003 12:19:32 +0200 - -tinc (1.0.1-1) unstable; urgency=low - - * New upstream release. - * debian/patches/001_openbsd_device.c.patch: Removed. - - -- Ivo Timmermans Thu, 14 Aug 2003 17:03:28 +0200 - -tinc (1.0release-1) unstable; urgency=low - - * New upstream version. (Closes: #204639) - * Fixes switching back to normal logging mode when killing with - SIGINT twice. (Closes: #175633) - * Uses one SSL context struct for each connection, speeding up - encrypting/decrypting data; don't throw away out of sequence - packets. (Closes: #188874) - * Fixes handling of broadcast messages. (Closes: #175632) - * debian/rules: Use cdbs. - * debian/control: Build-Depend on cdbs, liblzo-dev. - * debian/patches/001_openbsd_device.c.patch: Sync openbsd/device.c to - latest CVS version. - - -- Ivo Timmermans Sun, 10 Aug 2003 16:13:29 +0200 - -tinc (1.0pre8-6) unstable; urgency=low - - * debian/po/fr.po: Added French debconf translation. (Closes: #201803) - - -- Ivo Timmermans Fri, 18 Jul 2003 10:03:20 +0200 - -tinc (1.0pre8-5) unstable; urgency=low - - * debian/*: Change to po-debconf, thanks to From: Michel Grentzinger - for the patch: - - change debhelper dependency to 4.1.16 (according to man - po-debconf), - - manually add nl translation in old tinc.templates (master), - - run debconf-gettextize debian/tinc.templates, - - move old templates files (debian/tinc.templates.*), - - change construction "If you say no" to "If you refuse", - * debian/rules: Call po2debconf. - * debian/rules: Don't copy COPYING.README to the package. - * debian/control: Update Standards-Version. - * debian/conffiles: Removed. - * debian/postinst: No longer use mknod directly, use MAKEDEV. - - -- Ivo Timmermans Tue, 15 Jul 2003 20:13:47 +0200 - -tinc (1.0pre8-4) unstable; urgency=low - - * src/net.h, src/net_packet.c, src/net_setup.c: Apply fix from CVS - for OpenSSL-related memory leaks. (Closes: #189432) - - -- Ivo Timmermans Mon, 5 May 2003 15:00:29 +0200 - -tinc (1.0pre8-3) unstable; urgency=low - - * m4/openssl.m4: Updated to CVS version. (Closes: #184400) - - -- Ivo Timmermans Thu, 13 Mar 2003 17:24:42 +0100 - -tinc (1.0pre8-2) unstable; urgency=low - - * debian/postinst: Create /dev/net/tun if it doesn't exist. - * debian/tinc.modules: Add alias for /dev/net/tun. - * debian/rules: Install tinc.modules. - * These things together: (Closes: #151967, #153156) - - -- Ivo Timmermans Wed, 13 Nov 2002 22:45:38 +0100 - -tinc (1.0pre8-1) unstable; urgency=low - - * New upstream version. - * debian/rules: - - DEB_BUILD_OPTIONS support. - - Enable --enable-tracing by default. - - -- Ivo Timmermans Tue, 17 Sep 2002 13:50:44 +0200 - -tinc (1.0pre7-3) unstable; urgency=low - - * Properly install _all_ info pages. (Closes: #144718) - - -- Ivo Timmermans Wed, 29 May 2002 14:01:21 +0200 - -tinc (1.0pre7-2) unstable; urgency=low - - * Dutch translation wasn't being installed. - - -- Ivo Timmermans Thu, 11 Apr 2002 09:26:14 +0200 - -tinc (1.0pre7-1) unstable; urgency=medium - - * New upstream release. - - -- Ivo Timmermans Tue, 9 Apr 2002 16:04:46 +0200 - -tinc (1.0pre6-3) unstable; urgency=medium - - * Synched with upstream CVS. - * Added build dependency on zlib1g-dev. (Closes: #141705) - - -- Ivo Timmermans Mon, 8 Apr 2002 21:19:31 +0200 - -tinc (1.0pre6-2) unstable; urgency=low - - * The Section was non-US again, so changed it back to main/net. - - -- Ivo Timmermans Thu, 28 Mar 2002 07:26:10 +0100 - -tinc (1.0pre6-1) unstable; urgency=low - - * New upstream release. - * Fixed text in debian/copyright - - -- Ivo Timmermans Wed, 27 Mar 2002 23:10:07 +0100 - -tinc (1.0pre5-4) unstable; urgency=low - - * Added a debconf question for restarting on upgrade. - * Added reload option to init.d, start with EXTRA='-d' default. - * Moved from non-US to main. - * Install example configuration files. - * The HTML documentation wasn't installed; fixed. - - -- Ivo Timmermans Tue, 26 Mar 2002 20:14:19 +0100 - -tinc (1.0pre5-3) unstable; urgency=low - - * Config variables are now treated case sentitivly again. - * Added a forgotten xstrdup. - - -- Ivo Timmermans Fri, 15 Feb 2002 12:35:17 +0100 - -tinc (1.0pre5-2) unstable; urgency=low - - * MaxTimeout accidentally wasn't configurable. (Closes: #119653) - - -- Ivo Timmermans Wed, 13 Feb 2002 13:36:54 +0100 - -tinc (1.0pre5-1) unstable; urgency=low - - * New upstream version. (Closes: #119653) - * Init script redone in sh. - - -- Ivo Timmermans Sun, 10 Feb 2002 16:39:53 +0100 - -tinc (1.0pre4-1.cvs010621.6) unstable; urgency=low - - * Somehow po-Makefile.in.in.diff got lost, readded. (Closes: #119157) - - -- Ivo Timmermans Thu, 15 Nov 2001 17:00:03 +0100 - -tinc (1.0pre4-1.cvs010621.5) unstable; urgency=low - - * Fix a typo in postinst that let it MAKEDEV even on devfs. - (Closes: #116034) - - -- Ivo Timmermans Thu, 18 Oct 2001 09:35:16 +0200 - -tinc (1.0pre4-1.cvs010621.4) unstable; urgency=low - - * Ask before creating the device files. (Closes: #111099) - * Add a section to the info file. - - -- Ivo Timmermans Fri, 12 Oct 2001 20:47:09 +0200 - -tinc (1.0pre4-1.cvs010621.3) unstable; urgency=low - - * Build and install html documentation. (Closes: #106843) - * Remove build-time dependency on libc6-dev. - - -- Ivo Timmermans Mon, 30 Jul 2001 22:03:52 +0200 - -tinc (1.0pre4-1.cvs010621.2) unstable; urgency=low - - * Changed location of the pidfile. (Closes: #102798) - - -- Ivo Timmermans Sun, 1 Jul 2001 01:57:43 +0200 - -tinc (1.0pre4-1.cvs010621.1) unstable; urgency=low - - * New upstream version. (Closes: #98730) - * Rebuilding automatically inserted new config.{sub|guess}. - (Closes: #98165) - * Updated Standards-Version. - * Don't include a sample configuration file. - - -- Ivo Timmermans Thu, 21 Jun 2001 14:08:49 +0200 - -tinc (1.0pre3-5) unstable; urgency=low - - * Fixed an error in the init script that prevented tinc from - starting correctly. - - -- Ivo Timmermans Thu, 8 Feb 2001 02:45:09 +0100 - -tinc (1.0pre3-4) unstable; urgency=low - - * Change build-depends for OpenSSL to libssl096-dev - (Closes: #84197, #84873). - - -- Ivo Timmermans Sun, 4 Feb 2001 22:43:22 +0100 - -tinc (1.0pre3-3) unstable; urgency=low - - * Set architecture to any (really this time!) (Closes: #80451). - * Section set to non-US - - -- Ivo Timmermans Tue, 23 Jan 2001 22:52:53 +0100 - -tinc (1.0pre3-2) unstable; urgency=low - - * Set architecture to any (Closes: #80451). - * Added tinc.modules with some useful module aliases. - - -- Ivo Timmermans Sat, 13 Jan 2001 16:10:57 +0100 - -tinc (1.0pre3-1) unstable; urgency=low - - * New upstream version (1.0pre3) (Closes: #71274). - * Better Depends and Build-Depends lines. - * Dropped dependencies on libgmp, added libssl. - * doc-base.tinc: New file. - * Deleted the file shlibs, as there on longer is a libblowfish. - * Patch po/Makefile.in.in from po-Makefile.in.in.diff if necessary. - * Use dh_perl to get accurate perl dependencies. - - -- Ivo Timmermans Thu, 9 Nov 2000 21:58:40 +0100 - -tinc (1.0pre2-1.1) unstable; urgency=low - - * NMU at Ivo's request as his application is being processed, and his - sponsor is based in the US. - - -- J.H.M. Dassen (Ray) Wed, 28 Jun 2000 21:52:30 +0200 - -tinc (1.0pre2-1) unstable; urgency=low - - * postinst creates a file /etc/tinc/nets.boot, containing all networks - to be started upon system startup; - * init.d script starts all networks from that list. - * postinst script creates tap devices. - - -- Ivo Timmermans Tue, 16 May 2000 00:06:25 +0200 - -tinc (1.0pre1-0.4) unstable; urgency=low - - * postinst script. - - -- Ivo Timmermans Mon, 15 May 2000 19:22:05 +0200 - -tinc (1.0pre1-0.3) unstable; urgency=low - - * system startup script. - - -- Ivo Timmermans Sun, 14 May 2000 22:58:02 +0200 - -tinc (1.0pre1-0.2) unstable; urgency=low - - * Included the blowfish license. - - -- Ivo Timmermans Fri, 21 Apr 2000 17:07:50 +0200 - -tinc (1.0pre1-0.1) unstable; urgency=low - - * Initial Release. - - -- Ivo Timmermans Fri, 21 Apr 2000 17:07:50 +0200 - - diff --git a/debian/control b/debian/control deleted file mode 100644 index 98c0678..0000000 --- a/debian/control +++ /dev/null @@ -1,20 +0,0 @@ -Source: tinc -Section: net -Priority: optional -Maintainer: Guus Sliepen -Standards-Version: 4.4.0 -Build-Depends: libssl-dev, debhelper-compat (= 12), gettext, texinfo, zlib1g-dev, liblzo2-dev -Homepage: http://www.tinc-vpn.org/ -Vcs-Browser: https://salsa.debian.org/guus/tinc -Vcs-Git: https://salsa.debian.org/guus/tinc.git -Rules-Requires-Root: no - -Package: tinc -Architecture: any -Pre-Depends: ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6) -Description: Virtual Private Network daemon - tinc is a daemon with which you can create a virtual private network - (VPN). One daemon can handle multiple connections, so you can - create an entire (moderately sized) VPN with only one daemon per - participating computer. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index c8a6fb8..0000000 --- a/debian/copyright +++ /dev/null @@ -1,34 +0,0 @@ -This package was debianized by Ivo Timmermans on -Fri, 21 Apr 2000 17:07:50 +0200. - -It was downloaded from http://www.tinc-vpn.org/ - -Upstream Authors: - Guus Sliepen - Ivo Timmermans - -Copyright (C) 1998-2005 Ivo Timmermans - 1998-2008 Guus Sliepen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License version 2 can be found in /usr/share/common-licenses/GPL-2. - -The following applies to tinc: - -This program is released under the GPL with the additional exemption -that compiling, linking, and/or using OpenSSL is allowed. You may -provide binary packages linked to the OpenSSL libraries, provided that -all other requirements of the GPL are met. - -The following applies to the LZO library: - -Hereby I grant a special exception to the tinc VPN project -(http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library -(http://www.openssl.org). - -Markus F.X.J. Oberhumer diff --git a/debian/doc-base.tinc b/debian/doc-base.tinc deleted file mode 100644 index a37f46a..0000000 --- a/debian/doc-base.tinc +++ /dev/null @@ -1,10 +0,0 @@ -Document: tinc -Title: tinc Manual -Author: Ivo Timmermans, Guus Sliepen -Abstract: This manual describes how to set up a Virtual Private - Network with tinc. -Section: System/Security - -Format: HTML -Files: /usr/share/doc/tinc/tinc.html/* -Index: /usr/share/doc/tinc/tinc.html/index.html diff --git a/debian/info b/debian/info deleted file mode 100644 index 5468d6c..0000000 --- a/debian/info +++ /dev/null @@ -1 +0,0 @@ -doc/tinc.info diff --git a/debian/patches/fix-incorrect-icmpv6-checksum b/debian/patches/fix-incorrect-icmpv6-checksum deleted file mode 100644 index 4448b88..0000000 --- a/debian/patches/fix-incorrect-icmpv6-checksum +++ /dev/null @@ -1,65 +0,0 @@ -Package: tinc -Version: 1.0.33-1 -Severity: important - -Dear Guus, - -I have been using tinc since 2009 and it is great! - -When PMTUDiscovery=yes and Mode=switch, and if ipv6 is used inside -tinc, the ICMPv6 "Packet Too Big" packets have incorrect checksums. -It can be reproduced by `ping6 -s 1800` and `tcpdump -i -`. Consequently, the host ignores the tinc-generated -ICMPv6 packets, PMTUDiscovery does not work and the connections freeze -when data flows are big. - -I find the bug is gone if the function "inet_checksum" in route.c is -not inlined, either by compiling tinc with "-O2 --fno-inline-functions", or apply a patch such as, - -diff --git a/src/route.c b/src/route.c -index ff82c06e..cd55383a 100644 ---- a/src/route.c -+++ b/src/route.c -@@ -60,7 +60,7 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr); - - /* RFC 1071 */ - --static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { -+__attribute__ ((noinline)) static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { - uint16_t *p = data; - uint32_t checksum = prevsum ^ 0xFFFF; - - - -I have tested with gcc-7.3.0 and gcc-5.4.0. They behaved the same. I -am not good at assembly to find out what really happened, but it is -for sure that inet_checksum does not work as expected if compiled -inline. - -Thanks! - -Yours, -Benda - --- System Information: -Debian Release: buster/sid - APT prefers unstable - APT policy: (500, 'unstable') -Architecture: amd64 (x86_64) - -Kernel: Linux 4.9.0-5-amd64 (SMP w/8 CPU cores) -Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) -Shell: /bin/sh linked to /bin/dash -Init: sysvinit (via /sbin/init) - -Versions of packages tinc depends on: -ii libc6 2.26-2 -ii liblzo2-2 2.08-1.2+b2 -ii libssl1.1 1.1.0g-2 -ii lsb-base 9.20170808 -ii zlib1g 1:1.2.8.dfsg-5 - -tinc recommends no packages. - -tinc suggests no packages. diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index a4c8974..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -fix-incorrect-icmpv6-checksum -support-etc-defaults-tinc diff --git a/debian/patches/support-etc-defaults-tinc b/debian/patches/support-etc-defaults-tinc deleted file mode 100644 index 80b3d86..0000000 --- a/debian/patches/support-etc-defaults-tinc +++ /dev/null @@ -1,12 +0,0 @@ ---- a/systemd/tinc@.service.in -+++ b/systemd/tinc@.service.in -@@ -9,7 +9,8 @@ - [Service] - Type=simple - WorkingDirectory=@sysconfdir@/tinc/%i --ExecStart=@sbindir@/tincd -n %i -D -+EnvironmentFile=/etc/default/tinc -+ExecStart=@sbindir@/tincd -n %i -D $EXTRA - ExecReload=@sbindir@/tincd -n %i -kHUP - KillMode=mixed - Restart=on-failure diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index c4f5d53..0000000 --- a/debian/postinst +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh - -NETSFILE="/etc/tinc/nets.boot" - -set -e - -case "$1" in - configure) - if [ ! -e /dev/.devfsd ] ; then if [ ! -e /dev/.devfs ] ; then - if [ ! -e /dev/net/tun ] ; then if [ ! -e /dev/tun ] ; then if [ -e /dev/MAKEDEV ]; then - echo "Creating tun device..." - cd /dev && ./MAKEDEV net/tun 2>/dev/null || ./MAKEDEV tun 2>/dev/null || echo "Failed to create tun device." - fi; fi; fi - fi; fi - - if [ ! -e $NETSFILE ] ; then - echo "## This file contains all names of the networks to be started on system startup when using sysvinit." > $NETSFILE - echo "## If you are using systemd, use systemctl enable tinc@netname to enable individual networks." >> $NETSFILE - fi - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -#DEBHELPER# diff --git a/debian/postrm b/debian/postrm deleted file mode 100644 index dc3247b..0000000 --- a/debian/postrm +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = purge ]; then - rm -f /etc/tinc/nets.boot -fi - -#DEBHELPER# diff --git a/debian/preinst b/debian/preinst deleted file mode 100644 index 721a2bd..0000000 --- a/debian/preinst +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -NETSFILE="/etc/tinc/nets.boot" -SYSTEM="/lib/systemd/system" -WANTS="/etc/systemd/system/multi-user.target.wants" - -set -e - -case "$1" in - upgrade) - if dpkg --compare-versions "$2" '<<' "1.0.27-1"; then - if [ -f "$NETSFILE" ]; then - echo -n "Creating systemd service instances from nets.boot:" - mkdir -p "$WANTS" - egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do - echo -n " $net" - ln -s "$SYSTEM/tinc@.service" "$WANTS/tinc@$net.service" 2>/dev/null || true - done - echo "." - fi - fi - ;; - - *) - ;; -esac - -#DEBHELPER# diff --git a/debian/rules b/debian/rules deleted file mode 100755 index ee2949d..0000000 --- a/debian/rules +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ - -override_dh_clean: - dh_clean - rm -f doc/tinc.info - -override_dh_auto_configure: - dh_auto_configure -- --enable-uml --with-systemd=/lib/systemd/system --runstatedir=/run - -override_dh_auto_install: - dh_auto_install -- install-html - # Remove info dir file - rm -f debian/tinc/usr/share/info/dir diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/tinc.default b/debian/tinc.default deleted file mode 100644 index bca2432..0000000 --- a/debian/tinc.default +++ /dev/null @@ -1,7 +0,0 @@ -# Extra options to be passed to tincd. -# EXTRA="-d" - -# Limits to be configured for the tincd process. Please read your shell -# (pointed by /bin/sh) documentation for ulimit. You probably want to raise the -# max locked memory value if using both --mlock and --user flags. -# LIMITS="-l 1024" diff --git a/debian/tinc.dirs b/debian/tinc.dirs deleted file mode 100644 index 1eae2e2..0000000 --- a/debian/tinc.dirs +++ /dev/null @@ -1,7 +0,0 @@ -usr/sbin -usr/share -etc -etc/init.d -usr/share/locale -usr/share/doc/tinc -etc/tinc diff --git a/debian/tinc.docs b/debian/tinc.docs deleted file mode 100644 index eb9b151..0000000 --- a/debian/tinc.docs +++ /dev/null @@ -1,3 +0,0 @@ -NEWS -README -AUTHORS diff --git a/debian/tinc.files b/debian/tinc.files deleted file mode 100644 index 3d376cc..0000000 --- a/debian/tinc.files +++ /dev/null @@ -1,6 +0,0 @@ -usr/sbin/tincd -usr/share/man -etc -usr/share/doc/tinc -usr/share/locale -usr/share/info diff --git a/debian/tinc.if-post-down b/debian/tinc.if-post-down deleted file mode 100755 index e173476..0000000 --- a/debian/tinc.if-post-down +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$METHOD" = loopback -o -z "$IF_TINC_NET" ]; then - exit 0 -fi - -# Determine location of the PID file - -EXTRA="" -if [ -n "$IF_TINC_PIDFILE" ]; then - EXTRA="--pidfile=$IF_TINC_PIDFILE" -else - IF_TINC_PIDFILE=/var/run/tinc.$IF_TINC_NET.pid -fi - -# Stop the tinc daemon - -read pid rest < $IF_TINC_PIDFILE 2>/dev/null - -/usr/sbin/tincd -n "$IF_TINC_NET" -k $EXTRA - -# Wait for it to shut down properly - -/bin/sleep 0.1 -i=0; -while [ -f $IF_TINC_PIDFILE ] ; do - if [ ! -e "/proc/$pid" ] ; then - exit 0 - fi - - if [ $i = '30' ] ; then - echo 'Failed to stop tinc daemon!' - exit 1 - fi - /bin/sleep 0.1 - i=$(($i+1)) -done - -exit 0 diff --git a/debian/tinc.if-pre-up b/debian/tinc.if-pre-up deleted file mode 100755 index 68a3b53..0000000 --- a/debian/tinc.if-pre-up +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$METHOD" = loopback -o -z "$IF_TINC_NET" ]; then - exit 0 -fi - -# Read options from /etc/default - -[ -r /etc/default/tinc ] && . /etc/default/tinc - -# Set process limits - -setlimits() { - while [ $# -gt 0 ]; do - parm=$1 ; shift - if [ -n "$1" -a "${1#-}" = "$1" ]; then - value=$1 ; shift - ulimit $parm $value - else - ulimit $parm - fi - done -} - -test -n "$LIMITS" && setlimits $LIMITS - -# Read options from /etc/network/interfaces - -[ -n "$IF_TINC_CONFIG" ] && EXTRA="$EXTRA -c $IF_TINC_CONFIG" -[ -n "$IF_TINC_DEBUG" ] && EXTRA="$EXTRA -d$IF_TINC_DEBUG" -[ -n "$IF_TINC_MLOCK" ] && EXTRA="$EXTRA --mlock" -[ -n "$IF_TINC_LOGFILE" ] && EXTRA="$EXTRA --logfile=$IF_TINC_LOGFILE" -[ -n "$IF_TINC_PIDFILE" ] && EXTRA="$EXTRA --pidfile=$IF_TINC_PIDFILE" || IF_TINC_PIDFILE=/var/run/tinc.$IF_TINC_NET.pid -[ -n "$IF_TINC_CHROOT" ] && EXTRA="$EXTRA --chroot" -[ -n "$IF_TINC_USER" ] && EXTRA="$EXTRA --user=$IF_TINC_USER" - - -# Start tinc daemon - -/usr/sbin/tincd -n "$IF_TINC_NET" -o "Interface=$IFACE" $EXTRA - -# Wait for it to come up properly - -/bin/sleep 0.1 -i=0; -while [ ! -f $IF_TINC_PIDFILE ] ; do - if [ $i = '30' ] ; then - echo 'Failed to start tinc daemon!' - exit 1 - fi - /bin/sleep 0.1 - i=$(($i+1)) -done - -while read pid rest < $IF_TINC_PIDFILE ; do - if [ -e "/proc/$pid" ] ; then - exit 0 - fi - - if [ $i = '30' ] ; then - echo 'Failed to start tinc daemon!' - exit 1 - fi - /bin/sleep 0.1 - i=$(($i+1)) -done - -exit 0 diff --git a/debian/tinc.if-up b/debian/tinc.if-up deleted file mode 100755 index 364f88f..0000000 --- a/debian/tinc.if-up +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$METHOD" = loopback -o -n "$IF_TINC_NET" ]; then - exit 0 -fi - -invoke-rc.d tinc alarm || exit 0 diff --git a/debian/tinc.init b/debian/tinc.init deleted file mode 100644 index 44ff4cf..0000000 --- a/debian/tinc.init +++ /dev/null @@ -1,140 +0,0 @@ -#! /bin/sh -# -### BEGIN INIT INFO -# Provides: tinc -# Required-Start: $remote_fs $network -# Required-Stop: $remote_fs $network -# Should-Start: $syslog $named -# Should-Stop: $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start tinc daemons -# Description: Create a file $NETSFILE (/etc/tinc/nets.boot), -# and put all the names of the networks in there. -# These names must be valid directory names under -# $TCONF (/etc/tinc). Lines starting with a # will be -# ignored in this file. -### END INIT INFO -# -# Based on Lubomir Bulej's Redhat init script. - -. /lib/lsb/init-functions - -DAEMON="/usr/sbin/tincd" -NAME="tinc" -DESC="tinc daemons" -TCONF="/etc/tinc" -NETSFILE="$TCONF/nets.boot" -NETS="" - -test -f $DAEMON || exit 0 - -[ -r /etc/default/tinc ] && . /etc/default/tinc - -# foreach_net "what-to-say" action [arguments...] -foreach_net() { - if [ ! -f $NETSFILE ] ; then - echo "Please create $NETSFILE." - exit 0 - fi - echo -n "$1" - shift - egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do - echo -n " $net" - "$@" $net $args - done - echo "." -} - -signal_running() { - for i in /var/run/tinc.*pid; do - if [ -f "$i" ]; then - head -1 $i | while read pid; do - kill -$1 $pid - done - fi - done -} - -setlimits() { - while [ $# -gt 0 ]; do - parm=$1 ; shift - if [ -n "$1" -a "${1#-}" = "$1" ]; then - value=$1 ; shift - ulimit $parm $value - else - ulimit $parm - fi - done -} - -test -n "$LIMITS" && setlimits $LIMITS - -start() { - $DAEMON $EXTRA -n "$@" -} - -stop() { - [ -f /var/run/tinc.$1.pid ] || return - read pid rest /dev/null || return - - $DAEMON -n $1 -k || return - - i=0; - /bin/sleep 0.5 - - # Wait for the pidfile to disappear - while [ -f /var/run/tinc.$1.pid ]; do - # And check that there is an actual process running - kill -0 "$pid" 2>/dev/null || return - - if [ $i = '10' ] ; then - # It's still alive, kill it again and give up - $DAEMON -n $1 -k && /bin/sleep 0.5 - break - else - echo -n "." - i=$(($i+1)) - fi - - /bin/sleep 0.5 - done -} - -reload() { - $DAEMON -n $1 -kHUP -} - -alarm() { - $DAEMON -n $1 -kALRM -} - -restart() { - stop "$@" - start "$@" -} - -case "$1" in - start) - foreach_net "Starting $DESC:" start - ;; - stop) - foreach_net "Stopping $DESC:" stop - ;; - reload|force-reload) - foreach_net "Reloading $DESC configuration:" reload - ;; - restart) - foreach_net "Restarting $DESC:" restart - ;; - alarm) - signal_running ALRM - ;; - *) - echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|alarm}" - exit 1 - ;; -esac - -exit 0 diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc deleted file mode 100644 index a79b551..0000000 --- a/debian/upstream/signing-key.asc +++ /dev/null @@ -1,70 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 - -mQINBEVZzTABEADawFv/ibQ48uA1eRhL07vdM36Pcq2HDyuyNA+vYEalNH4jLmha -nGPvDALWwX0DXIWDAG8zeTj8s8zliLIjuPS4WRI2YdKIvWeG9fEvpKSXVWa42ica -dpzn/H2aBd4Ax6rQaiTXKOvxANAp2Veb+73ssPV5AL00uGTpzhh98xQzfFQCZ9ZL -YSVPqbMed5oCt/4jM9FBO2CuBtkfiO0dVVYtW7FAVjcIlE2NaZol/KGvz7wsS+yA -dE42W0l5MdQueLmTF4AIUSSTyPFGMQoyqh+MPif73Y589IGcW6GdfKYWnVDo6Trh -HOhcEky+uTYKb6NL0vrJgUiYVMzAOXFDdJni1eQGO6EfZRNYtTga3alWq/jVelK7 -BID5JyNbkrTAqdPnhJGivVyk8gGX3+Hng8rkXTfWhp6yAYau1QfBm0F2tIQmpL1C -+7DoLvFErboQf685jXJBjzyvsJxB2ZLH1OOw6mNL0hy2LFkIyGza/bktY2em4apo -KWV5AM5LpyW6THH1oDS7706xFNkf4IFhKE0hKPzBiRnMDjRtMI131lkc5+P8Lqf5 -jLTCFUgbEhU6Dz2YjhHAumVm0NWJETUpFDtVvMrqk+mp5xldUOWRNlYQC5aQOyda -eHOlNzB/BFbPhKMWI/zWlEH6f0t6WjHb4iwpWO47511aVNHF59aPzbAHxwARAQAB -tC9UaW5jIERldmVsb3BtZW50IFRlYW0gPHRpbmMtZGV2ZWxAdGluYy12cG4ub3Jn -PokCNgQTAQIAIAUCRVnNMAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEEpg -hLnA1x9KxOAQAMPhO2WTXv9AaGQBQhyyoGseKoSfcRjtI9YEfE0OInQQ2E+SPYF/ -dkfeLGAUqa4foTYQlMqfw70vBhTdVCb7HLTGn6/ICFUtDwakUQCgUQGlUVQiondA -8W6jj+QWrh5BQhHuXy2nCVaKnksu0/xQPsJotghxuYqaot3iJ4qVw9iT/Yeo9irH -Ffftqu0OVCdQ5zQuFNI9YCv/C83L59ecH7bOzYz2efTyobvxrhmgQtgOQwCWOE09 -Kr3veM9KLG33YoXlqv8QN/3CwtsJvSwfhj+R2JowZC7RqHe/yznRzmRMsgbrolxi -uiJLonGxcNNkD7WhXi7/zL4A/JaC27XrFf1MPLv8aiTwnOIfrXd5jawpauUOZOXK -UjIZHlIqviB0r5s7A+AFeHW38Tp9VzNuQ7aEl5bHbSXV+s7DTAwGb279z0AVaJ3h -5hWFxupw7UoGdzROwCBYzeX3sioAL6QvkXua8X6zOH45VEiSwrRX3Hlx/MLo7Z4g -PWgFLf6WviHQXCG834To1XIwUk9RgNsL7OzGjtaCuRymADImKMNwierq2zTfoRFQ -v9onIadIMF1fsc70hiBG9yAi36MEuk4VxG8Jc3PQQfSFm4RWazv1k3E0AAIob2Ek -DLVjvLO62Navo/OQ6D7yyiX0qes5S7/k3F1h8+87eRn3yxZE2kbxPg8KuQENBEVZ -zYYBCACoYgExmMKEtABL3pir/IXI4exR/45hkP6txFIrkVQb8DGJ9H39kiDr4gtj -F+pvcgMpec35S3m4fJ7WhDNvbDB4ZvONc1NMKs9cqDXfB+TLWPm4W+SkcKUrs+nK -i8l7ieggTALJcvRoLTX2EFmUFrD6y870W3rK2SfC/0VJX8Ou5cPbwCeueExjo5x0 -3gNfu0jWUS0cyA9y+1rVVekrLuJY/+SI4jv3gdzrYbxD0f6dpbpC37QHoJdd0KGF -acPtT2azjY+HxW10EA3Aw9oZWFXnb1nFg2RbDpkaGLmLbaXweltLyw154UmCXxym -PXPqi9bSfEkj0GiYrapk4mW114u9ABEBAAGJA0QEGAECAA8FAkVZzYcCGwIFCQHh -M4ABKQkQSmCEucDXH0rAXSAEGQECAAYFAkVZzYcACgkQ017duBDeLmmu3wf/TFZM -tLKxiyQPtGSTE3eULPdWCEMDZXdSPTY0QHM7Zvh+qn1ei+iFpD0549MYnBEAwDIV -4o62Nrcg8IPu0CEkZIAn2JiFFGYvMGk91awZGV1GS3umd7Dt349E1oKDPZVzRn+j -QIKarXxxabRmx2s/dZZgSs/eguWTboBFmvls9tVfe8x/xPvcHFmqHVUoGKEJy6Tm -no+s4yNjpc5wAaRml+GYf1tK9WMFuZn79qKxkYv4WI96dXR0FL59YbFRkkaI+1/b -G31MvWTqVjY1nJGslByFPUUB8Ca1djtp1gx6NXnOYr3V5MEDfdbjjPu79No+/y6M -tIua5yNtSRlk2nKhIqo3D/sGQ/uHijiMRAtoLhiyqYMc9W9vx/KOoCUHoMJqE39a -Eputvgwwo0rwgSmNfB1dzneFojBdJ47WBSHC8NKtkpJj6mzvvlaI9jmEpK54x3nl -OmBj3X/xaepoRGAtrmgTBP4A9hSjrTMGu/tUQjlX+Xcr6n3g7GSVe5FpUyIMPXEU -+JZDTiEUyn1OdzfNGmnWP+KJX5pQVq4czf5XK6otLZJELDVw/Hbjnjmdz5WOKgEH -jSof3WPeMBgPAcd/cMAZeiGtWM1UpJBHqEXTkthmrpmtRftJKDbooNM9d5OwKiT+ -I3vNBv/plMSr8NDjhTWC+ihrN6RBj1vaqpDgGpucPhoO2hwNqWuI4q5WUKtCyw6J -An7ErNaH4c0nVaZq6kJ8Vxdt+LpKYmOsJ8y9xtl6StcrkKNn+6ZfCfee7DEo2bvb -scfpqJqqOqb5KOagTpYs8mo6yQ3leRvFtoeBOQHVQzct23EwOMxbDyeunT50a1eH -MZTEWuIiuCUudM81QXU46oIcaAtj8tpG0Tmnku9g27EjwxUt+8kVmhlPHMb2TdoF -k5d0ce+JuxIG5+i+t8sUCorMc8zfp4g1bxZeMOcPnfyO3bSW11EVcN7ZxHlFC+XE -YOByP50CM3P8lItPlQ+WpY9kYWjiwu9kVPaGQ16G47nspngJInU5dhka3KJGtIZe -q7kBDQRFWc3GAQgAz/JUs24niKsd0ZtOjUWd4R4y0gjS0kC/vvLL2gbXYkA9tcjG -5iEvVWJY34QsudX0v1ULsVnJ89X/gsk8hAhAia1TQm+0Qq+MSxEaQkMSaOO8N70U -XzgH1dielvpea20WO4MyWQuRIJ0K2nsGmEPnt6ZP7fK8HVHFNggP/mQ6LMu1reAF -gvb8cEtjb9B5QaCUEoLjsbsuo+vLW7AWy4GfIRNESHw2Qt08AUaGrihpu6zi7N2b -QkHHJtqa63GzYJ+kYzAVvrFJXdwL/TRXLBzv+6yyvYSIHi8uB6/o6CZN6hpjfpME -ph+oYPqXeNOyMd1E9Kg8ymcPrNyQKfE3WnCRXQARAQABiQIlBBgBAgAPBQJFWc3H -AhsMBQkB4TOAAAoJEEpghLnA1x9KXYMP/3D9JYti6C8DWuX2hWv+2SUbLcMa5u1e -ETewIo5S3mqGWSaxX4YLPVRkZ1lOLmFysOLimf0thYm7IsatLcWmBdYUpK92ilvr -Sk2sKlhrOoBXEX/79Kz+Aj5PjeyiQxgQ7Ba/afwhU6aTqs2Dp1T0YNu2eBvV+1QH -lZnW2Wh96zzwc0dJUuY9eBk5Fgpu08Wce7o6jxFPtVyAaQa0zcNAmw2TSY7wbunJ -WTl9OgATAyqVCuhWW7AnPcSqkH8lQigSc00wfqJKOD2Us0FqN6UKDCZTyQkdP6hx -G+3aUkkvGSOxy7u9bVWmrikuJMoiIY/CH/m+GcJJATVibI7t5MhhtBGySKc3PAwc -58sVe9AnbDvs84efrNP59j2KG2KKqcqjTGAmKyJnG3N50xJGakDIsqfneIRNWpEE -pOOPaOqR4qnPAS9OSt9A3hqBpWPjQcScd6AuO+J2PE5y23pTnb9PtLBQb5e4VFiv -N54u8j4bU2CO0SC2isZ3CR68dPHthWsxt4XbjhgktjbpQRQ8L2EDBQ8oE13GOrOw -P8x4Q0eC5uzkXNyRqzKOsxlZEuc+75aDDd3M2GDw08FG7GI1p/L+NgenwT+9TmFX -2hOKVrjgyx+fPut1t5DJJubDWXGOK33qvrL7HTCEv1zz7LNbbPwwNHK4lfMAWuJW -D9wc3Y9Se/P/ -=5MAs ------END PGP PUBLIC KEY BLOCK----- diff --git a/debian/watch b/debian/watch deleted file mode 100644 index f29609e..0000000 --- a/debian/watch +++ /dev/null @@ -1,2 +0,0 @@ -version=3 -opts=pgpsigurlmangle=s/$/.sig/ http://www.tinc-vpn.org/packages/tinc-(1\.0\.\d+)\.tar\.gz diff --git a/depcomp b/depcomp index 6b39162..65cbf70 100755 --- a/depcomp +++ b/depcomp @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/doc/Makefile.in b/doc/Makefile.in index 81e9c93..86497e4 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/doc/texinfo.tex b/doc/texinfo.tex index deca599..ac5c1d9 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -1,11 +1,14 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% +% % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2020-02-11.09} +\def\texinfoversion{2018-02-12.17} % -% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 +% Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -179,7 +182,7 @@ % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script - ap-pen-dix bit-map bit-maps + auto-ma-ti-cal-ly ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces @@ -218,7 +221,7 @@ % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. -% +% \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} @@ -241,7 +244,17 @@ % \def\finalout{\overfullrule=0pt } +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. @@ -257,8 +270,8 @@ % \domark is called twice inside \chapmacro, to add one % mark before the section break, and one after. -% In the second call \prevchapterdefs is the same as \currentchapterdefs, -% and \prevsectiondefs is the same as \currentsectiondefs. +% In the second call \prevchapterdefs is the same as \lastchapterdefs, +% and \prevsectiondefs is the same as \lastsectiondefs. % Then if the page is not broken at the mark, some of the previous % section appears on the page, and we can get the name of this section % from \firstmark for @everyheadingmarks top. @@ -266,11 +279,11 @@ % % See page 260 of The TeXbook. \def\domark{% - \toks0=\expandafter{\currentchapterdefs}% - \toks2=\expandafter{\currentsectiondefs}% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% - \toks8=\expandafter{\currentcolordefs}% + \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom @@ -287,19 +300,19 @@ % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% - \ifcase0\the\savedtopmark\fi + \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} -\def\getcolormarks{\ifcase2\the\savedtopmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. -\def\currentchapterdefs{} -\def\currentsectiondefs{} -\def\currentsection{} +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\lastsection{} \def\prevchapterdefs{} \def\prevsectiondefs{} -\def\currentcolordefs{} +\def\lastcolordefs{} % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset @@ -309,76 +322,51 @@ % Main output routine. % \chardef\PAGE = 255 -\newtoks\defaultoutput -\defaultoutput = {\savetopmark\onepageout{\pagecontents\PAGE}} -\output=\expandafter{\the\defaultoutput} +\output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox -% When outputting the double column layout for indices, an output routine -% is run several times, which hides the original value of \topmark. This -% can lead to a page heading being output and duplicating the chapter heading -% of the index. Hence, save the contents of \topmark at the beginning of -% the output routine. The saved contents are valid until we actually -% \shipout a page. -% -% (We used to run a short output routine to actually set \topmark and -% \firstmark to the right values, but if this was called with an empty page -% containing whatsits for writing index entries, the whatsits would be thrown -% away and the index auxiliary file would remain empty.) -% -\newtoks\savedtopmark -\newif\iftopmarksaved -\topmarksavedtrue -\def\savetopmark{% - \iftopmarksaved\else - \global\savedtopmark=\expandafter{\topmark}% - \global\topmarksavedtrue - \fi -} - % \onepageout takes a vbox as an argument. -% \shipout a vbox for a single page, adding an optional header, footer -% and footnote. This also causes index entries for this page to be written -% to the auxiliary files. +% \shipout a vbox for a single page, adding an optional header, footer, +% cropmarks, and footnote. This also causes index entries for this page +% to be written to the auxiliary files. % \def\onepageout#1{% - \hoffset=\normaloffset + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % + % Common context changes for both heading and footing. + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars} + % % Retrieve the information for the headings from the marks in the page, % and call Plain TeX's \makeheadline and \makefootline, which use the % values in \headline and \footline. % % This is used to check if we are on the first page of a chapter. - \ifcase1\the\savedtopmark\fi + \ifcase1\topmark\fi \let\prevchaptername\thischaptername \ifcase0\firstmark\fi \let\curchaptername\thischaptername % \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi % \ifx\curchaptername\prevchaptername \let\thischapterheading\thischapter \else % \thischapterheading is the same as \thischapter except it is blank - % for the first page of a chapter. This is to prevent the chapter name + % for the first page of a chapter. This is to prevent the chapter name % being shown twice. \def\thischapterheading{}% \fi % - % Common context changes for both heading and footing. - % Do this outside of the \shipout so @code etc. will be expanded in - % the headline as they should be, not taken literally (outputting ''code). - \def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars} - % - \global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}% - % - \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi - \global\setbox\footlinebox = \vbox{\commonheadfootline \makefootline}% + \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% + \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% % {% % Set context for writing to auxiliary files like index files. @@ -386,12 +374,37 @@ % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % - \atdummies % don't expand commands in the output. - \turnoffactive + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt @@ -402,9 +415,24 @@ \unvbox\footlinebox \fi % - }% - }% - \global\topmarksavedfalse + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } @@ -423,6 +451,17 @@ \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + % Argument parsing @@ -448,10 +487,11 @@ }% } -% First remove any @comment, then any @c comment. Pass the result on to -% \argcheckspaces. +% First remove any @comment, then any @c comment. Also remove a @texinfoc +% comment (see \scanmacro for details). Pass the result on to \argcheckspaces. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} -\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} +\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % @@ -1052,7 +1092,7 @@ where each line of input produces a line of output.} tex.sprint( string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. string.char(0x5c) .. string.char(0x25) .. '03o', - math.floor(c / 256), math.floor(c % 256))) + (c / 256), (c % 256))) else c = c - 0x10000 local c_hi = c / 1024 + 0xd800 @@ -1062,8 +1102,8 @@ where each line of input produces a line of output.} string.char(0x5c) .. string.char(0x25) .. '03o' .. string.char(0x5c) .. string.char(0x25) .. '03o' .. string.char(0x5c) .. string.char(0x25) .. '03o', - math.floor(c_hi / 256), math.floor(c_hi % 256), - math.floor(c_lo / 256), math.floor(c_lo % 256))) + (c_hi / 256), (c_hi % 256), + (c_lo / 256), (c_lo % 256))) end end end @@ -1076,19 +1116,15 @@ where each line of input produces a line of output.} function PDFescstr(str) for c in string.bytes(str) do if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then - tex.sprint(-2, + tex.sprint( string.format(string.char(0x5c) .. string.char(0x25) .. '03o', c)) else - tex.sprint(-2, string.char(c)) + tex.sprint(string.char(c)) end end end } - % The -2 in the arguments here gives all the input to TeX catcode 12 - % (other) or 10 (space), preventing undefined control sequence errors. See - % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html - % \endgroup \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}} \ifnum\luatexversion>84 @@ -1127,21 +1163,11 @@ where each line of input produces a line of output.} \fi \fi -\newif\ifpdforxetex -\pdforxetexfalse -\ifpdf - \pdforxetextrue -\fi -\ifx\XeTeXrevision\thisisundefined\else - \pdforxetextrue -\fi - - % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. -% +% % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so @@ -1193,7 +1219,7 @@ output) for that.)} % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% - \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } @@ -1201,7 +1227,7 @@ output) for that.)} \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} - \def\currentcolordefs{} + \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt @@ -1446,7 +1472,7 @@ output) for that.)} % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. - % + % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike @@ -1502,9 +1528,6 @@ output) for that.)} \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} - % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may - % be a simple number, or a list of numbers in the case of an index - % entry. \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} @@ -1579,7 +1602,7 @@ output) for that.)} % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% - \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } @@ -1587,7 +1610,7 @@ output) for that.)} \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} - \def\currentcolordefs{} + \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt @@ -2179,7 +2202,7 @@ end % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} -\setfont\defsl\slshape{10}{\magstep1}{OT1} +\setfont\defsl\slshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\ttfont=\deftt \let\bffont = \defbf \let\ttslfont=\defttsl \let\slfont=\defsl \bf} @@ -2327,7 +2350,7 @@ end % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} -\setfont\defsl\slshape{10}{\magstephalf}{OT1} +\setfont\defsl\slshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\ttfont=\deftt \let\bffont = \defbf \let\slfont=\defsl \let\ttslfont=\defttsl \bf} @@ -2730,7 +2753,7 @@ end } % Commands to set the quote options. -% +% \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword @@ -2771,7 +2794,7 @@ end % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% - \ifusingtt + \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next @@ -2850,7 +2873,7 @@ end % @t, explicit typewriter. \def\t#1{% - {\tt \plainfrenchspacing #1}% + {\tt \rawbackslash \plainfrenchspacing #1}% \null } @@ -2877,6 +2900,7 @@ end % Turn off hyphenation. \nohyphenation % + \rawbackslash \plainfrenchspacing #1% }% @@ -2918,14 +2942,14 @@ end \gdef\codedash{\futurelet\next\codedashfinish} \gdef\codedashfinish{% \normaldash % always output the dash character itself. - % + % % Now, output a discretionary to allow a line break, unless % (a) the next character is a -, or % (b) the preceding character is a -. % E.g., given --posix, we do not want to allow a break after either -. % Given --foo-bar, we do want to allow a break between the - and the b. \ifx\next\codedash \else - \ifx\codedashprev\codedash + \ifx\codedashprev\codedash \else \discretionary{}{}{}\fi \fi % we need the space after the = for the case when \next itself is a @@ -3007,7 +3031,7 @@ end % For pdfTeX and LuaTeX \ifurefurlonlylink % PDF plus option to not display url, show just arg - \unhbox0 + \unhbox0 \else % PDF, normally display both arg and url for consistency, % visibility, if the pdf is eventually used to print, etc. @@ -3020,7 +3044,7 @@ end % For XeTeX \ifurefurlonlylink % PDF plus option to not display url, show just arg - \unhbox0 + \unhbox0 \else % PDF, normally display both arg and url for consistency, % visibility, if the pdf is eventually used to print, etc. @@ -3063,33 +3087,41 @@ end \global\def/{\normalslash} } -\def\urefcodeamp{\urefprebreak \&\urefpostbreak} -\def\urefcodedot{\urefprebreak .\urefpostbreak} -\def\urefcodehash{\urefprebreak \#\urefpostbreak} -\def\urefcodequest{\urefprebreak ?\urefpostbreak} +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% - \urefprebreak \slashChar + \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. - \ifx\next/\else \urefpostbreak \fi + \ifx\next/\else \urefpoststretch \fi } } -% By default we'll break after the special characters, but some people like to -% break before the special chars, so allow that. Also allow no breaking at -% all, for manual control. -% +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore - \def\urefprebreak{\urefallowbreak}\def\urefpostbreak{\nobreak} + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter - \def\urefprebreak{\nobreak}\def\urefpostbreak{\urefallowbreak} + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% @@ -3099,19 +3131,6 @@ end \def\wordbefore{before} \def\wordnone{none} -% Allow a ragged right output to aid breaking long URL's. There can -% be a break at the \allowbreak with no extra glue (if the existing stretch in -% the line is sufficent), a break at the \penalty100 with extra glue added -% at the end of the line, or no break at all here. -% Changing the value of the penalty and/or the amount of stretch affects how -% preferrable one choice is over the other. -\def\urefallowbreak{% - \allowbreak - \hskip 0pt plus 2 em\relax - \penalty300 - \hskip 0pt plus -2 em\relax -} - \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. @@ -3122,7 +3141,7 @@ end % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} -\ifpdforxetex +\ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces @@ -3132,7 +3151,18 @@ end \endlink \endgroup} \else - \let\email=\uref + \ifx\XeTeXrevision\thisisundefined + \let\email=\uref + \else + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} + \fi \fi % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), @@ -3308,7 +3338,7 @@ end % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. -% +% \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} @@ -3316,7 +3346,7 @@ end \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } -% +% % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if % FMTNAME is tex, else ELSE-TEXT. \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} @@ -3332,7 +3362,7 @@ end % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. -% +% \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% @@ -3609,7 +3639,7 @@ end % for non-CM glyphs. That is ec* for regular text and tc* for the text % companion symbols (LaTeX TS1 encoding). Both are part of the ec % package and follow the same conventions. -% +% \def\ecfont{\etcfont{e}} \def\tcfont{\etcfont{t}} % @@ -3681,7 +3711,7 @@ end after the title page.}}% \def\setshortcontentsaftertitlepage{% \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo - command; move your @shortcontents and @contents commands if you + command; move your @shortcontents and @contents commands if you want the contents after the title page.}}% \parseargdef\shorttitlepage{% @@ -3736,7 +3766,7 @@ end % don't worry much about spacing, ragged right. This should be used % inside a \vbox, and fonts need to be set appropriately first. \par should % be specified before the end of the \vbox, since a vbox is a group. -% +% \def\raggedtitlesettings{% \rm \hyphenpenalty=10000 @@ -4359,7 +4389,7 @@ end } % multitable-only commands. -% +% % @headitem starts a heading row, which we typeset in bold. Assignments % have to be global since we are inside the implicit group of an % alignment entry. \everycr below resets \everytab so we don't have to @@ -4666,6 +4696,19 @@ end } } +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +% Unfortunately, this has the consequence that when _ is in the *value* +% of an @set, it does not print properly in the roman fonts (get the cmr +% dot accent at position 126 instead). No fix comes to mind, and it's +% been this way since 2003 or earlier, so just ignore it. +% \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% @@ -4678,13 +4721,13 @@ end % Like \expandablevalue, but completely expandable (the \message in the % definition above operates at the execution level of TeX). Used when % writing to auxiliary files, due to the expansion that \write does. -% If flag is undefined, pass through an unexpanded @value command: maybe it +% If flag is undefined, pass through an unexpanded @value command: maybe it % will be set by the time it is read back in. % % NB flag names containing - or _ may not work here. \def\dummyvalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax - \string\value{#1}% + \noexpand\value{#1}% \else \csname SET#1\endcsname \fi @@ -4694,7 +4737,7 @@ end % if possible, otherwise sort late. \def\indexnofontsvalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax - ZZZZZZZ% + ZZZZZZZ \else \csname SET#1\endcsname \fi @@ -4702,7 +4745,7 @@ end % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. -% +% % To get the special treatment we need for `@end ifset,' we call % \makecond and then redefine. % @@ -4735,7 +4778,7 @@ end % without the @) is in fact defined. We can only feasibly check at the % TeX level, so something like `mathcode' is going to considered % defined even though it is not a Texinfo command. -% +% \makecond{ifcommanddefined} \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} % @@ -4843,16 +4886,30 @@ end \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} + +% Used when writing an index entry out to an index file to prevent +% expansion of Texinfo commands that can appear in an index entry. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \definedummyletter\@% + \definedummyletter\ % + % + % For texindex which always views { and } as separators. + \def\{{\lbracechar{}}% + \def\}{\rbracechar{}}% + % + % Do the redefinitions. + \definedummies +} -% Used for the aux, toc and index files to prevent expansion of Texinfo -% commands. +% Used for the aux and toc files, where @ is the escape character. % \def\atdummies{% \definedummyletter\@% \definedummyletter\ % \definedummyletter\{% \definedummyletter\}% - \definedummyletter\&% % % Do the redefinitions. \definedummies @@ -4876,7 +4933,8 @@ end \def\definedummyletter#1{\def#1{\string#1}}% \let\definedummyaccent\definedummyletter -% Called from \atdummies to prevent the expansion of commands. +% Called from \indexdummies and \atdummies, to effectively prevent +% the expansion of commands. % \def\definedummies{% % @@ -4923,10 +4981,8 @@ end \definedummyword\TeX % % Assorted special characters. - \definedummyword\ampchar \definedummyword\atchar \definedummyword\arrow - \definedummyword\backslashchar \definedummyword\bullet \definedummyword\comma \definedummyword\copyright @@ -4963,8 +5019,6 @@ end \definedummyword\sup \definedummyword\textdegree % - \definedummyword\subentry - % % We want to disable all macros so that they are not expanded by \write. \macrolist \let\value\dummyvalue @@ -5045,10 +5099,11 @@ end \commondummyword\xref } +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + \let\indexlbrace\relax \let\indexrbrace\relax -\let\indexatchar\relax -\let\indexbackslash\relax {\catcode`\@=0 \catcode`\\=13 @@ -5082,8 +5137,10 @@ end } \gdef\indexnonalnumreappear{% + \useindexbackslash \let-\normaldash \let<\normalless + \def\@{@}% } } @@ -5191,19 +5248,39 @@ end } \def\defglyph#1#2{\def#1##1{#2}} % see above + +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? +% Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. -\def\doind#1#2{% +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. +% TODO: Two-level index? Operation index? + +% Workhorse for all indexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% \iflinks {% - % \requireopenindexfile{#1}% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % \edef\writeto{\csname#1indfile\endcsname}% % - \def\indextext{#2}% - \safewhatsit\doindwrite + \safewhatsit\dosubindwrite }% \fi } @@ -5218,14 +5295,28 @@ end \ifx\suffix\indexisfl\def\suffix{f1}\fi % Open the file \immediate\openout\csname#1indfile\endcsname \jobname.\suffix - % Using \immediate above here prevents an object entering into the current + % Using \immediate above here prevents an object entering into the current % box, which could confound checks such as those in \safewhatsit for % preceding skips. \typeout{Writing index file \jobname.\suffix}% \fi} \def\indexisfl{fl} -% Definition for writing index entry sort key. +% Output \ as {\indexbackslash}, because \ is an escape character in +% the index files. +\let\indexbackslash=\relax +{\catcode`\@=0 \catcode`\\=\active + @gdef@useindexbackslash{@def\{{@indexbackslash}}} +} + +% Definition for writing index entry text. +\def\sortas#1{\ignorespaces}% + +% Definition for writing index entry sort key. Should occur at the at +% the beginning of the index entry, like +% @cindex @sortas{september} \september +% The \ignorespaces takes care of following space, but there's no way +% to remove space before it. { \catcode`\-=13 \gdef\indexwritesortas{% @@ -5236,150 +5327,51 @@ end \xdef\indexsortkey{#1}\endgroup} } -\def\indexwriteseealso#1{ - \gdef\pagenumbertext{\string\seealso{#1}}% -} -\def\indexwriteseeentry#1{ - \gdef\pagenumbertext{\string\seeentry{#1}}% -} -% The default definitions -\def\sortas#1{}% -\def\seealso#1{\i{\putwordSeeAlso}\ #1}% for sorted index file only -\def\putwordSeeAlso{See also} -\def\seeentry#1{\i{\putwordSee}\ #1}% for sorted index file only - - -% Given index entry text like "aaa @subentry bbb @sortas{ZZZ}": -% * Set \bracedtext to "{aaa}{bbb}" -% * Set \fullindexsortkey to "aaa @subentry ZZZ" -% * If @seealso occurs, set \pagenumbertext +% Write the entry in \toks0 to the index file. % -\def\splitindexentry#1{% - \gdef\fullindexsortkey{}% - \xdef\bracedtext{}% - \def\sep{}% - \def\seealso##1{}% - \def\seeentry##1{}% - \expandafter\doindexsegment#1\subentry\finish\subentry -} - -% append the results from the next segment -\def\doindexsegment#1\subentry{% - \def\segment{#1}% - \ifx\segment\isfinish - \else - % - % Fully expand the segment, throwing away any @sortas directives, and - % trim spaces. - \edef\trimmed{\segment}% - \edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}% - % - \xdef\bracedtext{\bracedtext{\trimmed}}% - % - % Get the string to sort by. Process the segment with all - % font commands turned off. - \bgroup - \let\sortas\indexwritesortas - \let\seealso\indexwriteseealso - \let\seeentry\indexwriteseeentry - \indexnofonts - % The braces around the commands are recognized by texindex. - \def\lbracechar{{\string\indexlbrace}}% - \def\rbracechar{{\string\indexrbrace}}% - \let\{=\lbracechar - \let\}=\rbracechar - \def\@{{\string\indexatchar}}% - \def\atchar##1{\@}% - \def\backslashchar{{\string\indexbackslash}}% - \uccode`\~=`\\ \uppercase{\let~\backslashchar}% - % - \let\indexsortkey\empty - \global\let\pagenumbertext\empty - % Execute the segment and throw away the typeset output. This executes - % any @sortas or @seealso commands in this segment. - \setbox\dummybox = \hbox{\segment}% - \ifx\indexsortkey\empty{% - \indexnonalnumdisappear - \xdef\trimmed{\segment}% - \xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}% - \xdef\indexsortkey{\trimmed}% - \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi - }\fi - % - % Append to \fullindexsortkey. - \edef\tmp{\gdef\noexpand\fullindexsortkey{% - \fullindexsortkey\sep\indexsortkey}}% - \tmp - \egroup - \def\sep{\subentry}% - % - \expandafter\doindexsegment - \fi -} -\def\isfinish{\finish}% -\newbox\dummybox % used above - -\let\subentry\relax - -% Use \ instead of @ in index files. To support old texi2dvi and texindex. -% This works without changing the escape character used in the toc or aux -% files because the index entries are fully expanded here, and \string uses -% the current value of \escapechar. -\def\escapeisbackslash{\escapechar=`\\} - -% Use \ in index files by default. texi2dvi didn't support @ as the escape -% character (as it checked for "\entry" in the files, and not "@entry"). When -% the new version of texi2dvi has had a chance to become more prevalent, then -% the escape character can change back to @ again. This should be an easy -% change to make now because both @ and \ are only used as escape characters in -% index files, never standing for themselves. -% -\set txiindexescapeisbackslash - -% Write the entry in \indextext to the index file. -% -\def\doindwrite{% - \maybemarginindex - % - \atdummies - % - \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax\else - \escapeisbackslash +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % - % For texindex which always views { and } as separators. - \def\{{\lbracechar{}}% - \def\}{\rbracechar{}}% - \uccode`\~=`\\ \uppercase{\def~{\backslashchar{}}}% + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \useindexbackslash % \indexbackslash isn't defined now so it will be output + % as is; and it will print as backslash. + % The braces around \indexbrace are recognized by texindex. % - % Split the entry into primary entry and any subentries, and get the index - % sort key. - \splitindexentry\indextext + % Get the string to sort by, by processing the index entry with all + % font commands turned off. + {\indexnofonts + \def\lbracechar{{\indexlbrace}}% + \def\rbracechar{{\indexrbrace}}% + \let\{=\lbracechar + \let\}=\rbracechar + \indexnonalnumdisappear + \xdef\indexsortkey{}% + \let\sortas=\indexwritesortas + \edef\temp{\the\toks0}% + \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas + \ifx\indexsortkey\empty + \xdef\indexsortkey{\temp}% + \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi + \fi + }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. - % \edef\temp{% \write\writeto{% - \string\entry{\fullindexsortkey}% - {\ifx\pagenumbertext\empty\noexpand\folio\else\pagenumbertext\fi}% - \bracedtext}% + \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% }% \temp } - -% Put the index entry in the margin if desired (undocumented). -\def\maybemarginindex{% - \ifx\SETmarginindex\relax\else - \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \relax\indextext}}% - \fi -} -\let\SETmarginindex=\relax - +\newbox\dummybox % used above % Take care of unwanted page breaks/skips around a whatsit: % @@ -5467,14 +5459,9 @@ end % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} -% \entry {topic}{} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. -% \secondary {subtopic}{} -% for a subtopic with sub-subtopics -% \tertiary {subtopic}{subsubtopic}{pagelist} -% for each sub-subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. @@ -5486,6 +5473,11 @@ end \def\tindex {\tpindex} \def\pindex {\pgindex} +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. @@ -5499,10 +5491,14 @@ end \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 12 % See comment in \requireopenindexfile. \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi - % - % See if the index file exists and is nonempty. \openin 1 \jobname.\indexname s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, @@ -5512,6 +5508,8 @@ end \putwordIndexNonexistent \typeout{No file \jobname.\indexname s.}% \else + \catcode`\\ = 0 + % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. @@ -5519,51 +5517,47 @@ end \ifeof 1 \putwordIndexIsEmpty \else - \expandafter\printindexzz\thisline\relax\relax\finish% + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\ttbackslash}% + \let\indexlbrace\{ % Likewise, set these sequences for braces + \let\indexrbrace\} % used in the sort key. + \begindoublecolumns + \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty + % + % Read input from the index file line by line. + \loopdo + \ifeof1 \else + \read 1 to \nextline + \fi + % + \indexinputprocessing + \thisline + % + \ifeof1\else + \let\thisline\nextline + \repeat + %% + \enddoublecolumns \fi \fi \closein 1 \endgroup} +\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} +\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} -% If the index file starts with a backslash, forgo reading the index -% file altogether. If somebody upgrades texinfo.tex they may still have -% old index files using \ as the escape character. Reading this would -% at best lead to typesetting garbage, at worst a TeX syntax error. -\def\printindexzz#1#2\finish{% - \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax - \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1 - \expandafter\ifx\csname SETtxiskipindexfileswithbackslash\endcsname\relax -\errmessage{% -ERROR: A sorted index file in an obsolete format was skipped. -To fix this problem, please upgrade your version of 'texi2dvi' -or 'texi2pdf' to that at . -If you are using an old version of 'texindex' (part of the Texinfo -distribution), you may also need to upgrade to a newer version (at least 6.0). -You may be able to typeset the index if you run -'texindex \jobname.\indexname' yourself. -You could also try setting the 'txiindexescapeisbackslash' flag by -running a command like -'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'. If you do -this, Texinfo will try to use index files in the old format. -If you continue to have problems, deleting the index files and starting again -might help (with 'rm \jobname.?? \jobname.??s')% -}% - \else - (Skipped sorted index file in obsolete format) - \fi - \else - \begindoublecolumns - \input \jobname.\indexname s - \enddoublecolumns - \fi +\def\indexinputprocessing{% + \ifeof1 + \let\firsttoken\relax \else - \begindoublecolumns - \catcode`\\=0\relax - \catcode`\@=12\relax - \input \jobname.\indexname s - \enddoublecolumns + \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% + \act \fi } +\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} +\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} + % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. @@ -5572,19 +5566,12 @@ might help (with 'rm \jobname.?? \jobname.??s')% \catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 \catcode`\$=3 \gdef\initialglyphs{% - % special control sequences used in the index sort key - \let\indexlbrace\{% - \let\indexrbrace\}% - \let\indexatchar\@% - \def\indexbackslash{\math{\backslash}}% - % % Some changes for non-alphabetic characters. Using the glyphs from the % math fonts looks more consistent than the typewriter font used elsewhere % for these characters. - \uccode`\~=`\\ \uppercase{\def~{\math{\backslash}}} + \def\indexbackslash{\math{\backslash}}% + \let\\=\indexbackslash % - % In case @\ is used for backslash - \uppercase{\let\\=~} % Can't get bold backslash so don't use bold forward slash \catcode`\/=13 \def/{{\secrmnotbold \normalslash}}% @@ -5614,7 +5601,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % bottom of a column to reduce an increase in inter-line spacing. \nobreak \vskip 0pt plus 5\baselineskip - \penalty -300 + \penalty -300 \vskip 0pt plus -5\baselineskip % % Typeset the initial. Making this add up to a whole number of @@ -5643,6 +5630,12 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \def\entry{% \begingroup + % + % For pdfTeX and XeTeX. + % The redefinition of \domark stops marks being added in \pdflink to + % preserve coloured links across page boundaries. Otherwise the marks + % would get in the way of \lastbox in \insertentrybox. + \let\domark\relax % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. @@ -5676,31 +5669,35 @@ might help (with 'rm \jobname.?? \jobname.??s')% \gdef\finishentry#1{% \egroup % end box A \dimen@ = \wd\boxA % Length of text of entry - \global\setbox\boxA=\hbox\bgroup - \unhbox\boxA - % #1 is the page number. + \global\setbox\boxA=\hbox\bgroup\unhbox\boxA + % #1 is the page number. + % + % Get the width of the page numbers, and only use + % leaders if they are present. + \global\setbox\boxB = \hbox{#1}% + \ifdim\wd\boxB = 0pt + \null\nobreak\hfill\ % + \else % - % Get the width of the page numbers, and only use - % leaders if they are present. - \global\setbox\boxB = \hbox{#1}% - \ifdim\wd\boxB = 0pt - \null\nobreak\hfill\ % + \null\nobreak\indexdotfill % Have leaders before the page number. + % + \ifpdf + \pdfgettoks#1.% + \hskip\skip\thinshrinkable\the\toksA \else - % - \null\nobreak\indexdotfill % Have leaders before the page number. - % - \ifpdforxetex + \ifx\XeTeXrevision\thisisundefined + \hskip\skip\thinshrinkable #1% + \else \pdfgettoks#1.% \hskip\skip\thinshrinkable\the\toksA - \else - \hskip\skip\thinshrinkable #1% \fi \fi + \fi \egroup % end \boxA \ifdim\wd\boxB = 0pt - \noindent\unhbox\boxA\par - \nobreak - \else\bgroup + \global\setbox\entrybox=\vbox{\unhbox\boxA}% + \else + \global\setbox\entrybox=\vbox\bgroup % We want the text of the entries to be aligned to the left, and the % page numbers to be aligned to the right. % @@ -5730,7 +5727,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \advance\dimen@ii by 1\dimen@i \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line \ifdim\dimen@ > 0.8\dimen@ii % due to long index text - % Try to split the text roughly evenly. \dimen@ will be the length of + % Try to split the text roughly evenly. \dimen@ will be the length of % the first line. \dimen@ = 0.7\dimen@ \dimen@ii = \hsize @@ -5766,11 +5763,55 @@ might help (with 'rm \jobname.?? \jobname.??s')% \egroup % The \vbox \fi \endgroup + \dotheinsertentrybox }} \newskip\thinshrinkable \skip\thinshrinkable=.15em minus .15em +\newbox\entrybox +\def\insertentrybox{% + \ourunvbox\entrybox +} + +% default definition +\let\dotheinsertentrybox\insertentrybox + +% Use \lastbox to take apart vbox box by box, and add each sub-box +% to the current vertical list. +\def\ourunvbox#1{% +\bgroup % for local binding of \delayedbox + % Remove the last box from box #1 + \global\setbox#1=\vbox{% + \unvbox#1% + \unskip % remove any glue + \unpenalty + \global\setbox\interbox=\lastbox + }% + \setbox\delayedbox=\box\interbox + \ifdim\ht#1=0pt\else + \ourunvbox#1 % Repeat on what's left of the box + \nobreak + \fi + \box\delayedbox +\egroup +} +\newbox\delayedbox +\newbox\interbox + +% Used from \printindex. \firsttoken should be the first token +% after the \entry. If it's not another \entry, we are at the last +% line of a group of index entries, so insert a penalty to discourage +% widowed index entries. +\def\dotheinsertentryboxwithpenalty{% + \ifx\firsttoken\isentry + \else + \penalty 9000 + \fi + \insertentrybox +} +\def\isentry{\entry}% + % Like plain.tex's \dotfill, except uses up at least 1 em. % The filll stretch here overpowers both the fil and fill stretch to push % the page number to the right. @@ -5780,15 +5821,24 @@ might help (with 'rm \jobname.?? \jobname.??s')% \def\primary #1{\line{#1\hfil}} -\def\secondary{\indententry{0.5cm}} -\def\tertiary{\indententry{1cm}} - -\def\indententry#1#2#3{% - \bgroup - \leftskip=#1 - \entry{#2}{#3}% - \egroup -} +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + \ifx\XeTeXrevision\thisisundefined + #2 + \else + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \fi + \fi + \par +}} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, @@ -5798,21 +5848,60 @@ might help (with 'rm \jobname.?? \jobname.??s')% \newbox\partialpage \newdimen\doublecolumnhsize +% Use inside an output routine to save \topmark and \firstmark +\def\savemarks{% + \global\savedtopmark=\expandafter{\topmark }% + \global\savedfirstmark=\expandafter{\firstmark }% +} +\newtoks\savedtopmark +\newtoks\savedfirstmark + +% Set \topmark and \firstmark for next time \output runs. +% Can't be run from withinside \output (because any material +% added while an output routine is active, including +% penalties, is saved for after it finishes). The page so far +% should be empty, otherwise what's on it will be thrown away. +\def\restoremarks{% + \mark{\the\savedtopmark}% + \bgroup\output = {% + \setbox\dummybox=\box\PAGE + }abc\eject\egroup + % "abc" because output routine doesn't fire for a completely empty page. + \mark{\the\savedfirstmark}% +} + \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % If not much space left on page, start a new page. \ifdim\pagetotal>0.8\vsize\vfill\eject\fi % % Grab any single-column material above us. \output = {% - \savetopmark + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% + \savemarks }% \eject % run that output routine to set \partialpage + \restoremarks + % + % We recover the two marks that the last output routine saved in order + % to propagate the information in marks added around a chapter heading, + % which could be otherwise be lost by the time the final page is output. + % % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% @@ -5838,9 +5927,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % - % Get the available space for the double columns -- the normal - % (undoubled) page height minus any material left over from the - % previous page. + % Double the \vsize as well. \advance\vsize by -\ht\partialpage \vsize = 2\vsize % @@ -5853,15 +5940,17 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \def\doublecolumnout{% % - \savetopmark \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. \dimen@ = \vsize \divide\dimen@ by 2 % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@ \global\advance\vsize by 2\ht\partialpage - \onepageout\pagesofar % empty except for the first time we are called + \onepageout\pagesofar \unvbox\PAGE \penalty\outputpenalty } @@ -5877,7 +5966,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } -% Finished with double columns. +% Finished with with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the @@ -5909,7 +5998,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \output = {% % Split the last of the double-column material. - \savetopmark + \savemarks \balancecolumns }% \eject % call the \output just set @@ -5917,9 +6006,10 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. - \global\output=\expandafter{\the\defaultoutput} + \global\output = {\onepageout{\pagecontents\PAGE}}% % \endgroup % started in \begindoublecolumns + \restoremarks % Leave the double-column material on the current page, no automatic % page break. \box\balancedcolumns @@ -5938,19 +6028,18 @@ might help (with 'rm \jobname.?? \jobname.??s')% \newbox\balancedcolumns \setbox\balancedcolumns=\vbox{shouldnt see this}% % -% Only called for the last of the double column material. \doublecolumnout +% Only called for the last of the double column material. \doublecolumnout % does the others. \def\balancecolumns{% \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 - \ifdim\dimen@<7\baselineskip + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \ifdim\dimen@<5\baselineskip % Don't split a short final column in two. \setbox2=\vbox{}% \global\setbox\balancedcolumns=\vbox{\pagesofar}% \else - % double the leading vertical space - \advance\dimen@ by \topskip - \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to \dimen@ii = \dimen@ \splittopskip = \topskip @@ -5966,7 +6055,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% }% % Now the left column is in box 1, and the right column in box 3. % - % Check whether the left column has come out higher than the page itself. + % Check whether the left column has come out higher than the page itself. % (Note that we have doubled \vsize for the double columns, so % the actual height of the page is 0.5\vsize). \ifdim2\ht1>\vsize @@ -6085,9 +6174,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 @@ -6263,7 +6354,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \let\top\unnumbered % Sections. -% +% \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 @@ -6286,7 +6377,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } % Subsections. -% +% % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% @@ -6311,7 +6402,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } % Subsubsections. -% +% % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% @@ -6432,22 +6523,27 @@ might help (with 'rm \jobname.?? \jobname.??s')% \expandafter\ifx\thisenv\titlepage\else \checkenv{}% chapters, etc., should not start inside an environment. \fi + % FIXME: \chapmacro is currently called from inside \titlepage when + % \setcontentsaftertitlepage to print the "Table of Contents" heading, but + % this should probably be done by \sectionheading with an option to print + % in chapter size. + % % Insert the first mark before the heading break (see notes for \domark). - \let\prevchapterdefs=\currentchapterdefs - \let\prevsectiondefs=\currentsectiondefs - \gdef\currentsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword - \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword - \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% - \xdef\currentchapterdefs{% + \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible @@ -6458,7 +6554,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% }% \else \toks0={#1}% - \xdef\currentchapterdefs{% + \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible @@ -6478,18 +6574,18 @@ might help (with 'rm \jobname.?? \jobname.??s')% % % Now the second mark, after the heading break. No break points % between here and the heading. - \let\prevchapterdefs=\currentchapterdefs - \let\prevsectiondefs=\currentsectiondefs + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rm \let\footnote=\errfootnoteheading % give better error message % - % Have to define \currentsection before calling \donoderef, because the + % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. - \gdef\currentsection{#1}% + \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. @@ -6578,10 +6674,10 @@ might help (with 'rm \jobname.?? \jobname.??s')% \csname #2fonts\endcsname \rm % % Insert first mark before the heading break (see notes for \domark). - \let\prevsectiondefs=\currentsectiondefs + \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword - \gdef\currentsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword @@ -6589,7 +6685,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% - \xdef\currentsectiondefs{% + \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible @@ -6602,7 +6698,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \else \ifx\sectionlevel\seckeyword \toks0={#1}% - \xdef\currentsectiondefs{% + \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible @@ -6628,28 +6724,28 @@ might help (with 'rm \jobname.?? \jobname.??s')% % % Now the second mark, after the heading break. No break points % between here and the heading. - \global\let\prevsectiondefs=\currentsectiondefs + \global\let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% - \gdef\currentsection{#1}% + \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, - % and don't redefine \currentsection. + % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% - \gdef\currentsection{#1}% + \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% - \gdef\currentsection{#1}% + \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. @@ -6739,8 +6835,13 @@ might help (with 'rm \jobname.?? \jobname.??s')% % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. - \ifpdforxetex + \ifpdf \global\pdfmakepagedesttrue + \else + \ifx\XeTeXrevision\thisisundefined + \else + \global\pdfmakepagedesttrue + \fi \fi } @@ -7103,7 +7204,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. - +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} @@ -7118,18 +7223,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \newskip\lskip\newskip\rskip -% only require the font if @cartouche is actually used -\def\cartouchefontdefs{% - \font\circle=lcircle10\relax - \circthick=\fontdimen8\circle -} -\newdimen\circthick -\newdimen\cartouter\newdimen\cartinner -\newskip\normbskip\newskip\normpskip\newskip\normlskip - - \envdef\cartouche{% - \cartouchefontdefs \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip @@ -7308,9 +7402,13 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @raggedright does more-or-less normal line breaking but no right -% justification. From plain.tex. +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. \envdef\raggedright{% \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% } \let\Eraggedright\par @@ -7369,7 +7467,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @indentedblock is like @quotation, but indents only on the left and % has no optional argument. -% +% \makedispenvdef{indentedblock}{\indentedblockstart} % \def\indentedblockstart{% @@ -7472,7 +7570,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would - % never \starttabbox and the \egroup would end verbatim mode. + % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% @@ -7535,12 +7633,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% {% \makevalueexpandable \setupverbatim - {% - \indexnofonts % Allow `@@' and other weird things in file names. - \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% - \edef\tmp{\noexpand\input #1 } - \expandafter - }\tmp + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% + \input #1 \afterenvbreak }% } @@ -7669,7 +7764,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. -% +% \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword @@ -7685,21 +7780,6 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi\fi } -% \dosubind {index}{topic}{subtopic} -% -% If SUBTOPIC is present, precede it with a space, and call \doind. -% (At some time during the 20th century, this made a two-level entry in an -% index such as the operation index. Nobody seemed to notice the change in -% behaviour though.) -\def\dosubind#1#2#3{% - \def\thirdarg{#3}% - \ifx\thirdarg\empty - \doind{#1}{#2}% - \else - \doind{#1}{#2\space#3}% - \fi -} - % Untyped functions: % @deffn category name args @@ -7714,6 +7794,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } @@ -7864,7 +7945,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: - \hfil\vadjust{\nobreak}\break + \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi @@ -7920,7 +8001,6 @@ might help (with 'rm \jobname.?? \jobname.??s')% \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } -\let\ampchar\& \newcount\parencount @@ -8001,18 +8081,36 @@ might help (with 'rm \jobname.?? \jobname.??s')% } \fi +% alias because \c means cedilla in @tex or @math +\let\texinfoc=\c + +\newcount\savedcatcodeone +\newcount\savedcatcodetwo + % Used at the time of macro expansion. % Argument is macro body with arguments substituted \def\scanmacro#1{% \newlinechar`\^^M \def\xeatspaces{\eatspaces}% % - % Process the macro body under the current catcode regime. - \scantokens{#1@comment}% + % Temporarily undo catcode changes of \printindex. Set catcode of @ to + % 0 so that @-commands in macro expansions aren't printed literally when + % formatting an index file, where \ is used as the escape character. + \savedcatcodeone=\catcode`\@ + \savedcatcodetwo=\catcode`\\ + \catcode`\@=0 + \catcode`\\=\active % - % The \comment is to remove the \newlinechar added by \scantokens, and - % can be noticed by \parsearg. Note \c isn't used because this means cedilla - % in math mode. + % Process the macro body under the current catcode regime. + \scantokens{#1@texinfoc}% + % + \catcode`\@=\savedcatcodeone + \catcode`\\=\savedcatcodetwo + % + % The \texinfoc is to remove the \newlinechar added by \scantokens, and + % can be noticed by \parsearg. + % We avoid surrounding the call to \scantokens with \bgroup and \egroup + % to allow macros to open or close groups themselves. } % Used for copying and captions @@ -8113,14 +8211,12 @@ might help (with 'rm \jobname.?? \jobname.??s')% \def\macroargctxt{% \scanctxt \catcode`\ =\active - \catcode`\@=\other \catcode`\^^M=\other \catcode`\\=\active } \def\macrolineargctxt{% used for whole-line arguments without braces \scanctxt - \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other } @@ -8212,7 +8308,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % list to some hook where the argument is to be expanded. If there are % less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be -% defined `a la TeX in the macro body. +% defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % @@ -8243,8 +8339,8 @@ might help (with 'rm \jobname.?? \jobname.??s')% % % Read recursive and nonrecursive macro bodies. (They're different since % rec and nonrec macros end differently.) -% -% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro +% +% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro % body to be transformed. % Set \macrobody to the body of the macro, and call \defmacro. % @@ -8278,7 +8374,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % twice the \macarg.BLAH macros does not cost too much processing power. \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax - \else + \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa @@ -8363,7 +8459,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Replace arguments by their values in the macro body, and place the result % in macro \@tempa. -% +% \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument @@ -8387,9 +8483,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } -% Define the named-macro outside of this group and then close this group. -% -\def\macargexpandinbody@{% +% Define the named-macro outside of this group and then close this group. +% +\def\macargexpandinbody@{% \expandafter \endgroup \macargdeflist@ @@ -8427,7 +8523,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } % Trailing missing arguments are set to empty. -% +% \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ @@ -8504,7 +8600,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \else % at most 9 \ifnum\paramno<10\relax % @MACNAME sets the context for reading the macro argument - % @MACNAME@@ gets the argument, processes backslashes and appends a + % @MACNAME@@ gets the argument, processes backslashes and appends a % comma. % @MACNAME@@@ removes braces surrounding the argument list. % @MACNAME@@@@ scans the macro body with arguments substituted. @@ -8548,11 +8644,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Call #1 with a list of tokens #2, with any doubled backslashes in #2 % compressed to one. % -% This implementation works by expansion, and not execution (so we cannot use -% \def or similar). This reduces the risk of this failing in contexts where -% complete expansion is done with no execution (for example, in writing out to +% This implementation works by expansion, and not execution (so we cannot use +% \def or similar). This reduces the risk of this failing in contexts where +% complete expansion is done with no execution (for example, in writing out to % an auxiliary file for an index entry). -% +% % State is kept in the input stream: the argument passed to % @look_ahead, @gobble_and_check_finish and @add_segment is % @@ -8574,11 +8670,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% % #3 - NEXT_TOKEN % #4 used to look ahead % -% If the next token is not a backslash, process the rest of the argument; +% If the next token is not a backslash, process the rest of the argument; % otherwise, remove the next token. @gdef@look_ahead#1!#2#3#4{% @ifx#4\% - @expandafter@gobble_and_check_finish + @expandafter@gobble_and_check_finish @else @expandafter@add_segment @fi#1!{#2}#4#4% @@ -8602,9 +8698,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% % #3 - NEXT_TOKEN % #4 is input stream until next backslash % -% Input stream is either at the start of the argument, or just after a -% backslash sequence, either a lone backslash, or a doubled backslash. -% NEXT_TOKEN contains the first token in the input stream: if it is \finish, +% Input stream is either at the start of the argument, or just after a +% backslash sequence, either a lone backslash, or a doubled backslash. +% NEXT_TOKEN contains the first token in the input stream: if it is \finish, % finish; otherwise, append to ARG_RESULT the segment of the argument up until % the next backslash. PENDING_BACKSLASH contains a backslash to represent % a backslash just before the start of the input stream that has not been @@ -8616,13 +8712,13 @@ might help (with 'rm \jobname.?? \jobname.??s')% % append the pending backslash to the result, followed by the next segment @expandafter@is_fi@look_ahead#1#2#4!{\}@fi % this @fi is discarded by @look_ahead. - % we can't get rid of it with \expandafter because we don't know how + % we can't get rid of it with \expandafter because we don't know how % long #4 is. } % #1 - THE_MACRO % #2 - ARG_RESULT -% #3 discards the res of the conditional in @add_segment, and @is_fi ends the +% #3 discards the res of the conditional in @add_segment, and @is_fi ends the % conditional. @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} @@ -8634,7 +8730,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % for reading the argument (slightly different in the two cases). Then, % to read the argument, in the whole-line case, it then calls the regular % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. -% +% \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup @@ -8684,29 +8780,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} -\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}\omittopnode} - -% Used so that the @top node doesn't have to be wrapped in an @ifnottex -% conditional. -% \doignore goes to more effort to skip nested conditionals but we don't need -% that here. -\def\omittopnode{% - \ifx\lastnode\wordTop - \expandafter\ignorenode\fi -} -\def\wordTop{Top} - -% Until the next @node or @bye command, divert output to a box that is not -% output. -\def\ignorenode{\setbox\dummybox\vbox\bgroup\def\node{\egroup\node}% -\ignorenodebye -} - -{\let\bye\relax -\gdef\ignorenodebye{\let\bye\ignorenodebyedef} -\gdef\ignorenodebyedef{\egroup(`Top' node ignored)\bye}} -% The redefinition of \bye here is because it is declared \outer +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} +\let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the @@ -8729,7 +8805,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: -% 1) NAME-title - the current sectioning name taken from \currentsection, +% 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. @@ -8751,7 +8827,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% - \toks0 = \expandafter{\currentsection}% + \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout @@ -8763,7 +8839,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. -% +% \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword @@ -8779,7 +8855,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi\fi } -% +% % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed @@ -8932,34 +9008,40 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi \else % node/anchor (non-float) references. - % + % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. - % + % \ifdim \wd\printedmanualbox > 0pt % Cross-manual reference with a printed manual name. - % + % \crossmanualxref{\cite{\printedmanual\unskip}}% % \else\ifdim \wd\infofilenamebox > 0pt % Cross-manual reference with only an info filename (arg 4), no % printed manual name (arg 5). This is essentially the same as % the case above; we output the filename, since we have nothing else. - % + % \crossmanualxref{\code{\infofilename\unskip}}% % \else % Reference within this manual. % - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% - \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi - % + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % @@ -8983,20 +9065,20 @@ might help (with 'rm \jobname.?? \jobname.??s')% \endgroup} % Output a cross-manual xref to #1. Used just above (twice). -% +% % Only include the text "Section ``foo'' in" if the foo is neither % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply % "see The Foo Manual", the idea being to refer to the whole manual. -% +% % But, this being TeX, we can't easily compare our node name against the % string "Top" while ignoring the possible spaces before and after in % the input. By adding the arbitrary 7sp below, we make it much less % likely that a real node name would have the same width as "Top" (e.g., % in a monospaced font). Hopefully it will never happen in practice. -% +% % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. -% +% \def\crossmanualxref#1{% \setbox\toprefbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% @@ -9043,13 +9125,13 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi\fi\fi } -% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX +% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX % is output afterwards if non-empty. \def\refx#1#2{% \requireauxfile {% \indexnofonts - \turnoffactive + \otherbackslash \def\value##1{##1}% \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname @@ -9075,9 +9157,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% #2% Output the suffix in any case. } -% This is the macro invoked by entries in the aux file. Define a control -% sequence for a cross-reference target (we prepend XR to the control sequence -% name to avoid collisions). The value is the page number. If this is a float +% This is the macro invoked by entries in the aux file. Define a control +% sequence for a cross-reference target (we prepend XR to the control sequence +% name to avoid collisions). The value is the page number. If this is a float % type, we have more work to do. % \def\xrdef#1#2{% @@ -9093,10 +9175,10 @@ might help (with 'rm \jobname.?? \jobname.??s')% \bgroup \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% \egroup - % We put the \gdef inside a group to avoid the definitions building up on - % TeX's save stack, which can cause it to run out of space for aux files with + % We put the \gdef inside a group to avoid the definitions building up on + % TeX's save stack, which can cause it to run out of space for aux files with % thousands of lines. \gdef doesn't use the save stack, but \csname does - % when it defines an unknown control sequence as \relax. + % when it defines an unknown control sequence as \relax. % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname @@ -9175,6 +9257,19 @@ might help (with 'rm \jobname.?? \jobname.??s')% \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... @@ -9192,7 +9287,14 @@ might help (with 'rm \jobname.?? \jobname.??s')% \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % - \catcode`\\=\active + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 @@ -9455,7 +9557,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \ifimagevmode \medskip % space after a standalone image - \fi + \fi \ifx\centersub\centerV \egroup \fi \endgroup} @@ -9523,13 +9625,13 @@ might help (with 'rm \jobname.?? \jobname.??s')% \global\advance\floatno by 1 % {% - % This magic value for \currentsection is output by \setref as the + % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % - \edef\currentsection{\floatmagic=\safefloattype}% + \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi @@ -9652,7 +9754,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic -% \currentsection value which we \setref above. +% \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % @@ -10286,7 +10388,7 @@ directory should work if nowhere else does.} \uppercase{.} \endgroup \else - \errhelp = \EMsimple + \errhelp = \EMsimple \errmessage{Unicode character U+#1 not supported, sorry}% \fi \else @@ -10319,7 +10421,7 @@ directory should work if nowhere else does.} \countUTFz = "#1\relax \begingroup \parseXMLCharref - + % Give \u8:... its definition. The sequence of seven \expandafter's % expands after the \gdef three times, e.g. % @@ -10331,7 +10433,7 @@ directory should work if nowhere else does.} \expandafter\expandafter \expandafter\expandafter \expandafter\gdef \UTFviiiTmp{#2}% - % + % \expandafter\ifx\csname uni:#1\endcsname \relax \else \message{Internal error, already defined: #1}% \fi @@ -10370,7 +10472,7 @@ directory should work if nowhere else does.} \divide\countUTFz by 64 \countUTFy = \countUTFz % Save to be the future value of \countUTFz. \multiply\countUTFz by 64 - + % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract % in order to get the last five bits. \advance\countUTFx by -\countUTFz @@ -10405,7 +10507,7 @@ directory should work if nowhere else does.} % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B -% +% % Many of our renditions are less than wonderful, and all the missing % characters are available somewhere. Loading the necessary fonts % awaits user request. We can't truly support Unicode without @@ -11140,14 +11242,21 @@ directory should work if nowhere else does.} \relax } -% Define all Unicode characters we know about. This makes UTF-8 the default -% input encoding and allows @U to work. +% define all Unicode characters we know about, for the sake of @U. \iftxinativeunicodecapable \nativeunicodechardefsatu \else \utfeightchardefs \fi + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt @@ -11443,9 +11552,9 @@ directory should work if nowhere else does.} \def\texinfochars{% \let< = \activeless \let> = \activegtr - \let~ = \activetilde + \let~ = \activetilde \let^ = \activehat - \markupsetuplqdefault \markupsetuprqdefault + \markupsetuplqdefault \markupsetuprqdefault \let\b = \strong \let\i = \smartitalic % in principle, all other definitions in \tex have to be undone too. @@ -11463,9 +11572,11 @@ directory should work if nowhere else does.} % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work -% \realbackslash is an actual character `\' with catcode other. -{\catcode`\\=\other @gdef@realbackslash{\}} +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In Texinfo, backslash is an active character; it prints the backslash % in fixed width font. @@ -11483,8 +11594,10 @@ directory should work if nowhere else does.} @def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. +% \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. +% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of @@ -11556,7 +11669,7 @@ directory should work if nowhere else does.} @ifx\@eatinput @let\ = @ttbackslash @fi @catcode13=5 % regular end of line @enableemergencynewline - @let@c=@comment + @let@c=@texinfoc @let@parsearg@originalparsearg % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. @@ -11602,7 +11715,7 @@ directory should work if nowhere else does.} @markupsetuprqdefault @c Local variables: -@c eval: (add-hook 'before-save-hook 'time-stamp) +@c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" diff --git a/doc/tinc.info b/doc/tinc.info index 7ee4d91..97caea4 100644 --- a/doc/tinc.info +++ b/doc/tinc.info @@ -1,14 +1,14 @@ -This is tinc.info, produced by makeinfo version 6.7 from tinc.texi. +This is tinc.info, produced by makeinfo version 6.5 from tinc.texi. INFO-DIR-SECTION Networking tools START-INFO-DIR-ENTRY * tinc: (tinc). The tinc Manual. END-INFO-DIR-ENTRY -This is the info manual for tinc version 1.0.36, a Virtual Private +This is the info manual for tinc version 1.0.35, a Virtual Private Network daemon. - Copyright (C) 1998-2019 Ivo Timmermans, Guus Sliepen + Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and Wessel Dankers . Permission is granted to make and distribute verbatim copies of this @@ -117,10 +117,10 @@ for both the receiving and sending end, it has become largely runtime-configurable--in short, it has become a full-fledged professional package. - Tinc also allows more than two sites to connect to each other and -form a single VPN. Traditionally VPNs are created by making tunnels, -which only have two endpoints. Larger VPNs with more sites are created -by adding more tunnels. Tinc takes another approach: only endpoints are + Tinc also allows more than two sites to connect to eachother and form +a single VPN. Traditionally VPNs are created by making tunnels, which +only have two endpoints. Larger VPNs with more sites are created by +adding more tunnels. Tinc takes another approach: only endpoints are specified, the software itself will take care of creating the tunnels. This allows for easier configuration and improved scalability. @@ -791,13 +791,13 @@ DeviceType = (platform dependent) uml (not compiled in by default) Create a UNIX socket with the filename specified by DEVICE, or - '/run/NETNAME.umlsocket' if not specified. Tinc will wait for - a User Mode Linux instance to connect to this socket. + '/var/run/NETNAME.umlsocket' if not specified. Tinc will wait + for a User Mode Linux instance to connect to this socket. vde (not compiled in by default) Uses the libvdeplug library to connect to a Virtual Distributed Ethernet switch, using the UNIX socket specified - by DEVICE, or '/run/vde.ctl' if not specified. + by DEVICE, or '/var/run/vde.ctl' if not specified. Also, in case tinc does not seem to correctly interpret packets received from the virtual network device, it can be used to change @@ -1597,7 +1597,7 @@ command line options. '/var/log/tinc.NETNAME.log'. '--pidfile=FILE' - Write PID to FILE instead of '/run/tinc.NETNAME.pid'. + Write PID to FILE instead of '/var/run/tinc.NETNAME.pid'. '--bypass-security' Disables encryption and authentication. Only useful for debugging. @@ -2278,7 +2278,7 @@ address these issues in tinc 2.0. Cryptography is a hard thing to get right. We cannot make any guarantees. Time, review and feedback are the only things that can prove the security of any cryptographic product. If you wish to review -tinc or give us feedback, you are strongly encouraged to do so. +tinc or give us feedback, you are stronly encouraged to do so.  File: tinc.info, Node: Platform specific information, Next: About us, Prev: Technical information, Up: Top @@ -2720,71 +2720,66 @@ Node: Top806 Node: Introduction1105 Node: Virtual Private Networks1915 Node: tinc3639 -Node: Supported platforms5167 -Node: Preparations5868 -Node: Configuring the kernel6124 -Node: Configuration of Linux kernels6534 -Node: Configuration of FreeBSD kernels7389 -Node: Configuration of OpenBSD kernels7854 -Node: Configuration of NetBSD kernels8211 -Node: Configuration of Solaris kernels8616 -Node: Configuration of Darwin (Mac OS X) kernels9279 -Node: Configuration of Windows10098 -Node: Libraries10638 -Node: LibreSSL/OpenSSL11047 -Node: zlib13589 -Node: lzo14618 -Node: Installation15601 -Node: Building and installing tinc16511 -Node: Darwin (Mac OS X) build environment17171 -Node: Cygwin (Windows) build environment17736 -Node: MinGW (Windows) build environment18325 -Node: System files18919 -Node: Device files19184 -Node: Other files19600 -Node: Configuration20213 -Node: Configuration introduction20524 -Node: Multiple networks21792 -Node: How connections work23218 -Node: Configuration files24440 -Node: Main configuration variables25934 -Node: Host configuration variables42182 -Node: Scripts47714 -Node: How to configure50980 -Node: Generating keypairs52238 -Node: Network interfaces52737 -Node: Example configuration54585 -Node: Running tinc59910 -Node: Runtime options60500 -Node: Signals64125 -Node: Debug levels65316 -Node: Solving problems66252 -Node: Error messages67804 -Node: Sending bug reports71813 -Node: Technical information72760 -Node: The connection72991 -Node: The UDP tunnel73303 -Node: The meta-connection76355 -Node: The meta-protocol77824 -Node: Security82841 -Node: Authentication protocol83983 -Node: Encryption of network packets89028 -Node: Security issues90404 -Node: Platform specific information92044 -Node: Interface configuration92304 -Node: Routes94600 -Node: Automatically starting tinc96650 -Node: Linux96873 -Node: Windows98094 -Node: Other platforms98599 -Node: About us98881 -Node: Contact information99056 -Node: Authors99459 -Node: Concept Index99864 +Node: Supported platforms5166 +Node: Preparations5867 +Node: Configuring the kernel6123 +Node: Configuration of Linux kernels6533 +Node: Configuration of FreeBSD kernels7388 +Node: Configuration of OpenBSD kernels7853 +Node: Configuration of NetBSD kernels8210 +Node: Configuration of Solaris kernels8615 +Node: Configuration of Darwin (Mac OS X) kernels9278 +Node: Configuration of Windows10097 +Node: Libraries10637 +Node: LibreSSL/OpenSSL11046 +Node: zlib13588 +Node: lzo14617 +Node: Installation15600 +Node: Building and installing tinc16510 +Node: Darwin (Mac OS X) build environment17170 +Node: Cygwin (Windows) build environment17735 +Node: MinGW (Windows) build environment18324 +Node: System files18918 +Node: Device files19183 +Node: Other files19599 +Node: Configuration20212 +Node: Configuration introduction20523 +Node: Multiple networks21791 +Node: How connections work23217 +Node: Configuration files24439 +Node: Main configuration variables25933 +Node: Host configuration variables42189 +Node: Scripts47721 +Node: How to configure50987 +Node: Generating keypairs52245 +Node: Network interfaces52744 +Node: Example configuration54592 +Node: Running tinc59917 +Node: Runtime options60507 +Node: Signals64136 +Node: Debug levels65327 +Node: Solving problems66263 +Node: Error messages67815 +Node: Sending bug reports71824 +Node: Technical information72771 +Node: The connection73002 +Node: The UDP tunnel73314 +Node: The meta-connection76366 +Node: The meta-protocol77835 +Node: Security82852 +Node: Authentication protocol83994 +Node: Encryption of network packets89039 +Node: Security issues90415 +Node: Platform specific information92054 +Node: Interface configuration92314 +Node: Routes94610 +Node: Automatically starting tinc96660 +Node: Linux96883 +Node: Windows98104 +Node: Other platforms98609 +Node: About us98891 +Node: Contact information99066 +Node: Authors99469 +Node: Concept Index99874  End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/doc/tinc.texi b/doc/tinc.texi index 0420e6f..b1f5d9d 100644 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@ -15,7 +15,7 @@ This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon. -Copyright @copyright{} 1998-2019 Ivo Timmermans, +Copyright @copyright{} 1998-2018 Ivo Timmermans, Guus Sliepen and Wessel Dankers . @@ -39,7 +39,7 @@ permission notice identical to this one. @vskip 0pt plus 1filll This is the info manual for @value{PACKAGE} version @value{VERSION}, a Virtual Private Network daemon. -Copyright @copyright{} 1998-2019 Ivo Timmermans, +Copyright @copyright{} 1998-2018 Ivo Timmermans, Guus Sliepen and Wessel Dankers . @@ -155,7 +155,7 @@ professional package. @cindex traditional VPNs @cindex scalability -Tinc also allows more than two sites to connect to each other and form a single VPN. +Tinc also allows more than two sites to connect to eachother and form a single VPN. Traditionally VPNs are created by making tunnels, which only have two endpoints. Larger VPNs with more sites are created by adding more tunnels. Tinc takes another approach: only endpoints are specified, @@ -2433,7 +2433,7 @@ We will address these issues in tinc 2.0. Cryptography is a hard thing to get right. We cannot make any guarantees. Time, review and feedback are the only things that can prove the security of any cryptographic product. If you wish to review -tinc or give us feedback, you are strongly encouraged to do so. +tinc or give us feedback, you are stronly encouraged to do so. @c ================================================================== diff --git a/doc/tincinclude.texi b/doc/tincinclude.texi index ab2a41a..93d7ad2 100644 --- a/doc/tincinclude.texi +++ b/doc/tincinclude.texi @@ -1,5 +1,5 @@ -@set VERSION 1.0.36 +@set VERSION 1.0.35 @set PACKAGE tinc @set sysconfdir /etc @set localstatedir /var -@set runstatedir /run +@set runstatedir /var/run diff --git a/install-sh b/install-sh index 20d8b2e..8175c64 100755 --- a/install-sh +++ b/install-sh @@ -451,18 +451,7 @@ do trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && - { test -z "$stripcmd" || { - # Create $dsttmp read-write so that cp doesn't create it read-only, - # which would cause strip to fail. - if test -z "$doit"; then - : >"$dsttmp" # No need to fork-exec 'touch'. - else - $doit touch "$dsttmp" - fi - } - } && - $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # diff --git a/missing b/missing index 8d0eaad..625aeb1 100755 --- a/missing +++ b/missing @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff --git a/src/Makefile.in b/src/Makefile.in index 5d52921..93039a2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/src/conf.c b/src/conf.c index 3f81877..58d7b6d 100644 --- a/src/conf.c +++ b/src/conf.c @@ -467,14 +467,9 @@ static void disable_old_keys(const char *filename) { return; } - int len = snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename); + snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename); - if(len < 0 || len >= PATH_MAX) { - fprintf(stderr, "Pathname too long: %s.tmp\n", filename); - w = NULL; - } else { - w = fopen(tmpfile, "w"); - } + w = fopen(tmpfile, "w"); while(fgets(buf, sizeof(buf), r)) { if(!strncmp(buf, "-----BEGIN RSA", 14)) { diff --git a/src/connection.c b/src/connection.c index d137af1..38b3ccf 100644 --- a/src/connection.c +++ b/src/connection.c @@ -96,13 +96,13 @@ void free_connection_partially(connection_t *c) { c->outbudget = 0; if(c->inctx) { - EVP_CIPHER_CTX_reset(c->inctx); + EVP_CIPHER_CTX_cleanup(c->inctx); free(c->inctx); c->inctx = NULL; } if(c->outctx) { - EVP_CIPHER_CTX_reset(c->outctx); + EVP_CIPHER_CTX_cleanup(c->outctx); free(c->outctx); c->outctx = NULL; } diff --git a/src/connection.h b/src/connection.h index d619e85..629e16b 100644 --- a/src/connection.h +++ b/src/connection.h @@ -24,10 +24,6 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L -#define EVP_CIPHER_CTX_reset(c) EVP_CIPHER_CTX_cleanup(c) -#endif - #include "avl_tree.h" #define OPTION_INDIRECT 0x0001 diff --git a/src/graph.c b/src/graph.c index c63fdf9..3529d01 100644 --- a/src/graph.c +++ b/src/graph.c @@ -360,13 +360,13 @@ void dump_graph(void) { /* dump all nodes first */ for(node = node_tree->head; node; node = node->next) { n = node->data; - fprintf(file, " \"%s\" [label = \"%s\"];\n", n->name, n->name); + fprintf(file, " %s [label = \"%s\"];\n", n->name, n->name); } /* now dump all edges */ for(node = edge_weight_tree->head; node; node = node->next) { e = node->data; - fprintf(file, " \"%s\" -> \"%s\";\n", e->from->name, e->to->name); + fprintf(file, " %s -> %s;\n", e->from->name, e->to->name); } fprintf(file, "}\n"); diff --git a/src/net_setup.c b/src/net_setup.c index f26007b..cac7455 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "avl_tree.h" #include "conf.h" diff --git a/src/route.c b/src/route.c index f8b11bb..850a146 100644 --- a/src/route.c +++ b/src/route.c @@ -581,7 +581,7 @@ static void fragment_ipv4_packet(node_t *dest, vpn_packet_t *packet, length_t et ifdebug(TRAFFIC) logger(LOG_INFO, "Fragmenting packet of %d bytes to %s (%s)", packet->len, dest->name, dest->hostname); offset = packet->data + ether_size + ip_size; - maxlen = (MAX(dest->mtu, 590) - ether_size - ip_size) & ~0x7; + maxlen = (dest->mtu - ether_size - ip_size) & ~0x7; ip_off = ntohs(ip.ip_off); origf = ip_off & ~IP_OFFMASK; ip_off &= IP_OFFMASK; diff --git a/src/subnet.c b/src/subnet.c index 154fd80..dc30b01 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -1,6 +1,6 @@ /* subnet.c -- handle subnet lookups and lists - Copyright (C) 2000-2019 Guus Sliepen , + Copyright (C) 2000-2014 Guus Sliepen , 2000-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify @@ -205,85 +205,21 @@ void subnet_del(node_t *n, subnet_t *subnet) { /* Ascii representation of subnets */ bool str2net(subnet_t *subnet, const char *subnetstr) { - char str[1024]; - strncpy(str, subnetstr, sizeof(str)); - str[sizeof(str) - 1] = 0; - int consumed; - - int weight = 10; - char *weight_separator = strchr(str, '#'); - - if(weight_separator) { - char *weight_str = weight_separator + 1; - - if(sscanf(weight_str, "%d%n", &weight, &consumed) < 1) { - return false; - } - - if(weight_str[consumed]) { - return false; - } - - *weight_separator = 0; - } - - int prefixlength = -1; - char *prefixlength_separator = strchr(str, '/'); - - if(prefixlength_separator) { - char *prefixlength_str = prefixlength_separator + 1; - - if(sscanf(prefixlength_str, "%d%n", &prefixlength, &consumed) < 1) { - return false; - } - - if(prefixlength_str[consumed]) { - return false; - } - - *prefixlength_separator = 0; - - if(prefixlength < 0) { - return false; - } - } - + int i, l; uint16_t x[8]; + int weight = 10; - if(sscanf(str, "%hx:%hx:%hx:%hx:%hx:%hx%n", &x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &consumed) >= 6 && !str[consumed]) { - /* - Normally we should check that each part has two digits to prevent ambiguities. - However, in old tinc versions net2str() will aggressively return MAC addresses with one-digit parts, - so we have to accept them otherwise we would be unable to parse ADD_SUBNET messages. - */ - if(prefixlength >= 0) { - return false; - } - - subnet->type = SUBNET_MAC; - subnet->weight = weight; - - for(int i = 0; i < 6; i++) { - subnet->net.mac.address.x[i] = x[i]; - } - - return true; - } - - if(sscanf(str, "%hu.%hu.%hu.%hu%n", &x[0], &x[1], &x[2], &x[3], &consumed) >= 4 && !str[consumed]) { - if(prefixlength == -1) { - prefixlength = 32; - } - - if(prefixlength > 32) { + if(sscanf(subnetstr, "%hu.%hu.%hu.%hu/%d#%d", + &x[0], &x[1], &x[2], &x[3], &l, &weight) >= 5) { + if(l < 0 || l > 32) { return false; } subnet->type = SUBNET_IPV4; - subnet->net.ipv4.prefixlength = prefixlength; + subnet->net.ipv4.prefixlength = l; subnet->weight = weight; - for(int i = 0; i < 4; i++) { + for(i = 0; i < 4; i++) { if(x[i] > 255) { return false; } @@ -294,73 +230,152 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { return true; } - /* IPv6 */ - - char *last_colon = strrchr(str, ':'); - - if(last_colon && sscanf(last_colon, ":%hu.%hu.%hu.%hu%n", &x[0], &x[1], &x[2], &x[3], &consumed) >= 4 && !last_colon[consumed]) { - /* Dotted quad suffix notation, convert to standard IPv6 notation */ - for(int i = 0; i < 4; i++) - if(x[i] > 255) { - return false; - } - - snprintf(last_colon, sizeof(str) - (last_colon - str), ":%02x%02x:%02x%02x", x[0], x[1], x[2], x[3]); - } - - char *double_colon = strstr(str, "::"); - - if(double_colon) { - /* Figure out how many zero groups we need to expand */ - int zero_group_count = 8; - - for(const char *cur = str; *cur; cur++) - if(*cur != ':') { - zero_group_count--; - - while(cur[1] && cur[1] != ':') { - cur++; - } - } - - if(zero_group_count < 1) { - return false; - } - - /* Split the double colon in the middle to make room for zero groups */ - double_colon++; - memmove(double_colon + (zero_group_count * 2 - 1), double_colon, strlen(double_colon) + 1); - - /* Write zero groups in the resulting gap, overwriting the second colon */ - for(int i = 0; i < zero_group_count; i++) { - memcpy(&double_colon[i * 2], "0:", 2); - } - - /* Remove any leading or trailing colons */ - if(str[0] == ':') { - memmove(&str[0], &str[1], strlen(&str[1]) + 1); - } - - if(str[strlen(str) - 1] == ':') { - str[strlen(str) - 1] = 0; - } - } - - if(sscanf(str, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx%n", - &x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &x[6], &x[7], &consumed) >= 8 && !str[consumed]) { - if(prefixlength == -1) { - prefixlength = 128; - } - - if(prefixlength > 128) { + if(sscanf(subnetstr, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%d#%d", + &x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &x[6], &x[7], + &l, &weight) >= 9) { + if(l < 0 || l > 128) { return false; } subnet->type = SUBNET_IPV6; - subnet->net.ipv6.prefixlength = prefixlength; + subnet->net.ipv6.prefixlength = l; subnet->weight = weight; - for(int i = 0; i < 8; i++) { + for(i = 0; i < 8; i++) { + subnet->net.ipv6.address.x[i] = htons(x[i]); + } + + return true; + } + + if(sscanf(subnetstr, "%hu.%hu.%hu.%hu#%d", &x[0], &x[1], &x[2], &x[3], &weight) >= 4) { + subnet->type = SUBNET_IPV4; + subnet->net.ipv4.prefixlength = 32; + subnet->weight = weight; + + for(i = 0; i < 4; i++) { + if(x[i] > 255) { + return false; + } + + subnet->net.ipv4.address.x[i] = x[i]; + } + + return true; + } + + if(sscanf(subnetstr, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx#%d", + &x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &x[6], &x[7], &weight) >= 8) { + subnet->type = SUBNET_IPV6; + subnet->net.ipv6.prefixlength = 128; + subnet->weight = weight; + + for(i = 0; i < 8; i++) { + subnet->net.ipv6.address.x[i] = htons(x[i]); + } + + return true; + } + + if(sscanf(subnetstr, "%hx:%hx:%hx:%hx:%hx:%hx#%d", + &x[0], &x[1], &x[2], &x[3], &x[4], &x[5], &weight) >= 6) { + subnet->type = SUBNET_MAC; + subnet->weight = weight; + + for(i = 0; i < 6; i++) { + subnet->net.mac.address.x[i] = x[i]; + } + + return true; + } + + // IPv6 short form + if(strstr(subnetstr, "::")) { + const char *p; + char *q; + int colons = 0; + + // Count number of colons + for(p = subnetstr; *p; p++) + if(*p == ':') { + colons++; + } + + if(colons > 7) { + return false; + } + + // Scan numbers before the double colon + p = subnetstr; + + for(i = 0; i < colons; i++) { + if(*p == ':') { + break; + } + + x[i] = strtoul(p, &q, 0x10); + + if(!q || p == q || *q != ':') { + return false; + } + + p = ++q; + } + + p++; + colons -= i; + + if(!i) { + p++; + colons--; + } + + if(!*p || *p == '/' || *p == '#') { + colons--; + } + + // Fill in the blanks + for(; i < 8 - colons; i++) { + x[i] = 0; + } + + // Scan the remaining numbers + for(; i < 8; i++) { + x[i] = strtoul(p, &q, 0x10); + + if(!q || p == q) { + return false; + } + + if(i == 7) { + p = q; + break; + } + + if(*q != ':') { + return false; + } + + p = ++q; + } + + l = 128; + + if(*p == '/') { + sscanf(p, "/%d#%d", &l, &weight); + } else if(*p == '#') { + sscanf(p, "#%d", &weight); + } + + if(l < 0 || l > 128) { + return false; + } + + subnet->type = SUBNET_IPV6; + subnet->net.ipv6.prefixlength = l; + subnet->weight = weight; + + for(i = 0; i < 8; i++) { subnet->net.ipv6.address.x[i] = htons(x[i]); } diff --git a/src/tincd.c b/src/tincd.c index 066ad9c..b4704c4 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -1,7 +1,7 @@ /* tincd.c -- the main file for tincd Copyright (C) 1998-2005 Ivo Timmermans - 2000-2019 Guus Sliepen + 2000-2018 Guus Sliepen 2008 Max Rijevski 2009 Michael Tokarev 2010 Julien Muchembled @@ -37,10 +37,7 @@ #include #include #include -#ifndef OPENSSL_NO_ENGINE #include -#endif -#include #ifdef HAVE_LZO #include LZO1X_H @@ -654,7 +651,7 @@ int main(int argc, char **argv) { if(show_version) { printf("%s version %s\n", PACKAGE, VERSION); - printf("Copyright (C) 1998-2019 Ivo Timmermans, Guus Sliepen and others.\n" + printf("Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to redistribute it under certain conditions;\n" @@ -688,14 +685,17 @@ int main(int argc, char **argv) { init_configuration(&config_tree); -#ifndef OPENSSL_NO_ENGINE + /* Slllluuuuuuurrrrp! */ + + if(RAND_load_file("/dev/urandom", 1024) != 1024) { + logger(LOG_ERR, "Error initializing RNG!"); + return 1; + } + ENGINE_load_builtin_engines(); ENGINE_register_all_complete(); -#endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L OpenSSL_add_all_algorithms(); -#endif if(generate_keys) { read_server_config(); @@ -814,13 +814,9 @@ end: free(priority); -#if OPENSSL_VERSION_NUMBER < 0x10100000L EVP_cleanup(); ERR_free_strings(); -#ifndef OPENSSL_NO_ENGINE ENGINE_cleanup(); -#endif -#endif exit_configuration(&config_tree); list_delete_list(cmdline_conf); diff --git a/systemd/Makefile.in b/systemd/Makefile.in index e27e947..376a668 100644 --- a/systemd/Makefile.in +++ b/systemd/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,