[apertium-apy] 01/01: Imported Debian patch 0.9.1~r343-1
Tino Didriksen
tinodidriksen-guest at moszumanska.debian.org
Fri Jun 10 09:02:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
tinodidriksen-guest pushed a commit to branch master
in repository apertium-apy.
commit 17aeb2c240d8e8bde2183edeadadcd71ded7d8fd
Merge: f6d5923 d7e259d
Author: Tino Didriksen <tino at didriksen.cc>
Date: Fri Jun 10 10:59:01 2016 +0200
Imported Debian patch 0.9.1~r343-1
.gitignore | 4 +
.travis.yml | 33 +
ChangeLog | 1468 +++++++++++++++++++++++++++++++++
NEWS | 85 ++
README | 1 -
README.org | 5 +
debian/apertium-apy.init | 2 +-
debian/apertium-apy.install | 2 +-
debian/apertium-apy.upstart | 2 +-
debian/changelog | 6 +
debian/control | 19 +-
debian/copyright | 2 +-
missingdb.py | 58 ++
modeSearch.py | 18 +-
servlet.py | 392 +++++----
systemd.py | 121 +++
t/README | 18 +
t/run-tests | 189 +++++
tools/apertium-viewer.html | 47 +-
tools/apertiumlangs.sql | 35 +
tools/sanity-test-apy.py | 9 +
tools/systemd/apy.service | 3 +
tools/turkic.sql | 1 +
translation.py | 65 +-
translation.py => translation_py32.py | 73 +-
util.py | 107 +--
26 files changed, 2461 insertions(+), 304 deletions(-)
diff --cc debian/apertium-apy.init
index 54d193a,0000000..53eaa5b
mode 100644,000000..100644
--- a/debian/apertium-apy.init
+++ b/debian/apertium-apy.init
@@@ -1,181 -1,0 +1,181 @@@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: apertium-apy
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Apertium APY service
+# Description: Apertium APY is simple API for Apertium written in Python3
+### END INIT INFO
+
+# Authors: Gabriel Wicke <gwicke at wikimedia.org>,
+# Kartik Mistry <kmistry at wikimedia.org>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Apertium APY service"
+NAME=apertium-apy
+SCRIPT_PATH=/usr/share/apertium-apy/servlet.py
+DAEMON="/usr/bin/python3 $SCRIPT_PATH /usr/share/apertium/modes"
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
- LC_ALL=en_US.utf-8
++LC_ALL=C.UTF-8
+
+# Exit if the package is not installed
+[ -e "$SCRIPT_PATH" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# export the port and host env vars, if set
+export PORT
+export INTERFACE
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # up the number of fds [sockets] from 1024
+ ulimit -n 64000
+
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ # calling /bin/sh is a hack needed to get output redirection on Ubuntu
+ # 12.04 LTS, see below
+ start-stop-daemon --start --quiet --pidfile $PIDFILE -bm \
+ -c apertium:apertium --test \
+ --exec /bin/sh -- \
+ -c "$DAEMON $DAEMON_ARGS >> /var/log/apertium/apertium-apy.log 2>&1" \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE -bm \
+ -c apertium:apertium \
+ --exec /bin/sh -- \
+ -c "$DAEMON $DAEMON_ARGS >> /var/log/apertium/apertium-apy.log 2>&1" \
+ || return 2
+ echo "Started apertium-apy on port $PORT"
+
+ # Cleaner version of the above, but does not work with Ubuntu 12.04
+ # LTS as the --no-close parameter is not yet supported there
+ #start-stop-daemon --start --quiet --pidfile $PIDFILE -bm --no-close \
+ # -c apertium:apertium \
+ # --exec $DAEMON -- $DAEMON_ARGS >> /var/log/apertium/apertium-apy.log 2>&1 \
+ # || return 2
+
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+ sleep 5
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/60/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ # Wait for children to finish too if this is a daemon that forks
+ # and if the daemon is only ever run from this initscript.
+ # If the above conditions are not satisfied then add some other code
+ # that waits for the process to drop all resources that could be
+ # needed by services started subsequently. A last resort is to
+ # sleep for some time.
+ start-stop-daemon --stop --quiet --oknodo --retry=0/5/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ # Many daemons don't delete their pidfiles when they exit.
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
diff --cc debian/apertium-apy.install
index 0e088aa,0000000..0dc7826
mode 100644,000000..100644
--- a/debian/apertium-apy.install
+++ b/debian/apertium-apy.install
@@@ -1,5 -1,0 +1,5 @@@
+*.py usr/share/apertium-apy
- Makefile usr/share/apertium-apy
++*.db usr/share/apertium-apy
+serverlist-example usr/share/doc/apertium-apy
+tools/*.py usr/share/apertium-apy
+tools/*.sql usr/share/apertium-apy
diff --cc debian/apertium-apy.upstart
index 365bc13,0000000..80386e1
mode 100644,000000..100644
--- a/debian/apertium-apy.upstart
+++ b/debian/apertium-apy.upstart
@@@ -1,16 -1,0 +1,16 @@@
+description "Apertium APY service"
+
+start on (local-filesystems and net-device-up IFACE!=lo)
+stop on runlevel [!2345]
+
+setuid "apertium"
+setgid "apertium"
+
- env LC_ALL=en_US.utf-8
++env LC_ALL=C.UTF-8
+
+exec /usr/bin/python3 /usr/share/apertium-apy/servlet.py /usr/share/apertium/modes
+
+respawn
+
+# wait 60 seconds for a graceful restart before killing the master
+kill timeout 60
diff --cc debian/changelog
index 46ff8dc,0000000..5ee61b9
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,15 -1,0 +1,21 @@@
++apertium-apy (0.9.1~r343-1) unstable; urgency=low
++
++ * New upstream release
++
++ -- Tino Didriksen <tino at didriksen.cc> Fri, 10 Jun 2016 10:59:01 +0200
++
+apertium-apy (0.1.0~r61425-1) unstable; urgency=low
+
+ * New upstream snapshot.
+ * debian/copyright:
+ + Added license for toro.py
+ * debian/control:
+ + Relaxed dependencies.
+
+ -- Kartik Mistry <kartik at debian.org> Fri, 14 Aug 2015 11:29:41 +0530
+
+apertium-apy (0.1.0~r61159-1) unstable; urgency=low
+
+ * Initial release (Closes: #769063)
+
+ -- Kartik Mistry <kartik at debian.org> Fri, 17 Jul 2015 13:36:44 -0500
diff --cc debian/control
index 3a790e1,0000000..995e08a
mode 100644,000000..100644
--- a/debian/control
+++ b/debian/control
@@@ -1,33 -1,0 +1,30 @@@
+Source: apertium-apy
+Section: science
+Priority: optional
+Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Kartik Mistry <kartik at debian.org>,
- Tino Didriksen <mail at tinodidriksen.com>
- Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), python3-dev, sqlite3
- Standards-Version: 3.9.6
++ Tino Didriksen <tino at didriksen.cc>
++Build-Depends: debhelper (>= 9),
++ dpkg-dev (>= 1.16.1~),
++ python3-dev (>= 3.2),
++ sqlite3
++Standards-Version: 3.9.8
+Homepage: http://apertium.org
+Vcs-Git: git://anonscm.debian.org/debian-science/packages/apertium-apy.git
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/apertium-apy.git
+
+Package: apertium-apy
- Architecture: any
++Architecture: all
+Depends: adduser,
- apertium (>= 3.4),
- apertium-lex-tools,
- libxml2-dev,
- libxslt-dev,
+ logrotate,
- python-toro,
- python3-dev,
++ python3 (>= 3.2),
+ python3-lxml,
+ python3-pip,
+ python3-tornado (>= 3.1),
- zlib1g-dev,
+ ${misc:Depends},
+ ${python3:Depends},
+ ${shlibs:Depends}
+Description: Apertium APY service
+ This package contains Apertium APY which is simple Apertium
+ API written in Python 3 meant as a drop-in replacement for
+ ScaleMT.
diff --cc debian/copyright
index 88326e9,0000000..5ae9bf3
mode 100644,000000..100644
--- a/debian/copyright
+++ b/debian/copyright
@@@ -1,38 -1,0 +1,38 @@@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: apertium-apy
- Source: http://svn.code.sf.net/p/apertium/svn/trunk/apertium-tools
++Source: https://github.com/goavki/apertium-apy
+
+Files: *
+Copyright: 2005-2007, Universitat d'Alacant / Universidad de Alicante
+ 2007-2008, Prompsit Language Engineering S.L.
+License: GPL-3+
+ 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 package 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/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+Files: toro.py
+Copyright: 2012, A. Jesse Jiryu Davis
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License"); you may
+ not use this file except in compliance with the License. You may obtain
+ a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations
+ under the License.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/apertium-apy.git
More information about the debian-science-commits
mailing list