summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-07-18 11:43:34 -0400
committerMicah Anderson <micah@riseup.net>2013-07-18 15:47:55 -0400
commit7fc33cd84a345d002d54444d8e504e1f70e62df3 (patch)
treed765d6314c96157399d585c9e654b4d6da5e7d5e /debian
parent7199a11a9a30f8299ebbc99ec6844c792d2a3124 (diff)
update package to latest 0.2.2 version
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/rename_tac202
-rw-r--r--debian/patches/series1
-rw-r--r--debian/pydist-overrides3
3 files changed, 206 insertions, 0 deletions
diff --git a/debian/patches/rename_tac b/debian/patches/rename_tac
new file mode 100644
index 0000000..efecc14
--- /dev/null
+++ b/debian/patches/rename_tac
@@ -0,0 +1,202 @@
+Index: mx/pkg/mx.tac
+===================================================================
+--- mx.orig/pkg/mx.tac 2013-07-18 12:29:54.209755118 -0400
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,84 +0,0 @@
+-# -*- encoding: utf-8 -*-
+-# mx.tac
+-# Copyright (C) 2013 LEAP
+-#
+-# This program is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+-
+-import sys
+-import ConfigParser
+-
+-from functools import partial
+-
+-from leap.mx import couchdbhelper
+-from leap.mx.mail_receiver import MailReceiver
+-from leap.mx.alias_resolver import AliasResolverFactory
+-from leap.mx.check_recipient_access import CheckRecipientAccessFactory
+-
+-try:
+- from twisted.application import service, internet
+- from twisted.internet import inotify
+- from twisted.internet.endpoints import TCP4ServerEndpoint
+- from twisted.python import filepath, log
+- from twisted.python import usage
+-except ImportError, ie:
+- print "This software requires Twisted>=12.0.2, please see the README for"
+- print "help on using virtualenv and pip to obtain requirements."
+-
+-config_file = "/etc/leap/mx.conf"
+-
+-config = ConfigParser.ConfigParser()
+-config.read(config_file)
+-
+-user = config.get("couchdb", "user")
+-password = config.get("couchdb", "password")
+-
+-server = config.get("couchdb", "server")
+-port = config.get("couchdb", "port")
+-
+-alias_port = config.getint("alias map", "port")
+-check_recipient_port = config.getint("check recipient", "port")
+-
+-cdb = couchdbhelper.ConnectedCouchDB(server,
+- port=port,
+- dbName="users",
+- username=user,
+- password=password)
+-
+-
+-application = service.Application("LEAP MX")
+-
+-# Alias map
+-alias_map = internet.TCPServer(alias_port, AliasResolverFactory(couchdb=cdb))
+-alias_map.setServiceParent(application)
+-
+-# Check recipient access
+-check_recipient = internet.TCPServer(check_recipient_port,
+- CheckRecipientAccessFactory(couchdb=cdb))
+-check_recipient.setServiceParent(application)
+-
+-# Mail receiver
+-mail_couch_url_prefix = "http://%s:%s@%s:%s" % (user,
+- password,
+- server,
+- port)
+-directories = []
+-for section in config.sections():
+- if section in ("couchdb", "alias map", "check recipient"):
+- continue
+- to_watch = config.get(section, "path")
+- recursive = config.getboolean(section, "recursive")
+- directories.append([to_watch, recursive])
+-
+-mr = MailReceiver(mail_couch_url_prefix, cdb, directories)
+-mr.setServiceParent(application)
+Index: mx/pkg/leap_mx.tac
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ mx/pkg/leap_mx.tac 2013-07-18 12:29:54.205755201 -0400
+@@ -0,0 +1,84 @@
++# -*- encoding: utf-8 -*-
++# mx.tac
++# Copyright (C) 2013 LEAP
++#
++# This program is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see <http://www.gnu.org/licenses/>.
++
++import sys
++import ConfigParser
++
++from functools import partial
++
++from leap.mx import couchdbhelper
++from leap.mx.mail_receiver import MailReceiver
++from leap.mx.alias_resolver import AliasResolverFactory
++from leap.mx.check_recipient_access import CheckRecipientAccessFactory
++
++try:
++ from twisted.application import service, internet
++ from twisted.internet import inotify
++ from twisted.internet.endpoints import TCP4ServerEndpoint
++ from twisted.python import filepath, log
++ from twisted.python import usage
++except ImportError, ie:
++ print "This software requires Twisted>=12.0.2, please see the README for"
++ print "help on using virtualenv and pip to obtain requirements."
++
++config_file = "/etc/leap/mx.conf"
++
++config = ConfigParser.ConfigParser()
++config.read(config_file)
++
++user = config.get("couchdb", "user")
++password = config.get("couchdb", "password")
++
++server = config.get("couchdb", "server")
++port = config.get("couchdb", "port")
++
++alias_port = config.getint("alias map", "port")
++check_recipient_port = config.getint("check recipient", "port")
++
++cdb = couchdbhelper.ConnectedCouchDB(server,
++ port=port,
++ dbName="users",
++ username=user,
++ password=password)
++
++
++application = service.Application("LEAP MX")
++
++# Alias map
++alias_map = internet.TCPServer(alias_port, AliasResolverFactory(couchdb=cdb))
++alias_map.setServiceParent(application)
++
++# Check recipient access
++check_recipient = internet.TCPServer(check_recipient_port,
++ CheckRecipientAccessFactory(couchdb=cdb))
++check_recipient.setServiceParent(application)
++
++# Mail receiver
++mail_couch_url_prefix = "http://%s:%s@%s:%s" % (user,
++ password,
++ server,
++ port)
++directories = []
++for section in config.sections():
++ if section in ("couchdb", "alias map", "check recipient"):
++ continue
++ to_watch = config.get(section, "path")
++ recursive = config.getboolean(section, "recursive")
++ directories.append([to_watch, recursive])
++
++mr = MailReceiver(mail_couch_url_prefix, cdb, directories)
++mr.setServiceParent(application)
+Index: mx/pkg/leap_mx
+===================================================================
+--- mx.orig/pkg/leap_mx 2013-07-18 11:42:29.458087240 -0400
++++ mx/pkg/leap_mx 2013-07-18 12:32:06.762949814 -0400
+@@ -4,8 +4,9 @@
+
+ pidfile=/var/run/leap_mx.pid \
+ rundir=/var/lib/leap_mx/ \
+-file=/usr/local/bin/mx.tac \
++file=/usr/share/app/leap_mx.tac \
+ logfile=/var/log/leap_mx.log
++twistd_path=/usr/bin/twistd
+
+ [ -r /etc/default/leap_mx ] && . /etc/default/leap_mx
+
+@@ -17,7 +18,7 @@
+ start)
+ echo -n "Starting leap_mx: twistd"
+ HOME="/var/lib/leap_mx/" \
+- start-stop-daemon --start --quiet --exec /usr/local/bin/twistd -- \
++ start-stop-daemon --start --quiet --exec $twistd_path -- \
+ --pidfile=$pidfile \
+ --rundir=$rundir \
+ --python=$file \
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..144577b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+rename_tac
diff --git a/debian/pydist-overrides b/debian/pydist-overrides
new file mode 100644
index 0000000..1035472
--- /dev/null
+++ b/debian/pydist-overrides
@@ -0,0 +1,3 @@
+leap.soledad soledad-common
+leap.soledad_server soledad-server
+leap.keymanager leap-keymanager