Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7159422
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/MANIFEST.in b/MANIFEST.in
index a22c890..7695180 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,12 +1,10 @@
-recursive-include debian changelog compat control copyright
-recursive-include debian pycompat pyversions rules
-recursive-include debian *.dirs *.init *.postinst *.postrm *.docs *.install *.default
+recursive-include debian changelog compat control copyright docs rules
+recursive-include debian format lintian-overrides openxcap.service
recursive-include opensips *.cfg
recursive-include scripts *.py *.sql
-recursive-include tls .placeholder
-recursive-include xcap/appusage/xml-schemas *.xsd
-recursive-include test *
-prune debian/tmp
+recursive-include tls README
+recursive-include test *
+prune debian/.debhelper
prune debian/openxcap
-prune debian/python-module-stampdir
-include INSTALL LICENSE MANIFEST.in TODO config.ini.sample
+prune debian/tmp
+include INSTALL LICENSE MANIFEST.in TODO
diff --git a/debian/compat b/debian/compat
index ec63514..b4de394 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+11
diff --git a/debian/control b/debian/control
index d422d11..d38e9bb 100644
--- a/debian/control
+++ b/debian/control
@@ -1,28 +1,26 @@
Source: openxcap
Section: net
Priority: optional
Maintainer: Dan Pascu <dan@ag-projects.com>
-Uploaders: Adrian Georgescu <ag@ag-projects.com>
-Build-Depends: debhelper (>= 9), python(>= 2.7)
+Build-Depends: debhelper (>= 11), dh-python, python
Standards-Version: 3.9.8
Package: openxcap
Architecture: all
Depends: ${python:Depends}, ${misc:Depends},
- lsb-base,
python-application (>= 2.8.0),
python-gnutls (>= 3.1.0),
python-lxml,
python-mysqldb,
python-sipsimple,
python-sqlobject,
python-twisted-core,
python-zope.interface
Description: XCAP server implementation
XCAP protocol allows a client to read, write and modify application
configuration data stored in XML format on a server. XCAP maps XML document
sub-trees and element attributes to HTTP URIs, so that these components can
be directly accessed by HTTP. An XCAP server is used by the XCAP clients to
store data like Presence policy in combination with a SIP Presence server
that supports PUBLISH/SUBSCRIBE/NOTIFY methods to provide a complete SIP
SIMPLE server solution.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644
index 0000000..f5eae7b
--- /dev/null
+++ b/debian/lintian-overrides
@@ -0,0 +1,2 @@
+# This file may contain passwords.
+openxcap: non-standard-file-perm etc/openxcap/config.ini 0600 != 0644
diff --git a/debian/openxcap.default b/debian/openxcap.default
deleted file mode 100644
index 33f7e03..0000000
--- a/debian/openxcap.default
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# OpenXCAP startup options
-#
-
-# Set to yes to enable OpenXCAP, once configured properly
-# by editing /etc/openxcap/config.ini
-RUN_OPENXCAP=no
-
diff --git a/debian/openxcap.dirs b/debian/openxcap.dirs
deleted file mode 100644
index 9636603..0000000
--- a/debian/openxcap.dirs
+++ /dev/null
@@ -1,4 +0,0 @@
-etc/openxcap
-etc/openxcap/tls
-usr/bin
-usr/share/doc/openxcap
diff --git a/debian/openxcap.docs b/debian/openxcap.docs
deleted file mode 100644
index 826ac77..0000000
--- a/debian/openxcap.docs
+++ /dev/null
@@ -1 +0,0 @@
-scripts/*
diff --git a/debian/openxcap.init b/debian/openxcap.init
deleted file mode 100644
index e6f4584..0000000
--- a/debian/openxcap.init
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-#
-### BEGIN INIT INFO
-# Provides: openxcap
-# Required-Start: $syslog $network $local_fs $remote_fs $time
-# Required-Stop: $syslog $network $local_fs $remote_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start the OpenXCAP server
-# Description: Start the OpenXCAP server
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-
-INSTALL_DIR="/usr/bin"
-RUNTIME_DIR="/var/run/openxcap"
-DEFAULTS="/etc/default/openxcap"
-
-SERVER="$INSTALL_DIR/openxcap"
-PID="$RUNTIME_DIR/openxcap.pid"
-
-NAME="openxcap"
-DESC="OpenXCAP server"
-
-test -f $SERVER || exit 0
-
-. /lib/lsb/init-functions
-
-# Load startup options if available
-if [ -f $DEFAULTS ]; then
- . $DEFAULTS || true
-fi
-
-if [ "$RUN_OPENXCAP" != "yes" ]; then
- echo "OpenXCAP not yet configured. Edit /etc/default/openxcap first."
- exit 0
-fi
-
-start() {
- echo -n "Starting $DESC: $NAME "
- start-stop-daemon --start --quiet --pidfile $PID --exec $SERVER
- echo "."
-}
-
-stop () {
- echo -n "Stopping $DESC: $NAME "
- start-stop-daemon --stop --quiet --oknodo --retry=TERM/15/KILL/5 --pidfile $PID
- echo "."
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart|force-reload)
- stop
- start
- ;;
- *)
- echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
-
diff --git a/debian/openxcap.install b/debian/openxcap.install
deleted file mode 100644
index bde6bad..0000000
--- a/debian/openxcap.install
+++ /dev/null
@@ -1 +0,0 @@
-tls/.placeholder etc/openxcap/tls
diff --git a/debian/openxcap.service b/debian/openxcap.service
new file mode 100644
index 0000000..443796a
--- /dev/null
+++ b/debian/openxcap.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Open XCAP Server
+After=network.target nss-lookup.target mysqld.service mariadb.service thor-eventserver.service
+
+[Service]
+Type=simple
+Environment=PYTHONUNBUFFERED=yes
+ExecStart=/usr/bin/openxcap --systemd
+Restart=on-abnormal
+LimitCORE=infinity
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/pycompat b/debian/pycompat
deleted file mode 100644
index 0cfbf08..0000000
--- a/debian/pycompat
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/debian/pyversions b/debian/pyversions
deleted file mode 100644
index 3ad2293..0000000
--- a/debian/pyversions
+++ /dev/null
@@ -1 +0,0 @@
-2.7-
diff --git a/debian/rules b/debian/rules
index 92fcfe2..d4a90d3 100644
--- a/debian/rules
+++ b/debian/rules
@@ -1,16 +1,24 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
%:
- dh $@ --with python2
+ dh $@ --with python2 --buildsystem=pybuild
override_dh_clean:
dh_clean
rm -rf build dist MANIFEST
-override_dh_install:
- dh_install
- install -m 0644 config.ini.sample debian/openxcap/etc/openxcap/config.ini
+override_dh_auto_install:
+ dh_auto_install
+ mv debian/openxcap/etc/openxcap/config.ini.sample debian/openxcap/etc/openxcap/config.ini
-.PHONY: override_dh_clean override_dh_install
+override_dh_installsystemd:
+ dh_installsystemd --no-start
+
+override_dh_fixperms:
+ dh_fixperms
+ chmod 600 debian/openxcap/etc/openxcap/config.ini
+
+override_dh_auto_test:
+ # do not run tests as they require a configured openxcap server running
diff --git a/setup.py b/setup.py
index 2035150..e7a061a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,42 +1,48 @@
#!/usr/bin/env python
import os
-import re
+import xcap
from distutils.core import setup
-
-def get_version():
- return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('xcap/__init__.py').read()).group('version')
-
-def find_packages(toplevel):
- return [directory.replace(os.path.sep, '.') for directory, subdirs, files in os.walk(toplevel) if '__init__.py' in files]
-
-setup(name = "openxcap",
- version = get_version(),
- author = "AG Projects",
- author_email = "support@ag-projects.com",
- url = "http://openxcap.org/",
- description = "An open source XCAP server.",
- long_description = """XCAP protocol allows a client to read, write, and modify application
+long_description = """XCAP protocol allows a client to read, write, and modify application
configuration data stored in XML format on a server. XCAP maps XML document
sub-trees and element attributes to HTTP URIs, so that these components can
be directly accessed by HTTP. An XCAP server is used by the XCAP clients to
store data like Presence policy in combination with a SIP Presence server
that supports PUBLISH/SUBSCRIBE/NOTIFY methods to provide a complete
[http://www.tech-invite.com/Ti-sip-WGs.html#wg-simple SIP SIMPLE] server
-solution.""",
- license = "GPL",
- platforms = ["Platform Independent"],
- classifiers = [
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Service Providers",
- "License :: OSI Approved :: GNU General Public License (GPL)",
- "Operating System :: POSIX :: Linux",
- "Programming Language :: Python",
- ],
- packages = find_packages('xcap'),
- scripts = ['openxcap'],
- package_data = {'xcap.appusage': ['xml-schemas/*']},
- )
+solution."""
+
+
+def find_packages(toplevel):
+ return [directory.replace(os.path.sep, '.') for directory, subdirs, files in os.walk(toplevel) if '__init__.py' in files]
+
+
+setup(
+ name='openxcap',
+ version=xcap.__version__,
+
+ description='XCAP server',
+ long_description=long_description,
+ url='http://openxcap.org/',
+
+ author='AG Projects',
+ author_email='support@ag-projects.com',
+
+ license='GPL',
+ platforms=['Platform Independent'],
+
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Intended Audience :: Service Providers',
+ 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'Operating System :: POSIX :: Linux',
+ 'Programming Language :: Python',
+ ],
+ packages=find_packages('xcap'),
+ package_data={'xcap.appusage': ['xml-schemas/*']},
+ data_files=[('/etc/openxcap', ['config.ini.sample']), ('/etc/openxcap/tls', ['tls/README'])],
+ scripts=['openxcap']
+)
diff --git a/tls/.placeholder b/tls/.placeholder
deleted file mode 100644
index 76cb8d0..0000000
--- a/tls/.placeholder
+++ /dev/null
@@ -1,2 +0,0 @@
-# DO NOT EDIT OR REMOVE
-# This file is a simple placeholder to keep dpkg from removing this directory
diff --git a/tls/README b/tls/README
new file mode 100644
index 0000000..edd0dc9
--- /dev/null
+++ b/tls/README
@@ -0,0 +1 @@
+TLS certificates used by openxcap can be added to this directory.
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 23, 5:49 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3408865
Default Alt Text
(10 KB)
Attached To
Mode
rOPENXCAP OpenXCAP
Attached
Detach File
Event Timeline
Log In to Comment