summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Metzler <ametzler@debian.org>2012-06-03 14:37:04 +0000
committerAndreas Metzler <ametzler@debian.org>2012-06-03 14:37:04 +0000
commit66ab29888de84b0c7176c037998017034960546a (patch)
tree6da62603c38bd4844f65227a976043a63fd234b2
parentee49bd31b6de73341ba9107e4c72902975588b40 (diff)
parente4cfe25ef6130067efa5ba80f5d764315c3673b9 (diff)
downloadexim4-66ab29888de84b0c7176c037998017034960546a.tar.gz
Reintegrate branches/branch-4.80 into trunk
svn path=/exim/trunk/; revision=2726
-rw-r--r--debian/EDITME.exim4-heavy.diff44
-rw-r--r--debian/EDITME.exim4-light.diff63
-rw-r--r--debian/EDITME.eximon.diff6
-rw-r--r--debian/EDITME.openssl.exim4-light.diff16
-rw-r--r--debian/README.Debian.xml24
-rw-r--r--debian/changelog63
-rw-r--r--debian/control2
-rw-r--r--debian/example.conf.md52
-rw-r--r--debian/exim4-base.NEWS10
-rw-r--r--debian/exim4-base.docs2
-rw-r--r--debian/exim4-base.install3
-rw-r--r--debian/exim4-base.lintian-overrides1
-rw-r--r--debian/exim4-base.postrm2
-rw-r--r--debian/exim4-daemon-heavy.NEWS16
-rw-r--r--debian/exim4-daemon-light.NEWS16
-rwxr-xr-xdebian/exim4_refresh_gnutls-params58
-rw-r--r--debian/gnutls-params8
-rw-r--r--debian/manpages/update-exim4.conf.82
-rwxr-xr-xdebian/patches/33_eximon.binary.dpatch12
-rw-r--r--debian/patches/50_localscan_dlopen.dpatch58
-rwxr-xr-xdebian/patches/66_enlarge-dh-parameters-size.dpatch29
-rwxr-xr-xdebian/rules3
-rw-r--r--debian/source/lintian-overrides3
-rwxr-xr-xdebian/timeout.pl234
24 files changed, 233 insertions, 444 deletions
diff --git a/debian/EDITME.exim4-heavy.diff b/debian/EDITME.exim4-heavy.diff
index 0a3f831..b269d02 100644
--- a/debian/EDITME.exim4-heavy.diff
+++ b/debian/EDITME.exim4-heavy.diff
@@ -1,6 +1,6 @@
---- EDITME.exim4-light 2010-12-25 11:43:35.000000000 +0100
-+++ EDITME.exim4-heavy 2010-12-25 11:43:35.000000000 +0100
-@@ -214,7 +214,7 @@
+--- EDITME.exim4-light 2012-05-18 20:11:24.000000000 +0200
++++ EDITME.exim4-heavy 2012-05-18 20:13:56.000000000 +0200
+@@ -212,7 +212,7 @@ ROUTER_REDIRECT=yes
# This one is very special-purpose, so is not included by default.
@@ -9,7 +9,7 @@
#------------------------------------------------------------------------------
-@@ -246,7 +246,7 @@
+@@ -244,7 +244,7 @@ TRANSPORT_LMTP=yes
SUPPORT_MAILDIR=yes
SUPPORT_MAILSTORE=yes
@@ -18,7 +18,7 @@
#------------------------------------------------------------------------------
-@@ -265,14 +265,14 @@
+@@ -300,14 +300,14 @@ LOOKUP_DNSDB=yes
LOOKUP_CDB=yes
LOOKUP_DSEARCH=yes
# LOOKUP_IBASE=yes
@@ -34,10 +34,10 @@
-# LOOKUP_SQLITE=yes
+LOOKUP_PGSQL=yes
+LOOKUP_SQLITE=yes
+ # LOOKUP_SQLITE_PC=sqlite3
# LOOKUP_WHOSON=yes
- # These two settings are obsolete; all three lookups are compiled when
-@@ -292,7 +292,7 @@
+@@ -328,7 +328,7 @@ LOOKUP_PASSWD=yes
# with Solaris 7 onwards. Uncomment whichever of these you are using.
# LDAP_LIB_TYPE=OPENLDAP1
@@ -46,7 +46,7 @@
# LDAP_LIB_TYPE=NETSCAPE
# LDAP_LIB_TYPE=SOLARIS
-@@ -325,6 +325,9 @@
+@@ -366,6 +366,9 @@ LOOKUP_PASSWD=yes
# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3
@@ -56,7 +56,7 @@
#------------------------------------------------------------------------------
# Compiling the Exim monitor: If you want to compile the Exim monitor, a
# program that requires an X11 display, then EXIM_MONITOR should be set to the
-@@ -333,7 +336,7 @@
+@@ -374,7 +377,7 @@ LOOKUP_PASSWD=yes
# files are defaulted in the OS/Makefile-Default file, but can be overridden in
# local OS-specific make files.
@@ -65,7 +65,7 @@
#------------------------------------------------------------------------------
-@@ -343,14 +346,14 @@
+@@ -384,14 +387,14 @@ EXIM_MONITOR=eximon.bin
# and the MIME ACL. Please read the documentation to learn more about these
# features.
@@ -82,7 +82,7 @@
# If you're using ClamAV and are backporting fixes to an old version, instead
# of staying current (which is the more usual approach) then you may need to
-@@ -532,10 +535,10 @@
+@@ -578,14 +581,14 @@ WHITELIST_D_MACROS=OUTGOING
# configuration to make use of the mechanism(s) selected.
AUTH_CRAM_MD5=yes
@@ -90,22 +90,26 @@
-# AUTH_DOVECOT=yes
+AUTH_CYRUS_SASL=yes
+AUTH_DOVECOT=yes
+ # AUTH_GSASL=yes
+ # AUTH_GSASL_PC=libgsasl
+ # AUTH_HEIMDAL_GSSAPI=yes
+ # AUTH_HEIMDAL_GSSAPI_PC=heimdal-gssapi
AUTH_PLAINTEXT=yes
-# AUTH_SPA=yes
+AUTH_SPA=yes
#------------------------------------------------------------------------------
-@@ -543,7 +546,7 @@
- # Cyrus SASL library installed before trying to build Exim, and you probably
- # want to uncomment the following line:
+@@ -595,7 +598,7 @@ AUTH_PLAINTEXT=yes
+ # Similarly for GNU SASL, unless pkg-config is used via AUTH_GSASL_PC.
+ # Ditto for AUTH_HEIMDAL_GSSAPI(_PC).
-# AUTH_LIBS=-lsasl2
+AUTH_LIBS=-lsasl2
+ # AUTH_LIBS=-lgsasl
+ # AUTH_LIBS=-lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -lhcrypto -lasn1 -lwind -lroken -lcrypt
-
- #------------------------------------------------------------------------------
-@@ -783,7 +786,7 @@
+@@ -830,7 +833,7 @@ ZCAT_COMMAND=/bin/zcat
# (version 5.004 or later) installed, set EXIM_PERL to perl.o. Using embedded
# Perl costs quite a lot of resources. Only do this if you really need it.
@@ -114,7 +118,7 @@
#------------------------------------------------------------------------------
-@@ -793,7 +796,7 @@
+@@ -840,7 +843,7 @@ ZCAT_COMMAND=/bin/zcat
# that the local_scan API is made available by the linker. You may also need
# to add -ldl to EXTRALIBS so that dlopen() is available to Exim.
@@ -123,7 +127,7 @@
#------------------------------------------------------------------------------
-@@ -803,11 +806,11 @@
+@@ -850,11 +853,11 @@ ZCAT_COMMAND=/bin/zcat
# support, which is intended for use in conjunction with the SMTP AUTH
# facilities, is included only when requested by the following setting:
@@ -137,7 +141,7 @@
#------------------------------------------------------------------------------
-@@ -1123,7 +1126,7 @@
+@@ -1174,7 +1177,7 @@ TMPDIR="/tmp"
# local part) can be increased by changing this value. It should be set to
# a multiple of 16.
diff --git a/debian/EDITME.exim4-light.diff b/debian/EDITME.exim4-light.diff
index b510956..fb495bb 100644
--- a/debian/EDITME.exim4-light.diff
+++ b/debian/EDITME.exim4-light.diff
@@ -1,6 +1,6 @@
---- /tmp/EXIM4/exim-4.73/build-tree/src/EDITME 2010-12-25 11:43:28.000000000 +0100
-+++ EDITME.exim4-light 2010-12-25 11:43:35.000000000 +0100
-@@ -100,7 +100,7 @@
+--- src/EDITME 2012-05-18 19:51:52.000000000 +0200
++++ EDITME.exim4-light 2012-05-18 19:56:25.000000000 +0200
+@@ -98,7 +98,7 @@
# /usr/local/sbin. The installation script will try to create this directory,
# and any superior directories, if they do not exist.
@@ -9,7 +9,7 @@
#------------------------------------------------------------------------------
-@@ -116,7 +116,7 @@
+@@ -114,7 +114,7 @@ BIN_DIRECTORY=/usr/exim/bin
# don't exist. It will also install a default runtime configuration if this
# file does not exist.
@@ -18,7 +18,7 @@
# It is possible to specify a colon-separated list of files for CONFIGURE_FILE.
# In this case, Exim will use the first of them that exists when it is run.
-@@ -133,7 +133,7 @@
+@@ -131,7 +131,7 @@ CONFIGURE_FILE=/usr/exim/configure
# deliveries. (Local deliveries run as various non-root users, typically as the
# owner of a local mailbox.) Specifying these values as root is not supported.
@@ -27,7 +27,7 @@
# If you specify EXIM_USER as a name, this is looked up at build time, and the
# uid number is built into the binary. However, you can specify that this
-@@ -155,6 +155,7 @@
+@@ -153,6 +153,7 @@ EXIM_USER=
# you want to use a group other than the default group for the given user.
# EXIM_GROUP=
@@ -35,7 +35,7 @@
# Many sites define a user called "exim", with an appropriate default group,
# and use
-@@ -175,7 +176,7 @@
+@@ -173,7 +174,7 @@ EXIM_USER=
# Almost all installations choose this:
@@ -44,7 +44,7 @@
-@@ -234,7 +235,7 @@
+@@ -232,7 +233,7 @@ TRANSPORT_SMTP=yes
# This one is special-purpose, and commonly not required, so it is not
# included by default.
@@ -53,7 +53,7 @@
#------------------------------------------------------------------------------
-@@ -243,8 +244,8 @@
+@@ -241,8 +242,8 @@ TRANSPORT_SMTP=yes
# MBX, is included only when requested. If you do not know what this is about,
# leave these settings commented out.
@@ -64,7 +64,7 @@
# SUPPORT_MBX=yes
-@@ -261,15 +262,15 @@
+@@ -296,15 +297,15 @@ LOOKUP_DBM=yes
LOOKUP_LSEARCH=yes
LOOKUP_DNSDB=yes
@@ -83,8 +83,8 @@
+LOOKUP_PASSWD=yes
# LOOKUP_PGSQL=yes
# LOOKUP_SQLITE=yes
- # LOOKUP_WHOSON=yes
-@@ -482,7 +483,7 @@
+ # LOOKUP_SQLITE_PC=sqlite3
+@@ -528,7 +529,7 @@ FIXED_NEVER_USERS=root
# CONFIGURE_OWNER setting, to specify a configuration file which is listed in
# the TRUSTED_CONFIG_LIST file, then root privileges are not dropped by Exim.
@@ -93,7 +93,7 @@
#------------------------------------------------------------------------------
-@@ -518,6 +519,9 @@
+@@ -564,6 +565,9 @@ FIXED_NEVER_USERS=root
# WHITELIST_D_MACROS=TLS:SPOOL
@@ -103,7 +103,7 @@
#------------------------------------------------------------------------------
# Exim has support for the AUTH (authentication) extension of the SMTP
# protocol, as defined by RFC 2554. If you don't know what SMTP authentication
-@@ -527,10 +531,10 @@
+@@ -573,14 +577,14 @@ FIXED_NEVER_USERS=root
# included in the Exim binary. You will then need to set up the run time
# configuration to make use of the mechanism(s) selected.
@@ -111,12 +111,16 @@
+AUTH_CRAM_MD5=yes
# AUTH_CYRUS_SASL=yes
# AUTH_DOVECOT=yes
+ # AUTH_GSASL=yes
+ # AUTH_GSASL_PC=libgsasl
+ # AUTH_HEIMDAL_GSSAPI=yes
+ # AUTH_HEIMDAL_GSSAPI_PC=heimdal-gssapi
-# AUTH_PLAINTEXT=yes
+AUTH_PLAINTEXT=yes
# AUTH_SPA=yes
-@@ -548,7 +552,7 @@
+@@ -602,7 +606,7 @@ FIXED_NEVER_USERS=root
# one that is set in the headers_charset option. The default setting is
# defined by this setting:
@@ -125,25 +129,28 @@
# If you are going to make use of $header_xxx expansions in your configuration
# file, or if your users are going to use them in filter files, and the normal
-@@ -630,14 +634,14 @@
+@@ -684,7 +688,7 @@ HEADERS_CHARSET="ISO-8859-1"
# leave these settings commented out.
# This setting is required for any TLS support (either OpenSSL or GnuTLS)
-# SUPPORT_TLS=yes
+SUPPORT_TLS=yes
- # Uncomment this setting if you are using OpenSSL
- # TLS_LIBS=-lssl -lcrypto
+ # Uncomment one of these settings if you are using OpenSSL; pkg-config vs not
+ # USE_OPENSSL_PC=openssl
+@@ -692,9 +696,9 @@ HEADERS_CHARSET="ISO-8859-1"
- # Uncomment these settings if you are using GnuTLS
+ # Uncomment the first and either the second or the third of these if you
+ # are using GnuTLS. If you have pkg-config, then the second, else the third.
-# USE_GNUTLS=yes
--# TLS_LIBS=-lgnutls -ltasn1 -lgcrypt
+USE_GNUTLS=yes
+ # USE_GNUTLS_PC=gnutls
+-# TLS_LIBS=-lgnutls -ltasn1 -lgcrypt
+TLS_LIBS=-lgnutls
# If you are running Exim as a server, note that just building it with TLS
# support is not all you need to do. You also need to set up a suitable
-@@ -713,6 +717,7 @@
+@@ -775,6 +779,7 @@ CFLAGS += -fvisibility=hidden
# to form the final file names. Some installations may want something like this:
# LOG_FILE_PATH=/var/log/exim_%slog
@@ -151,7 +158,7 @@
# which results in files with names /var/log/exim_mainlog, etc. The directory
# in which the log files are placed must exist; Exim does not try to create
-@@ -761,7 +766,7 @@
+@@ -823,7 +828,7 @@ EXICYCLOG_MAX=10
# files. Both the name of the command and the suffix that it adds to files
# need to be defined here. See also the EXICYCLOG_MAX configuration.
@@ -160,7 +167,7 @@
COMPRESS_SUFFIX=gz
-@@ -769,7 +774,7 @@
+@@ -831,7 +836,7 @@ COMPRESS_SUFFIX=gz
# If the exigrep utility is fed compressed log files, it tries to uncompress
# them using this command.
@@ -169,7 +176,7 @@
#------------------------------------------------------------------------------
-@@ -802,6 +807,7 @@
+@@ -864,6 +869,7 @@ ZCAT_COMMAND=/usr/bin/zcat
# You probably need to add -lpam to EXTRALIBS, and in some releases of
# GNU/Linux -ldl is also needed.
@@ -177,7 +184,7 @@
#------------------------------------------------------------------------------
-@@ -868,6 +874,8 @@
+@@ -930,6 +936,8 @@ ZCAT_COMMAND=/usr/bin/zcat
# CYRUS_SASLAUTHD_SOCKET=/var/state/saslauthd/mux
@@ -186,7 +193,7 @@
#------------------------------------------------------------------------------
# TCP wrappers: If you want to use tcpwrappers from within Exim, uncomment
-@@ -1161,6 +1169,7 @@
+@@ -1233,6 +1241,7 @@ TMPDIR="/tmp"
# file can be specified here. Some installations may want something like this:
# PID_FILE_PATH=/var/lock/exim.pid
@@ -194,7 +201,7 @@
# If PID_FILE_PATH is not defined, Exim writes a file in its spool directory
# using the name "exim-daemon.pid".
-@@ -1194,6 +1203,7 @@
+@@ -1266,6 +1275,7 @@ TMPDIR="/tmp"
# messages become "invisible" to the normal management tools.
# SUPPORT_MOVE_FROZEN_MESSAGES=yes
@@ -202,7 +209,7 @@
#------------------------------------------------------------------------------
-@@ -1212,3 +1222,6 @@
+@@ -1304,3 +1314,6 @@ TMPDIR="/tmp"
# ENABLE_DISABLE_FSYNC=yes
# End of EDITME for Exim 4.
diff --git a/debian/EDITME.eximon.diff b/debian/EDITME.eximon.diff
index 7977c1b..d3d02a5 100644
--- a/debian/EDITME.eximon.diff
+++ b/debian/EDITME.eximon.diff
@@ -1,6 +1,6 @@
---- /tmp/EXIM4/exim-4.73/build-tree/exim_monitor/EDITME 2010-12-23 15:19:35.000000000 +0100
-+++ EDITME.eximon 2010-12-25 11:44:41.000000000 +0100
-@@ -3,6 +3,7 @@
+--- exim_monitor/EDITME 2012-05-18 05:04:36.000000000 +0200
++++ EDITME.eximon 2012-05-18 19:53:04.000000000 +0200
+@@ -1,6 +1,7 @@
##################################################
# The Exim Monitor #
##################################################
diff --git a/debian/EDITME.openssl.exim4-light.diff b/debian/EDITME.openssl.exim4-light.diff
index 8718e2d..a00d7b6 100644
--- a/debian/EDITME.openssl.exim4-light.diff
+++ b/debian/EDITME.openssl.exim4-light.diff
@@ -1,16 +1,18 @@
---- EDITME.exim4-light 2006-01-13 23:37:07.000000000 +0000
-+++ EDITME.exim4-light 2006-01-13 23:37:44.000000000 +0000
-@@ -566,11 +566,11 @@
- SUPPORT_TLS=yes
+--- EDITME.exim4-light 2012-05-29 19:16:05.000000000 +0200
++++ EDITME.exim4-light 2012-05-29 19:17:05.000000000 +0200
+@@ -697,13 +697,13 @@ SUPPORT_TLS=yes
- # Uncomment this setting if you are using OpenSSL
+ # Uncomment one of these settings if you are using OpenSSL; pkg-config vs not
+ # USE_OPENSSL_PC=openssl
-# TLS_LIBS=-lssl -lcrypto
+TLS_LIBS=-lssl -lcrypto
- # Uncomment these settings if you are using GnuTLS
+ # Uncomment the first and either the second or the third of these if you
+ # are using GnuTLS. If you have pkg-config, then the second, else the third.
-USE_GNUTLS=yes
--TLS_LIBS=-lgnutls
+# USE_GNUTLS=yes
+ # USE_GNUTLS_PC=gnutls
+-TLS_LIBS=-lgnutls
+# TLS_LIBS=-lgnutls
# If you are running Exim as a server, note that just building it with TLS
diff --git a/debian/README.Debian.xml b/debian/README.Debian.xml
index 349c847..e2b34ce 100644
--- a/debian/README.Debian.xml
+++ b/debian/README.Debian.xml
@@ -1154,30 +1154,6 @@
Outlook et.al. noted above.
</para>
</section>
- <section id="dhparams"> <title>Diffie-Hellman parameters</title>
- <para>
- This version of Exim is compiled against GnuTLS. GnuTLS is a
- replacement for the restrictively licensed OpenSSL libraries.
- GnuTLS does not support varying its Diffie-Hellman parameters.
- Therefore tls_dhparam settings are ignored in Exim's
- configuration file, and no dhparam file is generated by
- exim-gencerts. GnuTLS uses Diffie-Hellman parameters that are
- computed when they are needed. When someone sends STARTTLS,
- Exim will compute these parameters and then store these
- parameters in a cache file located in Exim's spool directory
- (<filename>/var/spool/exim4/gnutls-params</filename>). Generating the
- parameters for the first time is very time-consuming. This is why
- the Debian packages already include pre-generated Diffie-Hellman
- parameters in <filename>/var/spool/exim4/gnutls-params</filename>.
- <command>/usr/share/exim4/exim4_refresh_gnutls-params</command>
- can be used to regenerate the parameters offline if necessary.
- </para>
- <para>
- For more reference, you can refer to
- <filename>/usr/share/doc/exim4-base/spec.txt.gz</filename>,
- section 39.
- </para>
- </section>
<section> <title>Troubleshooting</title>
<para>
If Exim complains in an SMTP session that TLS is unavailable,
diff --git a/debian/changelog b/debian/changelog
index de2e1e2..c54fa19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,45 @@
-exim4 (4.77-2) UNRELEASED; urgency=low
+exim4 (4.80~rc7-2) UNRELEASED; urgency=low
* NOT RELEASED YET
+
+ -- Andreas Metzler <ametzler@debian.org> Tue, 29 May 2012 20:23:38 +0200
+
+exim4 (4.80~rc7-1) experimental; urgency=low
+
+ * New upstream version.
+ * Let debian/EDITME.openssl.exim4-light.diff apply again.
+
+ -- Andreas Metzler <ametzler@debian.org> Tue, 29 May 2012 19:33:07 +0200
+
+exim4 (4.80~rc6-1) experimental; urgency=low
+
+ * Ship newly available GnuTLS-FAQ.txt in exim4-base.
+ * Upstream's handling of GnuTLS DH parameters has changed, hardcoded
+ parameters (from RFCs are used by default. See
+ /usr/share/doc/exim4-base/README.UPDATING* for details. Stop shipping
+ /usr/share/exim4/exim4_refresh_gnutls-params /usr/share/exim4/timeout.pl
+ and /var/spool/exim4/gnutls-params-2236.
+
+ -- Andreas Metzler <ametzler@debian.org> Sun, 27 May 2012 18:46:48 +0200
+
+exim4 (4.80~rc5-1) experimental; urgency=low
+
+ * New upstream version.
+
+ -- Andreas Metzler <ametzler@debian.org> Thu, 24 May 2012 20:20:24 +0200
+
+exim4 (4.80~rc4-1) experimental; urgency=low
+
+ * New upstream version.
+ + Unfuzz 50_localscan_dlopen.dpatch
+ + Drop 80_revert_stringformatprintf.diff, superseded upstream.
+ + Default DH param size switched to 2236 for NSS compat. Update
+ generation script and shipped parameters.
+
+ -- Andreas Metzler <ametzler@debian.org> Mon, 21 May 2012 20:00:18 +0200
+
+exim4 (4.80~rc2-1) experimental; urgency=low
+
* Fix typo in retry/30_exim4-config (s/frequenzy/frequency/) (Thanks, Regid
Ichira). Closes: #646338
* dpkg-buildflags supersedes hardening-wrapper. set
@@ -15,8 +54,26 @@ exim4 (4.77-2) UNRELEASED; urgency=low
* add more verbose help to /etc/default/exim4. Closes: #653272
* Updated French debconf templates translation. (thanks for proofreading,
debian-l10n-french!) Closes: #668475
-
- -- Andreas Metzler <ametzler@debian.org> Sat, 22 Oct 2011 19:16:58 +0200
+ * Fix typo usualy in update-exim4.conf.8.
+ * Add source lintian override (debian/source/lintian-overrides) for
+ binaries-have-file-conflict exim4-daemon-heavy-dbg exim4-daemon-light-dbg.
+ *-daemon-dbg depends on the respective -daemon, and the daemon-packages
+ conflict with each other.
+ * New upstream version:
+ + Unfuzz patches
+ + Update 66_enlarge-dh-parameters-size.dpatch. This is now a noop if built
+ against gnutls >= 2.12.
+ + Default DH param size is 2432, update generation script and shipped
+ parameters.
+ + Unfuzz/update */EDITME/*. Update debian/example.conf.md5.
+ + 80_revert_stringformatprintf.diff. Do not mark string_format() as
+ PRINTF_FUNCTION(3,4) to allow compilation with -Wformat
+ -Werror=format-security
+ + Sets accept_8bitmime = true by default. Closes: #445013
+ + Uses GnuTLS priority string for configuration. (See NEWS.Debian)
+ Closes: #624041
+
+ -- Andreas Metzler <ametzler@debian.org> Sun, 20 May 2012 15:57:15 +0200
exim4 (4.77-1) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 6b25916..e8cf17d 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: standard
Maintainer: Exim4 Maintainers <pkg-exim4-maintainers@lists.alioth.debian.org>
Uploaders: Andreas Metzler <ametzler@debian.org>,Marc Haber <mh+debian-packages@zugschlus.de>
Homepage: http://www.exim.org/
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
Vcs-Svn: svn://svn.debian.org/svn/pkg-exim4/exim/trunk
Vcs-Browser: http://svn.debian.org/wsvn/pkg-exim4/exim/trunk/
Build-Depends: debhelper (>= 7.0.15), po-debconf, docbook-xsl, xsltproc,
diff --git a/debian/example.conf.md5 b/debian/example.conf.md5
index 7ca65db..fe55d76 100644
--- a/debian/example.conf.md5
+++ b/debian/example.conf.md5
@@ -1 +1 @@
-c12ba26980aa24f72fb643a38c2cd317 -
+b2257965b2f4c7300ab1ae9b3460ed54 -
diff --git a/debian/exim4-base.NEWS b/debian/exim4-base.NEWS
index cdb9e21..4a37a68 100644
--- a/debian/exim4-base.NEWS
+++ b/debian/exim4-base.NEWS
@@ -1,3 +1,13 @@
+exim4 (4.80~rc6-1) experimental; urgency=low
+
+ Upstream's handling of GnuTLS DH parameters has changed, hardcoded
+ parameters (from RFCs are used by default. See
+ /usr/share/doc/exim4-base/README.UPDATING* for details. Stop shipping
+ /usr/share/exim4/exim4_refresh_gnutls-params /usr/share/exim4/timeout.pl
+ and /var/spool/exim4/gnutls-params-2236.
+
+ -- Andreas Metzler <ametzler@debian.org> Sun, 27 May 2012 18:46:48 +0200
+
exim4 (4.69-4) unstable; urgency=low
In reaction to #475194, the size of the Diffie-Hellman parameters
diff --git a/debian/exim4-base.docs b/debian/exim4-base.docs
index 16972f8..6617943 100644
--- a/debian/exim4-base.docs
+++ b/debian/exim4-base.docs
@@ -10,5 +10,7 @@ b-exim4-daemon-light/doc/filter.txt
b-exim4-daemon-light/doc/NewStuff
b-exim4-daemon-light/doc/OptionLists.txt
b-exim4-daemon-light/doc/spec.txt
+b-exim4-daemon-light/doc/GnuTLS-FAQ.txt
+b-exim4-daemon-light/README.UPDATING
debian/changelog.Debian.old
debian/README.Debian.html
diff --git a/debian/exim4-base.install b/debian/exim4-base.install
index 07dc5cf..8e16f3e 100644
--- a/debian/exim4-base.install
+++ b/debian/exim4-base.install
@@ -1,4 +1 @@
debian/script usr/share/bug/exim4-base
-debian/timeout.pl usr/share/exim4
-debian/exim4_refresh_gnutls-params usr/share/exim4
-debian/gnutls-params var/spool/exim4
diff --git a/debian/exim4-base.lintian-overrides b/debian/exim4-base.lintian-overrides
deleted file mode 100644
index 71c1d47..0000000
--- a/debian/exim4-base.lintian-overrides
+++ /dev/null
@@ -1 +0,0 @@
-exim4-base: file-in-unusual-dir var/spool/exim4/gnutls-params
diff --git a/debian/exim4-base.postrm b/debian/exim4-base.postrm
index 0c2edc4..331bafd 100644
--- a/debian/exim4-base.postrm
+++ b/debian/exim4-base.postrm
@@ -61,7 +61,7 @@ case "$1" in
# remove logs and pid-dir.
rm -rf /var/run/exim4 /var/log/exim4 /var/spool/exim4/msglog \
/var/spool/exim4/db /var/spool/exim4/exim-process.info \
- /var/spool/exim4/gnutls-params
+ /var/spool/exim4/gnutls-params*
rmdir /var/spool/exim4 /var/lib/exim4 2> /dev/null || true
;;
esac
diff --git a/debian/exim4-daemon-heavy.NEWS b/debian/exim4-daemon-heavy.NEWS
index 2bb569c..9e38e08 100644
--- a/debian/exim4-daemon-heavy.NEWS
+++ b/debian/exim4-daemon-heavy.NEWS
@@ -1,3 +1,19 @@
+exim4 (4.80~rc2-1) experimental; urgency=low
+
+ Ldap lookups returning multi-valued attributes now separate the attributes
+ with only a comma, not a comma-space sequence.
+
+ The GnuTLS support has been mostly rewritten. exim main configuration
+ options gnutls_require_kx, gnutls_require_mac and gnutls_require_protocols,
+ are no longer supported. (They are ignored if present now, but will trigger
+ an error in later releases.) Their functionality is entirely subsumed into
+ tls_require_ciphers. In turn, tls_require_ciphers is no longer an Exim list
+ and is not parsed by Exim, but is instead given to gnutls_priority_init(3).
+
+ See /exim4-base/usr/share/doc/exim4-base/README.UPDATING.gz for details.
+
+ -- Andreas Metzler <ametzler@debian.org> Sat, 22 Oct 2011 19:16:58 +0200
+
exim4 (4.77~rc4-1) experimental; urgency=low
Exim no longer performs string expansion on the second string of
diff --git a/debian/exim4-daemon-light.NEWS b/debian/exim4-daemon-light.NEWS
index f30fefb..8deea5e 100644
--- a/debian/exim4-daemon-light.NEWS
+++ b/debian/exim4-daemon-light.NEWS
@@ -1,3 +1,19 @@
+exim4 (4.80~rc2-1) experimental; urgency=low
+
+ Ldap lookups returning multi-valued attributes now separate the attributes
+ with only a comma, not a comma-space sequence.
+
+ The GnuTLS support has been mostly rewritten. exim main configuration
+ options gnutls_require_kx, gnutls_require_mac and gnutls_require_protocols,
+ are no longer supported. (They are ignored if present now, but will trigger
+ an error in later releases.) Their functionality is entirely subsumed into
+ tls_require_ciphers. In turn, tls_require_ciphers is no longer an Exim list
+ and is not parsed by Exim, but is instead given to gnutls_priority_init(3).
+
+ See /exim4-base/usr/share/doc/exim4-base/README.UPDATING.gz for details.
+
+ -- Andreas Metzler <ametzler@debian.org> Sat, 22 Oct 2011 19:16:58 +0200
+
exim4 (4.77~rc4-1) experimental; urgency=low
Exim no longer performs string expansion on the second string of
diff --git a/debian/exim4_refresh_gnutls-params b/debian/exim4_refresh_gnutls-params
deleted file mode 100755
index 9eea374..0000000
--- a/debian/exim4_refresh_gnutls-params
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ -n "$EX4DEBUG" ]; then
- echo "now debugging $0 $@"
- set -x
-fi
-
-
-# regenerate $EXIM4_SPOOLDIR/gnutls-params
-# As this can take _very_ long on machines with little entropy, we limit
-# the maximum runtime to 2*$CERTTOOLTIMEOUT seconds and keep using the
-# old file otherwise.
-
-# Only do anything if exim4 is actually installed
-if [ ! -x /usr/lib/exim4/exim4 ]; then
- exit 0
-fi
-
-# Only do anyting if TLS is enabled in exim
-if [ -z "$(/usr/lib/exim4/exim4 -bP tls_advertise_hosts | sed 's/.*=[[:space:]]\(.*\)/\1/')" ]; then
- # TLS disabled
- exit 0
-fi
-
-TIMEOUT=${1:-1800}
-
-EXIM4_SPOOLDIR="${EXIM4_SPOOLDIR:-$(/usr/lib/exim4/exim4 -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')}"
-cd $EXIM4_SPOOLDIR
-
-PARAMFILE="$EXIM4_SPOOLDIR/gnutls-params"
-
-tempgnutls=$(tempfile --directory $EXIM4_SPOOLDIR --mode 644 --prefix "gnutp" )
-
-if [ -x /usr/bin/certtool ] ; then
- # GnuTLS
- if /usr/share/exim4/timeout.pl \
- "$TIMEOUT" /usr/bin/certtool --generate-dh-params --bits 2048 \
- > "$tempgnutls" 2> /dev/null ; then
- mv -f "$tempgnutls" "$PARAMFILE"
- else
- rm -f "$tempgnutls"
- fi
-elif [ -x /usr/bin/openssl ] ;then
- # OpenSSL
- if HOME=$EXIM4_SPOOLDIR /usr/share/exim4/timeout.pl \
- "$TIMEOUT" /usr/bin/openssl dhparam 2048 \
- > "$tempgnutls" 2> /dev/null ; then
- mv -f "$tempgnutls" "$PARAMFILE"
- else
- rm -f "$tempgnutls"
- fi
-else
- # neither GnuTLS nor OpenSSL installed, have exim generate the DH params
- rm -f "$PARAMFILE" "$tempgnutls"
-fi
-
-# vim:tabstop=2:expandtab:shiftwidth=2
diff --git a/debian/gnutls-params b/debian/gnutls-params
deleted file mode 100644
index c1c5fa6..0000000
--- a/debian/gnutls-params
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN DH PARAMETERS-----
-MIIBCAKCAQEArYVHPGLKJ8ugLSZhvJXKI7L/AJI+8RvtKkCt9WCntDIwG8ZdUQFP
-YNZC5dk4yISA3aw34DS6ihFIhQUm/eLt6/m034/gNdoWTqRdk1K2+TpwEcHSZ8ir
-ynyqqiQGWxoHe9YJyLzeAY+FlYh55JEnx2yiPRQxQCnQYR7e5PxCm0SDqkCVcHwh
-VELpKbgsdlM43NZ/RXesBR/o95H21TMbz42LzaV7tqoT9r/iDlrXCHM3XeY4HjbZ
-cRp13LaCqORMOsEccVugTE/1RFUIla/CnDSuwKbIBDksEMvbusI61wre5yrd1tIY
-3X5z7sMtkaAKfhBqc65svjVRS8FbOy12SwIBAg==
------END DH PARAMETERS-----
diff --git a/debian/manpages/update-exim4.conf.8 b/debian/manpages/update-exim4.conf.8
index 7121770..6679d35 100644
--- a/debian/manpages/update-exim4.conf.8
+++ b/debian/manpages/update-exim4.conf.8
@@ -164,7 +164,7 @@ The octal file mode of the generated file.
.TP
.I dc_eximconfig_configtype
The main configuration type. Sets macro DC_eximconfig_configtype. The macro
-usualy contains a shorthand for one of the choices for the
+usually contains a shorthand for one of the choices for the
\(lqGeneral type of mail configuration\(rq debconf question (See
README.Debian).
diff --git a/debian/patches/33_eximon.binary.dpatch b/debian/patches/33_eximon.binary.dpatch
index b2b2664..bc78cdc 100755
--- a/debian/patches/33_eximon.binary.dpatch
+++ b/debian/patches/33_eximon.binary.dpatch
@@ -4,15 +4,15 @@
## All lines beginning with `## DP:' are a description of the patch.
## DP: eximon.bin is installed in /usr/lib/exim4/ and not in path.
-diff -NurbBp exim.orig/OS/eximon.conf-Default exim/OS/eximon.conf-Default
---- exim.orig/OS/eximon.conf-Default 2004-10-06 17:07:39.000000000 +0200
-+++ exim/OS/eximon.conf-Default 2009-11-15 12:16:06.000000000 +0100
-@@ -7,7 +7,7 @@
+diff -NurBbp exim-4.80.orig/OS/eximon.conf-Default exim-4.80/OS/eximon.conf-Default
+--- exim-4.80.orig/OS/eximon.conf-Default 2012-05-18 05:04:36.000000000 +0200
++++ exim-4.80/OS/eximon.conf-Default 2012-05-18 19:10:59.000000000 +0200
+@@ -5,7 +5,7 @@
# The name of the eximon binary, usually the same as the eximon script,
# with .bin stuck on the end.
--EXIMON_BINARY=${EXIMON_BINARY-$0.bin}
-+EXIMON_BINARY=/usr/lib/exim4/${EXIMON_BINARY-${0##*/}.bin}
+-EXIMON_BINARY="${EXIMON_BINARY-$0.bin}"
++EXIMON_BINARY="/usr/lib/exim4/${EXIMON_BINARY-${0##*/}.bin}"
# The remaining parameters are values likely to be changed to suit the
# user's taste. They are documented in the EDITME file.
diff --git a/debian/patches/50_localscan_dlopen.dpatch b/debian/patches/50_localscan_dlopen.dpatch
index 4c260b1..65540b9 100644
--- a/debian/patches/50_localscan_dlopen.dpatch
+++ b/debian/patches/50_localscan_dlopen.dpatch
@@ -7,9 +7,9 @@
## DP: Hudson and then by Marc MERLIN for SA-Exim and minor/major API version
## DP: tracking
-diff -NurBbp a/src/config.h.defaults b/src/config.h.defaults
---- a/src/config.h.defaults 2011-05-06 12:24:14.000000000 +0200
-+++ b/src/config.h.defaults 2011-05-07 08:39:40.000000000 +0200
+diff -NurBbp exim-4.80.orig/src/config.h.defaults exim-4.80/src/config.h.defaults
+--- exim-4.80.orig/src/config.h.defaults 2012-05-21 06:32:11.000000000 +0200
++++ exim-4.80/src/config.h.defaults 2012-05-21 19:31:11.000000000 +0200
@@ -27,6 +27,8 @@ it's a default value. */
#define AUTH_VARS 3
@@ -19,10 +19,10 @@ diff -NurBbp a/src/config.h.defaults b/src/config.h.defaults
#define BIN_DIRECTORY
#define CONFIGURE_FILE
-diff -NurBbp a/src/EDITME b/src/EDITME
---- a/src/EDITME 2011-05-06 12:24:14.000000000 +0200
-+++ b/src/EDITME 2011-05-07 08:39:40.000000000 +0200
-@@ -694,6 +694,21 @@ HEADERS_CHARSET="ISO-8859-1"
+diff -NurBbp exim-4.80.orig/src/EDITME exim-4.80/src/EDITME
+--- exim-4.80.orig/src/EDITME 2012-05-21 06:32:11.000000000 +0200
++++ exim-4.80/src/EDITME 2012-05-21 19:31:11.000000000 +0200
+@@ -736,6 +736,21 @@ HEADERS_CHARSET="ISO-8859-1"
#------------------------------------------------------------------------------
@@ -44,10 +44,10 @@ diff -NurBbp a/src/EDITME b/src/EDITME
# The default distribution of Exim contains only the plain text form of the
# documentation. Other forms are available separately. If you want to install
# the documentation in "info" format, first fetch the Texinfo documentation
-diff -NurBbp a/src/globals.c b/src/globals.c
---- a/src/globals.c 2011-05-07 08:37:58.000000000 +0200
-+++ b/src/globals.c 2011-05-07 08:39:40.000000000 +0200
-@@ -122,6 +122,9 @@ uschar *tls_verify_certificates= NULL;
+diff -NurBbp exim-4.80.orig/src/globals.c exim-4.80/src/globals.c
+--- exim-4.80.orig/src/globals.c 2012-05-21 19:29:24.000000000 +0200
++++ exim-4.80/src/globals.c 2012-05-21 19:31:11.000000000 +0200
+@@ -129,6 +129,9 @@ uschar *tls_verify_certificates= NULL;
uschar *tls_verify_hosts = NULL;
#endif
@@ -57,10 +57,10 @@ diff -NurBbp a/src/globals.c b/src/globals.c
/* Input-reading functions for messages, so we can use special ones for
incoming TCP/IP. The defaults use stdin. We never need these for any
-diff -NurBbp a/src/globals.h b/src/globals.h
---- a/src/globals.h 2011-05-06 12:24:14.000000000 +0200
-+++ b/src/globals.h 2011-05-07 08:39:40.000000000 +0200
-@@ -103,6 +103,9 @@ extern uschar *tls_verify_certificates;/
+diff -NurBbp exim-4.80.orig/src/globals.h exim-4.80/src/globals.h
+--- exim-4.80.orig/src/globals.h 2012-05-21 06:32:11.000000000 +0200
++++ exim-4.80/src/globals.h 2012-05-21 19:31:11.000000000 +0200
+@@ -108,6 +108,9 @@ extern uschar *tls_verify_certificates;/
extern uschar *tls_verify_hosts; /* Mandatory client verification */
#endif
@@ -70,10 +70,10 @@ diff -NurBbp a/src/globals.h b/src/globals.h
/* Input-reading functions for messages, so we can use special ones for
incoming TCP/IP. */
-diff -NurBbp a/src/local_scan.c b/src/local_scan.c
---- a/src/local_scan.c 2011-05-06 12:24:14.000000000 +0200
-+++ b/src/local_scan.c 2011-05-07 08:39:40.000000000 +0200
-@@ -7,60 +7,131 @@
+diff -NurBbp exim-4.80.orig/src/local_scan.c exim-4.80/src/local_scan.c
+--- exim-4.80.orig/src/local_scan.c 2012-05-21 06:32:11.000000000 +0200
++++ exim-4.80/src/local_scan.c 2012-05-21 19:31:11.000000000 +0200
+@@ -5,60 +5,131 @@
/* Copyright (c) University of Cambridge 1995 - 2009 */
/* See the file NOTICE for conditions of use and distribution. */
@@ -252,10 +252,10 @@ diff -NurBbp a/src/local_scan.c b/src/local_scan.c
+#endif /* DLOPEN_LOCAL_SCAN */
+
/* End of local_scan.c */
-diff -NurBbp a/src/local_scan.h b/src/local_scan.h
---- a/src/local_scan.h 2011-05-06 12:24:14.000000000 +0200
-+++ b/src/local_scan.h 2011-05-07 08:39:40.000000000 +0200
-@@ -19,6 +19,7 @@ settings, and the store functions. */
+diff -NurBbp exim-4.80.orig/src/local_scan.h exim-4.80/src/local_scan.h
+--- exim-4.80.orig/src/local_scan.h 2012-05-21 06:32:11.000000000 +0200
++++ exim-4.80/src/local_scan.h 2012-05-21 19:31:11.000000000 +0200
+@@ -17,6 +17,7 @@ settings, and the store functions. */
#include <stdarg.h>
#include <sys/types.h>
@@ -263,17 +263,17 @@ diff -NurBbp a/src/local_scan.h b/src/local_scan.h
#include "config.h"
#include "mytypes.h"
#include "store.h"
-@@ -192,4 +193,6 @@ extern uschar *string_copy(uschar *);
+@@ -190,4 +191,6 @@ extern uschar *string_copy(const uschar
extern uschar *string_copyn(uschar *, int);
- extern uschar *string_sprintf(const char *, ...);
+ extern uschar *string_sprintf(const char *, ...) ALMOST_PRINTF(1,2);
+#pragma GCC visibility pop
+
/* End of local_scan.h */
-diff -NurBbp a/src/readconf.c b/src/readconf.c
---- a/src/readconf.c 2011-05-06 12:24:14.000000000 +0200
-+++ b/src/readconf.c 2011-05-07 08:39:40.000000000 +0200
-@@ -277,6 +277,9 @@ static optionlist optionlist_config[] =
+diff -NurBbp exim-4.80.orig/src/readconf.c exim-4.80/src/readconf.c
+--- exim-4.80.orig/src/readconf.c 2012-05-21 06:32:11.000000000 +0200
++++ exim-4.80/src/readconf.c 2012-05-21 19:31:11.000000000 +0200
+@@ -276,6 +276,9 @@ static optionlist optionlist_config[] =
{ "local_from_prefix", opt_stringptr, &local_from_prefix },
{ "local_from_suffix", opt_stringptr, &local_from_suffix },
{ "local_interfaces", opt_stringptr, &local_interfaces },
diff --git a/debian/patches/66_enlarge-dh-parameters-size.dpatch b/debian/patches/66_enlarge-dh-parameters-size.dpatch
index 74ff856..5735933 100755
--- a/debian/patches/66_enlarge-dh-parameters-size.dpatch
+++ b/debian/patches/66_enlarge-dh-parameters-size.dpatch
@@ -2,19 +2,20 @@
## 66_enlarge-dh-parameters-size.dpatch by Marc Haber <mh+debian-packages@zugschlus.de>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Enlarge default server side size of DH parameters to 2048 from 1024.
+## DP: This patch has no effect if building against gnutls >= 2.12, because
+## DP: exim is using gnutls_sec_param_to_pk_bits() to get correct number
+## DP: of dh_bits when built against newer gnutls-versions.
-diff -NurbBp exim.orig/src/tls-gnu.c exim/src/tls-gnu.c
---- exim.orig/src/tls-gnu.c 2009-10-16 11:51:12.000000000 +0200
-+++ exim/src/tls-gnu.c 2009-11-15 12:17:32.000000000 +0100
-@@ -22,8 +22,8 @@ functions from the GnuTLS library. */
+diff -NurBbp exim-4.80.orig/src/tls-gnu.c exim-4.80/src/tls-gnu.c
+--- exim-4.80.orig/src/tls-gnu.c 2012-05-19 01:17:38.000000000 +0200
++++ exim-4.80/src/tls-gnu.c 2012-05-20 12:01:24.000000000 +0200
+@@ -159,7 +159,7 @@ callbacks. */
+ can ask for a bit-strength. Without that, we stick to the constant we had
+ before, for now. */
+ #ifndef EXIM_SERVER_DH_BITS_PRE2_12
+-#define EXIM_SERVER_DH_BITS_PRE2_12 1024
++#define EXIM_SERVER_DH_BITS_PRE2_12 2048
+ #endif
-
- #define UNKNOWN_NAME "unknown"
--#define DH_BITS 1024
--#define PARAM_SIZE 2*1024
-+#define DH_BITS 2048
-+#define PARAM_SIZE 2*2048
-
-
- /* Values for verify_requirment */
+ #define exim_gnutls_err_check(Label) do { \
diff --git a/debian/rules b/debian/rules
index a801971..7716b09 100755
--- a/debian/rules
+++ b/debian/rules
@@ -283,8 +283,7 @@ cleanfiles:
| xargs -0r rm -v
#pwd
- chmod 755 $(DEBIAN)/exim-gencert $(DEBIAN)/timeout.pl \
- $(DEBIAN)/exim4_refresh_gnutls-params \
+ chmod 755 $(DEBIAN)/exim-gencert \
$(DEBIAN)/lynx-dump-postprocess $(DEBIAN)/script \
$(DEBIAN)/exim-adduser
dh_clean
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..c7349e0
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,3 @@
+# A Conflict is unnecessary. *-daemon-dbg depends on the
+# respective -daemon, and the daemon-packages conflict with each other.
+exim4 source: binaries-have-file-conflict exim4-daemon-heavy-dbg exim4-daemon-light-dbg usr/lib/debug/usr/sbin/exim4
diff --git a/debian/timeout.pl b/debian/timeout.pl
deleted file mode 100755
index 166bc38..0000000
--- a/debian/timeout.pl
+++ /dev/null
@@ -1,234 +0,0 @@
-#!/usr/bin/perl
-
-## timeout
-##
-## (c) 2004 Piotr Roszatycki <dexter@debian.org>, GPL
-##
-## $Id$
-
-=head1 NAME
-
-timeout - Run command with bounded time.
-
-=head1 SYNOPSIS
-
-B<timeout> S<B<-h>>
-
-B<timeout>
-S<[-I<signal>]>
-I<time>
-I<command>
-...
-
-=cut
-
-use 5.006;
-use strict;
-use Config;
-BEGIN {
- unless( eval "require Pod::Usage" ) {
- die "Please install the perl-modules package if you want this script to work\n";
- }
-}
-use POSIX qw(setsid);
-
-
-##############################################################################
-
-## Default values for constant variables
-##
-
-## Program name
-my $NAME = "timeout";
-
-## Program version
-my $VERSION = "0.1+he1";
-
-
-##############################################################################
-
-## Signals to handle
-##
-my @signals = qw( HUP INT QUIT TERM SEGV PIPE XCPU XFSZ ALRM );
-
-
-##############################################################################
-
-## Signal to send after timeout. Default is KILL.
-my $signal = 'KILL';
-
-## Time to wait
-my $time = 0;
-
-## Command to execute as array of arguments
-my @command = ();
-
-## PID for fork function
-my $child_pid;
-
-## PID for wait function
-my $pid;
-
-
-##############################################################################
-
-## usage()
-##
-## Prints usage message.
-##
-sub usage() {
- pod2usage(2);
-}
-
-
-## help()
-##
-## Prints help message.
-##
-sub help() {
- pod2usage(-verbose=>1, -message=>"$NAME $VERSION\n");
-}
-
-
-## signal_handler($sig)
-##
-## Handler for signals to clean up child processes
-##
-sub signal_handler($) {
- my ($sig) = @_;
- if ($sig eq 'ALRM') {
- printf STDERR "Timeout: aborting command ``%s'' with signal SIG%s\n", join(' ', @command), $signal;
- } else {
- printf STDERR "Got signal SIG%s: aborting command ``%s'' with signal SIG%s\n", $sig, join(' ', @command), $signal;
- }
- kill $signal, -$child_pid;
- exit -1;
-}
-
-
-##############################################################################
-
-## Main subroutine
-##
-
-
-## Parse command line arguments
-my $arg = $ARGV[0];
-if ($arg =~ /^-(.*)$/) {
- my $opt = $1;
- if ($arg eq '-h' || $arg eq '--help') {
- help();
- } elsif ($opt =~ /^[A-Z0-9]+$/) {
- if ($opt =~ /^\d+/) {
- #Convert numeric signal to name by using the perl interpreter's
- #configuration:
- usage() unless defined $Config{sig_name};
- $signal = (split(' ', $Config{sig_name}))[$opt];
- } else {
- $opt =~ s/^SIG//;
- $signal = $opt;
- }
- shift @ARGV;
- } else {
- usage();
- }
-}
-
-usage() if @ARGV < 2;
-
-$arg = $ARGV[0];
-
-usage() unless $arg =~ /^\d+$/;
-
-$time = $arg;
-
-shift @ARGV;
-
-@command = @ARGV;
-
-
-## Fork for exec
-if (! defined($child_pid = fork)) {
- die "Could not fork: $!\n";
- exit 1;
-} elsif ($child_pid == 0) {
- ## child
-
- ## Set new process group
- setsid;
-
- ## Execute command
- exec @command or die "Can not run command `" . join(' ', @command) . "': $!\n";
-}
-
-## parent
-
-## Set the handle for signals
-foreach my $sig (@signals) {
- $SIG{$sig} = \&signal_handler;
-}
-
-## Set the alarm
-alarm $time;
-
-## Wait for child
-while (($pid = wait) != -1 && $pid != $child_pid) {}
-
-## Clean exit
-exit ($pid == $child_pid ? $? >> 8 : -1);
-
-
-__END__
-
-=head1 DESCRIPTION
-
-B<timeout> executes a command and imposes an elapsed time limit.
-The command is run in a separate POSIX process group so that the
-right thing happens with commands that spawn child processes.
-
-=head1 OPTIONS
-
-=over 8
-
-=item -I<signal>
-
-Specify an optional signal name to send to the controlled process. By default,
-B<timeout> sends B<KILL>, which cannot be caught or ignored.
-
-=item I<time>
-
-The elapsed time limit after which the command is terminated.
-
-=item I<command>
-
-The command to be executed.
-
-=back
-
-=head1 RETURN CODES
-
-=over 8
-
-=item 0..253
-
-Return code from called command.
-
-=item 254
-
-Internal error. No return code could be fetched.
-
-=item 255
-
-The timeout was occured.
-
-=back
-
-=head1 AUTHOR
-
-(c) 2004 Piotr Roszatycki E<lt>dexter@debian.orgE<gt>
-
-Inspired by timeout.c that is part of The Coroner's Toolkit.
-
-All rights reserved. This program is free software; you can redistribute it
-and/or modify it under the terms of the GNU General Public License, the
-latest version.