debian/0000755000000000000000000000000011733456037007177 5ustar debian/compat0000644000000000000000000000000211732426640010371 0ustar 6 debian/patches/0000755000000000000000000000000011732426640010622 5ustar debian/patches/01_ziproxyconf.diff0000644000000000000000000000422011732426640014344 0ustar Description: Fix small itens in ziproxy.conf to Debian Author: Marcos Talau Index: ziproxy-3.2.0/etc/ziproxy/ziproxy.conf =================================================================== --- ziproxy-3.2.0.orig/etc/ziproxy/ziproxy.conf +++ ziproxy-3.2.0/etc/ziproxy/ziproxy.conf @@ -1,4 +1,4 @@ -# Example ziproxy.conf +# Example of ziproxy.conf for Debian ############################ # daemon mode-only options # @@ -299,10 +299,6 @@ ## Default: 8080 # NextPort=8080 -## Use these DNS name servers to resolve hostnames -## instead of the ones configured in /etc/resolv.conf -# Nameservers = { "1.2.3.4", "11.22.33.44" } - ## Bind outgoing connections (to remote HTTP server) to the following (local) IPs ## It applies to the _outgoing_ connections, it has _no_ relation to the listener socket. ## When 2 or more IPs are specified, Ziproxy will rotate to each of those at each @@ -769,21 +765,21 @@ ## Note: The internal defaults give more precise error messages. ## ## 400 - Bad request (malformed URL, or unknown URL type) -# CustomError400="/var/ziproxy/error/400.html" +# CustomError400="/usr/share/ziproxy/error/400.html" ## 403 - Forbidden -# CustomError403="/var/ziproxy/error/403.html" +# CustomError403="/usr/share/ziproxy/error/403.html" ## 404 - Unknown host (Ziproxy will not issue 'page not found' errors itself) -# CustomError404="/var/ziproxy/error/404.html" +# CustomError404="/usr/share/ziproxy/error/404.html" ## 407 - Proxy Authentication Required -# CustomError407="/var/ziproxy/error/407.html" +# CustomError407="/usr/share/ziproxy/error/407.html" ## 408 - Request timed out -# CustomError408="/var/ziproxy/error/408.html" +# CustomError408="/usr/share/ziproxy/error/408.html" ## 409 - Conflict -# CustomError409="/var/ziproxy/error/409.html" +# CustomError409="/usr/share/ziproxy/error/409.html" ## 500 - Internal error (or empty response from server) -# CustomError500="/var/ziproxy/error/500.html" +# CustomError500="/usr/share/ziproxy/error/500.html" ## 503 - Connection refused (or service unavailable) -# CustomError503="/var/ziproxy/error/503.html" +# CustomError503="/usr/share/ziproxy/error/503.html" debian/patches/02_new_libpng.diff0000644000000000000000000000123211732426640014077 0ustar Description: Support for new libpng 1.5.2 Author: Nobuhiro Iwamatsu Index: ziproxy-3.2.0/src/image.c =================================================================== --- ziproxy-3.2.0.orig/src/image.c +++ ziproxy-3.2.0/src/image.c @@ -68,6 +68,7 @@ #undef GLOBAL #include +#include #ifdef JP2K #include @@ -556,7 +557,7 @@ bmp = new_raw_bitmap(); *out = bmp; - png_set_read_fn (png_ptr, (voidp) &desc, mem_to_png); + png_set_read_fn (png_ptr, (png_voidp) &desc, mem_to_png); png_read_info (png_ptr,info_ptr); png_get_IHDR (png_ptr, info_ptr, &width_png_uint_32, &height_png_uint_32, debian/patches/series0000644000000000000000000000004611732426640012037 0ustar 01_ziproxyconf.diff 02_new_libpng.diffdebian/ziproxy.init0000644000000000000000000000665311732426640011616 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: ziproxy # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Init script for ziproxy # Description: This is the init script for ziproxy. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/ziproxy NAME=ziproxy DESC=ziproxy test -x $DAEMON || exit 0 PIDFILE=/var/run/$NAME.pid DODTIME=1 # Time to wait for the server to die, in seconds # If this value is set too low you might not # let some servers to die gracefully and # 'restart' will not work if [ ! -d /var/run ]; then mkdir -p /var/run fi # Include ziproxy defaults if available if [ -f /etc/default/ziproxy ] ; then . /etc/default/ziproxy fi DAEMON_OPTS="$DAEMON_OPTS -d -p $PIDFILE" set -e running_pid() { # Check if a given process pid's cmdline matches a given name pid=$1 name=$2 [ -z "$pid" ] && return 1 [ ! -d /proc/$pid ] && return 1 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` # Is this the expected child? ##[ "$cmd" != "$name" ] && return 1 [ "$cmd" != "$name" ] && return 1 return 0 } running() { # Check if the process is running looking at /proc # (works for all users) # No pidfile, probably no daemon present [ ! -f "$PIDFILE" ] && return 1 # Obtain the pid and check it against the binary name pid=`cat $PIDFILE` if ! running_pid $pid $DAEMON; then rm $PIDFILE return 1 fi return 0 } force_stop() { # Forcefully kill the process [ ! -f "$PIDFILE" ] && return if running ; then kill -15 $pid # Is it really dead? [ -n "$DODTIME" ] && sleep "$DODTIME"s if running ; then kill -9 $pid [ -n "$DODTIME" ] && sleep "$DODTIME"s if running ; then echo "Cannot kill $NAME (pid=$pid)!" exit 1 fi fi fi rm -f $PIDFILE return 0 } is_not_running() { if ! running; then echo "$NAME is not running." exit 1 fi } do_start() { off_echo=$1 [ $off_echo ] || echo -n "Starting $DESC: " if running; then echo "$NAME is already running." exit 0 fi start-stop-daemon --start --quiet --pidfile $PIDFILE \ --exec $DAEMON -- $DAEMON_OPTS if running; then [ $off_echo ] || echo "$NAME." else echo " ERROR." fi } do_stop() { off_echo=$1 [ $off_echo ] || echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --exec $DAEMON [ -f $PIDFILE ] && rm $PIDFILE [ $off_echo ] || echo "$NAME." } case "$1" in start) do_start ;; stop) do_stop ;; force-stop) echo -n "Forcefully stopping $DESC: " is_not_running force_stop if ! running; then echo "$NAME." else echo " ERROR." fi ;; restart|force-reload) echo -n "Restarting $DESC: " is_not_running do_stop 1 [ -n "$DODTIME" ] && sleep $DODTIME do_start 1 echo "$NAME." ;; status) echo -n "$NAME is " if running ; then echo "running." else echo "not running." exit 1 fi ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 exit 1 ;; esac exit 0 debian/README.Debian0000644000000000000000000000074311732426640011240 0ustar Ziproxy for Debian ------------------ * If you enable access log option in ziproxy.conf, and if you want to use the directory /var/log/ziproxy as path, you need to run these commands: # mkdir /var/log/ziproxy # chown ziproxy:ziproxy /var/log/ziproxy * The Nameservers option don't work. This is a problem in the upstream code. This option was disabled in Debian; this also fix a FTBFS #591417 -- Marcos Talau , Fri, 20 May 2011 12:53:18 -0300 debian/postrm0000644000000000000000000000172411732426640010446 0ustar #!/bin/sh # postrm script for ziproxy # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|abort-install|disappear) userdel --force ziproxy || true ;; purge|upgrade|failed-upgrade|abort-upgrade) ;; *) 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 debian/dirs0000644000000000000000000000011011732426640010047 0ustar etc/ziproxy usr/bin usr/share/ziproxy/error usr/share/lintian/overrides debian/lintian-overrides0000644000000000000000000000022011732426640012546 0ustar ziproxy: non-standard-file-perm etc/ziproxy/http.passwd 0640 != 0644 ziproxy: non-standard-file-perm etc/ziproxy/sasl/ziproxy.conf 0640 != 0644 debian/changelog0000644000000000000000000001033611732427721011051 0ustar ziproxy (3.2.0-2) unstable; urgency=low * debian/control - Standards-Version updated to 3.9.3 - No changes need - Change Build-Depends libpng12-dev to libpng-dev (Closes: #662576) -- Marcos Talau Wed, 21 Mar 2012 16:38:02 -0300 ziproxy (3.2.0-1) unstable; urgency=low * New upstream release * debian/patches/02_off_nameservers_opt.diff - Removed, upstream introduces ./configure parameter for it * debian/control - Standards-Version updated * debian/ziproxy.init - Remove PIDFILE if process not exists (Closes: #616160) - Thanks to Witold Baryluk - Small fixes * New patch for libpng 1.5.2 (Closes: #635699) - Thanks to Nobuhiro Iwamatsu -- Marcos Talau Thu, 20 Oct 2011 11:45:11 -0200 ziproxy (3.1.3-1) unstable; urgency=low * New upstream release (LP: #569611) * debian/patches/02_ziproxy_3.1.1_speedup.diff - Removed, merged upstream. * debian/preinst - Removed, old command moved to postinst (Closes: #566589) - Thanks piuparts ;-) * debian/control - Standards-Version updated * Disabled Nameservers option (Closes: #591417) (LP: #539874) - Thanks to all in 591417@ and the upstream! - debian/README.Debian - Reason for it added. - New patch: debian/02_off_nameservers_opt.diff -- Marcos Talau Mon, 16 Aug 2010 20:22:32 -0300 ziproxy (3.1.1-1) unstable; urgency=low * New upstream release (Closes: #587039) [CVE-2010-2350] - Thanks to Moritz Muehlenhoff * debian/patches/02_ziproxy_genhtml_stats-bashism.diff - Removed, merged upstream. * debian/control - Renamed Vcs* address * debian/patches/02_ziproxy_3.1.1_speedup.diff - New patch for fix CPU load problem * debian/ziproxy.init - Removed $local_fs from Required-{Start,Stop} -- Marcos Talau Fri, 25 Jun 2010 21:29:00 -0300 ziproxy (3.1.0-1) unstable; urgency=low * New upstream release (LP: #569611) (Closes: #584933) [CVE-2010-1513] * Fixed bashisms in ziproxy_genhtml_stats.sh (Closes: #581153) - Thanks to Raphael Geissert. * Updated debian/copyright * debian/ziproxy.init: - Added Required-* $remote_fs - Now using pidfile option from daemon * User/group name now in debian/ziproxy.default * Removed patch for Russian man page - Upstream removed Russian man pages due to lack of maintainer * config.* is now updating with debhelper * Changed maintainer mail -- Marcos Talau Fri, 04 Jun 2010 17:50:03 -0300 ziproxy (2.7.2-1.1) unstable; urgency=low * NMU * Add Depends on passwd and adduser, as used by preinst and postrm. closes: #566589. -- Clint Adams Sat, 30 Jan 2010 23:03:26 -0500 ziproxy (2.7.2-1) unstable; urgency=low * Run as a system user (Closes: #543471, #543494) - Thanks to Kandalintsev Alexandre. * Small fixes in init * New upstream release (Closes: #521051) [CVE-2009-0804] * Update to DebSrc3.0 * Use of DEP-3 compliant headers * Updated debian/copyright * Small fixes in maintainer scripts -- Marcos Talau Mon, 07 Dec 2009 23:03:54 -0200 ziproxy (2.7.0-1) unstable; urgency=low * New upstream release - New files from upstream: replace_ct.list and deny.list - Updated ziproxyconf patch - Don't use manpage ziproxylogtool.ru.1, because it have problems * Upgrade for the Debian Policy 3.8.1 -- Marcos Talau Mon, 04 May 2009 06:36:08 -0300 ziproxy (2.6.0-1) unstable; urgency=low * New upstream release -- Marcos Talau Wed, 24 Dec 2008 19:49:38 -0200 ziproxy (2.5.2-2) unstable; urgency=low * Created a debian patch to ziproxy.conf - quilt was used. * Fixed a warning in dpkg-shlibdeps * Added support for libjasper * Upgrade for the Debian Policy 3.8.0 * Few changes at debian/rules * Fixed Lintian problems. - debhelper-script-needs-versioned-build-depends - build-depends-on-obsolete-package -- Marcos Talau Sun, 29 Jun 2008 17:41:51 -0300 ziproxy (2.5.2-1) unstable; urgency=low * Initial release. (Closes: #458605) -- Marcos Talau Wed, 7 May 2008 19:04:03 -0300 debian/postinst0000644000000000000000000000230411732426640011000 0ustar #!/bin/sh # postinst script for ziproxy # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) adduser --quiet --system --group --disabled-login --disabled-password \ --no-create-home --home /var/run/ziproxy ziproxy || true chown ziproxy:ziproxy /etc/ziproxy/http.passwd chown ziproxy:ziproxy /etc/ziproxy/sasl/ziproxy.conf ;; 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 debian/prerm0000644000000000000000000000165111732426640010246 0ustar #!/bin/sh # prerm script for ziproxy # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) # if isn't running /etc/init.d/ziproxy status || exit 0 ;; failed-upgrade) ;; *) echo "prerm 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 debian/control0000644000000000000000000000141311732430013010562 0ustar Source: ziproxy Section: net Priority: extra Maintainer: Marcos Talau Build-Depends: debhelper (>= 7.0.50), autotools-dev(>= 20100122.1), flex, libjpeg-dev, libpng-dev, libgif-dev, zlib1g-dev, autoconf, libjasper-dev, libsasl2-dev Standards-Version: 3.9.3 Homepage: http://ziproxy.sf.net Vcs-Git: git://git.debian.org/git/collab-maint/ziproxy.git Vcs-Browser: http://git.debian.org/?p=collab-maint/ziproxy.git Package: ziproxy Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, passwd, adduser Description: compressing HTTP proxy server ziproxy is a forwarding, non-caching and compressing HTTP proxy server. Basically it squeezes images by converting them to lower quality JPEGs and compresses (gzip) HTML and other text-like data. debian/watch0000644000000000000000000000007311732426640010224 0ustar version=3 http://sf.net/ziproxy/ziproxy-([\d.]+)\.tar\.bz2 debian/ziproxy.install0000644000000000000000000000072111732426640012307 0ustar etc/ziproxy/sasl/ziproxy.conf /etc/ziproxy/sasl etc/ziproxy/bo_exception.list /etc/ziproxy etc/ziproxy/deny.list /etc/ziproxy etc/ziproxy/http.passwd /etc/ziproxy etc/ziproxy/noprocess.list /etc/ziproxy etc/ziproxy/replace.list /etc/ziproxy etc/ziproxy/replace_ct.list /etc/ziproxy etc/ziproxy/ziproxy.conf /etc/ziproxy etc/ziproxy/change_tos.list /etc/ziproxy src/tools/ziproxy_genhtml_stats.sh /usr/share/ziproxy var/ziproxy/error/*.html /usr/share/ziproxy/error debian/ziproxy.default0000644000000000000000000000043511732426640012267 0ustar # Defaults for ziproxy initscript # sourced by /etc/init.d/ziproxy # installed at /etc/default/ziproxy by the maintainer scripts # # This is a POSIX shell fragment # # Additional options that are passed to the Daemon. DAEMON_OPTS="-c /etc/ziproxy/ziproxy.conf -u ziproxy -g ziproxy" debian/source/0000755000000000000000000000000011732426640010473 5ustar debian/source/format0000644000000000000000000000001411732426640011701 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000504311732426640011130 0ustar This package was debianized by Marcos Talau on Tue, 27 Nov 2007 22:36:37 -0200. It was downloaded from Upstream Authors and Copyright: Copyright © 2002-2004 Juraj Variny Copyright © 2005-2011 Daniel Mealha Cabrita License: 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 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA The Debian packaging is © 2007-2011 Marcos Talau and is licensed under the GPL version 2, or (at your option) any later version, see `/usr/share/common-licenses/GPL-2'. License of config/install-sh: Copyright © 1994 X Consortium 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. On public domain: mkinstalldirs and some parts of install-sh. License of src/netd.c: Based on proxy.c from microproxy package: © May 2001, by David McNab - david@rebirthing.co.nz, http://freeweb.sf.org Released subject to GNU General Public License v2 or later version. debian/docs0000644000000000000000000000004111732426640010041 0ustar JPEG2000.txt README README.tools debian/rules0000755000000000000000000000111511732426640010251 0ustar #!/usr/bin/make -f %: dh $@ --with autotools_dev override_dh_auto_configure: ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-jasper --with-sasl2 --enable-nameservers=no CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs,--as-needed" override_dh_installchangelogs: dh_installchangelogs ChangeLog override_dh_fixperms: dh_fixperms --exclude http.passwd --exclude sasl/ziproxy.conf chmod 640 debian/ziproxy/etc/ziproxy/http.passwd chmod 640 debian/ziproxy/etc/ziproxy/sasl/ziproxy.conf