Commits

cellis_oidev  committed 856e677

1768 Dovecot cleanup

  • Participants
  • Parent commits 4c13f48

Comments (0)

Files changed (8)

File components/dovecot/Makefile

 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		dovecot
-COMPONENT_VERSION=	2.0.15
+COMPONENT_MAJOR_VER=	2.0
+COMPONENT_MINOR_VER=	15
+COMPONENT_VERSION=	$(COMPONENT_MAJOR_VER).$(COMPONENT_MINOR_VER)
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	sha1:b90f5c1610d8866413fc39cede218534ad6490e8
-COMPONENT_ARCHIVE_URL=	http://www.dovecot.org/releases/2.0/$(COMPONENT_ARCHIVE)
+COMPONENT_ARCHIVE_URL=	http://www.dovecot.org/releases/$(COMPONENT_MAJOR_VER)/$(COMPONENT_ARCHIVE)
 
 include ../../make-rules/prep.mk
 include ../../make-rules/configure.mk
 CONFIGURE_OPTIONS       += CFLAGS="$(CFLAGS) -I/usr/mysql/include/mysql -I/usr/postgres/8.2/include"
 CONFIGURE_OPTIONS       += CPPFLAGS="$(CPPFLAGS) -I/usr/mysql/include/mysql -I/usr/postgres/8.2/include"
 
-CONFIGURE_OPTIONS       += --sysconfdir=$(ETCDIR) --localstatedir=/var
-CONFIGURE_OPTIONS	+= --enable-shared --enable-header-install 
-CONFIGURE_OPTIONS	+= --disable-static --with-solr 
-CONFIGURE_OPTIONS	+= --with-rundir=/var/run/$(COMPONENT_NAME)
+CONFIGURE_OPTIONS	+= --enable-shared 
+CONFIGURE_OPTIONS	+= --disable-static 
+CONFIGURE_OPTIONS	+= --with-solr 
+CONFIGURE_OPTIONS	+= --enable-header-install
 
-CONFIGURE_OPTIONS	+= --with-ldap=plugin --with-sql=plugin --with-gssapi
-CONFIGURE_OPTIONS	+= --with-sqlite --with-mysql --with-pgsql
+CONFIGURE_OPTIONS       += --sysconfdir=$(ETCDIR)
+CONFIGURE_OPTIONS       += --localstatedir=/var
+CONFIGURE_OPTIONS       += --with-rundir=/var/run/$(COMPONENT_NAME)
 
-CONFIGURE_OPTIONS.32	+= --libexecdir=/usr/lib/$(COMPONENT_NAME)
-CONFIGURE_OPTIONS.64	+= --libexecdir=/usr/lib/$(COMPONENT_NAME)/$(MACH64)
+CONFIGURE_OPTIONS	+= --with-ldap=plugin 
+CONFIGURE_OPTIONS	+= --with-sql=plugin 
+CONFIGURE_OPTIONS	+= --with-gssapi
+CONFIGURE_OPTIONS	+= --with-sqlite 
+CONFIGURE_OPTIONS	+= --with-mysql 
+CONFIGURE_OPTIONS	+= --with-pgsql
+
+CONFIGURE_OPTIONS.32	+= --libexecdir=$(USRLIBDIR)/$(COMPONENT_NAME)
+CONFIGURE_OPTIONS.64	+= --libexecdir=$(USRLIBDIR)/$(COMPONENT_NAME)/$(MACH64)
 CONFIGURE_OPTIONS.32	+= LDFLAGS="$(LDFLAGS) -L/usr/mysql/lib/mysql -L/usr/postgres/8.2/lib"
 CONFIGURE_OPTIONS.64	+= LDFLAGS="$(LDFLAGS) -L/usr/mysql/lib/$(MACH64)/mysql -L/usr/postgres/8.2/lib/$(MACH64)"
 CONFIGURE_OPTIONS     += $(CONFIGURE_OPTIONS.$(BITS))

File components/dovecot/dovecot-ldap.p5m

 
 set name=pkg.fmri value=pkg:/mail/dovecot/ldap@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Dovecot IMAP Server - Ldap module"
-#set name=info.classification value="org.opensolaris.category.2008:
+set name=info.classification value="org.opensolaris.category.2008:Web Services/Communications"
 set name=info.upstream_url value="http://dovecot.org/"
 set name=info.source_url value=$(COMPONENT_ARCHIVE_URL)
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

File components/dovecot/dovecot-mysql.p5m

 
 set name=pkg.fmri value=pkg:/mail/dovecot/mysql@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Dovecot IMAP Server - Mysql module"
-#set name=info.classification value="org.opensolaris.category.2008:
+set name=info.classification value="org.opensolaris.category.2008:Web Services/Communications"
 set name=info.upstream_url value="http://dovecot.org/"
 set name=info.source_url value=$(COMPONENT_ARCHIVE_URL)
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

File components/dovecot/dovecot-pgsql.p5m

 
 set name=pkg.fmri value=pkg:/mail/dovecot/pgsql@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Dovecot IMAP Server - Postgres module"
-#set name=info.classification value="org.opensolaris.category.2008:
+set name=info.classification value="org.opensolaris.category.2008:Web Services/Communications"
 set name=info.upstream_url value="http://dovecot.org/"
 set name=info.source_url value=$(COMPONENT_ARCHIVE_URL)
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

File components/dovecot/dovecot-sqlite.p5m

 
 set name=pkg.fmri value=pkg:/mail/dovecot/sqlite@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Dovecot IMAP Server - SQLite module"
-#set name=info.classification value="org.opensolaris.category.2008:
+set name=info.classification value="org.opensolaris.category.2008:Web Services/Communications"
 set name=info.upstream_url value="http://dovecot.org/"
 set name=info.source_url value=$(COMPONENT_ARCHIVE_URL)
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

File components/dovecot/dovecot.p5m

 
 set name=pkg.fmri value=pkg:/mail/dovecot@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Dovecot IMAP Server"
-#set name=info.classification value="org.opensolaris.category.2008:
+set name=info.classification \ 
+	value="org.opensolaris.category.2008:Web Services/Communications"
 set name=info.upstream_url value="http://dovecot.org/"
 set name=info.source_url value=$(COMPONENT_ARCHIVE_URL)
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
 
+<transform file path=.+/lib/.+\.la -> drop>
+
 dir  path=etc
 dir  path=etc/dovecot
 file path=etc/dovecot/README
 dir  path=usr/lib/$(MACH64)/dovecot/auth
 dir  path=usr/lib/$(MACH64)/dovecot/dict
 dir  path=usr/lib/$(MACH64)/dovecot/doveadm
-file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_acl_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_acl_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_expire_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_expire_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_quota_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_quota_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_zlib_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/doveadm/lib10_doveadm_zlib_plugin.so
 file path=usr/lib/$(MACH64)/dovecot/dovecot-config
-file path=usr/lib/$(MACH64)/dovecot/lib01_acl_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib01_acl_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib02_imap_acl_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib02_imap_acl_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib02_lazy_expunge_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib02_lazy_expunge_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib05_snarf_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib05_snarf_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib10_quota_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib10_quota_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib11_imap_quota_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib11_imap_quota_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib11_trash_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib11_trash_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib15_notify_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib15_notify_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_autocreate_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_autocreate_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_expire_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_expire_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_fts_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_fts_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_listescape_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_listescape_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_mail_log_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_mail_log_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_virtual_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_virtual_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib20_zlib_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib20_zlib_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib21_fts_solr_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib21_fts_solr_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib21_fts_squat_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib21_fts_squat_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/lib30_imap_zlib_plugin.la
 file path=usr/lib/$(MACH64)/dovecot/lib30_imap_zlib_plugin.so
-file path=usr/lib/$(MACH64)/dovecot/libdovecot-lda.la
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-lda.so \
     target=libdovecot-lda.so.0.0.0
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-lda.so.0 \
     target=libdovecot-lda.so.0.0.0
 file path=usr/lib/$(MACH64)/dovecot/libdovecot-lda.so.0.0.0
-file path=usr/lib/$(MACH64)/dovecot/libdovecot-login.la
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-login.so \
     target=libdovecot-login.so.0.0.0
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-login.so.0 \
     target=libdovecot-login.so.0.0.0
 file path=usr/lib/$(MACH64)/dovecot/libdovecot-login.so.0.0.0
-file path=usr/lib/$(MACH64)/dovecot/libdovecot-sql.la
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-sql.so \
     target=libdovecot-sql.so.0.0.0
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-sql.so.0 \
     target=libdovecot-sql.so.0.0.0
 file path=usr/lib/$(MACH64)/dovecot/libdovecot-sql.so.0.0.0
-file path=usr/lib/$(MACH64)/dovecot/libdovecot-storage.la
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-storage.so \
     target=libdovecot-storage.so.0.0.0
 link path=usr/lib/$(MACH64)/dovecot/libdovecot-storage.so.0 \
     target=libdovecot-storage.so.0.0.0
 file path=usr/lib/$(MACH64)/dovecot/libdovecot-storage.so.0.0.0
-file path=usr/lib/$(MACH64)/dovecot/libdovecot.la
 link path=usr/lib/$(MACH64)/dovecot/libdovecot.so target=libdovecot.so.0.0.0
 link path=usr/lib/$(MACH64)/dovecot/libdovecot.so.0 target=libdovecot.so.0.0.0
 file path=usr/lib/$(MACH64)/dovecot/libdovecot.so.0.0.0
 dir  path=usr/lib/dovecot/auth
 dir  path=usr/lib/dovecot/dict
 dir  path=usr/lib/dovecot/doveadm
-file path=usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.la
 file path=usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so
-file path=usr/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.la
 file path=usr/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so
-file path=usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.la
 file path=usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so
-file path=usr/lib/dovecot/doveadm/lib10_doveadm_zlib_plugin.la
 file path=usr/lib/dovecot/doveadm/lib10_doveadm_zlib_plugin.so
 dir  path=usr/lib/dovecot/dovecot
 file path=usr/lib/dovecot/dovecot-config
 file path=usr/lib/dovecot/dovecot/script
 file path=usr/lib/dovecot/dovecot/script-login
 file path=usr/lib/dovecot/dovecot/ssl-params
-file path=usr/lib/dovecot/lib01_acl_plugin.la
 file path=usr/lib/dovecot/lib01_acl_plugin.so
-file path=usr/lib/dovecot/lib02_imap_acl_plugin.la
 file path=usr/lib/dovecot/lib02_imap_acl_plugin.so
-file path=usr/lib/dovecot/lib02_lazy_expunge_plugin.la
 file path=usr/lib/dovecot/lib02_lazy_expunge_plugin.so
-file path=usr/lib/dovecot/lib05_snarf_plugin.la
 file path=usr/lib/dovecot/lib05_snarf_plugin.so
-file path=usr/lib/dovecot/lib10_quota_plugin.la
 file path=usr/lib/dovecot/lib10_quota_plugin.so
-file path=usr/lib/dovecot/lib11_imap_quota_plugin.la
 file path=usr/lib/dovecot/lib11_imap_quota_plugin.so
-file path=usr/lib/dovecot/lib11_trash_plugin.la
 file path=usr/lib/dovecot/lib11_trash_plugin.so
-file path=usr/lib/dovecot/lib15_notify_plugin.la
 file path=usr/lib/dovecot/lib15_notify_plugin.so
-file path=usr/lib/dovecot/lib20_autocreate_plugin.la
 file path=usr/lib/dovecot/lib20_autocreate_plugin.so
-file path=usr/lib/dovecot/lib20_expire_plugin.la
 file path=usr/lib/dovecot/lib20_expire_plugin.so
-file path=usr/lib/dovecot/lib20_fts_plugin.la
 file path=usr/lib/dovecot/lib20_fts_plugin.so
-file path=usr/lib/dovecot/lib20_listescape_plugin.la
 file path=usr/lib/dovecot/lib20_listescape_plugin.so
-file path=usr/lib/dovecot/lib20_mail_log_plugin.la
 file path=usr/lib/dovecot/lib20_mail_log_plugin.so
-file path=usr/lib/dovecot/lib20_virtual_plugin.la
 file path=usr/lib/dovecot/lib20_virtual_plugin.so
-file path=usr/lib/dovecot/lib20_zlib_plugin.la
 file path=usr/lib/dovecot/lib20_zlib_plugin.so
-file path=usr/lib/dovecot/lib21_fts_solr_plugin.la
 file path=usr/lib/dovecot/lib21_fts_solr_plugin.so
-file path=usr/lib/dovecot/lib21_fts_squat_plugin.la
 file path=usr/lib/dovecot/lib21_fts_squat_plugin.so
-file path=usr/lib/dovecot/lib30_imap_zlib_plugin.la
 file path=usr/lib/dovecot/lib30_imap_zlib_plugin.so
-file path=usr/lib/dovecot/libdovecot-lda.la
 link path=usr/lib/dovecot/libdovecot-lda.so target=libdovecot-lda.so.0.0.0
 link path=usr/lib/dovecot/libdovecot-lda.so.0 target=libdovecot-lda.so.0.0.0
 file path=usr/lib/dovecot/libdovecot-lda.so.0.0.0
-file path=usr/lib/dovecot/libdovecot-login.la
 link path=usr/lib/dovecot/libdovecot-login.so target=libdovecot-login.so.0.0.0
 link path=usr/lib/dovecot/libdovecot-login.so.0 target=libdovecot-login.so.0.0.0
 file path=usr/lib/dovecot/libdovecot-login.so.0.0.0
-file path=usr/lib/dovecot/libdovecot-sql.la
 link path=usr/lib/dovecot/libdovecot-sql.so target=libdovecot-sql.so.0.0.0
 link path=usr/lib/dovecot/libdovecot-sql.so.0 target=libdovecot-sql.so.0.0.0
 file path=usr/lib/dovecot/libdovecot-sql.so.0.0.0
-file path=usr/lib/dovecot/libdovecot-storage.la
 link path=usr/lib/dovecot/libdovecot-storage.so \
     target=libdovecot-storage.so.0.0.0
 link path=usr/lib/dovecot/libdovecot-storage.so.0 \
     target=libdovecot-storage.so.0.0.0
 file path=usr/lib/dovecot/libdovecot-storage.so.0.0.0
-file path=usr/lib/dovecot/libdovecot.la
 link path=usr/lib/dovecot/libdovecot.so target=libdovecot.so.0.0.0
 link path=usr/lib/dovecot/libdovecot.so.0 target=libdovecot.so.0.0.0
 file path=usr/lib/dovecot/libdovecot.so.0.0.0
 dir path=lib/svc/manifest/site
 dir path=lib/svc/method
 file files/imap-dovecot.xml path=lib/svc/manifest/site/imap-dovecot.xml
-file files/imap-dovecot path=lib/svc/method/imap-dovecot

File components/dovecot/files/imap-dovecot

-#!/sbin/sh
-
-PID=/var/run/dovecot/master.pid
-LD_LIBRARY_PATH=/lib:/usr/lib
-export LD_LIBRARY_PATH
-
-case "$1" in 
-'refresh')
-	if [ -f /etc/dovecot/dovecot.conf ]; then
-		kill -HUP `cat $PID`
-	fi	
-        ;;
-
-'start')
-	if [ -f /etc/dovecot/dovecot.conf ]; then
-		/usr/sbin/dovecot
-	fi	
-	;;
-
-'stop')
-	if [ -f $PID ]; then
-		kill -QUIT `cat $PID` || true
-	fi
-	;;
-
-*)
-	echo "Usage: $0 { start | stop | refresh }"
-	exit 1
-	;;
-esac
-exit 0

File components/dovecot/files/imap-dovecot.xml

 <?xml version="1.0"?>
 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
 <!--
-	Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-	Use is subject to license terms.
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL)". You may
+# only use this file in accordance with the terms of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
 
-	ident	"@(#)imap-dovecot.xml	1.0	04/11/05 GPG"
+#
+# Copyright 2011 Colin Ellis <panamayacht@gmail.com>
+#
 -->
 
 <service_bundle type='manifest' name='dovecot'>
 		<service_fmri value='svc:/system/system-log' />
 	</dependency>
 
-	<instance name='dovecot' enabled='true'>
+	<dependency
+	    name='configuration-file'
+	    grouping='require_all'
+	    restart_on='none'
+	    type='path'>
+		<service_fmri value='file://localhost/etc/dovecot/dovecot.conf' />
+	</dependency>
+
+	<instance name='dovecot' enabled='false'>
 		<exec_method
 			type='method'
 			name='start'
-			exec='/lib/svc/method/imap-dovecot start'
+			exec='/usr/sbin/dovecot'
 			timeout_seconds='10' />
 
 		<exec_method
 			type='method'
 			name='stop'
-			exec='/lib/svc/method/imap-dovecot stop'
+			exec=':kill'
 			timeout_seconds='10' />
 
 		<exec_method
 			type='method'
 			name='refresh'
-			exec='/lib/svc/method/imap-dovecot refresh'
+			exec=':kill -HUP'
 			timeout_seconds='10' />
 
 		<property_group name='startd' type='framework'>