Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim
@ 2011-08-23 19:17 Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 1/9] fs/skeleton: add mail group Luca Ceresoli
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Hi,

this patch series adds the Cyrus IMAP server and the exim SMTP server to
Buildroot.

As I reported a couple of months ago (see
http://lists.busybox.net/pipermail/buildroot/2011-June/043672.html), I found
some problems on my way.

The currently open problems are:
  - cyrus-sasl: apparent CFLAGS mismatch on saslauthd;
  - cyrus-sasl: makemd5 is wrongly cross-compiled;
  - cyrus-imapd: imtest does not cross-compile correctly;
  - cyrus-imapd: static binaries are huge, cannot build them shared;
  - cyrus-imapd: choose binaries to (build and) install;

The root of these problems is in the poor buildsystem of the two packages.
I could work around the blockers and end up with a system that is working for
my needs, but is not perfect.

This is the best I could get out of Cyrus at the moment and I won't improve it
in the near future, so I'd like to know what other Buildroot developers think,
and whether the whole work could be merged even with these issues pending.

Patch overview:
 - The first five patches prepare the required settings in /etc and the
   directories in the skeleton fs.
 - Patches 6 and 7 add the Cyrus packages. Both have some workaround patches,
   which should be pretty understandable.
 - Patch 8 simply bumps pcre.
 - The last patch adds the exim SMTP server, configured to feed incoming
   e-mail to cyrus-imapd via LMTP over a socket file.

Luca

Luca Ceresoli (9):
  fs/skeleton: add mail group
  fs/skeleton: add cyrus user in group mail
  fs/skeleton: fix /etc/services entries for POP2/POP3
  fs/skeleton: add /etc/services entries for cyrus-imapd
  target/generic: create directories for cyrus-imapd
  cyrus-sasl: add new package
  cyrus-imapd: add new package
  pcre: bump to 8.12 and switch to bz2 tarball
  exim: add new package

 fs/skeleton/etc/group                              |    1 +
 fs/skeleton/etc/passwd                             |    1 +
 fs/skeleton/etc/services                           |   17 +++-
 fs/skeleton/etc/shadow                             |    1 +
 package/Config.in                                  |    3 +
 package/cyrus-imapd/Config.in                      |   31 +++++++
 package/cyrus-imapd/S85cyrus                       |   27 ++++++
 .../cyrus-imapd-disable-guid-assert.patch          |   30 +++++++
 .../cyrus-imapd/cyrus-imapd-disable-imtest.patch   |   36 ++++++++
 package/cyrus-imapd/cyrus-imapd.mk                 |   59 +++++++++++++
 package/cyrus-imapd/cyrus.conf                     |   33 +++++++
 package/cyrus-imapd/imapd.conf                     |    6 ++
 package/cyrus-sasl/Config.in                       |   20 +++++
 .../cyrus-sasl-allow-disabling-saslauthd.patch     |   19 ++++
 package/cyrus-sasl/cyrus-sasl-hostcc.patch         |   27 ++++++
 package/cyrus-sasl/cyrus-sasl.mk                   |   39 +++++++++
 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-configure                        |   90 ++++++++++++++++++++
 package/exim/exim.mk                               |   49 +++++++++++
 package/pcre/pcre.mk                               |    3 +-
 target/generic/device_table.txt                    |    4 +
 26 files changed, 644 insertions(+), 5 deletions(-)
 create mode 100644 package/cyrus-imapd/Config.in
 create mode 100755 package/cyrus-imapd/S85cyrus
 create mode 100644 package/cyrus-imapd/cyrus-imapd-disable-guid-assert.patch
 create mode 100644 package/cyrus-imapd/cyrus-imapd-disable-imtest.patch
 create mode 100644 package/cyrus-imapd/cyrus-imapd.mk
 create mode 100644 package/cyrus-imapd/cyrus.conf
 create mode 100644 package/cyrus-imapd/imapd.conf
 create mode 100644 package/cyrus-sasl/Config.in
 create mode 100644 package/cyrus-sasl/cyrus-sasl-allow-disabling-saslauthd.patch
 create mode 100644 package/cyrus-sasl/cyrus-sasl-hostcc.patch
 create mode 100644 package/cyrus-sasl/cyrus-sasl.mk
 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-configure
 create mode 100644 package/exim/exim.mk

-- 
1.7.4.1

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

* [Buildroot] [PATCH 1/9] fs/skeleton: add mail group
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 2/9] fs/skeleton: add cyrus user in group mail Luca Ceresoli
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 fs/skeleton/etc/group |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/skeleton/etc/group b/fs/skeleton/etc/group
index 311a455..dd3ea3d 100644
--- a/fs/skeleton/etc/group
+++ b/fs/skeleton/etc/group
@@ -5,6 +5,7 @@ sys:x:3:
 adm:x:4:
 tty:x:5:
 disk:x:6:
+mail:x:8:
 wheel:x:10:root
 audio:x:29:
 utmp:x:43:
-- 
1.7.4.1

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

* [Buildroot] [PATCH 2/9] fs/skeleton: add cyrus user in group mail
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 1/9] fs/skeleton: add mail group Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 3/9] fs/skeleton: fix /etc/services entries for POP2/POP3 Luca Ceresoli
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 fs/skeleton/etc/passwd |    1 +
 fs/skeleton/etc/shadow |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/skeleton/etc/passwd b/fs/skeleton/etc/passwd
index ed7006a..ef34441 100644
--- a/fs/skeleton/etc/passwd
+++ b/fs/skeleton/etc/passwd
@@ -11,6 +11,7 @@ operator:x:37:37:Operator:/var:/bin/sh
 haldaemon:x:68:68:hald:/:/bin/sh
 dbus:x:81:81:dbus:/var/run/dbus:/bin/sh
 ftp:x:83:83:ftp:/home/ftp:/bin/sh
+cyrus:x:88:8:cyrus:/home:/bin/sh
 nobody:x:99:99:nobody:/home:/bin/sh
 sshd:x:103:99:Operator:/var:/bin/sh
 default:x:1000:1000:Default non-root user:/home/default:/bin/sh
diff --git a/fs/skeleton/etc/shadow b/fs/skeleton/etc/shadow
index 67b67c1..6849579 100644
--- a/fs/skeleton/etc/shadow
+++ b/fs/skeleton/etc/shadow
@@ -9,5 +9,6 @@ halt:*:10933:0:99999:7:::
 uucp:*:10933:0:99999:7:::
 operator:*:10933:0:99999:7:::
 ftp:*:10933:0:99999:7:::
+cyrus:*:10933:0:99999:7:::
 nobody:*:10933:0:99999:7:::
 default::10933:0:99999:7:::
-- 
1.7.4.1

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

* [Buildroot] [PATCH 3/9] fs/skeleton: fix /etc/services entries for POP2/POP3
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 1/9] fs/skeleton: add mail group Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 2/9] fs/skeleton: add cyrus user in group mail Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 4/9] fs/skeleton: add /etc/services entries for cyrus-imapd Luca Ceresoli
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Some servers (including cyrus-imapd and qpopper) need an entry named
pop3, not pop-3, to work.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 fs/skeleton/etc/services |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/skeleton/etc/services b/fs/skeleton/etc/services
index b287b63..da37240 100644
--- a/fs/skeleton/etc/services
+++ b/fs/skeleton/etc/services
@@ -70,10 +70,10 @@ csnet-ns	105/udp		cso-ns
 #3com-tsmux	106/udp		poppassd
 rtelnet		107/tcp				# Remote Telnet
 rtelnet		107/udp
-pop-2		109/tcp		postoffice	# POP version 2
-pop-2		109/udp
-pop-3		110/tcp				# POP version 3
-pop-3		110/udp
+pop2		109/tcp		postoffice	# POP version 2
+pop2		109/udp
+pop3		110/tcp				# POP version 3
+pop3		110/udp
 sunrpc		111/tcp		portmapper	# RPC 4.0 portmapper TCP
 sunrpc		111/udp		portmapper	# RPC 4.0 portmapper UDP
 auth		113/tcp		authentication tap ident
-- 
1.7.4.1

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

* [Buildroot] [PATCH 4/9] fs/skeleton: add /etc/services entries for cyrus-imapd
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
                   ` (2 preceding siblings ...)
  2011-08-23 19:17 ` [Buildroot] [PATCH 3/9] fs/skeleton: fix /etc/services entries for POP2/POP3 Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 5/9] target/generic: create directories " Luca Ceresoli
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 fs/skeleton/etc/services |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fs/skeleton/etc/services b/fs/skeleton/etc/services
index da37240..cb6b536 100644
--- a/fs/skeleton/etc/services
+++ b/fs/skeleton/etc/services
@@ -88,6 +88,7 @@ netbios-dgm	138/tcp				# NETBIOS Datagram Service
 netbios-dgm	138/udp
 netbios-ssn	139/tcp				# NETBIOS session service
 netbios-ssn	139/udp
+imap		143/tcp
 imap2		143/tcp				# Interim Mail Access Proto v2
 imap2		143/udp
 snmp		161/udp				# Simple Net Mgmt Proto
@@ -126,18 +127,21 @@ imap3		220/tcp				# Interactive Mail Access
 imap3		220/udp				# Protocol v3
 ulistserv	372/tcp				# UNIX Listserv
 ulistserv	372/udp
+imsp		406/tcp
 https		443/tcp				# MCom
 https		443/udp				# MCom
 snpp		444/tcp				# Simple Network Paging Protocol
 snpp		444/udp				# Simple Network Paging Protocol
 saft		487/tcp				# Simple Asynchronous File Transfer
 saft		487/udp				# Simple Asynchronous File Transfer
+nntps		563/tcp
 npmp-local	610/tcp		dqs313_qmaster	# npmp-local / DQS
 npmp-local	610/udp		dqs313_qmaster	# npmp-local / DQS
 npmp-gui	611/tcp		dqs313_execd	# npmp-gui / DQS
 npmp-gui	611/udp		dqs313_execd	# npmp-gui / DQS
 hmmp-ind	612/tcp		dqs313_intercell# HMMP Indication / DQS
 hmmp-ind	612/udp		dqs313_intercell# HMMP Indication / DQS
+pop3s		995/tcp
 #
 # UNIX specific services
 #
@@ -163,10 +167,15 @@ afpovertcp	548/udp				# AFP over TCP
 remotefs	556/tcp		rfs_server rfs	# Brunhoff remote filesystem
 klogin		543/tcp				# Kerberized `rlogin' (v5)
 kshell		544/tcp		krcmd		# Kerberized `rsh' (v5)
+acap		674/tcp
 kerberos-adm	749/tcp				# Kerberos `kadmin' (v5)
 #
 webster		765/tcp				# Network dictionary
 webster		765/udp
+imaps		993/tcp
+sieve		2000/tcp
+lmtp		2003/tcp
+fud		4201/udp
 #
 # From ``Assigned Numbers'':
 #
-- 
1.7.4.1

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

* [Buildroot] [PATCH 5/9] target/generic: create directories for cyrus-imapd
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
                   ` (3 preceding siblings ...)
  2011-08-23 19:17 ` [Buildroot] [PATCH 4/9] fs/skeleton: add /etc/services entries for cyrus-imapd Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 6/9] cyrus-sasl: add new package Luca Ceresoli
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 target/generic/device_table.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/target/generic/device_table.txt b/target/generic/device_table.txt
index 12f35b2..8f06c3f 100644
--- a/target/generic/device_table.txt
+++ b/target/generic/device_table.txt
@@ -10,6 +10,10 @@
 /tmp					d	1777	0	0	-	-	-	-	-
 /etc					d	755	0	0	-	-	-	-	-
 /home/default				d	2755	1000	1000	-	-	-	-	-
+/var/imap				d	750	88	8	-	-	-	-	-
+/var/imap-spool				d	750	88	8	-	-	-	-	-
+/var/imap/db				d	750	88	8	-	-	-	-	-
+/var/imap/socket 			d	750	88	8	-	-	-	-	-
 /bin/busybox				f	4755	0	0	-	-	-	-	-
 /etc/shadow				f	600	0	0	-	-	-	-	-
 /etc/passwd				f	644	0	0	-	-	-	-	-
-- 
1.7.4.1

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

* [Buildroot] [PATCH 6/9] cyrus-sasl: add new package
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
                   ` (4 preceding siblings ...)
  2011-08-23 19:17 ` [Buildroot] [PATCH 5/9] target/generic: create directories " Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 7/9] cyrus-imapd: " Luca Ceresoli
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/Config.in                                  |    1 +
 package/cyrus-sasl/Config.in                       |   20 ++++++++++
 .../cyrus-sasl-allow-disabling-saslauthd.patch     |   19 ++++++++++
 package/cyrus-sasl/cyrus-sasl-hostcc.patch         |   27 ++++++++++++++
 package/cyrus-sasl/cyrus-sasl.mk                   |   39 ++++++++++++++++++++
 5 files changed, 106 insertions(+), 0 deletions(-)
 create mode 100644 package/cyrus-sasl/Config.in
 create mode 100644 package/cyrus-sasl/cyrus-sasl-allow-disabling-saslauthd.patch
 create mode 100644 package/cyrus-sasl/cyrus-sasl-hostcc.patch
 create mode 100644 package/cyrus-sasl/cyrus-sasl.mk

diff --git a/package/Config.in b/package/Config.in
index 7112e05..397e9c1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -395,6 +395,7 @@ source "package/bwm-ng/Config.in"
 source "package/can-utils/Config.in"
 source "package/ctorrent/Config.in"
 source "package/cups/Config.in"
+source "package/cyrus-sasl/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/dhcp/Config.in"
 endif
diff --git a/package/cyrus-sasl/Config.in b/package/cyrus-sasl/Config.in
new file mode 100644
index 0000000..b16f868
--- /dev/null
+++ b/package/cyrus-sasl/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_CYRUS_SASL
+	bool "cyrus-sasl"
+	select BR2_PACKAGE_BERKELEYDB
+	help
+	  SASL (Simple Authentication Security Layer) is an Internet
+	  standards-track method for remote computers to authenticate.
+	  The Cyrus SASL library makes supporting various SASL mechanisms easy
+	  for both client and server writers.
+
+	  http://www.cyrusimap.org/
+
+if BR2_PACKAGE_CYRUS_SASL
+
+config BR2_PACKAGE_CYRUS_SASL_DBPATH
+	string "Custom SASL user database file"
+	help
+	  This is the file where cyrus-sasl stores user passwords.
+	  Leave empty to use the default.
+
+endif
diff --git a/package/cyrus-sasl/cyrus-sasl-allow-disabling-saslauthd.patch b/package/cyrus-sasl/cyrus-sasl-allow-disabling-saslauthd.patch
new file mode 100644
index 0000000..32e8e70
--- /dev/null
+++ b/package/cyrus-sasl/cyrus-sasl-allow-disabling-saslauthd.patch
@@ -0,0 +1,19 @@
+configure stops with an error on saslauthd.
+This patch makes it possible to disable saslauthd to allow compiling the
+rest of cyrus-sasl at least.
+
+diff -u -r cyrus-sasl-2.1.24rc1-orig/configure cyrus-sasl-2.1.24rc1/configure
+--- cyrus-sasl-2.1.24rc1-orig/configure	2009-05-07 16:24:25.000000000 +0200
++++ cyrus-sasl-2.1.24rc1/configure	2011-05-02 15:10:36.793333728 +0200
+@@ -15542,8 +15542,10 @@
+ 
+ 
+ 
+-subdirs="$subdirs saslauthd"
+ 
++if test "$with_saslauthd" != no; then
++  subdirs="$subdirs saslauthd"
++fi
+ 
+ 
+ 
diff --git a/package/cyrus-sasl/cyrus-sasl-hostcc.patch b/package/cyrus-sasl/cyrus-sasl-hostcc.patch
new file mode 100644
index 0000000..bf940e4
--- /dev/null
+++ b/package/cyrus-sasl/cyrus-sasl-hostcc.patch
@@ -0,0 +1,27 @@
+Fix HOSTCC and related variables.
+
+Patch inspired by:
+http://tech.dir.groups.yahoo.com/group/nslu2-linux/message/4044?var=0
+
+diff -r -u cyrus-sasl-2.1.24rc1-orig//include/Makefile.in cyrus-sasl-2.1.24rc1/include/Makefile.in
+--- cyrus-sasl-2.1.24rc1-orig/include/Makefile.in	2009-05-07 16:24:46.000000000 +0200
++++ cyrus-sasl-2.1.24rc1/include/Makefile.in	2011-05-05 12:29:38.036844027 +0200
+@@ -266,12 +266,12 @@
+ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+ am__depfiles_maybe = depfiles
+ @AMDEP_TRUE at DEP_FILES = ./$(DEPDIR)/makemd5.Po
+-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+-	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-CCLD = $(CC)
+-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++COMPILE = $(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
++	$(CPPFLAGS) $(AM_CFLAGS) $(HOSTCFLAGS)
++LTCOMPILE = $(LIBTOOL) --mode=compile $(HOSTCC) $(DEFS) $(DEFAULT_INCLUDES) \
++	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(HOSTCFLAGS)
++CCLD = $(HOSTCC)
++LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(HOSTCFLAGS) \
+ 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+ DIST_SOURCES = $(makemd5_SOURCES)
+ DATA = $(frameheader_DATA)
diff --git a/package/cyrus-sasl/cyrus-sasl.mk b/package/cyrus-sasl/cyrus-sasl.mk
new file mode 100644
index 0000000..5cdc575
--- /dev/null
+++ b/package/cyrus-sasl/cyrus-sasl.mk
@@ -0,0 +1,39 @@
+#############################################################
+#
+# cyrus-sasl
+#
+#############################################################
+
+CYRUS_SASL_VERSION = 2.1.24rc1
+CYRUS_SASL_SOURCE = cyrus-sasl-$(CYRUS_SASL_VERSION).tar.gz
+CYRUS_SASL_SITE = ftp://ftp.cyrusimap.org/cyrus-sasl
+CYRUS_SASL_DEPENDENCIES = berkeleydb
+
+# The --program-prefix='' parameter is needed to avoid cyrus-sasl to install
+# executable files prefixed with the tuple name (e.g. arm-linux-saslpasswd2)
+CYRUS_SASL_CONF_OPT = \
+	--disable-dependency-tracking \
+	--disable-sample \
+	--disable-checkapop \
+	--enable-login \
+	--disable-otp \
+	--disable-srp \
+	--disable-gssapi \
+	--disable-cram \
+	--disable-anon \
+	--disable-digest \
+	--disable-ntlm \
+	--disable-passdss \
+	--without-saslauthd \
+	--without-des \
+	--without-openssl \
+	--program-prefix=''
+
+CYRUS_SASL_INSTALL_STAGING = YES
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_CYRUS_SASL_DBPATH)),)
+CYRUS_SASL_CONF_OPT += \
+	--with-dbpath="$(call qstrip,$(BR2_PACKAGE_CYRUS_SASL_DBPATH))"
+endif
+
+$(eval $(call AUTOTARGETS,package,cyrus-sasl))
-- 
1.7.4.1

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

* [Buildroot] [PATCH 7/9] cyrus-imapd: add new package
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
                   ` (5 preceding siblings ...)
  2011-08-23 19:17 ` [Buildroot] [PATCH 6/9] cyrus-sasl: add new package Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 8/9] pcre: bump to 8.12 and switch to bz2 tarball Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 9/9] exim: add new package Luca Ceresoli
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/Config.in                                  |    1 +
 package/cyrus-imapd/Config.in                      |   31 ++++++++++
 package/cyrus-imapd/S85cyrus                       |   27 +++++++++
 .../cyrus-imapd-disable-guid-assert.patch          |   30 ++++++++++
 .../cyrus-imapd/cyrus-imapd-disable-imtest.patch   |   36 ++++++++++++
 package/cyrus-imapd/cyrus-imapd.mk                 |   59 ++++++++++++++++++++
 package/cyrus-imapd/cyrus.conf                     |   33 +++++++++++
 package/cyrus-imapd/imapd.conf                     |    6 ++
 8 files changed, 223 insertions(+), 0 deletions(-)
 create mode 100644 package/cyrus-imapd/Config.in
 create mode 100755 package/cyrus-imapd/S85cyrus
 create mode 100644 package/cyrus-imapd/cyrus-imapd-disable-guid-assert.patch
 create mode 100644 package/cyrus-imapd/cyrus-imapd-disable-imtest.patch
 create mode 100644 package/cyrus-imapd/cyrus-imapd.mk
 create mode 100644 package/cyrus-imapd/cyrus.conf
 create mode 100644 package/cyrus-imapd/imapd.conf

diff --git a/package/Config.in b/package/Config.in
index 397e9c1..4a8c120 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -395,6 +395,7 @@ source "package/bwm-ng/Config.in"
 source "package/can-utils/Config.in"
 source "package/ctorrent/Config.in"
 source "package/cups/Config.in"
+source "package/cyrus-imapd/Config.in"
 source "package/cyrus-sasl/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/dhcp/Config.in"
diff --git a/package/cyrus-imapd/Config.in b/package/cyrus-imapd/Config.in
new file mode 100644
index 0000000..f6fec50
--- /dev/null
+++ b/package/cyrus-imapd/Config.in
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_CYRUS_IMAPD
+	bool "cyrus-imapd"
+	select BR2_PACKAGE_BERKELEYDB
+	select BR2_PACKAGE_CYRUS_SASL
+	help
+	  Cyrus IMAP is an IMAP (and POP3) mail server.
+
+	  http://www.cyrusimap.org/
+
+if BR2_PACKAGE_CYRUS_IMAPD
+
+config BR2_PACKAGE_CYRUS_IMAPD_CONFIG_DIR
+	string "Custom config directory"
+	help
+	  This is the directory where cyrus-imapd stores information about the
+	  IMAP server as a whole.
+	  Leave empty to use the default.
+
+config BR2_PACKAGE_CYRUS_IMAPD_SPOOL_DIR
+	string "Custom spool directory"
+	help
+	  This is the directory where the mailboxes are stored.
+	  Leave empty to use the default.
+
+config BR2_PACKAGE_CYRUS_IMAPD_LMTP_SOCKET
+	string "Custom LMTP socket file"
+	help
+	  This is the socket used for delivering incoming e-mail to cyrus-imapd.
+	  Leave empty to use the default.
+
+endif
diff --git a/package/cyrus-imapd/S85cyrus b/package/cyrus-imapd/S85cyrus
new file mode 100755
index 0000000..84df708
--- /dev/null
+++ b/package/cyrus-imapd/S85cyrus
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Start/stop cyrus master
+#
+
+MASTER=/usr/cyrus/bin/master
+
+case "$1" in
+  start)
+	echo "Starting cyrus..."
+	start-stop-daemon -S -b -x $MASTER
+	;;
+  stop)
+	echo -n "Stopping cyrus..."
+	start-stop-daemon -K -x $MASTER
+	;;
+  restart|reload)
+	"$0" stop
+	"$0" start
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
+
diff --git a/package/cyrus-imapd/cyrus-imapd-disable-guid-assert.patch b/package/cyrus-imapd/cyrus-imapd-disable-guid-assert.patch
new file mode 100644
index 0000000..509447e
--- /dev/null
+++ b/package/cyrus-imapd/cyrus-imapd-disable-guid-assert.patch
@@ -0,0 +1,30 @@
+Fix message reception when built without openssl
+
+Revert commit
+
+  commit e88cfbdbe442cb10c71ae93a64610d505e57f05d
+  Author: Bron Gondwana <brong@opera.com>
+  Date:   Thu Jun 23 15:27:08 2011 +0200
+
+  mailbox: ensure appended GUID is not all zeros
+
+which raised unwanted assertion failures when cyrus-imapd is built without
+openssl, whus blocking mail reception. Fix suggested by Bron Gondwana:
+http://lists.andrew.cmu.edu/pipermail/info-cyrus/2011-July/035133.html
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+
+diff --git a/imap/mailbox.c b/imap/mailbox.c
+index 45c5656..dfc2f3a 100644
+--- a/imap/mailbox.c
++++ b/imap/mailbox.c
+@@ -2140,9 +2140,6 @@ int mailbox_append_index_record(struct mailbox *mailbox,
+     /* Append MUST have a message with data */
+     assert(record->size);
+ 
+-    /* GUID must not be null */
+-    assert(!message_guid_isnull(&record->guid));
+-
+     /* belt AND suspenders - check the previous record too */
+     if (mailbox->i.num_records) {
+ 	struct index_record prev;
diff --git a/package/cyrus-imapd/cyrus-imapd-disable-imtest.patch b/package/cyrus-imapd/cyrus-imapd-disable-imtest.patch
new file mode 100644
index 0000000..68d5f69
--- /dev/null
+++ b/package/cyrus-imapd/cyrus-imapd-disable-imtest.patch
@@ -0,0 +1,36 @@
+imtest does not cross-compile correctly, and cannot be disabled with configure
+parameters, so disable it manually.
+
+diff -r -u cyrus-imapd-2.4.9-orig/configure cyrus-imapd-2.4.9/configure
+--- cyrus-imapd-2.4.9-orig/configure	2011-04-13 16:53:15.000000000 +0200
++++ cyrus-imapd-2.4.9/configure	2011-05-05 15:56:23.840843998 +0200
+@@ -10906,7 +10906,7 @@
+ 
+ 
+ 
+-ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
++ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+diff -r -u cyrus-imapd-2.4.9-orig/configure.in cyrus-imapd-2.4.9/configure.in
+--- cyrus-imapd-2.4.9-orig/configure.in	2011-04-13 16:35:22.000000000 +0200
++++ cyrus-imapd-2.4.9/configure.in	2011-05-05 15:58:31.316844009 +0200
+@@ -1465,4 +1465,4 @@
+ ])
+ 
+ dnl make sure that Makefile is the last thing output
+-AC_OUTPUT(man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile)
++AC_OUTPUT(man/Makefile master/Makefile lib/Makefile imap/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile)
+diff -r -u cyrus-imapd-2.4.9-orig/Makefile.in cyrus-imapd-2.4.9/Makefile.in
+--- cyrus-imapd-2.4.9-orig/Makefile.in	2011-04-13 16:35:22.000000000 +0200
++++ cyrus-imapd-2.4.9/Makefile.in	2011-05-05 15:58:31.616843997 +0200
+@@ -42,7 +42,7 @@
+ #
+ 
+ SUBDIRS = man @PRE_SUBDIRS@ lib @SIEVE_SUBDIRS@ @SERVER_SUBDIRS@ \
+-	imtest @SNMP_SUBDIRS@ @EXTRA_SUBDIRS@
++	@SNMP_SUBDIRS@ @EXTRA_SUBDIRS@
+ DISTSUBDIRS = doc
+ 
+ srcdir = @srcdir@
diff --git a/package/cyrus-imapd/cyrus-imapd.mk b/package/cyrus-imapd/cyrus-imapd.mk
new file mode 100644
index 0000000..6919781
--- /dev/null
+++ b/package/cyrus-imapd/cyrus-imapd.mk
@@ -0,0 +1,59 @@
+#############################################################
+#
+# cyrus-imapd
+#
+#############################################################
+
+CYRUS_IMAPD_VERSION = 2.4.10
+CYRUS_IMAPD_SOURCE = cyrus-imapd-$(CYRUS_IMAPD_VERSION).tar.gz
+CYRUS_IMAPD_SITE = ftp://ftp.cyrusimap.org/cyrus-imapd
+CYRUS_IMAPD_DEPENDENCIES = berkeleydb cyrus-sasl
+CYRUS_IMAPD_CONF_OPT = \
+	--disable-gssapi \
+	--disable-sieve \
+	--without-perl \
+	--without-krb \
+	--without-krbdes \
+	--without-openssl \
+	--without-snmp
+
+define CYRUS_IMAPD_INSTALL_TARGET_INIT_SCRIPT
+	$(INSTALL) -m 755 package/cyrus-imapd/S85cyrus \
+	           $(TARGET_DIR)/etc/init.d/
+endef
+
+define CYRUS_IMAPD_INSTALL_TARGET_CONF_FILES
+	$(INSTALL) -m 644 -D package/cyrus-imapd/imapd.conf \
+		$(TARGET_DIR)/etc/imapd.conf
+	$(INSTALL) -m 644 -D package/cyrus-imapd/cyrus.conf \
+		$(TARGET_DIR)/etc/cyrus.conf
+endef
+
+CYRUS_IMAPD_POST_INSTALL_TARGET_HOOKS += CYRUS_IMAPD_INSTALL_TARGET_INIT_SCRIPT
+CYRUS_IMAPD_POST_INSTALL_TARGET_HOOKS += CYRUS_IMAPD_INSTALL_TARGET_CONF_FILES
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_CONFIG_DIR)),)
+define CYRUS_IMAPD_TWEAK_CONFIG_DIR
+	$(SED) '/^configdirectory:/s~^.*~configdirectory: $(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_CONFIG_DIR))~' \
+		$(TARGET_DIR)/etc/imapd.conf
+endef
+CYRUS_IMAPD_POST_INSTALL_TARGET_HOOKS += CYRUS_IMAPD_TWEAK_CONFIG_DIR
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_SPOOL_DIR)),)
+define CYRUS_IMAPD_TWEAK_SPOOL_DIR
+	$(SED) '/^partition-default:/s~^.*$$~partition-default: $(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_SPOOL_DIR))~' \
+		$(TARGET_DIR)/etc/imapd.conf
+endef
+CYRUS_IMAPD_POST_INSTALL_TARGET_HOOKS += CYRUS_IMAPD_TWEAK_SPOOL_DIR
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_LMTP_SOCKET)),)
+define CYRUS_IMAPD_TWEAK_LMTP_SOCKET
+	$(SED) '/lmtpunix/s~listen="[^"]*"~listen="$(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_LMTP_SOCKET))"~' \
+		${TARGET_DIR}/etc/cyrus.conf
+endef
+CYRUS_IMAPD_POST_INSTALL_TARGET_HOOKS += CYRUS_IMAPD_TWEAK_LMTP_SOCKET
+endif
+
+$(eval $(call AUTOTARGETS,package,cyrus-imapd))
diff --git a/package/cyrus-imapd/cyrus.conf b/package/cyrus-imapd/cyrus.conf
new file mode 100644
index 0000000..047997c
--- /dev/null
+++ b/package/cyrus-imapd/cyrus.conf
@@ -0,0 +1,33 @@
+# standard standalone server implementation
+
+START {
+  # do not delete this entry!
+  recover	cmd="ctl_cyrusdb -r"
+
+  # this is only necessary if using idled for IMAP IDLE
+#  idled		cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/sockets
+SERVICES {
+  # add or remove based on preferences
+  imap		cmd="imapd" listen="imap" prefork=0
+  pop3		cmd="pop3d" listen="pop3" prefork=0
+
+  # LMTP is required for delivery
+  lmtpunix	cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
+
+  # this is only necessary if using notifications
+#  notify	cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+  # this is required
+  checkpoint	cmd="ctl_cyrusdb -c" period=30
+
+  # this is only necessary if using duplicate delivery suppression
+  delprune	cmd="ctl_deliver -E 3" at=0400
+
+  # this is only necessary if caching TLS sessions
+  tlsprune	cmd="tls_prune" at=0400
+}
diff --git a/package/cyrus-imapd/imapd.conf b/package/cyrus-imapd/imapd.conf
new file mode 100644
index 0000000..2cc2f31
--- /dev/null
+++ b/package/cyrus-imapd/imapd.conf
@@ -0,0 +1,6 @@
+configdirectory: /var/imap
+partition-default: /var/imap-spool
+admins: cyradm
+allowplaintext: yes
+allowplainwithouttls: yes
+plaintextloginpause: 0
-- 
1.7.4.1

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

* [Buildroot] [PATCH 8/9] pcre: bump to 8.12 and switch to bz2 tarball
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
                   ` (6 preceding siblings ...)
  2011-08-23 19:17 ` [Buildroot] [PATCH 7/9] cyrus-imapd: " Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2011-08-23 19:17 ` [Buildroot] [PATCH 9/9] exim: add new package Luca Ceresoli
  8 siblings, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/pcre/pcre.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk
index d2a1331..395a6d1 100644
--- a/package/pcre/pcre.mk
+++ b/package/pcre/pcre.mk
@@ -4,7 +4,8 @@
 #
 #############################################################
 
-PCRE_VERSION = 7.9
+PCRE_VERSION = 8.12
+PCRE_SOURCE = pcre-$(PCRE_VERSION).tar.bz2
 PCRE_SITE = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
 PCRE_INSTALL_STAGING = YES
 
-- 
1.7.4.1

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

* [Buildroot] [PATCH 9/9] exim: add new package
  2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
                   ` (7 preceding siblings ...)
  2011-08-23 19:17 ` [Buildroot] [PATCH 8/9] pcre: bump to 8.12 and switch to bz2 tarball Luca Ceresoli
@ 2011-08-23 19:17 ` Luca Ceresoli
  2014-03-02 11:29   ` Bernd Kuhls
  8 siblings, 1 reply; 13+ messages in thread
From: Luca Ceresoli @ 2011-08-23 19:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 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-configure                        |   90 ++++++++++++++++++++
 package/exim/exim.mk                               |   49 +++++++++++
 9 files changed, 293 insertions(+), 0 deletions(-)
 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-configure
 create mode 100644 package/exim/exim.mk

diff --git a/package/Config.in b/package/Config.in
index 4a8c120..f77a703 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -404,6 +404,7 @@ source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
 source "package/ebtables/Config.in"
+source "package/exim/Config.in"
 source "package/ethtool/Config.in"
 source "package/hostapd/Config.in"
 source "package/ifplugd/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..01089d2
--- /dev/null
+++ b/package/exim/Local-Makefile
@@ -0,0 +1,15 @@
+BIN_DIRECTORY=/usr/sbin
+CONFIGURE_FILE=/etc/exim/configure
+EXIM_USER=ref:cyrus
+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..0b3e18f
--- /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-configure b/package/exim/exim-configure
new file mode 100644
index 0000000..e0ed879
--- /dev/null
+++ b/package/exim/exim-configure
@@ -0,0 +1,90 @@
+### exim configuration ###
+
+domainlist local_domains = :@
+
+domainlist relay_to_domains =
+hostlist   relay_from_hosts = 127.0.0.1
+
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+
+never_users = root
+
+# disable rfc1413 ident requests
+rfc1413_hosts = *
+rfc1413_query_timeout = 0s
+
+ignore_bounce_errors_after = 2h
+timeout_frozen_after = 5h
+
+
+### ACL ###
+
+begin acl
+
+acl_check_rcpt:
+  # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
+  # testing for an empty sending host field.
+  accept  hosts = :
+          control = dkim_disable_verify
+
+  # Avoid unusual characters in addresses
+  deny    message       = Restricted characters in address
+          domains       = +local_domains
+          local_parts   = ^[.] : ^.*[@%!/|]
+  deny    message       = Restricted characters in address
+          domains       = !+local_domains
+          local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+  # Accept mail to postmaster in any local domain
+  accept  local_parts   = postmaster
+          domains       = +local_domains
+
+  # Deny unless the sender address can be verified.
+
+  # Accept if the message comes from one of the hosts for which we are an
+  # outgoing relay.
+  accept  hosts         = +relay_from_hosts
+          control       = submission
+          control       = dkim_disable_verify
+
+  # Accept if the message arrived over an authenticated connection.
+  accept  authenticated = *
+          control       = submission
+          control       = dkim_disable_verify
+
+  # Insist that any other recipient address that we accept is either in one of
+  # our local domains, or is in a domain for which we explicitly allow
+  # relaying. Any other domain is rejected as being unacceptable for relaying.
+  require message = relay not permitted
+          domains = +local_domains : +relay_to_domains
+
+  # We also require all accepted addresses to be verifiable.
+  require verify = recipient
+
+  accept
+
+
+acl_check_data:
+  accept
+
+
+### ROUTERS ###
+
+begin routers
+
+cyrus_vdom:
+  driver = accept
+  domains = +local_domains
+  transport = cyrus_lmtp
+  no_more
+
+
+### TRANSPORTS ###
+
+begin transports
+
+cyrus_lmtp:
+  driver = lmtp
+  socket = /var/imap/socket/lmtp
+  batch_max = 20
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
new file mode 100644
index 0000000..a12f5a2
--- /dev/null
+++ b/package/exim/exim.mk
@@ -0,0 +1,49 @@
+#############################################################
+#
+# exim
+#
+#############################################################
+
+EXIM_VERSION = 4.76
+EXIM_SOURCE = exim-$(EXIM_VERSION).tar.bz2
+EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4
+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
+	[ -f ${TARGET_DIR}/etc/exim/configure ] || \
+		install -D -m 644 package/exim/exim-configure \
+			${TARGET_DIR}/etc/exim/configure
+	DESTDIR=${TARGET_DIR} INSTALL_ARG="-no_chown -no_symlink" build=br \
+	  $(MAKE1) -C $(@D) install
+	chmod u+s ${TARGET_DIR}/usr/sbin/exim
+endef
+
+ifeq ($(BR2_PACKAGE_CYRUS_IMAPD),y)
+ifneq ($(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_LMTP_SOCKET)),)
+# Configure lmtp delivery to cyrus-imapd
+define EXIM_TWEAK_LMTP_SOCKET
+	$(SED) '/^[^#]*socket.*=/s~=.*~= $(call qstrip,$(BR2_PACKAGE_CYRUS_IMAPD_LMTP_SOCKET))~' \
+		${TARGET_DIR}/etc/exim/configure
+endef
+EXIM_POST_INSTALL_TARGET_HOOKS += EXIM_TWEAK_LMTP_SOCKET
+endif
+endif
+
+$(eval $(call GENTARGETS,package,exim))
-- 
1.7.4.1

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

* [Buildroot] [PATCH 9/9] exim: add new package
  2011-08-23 19:17 ` [Buildroot] [PATCH 9/9] exim: add new package Luca Ceresoli
@ 2014-03-02 11:29   ` Bernd Kuhls
  2014-03-02 11:32     ` Thomas Petazzoni
  2014-03-05 16:56     ` Luca Ceresoli
  0 siblings, 2 replies; 13+ messages in thread
From: Bernd Kuhls @ 2014-03-02 11:29 UTC (permalink / raw)
  To: buildroot

Luca Ceresoli <luca@lucaceresoli.net> wrote in
news:1314127033-14861-10-git-send-email-luca at lucaceresoli.net: 

> diff --git a/package/exim/exim.mk b/package/exim/exim.mk
> new file mode 100644
> index 0000000..a12f5a2
> --- /dev/null
> +++ b/package/exim/exim.mk
> @@ -0,0 +1,49 @@
> +#############################################################
> +#
> +# exim
> +#
> +#############################################################
> +
> +EXIM_VERSION = 4.76

Hi,

quoting a mail from Aug 23rd, 2011 ;)

Is there still interest in having Exim in buildroot?

I have package files for my personal needs which deliver Exim 4.80.1 (, based 
on the quoted package, update to 4.82 is pending), Dovecot 2.2.12, dovecot-
pigeonhole 0.4.2, fetchmail 6.3.26 and clamav 0.98.1 which are used on a 
production system using uClibc/i386 for several months now.

Regards, Bernd

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

* [Buildroot] [PATCH 9/9] exim: add new package
  2014-03-02 11:29   ` Bernd Kuhls
@ 2014-03-02 11:32     ` Thomas Petazzoni
  2014-03-05 16:56     ` Luca Ceresoli
  1 sibling, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2014-03-02 11:32 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun, 02 Mar 2014 12:29:50 +0100, Bernd Kuhls wrote:

> quoting a mail from Aug 23rd, 2011 ;)
> 
> Is there still interest in having Exim in buildroot?
> 
> I have package files for my personal needs which deliver Exim 4.80.1 (, based 
> on the quoted package, update to 4.82 is pending), Dovecot 2.2.12, dovecot-
> pigeonhole 0.4.2, fetchmail 6.3.26 and clamav 0.98.1 which are used on a 
> production system using uClibc/i386 for several months now.

If those packages are working for you, then please submit them. I don't
see a reason for not including them if they work and they are used in
production.

Thanks!

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

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

* [Buildroot] [PATCH 9/9] exim: add new package
  2014-03-02 11:29   ` Bernd Kuhls
  2014-03-02 11:32     ` Thomas Petazzoni
@ 2014-03-05 16:56     ` Luca Ceresoli
  1 sibling, 0 replies; 13+ messages in thread
From: Luca Ceresoli @ 2014-03-05 16:56 UTC (permalink / raw)
  To: buildroot

Hi Bernd,

Bernd Kuhls wrote:> Luca Ceresoli <luca@lucaceresoli.net> wrote in
 > news:1314127033-14861-10-git-send-email-luca at lucaceresoli.net:
 >
 >> diff --git a/package/exim/exim.mk b/package/exim/exim.mk
 >> new file mode 100644
 >> index 0000000..a12f5a2
 >> --- /dev/null
 >> +++ b/package/exim/exim.mk
 >> @@ -0,0 +1,49 @@
 >> +#############################################################
 >> +#
 >> +# exim
 >> +#
 >> +#############################################################
 >> +
 >> +EXIM_VERSION = 4.76
 >
 > Hi,
 >
 > quoting a mail from Aug 23rd, 2011 ;)
 >
 > Is there still interest in having Exim in buildroot?

I am still actively using exim in my own configs, and with time I
updated to 4.80.1 as well.

So yes, there is interest.

My original patchset aimed at including exim and cyrus-imapd along with
their dependencies, which include cyrus-sasl. However this set of
packages required a lot of patches in order to work properly, and some
of those I made were not of good quality. Exim has no nice build system,
and the Cyrus stuff is even worse AFAIR.

At that time I prarably was the only one here interested in these
packages and there was no (sufficient) review from other developers.

So in the end I just forgot about it and did not try to mainline it
after all.

 >
 > I have package files for my personal needs which deliver Exim 4.80.1 
(, based
 > on the quoted package, update to 4.82 is pending), Dovecot 2.2.12, 
dovecot-
 > pigeonhole 0.4.2, fetchmail 6.3.26 and clamav 0.98.1 which are used on a
 > production system using uClibc/i386 for several months now.

Is your exim implementation changing anything relevant, apart from the
version number?

I'll try to find a little time to resubmit and updated version.
Please send yours, so we can compare them and maybe merge them into a
better one!

-- 
Luca

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

end of thread, other threads:[~2014-03-05 16:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23 19:17 [Buildroot] [PATCH 0/9] Add cyrus-imapd, cyrus-sasl and exim Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 1/9] fs/skeleton: add mail group Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 2/9] fs/skeleton: add cyrus user in group mail Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 3/9] fs/skeleton: fix /etc/services entries for POP2/POP3 Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 4/9] fs/skeleton: add /etc/services entries for cyrus-imapd Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 5/9] target/generic: create directories " Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 6/9] cyrus-sasl: add new package Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 7/9] cyrus-imapd: " Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 8/9] pcre: bump to 8.12 and switch to bz2 tarball Luca Ceresoli
2011-08-23 19:17 ` [Buildroot] [PATCH 9/9] exim: add new package Luca Ceresoli
2014-03-02 11:29   ` Bernd Kuhls
2014-03-02 11:32     ` Thomas Petazzoni
2014-03-05 16:56     ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox