twoftpd (1.41-1) debian-dir only changes

Summary

 debian/README.Debian.diet                                                   |   15 
 debian/changelog                                                            |  243 ++++++++++
 debian/control                                                              |   41 +
 debian/copyright                                                            |   15 
 debian/diff/0001-conf.c-use-ipsvd-and-runit-tools-instead-og-ucspi-tcp.diff |   70 ++
 debian/diff/0002-TARGETS-remove-.html-they-re-shipped-in-orig.tar.gz.diff   |   33 +
 debian/diff/0003-Makefile-avoid-rpath.diff                                  |   25 +
 debian/etc/twoftpd-anon/env/CHROOT                                          |    1 
 debian/etc/twoftpd-anon/env/GID                                             |    1 
 debian/etc/twoftpd-anon/env/GROUP                                           |    1 
 debian/etc/twoftpd-anon/env/HOME                                            |    1 
 debian/etc/twoftpd-anon/env/UID                                             |    1 
 debian/etc/twoftpd-anon/env/USER                                            |    1 
 debian/etc/twoftpd-anon/log/run                                             |    4 
 debian/etc/twoftpd-anon/run                                                 |    7 
 debian/etc/twoftpd/env/CHROOT                                               |    1 
 debian/etc/twoftpd/log/run                                                  |    4 
 debian/etc/twoftpd/run                                                      |    7 
 debian/implicit                                                             |   93 +++
 debian/rules                                                                |  109 ++++
 debian/twoftpd-run.README.Debian                                            |   32 +
 debian/twoftpd-run.conffiles                                                |   11 
 debian/twoftpd-run.postinst                                                 |   29 +
 debian/twoftpd-run.postrm                                                   |   25 +
 debian/twoftpd-run.prerm                                                    |    9 
 debian/twoftpd.README.Debian                                                |   49 ++
 debian/twoftpd.docs                                                         |    9 
 27 files changed, 837 insertions(+)

    
download this patch

Patch contents

--- twoftpd-1.41.orig/debian/README.Debian.diet
+++ twoftpd-1.41/debian/README.Debian.diet
@@ -0,0 +1,15 @@
+Building twoftpd with the diet libc
+-----------------------------------
+
+This package optionally can be built with the diet libc instead of the glibc
+to provide small statically linked programs.  The resulting package has no
+dependency on any other package.
+
+To use the diet libc, make sure the latest versions of the dietlibc-dev and
+bglibs-dev packages are installed, and set DEB_BUILD_OPTIONS=diet in the
+environment when building the package, e.g.:
+
+ # apt-get install dietlibc-dev bglibs-dev
+ $ DEB_BUILD_OPTIONS=diet fakeroot apt-get source -b twoftpd
+
+ -- Gerrit Pape <pape@smarden.org>, Sat, 22 Jan 2005 12:25:41 +0000
--- twoftpd-1.41.orig/debian/changelog
+++ twoftpd-1.41/debian/changelog
@@ -0,0 +1,243 @@
+twoftpd (1.41-1) unstable; urgency=low
+
+  * debian/twoftpd-run.postrm: purge: services' supervise dirs are now
+    located in /var/lib/supervise/, remove those; purge: remove log
+    files.
+  * new upstream version.
+  * debian/diff/0002-Makefile-force-use-of-cvm-v1client-lib-cvm...diff:
+    remove; obsolete.
+  * debian/diff/0003-Makefile-avoid-rpath.diff: new; avoid rpath.
+  * debian/control: Standards-Version: 3.8.4.0.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 19 Apr 2010 22:34:18 +0000
+
+twoftpd (1.21-8) unstable; urgency=low
+
+  * debian/control: Build-Depends: libbg1-dev, libcvm1-dev; add
+    Vcs-Git:.
+  * debian/diff/0002-Makefile-force-use-of-cvm-v1client-lib...diff:
+    new: Makefile: force use of cvm-v1client lib, cvm-client now
+    defaults to v2.
+  * debian/twoftpd.README.Debian, debian/twoftpd-run.README.Debian:
+    talk about the update-service program, instead of dealing with
+    service directory symlinks manually.
+  * debian/diff/0003-TARGETS-remove-.html-they-re-shipped...diff: new:
+    TARGETS: remove *.html, they're shipped in orig.tar.gz.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 25 May 2008 18:51:16 +0000
+
+twoftpd (1.21-7) unstable; urgency=low
+
+  * debian/control: package twoftpd-run: Depends: runit (>= 1.8.0-2) (fix
+    typo).
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 20 Feb 2008 09:27:31 +0000
+
+twoftpd (1.21-6) unstable; urgency=low
+
+  * debian/control: package twoftpd-run: Depends: runit (>> 1.8.0-2) (1st
+    version that provides the update-service program).
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 17 Feb 2008 16:07:58 +0000
+
+twoftpd (1.21-5) unstable; urgency=low
+
+  * debian/implicit: add proper dependencies to support 'parallel build'
+    through make -j (thx Daniel Schepler for the patch).
+  * debian/diff/debian-conf.diff: redo with git as
+    debian/diff/0001-conf.c-use-ipsvd-and-runit-tools-instead-og-ucspi.diff.
+  * debian/rules: apply patches from debian/diff/ with -p1 instead of -p0.
+  * debian/twoftpd-run.postinst, debian/twoftpd-run.prerm,
+    debian/twoftpd-run.postrm: use runit's update-service program to
+    add/remove the twoftpd services, instead of dealing with symlinks in
+    /var/service/ directly (closes: #464951).
+  * debian/control: Standards-Version: 3.7.3.0.
+  * debian/rules: no longer include symlinks for ./supervise/ subdirectories,
+    update-service now takes care of this; no longer include directories in
+    /var/run/.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 17 Feb 2008 15:50:34 +0000
+
+twoftpd (1.21-4) unstable; urgency=medium
+
+  * debian/etc/twoftpd/run, debian/etc/twoftpd-anon/run: raise memory limit
+    for services from 3MB to 7MB (amd64 requires at least 6.5MB, thx Alvaro
+    Herrera; closes: #400118).
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 19 Dec 2006 20:21:08 +0000
+
+twoftpd (1.21-3) unstable; urgency=medium
+
+  * debian/twoftpd-run.postrm: check for deluser being available, if not,
+    print warning and don't remove system users (ref: #398539); suppress
+    error message if directories cannot be removed on purge.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 17 Nov 2006 20:12:41 +0000
+
+twoftpd (1.21-2) unstable; urgency=low
+
+  * debian/twoftpd-run.postinst: don't make the log service system user
+    ftplog member of group adm, but nogroup; ftplog's home directory is
+    /nonexistent; make log directories mode 2750, owner ftplog:adm (closes:
+    #396687).
+
+ -- Gerrit Pape <pape@smarden.org>  Mon,  6 Nov 2006 20:30:50 +0000
+
+twoftpd (1.21-1) unstable; urgency=low
+
+  * new upstream release.
+  * debian/twoftod.docs: add twoftpd-auth.1.html, twoftpd-switch.1.html,
+    twoftpd-xfer.1.html.
+  * debian/diff/libbg.diff: remove; obsolete.
+  * debian/rules: adapt.
+  * debian/control: Build-Depends: man2html.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon,  1 May 2006 18:53:37 +0000
+
+twoftpd (1.20-3) unstable; urgency=low
+
+  * debian/twoftpd-run.prerm: use sv program instead of svwaitdown to
+    shutdown services.
+  * debian/control: twoftpd-run Depends: runit (>> 1.3.0-0), adduser.
+  * debian/twoftpd-run.postrm: minor.
+  * debian/twoftpd-run.postinst: on configure always enable twoftpd service
+    if twoftpd-anon service isn't used.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 12 Oct 2005 10:36:15 +0000
+
+twoftpd (1.20-2) unstable; urgency=low
+
+  * debian/diff/libbg.diff: new; upstream Makefile: add -lbg when linking
+    inst* programs (required by recent bglibs >> 1.021-0).
+  * debian/control: fix typos in long descriptions (closes: #300055,
+    #300056); remove version restrictions from Build-Depends: bglibs-dev,
+    cvm-dev; Standards-Version: 3.6.2.0.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun,  3 Jul 2005 14:06:52 +0000
+
+twoftpd (1.20-1) unstable; urgency=low
+
+  * new upstream release.
+  * debian/implicit: update to revision 1.10.
+  * debian/twoftpd.README.Debian: minor; remove statement about contrib/
+    directory.
+  * twoftpd-run.README.Debian: minor.
+  * debian/control: Build-Depends: bglibs-dev (>> 1.019-0), cvm-dev (>>
+    0.32-0); minor.
+  * debian/copyright: adapt, 2005; remove copyright statement about contrib/
+    directory.
+  * debian/rules: cleanup; support diet, noopt in DEB_BUILD_OPTIONS; no longer
+    build, install contrib/set-tcp-env.
+  * twoftpd-run.postinst, twoftpd-run.postrm, twoftpd-run.prerm: cleanup.
+  * debian/README.Debian.diet: new; how to build package with the diet libc.
+  * debian/twoftpd.docs: add debian/README.Debian.diet.
+  * contrib/: remove; this package no longer provides the set-tcp-env program.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat, 22 Jan 2005 18:03:03 +0000
+
+twoftpd (1.17-6) unstable; urgency=low
+
+  * debian/control: no longer Build-Depends: debhelper; Standards-Version:
+    3.6.1.0.
+  * debian/rules: stop using debhelper, use implicit rules.
+  * debian/implicit: new; implicit Makefile rules.
+  * debian/copyright: include explicit copyright statement; contrib/ and
+    debian/ is in the Public domain.
+  * debian/README.Debian: rename to debian/twoftpd.README.Debian.
+  * debian/dirs, debian/docs, debian/twoftpd-run.dirs,
+    debian/twoftpd-run.links: remove; obsolete.
+  * debian/twoftpd-run.conffiles, debian/twoftpd.docs: new.
+  * debian/twoftpd-run.postinst, debian/twoftpd-run.postrm,
+    debian/twoftpd-run.prerm: minor cleanup.
+  * debian/etc/twoftpd/run, debian/etc/twoftpd-anon/run: raise memory limit
+    to 3000000.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 29 Dec 2003 15:34:08 +0000
+
+twoftpd (1.17-5) unstable; urgency=low
+
+  * debian/control: bglibs-dev no longer provides cvm development files,
+    hence Build-Depends: bglibs-dev (>> 1.011-0), cvm-dev (>> 0.18-0)
+    (closes: #223217).
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 10 Dec 2003 09:42:07 +0000
+
+twoftpd (1.17-4) unstable; urgency=low
+
+  * debian/control: package twoftpd: Recommends: runit (>> 0.11.2-0);
+    package twoftpd-run: Depends: runit (>> 0.11.2-0) (closes: #212315).
+
+ -- Gerrit Pape <pape@smarden.org>  Thu, 25 Sep 2003 11:27:12 +0000
+
+twoftpd (1.17-3) unstable; urgency=low
+
+  * debian/control: new package twoftpd-run: provides ftp service (listener
+    on 0.0.0.0:21); Provides: ftp-server, Conflicts: ftp-server, Depends:
+    twoftpd, runit (>> 0.11.0-0), ipsvd, cvm (closes: #204214).
+  * debian/control: package twoftpd: provides programs only, Recommends:
+    twoftpd-run, runit (>> 0.11.0-0), ipsvd, cvm.
+  * debian/control: Standards-Version: 3.6.0; adapt long descriptions.
+  * debian/rules: build binary-indep package twoftpd-run.
+  * debian/diff/debian-conf.diff: adapt, make twoftpd-conf and
+    twoftpd-anon-conf utilize the chpst program from the runit package.
+  * debian/etc/*: new; twoftpd and twoftpd-anon service directories.
+  * debian/twoftpd-run.dirs, debian/twoftpd-run.links,
+    debian/twoftpd-run.postinst, debian/twoftpd-run.postrm,
+    debian/twoftpd-run.prerm, debian/twoftpd-run.README.Debian: new.
+  * contrib/daemontools-pd-0.76/error.h: '#include <errno.h>' instead of
+    'extern int errno;'.
+  * debian/README.inetd, debian/in.twoftpd, debian/in.twoftpd-anon: remove;
+    obsolete, the package no longer provides running twoftpd services from
+    inetd.
+  * debian/undocumented, debian/examples: remove; obsolete.
+  * debian/docs: adapt.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 24 Aug 2003 19:18:09 +0200
+
+twoftpd (1.17-2) unstable; urgency=low
+
+  * debian/diff/debian-conf.diff: new; change twoftpd-conf and
+    twoftpd-anon-conf to create service directories that utilize programs
+    from the runit and ipsvd packages.
+  * debian/control: Recommends: runit, ipsvd; remove Suggests:;
+    Standards-Version: 3.5.10.
+  * debian/README.Debian: instructions on how to configure and enable
+    twoftpd services.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat,  5 Jul 2003 15:38:34 +0200
+
+twoftpd (1.17-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/control: Standards-Version: 3.5.8; Build-Depends: bglibs-dev
+    (>> 1.006-0); Recommends: runit | daemontools.
+  * debian/copyright: refer to common-licenses/GPL-2.
+  * debian/rules: minor adaptions.
+
+ -- Gerrit Pape <pape@smarden.org>  Thu,  6 Mar 2003 14:04:09 +0100
+
+twoftpd (1.16-1) unstable; urgency=low
+
+  * new upstream version; Build-Depends on bglibs-dev.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 25 Jun 2002 15:56:26 +0200
+
+twoftpd (1.15-1) unstable; urgency=low
+
+  * new upstream version.
+  * unexpected UID setting fix: included in upstream.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 19 Apr 2002 11:52:09 +0200
+
+twoftpd (1.14-1) unstable; urgency=low
+
+  * Initial Release (closes: #119871)
+  * contrib/ added
+  * example configuration for use with inetd
+  * unexpected UID setting fixed in twoftpd-anon-conf.c
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 23 Nov 2001 16:15:12 +0100
+
+Local variables:
+mode: debian-changelog
+End:
--- twoftpd-1.41.orig/debian/control
+++ twoftpd-1.41/debian/control
@@ -0,0 +1,41 @@
+Source: twoftpd
+Section: net
+Priority: optional
+Maintainer: Gerrit Pape <pape@smarden.org>
+Build-Depends: libbg1-dev, libcvm1-dev, man2html
+Standards-Version: 3.8.4.0
+Vcs-Git: http://smarden.org/git/twoftpd.git/
+
+Package: twoftpd
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: twoftpd-run, runit, ipsvd, cvm
+Description: a simple secure efficient FTP server (programs)
+ This is twoftpd, an FTP server that strives to be secure, simple, and
+ efficient.  None of the commands can cause execution of other programs,
+ and the normal model of execution does a chroot to the logged in user's
+ directory immediately after authentication.
+ .
+ The name "twoftpd" comes from the fact that there were two parts to the
+ server -- an authenticating front end, which contains no file or data
+ transfer code, and a back end, which contains all the data transfer
+ code.
+ .
+ This package contains the twoftpd programs.
+
+Package: twoftpd-run
+Architecture: all
+Section: admin
+Depends: twoftpd, runit (>= 1.8.0-2), ipsvd, cvm, adduser
+Provides: ftp-server
+Conflicts: ftp-server
+Suggests: runit-run
+Description: a simple secure efficient FTP server
+ This is twoftpd, an FTP server that strives to be secure, simple, and
+ efficient.  None of the commands can cause execution of other programs,
+ and the normal model of execution does a chroot to the logged in user's
+ directory immediately after authentication.
+ .
+ This package sets up the twoftpd service to listen on 0.0.0.0:21, and
+ additionally provides a service directory to run an anonymous twoftpd
+ service.
--- twoftpd-1.41.orig/debian/copyright
+++ twoftpd-1.41/debian/copyright
@@ -0,0 +1,15 @@
+This package was debianized by Gerrit Pape <pape@smarden.org> on
+Mon, 19 Nov 2001 13:25:17 +0100.
+
+It was downloaded from http://untroubled.org/twoftpd/
+
+Upstream Author: Bruce Guenter <bruceg@em.ca>
+
+Copyright:
+
+This program is Copyright(C) 2001-2005 Bruce Guenter, and may be copied
+according to the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 or a later
+version.  A copy of this license is included with this package.  This
+package comes with no warranty of any kind.
+
+The full text of the GPL can be found at /usr/share/common-licenses/GPL-2.
--- twoftpd-1.41.orig/debian/implicit
+++ twoftpd-1.41/debian/implicit
@@ -0,0 +1,93 @@
+# $Id: a09db2e42c8b6a2d820754d741558e5894944746 $
+
+.PHONY: deb-checkdir deb-checkuid
+
+deb-checkdir:
+	@test -e debian/control || sh -cx '! : wrong directory'
+deb-checkuid:
+	@test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
+
+%.deb: %.deb-docs %.deb-DEBIAN
+	@rm -f $*.deb $*.deb-checkdir $*.deb-docs $*.deb-docs-base \
+	  $*.deb-docs-docs $*.deb-docs-examples $*.deb-DEBIAN \
+	  $*.deb-DEBIAN-dir $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
+
+%.udeb: %.deb-DEBIAN
+	@rm -f $*.deb $*.deb-checkdir $*.deb-DEBIAN $*.deb-DEBIAN-dir \
+	  $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
+
+%.deb-checkdir: install
+	@test -d debian/$* || sh -cx '! : directory debian/$* missing'
+	@test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
+
+%.deb-docs-base: install
+	: implicit
+	@rm -f debian/$*/usr/share/doc/$*/* || :
+	@install -d -m0755 debian/$*/usr/share/doc/$*
+	: debian/$*/usr/share/doc/$*/
+	@sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/'
+	@sh -cx 'install -m0644 debian/changelog \
+	  debian/$*/usr/share/doc/$*/changelog.Debian'
+	@test ! -r changelog || \
+	  sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/'
+	@test -r debian/$*/usr/share/doc/$*/changelog || \
+	  sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \
+	    debian/$*/usr/share/doc/$*/changelog'
+	@test -s debian/$*/usr/share/doc/$*/changelog || \
+	  sh -cx 'rm -f debian/$*/usr/share/doc/$*/changelog'
+	@gzip -9 debian/$*/usr/share/doc/$*/changelog*
+%.deb-docs-docs: %.deb-docs-base
+	@for i in `cat debian/$*.docs 2>/dev/null || :`; do \
+	  if test -d $$i; then \
+	    sh -cx "install -d -m0755 debian/$*/usr/share/doc/$*/$${i##*/}" && \
+	    for j in $$i/*; do \
+	      sh -cx "install -m0644 $$j \
+	        debian/$*/usr/share/doc/$*/$${i##*/}/" || exit 1; \
+	    done || exit 1; \
+	    continue; \
+	  fi; \
+	  sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \
+	done
+	@test ! -r debian/$*.README.Debian || \
+	  sh -cx 'install -m0644 debian/$*.README.Debian \
+	    debian/$*/usr/share/doc/$*/README.Debian'
+	@if test -r debian/$*.NEWS.Debian; then \
+	  sh -cx 'install -m0644 debian/$*.NEWS.Debian \
+	    debian/$*/usr/share/doc/$*/NEWS.Debian && \
+	      gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \
+	fi
+%.deb-docs-examples: %.deb-docs-docs
+	@rm -rf debian/$*/usr/share/doc/$*/examples
+	: debian/$*/usr/share/doc/$*/examples/
+	@test ! -r debian/$*.examples || \
+	  install -d -m0755 debian/$*/usr/share/doc/$*/examples
+	@for i in `cat debian/$*.examples 2>/dev/null || :`; do \
+	  sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \
+	    || exit 1; \
+	done
+%.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples
+	: debian/$*/usr/share/doc/$*/ ok
+
+%.deb-DEBIAN-base: install
+	@rm -rf debian/$*/DEBIAN
+	: debian/$*/DEBIAN/
+	@install -d -m0755 debian/$*/DEBIAN
+	@for i in conffiles shlibs templates; do \
+	  test ! -r debian/$*.$$i || \
+	    sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \
+	      || exit 1; \
+	done
+%.deb-DEBIAN-scripts: %.deb-DEBIAN-base
+	@for i in preinst prerm postinst postrm config; do \
+	  test ! -r debian/$*.$$i || \
+	    sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \
+	      || exit 1; \
+	done
+%.deb-DEBIAN-md5sums: %.deb-DEBIAN-base %.deb-docs
+	: debian/$*/DEBIAN/md5sums
+	@rm -f debian/$*/DEBIAN/md5sums
+	@cd debian/$* && find * -path 'DEBIAN' -prune -o \
+	  -type f -exec md5sum {} >>DEBIAN/md5sums \;
+%.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \
+	  %.deb-DEBIAN-md5sums
+	: debian/$*/DEBIAN/ ok
--- twoftpd-1.41.orig/debian/rules
+++ twoftpd-1.41/debian/rules
@@ -0,0 +1,109 @@
+#!/usr/bin/make -f
+
+STRIP =strip
+ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+  STRIP =: nostrip
+endif
+
+CFLAGS =-g -O2 -Wall
+LDFLAGS =
+CC =gcc
+BGLIBS =/usr/lib/bglibs
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CFLAGS =-g -O0 -Wall
+endif
+ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
+  CC =diet -v -Os gcc -nostdinc
+  BGLIBS =/usr/lib/diet/bglibs
+endif
+
+DIR =$(shell pwd)/debian/twoftpd
+
+patch: deb-checkdir patch-stamp
+patch-stamp:
+	for i in `ls -1 debian/diff/*.diff || :`; do \
+	  patch -p1 <$$i || exit 1; \
+	done
+	touch patch-stamp
+
+build: deb-checkdir build-arch-stamp build-indep-stamp
+
+build-arch: deb-checkdir build-arch-stamp
+build-arch-stamp: patch-stamp
+	-gcc -v
+	for i in conf-*; do \
+	  test -e $${i%'{orig}'}'{orig}' || cp -v $$i $$i'{orig}'; \
+	done
+	echo '$(CC) $(CFLAGS)' >conf-cc
+	echo '$(CC) $(LDFLAGS)' >conf-ld
+	echo '/usr/bin' >conf-bin
+	echo '$(BGLIBS)/include' >conf-bgincs
+	echo '$(BGLIBS)/lib' >conf-bglibs
+	$(MAKE)
+	touch build-arch-stamp
+
+build-indep: deb-checkdir build-indep-stamp
+build-indep-stamp: 
+	touch build-indep-stamp
+
+clean: deb-checkdir deb-checkuid
+	$(MAKE) clean
+	for i in `ls *'{orig}' || :`; do mv -vf $$i $${i%'{orig}'}; done
+	test ! -e patch-stamp || \
+	  for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done
+	rm -f build-arch-stamp build-indep-stamp patch-stamp
+	rm -rf '$(DIR)' '$(DIR)'-run
+	rm -f debian/files debian/substvars changelog
+
+install: install-arch install-indep
+install-arch: deb-checkdir deb-checkuid build-arch-stamp
+	rm -rf '$(DIR)'
+	install -d -m0755 '$(DIR)'/usr/bin
+	install -d -m0755 '$(DIR)'/usr/share/man/man1
+	echo '$(DIR)'/usr/bin >conf-bin
+	echo '$(DIR)'/usr/share/man >conf-man
+	PATH=$$PATH:/usr/lib/bglibs/bin/ $(MAKE) install
+	$(STRIP) -R .comment -R .note '$(DIR)'/usr/bin/*
+	chmod 0644 '$(DIR)'/usr/share/man/man1/*.1
+	gzip -9 '$(DIR)'/usr/share/man/man1/*.1
+	test -r changelog || ln -s ChangeLog changelog
+
+install-indep: deb-checkdir deb-checkuid build-indep-stamp
+	rm -rf '$(DIR)'-run
+	install -d -m0755 '$(DIR)'-run/etc/twoftpd/log
+	install -d -m0755 '$(DIR)'-run/etc/twoftpd/env
+	install -m0755 debian/etc/twoftpd/run '$(DIR)'-run/etc/twoftpd/
+	install -m0755 debian/etc/twoftpd/log/run '$(DIR)'-run/etc/twoftpd/log/
+	for i in debian/etc/twoftpd/env/*; do \
+	  test -d $$i || install -m0644 $$i '$(DIR)'-run/etc/twoftpd/env/ \
+	    || exit 1; \
+	done
+	install -d -m0755 '$(DIR)'-run/etc/twoftpd-anon/log
+	install -d -m0755 '$(DIR)'-run/etc/twoftpd-anon/env
+	install -m0755 debian/etc/twoftpd-anon/run \
+	  '$(DIR)'-run/etc/twoftpd-anon/run
+	install -m0755 debian/etc/twoftpd-anon/log/run \
+	  '$(DIR)'-run/etc/twoftpd-anon/log/run
+	for i in debian/etc/twoftpd-anon/env/*; do \
+	  test -d $$i || install -m0644 $$i '$(DIR)'-run/etc/twoftpd-anon/env/ \
+	    || exit 1; \
+	done
+	install -d -m0755 '$(DIR)'-run/var/log/twoftpd
+	install -d -m0755 '$(DIR)'-run/var/log/twoftpd-anon
+	test -r changelog || ln -s ChangeLog changelog
+
+binary-arch: deb-checkdir deb-checkuid install-arch twoftpd.deb
+	test '$(CC)' != 'gcc' || dpkg-shlibdeps '$(DIR)'/usr/bin/*
+	dpkg-gencontrol -isp -ptwoftpd -P'$(DIR)'
+	dpkg -b '$(DIR)' ..
+
+binary-indep: deb-checkdir deb-checkuid install-indep twoftpd-run.deb
+	dpkg-gencontrol -isp -ptwoftpd-run -P'$(DIR)'-run
+	dpkg -b '$(DIR)'-run ..
+
+binary: binary-indep binary-arch
+
+.PHONY: patch build build-arch build-indep clean install install-arch \
+install-indep binary-arch binary-indep binary
+
+include debian/implicit
--- twoftpd-1.41.orig/debian/twoftpd-run.README.Debian
+++ twoftpd-1.41/debian/twoftpd-run.README.Debian
@@ -0,0 +1,32 @@
+twoftpd-run for Debian
+----------------------
+
+This package sets up the twoftpd service to listen on 0.0.0.0:21, and
+additionally provides a service directory to set up an anonymous twoftpd
+service.
+
+The twoftpd service directory is /etc/twoftpd/, the twoftpd-anon service
+directory is /etc/twoftpd-anon/.  The installation of this package
+automatically adds the twoftpd service to runit's service supervision
+through the update-service(8) program.  Please see the documentation of
+the runit package on how this works.
+
+To enable the twoftpd-anon anonymous ftp service, just run the
+update-service(8) program manually, e.g.
+
+ # update-service --add /etc/twoftpd-anon
+
+Note that you cannot run the default twoftpd and twoftpd-anon services
+simultaneously unless you specify separate IP addresses or ports for the
+services to listen on.  To do so, edit the corresponding run scripts
+/etc/twoftpd/run and /etc/twoftpd-anon/run.
+
+The twoftpd-run package provides the virtual package ``ftp-server'' and
+conflicts with other packages providing ``ftp-server''.  This ensures that
+twoftpd is the only service that listens on the address 0.0.0.0:21 on a
+system, and also satisfies packages that depend on a running ftp service.
+The twoftpd package without the twoftpd-run package can be installed
+alongside other ftp-server packages on a system, e.g. to provide different
+ftp services on different addresses simultaneously.
+
+ -- Gerrit Pape <pape@smarden.org>, Sun, 24 Aug 2003 19:08:49 +0200
--- twoftpd-1.41.orig/debian/twoftpd-run.conffiles
+++ twoftpd-1.41/debian/twoftpd-run.conffiles
@@ -0,0 +1,11 @@
+/etc/twoftpd/log/run
+/etc/twoftpd/env/CHROOT
+/etc/twoftpd/run
+/etc/twoftpd-anon/log/run
+/etc/twoftpd-anon/env/CHROOT
+/etc/twoftpd-anon/env/GID
+/etc/twoftpd-anon/env/GROUP
+/etc/twoftpd-anon/env/HOME
+/etc/twoftpd-anon/env/UID
+/etc/twoftpd-anon/env/USER
+/etc/twoftpd-anon/run
--- twoftpd-1.41.orig/debian/twoftpd-run.postinst
+++ twoftpd-1.41/debian/twoftpd-run.postinst
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+test "$1" = 'configure' || exit 0
+
+getent passwd ftp >/dev/null || \
+  adduser --system --home /var/ftp --no-create-home ftp
+getent passwd ftplog >/dev/null || \
+  adduser --system --home /nonexistent --no-create-home ftplog
+
+READD=twoftpd
+test -z "$2" || dpkg --compare-versions "$2" gt '1.21-4' || {
+  update-service --remove /etc/twoftpd 2>/dev/null || :
+  if update-service --check twoftpd-anon; then
+    update-service --remove /etc/twoftpd-anon || :
+    READD=twoftpd-anon
+  fi
+  sleep 6
+  for i in twoftpd twoftpd-anon; do
+    rm -rf /var/run/$i /var/run/$i.log
+  done
+}
+update-service --add /etc/$READD
+
+test -z "$2" || exit 0
+
+# new install
+chown ftplog:adm /var/log/twoftpd /var/log/twoftpd-anon
+chmod 2750 /var/log/twoftpd /var/log/twoftpd-anon
--- twoftpd-1.41.orig/debian/twoftpd-run.postrm
+++ twoftpd-1.41/debian/twoftpd-run.postrm
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+test "$1" = 'purge' || exit 0
+
+sv force-stop /etc/twoftpd /etc/twoftpd-anon 2>/dev/null || :
+for i in twoftpd twoftpd-anon; do
+  rm -rf /etc/$i/supervise /etc/$i/log/supervise
+  rm -rf /var/lib/supervise/$i /var/lib/supervise/$i.log 
+done
+
+for i in twoftpd twoftpd-anon; do
+  for j in '@*' current config lock state; do
+    rm -f /var/log/$i/$j
+  done
+  rmdir /var/log/$i || :
+done
+
+getent passwd ftp >/dev/null || getent passwd ftplog >/dev/null || exit 0
+if ! deluser --version >/dev/null 2>&1; then
+  echo 'deluser program not available, not removing system users "ftp", "ftplog".' >&2
+  exit 0
+fi
+deluser ftp
+deluser ftplog
--- twoftpd-1.41.orig/debian/twoftpd-run.prerm
+++ twoftpd-1.41/debian/twoftpd-run.prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+test "$1" = 'remove' || test "$1" = 'deconfigure' || \
+  test "$1" = 'failed-upgrade' || exit 0
+
+for i in twoftpd twoftpd-anon; do
+  update-service --remove /etc/$i 2>/dev/null || :
+done
--- twoftpd-1.41.orig/debian/twoftpd.README.Debian
+++ twoftpd-1.41/debian/twoftpd.README.Debian
@@ -0,0 +1,49 @@
+twoftpd for Debian
+------------------
+
+The binaries are installed in /usr/bin/.  Normally the twoftpd services are
+run under tcpserver from the ucspi-tcp package, set up with the daemontools
+package to log to a multilog process.
+
+In Debian, the twoftpd-conf and twoftpd-anon-conf programs are changed to
+create service directories that utilize programs from the runit and ipsvd
+packages instead.
+
+If you want to run twoftpd as default ftp service on your machine, install
+the twoftpd-run package.  The twoftpd-run package sets up the twoftpd service
+to listen on 0.0.0.0:21, and additionally provides a service directory to set
+up an anonymous twoftpd service.
+
+If you want another ftp-server to be installed as the default, and to run a
+twoftpd service for example on a virtual interface, you can use the
+twoftpd-conf program to create a service directory
+
+ # twoftpd-conf logacct /etc/twoftpd4 /var/log/twoftpd4 cvm 1.2.3.4 1
+
+where logacct is a user name, the logging process will run under the uid
+and gid of logacct; /etc/twoftpd4 is the service directory; /var/log/twoftpd4
+is the log directory; 1.2.3.4 the IP address the service listens on, and cvm
+is a credential validation module (from the cvm package, .e.g. cvm-unix).
+
+To configure an anonymous twoftpd service, use the twoftpd-anon-conf program
+
+ # twoftpd-anon-conf acct logacct /etc/twoftpd-anon4 /var/log/twoftpd-anon4 \
+     /var/ftp 1.2.3.4
+
+where acct and logacct are user names, the twoftpd-anon process will run
+under the uid and gid of acct, and the logging process will run under the
+uid and gid of logacct; /etc/twoftpd-anon4 is the service directory;
+/var/log/twoftpd-anon4 is the log directory; and /var/ftp is the ftp root.
+
+To enable twoftpd services, make sure that the ipsvd and runit packages
+are installed, and runit's service supervision is enabled.  Then use the
+update-service(8) program, e.g.
+
+ # update-service --add /etc/twoftpd-anon4
+
+The service will be started within 5 seconds and automatically on system
+boot.
+
+Running twoftpd services from inetd is no longer supported by this package.
+
+ -- Gerrit Pape <pape@smarden.org>, Sat, 05 Jul 2003 15:37:17 +0200
--- twoftpd-1.41.orig/debian/twoftpd.docs
+++ twoftpd-1.41/debian/twoftpd.docs
@@ -0,0 +1,9 @@
+ANNOUNCEMENT
+NEWS
+README
+TODO
+VERSION
+twoftpd-auth.1.html
+twoftpd-switch.1.html
+twoftpd-xfer.1.html
+debian/README.Debian.diet
--- twoftpd-1.41.orig/debian/etc/twoftpd/run
+++ twoftpd-1.41/debian/etc/twoftpd/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+umask 022
+exec \
+tcpsvd -v -llocalhost 0 21 \
+  chpst -m7000000 -e./env \
+    twoftpd-auth cvm-unix twoftpd-xfer
--- twoftpd-1.41.orig/debian/etc/twoftpd/env/CHROOT
+++ twoftpd-1.41/debian/etc/twoftpd/env/CHROOT
@@ -0,0 +1 @@
+1
--- twoftpd-1.41.orig/debian/etc/twoftpd/log/run
+++ twoftpd-1.41/debian/etc/twoftpd/log/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec \
+chpst -uftplog \
+  svlogd -t /var/log/twoftpd
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/run
+++ twoftpd-1.41/debian/etc/twoftpd-anon/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+umask 022
+exec \
+tcpsvd -v -llocalhost 0 21 \
+  chpst -m7000000 -e./env \
+    twoftpd-anon
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/env/CHROOT
+++ twoftpd-1.41/debian/etc/twoftpd-anon/env/CHROOT
@@ -0,0 +1 @@
+1
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/env/GID
+++ twoftpd-1.41/debian/etc/twoftpd-anon/env/GID
@@ -0,0 +1 @@
+65534
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/env/GROUP
+++ twoftpd-1.41/debian/etc/twoftpd-anon/env/GROUP
@@ -0,0 +1 @@
+ftp
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/env/HOME
+++ twoftpd-1.41/debian/etc/twoftpd-anon/env/HOME
@@ -0,0 +1 @@
+/var/ftp
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/env/UID
+++ twoftpd-1.41/debian/etc/twoftpd-anon/env/UID
@@ -0,0 +1 @@
+65534
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/env/USER
+++ twoftpd-1.41/debian/etc/twoftpd-anon/env/USER
@@ -0,0 +1 @@
+ftp
--- twoftpd-1.41.orig/debian/etc/twoftpd-anon/log/run
+++ twoftpd-1.41/debian/etc/twoftpd-anon/log/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec \
+chpst -uftplog \
+  svlogd -t /var/log/twoftpd-anon
--- twoftpd-1.41.orig/debian/diff/0001-conf.c-use-ipsvd-and-runit-tools-instead-og-ucspi-tcp.diff
+++ twoftpd-1.41/debian/diff/0001-conf.c-use-ipsvd-and-runit-tools-instead-og-ucspi-tcp.diff
@@ -0,0 +1,70 @@
+From e4f211556216b87c2c4e1c755370f358042e668b Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Sun, 17 Feb 2008 15:21:58 +0000
+Subject: [PATCH 1/2] *-conf.c: use ipsvd and runit tools instead og ucspi-tcp and daemontools.
+
+---
+ twoftpd-anon-conf.c |   11 +++++------
+ twoftpd-conf.c      |   16 +++++++---------
+ 2 files changed, 12 insertions(+), 15 deletions(-)
+
+diff --git a/twoftpd-anon-conf.c b/twoftpd-anon-conf.c
+index 2db7302..365b516 100644
+--- a/twoftpd-anon-conf.c
++++ b/twoftpd-anon-conf.c
+@@ -92,15 +92,14 @@ int main(int argc, char* argv[])
+ 	    "exec 2>&1\n"
+ 	    "umask 022\n"
+ 	    "exec \\\n"
+-	    "tcpserver -DRHv -llocalhost ", ip, " 21 \\\n"
+-	    "softlimit -m 2000000 \\\n"
+-	    "envdir ", maindir, "/env \\\n",
+-	    conf_bin, "/twoftpd-anon");
++	    "tcpsvd -v -llocalhost ", ip, " 21 \\\n"
++	    "  chpst -m2000000 -e./env \\\n"
++	    "    twoftpd-anon", 0, 0, 0, 0);
+   make_file("log/run", 0755,
+ 	    "#!/bin/sh\n"
+ 	    "exec \\\n"
+-	    "setuidgid ", logname, " \\\n"
+-	    "multilog t ", logdir, 0, 0, 0);
++	    "chpst -u", logname, " \\\n"
++	    "  svlogd -t ", logdir, 0, 0, 0);
+   make_fileu("env/CHROOT", 1);
+   make_fileu("env/GID", ftpgid);
+   make_file("env/HOME", 0644, ftpdir, 0, 0, 0, 0, 0, 0);
+diff --git a/twoftpd-conf.c b/twoftpd-conf.c
+index 8d98fed..8301be4 100644
+--- a/twoftpd-conf.c
++++ b/twoftpd-conf.c
+@@ -84,20 +84,18 @@ int main(int argc, char* argv[])
+ 	     "exec 2>&1\n"
+ 	     "umask 022\n"
+ 	     "exec \\\n"
+-	     "tcpserver -DRHv -llocalhost ", ip, " 21 \\\n"
+-	     "envdir ", maindir, "/env \\\n");
+-  obuf_put7s(&conf_out,
+-	     "softlimit -m 2000000 \\\n",
+-	     conf_bin, "/twoftpd-auth \\\n",
+-	     cvmpath, " \\\n",
+-	     conf_bin, "/twoftpd-xfer");
++	     "tcpsvd -v -llocalhost ", ip, " 21 \\\n"
++	     "  chpst -m2000000 -e./env \\\n"
++	     "    twoftpd-auth ",
++	     cvmpath,
++	     " twoftpd-xfer");
+   end_file();
+ 
+   make_file("log/run", 0755,
+ 	    "#!/bin/sh\n"
+ 	    "exec \\\n"
+-	    "setuidgid ", logacct->pw_name, " \\\n"
+-	    "multilog t ", logdir, 0, 0, 0);
++	    "chpst -u", logacct->pw_name, " \\\n"
++	    "  svlogd -t ", logdir, 0, 0, 0);
+   
+   if (dochroot) make_fileu("env/CHROOT", 1);
+   
+-- 
+1.7.0.3
+
--- twoftpd-1.41.orig/debian/diff/0002-TARGETS-remove-.html-they-re-shipped-in-orig.tar.gz.diff
+++ twoftpd-1.41/debian/diff/0002-TARGETS-remove-.html-they-re-shipped-in-orig.tar.gz.diff
@@ -0,0 +1,33 @@
+From 16ab56ea2a37e84de2c1f2375f6662bdfa0e5486 Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Sun, 25 May 2008 18:50:43 +0000
+Subject: [PATCH 2/2] TARGETS: remove *.html, they're shipped in orig.tar.gz.
+
+---
+ TARGETS |    3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+diff --git a/TARGETS b/TARGETS
+index e2f6190..239b6a1 100644
+--- a/TARGETS
++++ b/TARGETS
+@@ -35,7 +35,6 @@ twoftpd-anon-conf
+ twoftpd-anon-conf.o
+ twoftpd-anon.o
+ twoftpd-auth
+-twoftpd-auth.1.html
+ twoftpd-auth.o
+ twoftpd-bind-port
+ twoftpd-bind-port.o
+@@ -44,8 +43,6 @@ twoftpd-conf.o
+ twoftpd-drop
+ twoftpd-drop.o
+ twoftpd-switch
+-twoftpd-switch.1.html
+ twoftpd-switch.o
+ twoftpd-xfer
+-twoftpd-xfer.1.html
+ twoftpd-xfer.o
+-- 
+1.7.0.3
+
--- twoftpd-1.41.orig/debian/diff/0003-Makefile-avoid-rpath.diff
+++ twoftpd-1.41/debian/diff/0003-Makefile-avoid-rpath.diff
@@ -0,0 +1,25 @@
+From 10255ed86219ae64cc11c65089681c4b90ac023a Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Mon, 19 Apr 2010 22:20:11 +0000
+Subject: [PATCH 3/3] Makefile: avoid rpath
+
+---
+ Makefile |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 98136df..8c1edf5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,7 +59,7 @@ load: conf-ld conf-bglibs
+ 	( bglibs=`head -n 1 conf-bglibs`; \
+ 	  echo '#!/bin/sh';\
+ 	  echo 'main="$$1"; shift';\
+-	  echo exec `head -n 1 conf-ld` -L. "-L'$${bglibs}'" "-Wl,-R'$${bglibs}'" '-o "$$main" "$$main.o" $${1+"$$@"}' -lbg-sysdeps; \
++	  echo exec `head -n 1 conf-ld` -L. "-L'$${bglibs}'" '-o "$$main" "$$main.o" $${1+"$$@"}' -lbg-sysdeps; \
+ 	) >load
+ 	chmod 755 load
+ 
+-- 
+1.7.0.3
+