debian/0000755000000000000000000000000012243232302007157 5ustar debian/source/0000755000000000000000000000000012243232236010465 5ustar debian/source/format0000644000000000000000000000001412243232236011673 0ustar 3.0 (quilt) debian/NEWS0000644000000000000000000000040012243232236007656 0ustar filetea (0.1.16-2) unstable; urgency=low The /etc/default/filetea file is no longer used starting from this release. Use update-rc.d in order to enable / disable the service. -- Alberto Garcia Wed, 20 Nov 2013 20:58:13 +0200 debian/control0000644000000000000000000000256112243232236010574 0ustar Source: filetea Section: net Priority: optional Maintainer: Alberto Garcia Build-Depends: debhelper (>= 9), dh-autoreconf, uuid-dev, libevd-0.1-dev (>= 0.1.18), libjson-glib-dev (>= 0.10.0) Standards-Version: 3.9.4 Homepage: https://gitorious.org/filetea Package: filetea Architecture: any Depends: ${shlibs:Depends}, adduser, shared-mime-info, libjs-jquery, ${misc:Depends} Suggests: ssl-cert Description: Web-based file sharing system FileTea is a simple way to send files among different users. . FileTea functions as a web server. Users can drag files into their web browser and a URL will be generated for each one. Those URLs can be sent to other people, who will be able to start downloading the files immediately. . An HTML5 capable browser is required in order to share the files, but any HTTP client can download them, including command-line tools such as curl or wget. . Files are sent through the server, but no data is stored there: FileTea is only used to route the traffic. This also means that there's no limit to the size of shared files. . The service is anonymous and does not require user registration. Since it's completely web-based, it works in networks with proxies, firewalls, etc., as long as all users can reach the FileTea server. debian/watch0000644000000000000000000000016612243232236010221 0ustar version=3 opts="dversionmangle=s/\+dfsg\d+$//" \ http://eventdance.igalia.com/files/FileTea/FileTea-(.+)\.tar\.bz2 debian/lintian-overrides0000644000000000000000000000007512243232236012550 0ustar filetea: extra-license-file usr/share/doc/filetea/COPYING.gz debian/rules0000755000000000000000000000014112243232236010241 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with autoreconf debian/compat0000644000000000000000000000000212243232236010363 0ustar 9 debian/copyright0000644000000000000000000001030412243232236011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Eduardo Lima Mitev Source: http://eventdance.igalia.com/files/FileTea/ Files: * Copyright: 2011-2013 Igalia, S.L. License: AGPL-3+ Files: html/common/require.js Copyright: 2010-2011, The Dojo Foundation License: Expat or BSD-3-clause Files: html/default/jquery-ui/* Copyright: 2011, The jQuery-ui team (http://jqueryui.com/about) License: Expat or GPL-2 Files: debian/* Copyright: 2011-2013 Alberto Garcia License: AGPL-3+ 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 version 2, as published by the Free Software Foundation. . 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. . On Debian systems the full text of the GNU General Public License 2 can be found in the `/usr/share/common-licenses/GPL-2' file. License: AGPL-3+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3, or (at your option) any later version as published by the Free Software Foundation. . This library 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 Affero General Public Licensefor more details. . The full text of the GNU Affero General Public License 3 is in the COPYING file, included with this distribution. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Dojo Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/changelog0000644000000000000000000000414312243232236011041 0ustar filetea (0.1.16-2) unstable; urgency=low * Remove /etc/default/filetea file: - debian/{preinst,postinst,postrm}: call rm_conffile to remove it. * debian/init.d: update description. -- Alberto Garcia Wed, 20 Nov 2013 20:58:13 +0200 filetea (0.1.16-1) unstable; urgency=low * New upstream release. * Update my e-mail address in debian/*. * debian/copyright: filetea is now DFSG-compliant. * Build with autoreconf (Closes: #727851): - debian/rules: run dh --with autoreconf. - debian/control: add build dependency on dh-autoreconf. * debian/control: - Add build dependency on uuid-dev. - Add dependency on shared-mime-info. - Remove dependency on libjs-jquery-ui. - Remove obsolete DM-Upload-Allowed flag. - debian/control: update Standards-Version to 3.9.4 (no changes). * Remove the following patches, since they're already included in this release: - 02_unused-code.patch - 03_dh-depth-conf.patch - 04_http-port.patch * config-file.patch: refresh against this release. -- Alberto Garcia Mon, 11 Nov 2013 20:30:42 +0200 filetea (0.1.12+dfsg1-3) unstable; urgency=low * Enable hardening build flags: - debian/compat: set compatibility level to 9. - debian/control: build depend on debhelper >= 9. - debian/rules: enable all hardening flags. * debian/control: update Standards-Version to 3.9.3 (no changes). * debian/copyright: update debian copyright format URL. -- Alberto Garcia Fri, 29 Jun 2012 09:42:36 +0300 filetea (0.1.12+dfsg1-2) unstable; urgency=low * New patches: - 02_unused-code.patch: remove unused code from main.c. - 03_dh-depth-conf.patch: don't abort if dh-depth is not found. - 04_http-port.patch: fix handling of http/https port settings. -- Alberto Garcia Wed, 09 Nov 2011 15:37:31 +0200 filetea (0.1.12+dfsg1-1) unstable; urgency=low * Initial release (Closes: #641445) * Patches: - 01_config-file.patch: Default settings for the Debian package. -- Alberto Garcia Thu, 03 Nov 2011 11:50:55 +0200 debian/postinst0000644000000000000000000000127312243232236010776 0ustar #!/bin/sh set -e USER="filetea" HOMEDIR="/usr/share/filetea" case "$1" in configure) if ! id $USER > /dev/null 2>&1 ; then echo "Creating $USER user ..." adduser --system --disabled-password --disabled-login \ --home $HOMEDIR --no-create-home --group $USER fi install -d -oroot -gadm -m2750 /var/log/filetea ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# if dpkg-maintscript-helper supports rm_conffile; then dpkg-maintscript-helper rm_conffile /etc/default/filetea 0.1.16-2~ -- "$@" fi exit 0 debian/postrm0000644000000000000000000000064012243232236010434 0ustar #!/bin/sh set -e case "$1" in purge) rm -rf /var/log/filetea ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# if dpkg-maintscript-helper supports rm_conffile; then dpkg-maintscript-helper rm_conffile /etc/default/filetea 0.1.16-2~ -- "$@" fi exit 0 debian/README.Debian0000644000000000000000000000100212243232236011217 0ustar Notes about the Debian FileTea package -------------------------------------- The Debian FileTea package is configured not to use HTTPS by default, but you can give it a quick try using a snakeoil SSL certificate. For that, install the 'ssl-cert' package and set 'enabled=true' in the [https] section of the config file (/etc/filetea/filetea.conf). In a production environment you probably want to install a proper SSL certificate instead. -- Alberto Garcia , Tue, 25 Oct 2011 15:02:05 +0300 debian/patches/0000755000000000000000000000000012243232236010614 5ustar debian/patches/config-file.patch0000644000000000000000000000512212243232236014017 0ustar Settings for the Debian FileTea package. Index: filetea/filetea.conf =================================================================== --- filetea.orig/filetea.conf +++ filetea/filetea.conf @@ -33,22 +33,23 @@ max-bandwidth-in=0.0 # Default is 0 (unlimited). max-bandwidth-out=0.0 -# The 'source-id-start-depth' property specifies the initial depth of the hashes -# created for shared files. It is a number between 10 and 19. Short -# depths can increment the chance of collision (in which case the node automatically -# increments the depth) and could damage anonimity (an attacker could brute force to -# find shared files); while large depths result in longer urls. Default value is 19. +# The 'source-id-start-depth' property specifies the initial depth of +# the hashes created for shared files. It is a number between 10 and +# 19. Short depths can increment the chance of collision (in which +# case the node automatically increments the depth) and could damage +# anonimity (an attacker could brute force to find shared files); +# while large depths result in longer urls. Default value is 19. source-id-start-depth=19 # The 'user' and 'group' properties specify the user/group that will # own the process after 'root' drops privileges. # The 'group' property is not currently implemented. -user=nobody -group=nogroup +user=filetea +group=filetea # 'pid-file' property sets the absolute filename where daemon's # PID is written. Comment it or leave it blank to disable. -#pid-file=/var/run/filetea.pid +pid-file=/var/run/filetea.pid # 'jquery-dir' specifies the absolute path to the directory where the # jquery javascript file resides. The directory must contain a file @@ -87,8 +88,8 @@ enabled=false # 'cert' and 'key' properties respectively specify the X.509 # certificate and private key filenames to be used for the SSL/TLS # handshake. -#cert=/etc/ssl/certs/ssl-cert-snakeoil.pem -#key=/etc/ssl/private/ssl-cert-snakeoil.key +cert=/etc/ssl/certs/ssl-cert-snakeoil.pem +key=/etc/ssl/private/ssl-cert-snakeoil.key # 'dh-depth' specifies the bit depth of the Diffie-Hellman parameters # to use in SSL/TLS. The parameters will be created randomly upon @@ -117,7 +118,7 @@ max-bandwidth-out=0.0 # 'http-log-file' option specifies the filename where to append HTTP # access log entries in an Apache-like format. # Leave it blank to disable web access logging (the default). -#http-log-file=/var/log/filetea-http.log +http-log-file=/var/log/filetea/access.log # Group names starting with 'peer-' represent other nodes available # for relaying download requests. Each of these groups MUST specify an debian/patches/series0000644000000000000000000000002212243232236012023 0ustar config-file.patch debian/filetea.logrotate0000644000000000000000000000015112243232236012515 0ustar /var/log/filetea/access.log { rotate 10 weekly compress missingok notifempty copytruncate } debian/init.d0000644000000000000000000000716112243232236010302 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: filetea # Required-Start: $network $local_fs $remote_fs # Required-Stop: $network $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: FileTea file sharing system # Description: FileTea is a web-based file sharing system ### END INIT INFO # Author: Alberto Garcia # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="FileTea file sharing daemon" NAME=filetea DAEMON=/usr/sbin/filetea DAEMON_ARGS="-D" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x $DAEMON ] || exit 0 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \ || 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. } # # 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/30/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/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } 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 $? ;; restart|force-reload) 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|status|restart|force-reload}" >&2 exit 3 ;; esac : debian/docs0000644000000000000000000000002412243232236010034 0ustar COPYING NEWS README debian/preinst0000644000000000000000000000025712243232236010600 0ustar #!/bin/sh set -e #DEBHELPER# if dpkg-maintscript-helper supports rm_conffile; then dpkg-maintscript-helper rm_conffile /etc/default/filetea 0.1.16-2~ -- "$@" fi exit 0