All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Adding exim
@ 2014-03-06 16:54 Luca Ceresoli
  2014-03-06 16:54 ` [Buildroot] [PATCH 1/2] system/skeleton: add mail group Luca Ceresoli
  2014-03-06 16:54 ` [Buildroot] [PATCH 2/2] exim: new package Luca Ceresoli
  0 siblings, 2 replies; 18+ messages in thread
From: Luca Ceresoli @ 2014-03-06 16:54 UTC (permalink / raw)
  To: buildroot

Hi all,

I'm resuming a patchset from 2011 [0], that was never merged, since Bernd
Kuhls recently expressed interest a part of it [1].

The original patchset goal was to add cyrus-imapd, cyrus-sasl and exim to
Buildroot, along with their dependencies. That required a lot of patching
because none of these packages are cross-compilation-friendly. The quality
of my original patches was not very good, but there was apparently not much
interest in them, and eventually I quite forgot about them.

The mentioned software are still up and running in my local buildroot-based
projects, and they have been kept up-to-date.

I am now resending only the exim-related patches, updated and with references
to cyrus packages removed, because that's what Bernd expressed interest for.
This makes exim not usable out of the box, because in my original patches it
shipped a config file tailored for cyrus-imapd.

However note an MTA is usually configured to deliver mail to a specific mail
server, so in order to exploit exim it is necessary to add such a package.
Bernd wrote he's working on dovecot, so he may add an exim config for it.
Or I may resurrect and cleanup my cyrus-imapd patches and send them again
after exim is in Buildroot.
Or both.

For the time being, here's my current best effort for bringing exim into
Buildroot.

Changes since the 2011 patchset:
 - use the exim user, not the cyrus user (makes no sense without cyrus-imapd);
 - do not ship a cyrus-centric configuration file;
 - bump to 4.82 (latest upstream release).

[0] http://lists.busybox.net/pipermail/buildroot/2011-August/045128.html
[1] http://lists.busybox.net/pipermail/buildroot/2014-March/091094.html

Luca

Luca Ceresoli (2):
  system/skeleton: add mail group
  exim: new package

 package/Config.in                                  |  1 +
 package/exim/Config.in                             |  9 +++++
 package/exim/Local-Makefile                        | 15 ++++++++
 package/exim/S86exim                               | 26 ++++++++++++++
 .../exim/exim-Build-buildconfig-for-the-host.patch | 23 ++++++++++++
 ...n-t-make-backup-copies-of-installed-files.patch | 40 +++++++++++++++++++++
 ...ip-version-check-and-symlink-installation.patch | 40 +++++++++++++++++++++
 package/exim/exim.mk                               | 41 ++++++++++++++++++++++
 system/skeleton/etc/group                          |  1 +
 9 files changed, 196 insertions(+)
 create mode 100644 package/exim/Config.in
 create mode 100644 package/exim/Local-Makefile
 create mode 100644 package/exim/S86exim
 create mode 100644 package/exim/exim-Build-buildconfig-for-the-host.patch
 create mode 100644 package/exim/exim-Don-t-make-backup-copies-of-installed-files.patch
 create mode 100644 package/exim/exim-Skip-version-check-and-symlink-installation.patch
 create mode 100644 package/exim/exim.mk

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-06 16:54 [Buildroot] [PATCH 0/2] Adding exim Luca Ceresoli
@ 2014-03-06 16:54 ` Luca Ceresoli
  2014-03-06 17:13   ` Yann E. MORIN
  2014-04-05 16:32   ` Thomas Petazzoni
  2014-03-06 16:54 ` [Buildroot] [PATCH 2/2] exim: new package Luca Ceresoli
  1 sibling, 2 replies; 18+ messages in thread
From: Luca Ceresoli @ 2014-03-06 16:54 UTC (permalink / raw)
  To: buildroot

---
 system/skeleton/etc/group | 1 +
 1 file changed, 1 insertion(+)

diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group
index 864d1db..85a1fa2 100644
--- a/system/skeleton/etc/group
+++ b/system/skeleton/etc/group
@@ -6,6 +6,7 @@ adm:x:4:
 tty:x:5:
 disk:x:6:
 lp:x:7:
+mail:x:8:
 kmem:x:9:
 wheel:x:10:root
 cdrom:x:11:
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-03-06 16:54 [Buildroot] [PATCH 0/2] Adding exim Luca Ceresoli
  2014-03-06 16:54 ` [Buildroot] [PATCH 1/2] system/skeleton: add mail group Luca Ceresoli
@ 2014-03-06 16:54 ` Luca Ceresoli
  2014-03-06 17:38   ` Bernd Kuhls
  2014-04-05 16:35   ` Thomas Petazzoni
  1 sibling, 2 replies; 18+ messages in thread
From: Luca Ceresoli @ 2014-03-06 16:54 UTC (permalink / raw)
  To: buildroot

---
 package/Config.in                                  |  1 +
 package/exim/Config.in                             |  9 +++++
 package/exim/Local-Makefile                        | 15 ++++++++
 package/exim/S86exim                               | 26 ++++++++++++++
 .../exim/exim-Build-buildconfig-for-the-host.patch | 23 ++++++++++++
 ...n-t-make-backup-copies-of-installed-files.patch | 40 +++++++++++++++++++++
 ...ip-version-check-and-symlink-installation.patch | 40 +++++++++++++++++++++
 package/exim/exim.mk                               | 41 ++++++++++++++++++++++
 8 files changed, 195 insertions(+)
 create mode 100644 package/exim/Config.in
 create mode 100644 package/exim/Local-Makefile
 create mode 100644 package/exim/S86exim
 create mode 100644 package/exim/exim-Build-buildconfig-for-the-host.patch
 create mode 100644 package/exim/exim-Don-t-make-backup-copies-of-installed-files.patch
 create mode 100644 package/exim/exim-Skip-version-check-and-symlink-installation.patch
 create mode 100644 package/exim/exim.mk

diff --git a/package/Config.in b/package/Config.in
index fca61d6..9650bc5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -834,6 +834,7 @@ source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
 source "package/ebtables/Config.in"
 source "package/ethtool/Config.in"
+source "package/exim/Config.in"
 source "package/foomatic-filters/Config.in"
 source "package/fping/Config.in"
 source "package/gesftpserver/Config.in"
diff --git a/package/exim/Config.in b/package/exim/Config.in
new file mode 100644
index 0000000..70038a2
--- /dev/null
+++ b/package/exim/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_EXIM
+	bool "exim"
+	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/
diff --git a/package/exim/Local-Makefile b/package/exim/Local-Makefile
new file mode 100644
index 0000000..191f0e0
--- /dev/null
+++ b/package/exim/Local-Makefile
@@ -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"
diff --git a/package/exim/S86exim b/package/exim/S86exim
new file mode 100644
index 0000000..8c01b29
--- /dev/null
+++ b/package/exim/S86exim
@@ -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)
+	echo -n "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 $?
diff --git a/package/exim/exim-Build-buildconfig-for-the-host.patch b/package/exim/exim-Build-buildconfig-for-the-host.patch
new file mode 100644
index 0000000..a926fbd
--- /dev/null
+++ b/package/exim/exim-Build-buildconfig-for-the-host.patch
@@ -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
diff --git a/package/exim/exim-Don-t-make-backup-copies-of-installed-files.patch b/package/exim/exim-Don-t-make-backup-copies-of-installed-files.patch
new file mode 100644
index 0000000..0cdaa74
--- /dev/null
+++ b/package/exim/exim-Don-t-make-backup-copies-of-installed-files.patch
@@ -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
diff --git a/package/exim/exim-Skip-version-check-and-symlink-installation.patch b/package/exim/exim-Skip-version-check-and-symlink-installation.patch
new file mode 100644
index 0000000..94d21ae
--- /dev/null
+++ b/package/exim/exim-Skip-version-check-and-symlink-installation.patch
@@ -0,0 +1,40 @@
+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>
+---
+ 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
+@@ -59,6 +59,8 @@ while [ $# -gt 0 ] ; do
+   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
+@@ -218,8 +220,9 @@ while [ $# -gt 0 ]; do
+   # The exim binary is handled specially
+ 
+   if [ $name = exim${EXE} ]; then
+-    version=exim-`./exim -bV -C /dev/null | \
+-      awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
++    version=exim
++#    version=exim-`./exim -bV -C /dev/null | \
++#      awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
+ 
+     if [ "${version}" = "exim-${EXE}" ]; then
+       echo $com ""
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
new file mode 100644
index 0000000..011d0a4
--- /dev/null
+++ b/package/exim/exim.mk
@@ -0,0 +1,41 @@
+#############################################################
+#
+# exim
+#
+#############################################################
+
+EXIM_VERSION = 4.82
+EXIM_SOURCE = exim-$(EXIM_VERSION).tar.bz2
+EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4
+EXIM_LICENSE = GPLv2+
+EXIM_LICENSE_FILES = LICENCE
+EXIM_DEPENDENCIES = pcre berkeleydb
+
+# These echos seem to be the sanest way to feed CC and CFLAGS to exim
+define EXIM_CONFIGURE_CMDS
+	install -D package/exim/Local-Makefile $(@D)/Local/Makefile
+	echo "CC=$(TARGET_CC)" >>$(@D)/Local/Makefile
+	echo "CFLAGS=$(TARGET_CFLAGS)" >>$(@D)/Local/Makefile
+	echo "HOSTCC=$(HOSTCC)" >>$(@D)/Local/Makefile
+	echo "HOSTCFLAGS=$(HOSTCFLAGS)" >>$(@D)/Local/Makefile
+endef
+
+# "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
+	build=br $(MAKE1) -C $(@D)
+endef
+
+define EXIM_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 package/exim/S86exim \
+		$(TARGET_DIR)/etc/init.d/S86exim
+	DESTDIR=${TARGET_DIR} INSTALL_ARG="-no_chown -no_symlink" build=br \
+	  $(MAKE1) -C $(@D) install
+	chmod u+s ${TARGET_DIR}/usr/sbin/exim
+endef
+
+define EXIM_USERS
+exim 88 mail 8 * - - - exim
+endef
+
+$(eval $(generic-package))
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-06 16:54 ` [Buildroot] [PATCH 1/2] system/skeleton: add mail group Luca Ceresoli
@ 2014-03-06 17:13   ` Yann E. MORIN
  2014-03-07 15:04     ` Luca Ceresoli
  2014-04-05 16:32   ` Thomas Petazzoni
  1 sibling, 1 reply; 18+ messages in thread
From: Yann E. MORIN @ 2014-03-06 17:13 UTC (permalink / raw)
  To: buildroot

Luca, All,

On 2014-03-06 17:54 +0100, Luca Ceresoli spake thusly:
> ---
>  system/skeleton/etc/group | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group
> index 864d1db..85a1fa2 100644
> --- a/system/skeleton/etc/group
> +++ b/system/skeleton/etc/group
> @@ -6,6 +6,7 @@ adm:x:4:
>  tty:x:5:
>  disk:x:6:
>  lp:x:7:
> +mail:x:8:
>  kmem:x:9:
>  wheel:x:10:root
>  cdrom:x:11:

There is no reason to add the 'mail' group to the default skeleton. If
it is missing, 'mkuser' is expected to create it (if not, that's a bug.)

So the EXIM_USER in your second patch should be enough.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-03-06 16:54 ` [Buildroot] [PATCH 2/2] exim: new package Luca Ceresoli
@ 2014-03-06 17:38   ` Bernd Kuhls
  2014-03-07 14:53     ` Luca Ceresoli
  2014-04-05 16:35   ` Thomas Petazzoni
  1 sibling, 1 reply; 18+ messages in thread
From: Bernd Kuhls @ 2014-03-06 17:38 UTC (permalink / raw)
  To: buildroot

Hi,

Luca Ceresoli <luca@lucaceresoli.net> wrote in
news:1394124890-29254-3-git-send-email-luca at lucaceresoli.net: 

> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -834,6 +834,7 @@ source "package/dnsmasq/Config.in"
>  source "package/dropbear/Config.in"
>  source "package/ebtables/Config.in"
>  source "package/ethtool/Config.in"
> +source "package/exim/Config.in"

what about creating a new section "Mail applications"?

> --- /dev/null
> +++ b/package/exim/Local-Makefile
> @@ -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"

Here I use a different approach using sed inside exim.mk:

( sed -e 's,^BIN_DIR.*$$,BIN_DIRECTORY=/usr/bin,' \
      -e 's,^CONF.*$$,CONFIGURE_FILE=/etc/exim.conf,' \
      -e 's,^# INCLUDE.*$$,INCLUDE=-I$(TARGET_DIR)/usr/include,' \
      -e 's,^PCRE_CONFIG.*$$,# PCRE_CONFIG=no,' \
      -e 's,^# PCRE_LIBS.*$$,PCRE_LIBS=-lpcre,' \
      -e 's,^# HAVE_ICONV.*$$,HAVE_ICONV=yes,' \
      -e 's,^# AUTH_CRAM_MD5=.*$$,AUTH_CRAM_MD5=yes,' \
      -e 's,^# AUTH_DOVECOT=.*$$,AUTH_DOVECOT=yes,' \
      -e 's,^# AUTH_PLAINTEXT=.*$$,AUTH_PLAINTEXT=yes,' \
      -e 's,^# LOOKUP_PASSWD=.*$$,LOOKUP_PASSWD=yes,' \
      -e 's,^# WITH_CONTENT_SCAN=.*$$,WITH_CONTENT_SCAN=yes,' \
      -e 's,^# SUPPORT_TLS=.*$$,SUPPORT_TLS=yes,' \
      -e 's,^# TLS_LIBS=.*$$,TLS_LIBS=-lssl -lcrypto,' \
      -e 's,^# PID_FILE_PATH=.*$$,PID_FILE_PATH=/var/run/exim.pid,' \
      -e 's,^COMPRESS_COMMAND=.*$$,COMPRESS_COMMAND=/bin/gzip,' \
      -e 's,^ZCAT_COMMAND=.*$$,ZCAT_COMMAND=/bin/zcat,' \
      -e 's,^EXIM_USER.*$$,EXIM_USER=ref:exim,' \
      -e 's,^EXIM_MONITOR,#EXIM_MONITOR,' $(@D)/src/EDITME > 
$(@D)/Local/Makefile \
        ); \

This should imho be extended to options in Config.in for different mail 
environments, similar to the Debian packages exim4-daemon-heavy & exim4-
daemon-light.

I have to add that buildroot does not create a rootfs here, it delivers 
binaries for my personal mailserver package which is used in another distro 
with its own init system, therefore I can not review your init script.

Regards, Bernd

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-03-06 17:38   ` Bernd Kuhls
@ 2014-03-07 14:53     ` Luca Ceresoli
  2014-03-07 20:52       ` Bernd Kuhls
  0 siblings, 1 reply; 18+ messages in thread
From: Luca Ceresoli @ 2014-03-07 14:53 UTC (permalink / raw)
  To: buildroot

Hi Bernd,

please do reply to all, not only to the mailing list. Some people
(including me) check their personal e-mail more frequently than mailing
lists.

Bernd Kuhls wrote:
> Hi,
>
> Luca Ceresoli <luca@lucaceresoli.net> wrote in
> news:1394124890-29254-3-git-send-email-luca at lucaceresoli.net:
>
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -834,6 +834,7 @@ source "package/dnsmasq/Config.in"
>>   source "package/dropbear/Config.in"
>>   source "package/ebtables/Config.in"
>>   source "package/ethtool/Config.in"
>> +source "package/exim/Config.in"
>
> what about creating a new section "Mail applications"?

I don't think we have a large enough number of mail-related packages in
Buildroot to justify such a section. But I may be wrong.

>
>> --- /dev/null
>> +++ b/package/exim/Local-Makefile
>> @@ -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"
>
> Here I use a different approach using sed inside exim.mk:
>
> ( sed -e 's,^BIN_DIR.*$$,BIN_DIRECTORY=/usr/bin,' \
>        -e 's,^CONF.*$$,CONFIGURE_FILE=/etc/exim.conf,' \
>        -e 's,^# INCLUDE.*$$,INCLUDE=-I$(TARGET_DIR)/usr/include,' \
>        -e 's,^PCRE_CONFIG.*$$,# PCRE_CONFIG=no,' \
>        -e 's,^# PCRE_LIBS.*$$,PCRE_LIBS=-lpcre,' \
>        -e 's,^# HAVE_ICONV.*$$,HAVE_ICONV=yes,' \
>        -e 's,^# AUTH_CRAM_MD5=.*$$,AUTH_CRAM_MD5=yes,' \
>        -e 's,^# AUTH_DOVECOT=.*$$,AUTH_DOVECOT=yes,' \
>        -e 's,^# AUTH_PLAINTEXT=.*$$,AUTH_PLAINTEXT=yes,' \
>        -e 's,^# LOOKUP_PASSWD=.*$$,LOOKUP_PASSWD=yes,' \
>        -e 's,^# WITH_CONTENT_SCAN=.*$$,WITH_CONTENT_SCAN=yes,' \
>        -e 's,^# SUPPORT_TLS=.*$$,SUPPORT_TLS=yes,' \
>        -e 's,^# TLS_LIBS=.*$$,TLS_LIBS=-lssl -lcrypto,' \
>        -e 's,^# PID_FILE_PATH=.*$$,PID_FILE_PATH=/var/run/exim.pid,' \
>        -e 's,^COMPRESS_COMMAND=.*$$,COMPRESS_COMMAND=/bin/gzip,' \
>        -e 's,^ZCAT_COMMAND=.*$$,ZCAT_COMMAND=/bin/zcat,' \
>        -e 's,^EXIM_USER.*$$,EXIM_USER=ref:exim,' \
>        -e 's,^EXIM_MONITOR,#EXIM_MONITOR,' $(@D)/src/EDITME >
> $(@D)/Local/Makefile \
>          ); \

At first sight it looks cleaner, but it should be made more robust IMHO.
Suppose in a future release the exim developers decide to uncomment a
variable that is now commented, or vice versa, or to use two spaces
between "#" and the variable name. Then your sed filters would silently
stop working.

Also, the line:
 >        -e 's,^CONF.*$$,CONFIGURE_FILE=/etc/exim.conf,' \
could catch future variables stasting with CONF.

OTOH my approach is a bot rude, but you know what file you'll generate,
which I find more reliable.

>
> This should imho be extended to options in Config.in for different mail
> environments, similar to the Debian packages exim4-daemon-heavy & exim4-
> daemon-light.

Definitely. I see we use different values for some variables.

-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-06 17:13   ` Yann E. MORIN
@ 2014-03-07 15:04     ` Luca Ceresoli
  2014-03-29 16:21       ` Yann E. MORIN
  0 siblings, 1 reply; 18+ messages in thread
From: Luca Ceresoli @ 2014-03-07 15:04 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Yann E. MORIN wrote:
> Luca, All,
>
> On 2014-03-06 17:54 +0100, Luca Ceresoli spake thusly:
>> ---
>>   system/skeleton/etc/group | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group
>> index 864d1db..85a1fa2 100644
>> --- a/system/skeleton/etc/group
>> +++ b/system/skeleton/etc/group
>> @@ -6,6 +6,7 @@ adm:x:4:
>>   tty:x:5:
>>   disk:x:6:
>>   lp:x:7:
>> +mail:x:8:
>>   kmem:x:9:
>>   wheel:x:10:root
>>   cdrom:x:11:
>
> There is no reason to add the 'mail' group to the default skeleton. If
> it is missing, 'mkuser' is expected to create it (if not, that's a bug.)
>
> So the EXIM_USER in your second patch should be enough.

Technically speaking you're perfectly right.

I just felt the mail group is one of those groups that are supposed to
be used by multiple packages. At least an MTA and a mail server, maybe
a spam filter, a virus scanner... and we might have multiple
alternatives for each of them.

So it looks bad to me to refer to the same group in (potentially) many
packages and not having the group well-defined in "the" group list.

Of course this is my POV, and it's not very strong now that we have such
a small number of mail-related packages in Buildroot...

Oh, following my idea I could as well change:

  define EXIM_USERS
-exim 88 mail 8 * - - - exim
+exim 88 mail -1 * - - - exim
  endef

and your script would get the group ID, right?

-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-03-07 14:53     ` Luca Ceresoli
@ 2014-03-07 20:52       ` Bernd Kuhls
  0 siblings, 0 replies; 18+ messages in thread
From: Bernd Kuhls @ 2014-03-07 20:52 UTC (permalink / raw)
  To: buildroot

[posted and mailed]

Hi,

Luca Ceresoli <luca@lucaceresoli.net> wrote in
news:5319DD64.9000701 at lucaceresoli.net: 

> Bernd Kuhls wrote:
>> Hi,
>>
>> Luca Ceresoli <luca@lucaceresoli.net> wrote in
>> news:1394124890-29254-3-git-send-email-luca-ep08DiM7hqZH3+C6az13tg at publi
>> c.gmane.org: 
>>
>>> --- a/package/Config.in
>>> +++ b/package/Config.in
>>> @@ -834,6 +834,7 @@ source "package/dnsmasq/Config.in"
>>>   source "package/dropbear/Config.in"
>>>   source "package/ebtables/Config.in"
>>>   source "package/ethtool/Config.in"
>>> +source "package/exim/Config.in"
>>
>> what about creating a new section "Mail applications"?
> 
> I don't think we have a large enough number of mail-related packages in
> Buildroot to justify such a section. But I may be wrong.

I am planning to add the following packages to buildroot in addition to 
exim:

- fetchmail
- dovecot
- dovecot-pigeonhole

Currently the following mail-related packages are included in buildroot, 
both in "Networking applications", and could be moved to the new section:
- libesmtp
- msmtp

This makes 6 packages in total. I do not know how many packages are needed 
to justify a new section, therefore I am asking before sending patches ;)

Regards, Bernd

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-07 15:04     ` Luca Ceresoli
@ 2014-03-29 16:21       ` Yann E. MORIN
  2014-03-29 16:56         ` Sagaert Johan
  0 siblings, 1 reply; 18+ messages in thread
From: Yann E. MORIN @ 2014-03-29 16:21 UTC (permalink / raw)
  To: buildroot

Luca, All,

On 2014-03-07 16:04 +0100, Luca Ceresoli spake thusly:
> Yann E. MORIN wrote:
> >On 2014-03-06 17:54 +0100, Luca Ceresoli spake thusly:
> >>---
> >>  system/skeleton/etc/group | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >>diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group
> >>index 864d1db..85a1fa2 100644
> >>--- a/system/skeleton/etc/group
> >>+++ b/system/skeleton/etc/group
> >>@@ -6,6 +6,7 @@ adm:x:4:
> >>  tty:x:5:
> >>  disk:x:6:
> >>  lp:x:7:
> >>+mail:x:8:
> >>  kmem:x:9:
> >>  wheel:x:10:root
> >>  cdrom:x:11:
> >
> >There is no reason to add the 'mail' group to the default skeleton. If
> >it is missing, 'mkuser' is expected to create it (if not, that's a bug.)
> >
> >So the EXIM_USER in your second patch should be enough.
> 
> Technically speaking you're perfectly right.
> 
> I just felt the mail group is one of those groups that are supposed to
> be used by multiple packages. At least an MTA and a mail server, maybe
> a spam filter, a virus scanner... and we might have multiple
> alternatives for each of them.
> 
> So it looks bad to me to refer to the same group in (potentially) many
> packages and not having the group well-defined in "the" group list.
> 
> Of course this is my POV, and it's not very strong now that we have such
> a small number of mail-related packages in Buildroot...

'mail' is not a strictly-required group, so I think it does not really
belong to the skeleton, especially since most systems Buildroot is aimed
at won't have an MDA. OTOH, it is a pretty prevalent group in Unix
systems.

So I don't mind much about adding the 'mail' group.

> Oh, following my idea I could as well change:
> 
>  define EXIM_USERS
> -exim 88 mail 8 * - - - exim
> +exim 88 mail -1 * - - - exim
>  endef
> 
> and your script would get the group ID, right?

Yes.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-29 16:21       ` Yann E. MORIN
@ 2014-03-29 16:56         ` Sagaert Johan
  2014-03-30 13:36           ` Luca Ceresoli
  0 siblings, 1 reply; 18+ messages in thread
From: Sagaert Johan @ 2014-03-29 16:56 UTC (permalink / raw)
  To: buildroot

 
Hi

Just put them in the rootfs overlay, keeping the skeleton to the bare minimum.

-----Oorspronkelijk bericht-----
Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Yann E. MORIN
Verzonden: zaterdag 29 maart 2014 17:22
Aan: Luca Ceresoli
CC: Thomas Petazzoni; berndkuhls at hotmail.com; buildroot at uclibc.org
Onderwerp: Re: [Buildroot] [PATCH 1/2] system/skeleton: add mail group

Luca, All,

On 2014-03-07 16:04 +0100, Luca Ceresoli spake thusly:
> Yann E. MORIN wrote:
> >On 2014-03-06 17:54 +0100, Luca Ceresoli spake thusly:
> >>---
> >>  system/skeleton/etc/group | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >>diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group 
> >>index 864d1db..85a1fa2 100644
> >>--- a/system/skeleton/etc/group
> >>+++ b/system/skeleton/etc/group
> >>@@ -6,6 +6,7 @@ adm:x:4:
> >>  tty:x:5:
> >>  disk:x:6:
> >>  lp:x:7:
> >>+mail:x:8:
> >>  kmem:x:9:
> >>  wheel:x:10:root
> >>  cdrom:x:11:
> >
> >There is no reason to add the 'mail' group to the default skeleton. 
> >If it is missing, 'mkuser' is expected to create it (if not, that's a 
> >bug.)
> >
> >So the EXIM_USER in your second patch should be enough.
> 
> Technically speaking you're perfectly right.
> 
> I just felt the mail group is one of those groups that are supposed to 
> be used by multiple packages. At least an MTA and a mail server, maybe 
> a spam filter, a virus scanner... and we might have multiple 
> alternatives for each of them.
> 
> So it looks bad to me to refer to the same group in (potentially) many 
> packages and not having the group well-defined in "the" group list.
> 
> Of course this is my POV, and it's not very strong now that we have 
> such a small number of mail-related packages in Buildroot...

'mail' is not a strictly-required group, so I think it does not really belong to the skeleton, especially since most systems
Buildroot is aimed at won't have an MDA. OTOH, it is a pretty prevalent group in Unix systems.

So I don't mind much about adding the 'mail' group.

> Oh, following my idea I could as well change:
> 
>  define EXIM_USERS
> -exim 88 mail 8 * - - - exim
> +exim 88 mail -1 * - - - exim
>  endef
> 
> and your script would get the group ID, right?

Yes.

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' 
| conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-29 16:56         ` Sagaert Johan
@ 2014-03-30 13:36           ` Luca Ceresoli
  0 siblings, 0 replies; 18+ messages in thread
From: Luca Ceresoli @ 2014-03-30 13:36 UTC (permalink / raw)
  To: buildroot

Hi Sagaert,

Sagaert Johan wrote:
>
> Hi
>
> Just put them in the rootfs overlay, keeping the skeleton to the bare minimum.

Sorry, I don't agree with this approach.

Buildroot packages should work as far as possible out of the box. They
should not rely on rootfs additions or other modifications by the user.
And the exim package uses the mail group, so it would not work unless
the user manually overrides /etc/group in the rootfs overlay.

Moreover, overriding a file in the Buildroot standard skeleton with
a modified version in a user's rootfs overlay opens to problems when
upgrading to later Buildroot versions.

So the mail group should really must be created by Buildroot, either
statically in system/skeleton or via EXIM_USER.

>
> -----Oorspronkelijk bericht-----
> Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Yann E. MORIN
> Verzonden: zaterdag 29 maart 2014 17:22
> Aan: Luca Ceresoli
> CC: Thomas Petazzoni; berndkuhls at hotmail.com; buildroot at uclibc.org
> Onderwerp: Re: [Buildroot] [PATCH 1/2] system/skeleton: add mail group
>
> Luca, All,
>
> On 2014-03-07 16:04 +0100, Luca Ceresoli spake thusly:
>> Yann E. MORIN wrote:
>>> On 2014-03-06 17:54 +0100, Luca Ceresoli spake thusly:
>>>> ---
>>>>   system/skeleton/etc/group | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group
>>>> index 864d1db..85a1fa2 100644
>>>> --- a/system/skeleton/etc/group
>>>> +++ b/system/skeleton/etc/group
>>>> @@ -6,6 +6,7 @@ adm:x:4:
>>>>   tty:x:5:
>>>>   disk:x:6:
>>>>   lp:x:7:
>>>> +mail:x:8:
>>>>   kmem:x:9:
>>>>   wheel:x:10:root
>>>>   cdrom:x:11:
>>>
>>> There is no reason to add the 'mail' group to the default skeleton.
>>> If it is missing, 'mkuser' is expected to create it (if not, that's a
>>> bug.)
>>>
>>> So the EXIM_USER in your second patch should be enough.
>>
>> Technically speaking you're perfectly right.
>>
>> I just felt the mail group is one of those groups that are supposed to
>> be used by multiple packages. At least an MTA and a mail server, maybe
>> a spam filter, a virus scanner... and we might have multiple
>> alternatives for each of them.
>>
>> So it looks bad to me to refer to the same group in (potentially) many
>> packages and not having the group well-defined in "the" group list.
>>
>> Of course this is my POV, and it's not very strong now that we have
>> such a small number of mail-related packages in Buildroot...
>
> 'mail' is not a strictly-required group, so I think it does not really belong to the skeleton, especially since most systems
> Buildroot is aimed at won't have an MDA. OTOH, it is a pretty prevalent group in Unix systems.
>
> So I don't mind much about adding the 'mail' group.
>
>> Oh, following my idea I could as well change:
>>
>>   define EXIM_USERS
>> -exim 88 mail 8 * - - - exim
>> +exim 88 mail -1 * - - - exim
>>   endef
>>
>> and your script would get the group ID, right?
>
> Yes.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> | conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>


-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-03-06 16:54 ` [Buildroot] [PATCH 1/2] system/skeleton: add mail group Luca Ceresoli
  2014-03-06 17:13   ` Yann E. MORIN
@ 2014-04-05 16:32   ` Thomas Petazzoni
  2014-04-05 21:36     ` Luca Ceresoli
  1 sibling, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2014-04-05 16:32 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Thu,  6 Mar 2014 17:54:49 +0100, Luca Ceresoli wrote:
> ---
>  system/skeleton/etc/group | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks. You forgot your SoB line, but since you're a
well-known contributor, I've added it for you.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-03-06 16:54 ` [Buildroot] [PATCH 2/2] exim: new package Luca Ceresoli
  2014-03-06 17:38   ` Bernd Kuhls
@ 2014-04-05 16:35   ` Thomas Petazzoni
  2014-04-05 22:11     ` Luca Ceresoli
  1 sibling, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2014-04-05 16:35 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Thu,  6 Mar 2014 17:54:50 +0100, Luca Ceresoli wrote:
> ---

You also for your SoB here.

> diff --git a/package/exim/exim.mk b/package/exim/exim.mk
> new file mode 100644
> index 0000000..011d0a4
> --- /dev/null
> +++ b/package/exim/exim.mk
> @@ -0,0 +1,41 @@
> +#############################################################
> +#
> +# exim
> +#
> +#############################################################
> +
> +EXIM_VERSION = 4.82
> +EXIM_SOURCE = exim-$(EXIM_VERSION).tar.bz2
> +EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4
> +EXIM_LICENSE = GPLv2+
> +EXIM_LICENSE_FILES = LICENCE
> +EXIM_DEPENDENCIES = pcre berkeleydb
> +
> +# These echos seem to be the sanest way to feed CC and CFLAGS to exim
> +define EXIM_CONFIGURE_CMDS
> +	install -D package/exim/Local-Makefile $(@D)/Local/Makefile

I've used $(INSTALL) -m0644 instead

> +	echo "CC=$(TARGET_CC)" >>$(@D)/Local/Makefile
> +	echo "CFLAGS=$(TARGET_CFLAGS)" >>$(@D)/Local/Makefile
> +	echo "HOSTCC=$(HOSTCC)" >>$(@D)/Local/Makefile
> +	echo "HOSTCFLAGS=$(HOSTCFLAGS)" >>$(@D)/Local/Makefile

I've added AR and RANLIB here, otherwise the exim build system uses the
native versions.

> +endef
> +
> +# "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
> +	build=br $(MAKE1) -C $(@D)
> +endef
> +
> +define EXIM_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 755 package/exim/S86exim \
> +		$(TARGET_DIR)/etc/init.d/S86exim

I've moved this to EXIM_INSTALL_INIT_SYSV.

> +	DESTDIR=${TARGET_DIR} INSTALL_ARG="-no_chown -no_symlink" build=br \
> +	  $(MAKE1) -C $(@D) install
> +	chmod u+s ${TARGET_DIR}/usr/sbin/exim

I've replaced both {TARGET_DIR} by (TARGET_DIR)

I've committed with those changes.

However, upon startup, I get an exim failure, would be good to have a
look:

Starting exim...
1970-01-01 00:00:06 Exim configuration error in line 541 of /etc/exim/configure:
  router dnslookup: cannot find router driver "dnslookup"

My defconfig is:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2014.02-rc1.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_EXIM=y

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/2] system/skeleton: add mail group
  2014-04-05 16:32   ` Thomas Petazzoni
@ 2014-04-05 21:36     ` Luca Ceresoli
  0 siblings, 0 replies; 18+ messages in thread
From: Luca Ceresoli @ 2014-04-05 21:36 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Thu,  6 Mar 2014 17:54:49 +0100, Luca Ceresoli wrote:
>> ---
>>   system/skeleton/etc/group | 1 +
>>   1 file changed, 1 insertion(+)
>
> Applied, thanks. You forgot your SoB line, but since you're a
> well-known contributor, I've added it for you.

Sorry, thanks.


-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-04-05 16:35   ` Thomas Petazzoni
@ 2014-04-05 22:11     ` Luca Ceresoli
  2014-04-06  8:37       ` Thomas Petazzoni
  0 siblings, 1 reply; 18+ messages in thread
From: Luca Ceresoli @ 2014-04-05 22:11 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

thanks for applying my patch and improving it.

However now that we have a "Mail" category exim should be placed there.
I'm sending a patch to move it.

Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Thu,  6 Mar 2014 17:54:50 +0100, Luca Ceresoli wrote:
>> ---
>
> You also for your SoB here.
>
>> diff --git a/package/exim/exim.mk b/package/exim/exim.mk
>> new file mode 100644
>> index 0000000..011d0a4
>> --- /dev/null
>> +++ b/package/exim/exim.mk
>> @@ -0,0 +1,41 @@
>> +#############################################################
>> +#
>> +# exim
>> +#
>> +#############################################################
>> +
>> +EXIM_VERSION = 4.82
>> +EXIM_SOURCE = exim-$(EXIM_VERSION).tar.bz2
>> +EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4
>> +EXIM_LICENSE = GPLv2+
>> +EXIM_LICENSE_FILES = LICENCE
>> +EXIM_DEPENDENCIES = pcre berkeleydb
>> +
>> +# These echos seem to be the sanest way to feed CC and CFLAGS to exim
>> +define EXIM_CONFIGURE_CMDS
>> +	install -D package/exim/Local-Makefile $(@D)/Local/Makefile
>
> I've used $(INSTALL) -m0644 instead
>
>> +	echo "CC=$(TARGET_CC)" >>$(@D)/Local/Makefile
>> +	echo "CFLAGS=$(TARGET_CFLAGS)" >>$(@D)/Local/Makefile
>> +	echo "HOSTCC=$(HOSTCC)" >>$(@D)/Local/Makefile
>> +	echo "HOSTCFLAGS=$(HOSTCFLAGS)" >>$(@D)/Local/Makefile
>
> I've added AR and RANLIB here, otherwise the exim build system uses the
> native versions.

Did you actually experience a build error, or just fixed ased on visual
inspection? That's weird, the code I submitted works here. But my build
environment is different, this might justify a different behaviour.

Of course I am not against this change, in the worst case it's useless.
Just curious.

>
>> +endef
>> +
>> +# "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
>> +	build=br $(MAKE1) -C $(@D)
>> +endef
>> +
>> +define EXIM_INSTALL_TARGET_CMDS
>> +	$(INSTALL) -D -m 755 package/exim/S86exim \
>> +		$(TARGET_DIR)/etc/init.d/S86exim
>
> I've moved this to EXIM_INSTALL_INIT_SYSV.
>
>> +	DESTDIR=${TARGET_DIR} INSTALL_ARG="-no_chown -no_symlink" build=br \
>> +	  $(MAKE1) -C $(@D) install
>> +	chmod u+s ${TARGET_DIR}/usr/sbin/exim
>
> I've replaced both {TARGET_DIR} by (TARGET_DIR)
>
> I've committed with those changes.
>
> However, upon startup, I get an exim failure, would be good to have a
> look:
>
> Starting exim...
> 1970-01-01 00:00:06 Exim configuration error in line 541 of /etc/exim/configure:
>    router dnslookup: cannot find router driver "dnslookup"
>
> My defconfig is:
>
> BR2_arm=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2014.02-rc1.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13=y
> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
> BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
> BR2_PACKAGE_EXIM=y

I'll have a look at this error.


-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-04-05 22:11     ` Luca Ceresoli
@ 2014-04-06  8:37       ` Thomas Petazzoni
  2014-04-06 15:31         ` Luca Ceresoli
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2014-04-06  8:37 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Sun, 06 Apr 2014 00:11:36 +0200, Luca Ceresoli wrote:

> thanks for applying my patch and improving it.

You're welcome.

> However now that we have a "Mail" category exim should be placed there.
> I'm sending a patch to move it.

Sure, no problem.

> > I've added AR and RANLIB here, otherwise the exim build system uses the
> > native versions.
> 
> Did you actually experience a build error, or just fixed ased on visual
> inspection? That's weird, the code I submitted works here. But my build
> environment is different, this might justify a different behaviour.
> 
> Of course I am not against this change, in the worst case it's useless.
> Just curious.

I did not experience any problem, I just saw while looking at the build
log that it was correctly using the cross-gcc, but not cross-ar and
cross-ranlib, so I fixed that up.

> > My defconfig is:
> >
> > BR2_arm=y
> > BR2_TOOLCHAIN_EXTERNAL=y
> > BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> > BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> > BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2014.02-rc1.tar.bz2"
> > BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13=y
> > # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
> > BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
> > BR2_PACKAGE_EXIM=y
> 
> I'll have a look at this error.

Great, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-04-06  8:37       ` Thomas Petazzoni
@ 2014-04-06 15:31         ` Luca Ceresoli
  2014-04-09 15:46           ` Luca Ceresoli
  0 siblings, 1 reply; 18+ messages in thread
From: Luca Ceresoli @ 2014-04-06 15:31 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Sun, 06 Apr 2014 00:11:36 +0200, Luca Ceresoli wrote:
>
>> thanks for applying my patch and improving it.
>
> You're welcome.
>
>> However now that we have a "Mail" category exim should be placed there.
>> I'm sending a patch to move it.
>
> Sure, no problem.
>
>>> I've added AR and RANLIB here, otherwise the exim build system uses the
>>> native versions.
>>
>> Did you actually experience a build error, or just fixed ased on visual
>> inspection? That's weird, the code I submitted works here. But my build
>> environment is different, this might justify a different behaviour.
>>
>> Of course I am not against this change, in the worst case it's useless.
>> Just curious.
>
> I did not experience any problem, I just saw while looking at the build
> log that it was correctly using the cross-gcc, but not cross-ar and
> cross-ranlib, so I fixed that up.
>
>>> My defconfig is:
>>>
>>> BR2_arm=y
>>> BR2_TOOLCHAIN_EXTERNAL=y
>>> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
>>> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
>>> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2014.02-rc1.tar.bz2"
>>> BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13=y
>>> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
>>> BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
>>> BR2_PACKAGE_EXIM=y
>>
>> I'll have a look at this error.

This is because in my original patch dated 2011 exim was configured in
a very stripped-down version, just enough to deliver mail locally to
cyrus-imapd.

At that time this was done coherently in the build configuration file
(package/exim/Local-Makefile), which disables most optional features,
and in the runtime configuration file (/etc/exim/configure on the
target), which does not configure those features.

In my resubmit last month I removed my runtime configuration file which
was tailored for cyrus-imapd, since I was sending the exim patch alone.
However I dd notchange the build config file. As it is, it disables
features such as the dnslookup router, which is enabled by the stock
runtime config file.

I'm sending a patch that changes the configuration approach in a way
more similar to Bernd Kuhls' approach: instead of blindly copying a
minimal Buildroot-provided configuration file, change to copy the
exim-provided one and tweak it as needed. This actually makes the 
configuration closed to standard exim.

-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/2] exim: new package
  2014-04-06 15:31         ` Luca Ceresoli
@ 2014-04-09 15:46           ` Luca Ceresoli
  0 siblings, 0 replies; 18+ messages in thread
From: Luca Ceresoli @ 2014-04-09 15:46 UTC (permalink / raw)
  To: buildroot

Hi Bernd, Thomas,

Luca Ceresoli wrote:
...
>>>> My defconfig is:
>>>>
>>>> BR2_arm=y
>>>> BR2_TOOLCHAIN_EXTERNAL=y
>>>> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
>>>> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
>>>> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2014.02-rc1.tar.bz2"
>>>>
>>>> BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13=y
>>>> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
>>>> BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
>>>> BR2_PACKAGE_EXIM=y
>>>
>>> I'll have a look at this error.
>
> This is because in my original patch dated 2011 exim was configured in
> a very stripped-down version, just enough to deliver mail locally to
> cyrus-imapd.
>
> At that time this was done coherently in the build configuration file
> (package/exim/Local-Makefile), which disables most optional features,
> and in the runtime configuration file (/etc/exim/configure on the
> target), which does not configure those features.
>
> In my resubmit last month I removed my runtime configuration file which
> was tailored for cyrus-imapd, since I was sending the exim patch alone.
> However I dd notchange the build config file. As it is, it disables
> features such as the dnslookup router, which is enabled by the stock
> runtime config file.
>
> I'm sending a patch that changes the configuration approach in a way
> more similar to Bernd Kuhls' approach: instead of blindly copying a
> minimal Buildroot-provided configuration file, change to copy the
> exim-provided one and tweak it as needed. This actually makes the
> configuration closed to standard exim.

For the records, here's the patch that fixes the issue:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/81356

-- 
Luca

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-04-09 15:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-06 16:54 [Buildroot] [PATCH 0/2] Adding exim Luca Ceresoli
2014-03-06 16:54 ` [Buildroot] [PATCH 1/2] system/skeleton: add mail group Luca Ceresoli
2014-03-06 17:13   ` Yann E. MORIN
2014-03-07 15:04     ` Luca Ceresoli
2014-03-29 16:21       ` Yann E. MORIN
2014-03-29 16:56         ` Sagaert Johan
2014-03-30 13:36           ` Luca Ceresoli
2014-04-05 16:32   ` Thomas Petazzoni
2014-04-05 21:36     ` Luca Ceresoli
2014-03-06 16:54 ` [Buildroot] [PATCH 2/2] exim: new package Luca Ceresoli
2014-03-06 17:38   ` Bernd Kuhls
2014-03-07 14:53     ` Luca Ceresoli
2014-03-07 20:52       ` Bernd Kuhls
2014-04-05 16:35   ` Thomas Petazzoni
2014-04-05 22:11     ` Luca Ceresoli
2014-04-06  8:37       ` Thomas Petazzoni
2014-04-06 15:31         ` Luca Ceresoli
2014-04-09 15:46           ` Luca Ceresoli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.