update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
buildconfig is meant to be executed on the host, so it has to be compiled
|
||||
using $(HOSTCC), not $(CC).
|
||||
|
||||
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
|
||||
---
|
||||
OS/Makefile-Base | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/OS/Makefile-Base b/OS/Makefile-Base
|
||||
index 29a6ad3..420ba60 100644
|
||||
--- a/OS/Makefile-Base
|
||||
+++ b/OS/Makefile-Base
|
||||
@@ -114,8 +114,8 @@ allexim: config.h $(EXIM_MONITOR) exicyclog exinext exiwhat \
|
||||
|
||||
# Targets for special-purpose configuration header builders
|
||||
buildconfig: buildconfig.c
|
||||
- @echo "$(CC) buildconfig.c"
|
||||
- $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
|
||||
+ @echo "$(HOSTCC) buildconfig.c"
|
||||
+ $(FE)$(HOSTCC) $(HOSTCFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
|
||||
|
||||
|
||||
# Target for the exicyclog utility script
|
||||
@@ -0,0 +1,40 @@
|
||||
If exim had already been installed, the install script makes backup
|
||||
copies of the pre-existing executables with a ".0" suffix.
|
||||
|
||||
This leads to useless duplicated files on the target, so disable this
|
||||
piece of code.
|
||||
|
||||
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
|
||||
---
|
||||
scripts/exim_install | 18 +++++++++---------
|
||||
1 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/scripts/exim_install b/scripts/exim_install
|
||||
index 616ab3c..e68e7d5 100755
|
||||
--- a/scripts/exim_install
|
||||
+++ b/scripts/exim_install
|
||||
@@ -344,15 +344,15 @@ while [ $# -gt 0 ]; do
|
||||
|
||||
else
|
||||
if ../scripts/newer ${name} ${BIN_DIRECTORY}/${name}; then
|
||||
- if [ -f ${BIN_DIRECTORY}/${name} ]; then
|
||||
- echo ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O
|
||||
- ${real} ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O
|
||||
- if [ $? -ne 0 ]; then
|
||||
- echo $com ""
|
||||
- echo $com "*** Exim installation ${ver}failed ***"
|
||||
- exit 1
|
||||
- fi
|
||||
- fi
|
||||
+# if [ -f ${BIN_DIRECTORY}/${name} ]; then
|
||||
+# echo ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O
|
||||
+# ${real} ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O
|
||||
+# if [ $? -ne 0 ]; then
|
||||
+# echo $com ""
|
||||
+# echo $com "*** Exim installation ${ver}failed ***"
|
||||
+# exit 1
|
||||
+# fi
|
||||
+# fi
|
||||
echo ${CP} ${name} ${BIN_DIRECTORY}
|
||||
${real} ${CP} ${name} ${BIN_DIRECTORY}
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -0,0 +1,41 @@
|
||||
The exim install script installs a binary named exim-<version>, plus a symlink
|
||||
to it named exim.
|
||||
In order to achieve this "feature" (of dubious usefulness) it runs the
|
||||
executable (on the host) and then filters its output to grab the version number.
|
||||
This clearly cannot work if the executable is cross-compiled, so get rid of all
|
||||
of it and just install an executable file called exim.
|
||||
|
||||
Inspired by:
|
||||
http://patch-tracker.debian.org/patch/series/view/exim4/4.76-2/35_install.dpatch
|
||||
|
||||
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
|
||||
(rebased against exim 4.89)
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
scripts/exim_install | 7 +++++--
|
||||
1 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/exim_install b/scripts/exim_install
|
||||
index e68e7d5..487a4e1 100755
|
||||
--- a/scripts/exim_install
|
||||
+++ b/scripts/exim_install
|
||||
@@ -58,6 +58,8 @@
|
||||
shift
|
||||
done
|
||||
|
||||
+do_symlink=no
|
||||
+
|
||||
# Get the values of BIN_DIRECTORY, CONFIGURE_FILE, INFO_DIRECTORY, NO_SYMLINK,
|
||||
# SYSTEM_ALIASES_FILE, and EXE from the global Makefile (in the build
|
||||
# directory). EXE is empty except in the Cygwin environment. In each case, keep
|
||||
@@ -217,9 +219,7 @@
|
||||
# The exim binary is handled specially
|
||||
|
||||
if [ $name = exim${EXE} ]; then
|
||||
- exim="./exim -bV -C /dev/null"
|
||||
- version=exim-`$exim 2>/dev/null | \
|
||||
- awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
|
||||
+ version=exim
|
||||
|
||||
if [ "${version}" = "exim-${EXE}" ]; then
|
||||
echo $com ""
|
||||
27
bsp/buildroot-2017.02.11/package/exim/0004-glibc.patch
Normal file
27
bsp/buildroot-2017.02.11/package/exim/0004-glibc.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
uClibc does not contain gnu/libc-version.h
|
||||
|
||||
Patch sent upstream: https://bugs.exim.org/show_bug.cgi?id=2070
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
diff -uNr exim-4.88.org/src/exim.c exim-4.88/src/exim.c
|
||||
--- exim-4.88.org/src/exim.c 2016-12-18 15:02:28.000000000 +0100
|
||||
+++ exim-4.88/src/exim.c 2016-12-26 12:12:57.000000000 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "exim.h"
|
||||
|
||||
-#ifdef __GLIBC__
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
# include <gnu/libc-version.h>
|
||||
#endif
|
||||
|
||||
@@ -1044,7 +1044,7 @@
|
||||
fprintf(f, "Compiler: <unknown>\n");
|
||||
#endif
|
||||
|
||||
-#ifdef __GLIBC__
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
fprintf(f, "Library version: Glibc: Compile: %d.%d\n",
|
||||
__GLIBC__, __GLIBC_MINOR__);
|
||||
if (__GLIBC_PREREQ(2, 1))
|
||||
@@ -0,0 +1,37 @@
|
||||
From 062990cc1b2f9e5d82a413b53c8f0569075de700 Mon Sep 17 00:00:00 2001
|
||||
From: "Heiko Schlittermann (HS12-RIPE)" <hs@schlittermann.de>
|
||||
Date: Mon, 5 Feb 2018 22:23:32 +0100
|
||||
Subject: [PATCH] Fix base64d() buffer size (CVE-2018-6789)
|
||||
|
||||
Credits for discovering this bug: Meh Chang <meh@devco.re>
|
||||
|
||||
[Peter: Drop ChangeLog change, fix path]
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
src/base64.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/base64.c b/src/base64.c
|
||||
index f6f187f0..e58ca6c7 100644
|
||||
--- a/src/base64.c
|
||||
+++ b/src/base64.c
|
||||
@@ -152,10 +152,14 @@ static uschar dec64table[] = {
|
||||
int
|
||||
b64decode(const uschar *code, uschar **ptr)
|
||||
{
|
||||
+
|
||||
int x, y;
|
||||
-uschar *result = store_get(3*(Ustrlen(code)/4) + 1);
|
||||
+uschar *result;
|
||||
|
||||
-*ptr = result;
|
||||
+{
|
||||
+ int l = Ustrlen(code);
|
||||
+ *ptr = result = store_get(1 + l/4 * 3 + l%4);
|
||||
+}
|
||||
|
||||
/* Each cycle of the loop handles a quantum of 4 input bytes. For the last
|
||||
quantum this may decode to 1, 2, or 3 output bytes. */
|
||||
--
|
||||
2.11.0
|
||||
|
||||
35
bsp/buildroot-2017.02.11/package/exim/Config.in
Normal file
35
bsp/buildroot-2017.02.11/package/exim/Config.in
Normal file
@@ -0,0 +1,35 @@
|
||||
comment "exim needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
config BR2_PACKAGE_EXIM
|
||||
bool "exim"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_PCRE
|
||||
select BR2_PACKAGE_BERKELEYDB
|
||||
help
|
||||
Exim is a message transfer agent (MTA) developed at the University of
|
||||
Cambridge for use on Unix systems connected to the Internet.
|
||||
|
||||
http://www.exim.org/
|
||||
|
||||
if BR2_PACKAGE_EXIM
|
||||
|
||||
config BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE
|
||||
string "Custom configuration file"
|
||||
help
|
||||
By default, when this option is left empty, Buildroot
|
||||
generates a configuration file for exim with reasonable
|
||||
settings.
|
||||
|
||||
If you want to override the configuration file generated by
|
||||
Buildroot with a customized file, set here the path to your
|
||||
configuration file with this option.
|
||||
|
||||
This file shall comply with the syntax defined in the exim
|
||||
documentation (http://www.exim.org/docs.html).
|
||||
Buildroot will generate a configuration file composed of the
|
||||
content of the file you provide plus the toolchain-related
|
||||
settings needed for cross-compilation.
|
||||
|
||||
endif
|
||||
15
bsp/buildroot-2017.02.11/package/exim/Local-Makefile
Normal file
15
bsp/buildroot-2017.02.11/package/exim/Local-Makefile
Normal file
@@ -0,0 +1,15 @@
|
||||
BIN_DIRECTORY=/usr/sbin
|
||||
CONFIGURE_FILE=/etc/exim/configure
|
||||
EXIM_USER=ref:exim
|
||||
EXIM_GROUP=mail
|
||||
SPOOL_DIRECTORY=/var/spool/exim
|
||||
ROUTER_ACCEPT=yes
|
||||
TRANSPORT_LMTP=yes
|
||||
LOOKUP_DBM=yes
|
||||
LOOKUP_LSEARCH=yes
|
||||
PCRE_LIBS=-lpcre
|
||||
FIXED_NEVER_USERS=root
|
||||
HEADERS_CHARSET="ISO-8859-1"
|
||||
HAVE_ICONV=no
|
||||
SYSLOG_LOG_PID=yes
|
||||
TMPDIR="/tmp"
|
||||
26
bsp/buildroot-2017.02.11/package/exim/S86exim
Normal file
26
bsp/buildroot-2017.02.11/package/exim/S86exim
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start/stop exim
|
||||
#
|
||||
|
||||
PIDFILE=/var/lock/exim/exim-daemon.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting exim..."
|
||||
start-stop-daemon -S -x exim -- -bd
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping exim..."
|
||||
start-stop-daemon -K -o -p $PIDFILE
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
2
bsp/buildroot-2017.02.11/package/exim/exim.hash
Normal file
2
bsp/buildroot-2017.02.11/package/exim/exim.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 1a21322a10e2da9c0bd6a2a483b6e7ef8fa7f16efcab4c450fd73e7188f5fa94 exim-4.89.1.tar.xz
|
||||
154
bsp/buildroot-2017.02.11/package/exim/exim.mk
Normal file
154
bsp/buildroot-2017.02.11/package/exim/exim.mk
Normal file
@@ -0,0 +1,154 @@
|
||||
################################################################################
|
||||
#
|
||||
# exim
|
||||
#
|
||||
################################################################################
|
||||
|
||||
EXIM_VERSION = 4.89.1
|
||||
EXIM_SOURCE = exim-$(EXIM_VERSION).tar.xz
|
||||
EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4
|
||||
EXIM_LICENSE = GPLv2+
|
||||
EXIM_LICENSE_FILES = LICENCE
|
||||
EXIM_DEPENDENCIES = pcre berkeleydb host-pkgconf
|
||||
|
||||
# Modify a variable value. It must already exist in the file, either
|
||||
# commented or not.
|
||||
define exim-config-change # variable-name, variable-value
|
||||
$(SED) 's,^[#[:space:]]*$1[[:space:]]*=.*$$,$1=$2,' \
|
||||
$(@D)/Local/Makefile
|
||||
endef
|
||||
|
||||
# Comment-out a variable. Has no effect if it does not exits.
|
||||
define exim-config-unset # variable-name
|
||||
$(SED) 's,^\([[:space:]]*$1[[:space:]]*=.*$$\),# \1,' \
|
||||
$(@D)/Local/Makefile
|
||||
endef
|
||||
|
||||
# Add a variable definition. It must not already exist in the file,
|
||||
# otherwise it would be defined twice with potentially different values.
|
||||
define exim-config-add # variable-name, variable-value
|
||||
echo "$1=$2" >>$(@D)/Local/Makefile
|
||||
endef
|
||||
|
||||
define EXIM_USE_CUSTOM_CONFIG_FILE
|
||||
$(INSTALL) -m 0644 $(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE) \
|
||||
$(@D)/Local/Makefile
|
||||
endef
|
||||
|
||||
define EXIM_USE_DEFAULT_CONFIG_FILE
|
||||
$(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile
|
||||
$(call exim-config-change,BIN_DIRECTORY,/usr/sbin)
|
||||
$(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure)
|
||||
$(call exim-config-change,EXIM_USER,ref:exim)
|
||||
$(call exim-config-change,EXIM_GROUP,mail)
|
||||
$(call exim-config-change,TRANSPORT_LMTP,yes)
|
||||
$(call exim-config-change,PCRE_LIBS,-lpcre)
|
||||
$(call exim-config-change,PCRE_CONFIG,no)
|
||||
$(call exim-config-change,HAVE_ICONV,no)
|
||||
$(call exim-config-unset,EXIM_MONITOR)
|
||||
$(call exim-config-change,AUTH_PLAINTEXT,yes)
|
||||
$(call exim-config-change,AUTH_CRAM_MD5,yes)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DOVECOT),y)
|
||||
EXIM_DEPENDENCIES += dovecot
|
||||
define EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT
|
||||
$(call exim-config-change,AUTH_DOVECOT,yes)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CLAMAV),y)
|
||||
EXIM_DEPENDENCIES += clamav
|
||||
define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV
|
||||
$(call exim-config-change,WITH_CONTENT_SCAN,yes)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
EXIM_DEPENDENCIES += openssl
|
||||
define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL
|
||||
$(call exim-config-change,SUPPORT_TLS,yes)
|
||||
$(call exim-config-change,USE_OPENSSL_PC,openssl)
|
||||
endef
|
||||
endif
|
||||
|
||||
# only glibc provides libnsl, remove -lnsl for all other toolchains
|
||||
# http://bugs.exim.org/show_bug.cgi?id=1564
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
|
||||
define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE
|
||||
$(SED) 's/-lnsl//g' $(@D)/OS/Makefile-Linux
|
||||
endef
|
||||
endif
|
||||
|
||||
# musl does not provide struct ip_options nor struct ip_opts (but it is
|
||||
# available with both glibc and uClibc)
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
||||
define EXIM_FIX_IP_OPTIONS_FOR_MUSL
|
||||
$(SED) 's/#define GLIBC_IP_OPTIONS/#define DARWIN_IP_OPTIONS/' \
|
||||
$(@D)/OS/os.h-Linux
|
||||
endef
|
||||
endif
|
||||
|
||||
define EXIM_CONFIGURE_TOOLCHAIN
|
||||
$(call exim-config-add,CC,$(TARGET_CC))
|
||||
$(call exim-config-add,CFLAGS,$(TARGET_CFLAGS))
|
||||
$(call exim-config-add,AR,$(TARGET_AR) cq)
|
||||
$(call exim-config-add,RANLIB,$(TARGET_RANLIB))
|
||||
$(call exim-config-add,HOSTCC,$(HOSTCC))
|
||||
$(call exim-config-add,HOSTCFLAGS,$(HOSTCFLAGS))
|
||||
$(EXIM_REMOVE_LIBNSL_FROM_MAKEFILE)
|
||||
$(EXIM_FIX_IP_OPTIONS_FOR_MUSL)
|
||||
endef
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE)),)
|
||||
define EXIM_CONFIGURE_CMDS
|
||||
$(EXIM_USE_CUSTOM_CONFIG_FILE)
|
||||
$(EXIM_CONFIGURE_TOOLCHAIN)
|
||||
endef
|
||||
else # CUSTOM_CONFIG
|
||||
define EXIM_CONFIGURE_CMDS
|
||||
$(EXIM_USE_DEFAULT_CONFIG_FILE)
|
||||
$(EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT)
|
||||
$(EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV)
|
||||
$(EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL)
|
||||
$(EXIM_CONFIGURE_TOOLCHAIN)
|
||||
endef
|
||||
endif # CUSTOM_CONFIG
|
||||
|
||||
# exim needs a bit of love to build statically
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
EXIM_STATIC_FLAGS = LFLAGS="-pthread --static"
|
||||
endif
|
||||
|
||||
# "The -j (parallel) flag must not be used with make"
|
||||
# (http://www.exim.org/exim-html-current/doc/html/spec_html/ch04.html)
|
||||
define EXIM_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS)
|
||||
endef
|
||||
|
||||
# Need to replicate the LFLAGS in install, as exim still wants to build
|
||||
# something when installing...
|
||||
define EXIM_INSTALL_TARGET_CMDS
|
||||
DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \
|
||||
$(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) install
|
||||
chmod u+s $(TARGET_DIR)/usr/sbin/exim
|
||||
endef
|
||||
|
||||
define EXIM_USERS
|
||||
exim 88 mail 8 * - - - exim
|
||||
endef
|
||||
|
||||
define EXIM_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/exim/S86exim \
|
||||
$(TARGET_DIR)/etc/init.d/S86exim
|
||||
endef
|
||||
|
||||
define EXIM_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/exim/exim.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/exim.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/exim.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/exim.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
10
bsp/buildroot-2017.02.11/package/exim/exim.service
Normal file
10
bsp/buildroot-2017.02.11/package/exim/exim.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Exim MTA
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/exim -bdf
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user