Alexandros Kosiaris has submitted this change and it was merged. Change subject: Revert "WIP: Added initial Debian package" ......................................................................
Revert "WIP: Added initial Debian package" This reverts commit 6b8556e1adc0dcda1ff5d158c4b5a5a29e634bfe. Change-Id: Icd79b08fa15d54a320a362cbc9b3a69f147f41ce --- D debian/README.source D debian/apertium-apy.init D debian/apertium-apy.install D debian/apertium-apy.logratate D debian/apertium-apy.postinst D debian/apertium-apy.postrm D debian/apertium-apy.service D debian/changelog D debian/compat D debian/control D debian/copyright D debian/rules D debian/source/format D debian/upstart/apertium-apy.conf D debian/watch 15 files changed, 0 insertions(+), 430 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 535fcd7..0000000 --- a/debian/README.source +++ /dev/null @@ -1,7 +0,0 @@ -apertium-apy for Debian ------------------------ - -apertium-apy is part of apertium-tools from upstream Apertium repository. - - -- Kartik Mistry <kar...@debian.org> Wed, 08 Oct 2014 21:21:33 +0530 - diff --git a/debian/apertium-apy.init b/debian/apertium-apy.init deleted file mode 100644 index 673c8bb..0000000 --- a/debian/apertium-apy.init +++ /dev/null @@ -1,180 +0,0 @@ -#!/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 <gwi...@wikimedia.org>, -# Kartik Mistry <kmis...@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="python3 $SCRIPT_PATH -p 80 /usr/share/apertium/modes" -DAEMON_ARGS="" -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# 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 --git a/debian/apertium-apy.install b/debian/apertium-apy.install deleted file mode 100644 index 7cacbfd..0000000 --- a/debian/apertium-apy.install +++ /dev/null @@ -1,4 +0,0 @@ -*.py usr/share/apertium-apy -Makefile usr/share/apertium-apy -serverlist-example usr/share/apertium-apy -tools usr/share/apertium-apy diff --git a/debian/apertium-apy.logratate b/debian/apertium-apy.logratate deleted file mode 100644 index 0182a2f..0000000 --- a/debian/apertium-apy.logratate +++ /dev/null @@ -1,9 +0,0 @@ -/var/log/apertium/apertium-apy.log { - daily - copytruncate - missingok - compress - notifempty - rotate 15 - size 256M -} diff --git a/debian/apertium-apy.postinst b/debian/apertium-apy.postinst deleted file mode 100644 index 724089e..0000000 --- a/debian/apertium-apy.postinst +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# postinst script for apertium -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * <postinst> `configure' <most-recently-configured-version> -# * <old-postinst> `abort-upgrade' <new version> -# * <conflictor's-postinst> `abort-remove' `in-favour' <package> -# <new-version> -# * <postinst> `abort-remove' -# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' -# <failed-install-package> <version> `removing' -# <conflicting-package> <version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - # make sure that the apertium user exists. Simplest portable way to check - # is to chown something, so we'll create the directories that we need here. - - makedir() { - if [ ! -d $1 ]; then - mkdir $1 - fi - chown -R $2 $1 && chmod $3 $1 - } - - cd /var/log - makedir apertium root:root 700 - chgrp apertium apertium 2>/dev/null || addgroup --system apertium - chown apertium apertium 2>/dev/null || adduser --system --home /usr/lib/apertium --no-create-home \ - --disabled-password --ingroup apertium apertium - # Now that we have the user ready, chown & chmod the log dir - makedir apertium apertium:apertium 700 - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/apertium-apy.postrm b/debian/apertium-apy.postrm deleted file mode 100644 index db11800..0000000 --- a/debian/apertium-apy.postrm +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# postrm script for apertium -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * <postrm> `remove' -# * <postrm> `purge' -# * <old-postrm> `upgrade' <new-version> -# * <new-postrm> `failed-upgrade' <old-version> -# * <new-postrm> `abort-install' -# * <new-postrm> `abort-install' <old-version> -# * <new-postrm> `abort-upgrade' <old-version> -# * <disappearer's-postrm> `disappear' <overwriter> -# <overwriter-version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge) - - # Delete user; recipe from - # https://wiki.debian.org/AccountHandlingInMaintainerScripts - - USERNAME=apertium - if [ -x "$(command -v deluser)" ]; then - deluser --quiet --system $USERNAME > /dev/null || true - else - echo >&2 "not removing $USERNAME system account because deluser command was not found" - fi - - # Delete directory for pid file - if [ -d "/var/run/apertium" ]; then - rm -rf "/var/run/apertium" - fi - - # Delete directory for log files - if [ -d "/var/log/apertium" ]; then - rm -rf "/var/log/apertium" - fi - ;; - - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/apertium-apy.service b/debian/apertium-apy.service deleted file mode 100644 index a28fed4..0000000 --- a/debian/apertium-apy.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=Translation server and API for Apertium -Documentation=http://wiki.apertium.org/wiki/Apertium-apy -After=network.target - -[Service] -# Change this to your username and edit to how you start apy: -User=apertium -WorkingDirectory=/usr/share/apertium-apy -ExecStart=/usr/bin/python3 servlet.py /usr/share/apertium/modes - -# By default, if it restarts >10 times within 5 secs, it marks it as failed and gives up: -Restart=always - -# No reason to have access to shared tmp files: -PrivateTmp=yes - -[Install] -WantedBy=multi-user.target diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 4951c03..0000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -apertium-apy (0.1+svn~57510-1) trusty; urgency=low - - * Initial release. - - -- Kartik Mistry <kar...@debian.org> Wed, 08 Oct 2014 21:21:33 +0530 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control deleted file mode 100644 index bf81e91..0000000 --- a/debian/control +++ /dev/null @@ -1,32 +0,0 @@ -Source: apertium-apy -Section: science -Priority: optional -Maintainer: Kartik Mistry <kar...@debian.org> -Build-Depends: debhelper (>= 9), python3-dev -Standards-Version: 3.9.6 -Homepage: http://apertium.org -Vcs-Git: https://gerrit.wikimedia.org/r/operations/debs/contenttranslation/apertium-apy - -Package: apertium-apy -Architecture: any -Depends: adduser, - logrotate, - apertium (>= 3.3), - apertium-lex-tools, - build-essential, - libxml2-dev, - libxslt-dev, - lttoolbox, - python3-lxml, - python3-dev, - python3-pip, - python3-tornado, - zlib1g-dev, - ${misc:Depends}, - ${python3:Depends}, - ${shlibs:Depends} -Enhances: cxserver -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 --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 75eb403..0000000 --- a/debian/copyright +++ /dev/null @@ -1,23 +0,0 @@ -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 - -Files: * -Copyright: 2005-2007, Universitat d'Alacant / Universidad de Alicante - 2007-2008, Prompsit Language Engineering S.L. -License: GPL-2+ - 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 2 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 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 782a11a..0000000 --- a/debian/rules +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#DH_VERBOSE = 1 - -# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/default.mk - -# main packaging script based on dh7 syntax -%: - dh $@ --with python3 - -override_dh_auto_clean: - rm -f langNames.db - dh_auto_clean diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/upstart/apertium-apy.conf b/debian/upstart/apertium-apy.conf deleted file mode 100644 index e99772c..0000000 --- a/debian/upstart/apertium-apy.conf +++ /dev/null @@ -1,16 +0,0 @@ -description "Apertium APY service" - -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [!2345] - -setuid "apertium" -setgid "apertium" - -script - LANG=en_US.utf-8 python3 /usr/share/apertium-apy/servlet.py -p 80 /usr/share/apertium/modes -end script - -respawn - -# wait 60 seconds for a graceful restart before killing the master -kill timeout 60 diff --git a/debian/watch b/debian/watch deleted file mode 100644 index da98b04..0000000 --- a/debian/watch +++ /dev/null @@ -1 +0,0 @@ -# apertium-apy is only available in SVN right now. -- To view, visit https://gerrit.wikimedia.org/r/166386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd79b08fa15d54a320a362cbc9b3a69f147f41ce Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/contenttranslation/apertium-apy Gerrit-Branch: master Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org> Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits