[Pkg-ocaml-maint-commits] r1578 - trunk/projects/approx/debian
Eric Cooper
ecc-guest at costa.debian.org
Thu Aug 4 15:28:21 UTC 2005
Author: ecc-guest
Date: 2005-08-04 15:28:19 +0000 (Thu, 04 Aug 2005)
New Revision: 1578
Added:
trunk/projects/approx/debian/NEWS
trunk/projects/approx/debian/approx.cron.weekly
trunk/projects/approx/debian/approx.default
trunk/projects/approx/debian/approx.init
trunk/projects/approx/debian/approx.postinst
trunk/projects/approx/debian/approx.postrm
trunk/projects/approx/debian/changelog
trunk/projects/approx/debian/compat
trunk/projects/approx/debian/control
trunk/projects/approx/debian/copyright
trunk/projects/approx/debian/rules
Log:
Added: trunk/projects/approx/debian/NEWS
===================================================================
--- trunk/projects/approx/debian/NEWS 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/NEWS 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,25 @@
+approx (2.00) unstable; urgency=low
+
+The approx server now forks multiple processes to handle concurrent
+requests. A new configuration variable, max_wait, can be used to
+specify how many seconds an approx process will wait for a concurrent
+download of a file to complete, before attempting to download the file
+itself.
+
+ -- Eric Cooper <ecc at cmu.edu> Fri, 13 May 2005 12:23:37 -0400
+
+approx (1.14) unstable; urgency=low
+
+The --foreground option allows approx to be run more easily from
+the command line, a debugger, or the runit init scheme.
+
+ -- Eric Cooper <ecc at cmu.edu> Thu, 5 May 2005 10:43:36 -0400
+
+approx (1.13) unstable; urgency=low
+
+The approx daemon always uses /var/cache/approx now;
+the cache directory can no longer be changed in the approx.conf file.
+But /var/cache/approx can be a symbolic link, so the cache directory
+can still be located elsewhere.
+
+ -- Eric Cooper <ecc at cmu.edu> Wed, 27 Apr 2005 18:39:13 -0400
Added: trunk/projects/approx/debian/approx.cron.weekly
===================================================================
--- trunk/projects/approx/debian/approx.cron.weekly 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/approx.cron.weekly 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Garbage collect the approx(8) cache
+
+gc_approx --quiet
+
+# Remove any empty directories
+# The trailing /. makes it work when /var/cache/approx is a symlink
+
+find /var/cache/approx/. -type d -empty -exec rmdir {} ';'
Added: trunk/projects/approx/debian/approx.default
===================================================================
--- trunk/projects/approx/debian/approx.default 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/approx.default 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,4 @@
+# Default settings for approx, included by the /etc/init.d/approx shell script
+
+# Uncomment and edit this definition to have approx use a proxy server
+#export http_proxy=HOST:PORT
Added: trunk/projects/approx/debian/approx.init
===================================================================
--- trunk/projects/approx/debian/approx.init 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/approx.init 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+# Start and stop the approx daemon
+# Author: Eric Cooper <ecc at cmu.edu>
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="proxy server for Debian archive files"
+NAME=approx
+DAEMON=/usr/sbin/$NAME
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+# Read config file if it is present.
+if [ -r /etc/default/$NAME ]
+then
+ . /etc/default/$NAME
+fi
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ start-stop-daemon --start --quiet --exec $DAEMON --chuid approx:approx
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --exec $DAEMON || true
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service.
+#
+d_reload() {
+ start-stop-daemon --stop --quiet --exec $DAEMON --signal 1
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this an "exit 0".
+ #
+ # echo -n "Reloading $DESC configuration..."
+ # d_reload
+ # echo "done."
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Added: trunk/projects/approx/debian/approx.postinst
===================================================================
--- trunk/projects/approx/debian/approx.postinst 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/approx.postinst 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,59 @@
+#!/bin/sh -e
+
+action="$1"
+oldversion="$2"
+
+if [ "$action" != "configure" ]; then
+ exit 0
+fi
+
+# print the value set for the key ($1) or the specified default ($2) if not set
+# warning: don't insert any whitespace between the double and single quotes!
+
+approx_config() {
+ key="$1"
+ default="$2"
+ awk 'BEGIN { found = 0 } $1 == "'$key'" { found = 1; print $2; exit } END { if (!found) print "'$default'" }' /etc/approx/approx.conf
+}
+
+# add the approx user
+if ! getent passwd approx >/dev/null; then
+ adduser --quiet --system --group --no-create-home --home /var/cache/approx approx
+fi
+
+# create the approx cache directory if necessary
+if [ ! -d /var/cache/approx ]; then
+ mkdir /var/cache/approx
+ chown approx:approx /var/cache/approx
+fi
+
+# make sure the cache is owned by the approx user
+if dpkg --compare-versions "$oldversion" lt 1.12 && [ -d /var/cache/approx ]; then
+ chown -R approx:approx /var/cache/approx/.
+fi
+
+# check for non-standard cache location
+cache=$(approx_config cache /var/cache/approx)
+if dpkg --compare-versions "$oldversion" lt 1.13 && [ "$cache" != /var/cache/approx ]; then
+ cat >&2 <<EOF
+Warning: the location of the cache can no longer be set in approx.conf
+ (you appear to have it set to $cache).
+ See /usr/share/doc/approx/NEWS.Debian.gz for details.
+EOF
+fi
+
+# check for potential conflict with apt-proxy
+port=$(approx_config port 9999)
+if [ -x /etc/init.d/apt-proxy ] && [ "$port" = 9999 ]; then
+ cat >&2 <<EOF
+Warning: apt-proxy appears to be installed also.
+ For compatibility with client sources.list files,
+ approx uses the same port (9999) by default.
+ Please stop or remove apt-proxy, or configure
+ one of them to listen on a different port.
+EOF
+fi
+
+#DEBHELPER#
+
+# -*- shell-script-mode -*-
Added: trunk/projects/approx/debian/approx.postrm
===================================================================
--- trunk/projects/approx/debian/approx.postrm 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/approx.postrm 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+action="$1"
+
+if [ "$action" != "purge" ]; then
+ exit 0
+fi
+
+rm -rf /var/cache/approx
+
+if getent passwd approx >/dev/null; then
+ deluser --quiet approx
+fi
+
+if getent group approx >/dev/null; then
+ delgroup --quiet approx
+fi
+
+#DEBHELPER#
+
+# -*- shell-script-mode -*-
Added: trunk/projects/approx/debian/changelog
===================================================================
--- trunk/projects/approx/debian/changelog 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/changelog 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,165 @@
+approx (1.18) unstable; urgency=low
+
+ * Secure APT imposes additional consistency requirements on the cache:
+ - Release and Release.gpg files must agree
+ - Packages and Sources files must agree with the Release file
+ that mentions them
+
+ -- Eric Cooper <ecc at cmu.edu> Sun, 31 Jul 2005 16:10:13 -0400
+
+approx (1.17) unstable; urgency=low
+
+ * Incorporate patch by Flavio Stanchina <flavio at stanchina.net>
+ to recognize Release.gpg and *.bz2 files in gc_approx (closes: #313188)
+ * Include Last-Modified header in local responses
+ * Support If-Modified-Since for FTP requests using MDTM
+
+ -- Eric Cooper <ecc at cmu.edu> Fri, 15 Jul 2005 15:34:21 -0400
+
+approx (1.16) unstable; urgency=low
+
+ * Support concurrent requests
+ - use http_daemon's Fork mode
+ - rely on atomic rename of foo.tmp -> foo in cache
+ - detect concurrent downloads in progress and wait for them
+ * Differentiate levels of syslog messages
+
+ -- Eric Cooper <ecc at cmu.edu> Fri, 13 May 2005 12:23:37 -0400
+
+approx (1.15) unstable; urgency=low
+
+ * Build byte-code version on architectures with no ocamlopt
+ * Create /var/cache/approx directory in postinst script
+
+ -- Eric Cooper <ecc at cmu.edu> Sat, 7 May 2005 11:08:38 -0400
+
+approx (1.14) unstable; urgency=low
+
+ * Added --foreground option to approx (closes: #306898)
+
+ -- Eric Cooper <ecc at cmu.edu> Thu, 5 May 2005 10:43:36 -0400
+
+approx (1.13) unstable; urgency=low
+
+ * Make sure /var/cache/approx exists before trying to chown it
+ (closes: #306621)
+ * No longer allow the cache directory to be specified in approx.conf;
+ always use /var/cache/approx (which can be a symlink)
+
+ -- Eric Cooper <ecc at cmu.edu> Wed, 27 Apr 2005 18:39:13 -0400
+
+approx (1.12) unstable; urgency=low
+
+ * New description, from suggestions by
+ Raphaël Berbain <raphael.berbain at free.fr>
+ * approx
+ - run as unprivileged user (closes: #305451)
+ - added /etc/default/approx with example of setting
+ http_proxy environment variable (closes: #305453)
+ - detect possible conflict with apt-proxy at installation time
+ and at runtime if binding to port 9999 fails
+ * gc_approx
+ - remove unused distributions and empty parent directories from cache
+ - don't recheck files that have already been checked
+ - uncompress Packages.gz files to disk
+ - use wget to download Packages.gz file if decompression fails
+
+ -- Eric Cooper <ecc at cmu.edu> Mon, 25 Apr 2005 09:01:56 -0400
+
+approx (1.11) unstable; urgency=low
+
+ * Daemonize correctly (closes: #305102)
+
+ -- Eric Cooper <ecc at cmu.edu> Sun, 17 Apr 2005 19:57:56 -0400
+
+approx (1.10) unstable; urgency=low
+
+ * Bumped dependency on syslog-ocaml (closes: #305019)
+
+ -- Eric Cooper <ecc at cmu.edu> Sun, 17 Apr 2005 12:47:12 -0400
+
+approx (1.09) unstable; urgency=low
+
+ * rebuilt against ocamlnet 1.0 and ocaml-http 0.1.0-3
+ * debian/control
+ - added me as an uploader
+ - bumped dependencies on ocamlnet and ocaml-http
+
+ -- Stefano Zacchiroli <zack at debian.org> Sat, 16 Apr 2005 10:13:30 +0200
+
+approx (1.08) unstable; urgency=low
+
+ * Removed trunk directory layer
+ * Add build-dependency on ocaml-tools (closes: #303774)
+
+ -- Eric Cooper <ecc at cmu.edu> Fri, 8 Apr 2005 14:57:43 -0400
+
+approx (1.07) unstable; urgency=low
+
+ * Eliminate timeout for approx daemon callbacks
+ * Make gc_approx handle "Filename: ./foo" correctly
+ * Turn on all OCaml compiler warnings and clean up code
+ * Sven Luther :
+ - Preparing upload built with ocaml 3.08.3.
+ - Taking over maintainership of this package, since Eric is not a DD.
+ - Tested on my home setup since the past three weeks.
+
+ -- Eric Cooper <ecc at cmu.edu> Sat, 12 Mar 2005 17:27:43 -0500
+
+approx (1.06) unstable; urgency=low
+
+ * Use native syslog client instead of piping output to logger
+ * Use open_process_in and gzip instead of camlzip to uncompress
+ package files in gc_approx
+ * gc_approx removes garbage files unless --keep option is specified
+ * APPROX_CONF environment variable no longer used;
+ pathname is now hard-coded in default_config.ml
+ * Write /var/run/approx.pid for use by init script
+
+ -- Eric Cooper <ecc at cmu.edu> Thu, 24 Feb 2005 13:36:26 -0500
+
+approx (1.05) unstable; urgency=low
+
+ * Use proper content type and encoding when relaying *.gz files
+ * Log client IP address
+ * Install into /usr/sbin
+ * Add init.d and cron scripts
+ * Double fork to detach daemon
+ * Use distribution names from the config file as roots for GC,
+ to detect remote repositories no longer in use
+
+ -- Eric Cooper <ecc at cmu.edu> Wed, 23 Feb 2005 23:59:35 -0500
+
+approx (1.04) unstable; urgency=low
+
+ * Add build-dependency on the version of ocamlnet
+ which fixes a problem with '+' characters in URLs
+ * Append ".tmp" to download in progress and rename it when complete,
+ to avoid invalid files in the cache if the daemon is interrupted
+
+ -- Eric Cooper <ecc at cmu.edu> Sun, 6 Feb 2005 17:20:18 -0500
+
+approx (1.03) unstable; urgency=low
+
+ * Cleanup libcurl connection after each transfer
+
+ -- Eric Cooper <ecc at cmu.edu> Fri, 4 Feb 2005 09:05:00 -0500
+
+approx (1.02) unstable; urgency=low
+
+ * Use libcurl-ocaml instead of my own wrapper
+
+ -- Eric Cooper <ecc at cmu.edu> Thu, 3 Feb 2005 21:42:36 -0500
+
+approx (1.01) unstable; urgency=low
+
+ * Don't garbage collect only .deb files;
+ consider everything except Packages, Release, and Sources files
+
+ -- Eric Cooper <ecc at cmu.edu> Tue, 1 Feb 2005 15:52:02 -0500
+
+approx (1.00) unstable; urgency=low
+
+ * Initial release
+
+ -- Eric Cooper <ecc at cmu.edu> Sun, 23 Jan 2005 14:05:29 -0500
Added: trunk/projects/approx/debian/compat
===================================================================
--- trunk/projects/approx/debian/compat 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/compat 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1 @@
+4
Added: trunk/projects/approx/debian/control
===================================================================
--- trunk/projects/approx/debian/control 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/control 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,32 @@
+Source: approx
+Section: admin
+Priority: optional
+Maintainer: Eric Cooper <ecc at cmu.edu>
+Uploaders: Sven Luther <luther at debian.org>, Stefano Zacchiroli <zack at debian.org>
+Build-Depends: debhelper (>= 4.0), ocaml-nox-3.08.3, ocaml-best-compilers, ocaml-tools, libcurl-ocaml-dev (>= 0.2.1), libhttp-ocaml-dev (>= 0.1.1), libocamlnet-ocaml-dev (>= 1.0), libpcre-ocaml-dev, libsyslog-ocaml-dev (>= 1.0-3)
+Standards-Version: 3.6.2
+
+Package: approx
+Architecture: any
+Depends: ${shlibs:Depends}, bzip2, wget
+Description: caching proxy server for Debian archive files
+ Approx is an HTTP-based Debian archive server.
+ It fetches packages from remote repositories on demand,
+ and caches them for local use.
+ .
+ Approx saves time and network bandwidth if you need to install or
+ upgrade Debian software for a number of machines on a local network.
+ Each package is downloaded from a remote site only once,
+ regardless of how many local clients install it.
+ The approx cache typically requires a few gigabytes of disk space.
+ .
+ Approx also simplifies the administration of client machines:
+ repository locations need only be changed in approx's configuration file,
+ not in every client's /etc/apt/sources.list file.
+ .
+ Approx can be used as a replacement for apt-proxy,
+ with no need to modify clients' /etc/apt/sources.list files,
+ or as an alternative to apt-cacher, with no need to run Apache.
+ .
+ Approx is intended to be robust, simple, and efficient.
+ It is written in OCaml (Objective Caml).
Added: trunk/projects/approx/debian/copyright
===================================================================
--- trunk/projects/approx/debian/copyright 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/copyright 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,19 @@
+approx: proxy server for Debian archive files
+Copyright (C) 2005 Eric C. Cooper <ecc at cmu.edu>
+
+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-1307 USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in /usr/share/common-licenses/GPL.
Added: trunk/projects/approx/debian/rules
===================================================================
--- trunk/projects/approx/debian/rules 2005-08-04 15:26:37 UTC (rev 1577)
+++ trunk/projects/approx/debian/rules 2005-08-04 15:28:19 UTC (rev 1578)
@@ -0,0 +1,67 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ if [ -x /usr/bin/ocamlopt ]; then \
+ $(MAKE) native-code; \
+ else \
+ $(MAKE) byte-code; \
+ fi
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+ -$(MAKE) clean
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install approx gc_approx usr/sbin
+ dh_install etc/approx.conf etc/approx
+
+binary-indep: build install
+
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs doc/README.concurrency
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installcatalogs
+# dh_installpam
+# dh_installmime
+ dh_installinit
+ dh_installcron
+# dh_installinfo
+# dh_undocumented
+ dh_installman doc/*.[1-8]
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
+
+# -*- makefile-mode -*-
Property changes on: trunk/projects/approx/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-ocaml-maint-commits
mailing list