# HG changeset patch # User Tomas Zeman # Date 1200262473 -3600 # Node ID 32f160a66da48fa5b6cbd36bc9e16e11d20f42d8 # Parent ad6bd3a91cabd9a7b086a16e6f4776c738696767 Imported patches of my packages diff -r ad6bd3a91cab -r 32f160a66da4 bglibs.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bglibs.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,64 @@ +From 032fc53d88eab343f2476fdda6541ce9059d145d Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:30:16 +0100 +Subject: [PATCH] bglibs-1.102-1 + * added + +--- + source/custom/bglibs/FrugalBuild | 25 +++++++++++++++++++++++++ + source/custom/bglibs/libtool-tag.patch | 11 +++++++++++ + 2 files changed, 36 insertions(+), 0 deletions(-) + create mode 100644 source/custom/bglibs/FrugalBuild + create mode 100644 source/custom/bglibs/libtool-tag.patch + +diff --git a/source/custom/bglibs/FrugalBuild b/source/custom/bglibs/FrugalBuild +new file mode 100644 +index 0000000..100d694 +--- /dev/null ++++ b/source/custom/bglibs/FrugalBuild +@@ -0,0 +1,25 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=bglibs ++pkgver=1.102 ++pkgrel=1 ++pkgdesc="One stop library package" ++url="http://untroubled.org/bglibs/" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgname|grep .tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz libtool-tag.patch) ++sha1sums=('45d0df13d35d5b162378314f354dde76aa704977' \ ++ '63bbea48243e7e442e54701e90adcd5e89cb76bf') ++ ++build() { ++ Fcd $pkgname-$pkgver ++ patch -p0 < $Fsrcdir/libtool-tag.patch || Fdie ++ echo "/usr/include/bglibs" > conf-include ++ echo "/usr/lib" > conf-lib ++ echo "/usr/bin" > conf-bin ++ echo "/usr/man" > conf-man ++ ++ make || Fdie ++ make install_prefix=$Fdestdir install || Fdie ++} ++# vim: ft=sh +diff --git a/source/custom/bglibs/libtool-tag.patch b/source/custom/bglibs/libtool-tag.patch +new file mode 100644 +index 0000000..2172023 +--- /dev/null ++++ b/source/custom/bglibs/libtool-tag.patch +@@ -0,0 +1,11 @@ ++--- Makefile.orig 2006-10-30 22:11:21.000000000 +0100 +++++ Makefile 2007-10-25 00:00:46.000000000 +0200 ++@@ -991,7 +991,7 @@ ++ echo '#!/bin/sh'; \ ++ echo 'source=$$1; shift'; \ ++ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ ++- echo exec libtool --mode=compile --silent `head -n 1 conf-cc` -I. '-o $${base}.lo -c $$source $${1+"$$@"}'; \ +++ echo exec libtool --mode=compile --tag=CC --silent `head -n 1 conf-cc` -I. '-o $${base}.lo -c $$source $${1+"$$@"}'; \ ++ ) >libcompile ++ chmod 755 libcompile ++ +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 bincimap.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bincimap.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,81 @@ +From 577622cdbeed98322b7a5468e0ffa4f464fef003 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Thu, 29 Nov 2007 10:23:19 +0100 +Subject: [PATCH] bincimap-1.2.13-1-i686.fpm: + * added + +--- + source/custom/bincimap/FrugalBuild | 30 ++++++++++++++++++++++++++++++ + source/custom/bincimap/bincimap.install | 23 +++++++++++++++++++++++ + 2 files changed, 53 insertions(+), 0 deletions(-) + create mode 100644 source/custom/bincimap/FrugalBuild + create mode 100644 source/custom/bincimap/bincimap.install + +diff --git a/source/custom/bincimap/FrugalBuild b/source/custom/bincimap/FrugalBuild +new file mode 100644 +index 0000000..74900bf +--- /dev/null ++++ b/source/custom/bincimap/FrugalBuild +@@ -0,0 +1,30 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=bincimap ++pkgver=1.2.13 ++pkgrel=1 ++pkgdesc="A well designed, modular IMAP server for Maildir." ++url="http://www.bincimap.org" ++archs=(i686) ++up2date="lynx $url -dump -nolist|grep 'latest stable'|head -1|sed -e 's/.*is \([0-9].*[0-9]\) .*$/\1/'" ++depends=('openssl') ++install="$pkgname.install" ++backup=(etc/bincimap/bincimap.conf) ++source=($url/dl/tarballs/1.2/$pkgname-${pkgver}final.tar.bz2) ++sha1sums=('cdbc1bf95decbe76e0a218025c351b8174b4b485') ++provides=('imap-server') ++ ++build() { ++ Fcd $pkgname-${pkgver}final ++ ./configure --prefix=/usr --sysconfdir=/etc/bincimap \ ++ --localstatedir=/var --with-ssl ++ make || Fdie ++ make DESTDIR=$Fdestdir install || Fdie ++ ++ # clean up the files ++ Fmkdir /usr/lib/bincimap ++ Fmv /usr/libexec /usr/lib/bincimap/scripts ++ Fmv /var/service /usr/lib/bincimap/supervise ++ Frm /etc/bincimap/xinetd ++} ++# vim: ft=sh +diff --git a/source/custom/bincimap/bincimap.install b/source/custom/bincimap/bincimap.install +new file mode 100644 +index 0000000..ca80118 +--- /dev/null ++++ b/source/custom/bincimap/bincimap.install +@@ -0,0 +1,23 @@ ++post_install() { ++ cat << EOF ++ ++NOTE ++---- ++bincimap must be invoked through either xinetd or daemontools. ++Check the documentation on its webpage for more details. ++ ++EOF ++} ++ ++post_upgrade() { ++ /bin/true ++} ++ ++pre_remove() { ++ /bin/true ++} ++ ++op=$1 ++shift ++ ++$op $* +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 conn-tools.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conn-tools.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,53 @@ +From 1a3c412bdc1ba648a543563a965effcb47746582 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 6 Nov 2007 13:55:38 +0100 +Subject: [PATCH] conn-tools-0.21-1-i686 + * added + +--- + source/dietlibc/conn-tools/FrugalBuild | 33 ++++++++++++++++++++++++++++++++ + 1 files changed, 33 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/conn-tools/FrugalBuild + +diff --git a/source/dietlibc/conn-tools/FrugalBuild b/source/dietlibc/conn-tools/FrugalBuild +new file mode 100644 +index 0000000..04e4891 +--- /dev/null ++++ b/source/dietlibc/conn-tools/FrugalBuild +@@ -0,0 +1,33 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=conn-tools ++pkgver=0.21 ++pkgrel=1 ++pkgdesc="collection of miscellaneous utilities designed to help managing connections and communication between processes" ++url="http://www.skarnet.org/software/conn-tools/" ++depends=('execline>=1.06' 'skaembutils>=0.17') ++makedepends=(dietlibc 'skalibs>=0.45' 'execline>=1.06') ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgname|grep tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('be448c57f7c5195a2bd14c0f7e0e69573407893c') ++ ++build() { ++ sPATH=net ++ cd $Fsrcdir/$sPATH/$pkgname-$pkgver ++ ++ echo "diet gcc -nostdinc $CFLAGS" > conf-compile/conf-cc ++ echo "diet gcc -s -static" > conf-compile/conf-ld ++ ++ package/compile || Fdie ++ Fmkdir /package/$sPATH/$pkgname-$pkgver ++ cd $Fdestdir/package/$sPATH ++ rm -f $pkgname ++ ln -sf $pkgname-$pkgver $pkgname || Fdie ++ mv $Fsrcdir/$sPATH/$pkgname-$pkgver/command $Fdestdir/package/$sPATH/$pkgname || Fdie ++ Fmkdir /command ++ for cmd in `cat $Fsrcdir/$sPATH/$pkgname-$pkgver/package/command.exported`; do ++ ln -sf /package/$sPATH/$pkgname/command/$cmd $Fdestdir/command || Fdie ++ done; ++ mv $Fsrcdir/$sPATH/$pkgname-$pkgver/doc $Fdestdir/package/$sPATH/$pkgname || Fdie ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 cvm.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cvm.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,67 @@ +From e24e28e510a1fcc561b7d21d270b56b64dc3932b Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:30:41 +0100 +Subject: [PATCH] cvm-0.82-1 + * added + +--- + source/custom/cvm/FrugalBuild | 28 ++++++++++++++++++++++++++++ + source/custom/cvm/libtool-tag.patch | 11 +++++++++++ + 2 files changed, 39 insertions(+), 0 deletions(-) + create mode 100644 source/custom/cvm/FrugalBuild + create mode 100644 source/custom/cvm/libtool-tag.patch + +diff --git a/source/custom/cvm/FrugalBuild b/source/custom/cvm/FrugalBuild +new file mode 100644 +index 0000000..c9e0a4c +--- /dev/null ++++ b/source/custom/cvm/FrugalBuild +@@ -0,0 +1,28 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=cvm ++pkgver=0.82 ++pkgrel=1 ++pkgdesc="Credential Validation Modules" ++depends=('bglibs>=1.100') ++url="http://untroubled.org/cvm/" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgname|grep .tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz libtool-tag.patch) ++sha1sums=('ee66c6b987655fc9c43fe303cf339dd7d4a7dfae' \ ++ '391f6ea9ac261acf8f22d58f83381cd91b927ab4') ++ ++build() { ++ Fcd $pkgname-$pkgver ++ patch -p0 < $Fsrcdir/libtool-tag.patch || Fdie ++ echo "/usr/include/bglibs" > conf-bgincs ++ echo "/usr/lib" > conf-bglibs ++ echo "/usr/bin" > conf-bin ++ echo "/usr/include" > conf-include ++ echo "/usr/lib" > conf-lib ++ echo "gcc -s -L/usr/lib" > conf-ld ++ ++ make || Fdie ++ make install_prefix=$Fdestdir install || Fdie ++} ++# vim: ft=sh +diff --git a/source/custom/cvm/libtool-tag.patch b/source/custom/cvm/libtool-tag.patch +new file mode 100644 +index 0000000..c26bbcc +--- /dev/null ++++ b/source/custom/cvm/libtool-tag.patch +@@ -0,0 +1,11 @@ ++--- Makefile.orig 2006-09-07 00:41:57.000000000 +0200 +++++ Makefile 2007-10-26 22:16:53.000000000 +0200 ++@@ -186,7 +186,7 @@ ++ echo '#!/bin/sh'; \ ++ echo 'source=$$1; shift'; \ ++ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ ++- echo exec libtool --mode=compile --silent `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.lo -c $$source $${1+"$$@"}'; \ +++ echo exec libtool --mode=compile --tag=CC --silent `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.lo -c $$source $${1+"$$@"}'; \ ++ ) >libcompile ++ chmod 755 libcompile ++ +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-bglibs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-bglibs Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,71 @@ +From 79fdfdf8c906da690b889c754a47ef696db6d555 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Thu, 25 Oct 2007 00:13:17 +0200 +Subject: [PATCH] diet-bglibs-1.102-1-i686 + * added + +--- + source/dietlibc/diet-bglibs/FrugalBuild | 32 +++++++++++++++++++++++++ + source/dietlibc/diet-bglibs/libtool-tag.patch | 11 ++++++++ + 2 files changed, 43 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-bglibs/FrugalBuild + create mode 100644 source/dietlibc/diet-bglibs/libtool-tag.patch + +diff --git a/source/dietlibc/diet-bglibs/FrugalBuild b/source/dietlibc/diet-bglibs/FrugalBuild +new file mode 100644 +index 0000000..95d7e43 +--- /dev/null ++++ b/source/dietlibc/diet-bglibs/FrugalBuild +@@ -0,0 +1,32 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=bglibs ++pkgname=$branch-$pkgorig ++pkgver=1.102 ++pkgrel=1 ++pkgdesc="One stop library package" ++makedepends=(dietlibc gcc) ++provides=(bglibs) ++url="http://untroubled.org/bglibs/" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgorig-$pkgver.tar.gz libtool-tag.patch) ++sha1sums=('45d0df13d35d5b162378314f354dde76aa704977' \ ++ '63bbea48243e7e442e54701e90adcd5e89cb76bf') ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd $pkgorig-$pkgver ++ patch -p0 < $Fsrcdir/libtool-tag.patch ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ echo "$DDIR/bglibs/include" > conf-include ++ echo "$DDIR/bglibs/lib" > conf-lib ++ echo "$DDIR/bin" > conf-bin ++ echo "$DDIR/man" > conf-man ++ ++ make || Fdie ++ make install_prefix=$Fdestdir install || Fdie ++} ++# vim: ft=sh +diff --git a/source/dietlibc/diet-bglibs/libtool-tag.patch b/source/dietlibc/diet-bglibs/libtool-tag.patch +new file mode 100644 +index 0000000..2172023 +--- /dev/null ++++ b/source/dietlibc/diet-bglibs/libtool-tag.patch +@@ -0,0 +1,11 @@ ++--- Makefile.orig 2006-10-30 22:11:21.000000000 +0100 +++++ Makefile 2007-10-25 00:00:46.000000000 +0200 ++@@ -991,7 +991,7 @@ ++ echo '#!/bin/sh'; \ ++ echo 'source=$$1; shift'; \ ++ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ ++- echo exec libtool --mode=compile --silent `head -n 1 conf-cc` -I. '-o $${base}.lo -c $$source $${1+"$$@"}'; \ +++ echo exec libtool --mode=compile --tag=CC --silent `head -n 1 conf-cc` -I. '-o $${base}.lo -c $$source $${1+"$$@"}'; \ ++ ) >libcompile ++ chmod 755 libcompile ++ +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-bglibs-fix-path.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-bglibs-fix-path.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,35 @@ +From ab75b9c964bf3af0ffe45c028dfd1419356e8484 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:29:08 +0100 +Subject: [PATCH] diet-bglibs-1.102-1: fix installation paths + +--- + source/dietlibc/diet-bglibs/FrugalBuild | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/source/dietlibc/diet-bglibs/FrugalBuild b/source/dietlibc/diet-bglibs/FrugalBuild +index 2930ed6..088d632 100644 +--- a/source/dietlibc/diet-bglibs/FrugalBuild ++++ b/source/dietlibc/diet-bglibs/FrugalBuild +@@ -7,7 +7,6 @@ pkgver=1.102 + pkgrel=1 + pkgdesc="One stop library package" + makedepends=(dietlibc gcc) +-provides=(bglibs) + url="http://untroubled.org/bglibs/" + archs=(i686) + up2date='lynx -dump -nolist $url|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' +@@ -21,8 +20,8 @@ build() { + patch -p0 < $Fsrcdir/libtool-tag.patch || Fdie + echo "diet gcc $CFLAGS" > conf-cc + echo "diet gcc -s -static" > conf-ld +- echo "$DDIR/bglibs/include" > conf-include +- echo "$DDIR/bglibs/lib" > conf-lib ++ echo "$DDIR/include/bglibs" > conf-include ++ echo "$DDIR/lib" > conf-lib + echo "$DDIR/bin" > conf-bin + echo "$DDIR/man" > conf-man + +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-bglibs-fix.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-bglibs-fix.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,25 @@ +From e77b7a8c68f264af3953fdac5afa9fe719d1ae2b Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 26 Oct 2007 22:24:33 +0200 +Subject: [PATCH] diet-bglibs-1.102-1-i686: die on failed patch + +--- + source/dietlibc/diet-bglibs/FrugalBuild | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/source/dietlibc/diet-bglibs/FrugalBuild b/source/dietlibc/diet-bglibs/FrugalBuild +index 95d7e43..2930ed6 100644 +--- a/source/dietlibc/diet-bglibs/FrugalBuild ++++ b/source/dietlibc/diet-bglibs/FrugalBuild +@@ -18,7 +18,7 @@ sha1sums=('45d0df13d35d5b162378314f354dde76aa704977' \ + build() { + DDIR=/usr/lib/diet + Fcd $pkgorig-$pkgver +- patch -p0 < $Fsrcdir/libtool-tag.patch ++ patch -p0 < $Fsrcdir/libtool-tag.patch || Fdie + echo "diet gcc $CFLAGS" > conf-cc + echo "diet gcc -s -static" > conf-ld + echo "$DDIR/bglibs/include" > conf-include +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-cvm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-cvm Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,73 @@ +From 2db345c6f6940a69bbd7ecebc91339e0e4112e40 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 26 Oct 2007 22:23:42 +0200 +Subject: [PATCH] diet-cvm-0.82-1-i686 + * added + +--- + source/dietlibc/diet-cvm/FrugalBuild | 34 ++++++++++++++++++++++++++++ + source/dietlibc/diet-cvm/libtool-tag.patch | 11 +++++++++ + 2 files changed, 45 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-cvm/FrugalBuild + create mode 100644 source/dietlibc/diet-cvm/libtool-tag.patch + +diff --git a/source/dietlibc/diet-cvm/FrugalBuild b/source/dietlibc/diet-cvm/FrugalBuild +new file mode 100644 +index 0000000..ee85a0e +--- /dev/null ++++ b/source/dietlibc/diet-cvm/FrugalBuild +@@ -0,0 +1,34 @@ ++# $Id: PKGBUILD 335 2006-06-02 11:47:37Z zeman $ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=cvm ++pkgname=$branch-$pkgorig ++pkgver=0.82 ++pkgrel=1 ++pkgdesc="Credential Validation Modules" ++makedepends=(dietlibc gcc 'diet-bglibs>=1.100') ++provides=(cvm) ++url="http://untroubled.org/cvm/" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgorig-$pkgver.tar.gz libtool-tag.patch) ++sha1sums=('ee66c6b987655fc9c43fe303cf339dd7d4a7dfae' \ ++ '391f6ea9ac261acf8f22d58f83381cd91b927ab4') ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd $pkgorig-$pkgver ++ patch -p0 < $Fsrcdir/libtool-tag.patch || Fdie ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ echo "$DDIR/bglibs/include" > conf-bgincs ++ echo "$DDIR/bglibs/lib" > conf-bglibs ++ echo "/usr/bin" > conf-bin ++ echo "$DDIR/include" > conf-include ++ echo "$DDIR/lib" > conf-lib ++ ++ make || Fdie ++ make install_prefix=$Fdestdir PATH=$PATH:$DDIR/bin install || Fdie ++} ++# vim: ft=sh +diff --git a/source/dietlibc/diet-cvm/libtool-tag.patch b/source/dietlibc/diet-cvm/libtool-tag.patch +new file mode 100644 +index 0000000..c26bbcc +--- /dev/null ++++ b/source/dietlibc/diet-cvm/libtool-tag.patch +@@ -0,0 +1,11 @@ ++--- Makefile.orig 2006-09-07 00:41:57.000000000 +0200 +++++ Makefile 2007-10-26 22:16:53.000000000 +0200 ++@@ -186,7 +186,7 @@ ++ echo '#!/bin/sh'; \ ++ echo 'source=$$1; shift'; \ ++ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ ++- echo exec libtool --mode=compile --silent `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.lo -c $$source $${1+"$$@"}'; \ +++ echo exec libtool --mode=compile --tag=CC --silent `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.lo -c $$source $${1+"$$@"}'; \ ++ ) >libcompile ++ chmod 755 libcompile ++ +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-cvm-fix-path.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-cvm-fix-path.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,42 @@ +From 0f0cf3df56cce86bb8643e2989b451aa8504013e Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:29:42 +0100 +Subject: [PATCH] diet-cvm-0.82-1: fix installation paths + +--- + source/dietlibc/diet-cvm/FrugalBuild | 8 +++----- + 1 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/source/dietlibc/diet-cvm/FrugalBuild b/source/dietlibc/diet-cvm/FrugalBuild +index ee85a0e..6f389ab 100644 +--- a/source/dietlibc/diet-cvm/FrugalBuild ++++ b/source/dietlibc/diet-cvm/FrugalBuild +@@ -1,4 +1,3 @@ +-# $Id: PKGBUILD 335 2006-06-02 11:47:37Z zeman $ + # Maintainer: Tomas Zeman + + branch=diet +@@ -8,7 +7,6 @@ pkgver=0.82 + pkgrel=1 + pkgdesc="Credential Validation Modules" + makedepends=(dietlibc gcc 'diet-bglibs>=1.100') +-provides=(cvm) + url="http://untroubled.org/cvm/" + archs=(i686) + up2date='lynx -dump -nolist $url|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' +@@ -22,9 +20,9 @@ build() { + patch -p0 < $Fsrcdir/libtool-tag.patch || Fdie + echo "diet gcc $CFLAGS" > conf-cc + echo "diet gcc -s -static" > conf-ld +- echo "$DDIR/bglibs/include" > conf-bgincs +- echo "$DDIR/bglibs/lib" > conf-bglibs +- echo "/usr/bin" > conf-bin ++ echo "$DDIR/include/bglibs" > conf-bgincs ++ echo "$DDIR/lib" > conf-bglibs ++ echo "$DDIR/bin" > conf-bin + echo "$DDIR/include" > conf-include + echo "$DDIR/lib" > conf-lib + +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-daemontools.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-daemontools.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,107 @@ +From ebefdd0429b35e479073ee76d73f35ca55180d14 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 26 Oct 2007 23:15:37 +0200 +Subject: [PATCH] diet-daemontools-0.76-1-i686.fpm + * added + +--- + source/dietlibc/diet-daemontools/FrugalBuild | 42 ++++++++++++++++++++ + .../dietlibc/diet-daemontools/daemontools.install | 37 +++++++++++++++++ + 2 files changed, 79 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-daemontools/FrugalBuild + create mode 100644 source/dietlibc/diet-daemontools/daemontools.install + +diff --git a/source/dietlibc/diet-daemontools/FrugalBuild b/source/dietlibc/diet-daemontools/FrugalBuild +new file mode 100644 +index 0000000..3322f94 +--- /dev/null ++++ b/source/dietlibc/diet-daemontools/FrugalBuild +@@ -0,0 +1,42 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=daemontools ++pkgname=$branch-$pkgorig ++pkgver=0.76 ++pkgrel=1 ++pkgdesc="A collection of tools for managing UNIX services." ++makedepends=(dietlibc) ++license="public domain" ++backup=(etc/inittab) ++url="http://cr.yp.to/daemontools.html" ++archs=(i686) ++up2date='lynx -dump -nolist http://cr.yp.to/daemontools/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=(http://cr.yp.to/daemontools/daemontools-$pkgver.tar.gz \ ++ daemontools.install) ++sha1sums=('70a1be67e7dbe0192a887905846acc99ad5ce5b7' \ ++ '44a7617ed5dbbcbf1f962d6523eeec232504ef00') ++install="daemontools.install" ++provides=(daemontools) ++ ++build() { ++ mkdir -p $Fdestdir/package/admin ++ mv $Fsrcdir/admin/daemontools-$pkgver $Fdestdir/package/admin ++ cd $Fdestdir/package/admin/daemontools-$pkgver ++ ++ echo "diet gcc $CFLAGS" > src/conf-cc ++ echo "diet gcc -s -static" > src/conf-ld ++ ./package/compile || Fdie ++ ++ rm -rf compile ++ chown -R root.root $Fdestdir/package/ || Fdie ++ mkdir -p $Fdestdir/service || Fdie ++ mkdir -p $Fdestdir/usr/bin || Fdie ++ mkdir -p $Fdestdir/command || Fdie ++ for BIN in `cat package/commands`; do ++ ln -sf /package/admin/daemontools/command/$BIN $Fdestdir/command/$BIN ++ ln -sf /command/$BIN $Fdestdir/usr/bin/$BIN ++ done ++ cd $Fdestdir/package/admin && ln -sf $pkgorig-$pkgver $pkgorig || Fdie ++} ++# vim: ft=sh +diff --git a/source/dietlibc/diet-daemontools/daemontools.install b/source/dietlibc/diet-daemontools/daemontools.install +new file mode 100644 +index 0000000..1e85fde +--- /dev/null ++++ b/source/dietlibc/diet-daemontools/daemontools.install +@@ -0,0 +1,37 @@ ++# arg 1: the new package version ++post_install() { ++ if [ ! "`grep ^SV:345:respawn:/command/svscanboot etc/inittab`" ]; then ++ if [ ! "`grep ^'# End of file' etc/inittab`" ]; then ++ # The 'End of file' sentinel is missing, just append it to the end ++ echo "SV:345:respawn:/command/svscanboot /service" >> etc/inittab ++ else ++ # prepend it before 'End of file' sentinel ++ sed -i "/# End of file/i\ ++SV:345:respawn:/command/svscanboot /service" etc/inittab ++ fi ++ telinit q ++ fi ++} ++ ++post_upgrade() { ++ post_install $1 ++} ++ ++# arg 1: the old package version ++pre_remove() { ++ if [ "`grep ^SV:345:respawn:/command/svscanboot etc/inittab`" ]; then ++ sed -i "/SV:345:respawn:\/command\/svscanboot \/service/d" etc/inittab ++ telinit q ++ fi ++} ++ ++# arg 1: the old package version ++post_remove() { ++ /bin/true ++} ++ ++op=$1 ++shift ++ ++$op $* ++# vim: ts=2 sw=2 et ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-djbdns.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-djbdns.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,88 @@ +From dcb805c78db7a7bb9362fa38dc02ee44c3101b36 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 26 Oct 2007 23:30:37 +0200 +Subject: [PATCH] diet-djbdns-1.05-1-i686.fpm + * added + +--- + source/dietlibc/diet-djbdns/FrugalBuild | 35 ++++++++++++++++++++++++++++ + source/dietlibc/diet-djbdns/djbdns.install | 25 ++++++++++++++++++++ + 2 files changed, 60 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-djbdns/FrugalBuild + create mode 100644 source/dietlibc/diet-djbdns/djbdns.install + +diff --git a/source/dietlibc/diet-djbdns/FrugalBuild b/source/dietlibc/diet-djbdns/FrugalBuild +new file mode 100644 +index 0000000..eca28f5 +--- /dev/null ++++ b/source/dietlibc/diet-djbdns/FrugalBuild +@@ -0,0 +1,35 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=djbdns ++pkgname=$branch-$pkgorig ++pkgver=1.05 ++pkgrel=1 ++pkgdesc="High-performant & secure DNS services." ++url="http://cr.yp.to/djbdns.html" ++archs=(i686) ++up2date='lynx -dump -nolist http://cr.yp.to/djbdns/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++depends=('ucspi-tcp') ++makedepends=(dietlibc) ++install="$pkgorig.install" ++backup=(etc/dnsroots.global) ++source=(http://cr.yp.to/$pkgorig/$pkgorig-$pkgver.tar.gz) ++sha1sums=('2efdb3a039d0c548f40936aa9cb30829e0ce8c3d') ++provides=(djbdns) ++ ++build() { ++ Fcd $pkgorig-$pkgver ++ echo "diet gcc ${CFLAGS}" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ echo "/usr" > conf-home ++ make || Fdie ++ ++ install -D -m 644 dnsroots.global $Fdestdir/pkg/etc/dnsroots.global ++ for bin in \ ++ *-conf dnscache tinydns walldns rbldns pickdns axfrdns \ ++ *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \ ++ dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort; do ++ install -D -m 755 $bin $Fdestdir/usr/bin/$bin ++ done ++} ++# vim: ft=sh +diff --git a/source/dietlibc/diet-djbdns/djbdns.install b/source/dietlibc/diet-djbdns/djbdns.install +new file mode 100644 +index 0000000..af468e4 +--- /dev/null ++++ b/source/dietlibc/diet-djbdns/djbdns.install +@@ -0,0 +1,25 @@ ++post_install() { ++ id dnslog &>/dev/null || \ ++ useradd -u 60 -g nobody -d /var/empty -c "djbdns log user" -s /bin/false dnslog ++ id dnscache &>/dev/null || \ ++ useradd -u 61 -g nobody -d /var/empty -c "dnscache daemon" -s /bin/false dnscache ++ id tinydns &>/dev/null || \ ++ useradd -u 62 -g nobody -d /var/empty -c "tinydns daemon" -s /bin/false tinydns ++ id axfrdns &>/dev/null || \ ++ useradd -u 63 -g nobody -d /var/empty -c "axfrdns daemon" -s /bin/false axfrdns ++} ++ ++post_upgrade() { ++ post_install $1 ++} ++ ++pre_remove() { ++ for user in dnslog dnscache tinydns axfrdns; do ++ userdel $user &> /dev/null ++ done ++} ++ ++op=$1 ++shift ++ ++$op $* +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-mess822.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-mess822.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,53 @@ +From 46f681c045f1df4749234bc715b5a39d07dd9f3c Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 30 Oct 2007 22:31:23 +0100 +Subject: [PATCH] diet-mess822-0.58-1-i686 + * added + +--- + source/dietlibc/diet-mess822/FrugalBuild | 33 ++++++++++++++++++++++++++++++ + 1 files changed, 33 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-mess822/FrugalBuild + +diff --git a/source/dietlibc/diet-mess822/FrugalBuild b/source/dietlibc/diet-mess822/FrugalBuild +new file mode 100644 +index 0000000..abd9ee9 +--- /dev/null ++++ b/source/dietlibc/diet-mess822/FrugalBuild +@@ -0,0 +1,33 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=mess822 ++pkgname=$branch-$pkgorig ++pkgver=0.58 ++pkgrel=1 ++pkgdesc="" ++makedepends=(dietlibc) ++url="http://cr.yp.to/mess822.html" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=(http://cr.yp.to/software/$pkgorig-$pkgver.tar.gz) ++sha1sums=('ef3380c793c852d40688c108d164234ecf8a5362') ++provides=(mess822) ++ ++build() { ++ DDIR="/usr/lib/diet" ++ Fcd $pkgorig-$pkgver ++ echo "/usr" > conf-home ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ make || Fdie ++ echo "$Fdestdir/usr" > conf-home ++ mkdir $Fdestdir/etc ++ sed -i -e "s{/etc{$Fdestdir/etc{" hier.c ++ make setup || Fdie ++ Frm usr/man/cat* ++ Fmkdir $DDIR/lib ++ Fmv usr/lib/mess822.a $DDIR/lib ++ Fmv usr/include $DDIR ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-openssl.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-openssl.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,64 @@ +From 3ef82030023b31aebb401e53175852b36b850d94 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 30 Oct 2007 23:06:26 +0100 +Subject: [PATCH] diet-openssl-0.9.8g-1-i686 + *added + +--- + source/dietlibc/diet-openssl/FrugalBuild | 44 ++++++++++++++++++++++++++++++ + 1 files changed, 44 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-openssl/FrugalBuild + +diff --git a/source/dietlibc/diet-openssl/FrugalBuild b/source/dietlibc/diet-openssl/FrugalBuild +new file mode 100644 +index 0000000..ec2e2a5 +--- /dev/null ++++ b/source/dietlibc/diet-openssl/FrugalBuild +@@ -0,0 +1,44 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=openssl ++pkgname=$branch-$pkgorig ++pkgver=0.9.8g ++pkgrel=1 ++pkgdesc="The Open Source toolkit for Secure Sockets Layer and Transport Layer Security; dietlibc version" ++makedepends=(dietlibc gcc sed) ++url="http://www.openssl.org" ++archs=(i686) ++up2date='lynx -dump -nolist $url/source|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/source/$pkgorig-$pkgver.tar.gz) ++sha1sums=('4e9c5ced466715d18fd924de79bde5c15da80fa1') ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd $pkgorig-$pkgver ++ ++ cp Configure Configure.orig ++# sed -e 's/gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall/diet gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -nostdinc -march=i686 -Wall/' \ ++# -e 's/gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentium -Wall/diet gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -nostdinc -march=i686 -Wall/' \ ++# -e 's/gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentiumpro -Wall/diet gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -nostdinc -march=i686 -Wall/' \ ++# Configure.orig > Configure ++ sed -e 's/gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall/diet gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall/' \ ++ -e 's/-mcpu=pentium/-march=i686/' \ ++ -e 's/-mcpu=pentiumpro/-march=i686/' \ ++ Configure.orig > Configure ++ ++ # no-sse to compile test sha512t ++ ./config --prefix=$DDIR --openssldir=/usr/lib/diet/etc/ssl \ ++ no-shared no-dso no-sse2 no-sse2 ++ ++ make all || Fdie ++ make test || Fdie ++ ++ make INSTALL_PREFIX=$Fdestdir install ++ ++ Frm $DDIR/etc ++ Fmkdir $DDIR/etc ++ ln -sf /etc/ssl $Fdestdir/$DDIR/etc/ssl ++ Frm $DDIR/lib/pkgconfig ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-pure-ftpd.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-pure-ftpd.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,710 @@ +From bca72d17e958d2bce147147da167fa17a1cc43f7 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 16 Dec 2007 12:14:44 +0100 +Subject: [PATCH] diet-pure-ftpd-1.0.21-1-i686: + *added + +--- + source/dietlibc/diet-pure-ftpd/FrugalBuild | 39 ++ + source/dietlibc/diet-pure-ftpd/pure-config.pl | 121 ++++++ + source/dietlibc/diet-pure-ftpd/pure-ftpd.conf | 435 +++++++++++++++++++++ + source/dietlibc/diet-pure-ftpd/rc.pure-ftpd | 42 ++ + source/dietlibc/diet-pure-ftpd/rc.pure-ftpd-hu.po | 21 + + 5 files changed, 658 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-pure-ftpd/FrugalBuild + create mode 100644 source/dietlibc/diet-pure-ftpd/pure-config.pl + create mode 100644 source/dietlibc/diet-pure-ftpd/pure-ftpd.conf + create mode 100644 source/dietlibc/diet-pure-ftpd/rc.pure-ftpd + create mode 100644 source/dietlibc/diet-pure-ftpd/rc.pure-ftpd-hu.po + +diff --git a/source/dietlibc/diet-pure-ftpd/FrugalBuild b/source/dietlibc/diet-pure-ftpd/FrugalBuild +new file mode 100644 +index 0000000..0165876 +--- /dev/null ++++ b/source/dietlibc/diet-pure-ftpd/FrugalBuild +@@ -0,0 +1,39 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=pure-ftpd ++pkgname=$branch-$pkgorig ++pkgver=1.0.21 ++pkgrel=1 ++pkgdesc="A free, secure, production-quality and standard-conformant FTP server" ++url="http://www.pureftpd.org/" ++depends=('perl') ++conflicts=($pkgorig) ++provides=($pkgorig) ++backup=('etc/pure-ftpd.conf') ++archs=('i686') ++up2date="lynx -dump $url |grep Version|sed 's/.*n \(.*\) h.*/\1/'" ++source=(ftp://ftp.pureftpd.org/pub/$pkgorig/releases/$pkgorig-$pkgver.tar.bz2 \ ++ pure-config.pl pure-ftpd.conf rc.$pkgorig rc.$pkgorig-hu.po) ++sha1sums=('1405ff2b9b9c3616c4e390eb99779884173a3347' \ ++ '274bf6399afa4fbb6cb8593181c103e3ff7f1070' \ ++ '7c6b89a0dcefdd96e2da943ec4b21a9d952d86eb' \ ++ '2a0b5d5151251deb129c061a78fa5eca5525e99e' \ ++ '1a12dbfaa9d2d5914b7a1db040d5d6ced71cd659') ++ ++build() ++{ ++ export CC="diet -v gcc -Os -nostdinc" ++ export LD="diet -v gcc -s -static" ++ Fcd $pkgorig-$pkgver ++ ./configure --with-largefile --with-ftpwho --with-quotas \ ++ --with-ratios --with-puredb --with-altlog --with-throttling \ ++ --with-privsep --with-tls ++ make || Fdie ++ make prefix=$Fdestdir/usr install ++ install -D -m755 ../rc.pure-ftpd $Fdestdir/etc/rc.d/rc.pure-ftpd || Fdie ++ install -D -m644 ../pure-ftpd.conf $Fdestdir/etc/pure-ftpd.conf || Fdie ++ install -D -m755 ../pure-config.pl $Fdestdir/usr/sbin/pure-config.pl || Fdie ++ Ffile /etc/pure-ftpd.conf ++ Fexe /usr/sbin/pure-config.pl ++} +diff --git a/source/dietlibc/diet-pure-ftpd/pure-config.pl b/source/dietlibc/diet-pure-ftpd/pure-config.pl +new file mode 100644 +index 0000000..1f8c28e +--- /dev/null ++++ b/source/dietlibc/diet-pure-ftpd/pure-config.pl +@@ -0,0 +1,121 @@ ++#! /usr/bin/perl ++ ++# (C) 2001-2004 Aristotle Pagaltzis ++# derived from code (C) 2001-2002 Frank Denis and Matthias Andree ++ ++use strict; ++ ++my ($conffile, @flg) = @ARGV; ++ ++my $PUREFTPD; ++-x && ($PUREFTPD=$_, last) for qw( ++ ${exec_prefix}/sbin/pure-ftpd ++ /usr/local/pure-ftpd/sbin/pure-ftpd ++ /usr/local/pureftpd/sbin/pure-ftpd ++ /usr/local/sbin/pure-ftpd ++ /usr/sbin/pure-ftpd ++); ++ ++my %simple_switch_for = ( ++ IPV4Only => "-4", ++ IPV6Only => "-6", ++ ChrootEveryone => "-A", ++ BrokenClientsCompatibility => "-b", ++ Daemonize => "-B", ++ VerboseLog => "-d", ++ DisplayDotFiles => "-D", ++ AnonymousOnly => "-e", ++ NoAnonymous => "-E", ++ DontResolve => "-H", ++ AnonymousCanCreateDirs => "-M", ++ NATmode => "-N", ++ CallUploadScript => "-o", ++ AntiWarez => "-s", ++ AllowUserFXP => "-w", ++ AllowAnonymousFXP => "-W", ++ ProhibitDotFilesWrite => "-x", ++ ProhibitDotFilesRead => "-X", ++ AllowDotFiles => "-z", ++ AutoRename => "-r", ++ AnonymousCantUpload => "-i", ++ LogPID => "-1", ++ NoChmod => "-R", ++ KeepAllFiles => "-K", ++ CreateHomeDir => "-j", ++ NoRename => "-G", ++ CustomerProof => "-Z", ++ NoTruncate => "-0", ++); ++ ++my %string_switch_for = ( ++ SyslogFacility => "-f", ++ FortunesFile => "-F", ++ ForcePassiveIP => "-P", ++ Bind => "-S", ++ AnonymousBandwidth => "-t", ++ UserBandwidth => "-T", ++ TrustedIP => "-V", ++ AltLog => "-O", ++ PIDFile => "-g", ++); ++ ++my %numeric_switch_for = ( ++ MaxIdleTime => "-I", ++ MaxDiskUsage => "-k", ++ TrustedGID => "-a", ++ MaxClientsNumber => "-c", ++ MaxClientsPerIP => "-C", ++ MaxLoad => "-m", ++ MinUID => "-u", ++ TLS => "-Y", ++); ++ ++my %numpairb_switch_for = ( ++ LimitRecursion => "-L", ++ PassivePortRange => "-p", ++ AnonymousRatio => "-q", ++ UserRatio => "-Q", ++); ++ ++my %numpairc_switch_for = ( ++ Umask => "-U", ++ Quota => "-n", ++ PerUserLimits => "-y", ++); ++ ++my %auth_method_for = ( ++ LDAPConfigFile => "ldap", ++ MySQLConfigFile => "mysql", ++ PGSQLConfigFile => "pgsql", ++ PureDB => "puredb", ++ ExtAuth => "extauth", ++); ++ ++my $simple_switch = qr/(@{[join "|", keys %simple_switch_for ]})\s+yes/i; ++my $string_switch = qr/(@{[join "|", keys %string_switch_for ]})\s+(\S+)/i; ++my $numeric_switch = qr/(@{[join "|", keys %numeric_switch_for ]})\s+(\d+)/i; ++my $numpairb_switch = qr/(@{[join "|", keys %numpairb_switch_for ]})\s+(\d+)\s+(\d+)/i; ++my $numpairc_switch = qr/(@{[join "|", keys %numpairc_switch_for ]})\s+(\d+):(\d+)/i; ++my $auth_method = qr/(@{[join "|", keys %auth_method_for ]})\s+(\S+)/i; ++ ++die "Usage: pure-config.pl [extra options]\n" ++ unless defined $conffile; ++ ++open CONF, "< $conffile" or die "Can't open $conffile: $!\n"; ++ ++!/^\s*(?:$|#)/ and (chomp, push @flg, ++ /$simple_switch/i ? ($simple_switch_for{$1}) : ++ /$string_switch/i ? ($string_switch_for{$1} . $2) : ++ /$numeric_switch/i ? ($numeric_switch_for{$1} . $2) : ++ /$numpairb_switch/i ? ($numpairb_switch_for{$1} . "$2:$3") : ++ /$numpairc_switch/i ? ($numpairc_switch_for{$1} . "$2:$3") : ++ /$auth_method/i ? ("-l" . "$auth_method_for{$1}:$2") : ++ /UnixAuthentication\s+yes/i ? ("-l" . "unix") : ++ /PAMAuthentication\s+yes/i ? ("-l" . "pam") : ++ () ++) while ; ++ ++close CONF; ++ ++print "Running: $PUREFTPD ", join(" ", @flg), "\n"; ++exec { $PUREFTPD } ($PUREFTPD, @flg) or die "cannot exec $PUREFTPD: $!"; +diff --git a/source/dietlibc/diet-pure-ftpd/pure-ftpd.conf b/source/dietlibc/diet-pure-ftpd/pure-ftpd.conf +new file mode 100644 +index 0000000..df983a2 +--- /dev/null ++++ b/source/dietlibc/diet-pure-ftpd/pure-ftpd.conf +@@ -0,0 +1,435 @@ ++############################################################ ++# # ++# Configuration file for pure-ftpd wrappers # ++# # ++############################################################ ++ ++# If you want to run Pure-FTPd with this configuration ++# instead of command-line options, please run the ++# following command : ++# ++# /usr/sbin/pure-config.pl /usr/etc/pure-ftpd.conf ++# ++# Please don't forget to have a look at documentation at ++# http://www.pureftpd.org/documentation.shtml for a complete list of ++# options. ++ ++# Cage in every user in his home directory ++ ++ChrootEveryone yes ++ ++ ++ ++# If the previous option is set to "no", members of the following group ++# won't be caged. Others will be. If you don't want chroot()ing anyone, ++# just comment out ChrootEveryone and TrustedGID. ++ ++# TrustedGID 100 ++ ++ ++ ++# Turn on compatibility hacks for broken clients ++ ++BrokenClientsCompatibility no ++ ++ ++ ++# Maximum number of simultaneous users ++ ++MaxClientsNumber 50 ++ ++ ++ ++# Fork in background ++ ++Daemonize yes ++ ++ ++ ++# Maximum number of sim clients with the same IP address ++ ++MaxClientsPerIP 8 ++ ++ ++ ++# If you want to log all client commands, set this to "yes". ++# This directive can be duplicated to also log server responses. ++ ++VerboseLog no ++ ++ ++ ++# List dot-files even when the client doesn't send "-a". ++ ++DisplayDotFiles yes ++ ++ ++ ++# Don't allow authenticated users - have a public anonymous FTP only. ++ ++AnonymousOnly no ++ ++ ++ ++# Disallow anonymous connections. Only allow authenticated users. ++ ++NoAnonymous yes ++ ++ ++ ++# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*) ++# The default facility is "ftp". "none" disables logging. ++ ++SyslogFacility ftp ++ ++ ++ ++# Display fortune cookies ++ ++# FortunesFile /usr/share/fortune/zippy ++ ++ ++ ++# Don't resolve host names in log files. Logs are less verbose, but ++# it uses less bandwidth. Set this to "yes" on very busy servers or ++# if you don't have a working DNS. ++ ++DontResolve yes ++ ++ ++ ++# Maximum idle time in minutes (default = 15 minutes) ++ ++MaxIdleTime 15 ++ ++ ++ ++# LDAP configuration file (see README.LDAP) ++ ++# LDAPConfigFile /etc/pureftpd-ldap.conf ++ ++ ++ ++# MySQL configuration file (see README.MySQL) ++ ++# MySQLConfigFile /etc/pureftpd-mysql.conf ++ ++ ++# Postgres configuration file (see README.PGSQL) ++ ++# PGSQLConfigFile /etc/pureftpd-pgsql.conf ++ ++ ++# PureDB user database (see README.Virtual-Users) ++ ++# PureDB /etc/pureftpd.pdb ++ ++ ++# Path to pure-authd socket (see README.Authentication-Modules) ++ ++# ExtAuth /var/run/ftpd.sock ++ ++ ++ ++# If you want to enable PAM authentication, uncomment the following line ++ ++# PAMAuthentication yes ++ ++ ++ ++# If you want simple Unix (/etc/passwd) authentication, uncomment this ++ ++# UnixAuthentication yes ++ ++ ++ ++# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and ++# UnixAuthentication can be used only once, but they can be combined ++# together. For instance, if you use MySQLConfigFile, then UnixAuthentication, ++# the SQL server will be asked. If the SQL authentication fails because the ++# user wasn't found, another try # will be done with /etc/passwd and ++# /etc/shadow. If the SQL authentication fails because the password was wrong, ++# the authentication chain stops here. Authentication methods are chained in ++# the order they are given. ++ ++ ++ ++# 'ls' recursion limits. The first argument is the maximum number of ++# files to be displayed. The second one is the max subdirectories depth ++ ++LimitRecursion 2000 8 ++ ++ ++ ++# Are anonymous users allowed to create new directories ? ++ ++AnonymousCanCreateDirs no ++ ++ ++ ++# If the system is more loaded than the following value, ++# anonymous users aren't allowed to download. ++ ++MaxLoad 4 ++ ++ ++ ++# Port range for passive connections replies. - for firewalling. ++ ++# PassivePortRange 30000 50000 ++ ++ ++ ++# Force an IP address in PASV/EPSV/SPSV replies. - for NAT. ++# Symbolic host names are also accepted for gateways with dynamic IP ++# addresses. ++ ++# ForcePassiveIP 192.168.0.1 ++ ++ ++ ++# Upload/download ratio for anonymous users. ++ ++# AnonymousRatio 1 10 ++ ++ ++ ++# Upload/download ratio for all users. ++# This directive superscedes the previous one. ++ ++# UserRatio 1 10 ++ ++ ++ ++# Disallow downloading of files owned by "ftp", ie. ++# files that were uploaded but not validated by a local admin. ++ ++AntiWarez yes ++ ++ ++ ++# IP address/port to listen to (default=all IP and port 21). ++ ++# Bind 127.0.0.1,21 ++ ++ ++ ++# Maximum bandwidth for anonymous users in KB/s ++ ++# AnonymousBandwidth 8 ++ ++ ++ ++# Maximum bandwidth for *all* users (including anonymous) in KB/s ++# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense. ++ ++# UserBandwidth 8 ++ ++ ++ ++# File creation mask. : . ++# 177:077 if you feel paranoid. ++ ++Umask 133:022 ++ ++ ++ ++# Minimum UID for an authenticated user to log in. ++ ++MinUID 100 ++ ++ ++ ++# Allow FXP transfers for authenticated users. ++ ++AllowUserFXP no ++ ++ ++ ++# Allow anonymous FXP for anonymous and non-anonymous users. ++ ++AllowAnonymousFXP no ++ ++ ++ ++# Users can't delete/write files beginning with a dot ('.') ++# even if they own them. If TrustedGID is enabled, this group ++# will have access to dot-files, though. ++ ++ProhibitDotFilesWrite no ++ ++ ++ ++# Prohibit *reading* of files beginning with a dot (.history, .ssh...) ++ ++ProhibitDotFilesRead no ++ ++ ++ ++# Never overwrite files. When a file whoose name already exist is uploaded, ++# it get automatically renamed to file.1, file.2, file.3, ... ++ ++AutoRename no ++ ++ ++ ++# Disallow anonymous users to upload new files (no = upload is allowed) ++ ++AnonymousCantUpload no ++ ++ ++ ++# Only connections to this specific IP address are allowed to be ++# non-anonymous. You can use this directive to open several public IPs for ++# anonymous FTP, and keep a private firewalled IP for remote administration. ++# You can also only allow a non-routable local IP (like 10.x.x.x) to ++# authenticate, and keep a public anon-only FTP server on another IP. ++ ++#TrustedIP 10.1.1.1 ++ ++ ++ ++# If you want to add the PID to every logged line, uncomment the following ++# line. ++ ++#LogPID yes ++ ++ ++ ++# Create an additional log file with transfers logged in a Apache-like format : ++# fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338 ++# This log file can then be processed by www traffic analyzers. ++ ++# AltLog clf:/var/log/pureftpd.log ++ ++ ++ ++# Create an additional log file with transfers logged in a format optimized ++# for statistic reports. ++ ++# AltLog stats:/var/log/pureftpd.log ++ ++ ++ ++# Create an additional log file with transfers logged in the standard W3C ++# format (compatible with most commercial log analyzers) ++ ++# AltLog w3c:/var/log/pureftpd.log ++ ++ ++ ++# Disallow the CHMOD command. Users can't change perms of their files. ++ ++#NoChmod yes ++ ++ ++ ++# Allow users to resume and upload files, but *NOT* to delete them. ++ ++#KeepAllFiles yes ++ ++ ++ ++# Automatically create home directories if they are missing ++ ++#CreateHomeDir yes ++ ++ ++ ++# Enable virtual quotas. The first number is the max number of files. ++# The second number is the max size of megabytes. ++# So 1000:10 limits every user to 1000 files and 10 Mb. ++ ++#Quota 1000:10 ++ ++ ++ ++# If your pure-ftpd has been compiled with standalone support, you can change ++# the location of the pid file. The default is /var/run/pure-ftpd.pid ++ ++#PIDFile /var/run/pure-ftpd.pid ++ ++ ++ ++# If your pure-ftpd has been compiled with pure-uploadscript support, ++# this will make pure-ftpd write info about new uploads to ++# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and ++# spawn a script to handle the upload. ++ ++#CallUploadScript yes ++ ++ ++ ++# This option is useful with servers where anonymous upload is ++# allowed. As /var/ftp is in /var, it save some space and protect ++# the log files. When the partition is more that X percent full, ++# new uploads are disallowed. ++ ++MaxDiskUsage 99 ++ ++ ++ ++# Set to 'yes' if you don't want your users to rename files. ++ ++#NoRename yes ++ ++ ++ ++# Be 'customer proof' : workaround against common customer mistakes like ++# 'chmod 0 public_html', that are valid, but that could cause ignorant ++# customers to lock their files, and then keep your technical support busy ++# with silly issues. If you're sure all your users have some basic Unix ++# knowledge, this feature is useless. If you're a hosting service, enable it. ++ ++CustomerProof yes ++ ++ ++ ++# Per-user concurrency limits. It will only work if the FTP server has ++# been compiled with --with-peruserlimits (and this is the case on ++# most binary distributions) . ++# The format is : : ++# For instance, 3:20 means that the same authenticated user can have 3 active ++# sessions max. And there are 20 anonymous sessions max. ++ ++# PerUserLimits 3:20 ++ ++ ++ ++# When a file is uploaded and there is already a previous version of the file ++# with the same name, the old file will neither get removed nor truncated. ++# Upload will take place in a temporary file and once the upload is complete, ++# the switch to the new version will be atomic. For instance, when a large PHP ++# script is being uploaded, the web server will still serve the old version and ++# immediatly switch to the new one as soon as the full file will have been ++# transfered. This option is incompatible with virtual quotas. ++ ++# NoTruncate yes ++ ++ ++ ++# This option can accept three values : ++# 0 : disable SSL/TLS encryption layer (default). ++# 1 : accept both traditional and encrypted sessions. ++# 2 : refuse connections that don't use SSL/TLS security mechanisms, ++# including anonymous sessions. ++# Do _not_ uncomment this blindly. Be sure that : ++# 1) Your server has been compiled with SSL/TLS support (--with-tls), ++# 2) A valid certificate is in place, ++# 3) Only compatible clients will log in. ++ ++# TLS 1 ++ ++ ++ ++# Listen only to IPv4 addresses in standalone mode (ie. disable IPv6) ++# By default, both IPv4 and IPv6 are enabled. ++ ++# IPV4Only yes ++ ++ ++ ++# Listen only to IPv6 addresses in standalone mode (ie. disable IPv4) ++# By default, both IPv4 and IPv6 are enabled. ++ ++# IPV6Only yes +diff --git a/source/dietlibc/diet-pure-ftpd/rc.pure-ftpd b/source/dietlibc/diet-pure-ftpd/rc.pure-ftpd +new file mode 100644 +index 0000000..61746ef +--- /dev/null ++++ b/source/dietlibc/diet-pure-ftpd/rc.pure-ftpd +@@ -0,0 +1,42 @@ ++#!/bin/bash ++ ++# (c) 2006 Miklos Vajna ++# rc.pure-ftpd for FrugalWare ++# distributed under GPL License ++ ++# chkconfig: 2345 60 50 ++# description: Pure-FTPd is a ftp daemon, which is the program \ ++# that answers incoming ftp service requests. ++ ++source /lib/initscripts/functions ++TEXTDOMAIN=pure-ftpd ++TEXTDOMAINDIR=/lib/initscripts/messages ++ ++actions=(restart start status stop) ++daemon=$"Pure-FTPd Server" ++ ++pid="cat /var/run/pure-ftpd.pid 2> /dev/null" ++ ++rc_start() ++{ ++ start_msg ++ if [[ "$(eval $pid)" == "" ]] ; then ++ /usr/sbin/pure-config.pl /etc/pure-ftpd.conf &> /dev/null ++ ok $? ++ else ++ ok 999 ++ fi ++} ++ ++rc_stop() ++{ ++ stop_msg ++ if [[ "$(eval $pid)" != "" ]] ; then ++ kill `cat /var/run/pure-ftpd.pid` ++ ok $? ++ else ++ ok 999 ++ fi ++} ++ ++rc_exec $1 +diff --git a/source/dietlibc/diet-pure-ftpd/rc.pure-ftpd-hu.po b/source/dietlibc/diet-pure-ftpd/rc.pure-ftpd-hu.po +new file mode 100644 +index 0000000..b987340 +--- /dev/null ++++ b/source/dietlibc/diet-pure-ftpd/rc.pure-ftpd-hu.po +@@ -0,0 +1,21 @@ ++# Hungarian translations for rc.pure-ftpd package. ++# Copyright (C) 2006 THE rc.pure-ftpd'S COPYRIGHT HOLDER ++# This file is distributed under the same license as the rc.pure-ftpd package. ++# , 2006. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: rc.pure-ftpd\n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2006-02-21 13:18+0100\n" ++"PO-Revision-Date: 2006-02-21 13:18+0100\n" ++"Last-Translator: \n" ++"Language-Team: Hungarian \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=ISO-8859-2\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=1; plural=0;\n" ++ ++#: rc.pure-ftpd:16 ++msgid "Pure-FTPd Server" ++msgstr "Pure-FTPd szerver" +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-qmail-autoresponder.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-qmail-autoresponder.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,55 @@ +From 4edfa8684fb804b16b489a7f9b584ac5710b71b2 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sat, 3 Nov 2007 23:19:20 +0100 +Subject: [PATCH] diet-qmail-autoresponder-0.96.2-1-i686: + * added + +--- + .../dietlibc/diet-qmail-autoresponder/FrugalBuild | 35 ++++++++++++++++++++ + 1 files changed, 35 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-qmail-autoresponder/FrugalBuild + +diff --git a/source/dietlibc/diet-qmail-autoresponder/FrugalBuild b/source/dietlibc/diet-qmail-autoresponder/FrugalBuild +new file mode 100644 +index 0000000..e5967fb +--- /dev/null ++++ b/source/dietlibc/diet-qmail-autoresponder/FrugalBuild +@@ -0,0 +1,35 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=qmail-autoresponder ++pkgname=$branch-$pkgorig ++pkgver=0.96.2 ++pkgrel=1 ++pkgdesc="simple program to automatically respond to emails" ++makedepends=(dietlibc diet-bglibs) ++url="http://untroubled.org/qmail-autoresponder/" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgorig-$pkgver.tar.gz) ++sha1sums=('15f2983a4209c046c9db16282d94cc3aedc9e860') ++provides=($pkgorig) ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd $pkgorig-$pkgver ++ echo "$Fdestdir/usr/bin" > conf-bin ++ echo "$Fdestdir/usr/man" > conf-man ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ echo "$DDIR/include/bglibs" > conf-bgincs ++ echo "$DDIR/lib" > conf-bglibs ++ ++ # don't build qmail-autoresponder-mysql ++ make qmail-autoresponder || Fdie ++ ++ Fmkdir usr/bin ++ install -m755 qmail-autoresponder $Fdestdir/usr/bin || Fdie ++ Fmkdir usr/man/man1 ++ install -m644 qmail-autoresponder.1 $Fdestdir/usr/man/man1 || Fdie ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-qmail-fix-qmail.install --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-qmail-fix-qmail.install Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,101 @@ +From 8397f25eee7131dee872101241029bd26c8f55ca Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 6 Nov 2007 14:24:18 +0100 +Subject: [PATCH] diet-qmail-1.03-1-i686: add qmail.install to repo + +--- + source/dietlibc/diet-qmail/qmail.install | 82 ++++++++++++++++++++++++++++++ + 1 files changed, 82 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-qmail/qmail.install + +diff --git a/source/dietlibc/diet-qmail/qmail.install b/source/dietlibc/diet-qmail/qmail.install +new file mode 100644 +index 0000000..1fa4a33 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qmail.install +@@ -0,0 +1,82 @@ ++post_install() { ++ ++ # add required groups ++ if [ ! `grep qmail /etc/group` ]; then ++ groupadd -g 2107 qmail &>/dev/null ++ fi ++ ++ if [ ! `grep nofiles /etc/group` ]; then ++ groupadd -g 2108 nofiles &>/dev/null ++ fi ++ ++ # add required users ++ id alias &>/dev/null || \ ++ useradd -u 7790 -g nofiles -d /var/qmail/alias -s /bin/false alias ++ ++ id qmaild &>/dev/null || \ ++ useradd -u 7791 -g nofiles -d /var/qmail -s /bin/false qmaild ++ ++ id qmaill &>/dev/null || \ ++ useradd -u 7792 -g nofiles -d /var/qmail -s /bin/false qmaill ++ ++ id qmailp &>/dev/null || \ ++ useradd -u 7793 -g nofiles -d /var/qmail -s /bin/false qmailp ++ ++ id qmailq &>/dev/null || \ ++ useradd -u 7794 -g qmail -d /var/qmail -s /bin/false qmailq ++ ++ id qmailr &>/dev/null || \ ++ useradd -u 7795 -g qmail -d /var/qmail -s /bin/false qmailr ++ ++ id qmails &>/dev/null || \ ++ useradd -u 7796 -g qmail -d /var/qmail -s /bin/false qmails ++ ++ # create FQDN file ++ if ! [ -f /var/qmail/control/me ]; then ++ /bin/hostname -f > /var/qmail/control/me ++ chmod 644 /var/qmail/control/me ++ fi ++ ++ # create aliases ++ for i in postmaster mailer-daemon root; do ++ if ! [ -f ~alias/.qmail-${i} ]; then ++ touch ~alias/.qmail-${i} ++ chmod 644 ~alias/.qmail-${i} ++ fi ++ done ++ ++ # create /var/qmail/queue ++ echo "==> Setting up message queue directory (/var/qmail/queue)" ++ /var/qmail/bin/queue-fix /var/qmail/queue &> /dev/null ++ ++ cat << EOF ++ ++Log out & back in (or source /etc/profile) before running qmail. ++To setup qmail run: ++ ++ $ config-fast FQDN ++replacing FQDN with your fully qualified domain. ++Then : ++$ ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service ++In order to create SSL certificates run make_cert.sh (use -h for more options). ++ ++EOF ++} ++ ++post_upgrade() { ++ post_install $1 ++} ++ ++pre_remove() { ++ for user in alias qmail{d,l,p,q,r,s}; do ++ userdel ${user} &> /dev/null ++ done ++ for group in nofiles qmail; do ++ groupdel ${group} &> /dev/null ++ done ++} ++ ++op=$1 ++shift ++ ++$op $* +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-qmail.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-qmail.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,3133 @@ +From f3f9a0e61348706d763c41f2ac889425b964cf51 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sat, 3 Nov 2007 22:53:29 +0100 +Subject: [PATCH] diet-qmail-1.03-1-i686: + * added + +--- + source/dietlibc/diet-qmail/FrugalBuild | 293 +++++ + source/dietlibc/diet-qmail/ext_todo-20030105.patch | 1238 ++++++++++++++++++++ + source/dietlibc/diet-qmail/make_cert.sh | 57 + + source/dietlibc/diet-qmail/pop3d_log_run | 20 + + source/dietlibc/diet-qmail/pop3d_run | 33 + + source/dietlibc/diet-qmail/qmail-1.03.errno.patch | 47 + + source/dietlibc/diet-qmail/qmail-dietlibc.patch | 40 + + source/dietlibc/diet-qmail/qmail-smtpd.spam.patch | 74 ++ + source/dietlibc/diet-qmail/qmail.profile | 5 + + source/dietlibc/diet-qmail/qmail.rc | 167 +++ + source/dietlibc/diet-qmail/qmailqueue-patch | 72 ++ + .../diet-qmail/qregex-20060423-qmail.patch | 688 +++++++++++ + .../dietlibc/diet-qmail/queue-fix-dietlibc.patch | 18 + + source/dietlibc/diet-qmail/queue-fix-errno.patch | 14 + + source/dietlibc/diet-qmail/rc | 7 + + source/dietlibc/diet-qmail/send_log_run | 20 + + source/dietlibc/diet-qmail/send_run | 8 + + source/dietlibc/diet-qmail/smtpd_log_run | 20 + + source/dietlibc/diet-qmail/smtpd_run | 45 + + source/dietlibc/diet-qmail/tcp.pop3 | 6 + + source/dietlibc/diet-qmail/tcp.smtp | 81 ++ + 21 files changed, 2953 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-qmail/FrugalBuild + create mode 100644 source/dietlibc/diet-qmail/ext_todo-20030105.patch + create mode 100644 source/dietlibc/diet-qmail/make_cert.sh + create mode 100644 source/dietlibc/diet-qmail/pop3d_log_run + create mode 100644 source/dietlibc/diet-qmail/pop3d_run + create mode 100644 source/dietlibc/diet-qmail/qmail-1.03.errno.patch + create mode 100644 source/dietlibc/diet-qmail/qmail-dietlibc.patch + create mode 100644 source/dietlibc/diet-qmail/qmail-smtpd.spam.patch + create mode 100644 source/dietlibc/diet-qmail/qmail.profile + create mode 100644 source/dietlibc/diet-qmail/qmail.rc + create mode 100644 source/dietlibc/diet-qmail/qmailqueue-patch + create mode 100644 source/dietlibc/diet-qmail/qregex-20060423-qmail.patch + create mode 100644 source/dietlibc/diet-qmail/queue-fix-dietlibc.patch + create mode 100644 source/dietlibc/diet-qmail/queue-fix-errno.patch + create mode 100644 source/dietlibc/diet-qmail/rc + create mode 100644 source/dietlibc/diet-qmail/send_log_run + create mode 100644 source/dietlibc/diet-qmail/send_run + create mode 100644 source/dietlibc/diet-qmail/smtpd_log_run + create mode 100644 source/dietlibc/diet-qmail/smtpd_run + create mode 100644 source/dietlibc/diet-qmail/tcp.pop3 + create mode 100644 source/dietlibc/diet-qmail/tcp.smtp + +diff --git a/source/dietlibc/diet-qmail/FrugalBuild b/source/dietlibc/diet-qmail/FrugalBuild +new file mode 100644 +index 0000000..c973246 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/FrugalBuild +@@ -0,0 +1,293 @@ ++# Patched qmail: ++# errno ++# ext_todo ++# qregex ++# qmailqueue ++# smtpd.spam ++# dietlibc ++# + queue-fix package with patches: ++# errno ++# dietlibc ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=qmail ++pkgname=$branch-$pkgorig ++pkgver=1.03 ++pkgrel=1 ++pkgdesc="A secure, reliable, efficient, SMTP/POP3 server." ++url="http://cr.yp.to/qmail.html" ++depends=('daemontools' 'ucspi-tcp' 'openssl') ++makedepends=('dietlibc') ++backup=(var/qmail/supervise/qmail-pop3d/run \ ++ var/qmail/supervise/qmail-pop3d/log/run \ ++ var/qmail/supervise/qmail-send/run \ ++ var/qmail/supervise/qmail-send/log/run \ ++ var/qmail/supervise/qmail-smtpd/run \ ++ var/qmail/supervise/qmail-smtpd/log/run \ ++ var/qmail/control/concurrencyincoming \ ++ var/qmail/control/defaultdelivery \ ++ var/qmail/control/me \ ++ etc/tcp.smtp etc/tcp.pop3) ++provides=('smtp-server' 'pop3-server' 'qmail') ++install="$pkgorig.install" ++archs=(i686) ++up2date="1.03" ++source=(http://cr.yp.to/software/$pkgorig-$pkgver.tar.gz \ ++ qmail-1.03.errno.patch \ ++ ext_todo-20030105.patch \ ++ qmailqueue-patch \ ++ qregex-20060423-qmail.patch \ ++ qmail-dietlibc.patch \ ++ qmail-smtpd.spam.patch \ ++ http://www.netmeridian.com/e-huss/queue-fix-1.4.tar.gz \ ++ queue-fix-errno.patch \ ++ queue-fix-dietlibc.patch \ ++ rc smtpd_run pop3d_run qmail.profile qmail.rc send_log_run \ ++ send_run smtpd_log_run pop3d_log_run tcp.smtp tcp.pop3 \ ++ make_cert.sh) ++ ++sha1sums=('18fb960481291a0503e93a94df3f6094edb7f27a' \ ++ '5cab1d84f67987983d13f10be1577e3da274cb94' \ ++ 'a1ecb939a4aaeeb325d947f3e6416aa63ae97d80' \ ++ '76240289d52f2aca88004af47e5bd41c969880cf' \ ++ '40b18255da69a2f36cf8698d8eb907f5f039c0a7' \ ++ '605e93734c82373383f0284fabc64f85c4c06bfc' \ ++ '25f4ef231560bbc5fc3c2a82f2f0cd0696deded9' \ ++ 'ce42fcc4daf5076adcf8fea6a9a84f2e1716c67c' \ ++ '72be22c7987ff3639692cda21c09dec340e06a4a' \ ++ '7d3525ab4a2e0e2be2bcd074dd94ae2784309d1b' \ ++ '3111cc689b5b1f6caa38997bf5f85aa3a516ef9c' \ ++ '3a80e44c97fd3035ce16c68fd2f611a64c61d169' \ ++ 'f14f63c7b1bdc2d1f527249235551dc7f21ad47d' \ ++ '36951a4c195c72f4194c2d98ce3478c11d85c5bf' \ ++ '2b29cf70c6cbf52ef5af5da7840c72ae626ccb50' \ ++ '80543d062529a1eefde0c8b288c411a0b896e950' \ ++ '5877c8e1896f655bd8f4d98d52e67231c63d9e42' \ ++ '87ebef35a931cdf43b9ffc6dfe42529a21e562ba' \ ++ 'e53e6248b347be058e3e1973434b2b885c65f091' \ ++ '27ff6fcaa115d7b59b86f54f970b6271c84ca6d3' \ ++ 'ac0994b0ec0ada5bd28fdce6f8e37e9827357f43' \ ++ '3e91eb05c9bf51e230f237d19633fc572fbc3540') ++ ++# NOTE: This should be built only as root, ++# not using fakeroot. ++ ++# a small function to add required groups ++# & users before building. ++pre_build_qmail() { ++ # create a tmp dir ++ mkdir -p $startdir/src/tmp ++ # group: qmail ++ if [ ! `grep qmail /etc/group` ]; then ++ echo "==> Adding group qmail (temporarily)" ++ groupadd -g 2107 qmail &>/dev/null ++ touch $startdir/src/tmp/group_qmail ++ fi ++ ++ # group: nofiles ++ if [ ! `grep nofiles /etc/group` ]; then ++ echo "==> Adding group nofiles (temporarily)" ++ groupadd -g 2108 nofiles &>/dev/null ++ touch $startdir/src/tmp/group_nofiles ++ fi ++ ++ # user: alias ++ if ! id alias &>/dev/null; then ++ echo "==> Adding user alias (temporarily)" ++ useradd -u 7790 -g nofiles -d /var/qmail/alias -s /bin/false alias ++ touch $startdir/src/tmp/user_alias ++ fi ++ ++ # user: qmaild ++ if ! id qmaild &>/dev/null; then ++ echo "==> Adding user qmaild (temporarily)" ++ useradd -u 7791 -g nofiles -d /var/qmail -s /bin/false qmaild ++ touch $startdir/src/tmp/user_qmaild ++ fi ++ ++ # user: qmaill ++ if ! id qmaill &>/dev/null; then ++ echo "==> Adding user qmaill (temporarily)" ++ useradd -u 7792 -g nofiles -d /var/qmail -s /bin/false qmaill ++ touch $startdir/src/tmp/user_qmaill ++ fi ++ ++ # user: qmailp ++ if ! id qmailp &>/dev/null; then ++ echo "==> Adding user qmailp (temporarily)" ++ useradd -u 7793 -g nofiles -d /var/qmail -s /bin/false qmailp ++ touch $startdir/src/tmp/user_qmailp ++ fi ++ ++ # user: qmailq ++ if ! id qmailq &>/dev/null; then ++ echo "==> Adding user qmailq (temporarily)" ++ useradd -u 7794 -g qmail -d /var/qmail -s /bin/false qmailq ++ touch $startdir/src/tmp/user_qmailq ++ fi ++ ++ # user: qmailr ++ if ! id qmailr &>/dev/null; then ++ echo "==> Adding user: qmailr (temporarily)" ++ useradd -u 7795 -g qmail -d /var/qmail -s /bin/false qmailr ++ touch $startdir/src/tmp/user_qmailr ++ fi ++ ++ # user: qmails ++ if ! id qmails &>/dev/null; then ++ echo "==> Adding user: qmails (temporarily)" ++ useradd -u 7796 -g qmail -d /var/qmail -s /bin/false qmails ++ touch $startdir/src/tmp/user_qmails ++ fi ++} ++ ++# a small function to remove users ++# after the build. ++post_build_qmail() { ++ # remove users ++ for user in alias qmail{d,l,p,q,r,s}; do ++ if [ -f $startdir/src/tmp/user_${user} ]; then ++ echo "==> Removing user: ${user}" ++ userdel ${user} &> /dev/null ++ fi ++ done ++ ++ # remove groups ++ for group in nofiles qmail; do ++ if [ -f $startdir/src/tmp/group_${group} ]; then ++ echo "==> Removing group: ${group}" ++ groupdel ${group} &> /dev/null ++ fi ++ done ++ ++ # remove temp dir ++ rm -rf $startdir/src/tmp ++} ++ ++build() { ++ # save me some typing ;) ++ qmail_dir=$Fdestdir/var/qmail ++ ++ ++ # add the required groups & users ++ pre_build_qmail || Fdie ++ ++ # start playing with qmail :) ++ Fcd $pkgorig-$pkgver ++ Fpatch qmail-1.03.errno.patch ++ Fpatch ext_todo-20030105.patch ++ Fpatch qmailqueue-patch ++ Fpatch qregex-20060423-qmail.patch ++ Fpatch qmail-dietlibc.patch ++ Fpatch qmail-smtpd.spam.patch ++ ++ # compile qmail ++ make it man || Fdie ++ ++ # create dirs ++ install -d -m 755 -o root -g qmail $qmail_dir ++ for i in bin boot control users; do ++ install -d -m 755 -o root -g qmail $qmail_dir/$i ++ done ++ install -d -m 755 -o alias -g qmail $qmail_dir/alias ++ install -d -m 755 -o qmaill $startdir/pkg/var/log/qmail ++ install -d -m 755 -o qmaill $startdir/pkg/var/log/qmail/smtpd ++ install -d -m 755 -o qmaill $startdir/pkg/var/log/qmail/pop3d ++ install -d -m 755 -o qmaill $startdir/pkg/var/log/qmail/send ++ mkdir -p $qmail_dir/supervise/qmail-{pop3d,send,smtpd}/log ++ install -d -m 710 -o qmailq -g qmail $qmail_dir/queue ++ ++ # install binaries ++ for i in binm1{,+df} binm2{,+df} binm3{,+df} home{,+df} proc{,+df}; do ++ install -m 755 -o root -g qmail $i $qmail_dir/boot/$i ++ done ++ install -m 4711 -o qmailq -g qmail qmail-queue \ ++ $qmail_dir/bin/qmail-queue ++ for i in qmail-lspawn qmail-start qmail-newu qmail-newmrh; do ++ install -m 700 -o root -g qmail $i $qmail_dir/bin/$i ++ done ++ for i in qmail-getpw qmail-local qmail-remote qmail-rspawn \ ++ qmail-clean qmail-send splogger qmail-popup qmail-pw2u \ ++ qmail-todo; do ++ install -m 711 -o root -g qmail $i $qmail_dir/bin/$i ++ done ++ for i in qmail-inject predate datemail mailsubj qmail-showctl \ ++ qmail-qread qmail-qstat qmail-tcpto qmail-tcpok qmail-pop3d \ ++ qmail-popup qmail-qmqpc qmail-qmqpd qmail-qmtpd qmail-smtpd \ ++ sendmail tcp-env qreceipt qsmhook qbiff forward preline \ ++ condredirect bouncesaying except maildirmake maildir2mbox \ ++ maildirwatch qail elq pinq config-fast; do ++ install -m 755 -o root -g qmail $i $qmail_dir/bin/$i ++ done ++ ++ # install manpages ++ for i in bouncesaying except maildir2mbox maildirwatch preline qreceipt \ ++ condredirect forward maildirmake mailsubj qbiff tcp-env; do ++ install -D -m 644 -o root -g qmail ${i}.1 $qmail_dir/man/man1/${i}.1 ++ done ++ for i in addresses envelopes mbox qmail-header qmail-users dot-qmail \ ++ maildir qmail-control qmail-log tcp-environ; do ++ install -D -m 644 -o root -g qmail ${i}.5 $qmail_dir/man/man5/${i}.5 ++ done ++ for i in forgeries qmail-limits qmail; do ++ install -D -m 644 -o root -g qmail ${i}.7 $qmail_dir/man/man7/${i}.7 ++ done ++ for i in qmail-clean qmail-newmrh qmail-qmqpd qmail-rspawn qmail-tcpto \ ++ qmail-command qmail-newu qmail-qmtpd qmail-send splogger \ ++ qmail-getpw qmail-pop3d qmail-qread qmail-showctl qmail-inject \ ++ qmail-popup qmail-qstat qmail-smtpd qmail-local qmail-pw2u \ ++ qmail-queue qmail-start qmail-lspawn qmail-qmqpc qmail-remote \ ++ qmail-tcpok; do ++ install -D -m 644 -o root -g qmail ${i}.8 $qmail_dir/man/man8/${i}.8 ++ done ++ ++ # install supervise files ++ for i in pop3d send smtpd; do ++ install -m 755 $startdir/${i}_run \ ++ $qmail_dir/supervise/qmail-${i}/run ++ install -m 755 $startdir/${i}_log_run \ ++ $qmail_dir/supervise/qmail-${i}/log/run ++ done ++ ++ # install rc ++ install -m 755 $startdir/rc \ ++ $qmail_dir/rc ++ ++ # install concurrencyicoming & defaultdelivery files ++ echo 20 > $qmail_dir/control/concurrencyincoming ++ echo ./Maildir/ > $qmail_dir/control/defaultdelivery ++ chmod 644 $qmail_dir/control/{concurrencyincoming,defaultdelivery} ++ ++ # create sendmail symlinks for compatibility reasons ++ for i in sbin lib; do ++ mkdir -p $Fdestdir/usr/${i} ++ ln -sf /var/qmail/bin/sendmail $Fdestdir/usr/${i}/sendmail ++ done ++ ++ # install profile.d file ++ install -D -m 755 $startdir/qmail.profile $Fdestdir/etc/profile.d/qmail.sh ++ ++ # install tcp files ++ for i in smtp pop3; do ++ install -D -m 644 $startdir/tcp.${i} $Fdestdir/etc/tcp.${i} ++ done ++ ++ # install cert making script ++ install -D -m755 $startdir/make_cert.sh $qmail_dir/bin/make_cert.sh ++ ++ # install rc.d file ++ install -D -m 755 $startdir/qmail.rc $Fdestdir/etc/rc.d/qmail ++ ++ # build and install queue-fix ++ Fmessage "Now building queue-fix" ++ cd $Fsrcdir/queue-fix-1.4 || Fdie ++ Fpatch queue-fix-errno.patch ++ Fpatch queue-fix-dietlibc.patch ++ make || Fdie ++ install -D -m755 queue-fix $qmail_dir/bin/queue-fix ++ ++ # remove groups & users ++ post_build_qmail || Fdie ++} ++ +diff --git a/source/dietlibc/diet-qmail/ext_todo-20030105.patch b/source/dietlibc/diet-qmail/ext_todo-20030105.patch +new file mode 100644 +index 0000000..466fb4d +--- /dev/null ++++ b/source/dietlibc/diet-qmail/ext_todo-20030105.patch +@@ -0,0 +1,1238 @@ ++diff -uN qmail-1.03/EXTTODO qmail-exttodo/EXTTODO ++--- qmail-1.03/EXTTODO Thu Jan 1 01:00:00 1970 +++++ qmail-exttodo/EXTTODO Sun Jan 5 22:12:01 2003 ++@@ -0,0 +1,114 @@ +++EXTTODO by Claudio Jeker and +++Andre Oppermann +++(c) 1998,1999,2000,2001,2002 Internet Business Solutions Ltd. +++ +++The EXTTODO patch is a part of the qmail-ldap patch. +++This patches for qmail come with NO WARRANTY. +++ +++These patches are under the BSD license. +++ +++RELEASE: 5. Jan. 2003 +++ +++EXTTODO: +++====================== +++ +++TOC: +++ WHAT DOES IT DO +++ INSTALL +++ CONFIG FILES +++ SETUP +++ BIG PICTURE +++ +++NEWS: +++ +++ This is the first release of the EXTTODO patch. +++ +++================================================================================ +++ +++WHAT DOES IT DO +++ +++ The exttodo patch addresses a problem known as the silly qmail (queue) +++ problem. This problem is found only on system with high injection rates. +++ +++ qmail with a big local and remote concurrency could deliver a tremendous +++ amount of messages but normally this can not be achieved because qmail-send +++ becomes a bottleneck on those high volumes servers. +++ qmail-send preprocesses all new messages before distributing them for local +++ or remote delivering. In one run qmail-send does one todo run but has the +++ ability to close multiple jobs. Because of this layout qmail-send can not +++ feed all the new available (local/remote) delivery slots and therefor it is +++ not possible to achieve the maximum throughput. +++ This would be a minor problem if one qmail-send run could be done in extreme +++ short time but because of many file system calls (fsync and (un)link) a todo +++ run is expensive and throttles the throughput. +++ +++ The exttodo patch tries to solve the problem by moving the todo routine into +++ an external program. This reduces the run time in qmail-send. +++ +++ exttodo adds a new program to qmail called qmail-todo. qmail-todo prepares +++ incoming messages for local and remote delivering (by creating info/ +++ local/ and remote/ and removing todo/). See also +++ INTERNALS. As next qmail-todo transmits the to qmail-send which will +++ add this message into the priority queue which schedules the message for +++ delivery. +++ +++INSTALL +++ +++ To enable the exttodo patch you need to define EXTERNAL_TODO while compiling +++ qmail(-ldap) this can be done with the -D flag of cc (e.g. cc -DEXTERNAL_TODO). +++ +++ NOTE: the exttodo patch can also be used on qmail systems without the +++ qmail-ldap patch. +++ +++================================================================================ +++ +++CONFIG FILES +++ +++ No additional control files are used or needed. +++ +++================================================================================ +++ +++SETUP +++ +++ qmail-todo will be started by qmail-start and therefor no additional setup +++ is needed. +++ +++ To verify that exttodo is running just check if qmail-todo is running. +++ +++================================================================================ +++ +++BIG PICTURE +++ +++ +-------+ +-------+ +++ | clean | | clean | +++ +--0-1--+ +--0-1--+ +-----------+ +++ trigger ^ | ^ | +->0,1 lspawn | +++ | | v | v / +-----------+ +++ +-------+ v +--2-3--+ +--5-6--+ / +++ | | | | 0<--7 1,2<-+ +++ | queue |--+--| todo | | send | +++ | | | | 1-->8 3,4<-+ +++ +-------+ +-------+ +---0---+ \ +++ | \ +-----------+ +++ v +->0,1 rspwan | +++ +---0---+ +-----------+ +++ | logger| +++ +-------+ +++ +++Communication between qmail-send and qmail-todo +++ +++todo -> send: +++ D[LRB]\0 +++ Start delivery for new message with id . +++ the character L, R or B defines the type +++ of delivery, local, remote or both respectively. +++ L\0 +++ Dump string to the logger without adding additional \n or similar. +++send -> todo: +++ H Got a SIGHUP reread ~/control/locals and ~/control/virtualdomains +++ X Quit ASAP. +++ +++qmail-todo sends "\0" terminated messages whereas qmail-send just send one +++character to qmail-todo. +++ +++ ++diff -uN qmail-1.03/EXTTODO-INFO qmail-exttodo/EXTTODO-INFO ++--- qmail-1.03/EXTTODO-INFO Thu Jan 1 01:00:00 1970 +++++ qmail-exttodo/EXTTODO-INFO Tue Apr 30 16:49:02 2002 ++@@ -0,0 +1,11 @@ +++Files modified: +++Makefile +++EXTTODO +++FILES +++TARGETS +++qmail-send.c +++qmail-todo.c +++qmail-start.c +++hier.c +++install-big.c +++ ++diff -uN qmail-1.03/FILES qmail-exttodo/FILES ++--- qmail-1.03/FILES Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/FILES Mon Apr 22 13:59:28 2002 ++@@ -431,3 +431,4 @@ ++ tcp-environ.5 ++ constmap.h ++ constmap.c +++qmail-todo.c ++diff -uN qmail-1.03/Makefile qmail-exttodo/Makefile ++--- qmail-1.03/Makefile Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/Makefile Mon Apr 22 14:55:59 2002 ++@@ -1,5 +1,7 @@ ++ # Don't edit Makefile! Use conf-* for configuration. ++ +++DEFINES=-DEXTERNAL_TODO # use to enable external todo +++ ++ SHELL=/bin/sh ++ ++ default: it ++@@ -703,7 +705,7 @@ ++ ++ hier.o: \ ++ compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h ++- ./compile hier.c +++ ./compile $(DEFINES) hier.c ++ ++ home: \ ++ home.sh conf-qmail ++@@ -755,7 +757,7 @@ ++ install-big.o: \ ++ compile install-big.c auto_qmail.h auto_split.h auto_uids.h fmt.h \ ++ fifo.h ++- ./compile install-big.c +++ ./compile $(DEFINES) install-big.c ++ ++ install.o: \ ++ compile install.c substdio.h strerr.h error.h open.h readwrite.h \ ++@@ -808,7 +810,7 @@ ++ forward preline condredirect bouncesaying except maildirmake \ ++ maildir2mbox maildirwatch qail elq pinq idedit install-big install \ ++ instcheck home home+df proc proc+df binm1 binm1+df binm2 binm2+df \ ++-binm3 binm3+df +++binm3 binm3+df qmail-todo ++ ++ load: \ ++ make-load warn-auto.sh systype ++@@ -1509,7 +1511,7 @@ ++ scan.h case.h auto_qmail.h trigger.h newfield.h stralloc.h quote.h \ ++ qmail.h substdio.h qsutil.h prioq.h datetime.h gen_alloc.h constmap.h \ ++ fmtqfn.h readsubdir.h direntry.h ++- ./compile qmail-send.c +++ ./compile $(DEFINES) qmail-send.c ++ ++ qmail-showctl: \ ++ load qmail-showctl.o auto_uids.o control.o open.a getln.a stralloc.a \ ++@@ -1574,7 +1576,7 @@ ++ ++ qmail-start.o: \ ++ compile qmail-start.c fd.h prot.h exit.h fork.h auto_uids.h ++- ./compile qmail-start.c +++ ./compile $(DEFINES) qmail-start.c ++ ++ qmail-tcpok: \ ++ load qmail-tcpok.o open.a lock.a strerr.a substdio.a error.a str.a \ ++@@ -1605,6 +1607,20 @@ ++ compile qmail-tcpto.c substdio.h subfd.h substdio.h auto_qmail.h \ ++ fmt.h ip.h lock.h error.h exit.h datetime.h now.h datetime.h ++ ./compile qmail-tcpto.c +++ +++qmail-todo: \ +++load qmail-todo.o control.o constmap.o trigger.o fmtqfn.o now.o \ +++readsubdir.o case.a ndelay.a getln.a sig.a open.a stralloc.a alloc.a \ +++substdio.a error.a str.a fs.a auto_qmail.o auto_split.o +++ ./load qmail-todo control.o constmap.o trigger.o fmtqfn.o now.o \ +++ readsubdir.o case.a ndelay.a getln.a sig.a open.a stralloc.a \ +++ alloc.a substdio.a error.a str.a fs.a auto_qmail.o auto_split.o +++ +++qmail-todo.o: \ +++compile alloc.h auto_qmail.h byte.h constmap.h control.h direntry.h error.h \ +++exit.h fmt.h fmtqfn.h getln.h open.h ndelay.h now.h readsubdir.h readwrite.h \ +++scan.h select.h str.h stralloc.h substdio.h trigger.h +++ ./compile $(DEFINES) qmail-todo.c ++ ++ qmail-upq: \ ++ warn-auto.sh qmail-upq.sh conf-qmail conf-break conf-split ++diff -uN qmail-1.03/TARGETS qmail-exttodo/TARGETS ++--- qmail-1.03/TARGETS Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/TARGETS Mon Apr 22 13:59:32 2002 ++@@ -385,3 +385,5 @@ ++ man ++ setup ++ check +++qmail-todo.o +++qmail-todo ++diff -uN qmail-1.03/hier.c qmail-exttodo/hier.c ++--- qmail-1.03/hier.c Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/hier.c Mon Apr 22 14:01:58 2002 ++@@ -108,6 +108,9 @@ ++ c(auto_qmail,"bin","qmail-rspawn",auto_uido,auto_gidq,0711); ++ c(auto_qmail,"bin","qmail-clean",auto_uido,auto_gidq,0711); ++ c(auto_qmail,"bin","qmail-send",auto_uido,auto_gidq,0711); +++#ifdef EXTERNAL_TODO +++ c(auto_qmail,"bin","qmail-todo",auto_uido,auto_gidq,0711); +++#endif ++ c(auto_qmail,"bin","splogger",auto_uido,auto_gidq,0711); ++ c(auto_qmail,"bin","qmail-newu",auto_uido,auto_gidq,0700); ++ c(auto_qmail,"bin","qmail-newmrh",auto_uido,auto_gidq,0700); ++diff -uN qmail-1.03/install-big.c qmail-exttodo/install-big.c ++--- qmail-1.03/install-big.c Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/install-big.c Mon Apr 22 14:02:11 2002 ++@@ -108,6 +108,9 @@ ++ c(auto_qmail,"bin","qmail-rspawn",auto_uido,auto_gidq,0711); ++ c(auto_qmail,"bin","qmail-clean",auto_uido,auto_gidq,0711); ++ c(auto_qmail,"bin","qmail-send",auto_uido,auto_gidq,0711); +++#ifdef EXTERNAL_TODO +++ c(auto_qmail,"bin","qmail-todo",auto_uido,auto_gidq,0711); +++#endif ++ c(auto_qmail,"bin","splogger",auto_uido,auto_gidq,0711); ++ c(auto_qmail,"bin","qmail-newu",auto_uido,auto_gidq,0700); ++ c(auto_qmail,"bin","qmail-newmrh",auto_uido,auto_gidq,0700); ++diff -uN qmail-1.03/qmail-send.c qmail-exttodo/qmail-send.c ++--- qmail-1.03/qmail-send.c Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/qmail-send.c Sun Jan 5 22:09:42 2003 ++@@ -1215,6 +1215,7 @@ ++ ++ /* this file is too long ---------------------------------------------- TODO */ ++ +++#ifndef EXTERNAL_TODO ++ datetime_sec nexttodorun; ++ DIR *tododir; /* if 0, have to opendir again */ ++ stralloc todoline = {0}; ++@@ -1438,6 +1439,143 @@ ++ if (fdchan[c] != -1) close(fdchan[c]); ++ } ++ +++#endif +++ +++/* this file is too long ------------------------------------- EXTERNAL TODO */ +++ +++#ifdef EXTERNAL_TODO +++stralloc todoline = {0}; +++char todobuf[2048]; +++int todofdin; +++int todofdout; +++int flagtodoalive; +++ +++void tododied() { log1("alert: oh no! lost qmail-todo connection! dying...\n"); +++ flagexitasap = 1; flagtodoalive = 0; } +++ +++void todo_init() +++{ +++ todofdout = 7; +++ todofdin = 8; +++ flagtodoalive = 1; +++ /* sync with external todo */ +++ if (write(todofdout, "S", 1) != 1) tododied(); +++ +++ return; +++} +++ +++void todo_selprep(nfds,rfds,wakeup) +++int *nfds; +++fd_set *rfds; +++datetime_sec *wakeup; +++{ +++ if (flagexitasap) { +++ if (flagtodoalive) { +++ write(todofdout, "X", 1); +++ } +++ } +++ if (flagtodoalive) { +++ FD_SET(todofdin,rfds); +++ if (*nfds <= todofdin) +++ *nfds = todofdin + 1; +++ } +++} +++ +++void todo_del(char* s) +++{ +++ int flagchan[CHANNELS]; +++ struct prioq_elt pe; +++ unsigned long id; +++ unsigned int len; +++ int c; +++ +++ for (c = 0;c < CHANNELS;++c) flagchan[c] = 0; +++ switch(*s++) { +++ case 'L': +++ flagchan[0] = 1; +++ break; +++ case 'R': +++ flagchan[1] = 1; +++ break; +++ case 'B': +++ flagchan[0] = 1; +++ flagchan[1] = 1; +++ break; +++ case 'X': +++ break; +++ default: +++ log1("warning: qmail-send unable to understand qmail-todo\n"); +++ return; +++ } +++ +++ len = scan_ulong(s,&id); +++ if (!len || s[len]) { +++ log1("warning: qmail-send unable to understand qmail-todo\n"); +++ return; +++ } +++ +++ pe.id = id; pe.dt = now(); +++ for (c = 0;c < CHANNELS;++c) +++ if (flagchan[c]) +++ while (!prioq_insert(&pqchan[c],&pe)) nomem(); +++ +++ for (c = 0;c < CHANNELS;++c) if (flagchan[c]) break; +++ if (c == CHANNELS) +++ while (!prioq_insert(&pqdone,&pe)) nomem(); +++ +++ return; +++} +++ +++void todo_do(rfds) +++fd_set *rfds; +++{ +++ int r; +++ char ch; +++ int i; +++ +++ if (!flagtodoalive) return; +++ if (!FD_ISSET(todofdin,rfds)) return; +++ +++ r = read(todofdin,todobuf,sizeof(todobuf)); +++ if (r == -1) return; +++ if (r == 0) { +++ if (flagexitasap) +++ flagtodoalive = 0; +++ else +++ tododied(); +++ return; +++ } +++ for (i = 0;i < r;++i) { +++ ch = todobuf[i]; +++ while (!stralloc_append(&todoline,&ch)) nomem(); +++ if (todoline.len > REPORTMAX) +++ todoline.len = REPORTMAX; +++ /* qmail-todo is responsible for keeping it short */ +++ if (!ch && (todoline.len > 1)) { +++ switch (todoline.s[0]) { +++ case 'D': +++ if (flagexitasap) break; +++ todo_del(todoline.s + 1); +++ break; +++ case 'L': +++ log1(todoline.s + 1); +++ break; +++ case 'X': +++ if (flagexitasap) +++ flagtodoalive = 0; +++ else +++ tododied(); +++ break; +++ default: +++ log1("warning: qmail-send unable to understand qmail-todo: report mangled\n"); +++ break; +++ } +++ todoline.len = 0; +++ } +++ } +++} +++ +++#endif ++ ++ /* this file is too long ---------------------------------------------- MAIN */ ++ ++@@ -1504,6 +1642,9 @@ ++ log1("alert: unable to reread controls: unable to switch to home directory\n"); ++ return; ++ } +++#ifdef EXTERNAL_TODO +++ write(todofdout, "H", 1); +++#endif ++ regetcontrols(); ++ while (chdir("queue") == -1) ++ { ++@@ -1568,8 +1709,12 @@ ++ todo_init(); ++ cleanup_init(); ++ +++#ifdef EXTERNAL_TODO +++ while (!flagexitasap || !del_canexit() || flagtodoalive) +++#else ++ while (!flagexitasap || !del_canexit()) ++- { +++#endif +++ { ++ recent = now(); ++ ++ if (flagrunasap) { flagrunasap = 0; pqrun(); } ++diff -uN qmail-1.03/qmail-start.c qmail-exttodo/qmail-start.c ++--- qmail-1.03/qmail-start.c Mon Jun 15 12:53:16 1998 +++++ qmail-exttodo/qmail-start.c Mon Apr 22 13:55:48 2002 ++@@ -8,6 +8,9 @@ ++ char *(qcargs[]) = { "qmail-clean", 0 }; ++ char *(qlargs[]) = { "qmail-lspawn", "./Mailbox", 0 }; ++ char *(qrargs[]) = { "qmail-rspawn", 0 }; +++#ifdef EXTERNAL_TODO +++char *(qtargs[]) = { "qmail-todo", 0}; +++#endif ++ ++ void die() { _exit(111); } ++ ++@@ -18,13 +21,28 @@ ++ int pi4[2]; ++ int pi5[2]; ++ int pi6[2]; ++- ++-void close23456() { close(2); close(3); close(4); close(5); close(6); } +++#ifdef EXTERNAL_TODO +++int pi7[2]; +++int pi8[2]; +++int pi9[2]; +++int pi10[2]; +++#endif +++ +++void close23456() { +++ close(2); close(3); close(4); close(5); close(6); +++#ifdef EXTERNAL_TODO +++ close(7); close(8); +++#endif +++} ++ ++ void closepipes() { ++ close(pi1[0]); close(pi1[1]); close(pi2[0]); close(pi2[1]); ++ close(pi3[0]); close(pi3[1]); close(pi4[0]); close(pi4[1]); ++ close(pi5[0]); close(pi5[1]); close(pi6[0]); close(pi6[1]); +++#ifdef EXTERNAL_TODO +++ close(pi7[0]); close(pi7[1]); close(pi8[0]); close(pi8[1]); +++ close(pi9[0]); close(pi9[1]); close(pi10[0]); close(pi10[1]); +++#endif ++ } ++ ++ void main(argc,argv) ++@@ -40,6 +58,10 @@ ++ if (fd_copy(4,0) == -1) die(); ++ if (fd_copy(5,0) == -1) die(); ++ if (fd_copy(6,0) == -1) die(); +++#ifdef EXTERNAL_TODO +++ if (fd_copy(7,0) == -1) die(); +++ if (fd_copy(8,0) == -1) die(); +++#endif ++ ++ if (argv[1]) { ++ qlargs[1] = argv[1]; ++@@ -70,6 +92,12 @@ ++ if (pipe(pi4) == -1) die(); ++ if (pipe(pi5) == -1) die(); ++ if (pipe(pi6) == -1) die(); +++#ifdef EXTERNAL_TODO +++ if (pipe(pi7) == -1) die(); +++ if (pipe(pi8) == -1) die(); +++ if (pipe(pi9) == -1) die(); +++ if (pipe(pi10) == -1) die(); +++#endif ++ ++ switch(fork()) { ++ case -1: die(); ++@@ -105,6 +133,34 @@ ++ execvp(*qcargs,qcargs); ++ die(); ++ } +++ +++#ifdef EXTERNAL_TODO +++ switch(fork()) { +++ case -1: die(); +++ case 0: +++ if (prot_uid(auto_uids) == -1) die(); +++ if (fd_copy(0,pi7[0]) == -1) die(); +++ if (fd_copy(1,pi8[1]) == -1) die(); +++ close23456(); +++ if (fd_copy(2,pi9[1]) == -1) die(); +++ if (fd_copy(3,pi10[0]) == -1) die(); +++ closepipes(); +++ execvp(*qtargs,qtargs); +++ die(); +++ } +++ +++ switch(fork()) { +++ case -1: die(); +++ case 0: +++ if (prot_uid(auto_uidq) == -1) die(); +++ if (fd_copy(0,pi9[0]) == -1) die(); +++ if (fd_copy(1,pi10[1]) == -1) die(); +++ close23456(); +++ closepipes(); +++ execvp(*qcargs,qcargs); +++ die(); +++ } +++#endif ++ ++ if (prot_uid(auto_uids) == -1) die(); ++ if (fd_copy(0,1) == -1) die(); ++@@ -114,6 +170,10 @@ ++ if (fd_copy(4,pi4[0]) == -1) die(); ++ if (fd_copy(5,pi5[1]) == -1) die(); ++ if (fd_copy(6,pi6[0]) == -1) die(); +++#ifdef EXTERNAL_TODO +++ if (fd_copy(7,pi7[1]) == -1) die(); +++ if (fd_copy(8,pi8[0]) == -1) die(); +++#endif ++ closepipes(); ++ execvp(*qsargs,qsargs); ++ die(); ++diff -uN qmail-1.03/qmail-todo.c qmail-exttodo/qmail-todo.c ++--- qmail-1.03/qmail-todo.c Thu Jan 1 01:00:00 1970 +++++ qmail-exttodo/qmail-todo.c Sun Jan 5 22:16:34 2003 ++@@ -0,0 +1,688 @@ +++#include +++#include +++#include "alloc.h" +++#include "auto_qmail.h" +++#include "byte.h" +++#include "constmap.h" +++#include "control.h" +++#include "direntry.h" +++#include "error.h" +++#include "exit.h" +++#include "fmt.h" +++#include "fmtqfn.h" +++#include "getln.h" +++#include "open.h" +++#include "ndelay.h" +++#include "now.h" +++#include "readsubdir.h" +++#include "readwrite.h" +++#include "scan.h" +++#include "select.h" +++#include "str.h" +++#include "stralloc.h" +++#include "substdio.h" +++#include "trigger.h" +++ +++/* critical timing feature #1: if not triggered, do not busy-loop */ +++/* critical timing feature #2: if triggered, respond within fixed time */ +++/* important timing feature: when triggered, respond instantly */ +++#define SLEEP_TODO 1500 /* check todo/ every 25 minutes in any case */ +++#define SLEEP_FUZZ 1 /* slop a bit on sleeps to avoid zeno effect */ +++#define SLEEP_FOREVER 86400 /* absolute maximum time spent in select() */ +++#define SLEEP_SYSFAIL 123 +++ +++stralloc percenthack = {0}; +++struct constmap mappercenthack; +++stralloc locals = {0}; +++struct constmap maplocals; +++stralloc vdoms = {0}; +++struct constmap mapvdoms; +++stralloc envnoathost = {0}; +++ +++char strnum[FMT_ULONG]; +++ +++/* XXX not good, if qmail-send.c changes this has to be updated */ +++#define CHANNELS 2 +++char *chanaddr[CHANNELS] = { "local/", "remote/" }; +++ +++datetime_sec recent; +++ +++void log1(char *x); +++void log3(char* x, char* y, char* z); +++ +++int flagstopasap = 0; +++void sigterm(void) +++{ +++ if (flagstopasap == 0) +++ log1("status: qmail-todo stop processing asap\n"); +++ flagstopasap = 1; +++} +++ +++int flagreadasap = 0; void sighup(void) { flagreadasap = 1; } +++int flagsendalive = 1; void senddied(void) { flagsendalive = 0; } +++ +++void nomem() { log1("alert: out of memory, sleeping...\n"); sleep(10); } +++void pausedir(dir) char *dir; +++{ log3("alert: unable to opendir ",dir,", sleeping...\n"); sleep(10); } +++ +++void cleandied() +++{ +++ log1("alert: qmail-todo: oh no! lost qmail-clean connection! dying...\n"); +++ flagstopasap = 1; +++} +++ +++ +++/* this file is not so long ------------------------------------- FILENAMES */ +++ +++stralloc fn = {0}; +++ +++void fnmake_init(void) +++{ +++ while (!stralloc_ready(&fn,FMTQFN)) nomem(); +++} +++ +++void fnmake_info(unsigned long id) { fn.len = fmtqfn(fn.s,"info/",id,1); } +++void fnmake_todo(unsigned long id) { fn.len = fmtqfn(fn.s,"todo/",id,0); } +++void fnmake_mess(unsigned long id) { fn.len = fmtqfn(fn.s,"mess/",id,1); } +++void fnmake_chanaddr(unsigned long id, int c) +++{ fn.len = fmtqfn(fn.s,chanaddr[c],id,1); } +++ +++ +++/* this file is not so long ------------------------------------- REWRITING */ +++ +++stralloc rwline = {0}; +++ +++/* 1 if by land, 2 if by sea, 0 if out of memory. not allowed to barf. */ +++/* may trash recip. must set up rwline, between a T and a \0. */ +++int rewrite(char *recip) +++{ +++ int i; +++ int j; +++ char *x; +++ static stralloc addr = {0}; +++ int at; +++ +++ if (!stralloc_copys(&rwline,"T")) return 0; +++ if (!stralloc_copys(&addr,recip)) return 0; +++ +++ i = byte_rchr(addr.s,addr.len,'@'); +++ if (i == addr.len) { +++ if (!stralloc_cats(&addr,"@")) return 0; +++ if (!stralloc_cat(&addr,&envnoathost)) return 0; +++ } +++ +++ while (constmap(&mappercenthack,addr.s + i + 1,addr.len - i - 1)) { +++ j = byte_rchr(addr.s,i,'%'); +++ if (j == i) break; +++ addr.len = i; +++ i = j; +++ addr.s[i] = '@'; +++ } +++ +++ at = byte_rchr(addr.s,addr.len,'@'); +++ +++ if (constmap(&maplocals,addr.s + at + 1,addr.len - at - 1)) { +++ if (!stralloc_cat(&rwline,&addr)) return 0; +++ if (!stralloc_0(&rwline)) return 0; +++ return 1; +++ } +++ +++ for (i = 0;i <= addr.len;++i) +++ if (!i || (i == at + 1) || (i == addr.len) || ((i > at) && (addr.s[i] == '.'))) +++ if (x = constmap(&mapvdoms,addr.s + i,addr.len - i)) { +++ if (!*x) break; +++ if (!stralloc_cats(&rwline,x)) return 0; +++ if (!stralloc_cats(&rwline,"-")) return 0; +++ if (!stralloc_cat(&rwline,&addr)) return 0; +++ if (!stralloc_0(&rwline)) return 0; +++ return 1; +++ } +++ +++ if (!stralloc_cat(&rwline,&addr)) return 0; +++ if (!stralloc_0(&rwline)) return 0; +++ return 2; +++} +++ +++/* this file is not so long --------------------------------- COMMUNICATION */ +++ +++substdio sstoqc; char sstoqcbuf[1024]; +++substdio ssfromqc; char ssfromqcbuf[1024]; +++stralloc comm_buf = {0}; +++int comm_pos; +++int fdout = -1; +++int fdin = -1; +++ +++void comm_init(void) +++{ +++ substdio_fdbuf(&sstoqc,write,2,sstoqcbuf,sizeof(sstoqcbuf)); +++ substdio_fdbuf(&ssfromqc,read,3,ssfromqcbuf,sizeof(ssfromqcbuf)); +++ +++ fdout = 1; /* stdout */ +++ fdin = 0; /* stdin */ +++ if (ndelay_on(fdout) == -1) +++ /* this is so stupid: NDELAY semantics should be default on write */ +++ senddied(); /* drastic, but better than risking deadlock */ +++ +++ while (!stralloc_ready(&comm_buf,1024)) nomem(); +++} +++ +++int comm_canwrite(void) +++{ +++ /* XXX: could allow a bigger buffer; say 10 recipients */ +++ /* XXX: returns true if there is something in the buffer */ +++ if (!flagsendalive) return 0; +++ if (comm_buf.s && comm_buf.len) return 1; +++ return 0; +++} +++ +++void log1(char* x) +++{ +++ int pos; +++ +++ pos = comm_buf.len; +++ if (!stralloc_cats(&comm_buf,"L")) goto fail; +++ if (!stralloc_cats(&comm_buf,x)) goto fail; +++ if (!stralloc_0(&comm_buf)) goto fail; +++ return; +++ +++fail: +++ /* either all or nothing */ +++ comm_buf.len = pos; +++} +++ +++void log3(char* x, char *y, char *z) +++{ +++ int pos; +++ +++ pos = comm_buf.len; +++ if (!stralloc_cats(&comm_buf,"L")) goto fail; +++ if (!stralloc_cats(&comm_buf,x)) goto fail; +++ if (!stralloc_cats(&comm_buf,y)) goto fail; +++ if (!stralloc_cats(&comm_buf,z)) goto fail; +++ if (!stralloc_0(&comm_buf)) goto fail; +++ return; +++ +++fail: +++ /* either all or nothing */ +++ comm_buf.len = pos; +++} +++ +++void comm_write(unsigned long id, int local, int remote) +++{ +++ int pos; +++ char *s; +++ +++ if(local && remote) s="B"; +++ else if(local) s="L"; +++ else if(remote) s="R"; +++ else s="X"; +++ +++ pos = comm_buf.len; +++ strnum[fmt_ulong(strnum,id)] = 0; +++ if (!stralloc_cats(&comm_buf,"D")) goto fail; +++ if (!stralloc_cats(&comm_buf,s)) goto fail; +++ if (!stralloc_cats(&comm_buf,strnum)) goto fail; +++ if (!stralloc_0(&comm_buf)) goto fail; +++ return; +++ +++fail: +++ /* either all or nothing */ +++ comm_buf.len = pos; +++} +++ +++static int issafe(char ch) +++{ +++ if (ch == '%') return 0; /* general principle: allman's code is crap */ +++ if (ch < 33) return 0; +++ if (ch > 126) return 0; +++ return 1; +++} +++ +++void comm_info(unsigned long id, unsigned long size, char* from, unsigned long pid, unsigned long uid) +++{ +++ int pos; +++ int i; +++ +++ pos = comm_buf.len; +++ if (!stralloc_cats(&comm_buf,"Linfo msg ")) goto fail; +++ strnum[fmt_ulong(strnum,id)] = 0; +++ if (!stralloc_cats(&comm_buf,strnum)) goto fail; +++ if (!stralloc_cats(&comm_buf,": bytes ")) goto fail; +++ strnum[fmt_ulong(strnum,size)] = 0; +++ if (!stralloc_cats(&comm_buf,strnum)) goto fail; +++ if (!stralloc_cats(&comm_buf," from <")) goto fail; +++ i = comm_buf.len; +++ if (!stralloc_cats(&comm_buf,from)) goto fail; +++ for (;i < comm_buf.len;++i) +++ if (comm_buf.s[i] == '\n') +++ comm_buf.s[i] = '/'; +++ else +++ if (!issafe(comm_buf.s[i])) +++ comm_buf.s[i] = '_'; +++ if (!stralloc_cats(&comm_buf,"> qp ")) goto fail; +++ strnum[fmt_ulong(strnum,pid)] = 0; +++ if (!stralloc_cats(&comm_buf,strnum)) goto fail; +++ if (!stralloc_cats(&comm_buf," uid ")) goto fail; +++ strnum[fmt_ulong(strnum,uid)] = 0; +++ if (!stralloc_cats(&comm_buf,strnum)) goto fail; +++ if (!stralloc_cats(&comm_buf,"\n")) goto fail; +++ if (!stralloc_0(&comm_buf)) goto fail; +++ return; +++ +++fail: +++ /* either all or nothing */ +++ comm_buf.len = pos; +++} +++ +++void comm_exit(void) +++{ +++ int w; +++ +++ /* if it fails exit, we have already stoped */ +++ if (!stralloc_cats(&comm_buf,"X")) _exit(1); +++ if (!stralloc_0(&comm_buf)) _exit(1); +++} +++ +++void comm_selprep(int *nfds, fd_set *wfds, fd_set *rfds) +++{ +++ if (flagsendalive) { +++ if (flagstopasap && comm_canwrite() == 0) +++ comm_exit(); +++ if (comm_canwrite()) { +++ FD_SET(fdout,wfds); +++ if (*nfds <= fdout) +++ *nfds = fdout + 1; +++ } +++ FD_SET(fdin,rfds); +++ if (*nfds <= fdin) +++ *nfds = fdin + 1; +++ } +++} +++ +++void comm_do(fd_set *wfds, fd_set *rfds) +++{ +++ /* first write then read */ +++ if (flagsendalive) +++ if (comm_canwrite()) +++ if (FD_ISSET(fdout,wfds)) { +++ int w; +++ int len; +++ len = comm_buf.len; +++ w = write(fdout,comm_buf.s + comm_pos,len - comm_pos); +++ if (w <= 0) { +++ if ((w == -1) && (errno == error_pipe)) +++ senddied(); +++ } else { +++ comm_pos += w; +++ if (comm_pos == len) { +++ comm_buf.len = 0; +++ comm_pos = 0; +++ } +++ } +++ } +++ if (flagsendalive) +++ if (FD_ISSET(fdin,rfds)) { +++ /* there are only two messages 'H' and 'X' */ +++ char c; +++ int r; +++ r = read(fdin, &c, 1); +++ if (r <= 0) { +++ if ((r == -1) && (errno != error_intr)) +++ senddied(); +++ } else { +++ switch(c) { +++ case 'H': +++ sighup(); +++ break; +++ case 'X': +++ sigterm(); +++ break; +++ default: +++ log1("warning: qmail-todo: qmail-send speaks an obscure dialect\n"); +++ break; +++ } +++ } +++ } +++} +++ +++/* this file is not so long ------------------------------------------ TODO */ +++ +++datetime_sec nexttodorun; +++DIR *tododir; /* if 0, have to opendir again */ +++stralloc todoline = {0}; +++char todobuf[SUBSTDIO_INSIZE]; +++char todobufinfo[512]; +++char todobufchan[CHANNELS][1024]; +++ +++void todo_init(void) +++{ +++ tododir = 0; +++ nexttodorun = now(); +++ trigger_set(); +++} +++ +++void todo_selprep(int *nfds, fd_set *rfds, datetime_sec *wakeup) +++{ +++ if (flagstopasap) return; +++ trigger_selprep(nfds,rfds); +++ if (tododir) *wakeup = 0; +++ if (*wakeup > nexttodorun) *wakeup = nexttodorun; +++} +++ +++void todo_do(fd_set *rfds) +++{ +++ struct stat st; +++ substdio ss; int fd; +++ substdio ssinfo; int fdinfo; +++ substdio sschan[CHANNELS]; +++ int fdchan[CHANNELS]; +++ int flagchan[CHANNELS]; +++ char ch; +++ int match; +++ unsigned long id; +++ unsigned int len; +++ direntry *d; +++ int c; +++ unsigned long uid; +++ unsigned long pid; +++ +++ fd = -1; +++ fdinfo = -1; +++ for (c = 0;c < CHANNELS;++c) fdchan[c] = -1; +++ +++ if (flagstopasap) return; +++ +++ if (!tododir) +++ { +++ if (!trigger_pulled(rfds)) +++ if (recent < nexttodorun) +++ return; +++ trigger_set(); +++ tododir = opendir("todo"); +++ if (!tododir) +++ { +++ pausedir("todo"); +++ return; +++ } +++ nexttodorun = recent + SLEEP_TODO; +++ } +++ +++ d = readdir(tododir); +++ if (!d) +++ { +++ closedir(tododir); +++ tododir = 0; +++ return; +++ } +++ if (str_equal(d->d_name,".")) return; +++ if (str_equal(d->d_name,"..")) return; +++ len = scan_ulong(d->d_name,&id); +++ if (!len || d->d_name[len]) return; +++ +++ fnmake_todo(id); +++ +++ fd = open_read(fn.s); +++ if (fd == -1) { log3("warning: qmail-todo: unable to open ",fn.s,"\n"); return; } +++ +++ fnmake_mess(id); +++ /* just for the statistics */ +++ if (stat(fn.s,&st) == -1) +++ { log3("warning: qmail-todo: unable to stat ",fn.s,"\n"); goto fail; } +++ +++ for (c = 0;c < CHANNELS;++c) +++ { +++ fnmake_chanaddr(id,c); +++ if (unlink(fn.s) == -1) if (errno != error_noent) +++ { log3("warning: qmail-todo: unable to unlink ",fn.s,"\n"); goto fail; } +++ } +++ +++ fnmake_info(id); +++ if (unlink(fn.s) == -1) if (errno != error_noent) +++ { log3("warning: qmail-todo: unable to unlink ",fn.s,"\n"); goto fail; } +++ +++ fdinfo = open_excl(fn.s); +++ if (fdinfo == -1) +++ { log3("warning: qmail-todo: unable to create ",fn.s,"\n"); goto fail; } +++ +++ strnum[fmt_ulong(strnum,id)] = 0; +++ log3("new msg ",strnum,"\n"); +++ +++ for (c = 0;c < CHANNELS;++c) flagchan[c] = 0; +++ +++ substdio_fdbuf(&ss,read,fd,todobuf,sizeof(todobuf)); +++ substdio_fdbuf(&ssinfo,write,fdinfo,todobufinfo,sizeof(todobufinfo)); +++ +++ uid = 0; +++ pid = 0; +++ +++ for (;;) +++ { +++ if (getln(&ss,&todoline,&match,'\0') == -1) +++ { +++ /* perhaps we're out of memory, perhaps an I/O error */ +++ fnmake_todo(id); +++ log3("warning: qmail-todo: trouble reading ",fn.s,"\n"); goto fail; +++ } +++ if (!match) break; +++ +++ switch(todoline.s[0]) +++ { +++ case 'u': +++ scan_ulong(todoline.s + 1,&uid); +++ break; +++ case 'p': +++ scan_ulong(todoline.s + 1,&pid); +++ break; +++ case 'F': +++ if (substdio_putflush(&ssinfo,todoline.s,todoline.len) == -1) +++ { +++ fnmake_info(id); +++ log3("warning: qmail-todo: trouble writing to ",fn.s,"\n"); goto fail; +++ } +++ comm_info(id, (unsigned long) st.st_size, todoline.s + 1, pid, uid); +++ break; +++ case 'T': +++ switch(rewrite(todoline.s + 1)) +++ { +++ case 0: nomem(); goto fail; +++ case 2: c = 1; break; +++ default: c = 0; break; +++ } +++ if (fdchan[c] == -1) +++ { +++ fnmake_chanaddr(id,c); +++ fdchan[c] = open_excl(fn.s); +++ if (fdchan[c] == -1) +++ { log3("warning: qmail-todo: unable to create ",fn.s,"\n"); goto fail; } +++ substdio_fdbuf(&sschan[c] +++ ,write,fdchan[c],todobufchan[c],sizeof(todobufchan[c])); +++ flagchan[c] = 1; +++ } +++ if (substdio_bput(&sschan[c],rwline.s,rwline.len) == -1) +++ { +++ fnmake_chanaddr(id,c); +++ log3("warning: qmail-todo: trouble writing to ",fn.s,"\n"); goto fail; +++ } +++ break; +++ default: +++ fnmake_todo(id); +++ log3("warning: qmail-todo: unknown record type in ",fn.s,"\n"); goto fail; +++ } +++ } +++ +++ close(fd); fd = -1; +++ +++ fnmake_info(id); +++ if (substdio_flush(&ssinfo) == -1) +++ { log3("warning: qmail-todo: trouble writing to ",fn.s,"\n"); goto fail; } +++ if (fsync(fdinfo) == -1) +++ { log3("warning: qmail-todo: trouble fsyncing ",fn.s,"\n"); goto fail; } +++ close(fdinfo); fdinfo = -1; +++ +++ for (c = 0;c < CHANNELS;++c) +++ if (fdchan[c] != -1) +++ { +++ fnmake_chanaddr(id,c); +++ if (substdio_flush(&sschan[c]) == -1) +++ { log3("warning: qmail-todo: trouble writing to ",fn.s,"\n"); goto fail; } +++ if (fsync(fdchan[c]) == -1) +++ { log3("warning: qmail-todo: trouble fsyncing ",fn.s,"\n"); goto fail; } +++ close(fdchan[c]); fdchan[c] = -1; +++ } +++ +++ fnmake_todo(id); +++ if (substdio_putflush(&sstoqc,fn.s,fn.len) == -1) { cleandied(); return; } +++ if (substdio_get(&ssfromqc,&ch,1) != 1) { cleandied(); return; } +++ if (ch != '+') +++ { +++ log3("warning: qmail-clean unable to clean up ",fn.s,"\n"); +++ return; +++ } +++ +++ comm_write(id, flagchan[0], flagchan[1]); +++ +++ return; +++ +++ fail: +++ if (fd != -1) close(fd); +++ if (fdinfo != -1) close(fdinfo); +++ for (c = 0;c < CHANNELS;++c) +++ if (fdchan[c] != -1) close(fdchan[c]); +++} +++ +++/* this file is too long ---------------------------------------------- MAIN */ +++ +++int getcontrols(void) +++{ +++ if (control_init() == -1) return 0; +++ if (control_rldef(&envnoathost,"control/envnoathost",1,"envnoathost") != 1) return 0; +++ if (control_readfile(&locals,"control/locals",1) != 1) return 0; +++ if (!constmap_init(&maplocals,locals.s,locals.len,0)) return 0; +++ switch(control_readfile(&percenthack,"control/percenthack",0)) +++ { +++ case -1: return 0; +++ case 0: if (!constmap_init(&mappercenthack,"",0,0)) return 0; break; +++ case 1: if (!constmap_init(&mappercenthack,percenthack.s,percenthack.len,0)) return 0; break; +++ } +++ switch(control_readfile(&vdoms,"control/virtualdomains",0)) +++ { +++ case -1: return 0; +++ case 0: if (!constmap_init(&mapvdoms,"",0,1)) return 0; break; +++ case 1: if (!constmap_init(&mapvdoms,vdoms.s,vdoms.len,1)) return 0; break; +++ } +++ return 1; +++} +++ +++stralloc newlocals = {0}; +++stralloc newvdoms = {0}; +++ +++void regetcontrols(void) +++{ +++ int r; +++ +++ if (control_readfile(&newlocals,"control/locals",1) != 1) +++ { log1("alert: qmail-todo: unable to reread control/locals\n"); return; } +++ r = control_readfile(&newvdoms,"control/virtualdomains",0); +++ if (r == -1) +++ { log1("alert: qmail-todo: unable to reread control/virtualdomains\n"); return; } +++ +++ constmap_free(&maplocals); +++ constmap_free(&mapvdoms); +++ +++ while (!stralloc_copy(&locals,&newlocals)) nomem(); +++ while (!constmap_init(&maplocals,locals.s,locals.len,0)) nomem(); +++ +++ if (r) +++ { +++ while (!stralloc_copy(&vdoms,&newvdoms)) nomem(); +++ while (!constmap_init(&mapvdoms,vdoms.s,vdoms.len,1)) nomem(); +++ } +++ else +++ while (!constmap_init(&mapvdoms,"",0,1)) nomem(); +++} +++ +++void reread(void) +++{ +++ if (chdir(auto_qmail) == -1) +++ { +++ log1("alert: qmail-todo: unable to reread controls: unable to switch to home directory\n"); +++ return; +++ } +++ regetcontrols(); +++ while (chdir("queue") == -1) +++ { +++ log1("alert: qmail-todo: unable to switch back to queue directory; HELP! sleeping...\n"); +++ sleep(10); +++ } +++} +++ +++void main() +++{ +++ datetime_sec wakeup; +++ fd_set rfds; +++ fd_set wfds; +++ int nfds; +++ struct timeval tv; +++ int r; +++ char c; +++ +++ if (chdir(auto_qmail) == -1) +++ { log1("alert: qmail-todo: cannot start: unable to switch to home directory\n"); _exit(111); } +++ if (!getcontrols()) +++ { log1("alert: qmail-todo: cannot start: unable to read controls\n"); _exit(111); } +++ if (chdir("queue") == -1) +++ { log1("alert: qmail-todo: cannot start: unable to switch to queue directory\n"); _exit(111); } +++ sig_pipeignore(); +++ umask(077); +++ +++ fnmake_init(); +++ +++ todo_init(); +++ comm_init(); +++ +++ do { +++ r = read(fdin, &c, 1); +++ if ((r == -1) && (errno != error_intr)) +++ _exit(100); /* read failed probably qmail-send died */ +++ } while (r =! 1); /* we assume it is a 'S' */ +++ +++ for (;;) +++ { +++ recent = now(); +++ +++ if (flagreadasap) { flagreadasap = 0; reread(); } +++ if (!flagsendalive) { +++ /* qmail-send finaly exited, so do the same. */ +++ if (flagstopasap) _exit(0); +++ /* qmail-send died. We can not log and we can not work therefor _exit(1). */ +++ _exit(1); +++ } +++ +++ wakeup = recent + SLEEP_FOREVER; +++ FD_ZERO(&rfds); +++ FD_ZERO(&wfds); +++ nfds = 1; +++ +++ todo_selprep(&nfds,&rfds,&wakeup); +++ comm_selprep(&nfds,&wfds,&rfds); +++ +++ if (wakeup <= recent) tv.tv_sec = 0; +++ else tv.tv_sec = wakeup - recent + SLEEP_FUZZ; +++ tv.tv_usec = 0; +++ +++ if (select(nfds,&rfds,&wfds,(fd_set *) 0,&tv) == -1) +++ if (errno == error_intr) +++ ; +++ else +++ log1("warning: qmail-todo: trouble in select\n"); +++ else +++ { +++ recent = now(); +++ +++ todo_do(&rfds); +++ comm_do(&wfds, &rfds); +++ } +++ } +++ /* NOTREACHED */ +++} +++ +diff --git a/source/dietlibc/diet-qmail/make_cert.sh b/source/dietlibc/diet-qmail/make_cert.sh +new file mode 100644 +index 0000000..8b17499 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/make_cert.sh +@@ -0,0 +1,57 @@ ++#!/bin/sh ++# ++# This script creates ssl certificates for ++# use with qmail. ++# ++ ++cert() { ++if openssl req -new -x509 -nodes -out /var/qmail/control/servercert.pem \ ++ -days 366 -keyout /var/qmail/control/servercert.pem; then ++ chmod 640 /var/qmail/control/servercert.pem ++ chown qmaild.qmail /var/qmail/control/servercert.pem ++ ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem ++ echo "==> Process done." ++else ++ echo "==> Certificate creation failed." ++ exit 1 ++fi ++} ++ ++cert_req() { ++if openssl req -new -nodes -out req.pem \ ++ -keyout /var/qmail/control/servercert.pem; then ++ chmod 640 /var/qmail/control/servercert.pem ++ chown qmaild.qmail /var/qmail/control/servercert.pem ++ ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem ++ cat << EOF ++ ++==> Process done. ++==> Send req.pem to your CA to obtain signed_req.pem, and do: ++==> cat signed_req.pem >> /var/qmail/control/servercert.pem ++ ++EOF ++else ++ echo "==> Certificate creation failed." ++ exit 1 ++fi ++} ++ ++case "$1" in ++ -h|--help) ++ cat << EOF ++ ++This script creates SSL certificates to use with qmail. ++Options : ++ -h --help This help screen ++ -r --req Creates a certificate verification request to ++ send to your CA. ++EOF ++ ;; ++ -r|--req) ++ cert_req ++ ;; ++ *) ++ cert ++ ;; ++esac ++ +diff --git a/source/dietlibc/diet-qmail/pop3d_log_run b/source/dietlibc/diet-qmail/pop3d_log_run +new file mode 100644 +index 0000000..941cde1 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/pop3d_log_run +@@ -0,0 +1,20 @@ ++#!/bin/sh ++# ++# Edit this file to match your setup. ++# NOTE: This file is automatically backed-up by pacman, ++# during updates ++# ++ ++# Log size rotate size. ++LOG_SIZE="1048576" ++ ++# Number of logs to keep. ++LOGS="5" ++ ++# Don't change from this point on, unless ++# you really know what you're doing :). ++ ++exec /usr/bin/setuidgid qmaill \ ++ /usr/bin/multilog t \ ++ n${LOGS} s${LOG_SIZE} \ ++ /var/log/qmail/pop3d 2>&1 +diff --git a/source/dietlibc/diet-qmail/pop3d_run b/source/dietlibc/diet-qmail/pop3d_run +new file mode 100644 +index 0000000..a61f0cd +--- /dev/null ++++ b/source/dietlibc/diet-qmail/pop3d_run +@@ -0,0 +1,33 @@ ++#!/bin/sh ++# ++# Edit this file to match your setup. ++# NOTE: This file is automatically backed-up by pacman, ++# during updates ++# ++ ++# Password checking program (ie. checkpasswd, vpopmail). ++PASSPROG="" ++ ++# FQDN as set in /var/qmail/control/me ++LOCAL=`head -1 /var/qmail/control/me` ++ ++# Maximum memory qmail-pop3d is allowed to use. ++MAX_MEM="2000000" ++ ++# Maximum allowed concurrent connections. ++MAX_CON="30" ++ ++# Relay control. ++TCP_CDB="/etc/tcp.pop3.cdb" ++ ++# Don't change from this point on, unless ++# you really know what you're doing :). ++POPUP="/var/qmail/bin/qmail-popup" ++POP3D="/var/qmail/bin/qmail-pop3d" ++PORT="110" ++ ++exec /usr/bin/softlimit -m $MAX_MEM \ ++ /usr/bin/tcpserver -H -l $LOCAL \ ++ -v -x $TCP_CDB \ ++ -c $MAX_CON -R 0 $PORT \ ++ $POPUP $LOCAL $PASSPROG $POP3D Maildir 2>&1 +diff --git a/source/dietlibc/diet-qmail/qmail-1.03.errno.patch b/source/dietlibc/diet-qmail/qmail-1.03.errno.patch +new file mode 100644 +index 0000000..75e0b7b +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qmail-1.03.errno.patch +@@ -0,0 +1,47 @@ ++diff -u qmail-1.03.old/cdb_seek.c qmail-1.03/cdb_seek.c ++--- qmail-1.03.old/cdb_seek.c 1998-06-15 05:52:55.000000000 -0500 +++++ qmail-1.03/cdb_seek.c 2003-01-08 15:55:53.000000000 -0600 ++@@ -1,6 +1,5 @@ ++ #include ++ #include ++-extern int errno; ++ #include "cdb.h" ++ ++ #ifndef SEEK_SET ++diff -u qmail-1.03.old/dns.c qmail-1.03/dns.c ++--- qmail-1.03.old/dns.c 1998-06-15 05:52:55.000000000 -0500 +++++ qmail-1.03/dns.c 2003-01-08 16:00:32.000000000 -0600 ++@@ -7,8 +7,6 @@ ++ #include ++ extern int res_query(); ++ extern int res_search(); ++-extern int errno; ++-extern int h_errno; ++ #include "ip.h" ++ #include "ipalloc.h" ++ #include "fmt.h" ++diff -u qmail-1.03.old/error.3 qmail-1.03/error.3 ++--- qmail-1.03.old/error.3 1998-06-15 05:52:55.000000000 -0500 +++++ qmail-1.03/error.3 2003-01-08 15:58:13.000000000 -0600 ++@@ -3,8 +3,7 @@ ++ error \- syscall error codes ++ .SH SYNTAX ++ .B #include ++- ++-extern int \fBerrno\fP; +++.B #include ++ ++ extern int \fBerror_intr\fP; ++ .br ++diff -u qmail-1.03.old/error.h qmail-1.03/error.h ++--- qmail-1.03.old/error.h 1998-06-15 05:52:55.000000000 -0500 +++++ qmail-1.03/error.h 2003-01-08 15:59:13.000000000 -0600 ++@@ -1,7 +1,7 @@ ++ #ifndef ERROR_H ++ #define ERROR_H ++ ++-extern int errno; +++#include ++ ++ extern int error_intr; ++ extern int error_nomem; +diff --git a/source/dietlibc/diet-qmail/qmail-dietlibc.patch b/source/dietlibc/diet-qmail/qmail-dietlibc.patch +new file mode 100644 +index 0000000..52e404c +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qmail-dietlibc.patch +@@ -0,0 +1,40 @@ ++dietlibc compile ++ ++diff -r df48dd6b95fa conf-cc ++--- a/conf-cc Thu Nov 01 16:30:40 2007 +0100 +++++ b/conf-cc Thu Nov 01 16:46:06 2007 +0100 ++@@ -1,3 +1,3 @@ cc -O2 ++-cc -O2 +++diet gcc -O2 ++ ++ This will be used to compile .c files. ++diff -r df48dd6b95fa conf-ld ++--- a/conf-ld Thu Nov 01 16:30:40 2007 +0100 +++++ b/conf-ld Thu Nov 01 16:46:06 2007 +0100 ++@@ -1,3 +1,3 @@ cc -s ++-cc -s +++diet gcc -s -static ++ ++ This will be used to link .o files into an executable. ++diff -r df48dd6b95fa predate.c ++--- a/predate.c Thu Nov 01 16:30:40 2007 +0100 +++++ b/predate.c Thu Nov 01 16:46:06 2007 +0100 ++@@ -8,7 +8,6 @@ ++ #include "strerr.h" ++ #include "substdio.h" ++ #include "subfd.h" ++-#include "readwrite.h" ++ #include "exit.h" ++ ++ #define FATAL "predate: fatal: " ++diff -r df48dd6b95fa qbiff.c ++--- a/qbiff.c Thu Nov 01 16:30:40 2007 +0100 +++++ b/qbiff.c Thu Nov 01 16:46:06 2007 +0100 ++@@ -8,7 +8,6 @@ ++ #define UTMP_FILE "/etc/utmp" ++ #endif ++ #endif ++-#include "readwrite.h" ++ #include "stralloc.h" ++ #include "substdio.h" ++ #include "subfd.h" +diff --git a/source/dietlibc/diet-qmail/qmail-smtpd.spam.patch b/source/dietlibc/diet-qmail/qmail-smtpd.spam.patch +new file mode 100644 +index 0000000..5ef6b6e +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qmail-smtpd.spam.patch +@@ -0,0 +1,74 @@ ++stika.net antispam ++ ++diff -r 72430e923db2 qmail-smtpd.c ++--- a/qmail-smtpd.c Thu Nov 01 16:46:06 2007 +0100 +++++ b/qmail-smtpd.c Thu Nov 01 16:54:59 2007 +0100 ++@@ -31,6 +31,7 @@ ++ #define BMCHECK_BMT 2 ++ #define BMCHECK_BMTNR 3 ++ #define BMCHECK_BHELO 4 +++#define BMCHECK_GMF 5 // 20041202 tz - goodmailfrom functionality ++ ++ ++ #define MAXHOPS 100 ++@@ -108,6 +109,9 @@ int bmfok = 0; ++ int bmfok = 0; ++ stralloc bmf = {0}; ++ +++int gmfok = 0; +++stralloc gmf = {0}; +++ ++ int bmfnrok = 0; ++ stralloc bmfnr = {0}; ++ ++@@ -140,6 +144,9 @@ void setup() ++ ++ bmfok = control_readfile(&bmf,"control/badmailfrom",0); ++ if (bmfok == -1) die_control(); +++ +++ gmfok = control_readfile(&gmf,"control/goodmailfrom",0); +++ if (gmfok == -1) die_control(); ++ ++ bmfnrok = control_readfile(&bmfnr,"control/badmailfromnorelay",0); ++ if (bmfnrok == -1) die_control(); ++@@ -247,6 +254,8 @@ int bmcheck(which) int which; ++ ++ if (which == BMCHECK_BMF) { ++ if (!stralloc_copy(&bmb,&bmf)) die_nomem(); +++ } else if (which == BMCHECK_GMF) { // 20041202 tz - goodmailfrom +++ if (!stralloc_copy(&bmb,&gmf)) die_nomem(); ++ } else if (which == BMCHECK_BMFNR) { ++ if (!stralloc_copy(&bmb,&bmfnr)) die_nomem(); ++ } else if (which == BMCHECK_BMT) { ++@@ -304,6 +313,7 @@ int flagbarfbhelo; ++ int flagbarfbhelo; ++ stralloc mailfrom = {0}; ++ stralloc rcptto = {0}; +++int senderallowed = 0; /* 20021121 tz - our anti-spam */ ++ ++ void smtp_helo(arg) char *arg; ++ { ++@@ -327,6 +337,7 @@ void smtp_mail(arg) char *arg; ++ if (!addrparse(arg)) { err_syntax(); return; } ++ flagbarfbmf = 0; /* bmcheck is skipped for empty envelope senders */ ++ if ((bmfok) && (addr.len != 1)) flagbarfbmf = bmcheck(BMCHECK_BMF); +++ if (flagbarfbmf && gmfok) flagbarfbmf = !bmcheck(BMCHECK_GMF); // 20041202 tz - goodmailfrom ++ if ((!flagbarfbmf) && (bmfnrok) && (addr.len != 1) && (!relayclient)) { ++ flagbarfbmf = bmcheck(BMCHECK_BMFNR); ++ } ++@@ -334,6 +345,7 @@ void smtp_mail(arg) char *arg; ++ if (!stralloc_copys(&rcptto,"")) die_nomem(); ++ if (!stralloc_copys(&mailfrom,addr.s)) die_nomem(); ++ if (!stralloc_0(&mailfrom)) die_nomem(); +++ senderallowed = addrallowed(); /* 20021121 tz - our anti-spam */ ++ out("250 ok\r\n"); ++ } ++ void smtp_rcpt(arg) char *arg; { ++@@ -377,6 +389,7 @@ void smtp_rcpt(arg) char *arg; { ++ } ++ else ++ if (!addrallowed()) { err_nogateway(); return; } +++ if (!(addrallowed() || senderallowed)) { err_nogateway(); return; } /* 20021121 tz - our anti-spam */ ++ if (!stralloc_cats(&rcptto,"T")) die_nomem(); ++ if (!stralloc_cats(&rcptto,addr.s)) die_nomem(); ++ if (!stralloc_0(&rcptto)) die_nomem(); +diff --git a/source/dietlibc/diet-qmail/qmail.profile b/source/dietlibc/diet-qmail/qmail.profile +new file mode 100644 +index 0000000..3b5fcd0 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qmail.profile +@@ -0,0 +1,5 @@ ++#!/bin/sh ++ ++export QMAILDIR=/var/qmail ++export PATH=$PATH:$QMAILDIR/bin ++export MANPATH=$MANPATH:$QMAILDIR/man +diff --git a/source/dietlibc/diet-qmail/qmail.rc b/source/dietlibc/diet-qmail/qmail.rc +new file mode 100644 +index 0000000..45e716e +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qmail.rc +@@ -0,0 +1,167 @@ ++#!/bin/sh ++# ++# qmailctl script (based on lifewithqmail) ++# modified for ArchLinux ++# ++ ++. /etc/rc.conf ++. /etc/rc.d/functions ++ ++QMAILDUID=`id -u qmaild` ++NOFILESGID=`id -g qmaild` ++ ++case "$1" in ++ start) ++ stat_busy "Starting qmail" ++ for i in send smtpd pop3d; do ++ if svok /service/qmail-${i} &>/dev/null ; then ++ echo -n " ${i}" ++ svc -u /service/qmail-${i} ++ fi ++ done ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ add_daemon qmail ++ stat_done ++ fi ++ ;; ++ stop) ++ stat_busy "Stopping qmail" ++ for i in send smtpd pop3d; do ++ if svok /service/qmail-${i} &>/dev/null ; then ++ echo -n " ${i}" ++ svc -d /service/qmail-${i} ++ fi ++ done ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ rm_daemon qmail ++ stat_done ++ fi ++ ;; ++ stat) ++ for i in send smtpd pop3d; do ++ if svok /service/qmail-${i} &>/dev/null ; then ++ svstat /service/qmail-${i} ++ svstat /service/qmail-${i}/log ++ fi ++ done ++ qmail-qstat ++ ;; ++ doqueue|alrm|flush) ++ stat_busy "Sending ALRM signal to qmail-send" ++ svc -a /service/qmail-send ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ stat_done ++ fi ++ ;; ++ queue) ++ qmail-qstat ++ qmail-qread ++ ;; ++ reload|hup) ++ stat_busy "Sending HUP signal to qmail-send" ++ svc -h /service/qmail-send ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ stat_done ++ fi ++ ;; ++ pause) ++ stat_busy "Pausing qmail" ++ for i in send smtpd pop3d; do ++ if svok /service/qmail-${i} &>/dev/null ; then ++ echo -n " ${i}" ++ svc -p /service/qmail-${i} ++ fi ++ done ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ stat_done ++ fi ++ ;; ++ cont) ++ stat_busy "Continuing qmail" ++ for i in send smtpd pop3d; do ++ if svok /service/qmail-${i} &>/dev/null ; then ++ echo -n " ${i}" ++ svc -c /service/qmail-${i} ++ fi ++ done ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ stat_done ++ fi ++ ;; ++ restart) ++ stat_busy "Restarting qmail" ++ if svok /service/qmail-smtpd &>/dev/null ; then ++ echo -n " Stopping qmail-smtpd" ++ svc -d /service/qmail-smtpd ++ fi ++ if svok /service/qmail-send &>/dev/null ; then ++ echo -n " Sending qmail-send SIGTERM and restarting" ++ svc -t /service/qmail-send ++ fi ++ if svok /service/qmail-pop3d &>/dev/null ; then ++ echo -n " Restarting qmail-pop3d" ++ svc -t /service/qmail-pop3d ++ fi ++ if svok /service/qmail-smtpd &>/dev/null ; then ++ echo -n " Restarting qmail-smtpd" ++ svc -u /service/qmail-smtpd ++ fi ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ stat_done ++ fi ++ ;; ++ cdb) ++ stat_busy "Reload qmail access control" ++ if [ -f /etc/tcp.smtp ]; then ++ echo -n " SMTP" ++ tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp ++ chmod 644 /etc/tcp.smtp.cdb ++ fi ++ if [ -f /etc/tcp.pop3 ]; then ++ echo -n " POP3" ++ tcprules /etc/tcp.pop3.cdb /etc/tcp.pop3.tmp < /etc/tcp.pop3 ++ chmod 644 /etc/tcp.pop3.cdb ++ fi ++ if [ $? -gt 0 ]; then ++ stat_fail ++ else ++ stat_done ++ fi ++ ;; ++ help) ++ cat < ++To: qmail@list.cr.yp.to ++Subject: QMAILQUEUE patch for qmail-1.03 ++Date: Mon, 25 Jan 1999 15:37:21 -0600 ++ ++Greetings. ++ ++Appended is a patch to qmail-1.03 that causes any program that would run ++qmail-queue to look for an environment variable QMAILQUEUE. If it is ++present, it is used in place of the string "bin/qmail-queue" when ++running qmail-queue. This could be used, for example, to add a program ++into the qmail-smtpd->qmail-queue pipeline that could do filtering, ++rewrite broken headers, etc. (this is my planned usage for it). ++ ++This has undergone virtually no testing, but it looks so simple that it ++almost has to be correct. No warranties, etc. Note that the chdir to ++/var/qmail is always done before exec'ing the program. ++ ++Does this look like a reasonable thing to do? ++-- ++Bruce Guenter, QCC Communications Corp. EMail: bruce.guenter@qcc.sk.ca ++Phone: (306)249-0220 WWW: http://www.qcc.sk.ca/~bguenter/ ++ ++diff -u qmail-1.03-orig/Makefile qmail-1.03/Makefile ++--- qmail-1.03-orig/Makefile Mon Jun 15 04:53:16 1998 +++++ qmail-1.03/Makefile Tue Jan 19 10:52:24 1999 ++@@ -1483,12 +1483,12 @@ ++ trigger.o fmtqfn.o quote.o now.o readsubdir.o qmail.o date822fmt.o \ ++ datetime.a case.a ndelay.a getln.a wait.a seek.a fd.a sig.a open.a \ ++ lock.a stralloc.a alloc.a substdio.a error.a str.a fs.a auto_qmail.o \ ++-auto_split.o +++auto_split.o env.a ++ ./load qmail-send qsutil.o control.o constmap.o newfield.o \ ++ prioq.o trigger.o fmtqfn.o quote.o now.o readsubdir.o \ ++ qmail.o date822fmt.o datetime.a case.a ndelay.a getln.a \ ++ wait.a seek.a fd.a sig.a open.a lock.a stralloc.a alloc.a \ ++- substdio.a error.a str.a fs.a auto_qmail.o auto_split.o +++ substdio.a error.a str.a fs.a auto_qmail.o auto_split.o env.a ++ ++ qmail-send.0: \ ++ qmail-send.8 ++diff -u qmail-1.03-orig/qmail.c qmail-1.03/qmail.c ++--- qmail-1.03-orig/qmail.c Mon Jun 15 04:53:16 1998 +++++ qmail-1.03/qmail.c Tue Jan 19 09:57:36 1999 ++@@ -6,14 +6,25 @@ ++ #include "fd.h" ++ #include "qmail.h" ++ #include "auto_qmail.h" +++#include "env.h" ++ ++-static char *binqqargs[2] = { "bin/qmail-queue", 0 } ; +++static char *binqqargs[2] = { 0, 0 } ; +++ +++static void setup_qqargs() +++{ +++ if(!binqqargs[0]) +++ binqqargs[0] = env_get("QMAILQUEUE"); +++ if(!binqqargs[0]) +++ binqqargs[0] = "bin/qmail-queue"; +++} ++ ++ int qmail_open(qq) ++ struct qmail *qq; ++ { ++ int pim[2]; ++ int pie[2]; +++ +++ setup_qqargs(); ++ ++ if (pipe(pim) == -1) return -1; ++ if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; } ++ +diff --git a/source/dietlibc/diet-qmail/qregex-20060423-qmail.patch b/source/dietlibc/diet-qmail/qregex-20060423-qmail.patch +new file mode 100644 +index 0000000..6d08258 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/qregex-20060423-qmail.patch +@@ -0,0 +1,688 @@ ++Fixed qregex-20060423 (pristine is against netqmail) ++ ++diff -r 1510847ae5bf Makefile ++--- a/Makefile Thu Nov 01 16:23:16 2007 +0100 +++++ b/Makefile Thu Nov 01 16:24:02 2007 +0100 ++@@ -1534,16 +1534,16 @@ auto_split.h ++ ./compile qmail-showctl.c ++ ++ qmail-smtpd: \ ++-load qmail-smtpd.o rcpthosts.o commands.o timeoutread.o \ +++load qmail-smtpd.o rcpthosts.o qregex.o commands.o timeoutread.o \ ++ timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o received.o \ ++ date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a getln.a \ ++-open.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a str.a \ +++open.a sig.a case.a env.a stralloc.a alloc.a strerr.a substdio.a error.a str.a \ ++ fs.a auto_qmail.o socket.lib ++- ./load qmail-smtpd rcpthosts.o commands.o timeoutread.o \ +++ ./load qmail-smtpd qregex.o rcpthosts.o commands.o timeoutread.o \ ++ timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o \ ++ received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \ ++ datetime.a getln.a open.a sig.a case.a env.a stralloc.a \ ++- alloc.a substdio.a error.a str.a fs.a auto_qmail.o `cat \ +++ alloc.a strerr.a substdio.a error.a str.a fs.a auto_qmail.o `cat \ ++ socket.lib` ++ ++ qmail-smtpd.0: \ ++@@ -1696,6 +1696,10 @@ compile rcpthosts.c cdb.h uint32.h byte. ++ compile rcpthosts.c cdb.h uint32.h byte.h open.h error.h control.h \ ++ constmap.h stralloc.h gen_alloc.h rcpthosts.h ++ ./compile rcpthosts.c +++ +++qregex.o: \ +++compile qregex.c qregex.h +++ ./compile qregex.c ++ ++ readsubdir.o: \ ++ compile readsubdir.c readsubdir.h direntry.h fmt.h scan.h str.h \ ++diff -r 1510847ae5bf README.qregex ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ b/README.qregex Thu Nov 01 16:24:02 2007 +0100 ++@@ -0,0 +1,203 @@ +++QREGEX (v2) 20060423 - README April 23, 2006 +++A Regular Expression matching patch for qmail 1.03 and netqmail +++ +++ +++OVERVIEW: +++ +++qregex adds the ability to match address evelopes via Regular Expressions (REs) +++in the qmail-smtpd process. It has the abiltiy to match `helo/ehlo` (host name), +++`mail from` (envelope sender), and `rcpt to` (envelope recipient) commands. +++It follows all the base rules that are set out with qmail (ie using control +++files) so it makes for easy integretion into an existing setup (see the +++install instructions for more info). The v2 is specified because qregex was +++re-written to better conform to the security guarantee set forth by the author +++of qmail. The original version used stdio.h and stdlib.h for reading the +++control files whereas v2 now uses all stralloc functions which are much more +++regulated against buffer overruns and the like. +++See: http://cr.yp.to/qmail/guarantee.html +++ +++ +++FEATURES: +++ +++Features of qregex include: +++ +++1. Performs pattern matching on envelope senders and envelope +++ recipients against REs in the badmailfrom and badmailto control +++ files. Two additional control files, badmailfromnorelay and +++ badmailtonorelay, are used for pattern matching when the +++ RELAYCLIENT environment variable is not set. +++ +++2. Performs pattern matching on the helo/ehlo host name. Setting the +++ NOBADHELO environment variable prevents the host name from being +++ compared to the patterns in the badhelo control file. +++ +++3. Matches to patterns are logged. Setting the LOGREGEX environment +++ variable causes the matched regex pattern to be included in the log. +++ +++4. Matching is case insensitive. +++ +++5. qregex ignores empty envelope senders. An empty envelope sender is not +++ compared to the patterns in the badmailfrom and badmailfromnorelay +++ control files and is always accepted. +++ +++ +++PLATFORMS: +++ +++qregex has been built and tested on the following platforms. I'm sure it won't +++have any problems on any platform that qmail will run on (providing they have +++a regex interface) but if you run into problems let me know. +++ +++ - OpenBSD 3.x +++ - FreeBSD 4.x, 5.x +++ - Mandrake Linux 9.x +++ - SuSE Linux 8.x +++ +++ +++ +++INSTALLATION INSTRUCTIONS: +++ +++Installation is very simple, there is only one requirement. You need to use the +++GNU version of the patch utility (http://www.gnu.org/software/patch/patch.html). +++(For Solaris 8 users it is installed as 'gpatch') +++ +++- If this is a new setup. +++Unpack the qmail archive, cd into the qmail-1.03 directory and run +++"patch < /path/to/qregex-.patch". Follow the instructions as per the +++included qmail INSTALL file. Once you are done come back to this file and read +++the section on the control files. +++ +++If you are using netqmail, then unpack the netqmail archive. Run the collate.sh +++script and cd into the resulting netqmail- directory. From there, run +++"patch < /path/to/qregex-.patch". Complete the netqmail installation +++normally. Once you are done, come back to this file and read the section on the +++control files. +++ +++- If this is an existing setup. +++FIRST: create your control files (see below). +++cd into your existing qmail or netqmail source directory. Run +++"patch < /path/to/qregex-.patch" then "make qmail-smtpd". Now run +++./qmail-smtpd and test your new rules to make sure they work as expected. +++ +++Install the new binary by cd'ing to /var/qmail/bin and as root (in one command) +++copy the existing binary to 'qmail-smtpd.old' and copy the new binary from the +++source directory to 'qmail-smtpd'. +++(ex. cp qmail-smtpd qmail-smtpd.old && cp ~/qmail-1.03/qmail-smtpd qmail-smtpd) +++ +++You can also optionally just run "make setup check" as it will install the +++updated documentation and man pages provided with this patch. Stopping qmail +++before doing the "make setup check" is always a good idea. +++ +++ +++LOGGING: +++ +++qregex will log matches to the patterns in the various control files. Log +++messages will take these three forms depending on which control file was +++matched: +++ +++badhelo +++qmail-smtpd: badhelo: at +++ +++badmailfrom and badmailfromnorelay +++qmail-smtpd: badmailfrom: at +++ +++badmailto and badmailtonorelay +++qmail-smtpd: badmailto: at +++ +++When the LOGREGEX environment variable is set, the matched pattern will +++be included in the log. Log messages will have the regex pattern appended +++to them. For example, a badhelo log message will look like this: +++ +++qmail-smtpd: badhelo: at matches pattern: +++ +++ +++CONTROL FILES: +++ +++qregex provides you with five control files. None of these control files +++is mandatory and you can use them in any combination you choose in your setup. +++ +++The "control/badmailfrom" and "control/badmailto" files contain your REs for +++matching against the 'mail from' (envelope sender) and 'rcpt to' (envelope +++recipient) smtp commands respectively. +++The "control/badmailfromnorelay" and "control/badmailtonorelay" match against +++the same commands but are read only when the RELAYCLIENT environment variable +++is not set. +++The "control/badhelo" file matches against the 'helo/ehlo' smtp command. +++ +++If you prefer you can symlink the badmailfrom and badmailto control files +++(ln -s badmailfrom badmailto) and maintain fewer sets of rules. Beware +++this might cause problems in certain setups. +++ +++ Here's an example "badhelo" file. +++ ----------------------------------- +++ # block host strings with no dot (not a FQDN) +++ !\. +++ ----------------------------------- +++ +++ An example "badmailfrom" file. +++ ----------------------------------- +++ # this will drop everything containing the string +++ # bad.domain.com or Bad.Domain.Com or BAD.domain.COM +++ bad\.domain\.com +++ # force users to fully qualify themselves +++ # (i.e. deny "user", accept "user@domain") +++ !@ +++ ----------------------------------- +++ +++ And "badmailto" (a little more interesting) +++ ----------------------------------- +++ # must not contain invalid characters, brakets or multiple @'s +++ [!%#:*^(){}] +++ @.*@ +++ ----------------------------------- +++ +++You can use the non-RE character '!' to start an RE as a signal to qregex to +++negate the action. As used above in the badmailfrom file, by negating the '@' +++symbol qregex will signal qmail-smtpd to deny the 'mail from' command whenever +++the address doesn't contain an @ symbol. When used inside a bracket expression, +++the '!' character looses this special meaning. This is shown in the badmailto +++example. +++ +++The norelay control files follow the same rules as the other control files but +++are intended to address two specific scenarios. +++The badmailfromnorelay file can be used to block mail trying to spoof a domain +++hosted on your mail server. It prevents a mail client that is not allowed to +++relay email through your server from using one of your hosted domains as its +++envelope sender. +++The badmailtonorelay file can be used to create email addresses that cannot +++receive mail from any source not allowed to relay email through your server. +++This is handy for creating email addresses for use only within your own +++domain(s) that can't receive spam from the world at large. +++ +++ +++INTERNALS: +++ +++qregex (or regexmatch as the function is called) will be called during the +++`helo/ehlo`, `rcpt to` and `mail from` handling routines in "qmail-smtpd.c". +++When called, it will read the proper control file then one by one compile and +++execute the regex on the string passed into qmail-smtpd. If the regex matches +++it returns TRUE (1) and the qmail-smtpd process will deny the user the ability +++to continue. If you change anything and think it betters this patch please +++send me a new diff file so I can take a peek. +++ +++ +++CONTACT: +++qregex is maintained by: +++ Andrew St. Jean +++ andrew@arda.homeunix.net +++ www.arda.homeunix.net/store/qmail/ +++ +++Contributers to qregex: +++ Jeremy Kitchen +++ kitchen at scriptkitchen dot com +++ http://www.scriptkitchen.com/qmail +++ +++ Alex Pleiner +++ alex@zeitform.de +++ zeitform Internet Dienste +++ http://www.zeitform.de/ +++ +++ Thanos Massias +++ +++Original qregex patch written by: +++ Evan Borgstrom +++ evan at unixpimps dot org ++diff -r 1510847ae5bf TARGETS ++--- a/TARGETS Thu Nov 01 16:23:16 2007 +0100 +++++ b/TARGETS Thu Nov 01 16:24:02 2007 +0100 ++@@ -252,6 +252,7 @@ qmail-qmtpd ++ qmail-qmtpd ++ qmail-smtpd.o ++ qmail-smtpd +++qregex.o ++ sendmail.o ++ sendmail ++ tcp-env.o ++diff -r 1510847ae5bf hier.c ++--- a/hier.c Thu Nov 01 16:23:16 2007 +0100 +++++ b/hier.c Thu Nov 01 16:24:02 2007 +0100 ++@@ -76,6 +76,7 @@ void hier() ++ c(auto_qmail,"boot","binm3+df",auto_uido,auto_gidq,0755); ++ ++ c(auto_qmail,"doc","FAQ",auto_uido,auto_gidq,0644); +++ c(auto_qmail,"doc","README.qregex",auto_uido,auto_gidq,0644); ++ c(auto_qmail,"doc","UPGRADE",auto_uido,auto_gidq,0644); ++ c(auto_qmail,"doc","SENDMAIL",auto_uido,auto_gidq,0644); ++ c(auto_qmail,"doc","INSTALL",auto_uido,auto_gidq,0644); ++diff -r 1510847ae5bf install-big.c ++--- a/install-big.c Thu Nov 01 16:23:16 2007 +0100 +++++ b/install-big.c Thu Nov 01 16:24:02 2007 +0100 ++@@ -76,6 +76,7 @@ void hier() ++ c(auto_qmail,"boot","binm3+df",auto_uido,auto_gidq,0755); ++ ++ c(auto_qmail,"doc","FAQ",auto_uido,auto_gidq,0644); +++ c(auto_qmail,"doc","README.qregex",auto_uido,auto_gidq,0644); ++ c(auto_qmail,"doc","UPGRADE",auto_uido,auto_gidq,0644); ++ c(auto_qmail,"doc","SENDMAIL",auto_uido,auto_gidq,0644); ++ c(auto_qmail,"doc","INSTALL",auto_uido,auto_gidq,0644); ++diff -r 1510847ae5bf qmail-control.9 ++--- a/qmail-control.9 Thu Nov 01 16:23:16 2007 +0100 +++++ b/qmail-control.9 Thu Nov 01 16:24:02 2007 +0100 ++@@ -20,7 +20,11 @@ other hostname-related control files. ++ ++ Comments are allowed ++ in +++.IR badhelo , ++ .IR badmailfrom , +++.IR badmailfromnorelay , +++.IR badmailto , +++.IR badmailtonorelay , ++ .IR locals , ++ .IR percenthack , ++ .IR qmqpservers , ++@@ -40,7 +44,11 @@ See the corresponding man pages for furt ++ .ta 5c 10c ++ control default used by ++ +++.I badhelo \fR(none) \fRqmail-smtpd ++ .I badmailfrom \fR(none) \fRqmail-smtpd +++.I badmailfromnorelay \fR(none) \fRqmail-smtpd +++.I badmailto \fR(none) \fRqmail-smtpd +++.I badmailtonorelay \fR(none) \fRqmail-smtpd ++ .I bouncefrom \fRMAILER-DAEMON \fRqmail-send ++ .I bouncehost \fIme \fRqmail-send ++ .I concurrencylocal \fR10 \fRqmail-send ++diff -r 1510847ae5bf qmail-showctl.c ++--- a/qmail-showctl.c Thu Nov 01 16:23:16 2007 +0100 +++++ b/qmail-showctl.c Thu Nov 01 16:24:02 2007 +0100 ++@@ -214,7 +214,11 @@ void main() ++ _exit(111); ++ } ++ ++- do_lst("badmailfrom","Any MAIL FROM is allowed.",""," not accepted in MAIL FROM."); +++ do_lst("badhelo","Any HELO host name is allowed.",""," HELO host name denied if it matches this pattern."); +++ do_lst("badmailfrom","Any MAIL FROM is allowed.",""," MAIL FROM denied if it matches this pattern."); +++ do_lst("badmailfromnorelay","Any MAIL FROM is allowed.",""," MAIL FROM denied if it matches this pattern and RELAYCLIENT is not set."); +++ do_lst("badmailto","No RCPT TO are specifically denied.",""," RCPT TO denied if it matches this pattern."); +++ do_lst("badmailtonorelay","No RCPT TO are specifically denied.",""," RCPT TO denied if it matches this pattern and RELAYCLIENT is not set."); ++ do_str("bouncefrom",0,"MAILER-DAEMON","Bounce user name is "); ++ do_str("bouncehost",1,"bouncehost","Bounce host name is "); ++ do_int("concurrencylocal","10","Local concurrency is ",""); ++@@ -267,7 +271,11 @@ void main() ++ if (str_equal(d->d_name,"..")) continue; ++ if (str_equal(d->d_name,"bouncefrom")) continue; ++ if (str_equal(d->d_name,"bouncehost")) continue; +++ if (str_equal(d->d_name,"badhelo")) continue; ++ if (str_equal(d->d_name,"badmailfrom")) continue; +++ if (str_equal(d->d_name,"badmailfromnorelay")) continue; +++ if (str_equal(d->d_name,"badmailto")) continue; +++ if (str_equal(d->d_name,"badmailtonorelay")) continue; ++ if (str_equal(d->d_name,"bouncefrom")) continue; ++ if (str_equal(d->d_name,"bouncehost")) continue; ++ if (str_equal(d->d_name,"concurrencylocal")) continue; ++diff -r 1510847ae5bf qmail-smtpd.8 ++--- a/qmail-smtpd.8 Thu Nov 01 16:23:16 2007 +0100 +++++ b/qmail-smtpd.8 Thu Nov 01 16:24:02 2007 +0100 ++@@ -37,11 +37,26 @@ even though such messages violate the SM ++ even though such messages violate the SMTP protocol. ++ .SH "CONTROL FILES" ++ .TP 5 +++.I badhelo +++Unacceptable HELO/EHLO host names. +++.B qmail-smtpd +++will reject every recipient address for a message if +++the host name is listed in, +++or matches a POSIX regular expression pattern listed in, +++.IR badhelo . +++If the +++.B NOBADHELO +++environment variable is set, then the contents of +++.IR badhelo +++will be ignored. +++For more information, please have a look at doc/README.qregex. +++.TP 5 ++ .I badmailfrom ++ Unacceptable envelope sender addresses. ++ .B qmail-smtpd ++ will reject every recipient address for a message ++-if the envelope sender address is listed in +++if the envelope sender address is listed in, or matches a POSIX regular expression +++pattern listed in, ++ .IR badmailfrom . ++ A line in ++ .I badmailfrom ++@@ -49,6 +64,32 @@ may be of the form ++ .BR @\fIhost , ++ meaning every address at ++ .IR host . +++For more information, please have a look at doc/README.qregex. +++.TP 5 +++.I badmailfromnorelay +++Functions the same as the +++.IR badmailfrom +++control file but is read only if the +++.B RELAYCLIENT +++environment variable is not set. +++For more information, please have a look at doc/README.qregex. +++.TP 5 +++.I badmailto +++Unacceptable envelope recipient addresses. +++.B qmail-smtpd +++will reject every recipient address for a message if the recipient address +++is listed in, +++or matches a POSIX regular expression pattern listed in, +++.IR badmailto . +++For more information, please have a look at doc/README.qregex. +++.TP 5 +++.I badmailtonorelay +++Functions the same as the +++.IR badmailto +++control file but is read only if the +++.B RELAYCLIENT +++environment variable is not set. +++For more information, please have a look at doc/README.qregex. ++ .TP 5 ++ .I databytes ++ Maximum number of bytes allowed in a message, ++diff -r 1510847ae5bf qmail-smtpd.c ++--- a/qmail-smtpd.c Thu Nov 01 16:23:16 2007 +0100 +++++ b/qmail-smtpd.c Thu Nov 01 16:24:02 2007 +0100 ++@@ -23,6 +23,15 @@ ++ #include "timeoutread.h" ++ #include "timeoutwrite.h" ++ #include "commands.h" +++#include "qregex.h" +++#include "strerr.h" +++ +++#define BMCHECK_BMF 0 +++#define BMCHECK_BMFNR 1 +++#define BMCHECK_BMT 2 +++#define BMCHECK_BMTNR 3 +++#define BMCHECK_BHELO 4 +++ ++ ++ #define MAXHOPS 100 ++ unsigned int databytes = 0; ++@@ -49,7 +58,9 @@ void die_ipme() { out("421 unable to fig ++ void die_ipme() { out("421 unable to figure out my IP addresses (#4.3.0)\r\n"); flush(); _exit(1); } ++ void straynewline() { out("451 See http://pobox.com/~djb/docs/smtplf.html.\r\n"); flush(); _exit(1); } ++ ++-void err_bmf() { out("553 sorry, your envelope sender is in my badmailfrom list (#5.7.1)\r\n"); } +++void err_bmf() { out("553 sorry, your envelope sender has been denied (#5.7.1)\r\n"); } +++void err_bmt() { out("553 sorry, your envelope recipient has been denied (#5.7.1)\r\n"); } +++void err_bhelo() { out("553 sorry, your HELO host name has been denied (#5.7.1)\r\n"); } ++ void err_nogateway() { out("553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)\r\n"); } ++ void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); } ++ void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); } ++@@ -93,9 +104,24 @@ void dohelo(arg) char *arg; { ++ ++ int liphostok = 0; ++ stralloc liphost = {0}; +++ ++ int bmfok = 0; ++ stralloc bmf = {0}; ++-struct constmap mapbmf; +++ +++int bmfnrok = 0; +++stralloc bmfnr = {0}; +++ +++int bmtok = 0; +++stralloc bmt = {0}; +++ +++int bmtnrok = 0; +++stralloc bmtnr = {0}; +++ +++int bhelook = 0; +++stralloc bhelo = {0}; +++ +++int logregex = 0; +++stralloc matchedregex = {0}; ++ ++ void setup() ++ { ++@@ -114,8 +140,21 @@ void setup() ++ ++ bmfok = control_readfile(&bmf,"control/badmailfrom",0); ++ if (bmfok == -1) die_control(); ++- if (bmfok) ++- if (!constmap_init(&mapbmf,bmf.s,bmf.len,0)) die_nomem(); +++ +++ bmfnrok = control_readfile(&bmfnr,"control/badmailfromnorelay",0); +++ if (bmfnrok == -1) die_control(); +++ +++ bmtok = control_readfile(&bmt,"control/badmailto",0); +++ if (bmtok == -1) die_control(); +++ +++ bmtnrok = control_readfile(&bmtnr,"control/badmailtonorelay",0); +++ if (bmtnrok == -1) die_control(); +++ +++ bhelook = control_readfile(&bhelo, "control/badhelo",0); +++ if (bhelook == -1) die_control(); +++ if (env_get("NOBADHELO")) bhelook = 0; +++ +++ if (env_get("LOGREGEX")) logregex = 1; ++ ++ if (control_readint(&databytes,"control/databytes") == -1) die_control(); ++ x = env_get("DATABYTES"); ++@@ -197,14 +236,56 @@ char *arg; ++ return 1; ++ } ++ ++-int bmfcheck() ++-{ ++- int j; ++- if (!bmfok) return 0; ++- if (constmap(&mapbmf,addr.s,addr.len - 1)) return 1; ++- j = byte_rchr(addr.s,addr.len,'@'); ++- if (j < addr.len) ++- if (constmap(&mapbmf,addr.s + j,addr.len - j - 1)) return 1; +++int bmcheck(which) int which; +++{ +++ int i = 0; +++ int j = 0; +++ int x = 0; +++ int negate = 0; +++ static stralloc bmb = {0}; +++ static stralloc curregex = {0}; +++ +++ if (which == BMCHECK_BMF) { +++ if (!stralloc_copy(&bmb,&bmf)) die_nomem(); +++ } else if (which == BMCHECK_BMFNR) { +++ if (!stralloc_copy(&bmb,&bmfnr)) die_nomem(); +++ } else if (which == BMCHECK_BMT) { +++ if (!stralloc_copy(&bmb,&bmt)) die_nomem(); +++ } else if (which == BMCHECK_BMTNR) { +++ if (!stralloc_copy(&bmb,&bmtnr)) die_nomem(); +++ } else if (which == BMCHECK_BHELO) { +++ if (!stralloc_copy(&bmb,&bhelo)) die_nomem(); +++ } else { +++ die_control(); +++ } +++ +++ while (j < bmb.len) { +++ i = j; +++ while ((bmb.s[i] != '\0') && (i < bmb.len)) i++; +++ if (bmb.s[j] == '!') { +++ negate = 1; +++ j++; +++ } +++ if (!stralloc_copyb(&curregex,bmb.s + j,(i - j))) die_nomem(); +++ if (!stralloc_0(&curregex)) die_nomem(); +++ if (which == BMCHECK_BHELO) { +++ x = matchregex(helohost.s, curregex.s); +++ } else { +++ x = matchregex(addr.s, curregex.s); +++ } +++ if ((negate) && (x == 0)) { +++ if (!stralloc_copyb(&matchedregex,bmb.s + j - 1,(i - j + 1))) die_nomem(); +++ if (!stralloc_0(&matchedregex)) die_nomem(); +++ return 1; +++ } +++ if (!(negate) && (x > 0)) { +++ if (!stralloc_copyb(&matchedregex,bmb.s + j,(i - j))) die_nomem(); +++ if (!stralloc_0(&matchedregex)) die_nomem(); +++ return 1; +++ } +++ j = i + 1; +++ negate = 0; +++ } ++ return 0; ++ } ++ ++@@ -218,7 +299,9 @@ int addrallowed() ++ ++ ++ int seenmail = 0; ++-int flagbarf; /* defined if seenmail */ +++int flagbarfbmf; /* defined if seenmail */ +++int flagbarfbmt; +++int flagbarfbhelo; ++ stralloc mailfrom = {0}; ++ stralloc rcptto = {0}; ++ ++@@ -226,11 +309,13 @@ void smtp_helo(arg) char *arg; ++ { ++ smtp_greet("250 "); out("\r\n"); ++ seenmail = 0; dohelo(arg); +++ if (bhelook) flagbarfbhelo = bmcheck(BMCHECK_BHELO); ++ } ++ void smtp_ehlo(arg) char *arg; ++ { ++ smtp_greet("250-"); out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n"); ++ seenmail = 0; dohelo(arg); +++ if (bhelook) flagbarfbhelo = bmcheck(BMCHECK_BHELO); ++ } ++ void smtp_rset() ++ { ++@@ -240,7 +325,11 @@ void smtp_mail(arg) char *arg; ++ void smtp_mail(arg) char *arg; ++ { ++ if (!addrparse(arg)) { err_syntax(); return; } ++- flagbarf = bmfcheck(); +++ flagbarfbmf = 0; /* bmcheck is skipped for empty envelope senders */ +++ if ((bmfok) && (addr.len != 1)) flagbarfbmf = bmcheck(BMCHECK_BMF); +++ if ((!flagbarfbmf) && (bmfnrok) && (addr.len != 1) && (!relayclient)) { +++ flagbarfbmf = bmcheck(BMCHECK_BMFNR); +++ } ++ seenmail = 1; ++ if (!stralloc_copys(&rcptto,"")) die_nomem(); ++ if (!stralloc_copys(&mailfrom,addr.s)) die_nomem(); ++@@ -250,7 +339,37 @@ void smtp_rcpt(arg) char *arg; { ++ void smtp_rcpt(arg) char *arg; { ++ if (!seenmail) { err_wantmail(); return; } ++ if (!addrparse(arg)) { err_syntax(); return; } ++- if (flagbarf) { err_bmf(); return; } +++ if (flagbarfbhelo) { +++ if (logregex) { +++ strerr_warn6("qmail-smtpd: badhelo: <",helohost.s,"> at ",remoteip," matches pattern: ",matchedregex.s,0); +++ } else { +++ strerr_warn4("qmail-smtpd: badhelo: <",helohost.s,"> at ",remoteip,0); +++ } +++ err_bhelo(); +++ return; +++ } +++ if (flagbarfbmf) { +++ if (logregex) { +++ strerr_warn6("qmail-smtpd: badmailfrom: <",mailfrom.s,"> at ",remoteip," matches pattern: ",matchedregex.s,0); +++ } else { +++ strerr_warn4("qmail-smtpd: badmailfrom: <",mailfrom.s,"> at ",remoteip,0); +++ } +++ err_bmf(); +++ return; +++ } +++ if (bmtok) flagbarfbmt = bmcheck(BMCHECK_BMT); +++ if ((!flagbarfbmt) && (bmtnrok) && (!relayclient)) { +++ flagbarfbmt = bmcheck(BMCHECK_BMTNR); +++ } +++ if (flagbarfbmt) { +++ if (logregex) { +++ strerr_warn6("qmail-smtpd: badmailto: <",addr.s,"> at ",remoteip," matches pattern: ",matchedregex.s,0); +++ } else { +++ strerr_warn4("qmail-smtpd: badmailto: <",addr.s,"> at ",remoteip,0); +++ } +++ err_bmt(); +++ return; +++ } ++ if (relayclient) { ++ --addr.len; ++ if (!stralloc_cats(&addr,relayclient)) die_nomem(); ++diff -r 1510847ae5bf qregex.c ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ b/qregex.c Thu Nov 01 16:24:02 2007 +0100 ++@@ -0,0 +1,57 @@ +++/* +++ * qregex (v2) +++ * $Id: qregex.c,v 2.1 2001/12/28 07:05:21 evan Exp $ +++ * +++ * Author : Evan Borgstrom (evan at unixpimps dot org) +++ * Created : 2001/12/14 23:08:16 +++ * Modified: $Date: 2001/12/28 07:05:21 $ +++ * Revision: $Revision: 2.1 $ +++ * +++ * Do POSIX regex matching on addresses for anti-relay / spam control. +++ * It logs to the maillog +++ * See the qregex-readme file included with this tarball. +++ * If you didn't get this file in a tarball please see the following URL: +++ * http://www.unixpimps.org/software/qregex +++ * +++ * qregex.c is released under a BSD style copyright. +++ * See http://www.unixpimps.org/software/qregex/copyright.html +++ * +++ * Note: this revision follows the coding guidelines set forth by the rest of +++ * the qmail code and that described at the following URL. +++ * http://cr.yp.to/qmail/guarantee.html +++ * +++ */ +++ +++#include +++#include +++#include "qregex.h" +++ +++#define REGCOMP(X,Y) regcomp(&X, Y, REG_EXTENDED|REG_ICASE) +++#define REGEXEC(X,Y) regexec(&X, Y, (size_t)0, (regmatch_t *)0, (int)0) +++ +++int matchregex(char *text, char *regex) { +++ regex_t qreg; +++ int retval = 0; +++ +++ +++ /* build the regex */ +++ if ((retval = REGCOMP(qreg, regex)) != 0) { +++ regfree(&qreg); +++ return(-retval); +++ } +++ +++ /* execute the regex */ +++ if ((retval = REGEXEC(qreg, text)) != 0) { +++ /* did we just not match anything? */ +++ if (retval == REG_NOMATCH) { +++ regfree(&qreg); +++ return(0); +++ } +++ regfree(&qreg); +++ return(-retval); +++ } +++ +++ /* signal the match */ +++ regfree(&qreg); +++ return(1); +++} ++diff -r 1510847ae5bf qregex.h ++--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++++ b/qregex.h Thu Nov 01 16:24:02 2007 +0100 ++@@ -0,0 +1,5 @@ +++/* simple header file for the matchregex prototype */ +++#ifndef _QREGEX_H_ +++#define _QREGEX_H_ +++int matchregex(char *text, char *regex); +++#endif +diff --git a/source/dietlibc/diet-qmail/queue-fix-dietlibc.patch b/source/dietlibc/diet-qmail/queue-fix-dietlibc.patch +new file mode 100644 +index 0000000..6d967ed +--- /dev/null ++++ b/source/dietlibc/diet-qmail/queue-fix-dietlibc.patch +@@ -0,0 +1,18 @@ ++Compile with dietlibc ++ ++diff -r 6becbe0d87fa conf-cc ++--- a/conf-cc Thu Nov 01 15:04:39 2007 +0100 +++++ b/conf-cc Thu Nov 01 15:06:54 2007 +0100 ++@@ -1,3 +1,3 @@ gcc -O2 ++-gcc -O2 +++diet gcc -O2 ++ ++ This will be used to compile .c files. ++diff -r 6becbe0d87fa conf-ld ++--- a/conf-ld Thu Nov 01 15:04:39 2007 +0100 +++++ b/conf-ld Thu Nov 01 15:06:54 2007 +0100 ++@@ -1,3 +1,3 @@ gcc -s ++-gcc -s +++diet gcc -s -static ++ ++ This will be used to link .o files into an executable. +diff --git a/source/dietlibc/diet-qmail/queue-fix-errno.patch b/source/dietlibc/diet-qmail/queue-fix-errno.patch +new file mode 100644 +index 0000000..72f9fcd +--- /dev/null ++++ b/source/dietlibc/diet-qmail/queue-fix-errno.patch +@@ -0,0 +1,14 @@ ++errno fix ++ ++diff -r c045670f36e9 error.h ++--- a/error.h Thu Nov 01 14:46:11 2007 +0100 +++++ b/error.h Thu Nov 01 15:02:39 2007 +0100 ++@@ -1,7 +1,7 @@ ++ #ifndef ERROR_H ++ #define ERROR_H ++ ++-extern int errno; +++#include ++ ++ extern int error_intr; ++ extern int error_nomem; +diff --git a/source/dietlibc/diet-qmail/rc b/source/dietlibc/diet-qmail/rc +new file mode 100644 +index 0000000..0f82f9e +--- /dev/null ++++ b/source/dietlibc/diet-qmail/rc +@@ -0,0 +1,7 @@ ++#!/bin/sh ++# ++# Using stdout for logging ++# Using control/defaultdelivery from qmail-local to deliver messages by default ++# ++exec env - PATH="/var/qmail/bin:$PATH" \ ++ qmail-start "`cat /var/qmail/control/defaultdelivery`" +diff --git a/source/dietlibc/diet-qmail/send_log_run b/source/dietlibc/diet-qmail/send_log_run +new file mode 100644 +index 0000000..0c4fd21 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/send_log_run +@@ -0,0 +1,20 @@ ++#!/bin/sh ++# ++# Edit this file to match your setup. ++# NOTE: This file is automatically backed-up by pacman, ++# during updates ++# ++ ++# Log size rotate size. ++LOG_SIZE="1048576" ++ ++# Number of logs to keep. ++LOGS="5" ++ ++# Don't change from this point on, unless ++# you really know what you're doing :). ++ ++exec /usr/bin/setuidgid qmaill \ ++ /usr/bin/multilog t \ ++ n${LOGS} s${LOG_SIZE} \ ++ /var/log/qmail/send 2>&1 +diff --git a/source/dietlibc/diet-qmail/send_run b/source/dietlibc/diet-qmail/send_run +new file mode 100644 +index 0000000..1724b2c +--- /dev/null ++++ b/source/dietlibc/diet-qmail/send_run +@@ -0,0 +1,8 @@ ++#!/bin/sh ++# ++# Edit this file to match your setup. ++# NOTE: This file is automatically backed-up by pacman, ++# during updates ++# ++ ++exec /var/qmail/rc +diff --git a/source/dietlibc/diet-qmail/smtpd_log_run b/source/dietlibc/diet-qmail/smtpd_log_run +new file mode 100644 +index 0000000..68027b6 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/smtpd_log_run +@@ -0,0 +1,20 @@ ++#!/bin/sh ++# ++# Edit this file to match your setup. ++# NOTE: This file is automatically backed-up by pacman, ++# during updates ++# ++ ++# Log size rotate size. ++LOG_SIZE="1048576" ++ ++# Number of logs to keep. ++LOGS="5" ++ ++# Don't change from this point on, unless ++# you really know what you're doing :). ++ ++exec /usr/bin/setuidgid qmaill \ ++ /usr/bin/multilog t \ ++ n${LOGS} s${LOG_SIZE} \ ++ /var/log/qmail/smtpd 2>&1 +diff --git a/source/dietlibc/diet-qmail/smtpd_run b/source/dietlibc/diet-qmail/smtpd_run +new file mode 100644 +index 0000000..ffd4451 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/smtpd_run +@@ -0,0 +1,45 @@ ++#!/bin/sh ++# ++# Edit this file to match your setup. ++# NOTE: This file is automatically backed-up by pacman, ++# during updates ++# ++ ++# uid & gid to run qmail-smtpd as. ++# optionally `id -u vpopmail' for vpopmail. ++QMAILDUID=`id -u qmaild` ++ ++# optionally `id -g vpopmail` for vpopmail. ++NOFILESGID=`id -g qmaild` ++ ++# Password checking program (ie. checkpasswd, vpopmail). ++PASSPROG="" ++ ++# FQDN as set in /var/qmail/control/me ++LOCAL=`head -1 /var/qmail/control/me` ++ ++# Maximum memory qmail-smtpd is allowed to use. ++MAX_MEM="2000000" ++ ++# Maximum allowed concurrent connections. ++MAX_CON=`cat /var/qmail/control/concurrencyincoming` ++ ++# Relay control. ++TCP_CDB="/etc/tcp.smtp.cdb" ++ ++# Relay denied message for open relays. ++RELAY_DENIED="relays.ordb.org: Your message was rejected because the mail server you use is configured to allow OPEN RELAY - More detailed information regarding this problem is available from http://www.ordb.org/lookup/?%IP% - Please forward this error through to your email server support staff for easy resolution." ++ ++# Don't change from this point on, unless ++# you really know what you're doing :). ++SMTPD="/var/qmail/bin/qmail-smtpd" ++PORT="25" ++ ++exec /usr/bin/softlimit -m $MAX_MEM \ ++ /usr/bin/tcpserver -H -l $LOCAL \ ++ -v -x $TCP_CDB \ ++ -c $MAX_CON -R 0 $PORT \ ++ -u $QMAILUID -g $NOFILESGID \ ++ /usr/bin/rblsmtpd -b -C \ ++ -r $RELAY_DENIED -t 5 \ ++ $SMTPD $PASSPROG /bin/true 2>&1 +diff --git a/source/dietlibc/diet-qmail/tcp.pop3 b/source/dietlibc/diet-qmail/tcp.pop3 +new file mode 100644 +index 0000000..4437128 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/tcp.pop3 +@@ -0,0 +1,6 @@ ++# to update the database after changing this file, run: ++# /etc/rc.d/qmail cdb ++# Allow any client to connect to us via POP3 ++# If people are abusing POP3 such as denial-of-service on POP3, ++# you can add their ips here to block them out ++:allow +diff --git a/source/dietlibc/diet-qmail/tcp.smtp b/source/dietlibc/diet-qmail/tcp.smtp +new file mode 100644 +index 0000000..a5faa17 +--- /dev/null ++++ b/source/dietlibc/diet-qmail/tcp.smtp +@@ -0,0 +1,81 @@ ++#------------------------------------------------------ ++# DESCRIPTION OF THE RULES TO REMIND ME OF HOW THIS FILE WORKS ++# ++# If you set 'allow', this means that our mail server will allow ++# the specified IP range to make a TCP connection to our server ++# ++# If you set 'deny', this means that our mail server will not allow ++# the specified IP range to make a TCP connection to our server ++# ++# If you set RELAYCLIENT="", this means that the listed IP range is ++# allowed to relay mail through our server ++# ++# If you dont set RELAYCLIENT="", this means that the listed IP range ++# will not be able to relay mail through our server ++# ++# If you set RBLSMTPD="", this means that the listed IP ranges will ++# not be checked against any of the RBL databases ++# ++# If you set RBLSMTPD="some text here", this means that an RBL lookup ++# wont be performed, but the mail will be rejected with the specified ++# text as a 4xx temp error message ++# ++# If you set RBLSMTPD="-some text here", this means that an RBL lookup ++# wont be performed, but the mail will be rejected with the specified ++# text as a 5xx perm error message ++# ++# If you do not set RBLSMTPD="" or ="some text", then an RBL lookup ++# will be performed. If the lookup is successful, then RBLSMTPD will ++# return your custom error message (as specified in the -r parameter ++# in smtpd supervise script) ++# ++#----------------------------------------------------- ++# HERE ARE THE RULES! : ++#----------------------------------------------------- ++# BYPASS OPEN RELAY CHECKING FOR THESE IPS : ++# ++# These IPs are ones that we have setup so that they arent RBL checked. ++# We have done this because these particular servers are RBL listed, ++# and for whatever reason they can't/won't fix their open relay problem, ++# and we still want to be able to receive mail from them. ++# ++# reminder text goes here for this entry so we know the story... ++111.111.111.111:allow,RBLSMTPD="" ++## reminder text goes here for this entry so we know the story... ++222.222.222.222:allow,RBLSMTPD="" ++# ++#----------------------------------------------------------------- ++# DONT ALLOW THESE IPS TO SEND MAIL TO US : ++# ++# mailXX.offermail.net connecting regularly and sending invalid ++# format messages causing exit with status 256 (bare linefeed normally) ++# entry added 15/12/2001 ++# after looking at the mail coming from these servers it was found to be spam ++216.242.75.100-116:allow,RBLSMTPD="-Connections from this IP have been banned." ++# ++# heaps of spam from replyto of *@freeamateurhotties.com dec2001 ++64.228.127.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" ++154.20.94.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" ++209.151.132.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" ++216.18.85.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" ++# ++#----------------------------------------------------------------- ++# ALLOW THESE IPS TO RELAY MAIL THROUGH OUR SERVER ++# ++# Local class-c's from our LAN are allowed to relay, ++# and we wont bother doing any RBL checking. ++#123.123.123.:allow,RELAYCLIENT="",RBLSMTPD="" ++#123.111.111.:allow,RELAYCLIENT="",RBLSMTPD="" ++# ++# Connections from localhost are allowed to relay ++# (because the WebMail server runs on localhost), ++# and obviously there is no point trying to perform an RBL check. ++127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD="" ++# ++#----------------------------------------------------------------- ++# ALLOW EVERYONE ELSE TO SEND US MAIL ++# ++# Everyone else can make connections to our server, ++# but not allowed to relay ++# RBL lookups are performed ++:allow +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-qmailanalog.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-qmailanalog.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,950 @@ +From bfad3b50c43499cfce28b403ba1a8d8e0bdee08c Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 6 Nov 2007 11:43:46 +0100 +Subject: [PATCH] diet-qmailanalog-0.70-1-i686 + * added + +--- + source/dietlibc/diet-qmailanalog/FrugalBuild | 37 + + .../diet-qmailanalog/qmailanalog-multilog.patch | 885 ++++++++++++++++++++ + 2 files changed, 922 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-qmailanalog/FrugalBuild + create mode 100644 source/dietlibc/diet-qmailanalog/qmailanalog-multilog.patch + +diff --git a/source/dietlibc/diet-qmailanalog/FrugalBuild b/source/dietlibc/diet-qmailanalog/FrugalBuild +new file mode 100644 +index 0000000..27908f9 +--- /dev/null ++++ b/source/dietlibc/diet-qmailanalog/FrugalBuild +@@ -0,0 +1,37 @@ ++# Maintainer: Tomas Zeman ++# Accepts tai64 format dates (lines starting with @....) + mlmatchup ++# see http://www.magma.com.ni/moin/TipsAnd/QmailAnalog ++ ++branch=diet ++pkgorig=qmailanalog ++pkgname=$branch-$pkgorig ++pkgver=0.70 ++pkgrel=1 ++pkgdesc="" ++makedepends=(dietlibc) ++url="http://cr.yp.to/qmailanalog.html" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=(http://cr.yp.to/software/$pkgorig-$pkgver.tar.gz \ ++ qmailanalog-multilog.patch) ++sha1sums=('d9f47b6c5348759aeba3873b6b7653b823b2f92c' \ ++ '05b9b7995e3bef33d8c9c2af239d9d23d95f813f') ++provides=(qmailanalog) ++ ++build() { ++ qmail_dir=/var/qmail ++ Fcd $pkgorig-$pkgver ++ echo "$qmail_dir" > conf-home ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ Fmkdir $qmail_dir ++ patch -p1 < $Fsrcdir/qmailanalog-multilog.patch || Fdie ++ sed -i -e "s{(auto_home,{(\"$Fdestdir$qmail_dir\",{" hier.c ++ make || Fdie ++ make setup || Fdie ++ Frm $qmail_dir/man/cat* ++ Fmkdir /usr/share/doc/$pkgname-$pkgver ++ Fmv $qmail_dir/doc/* /usr/share/doc/$pkgname-$pkgver ++ Frm $qmail_dir/doc ++} ++# vim: ft=sh +diff --git a/source/dietlibc/diet-qmailanalog/qmailanalog-multilog.patch b/source/dietlibc/diet-qmailanalog/qmailanalog-multilog.patch +new file mode 100644 +index 0000000..0b4505a +--- /dev/null ++++ b/source/dietlibc/diet-qmailanalog/qmailanalog-multilog.patch +@@ -0,0 +1,885 @@ ++diff -x .svn -Naur qmailanalog-0.70/error.h qmailanalog/error.h ++--- qmailanalog-0.70/error.h 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/error.h 2007-04-30 20:57:24.000000000 +0200 ++@@ -1,7 +1,8 @@ ++ #ifndef ERROR_H ++ #define ERROR_H ++ ++-extern int errno; +++/* extern int errno; */ +++#include ++ ++ extern int error_intr; ++ extern int error_nomem; ++diff -x .svn -Naur qmailanalog-0.70/FILES qmailanalog/FILES ++--- qmailanalog-0.70/FILES 1998-08-30 23:39:26.000000000 +0200 +++++ qmailanalog/FILES 2007-04-30 20:57:24.000000000 +0200 ++@@ -132,3 +132,6 @@ ++ case.3 ++ case.h ++ case_lowers.c +++mlmatchup.8 +++mlmatchup.c +++mlmatchup ++diff -x .svn -Naur qmailanalog-0.70/hier.c qmailanalog/hier.c ++--- qmailanalog-0.70/hier.c 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/hier.c 2007-06-13 11:09:42.000000000 +0200 ++@@ -9,12 +9,16 @@ ++ d(auto_home,"man",-1,-1,02755); ++ d(auto_home,"man/man1",-1,-1,02755); ++ d(auto_home,"man/cat1",-1,-1,02755); +++ d(auto_home,"man/man8",-1,-1,02755); +++ d(auto_home,"man/cat8",-1,-1,02755); ++ ++ c(auto_home,"doc","MATCHUP",-1,-1,0644); ++ c(auto_home,"doc","ACCOUNTING",-1,-1,0644); ++ ++ c(auto_home,"man/man1","matchup.1",-1,-1,0644); ++ c(auto_home,"man/cat1","matchup.0",-1,-1,0644); +++ c(auto_home,"man/man8","mlmatchup.8",-1,-1,0644); +++ c(auto_home,"man/cat8","mlmatchup.0",-1,-1,0644); ++ c(auto_home,"man/man1","xqp.1",-1,-1,0644); ++ c(auto_home,"man/cat1","xqp.0",-1,-1,0644); ++ c(auto_home,"man/man1","xsender.1",-1,-1,0644); ++@@ -25,6 +29,7 @@ ++ c(auto_home,"man/cat1","columnt.0",-1,-1,0644); ++ ++ c(auto_home,"bin","matchup",-1,-1,0755); +++ c(auto_home,"bin","mlmatchup",-1,-1,0755); ++ c(auto_home,"bin","columnt",-1,-1,0755); ++ c(auto_home,"bin","zoverall",-1,-1,0755); ++ c(auto_home,"bin","zsendmail",-1,-1,0755); ++diff -x .svn -Naur qmailanalog-0.70/Makefile qmailanalog/Makefile ++--- qmailanalog-0.70/Makefile 1998-08-30 23:39:26.000000000 +0200 +++++ qmailanalog/Makefile 2007-05-03 00:15:12.000000000 +0200 ++@@ -243,7 +243,7 @@ ++ chmod 755 makelib ++ ++ man: \ ++-matchup.0 columnt.0 xqp.0 xsender.0 xrecipient.0 alloc.0 case.0 \ +++matchup.0 mlmatchup.0 columnt.0 xqp.0 xsender.0 xrecipient.0 alloc.0 case.0 \ ++ error.0 error_str.0 getln2.0 getln.0 stralloc.0 ++ ++ matchup: \ ++@@ -275,7 +275,7 @@ ++ ./compile open_trunc.c ++ ++ prog: \ ++-matchup columnt zoverall zsendmail xqp xsender xrecipient ddist \ +++matchup mlmatchup columnt zoverall zsendmail xqp xsender xrecipient ddist \ ++ deferrals failures successes rhosts recipients rxdelay senders suids \ ++ zddist zdeferrals zfailures zsuccesses zrhosts zrecipients zrxdelay \ ++ zsenders zsuids ++@@ -566,3 +566,22 @@ ++ | sed s}HOME}"`head -1 conf-home`"}g \ ++ > zsuids ++ chmod 755 zsuids +++ +++mlmatchup: \ +++load mlmatchup.o strerr.a getln.a substdio.a stralloc.a alloc.a error.a \ +++str.a fs.a case.a +++ ./load mlmatchup strerr.a getln.a substdio.a stralloc.a \ +++ alloc.a error.a str.a fs.a case.a +++ +++mlmatchup.0: \ +++mlmatchup.8 +++ nroff -man mlmatchup.8 > mlmatchup.0 +++ +++mlmatchup.o: \ +++compile mlmatchup.c stralloc.h gen_alloc.h gen_alloc.h gen_allocdefs.h \ +++strerr.h getln.h substdio.h subfd.h substdio.h readwrite.h exit.h \ +++str.h fmt.h scan.h case.h +++ ./compile mlmatchup.c +++ +++clean: +++ rm -f `cat TARGETS` ++diff -x .svn -Naur qmailanalog-0.70/man.do qmailanalog/man.do ++--- qmailanalog-0.70/man.do 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/man.do 2007-04-30 20:57:24.000000000 +0200 ++@@ -1,4 +1,4 @@ ++ dependon \ ++-matchup.0 columnt.0 \ +++matchup.0 mlmatchup.0 columnt.0 \ ++ xqp.0 xsender.0 xrecipient.0 \ ++ alloc.0 case.0 error.0 error_str.0 getln2.0 getln.0 stralloc.0 ++diff -x .svn -Naur qmailanalog-0.70/matchup.1 qmailanalog/matchup.1 ++--- qmailanalog-0.70/matchup.1 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/matchup.1 2007-04-30 20:57:24.000000000 +0200 ++@@ -7,7 +7,9 @@ ++ .B matchup ++ reads a series of lines from ++ .BR qmail-send , ++-with a numeric timestamp in front of each line. +++with a numeric timestamp in the format seconds.nanoseconds or a TAI64N timestamps +++in front of each line, allowing either splogger(8) or multilog(8) to produce the +++logfiles. ++ .B matchup ++ matches the end of each delivery attempt with the start of the delivery attempt ++ and with the relevant message information; ++@@ -108,4 +110,6 @@ ++ xsender(1), ++ accustamp(1), ++ qmail-log(5), ++-splogger(8) +++splogger(8), +++multilog(8), +++mlmatchup(1) ++diff -x .svn -Naur qmailanalog-0.70/matchup.c qmailanalog/matchup.c ++--- qmailanalog-0.70/matchup.c 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/matchup.c 2007-04-30 20:57:24.000000000 +0200 ++@@ -183,6 +183,47 @@ ++ poolbytes = pool.len; /* redundant, but doesn't hurt */ ++ } ++ +++/* turn TAI date into old fashioned date */ +++/* dates without @ are left alone */ +++ +++static char datebuf[FMT_ULONG+FMT_ULONG+2]; /* ssssssssss.ffffffffff\n */ +++ +++char * +++datize(s) +++char *s; +++{ +++ int c; +++ int len; +++ unsigned long u; +++ unsigned long seconds = 0; +++ unsigned long nanoseconds = 0; +++ +++ if(*s != '@') return s; +++ s++; +++ +++ while ((c = *s++)) { +++ u = c - '0'; +++ if (u >= 10) { +++ u = c - 'a'; +++ if (u >= 6) break; +++ u += 10; +++ } +++ seconds <<= 4; +++ seconds += nanoseconds >> 28; +++ nanoseconds &= 0xfffffff; +++ nanoseconds <<= 4; +++ nanoseconds += u; +++ } +++ seconds -= 4611686018427387914ULL; +++ +++ len = fmt_ulong(datebuf, seconds); +++ datebuf[len++] = '.'; +++ len += fmt_uint0(datebuf+len, nanoseconds, 9); +++ datebuf[len] = 0; +++ +++ return datebuf; +++} +++ ++ stralloc line = {0}; ++ int match; ++ ++@@ -209,7 +250,7 @@ ++ dmsg.u[dpos] = m; ++ ++ dstart.u[dpos] = pool.len; ++- if (!stralloc_cats(&pool,line.s + field[0])) nomem(); +++ if (!stralloc_cats(&pool,datize(line.s + field[0]))) nomem(); ++ if (!stralloc_0(&pool)) nomem(); ++ ++ dchan.u[dpos] = pool.len; ++@@ -267,7 +308,7 @@ ++ if (mpos != -1) { ++ outs(pool.s + birth.u[mpos]); ++ outs(" "); outs(pool.s + dstart.u[dpos]); ++- outs(" "); outs(line.s + field[0]); +++ outs(" "); outs(datize(line.s + field[0])); ++ outs(" "); out(strnum,fmt_ulong(strnum,bytes.u[mpos])); ++ outs(" "); outs(pool.s + sender.u[mpos]); ++ outs(" "); outs(pool.s + dchan.u[dpos]); ++@@ -279,7 +320,7 @@ ++ else { ++ outs(pool.s + dstart.u[dpos]); ++ outs(" "); outs(pool.s + dstart.u[dpos]); ++- outs(" "); outs(line.s + field[0]); +++ outs(" "); outs(datize(line.s + field[0])); ++ outs(" 0 ? "); outs(pool.s + dchan.u[dpos]); ++ outs("."); outs(pool.s + drecip.u[dpos]); ++ outs(" ? ? "); outs(reason); ++@@ -313,7 +354,7 @@ ++ if (mpos == -1) return; ++ ++ outs("m "); outs(pool.s + birth.u[mpos]); ++- outs(" "); outs(line.s + field[0]); +++ outs(" "); outs(datize(line.s + field[0])); ++ outs(" "); out(strnum,fmt_ulong(strnum,bytes.u[mpos])); ++ outs(" "); out(strnum,fmt_ulong(strnum,numk.u[mpos])); ++ outs(" "); out(strnum,fmt_ulong(strnum,numd.u[mpos])); ++@@ -344,7 +385,7 @@ ++ numz.u[mpos] = 0; ++ ++ birth.u[mpos] = pool.len; ++- if (!stralloc_cats(&pool,line.s + field[0])) nomem(); +++ if (!stralloc_cats(&pool,datize(line.s + field[0]))) nomem(); ++ if (!stralloc_0(&pool)) nomem(); ++ ++ sender.u[mpos] = pool.len; ++diff -x .svn -Naur qmailanalog-0.70/mlmatchup.8 qmailanalog/mlmatchup.8 ++--- qmailanalog-0.70/mlmatchup.8 1970-01-01 01:00:00.000000000 +0100 +++++ qmailanalog/mlmatchup.8 2007-04-30 20:57:24.000000000 +0200 ++@@ -0,0 +1,33 @@ +++.TH mlmatchup 8 +++.SH NAME +++mlmatchup \- collect information on messages and deliveries through multilog +++.SH SYNTAX +++.B mlmatchup +++.SH DESCRIPTION +++.B mlmatchup +++behaves exactly like +++.BR matchup(1) +++with the difference, that it first reads (pending delivery) lines +++from file descriptor 4. This makes +++.B mlmatchup +++suitable as a procesor action for multilog. +++ +++If you use multilog to process +++.B qmail-send +++logfiles expand the run file of qmail-send's log services like this: +++ +++.EX +++ exec setuidgid qmaill multilog t ./main \\ +++.br +++ !/usr/local/qmailanalog/bin/mlmatchup ./qmailanalog +++.EE +++ +++.SH "SEE ALSO" +++multilog(8), +++matchup(1), +++xqp(1), +++xrecipient(1), +++xsender(1), +++accustamp(1), +++qmail-log(5), +++splogger(8) ++diff -x .svn -Naur qmailanalog-0.70/mlmatchup.c qmailanalog/mlmatchup.c ++--- qmailanalog-0.70/mlmatchup.c 1970-01-01 01:00:00.000000000 +0100 +++++ qmailanalog/mlmatchup.c 2007-04-30 20:57:24.000000000 +0200 ++@@ -0,0 +1,536 @@ +++#include "stralloc.h" +++#include "gen_alloc.h" +++#include "gen_allocdefs.h" +++#include "strerr.h" +++#include "getln.h" +++#include "substdio.h" +++#include "subfd.h" +++#include "readwrite.h" +++#include "exit.h" +++#include "str.h" +++#include "fmt.h" +++#include "scan.h" +++#include "case.h" +++ +++#define FATAL "matchup: fatal: " +++ +++void nomem() { strerr_die2x(111,FATAL,"out of memory"); } +++void die_read() { strerr_die2sys(111,FATAL,"unable to read input: "); } +++void die_write() { strerr_die2sys(111,FATAL,"unable to write output: "); } +++void die_write5() { strerr_die2sys(111,FATAL,"unable to write fd 5: "); } +++ +++void out(buf,len) char *buf; int len; +++{ if (substdio_put(subfdout,buf,len) == -1) die_write(); } +++void outs(buf) char *buf; +++{ if (substdio_puts(subfdout,buf) == -1) die_write(); } +++ +++char buf5[512]; +++substdio ss5 = SUBSTDIO_FDBUF(write,5,buf5,sizeof buf5); +++ +++void out5(buf,len) char *buf; int len; +++{ if (substdio_put(&ss5,buf,len) == -1) die_write5(); } +++void outs5(buf) char *buf; +++{ if (substdio_puts(&ss5,buf) == -1) die_write5(); } +++ +++GEN_ALLOC_typedef(ulongalloc,unsigned long,u,len,a) +++GEN_ALLOC_ready(ulongalloc,unsigned long,u,len,a,i,n,x,30,ulongalloc_ready) +++GEN_ALLOC_readyplus(ulongalloc,unsigned long,u,len,a,i,n,x,30,ulongalloc_readyplus) +++ +++char strnum[FMT_ULONG]; +++ +++stralloc pool = {0}; +++unsigned int poolbytes = 0; +++ +++int nummsg = 0; +++ulongalloc msg = {0}; +++ulongalloc bytes = {0}; +++ulongalloc qp = {0}; +++ulongalloc uid = {0}; +++ulongalloc numk = {0}; +++ulongalloc numd = {0}; +++ulongalloc numz = {0}; +++ulongalloc sender = {0}; +++ulongalloc birth = {0}; +++ +++int msg_find(m) +++unsigned long m; +++{ +++ int i; +++ for (i = 0;i < nummsg;++i) if (msg.u[i] == m) return i; +++ return -1; +++} +++ +++int msg_add(m) +++unsigned long m; +++{ +++ int i; +++ for (i = 0;i < nummsg;++i) if (msg.u[i] == m) return i; +++ i = nummsg++; +++ if (!ulongalloc_ready(&msg,nummsg)) nomem(); +++ if (!ulongalloc_ready(&bytes,nummsg)) nomem(); +++ if (!ulongalloc_ready(&qp,nummsg)) nomem(); +++ if (!ulongalloc_ready(&uid,nummsg)) nomem(); +++ if (!ulongalloc_ready(&numk,nummsg)) nomem(); +++ if (!ulongalloc_ready(&numd,nummsg)) nomem(); +++ if (!ulongalloc_ready(&numz,nummsg)) nomem(); +++ if (!ulongalloc_ready(&sender,nummsg)) nomem(); +++ if (!ulongalloc_ready(&birth,nummsg)) nomem(); +++ msg.u[i] = m; +++ return i; +++} +++ +++int msg_kill(i) +++int i; +++{ +++ poolbytes -= str_len(pool.s + sender.u[i]) + 1; +++ poolbytes -= str_len(pool.s + birth.u[i]) + 1; +++ +++ --nummsg; +++ msg.u[i] = msg.u[nummsg]; +++ bytes.u[i] = bytes.u[nummsg]; +++ qp.u[i] = qp.u[nummsg]; +++ uid.u[i] = uid.u[nummsg]; +++ numk.u[i] = numk.u[nummsg]; +++ numd.u[i] = numd.u[nummsg]; +++ numz.u[i] = numz.u[nummsg]; +++ sender.u[i] = sender.u[nummsg]; +++ birth.u[i] = birth.u[nummsg]; +++} +++ +++int numdel = 0; +++ulongalloc del = {0}; +++ulongalloc dmsg = {0}; +++ulongalloc dchan = {0}; +++ulongalloc drecip = {0}; +++ulongalloc dstart = {0}; +++ +++int del_find(d) +++unsigned long d; +++{ +++ int i; +++ for (i = 0;i < numdel;++i) if (del.u[i] == d) return i; +++ return -1; +++} +++ +++int del_add(d) +++unsigned long d; +++{ +++ int i; +++ for (i = 0;i < numdel;++i) if (del.u[i] == d) return i; +++ i = numdel++; +++ if (!ulongalloc_ready(&del,numdel)) nomem(); +++ if (!ulongalloc_ready(&dmsg,numdel)) nomem(); +++ if (!ulongalloc_ready(&dchan,numdel)) nomem(); +++ if (!ulongalloc_ready(&drecip,numdel)) nomem(); +++ if (!ulongalloc_ready(&dstart,numdel)) nomem(); +++ del.u[i] = d; +++ return i; +++} +++ +++void del_kill(i) +++int i; +++{ +++ poolbytes -= str_len(pool.s + dchan.u[i]) + 1; +++ poolbytes -= str_len(pool.s + drecip.u[i]) + 1; +++ poolbytes -= str_len(pool.s + dstart.u[i]) + 1; +++ --numdel; +++ del.u[i] = del.u[numdel]; +++ dmsg.u[i] = dmsg.u[numdel]; +++ dchan.u[i] = dchan.u[numdel]; +++ drecip.u[i] = drecip.u[numdel]; +++ dstart.u[i] = dstart.u[numdel]; +++} +++ +++stralloc pool2 = {0}; +++ +++void garbage() +++{ +++ int i; +++ char *x; +++ +++ if (pool.len - poolbytes < poolbytes + 4096) return; +++ +++ if (!stralloc_copys(&pool2,"")) nomem(); +++ +++ for (i = 0;i < nummsg;++i) { +++ x = pool.s + birth.u[i]; +++ birth.u[i] = pool2.len; +++ if (!stralloc_cats(&pool2,x)) nomem(); +++ if (!stralloc_0(&pool2)) nomem(); +++ x = pool.s + sender.u[i]; +++ sender.u[i] = pool2.len; +++ if (!stralloc_cats(&pool2,x)) nomem(); +++ if (!stralloc_0(&pool2)) nomem(); +++ } +++ +++ for (i = 0;i < numdel;++i) { +++ x = pool.s + dstart.u[i]; +++ dstart.u[i] = pool2.len; +++ if (!stralloc_cats(&pool2,x)) nomem(); +++ if (!stralloc_0(&pool2)) nomem(); +++ x = pool.s + dchan.u[i]; +++ dchan.u[i] = pool2.len; +++ if (!stralloc_cats(&pool2,x)) nomem(); +++ if (!stralloc_0(&pool2)) nomem(); +++ x = pool.s + drecip.u[i]; +++ drecip.u[i] = pool2.len; +++ if (!stralloc_cats(&pool2,x)) nomem(); +++ if (!stralloc_0(&pool2)) nomem(); +++ } +++ +++ if (!stralloc_copy(&pool,&pool2)) nomem(); +++ +++ poolbytes = pool.len; /* redundant, but doesn't hurt */ +++} +++ +++/* turn TAI date into old fashioned date */ +++/* dates without @ are left alone */ +++ +++static char datebuf[FMT_ULONG+FMT_ULONG+2]; /* ssssssssss.ffffffffff\n */ +++ +++char * +++datize(s) +++char *s; +++{ +++ int c; +++ int len; +++ unsigned long u; +++ unsigned long seconds = 0; +++ unsigned long nanoseconds = 0; +++ +++ if(*s != '@') return s; +++ s++; +++ +++ while ((c = *s++)) { +++ u = c - '0'; +++ if (u >= 10) { +++ u = c - 'a'; +++ if (u >= 6) break; +++ u += 10; +++ } +++ seconds <<= 4; +++ seconds += nanoseconds >> 28; +++ nanoseconds &= 0xfffffff; +++ nanoseconds <<= 4; +++ nanoseconds += u; +++ } +++ seconds -= 4611686018427387914ULL; +++ +++ len = fmt_ulong(datebuf, seconds); +++ datebuf[len++] = '.'; +++ len += fmt_uint0(datebuf+len, nanoseconds, 9); +++ datebuf[len] = 0; +++ +++ return datebuf; +++} +++ +++stralloc line = {0}; +++int match; +++ +++#define FIELDS 20 +++int field[FIELDS]; +++ +++void clear() +++{ +++ while (numdel > 0) del_kill(0); +++ garbage(); +++} +++ +++void starting() +++{ +++ unsigned long d; +++ unsigned long m; +++ int dpos; +++ +++ scan_ulong(line.s + field[3],&d); +++ scan_ulong(line.s + field[5],&m); +++ +++ dpos = del_add(d); +++ +++ dmsg.u[dpos] = m; +++ +++ dstart.u[dpos] = pool.len; +++ if (!stralloc_cats(&pool,datize(line.s + field[0]))) nomem(); +++ if (!stralloc_0(&pool)) nomem(); +++ +++ dchan.u[dpos] = pool.len; +++ if (!stralloc_cats(&pool,line.s + field[7])) nomem(); +++ if (!stralloc_0(&pool)) nomem(); +++ +++ drecip.u[dpos] = pool.len; +++ if (!stralloc_cats(&pool,line.s + field[8])) nomem(); +++ if (!stralloc_0(&pool)) nomem(); +++ case_lowers(pool.s + drecip.u[dpos]); +++ +++ poolbytes += pool.len - dstart.u[dpos]; +++} +++ +++void delivery() +++{ +++ unsigned long d; +++ unsigned long m; +++ int dpos; +++ int mpos; +++ char *result = "?"; +++ char *reason = ""; +++ +++ scan_ulong(line.s + field[2],&d); +++ +++ dpos = del_find(d); +++ if (dpos == -1) return; +++ +++ m = dmsg.u[dpos]; +++ mpos = msg_find(m); +++ +++ if (str_start(line.s + field[3],"succ")) { +++ if (mpos != -1) ++numk.u[mpos]; +++ result = "d k "; +++ reason = line.s + field[4]; +++ } +++ else if (str_start(line.s + field[3],"fail")) { +++ if (mpos != -1) ++numd.u[mpos]; +++ result = "d d "; +++ reason = line.s + field[4]; +++ } +++ else if (str_start(line.s + field[3],"defer")) { +++ if (mpos != -1) ++numz.u[mpos]; +++ result = "d z "; +++ reason = line.s + field[4]; +++ } +++ else if (str_start(line.s + field[3],"report")) { +++ if (mpos != -1) ++numz.u[mpos]; +++ result = "d z "; +++ reason = "report_mangled"; +++ } +++ +++ outs(result); +++ +++ if (mpos != -1) { +++ outs(pool.s + birth.u[mpos]); +++ outs(" "); outs(pool.s + dstart.u[dpos]); +++ outs(" "); outs(datize(line.s + field[0])); +++ outs(" "); out(strnum,fmt_ulong(strnum,bytes.u[mpos])); +++ outs(" "); outs(pool.s + sender.u[mpos]); +++ outs(" "); outs(pool.s + dchan.u[dpos]); +++ outs("."); outs(pool.s + drecip.u[dpos]); +++ outs(" "); out(strnum,fmt_ulong(strnum,qp.u[mpos])); +++ outs(" "); out(strnum,fmt_ulong(strnum,uid.u[mpos])); +++ outs(" "); outs(reason); +++ } +++ else { +++ outs(pool.s + dstart.u[dpos]); +++ outs(" "); outs(pool.s + dstart.u[dpos]); +++ outs(" "); outs(datize(line.s + field[0])); +++ outs(" 0 ? "); outs(pool.s + dchan.u[dpos]); +++ outs("."); outs(pool.s + drecip.u[dpos]); +++ outs(" ? ? "); outs(reason); +++ } +++ +++ outs("\n"); +++ +++ del_kill(dpos); +++ garbage(); +++} +++ +++void newmsg() +++{ +++ unsigned long m; +++ int mpos; +++ +++ scan_ulong(line.s + field[3],&m); +++ mpos = msg_find(m); +++ if (mpos == -1) return; +++ msg_kill(mpos); +++ garbage(); +++} +++ +++void endmsg() +++{ +++ unsigned long m; +++ int mpos; +++ +++ scan_ulong(line.s + field[3],&m); +++ mpos = msg_find(m); +++ if (mpos == -1) return; +++ +++ outs("m "); outs(pool.s + birth.u[mpos]); +++ outs(" "); outs(datize(line.s + field[0])); +++ outs(" "); out(strnum,fmt_ulong(strnum,bytes.u[mpos])); +++ outs(" "); out(strnum,fmt_ulong(strnum,numk.u[mpos])); +++ outs(" "); out(strnum,fmt_ulong(strnum,numd.u[mpos])); +++ outs(" "); out(strnum,fmt_ulong(strnum,numz.u[mpos])); +++ outs(" "); outs(pool.s + sender.u[mpos]); +++ outs(" "); out(strnum,fmt_ulong(strnum,qp.u[mpos])); +++ outs(" "); out(strnum,fmt_ulong(strnum,uid.u[mpos])); +++ outs("\n"); +++ +++ msg_kill(mpos); +++ garbage(); +++} +++ +++void info() +++{ +++ unsigned long m; +++ int mpos; +++ +++ scan_ulong(line.s + field[3],&m); +++ mpos = msg_add(m); +++ +++ scan_ulong(line.s + field[5],&bytes.u[mpos]); +++ scan_ulong(line.s + field[9],&qp.u[mpos]); +++ scan_ulong(line.s + field[11],&uid.u[mpos]); +++ +++ numk.u[mpos] = 0; +++ numd.u[mpos] = 0; +++ numz.u[mpos] = 0; +++ +++ birth.u[mpos] = pool.len; +++ if (!stralloc_cats(&pool,datize(line.s + field[0]))) nomem(); +++ if (!stralloc_0(&pool)) nomem(); +++ +++ sender.u[mpos] = pool.len; +++ if (!stralloc_cats(&pool,line.s + field[7])) nomem(); +++ if (!stralloc_0(&pool)) nomem(); +++ case_lowers(pool.s + sender.u[mpos]); +++ +++ poolbytes += pool.len - birth.u[mpos]; +++} +++ +++void extra() +++{ +++ unsigned long m; +++ int mpos; +++ +++ scan_ulong(line.s + field[2],&m); +++ mpos = msg_find(m); +++ if (mpos == -1) return; +++ +++ scan_ulong(line.s + field[3],&numk.u[mpos]); +++ scan_ulong(line.s + field[4],&numz.u[mpos]); +++ scan_ulong(line.s + field[5],&numd.u[mpos]); +++} +++ +++void pending() +++{ +++ int i; +++ +++ for (i = 0;i < nummsg;++i) { +++ outs5(pool.s + birth.u[i]); +++ outs5(" info msg "); +++ out5(strnum,fmt_ulong(strnum,msg.u[i])); +++ outs5(": bytes "); +++ out5(strnum,fmt_ulong(strnum,bytes.u[i])); +++ outs5(" from "); +++ outs5(pool.s + sender.u[i]); +++ outs5(" qp "); +++ out5(strnum,fmt_ulong(strnum,qp.u[i])); +++ outs5(" uid "); +++ out5(strnum,fmt_ulong(strnum,uid.u[i])); +++ outs5("\n"); +++ outs5(pool.s + birth.u[i]); +++ outs5(" extra "); +++ out5(strnum,fmt_ulong(strnum,msg.u[i])); +++ outs5(" "); +++ out5(strnum,fmt_ulong(strnum,numk.u[i])); +++ outs5(" "); +++ out5(strnum,fmt_ulong(strnum,numz.u[i])); +++ outs5(" "); +++ out5(strnum,fmt_ulong(strnum,numd.u[i])); +++ outs5("\n"); +++ } +++ +++ for (i = 0;i < numdel;++i) { +++ outs5(pool.s + dstart.u[i]); +++ outs5(" starting delivery "); +++ out5(strnum,fmt_ulong(strnum,del.u[i])); +++ outs5(": msg "); +++ out5(strnum,fmt_ulong(strnum,dmsg.u[i])); +++ outs5(" to "); +++ outs5(pool.s + dchan.u[i]); +++ outs5(" "); +++ outs5(pool.s + drecip.u[i]); +++ outs5("\n"); +++ } +++ +++ out5(line.s,line.len); +++ if (substdio_flush(&ss5) == -1) die_write5(); +++} +++ +++stralloc outline = {0}; +++ +++void matchup(substdio *ssin) +++{ +++ int i; +++ int j; +++ char ch; +++ +++ for (;;) { +++ if (getln(ssin,&line,&match,'\n') == -1) die_read(); +++ if (!match) break; +++ +++ if (!stralloc_copy(&outline,&line)) nomem(); +++ +++ for (i = 0;i < line.len;++i) { +++ ch = line.s[i]; +++ if ((ch == '\n') || (ch == ' ') || (ch == '\t')) line.s[i] = 0; +++ } +++ j = 0; +++ for (i = 0;i < FIELDS;++i) { +++ while (j < line.len) if (line.s[j]) break; else ++j; +++ field[i] = j; +++ while (j < line.len) if (!line.s[j]) break; else ++j; +++ } +++ if (!stralloc_0(&line)) nomem(); +++ +++ if (str_equal(line.s + field[1],"status:")) ; +++ else if (str_equal(line.s + field[1],"starting")) starting(); +++ else if (str_equal(line.s + field[1],"delivery")) delivery(); +++ else if (str_equal(line.s + field[1],"new")) newmsg(); +++ else if (str_equal(line.s + field[1],"end")) endmsg(); +++ else if (str_equal(line.s + field[1],"info")) info(); +++ else if (str_equal(line.s + field[1],"extra")) extra(); +++ else if (str_equal(line.s + field[1],"running")) clear(); +++ else if (str_equal(line.s + field[1],"exiting")) clear(); +++ else if (str_equal(line.s + field[1],"number")) ; +++ else if (str_equal(line.s + field[1],"local")) ; +++ else if (str_equal(line.s + field[1],"remote")) ; +++ else if (str_equal(line.s + field[1],"warning:")) out(outline.s,outline.len); +++ else if (str_equal(line.s + field[1],"alert:")) out(outline.s,outline.len); +++ else { +++ outs("? "); +++ out(outline.s,outline.len); +++ } +++ } +++} +++ +++char subfd4_input[SUBSTDIO_INSIZE]; +++static substdio i4t = SUBSTDIO_FDBUF(subfd_read,4,subfd4_input,sizeof subfd4_input); +++substdio *subfd4in = &i4t; +++ +++void main() +++{ +++ int i; +++ int j; +++ char ch; +++ +++ if (!stralloc_copys(&pool,"")) nomem(); +++ +++ if (!ulongalloc_ready(&msg,1)) nomem(); +++ if (!ulongalloc_ready(&bytes,1)) nomem(); +++ if (!ulongalloc_ready(&qp,1)) nomem(); +++ if (!ulongalloc_ready(&uid,1)) nomem(); +++ if (!ulongalloc_ready(&numk,1)) nomem(); +++ if (!ulongalloc_ready(&numd,1)) nomem(); +++ if (!ulongalloc_ready(&numz,1)) nomem(); +++ if (!ulongalloc_ready(&del,1)) nomem(); +++ if (!ulongalloc_ready(&dmsg,1)) nomem(); +++ +++ matchup(subfd4in); +++ matchup(subfdin); +++ +++ if (substdio_flush(subfdout) == -1) die_write(); +++ +++ pending(); +++ +++ _exit(0); +++} ++diff -x .svn -Naur qmailanalog-0.70/prog.do qmailanalog/prog.do ++--- qmailanalog-0.70/prog.do 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/prog.do 2007-04-30 20:57:24.000000000 +0200 ++@@ -1,5 +1,6 @@ ++ dependon \ ++ matchup \ +++mlmatchup \ ++ columnt \ ++ zoverall \ ++ zsendmail \ ++diff -x .svn -Naur qmailanalog-0.70/TARGETS qmailanalog/TARGETS ++--- qmailanalog-0.70/TARGETS 1998-08-30 23:39:26.000000000 +0200 +++++ qmailanalog/TARGETS 2007-05-03 00:14:59.000000000 +0200 ++@@ -70,6 +70,9 @@ ++ case_lowers.o ++ case.a ++ matchup +++mlmatchup +++mlmatchup.o +++mlmatchup.0 ++ columnt.o ++ slurpclose.o ++ columnt ++diff -x .svn -Naur qmailanalog-0.70/zdeferrals.sh qmailanalog/zdeferrals.sh ++--- qmailanalog-0.70/zdeferrals.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zdeferrals.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -5,4 +5,4 @@ ++ * xdelay is the total xdelay on those deliveries. ++ ' ++ ( echo del xdelay reason ++-HOME/bin/deferrals | sort +2 ) | HOME/bin/columnt | tr _ ' ' +++HOME/bin/deferrals | sort -k2 ) | HOME/bin/columnt | tr _ ' ' ++diff -x .svn -Naur qmailanalog-0.70/zfailures.sh qmailanalog/zfailures.sh ++--- qmailanalog-0.70/zfailures.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zfailures.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -5,4 +5,4 @@ ++ * xdelay is the total xdelay on those deliveries. ++ ' ++ ( echo del xdelay reason ++-HOME/bin/failures | sort +2 ) | HOME/bin/columnt | tr _ ' ' +++HOME/bin/failures | sort -k2 ) | HOME/bin/columnt | tr _ ' ' ++diff -x .svn -Naur qmailanalog-0.70/zrecipients.sh qmailanalog/zrecipients.sh ++--- qmailanalog-0.70/zrecipients.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zrecipients.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -7,4 +7,4 @@ ++ * xdelay is the total xdelay incurred by this recipient. ++ ' ++ ( echo sbytes mess tries xdelay recipient ++-HOME/bin/recipients | sort +4 ) | HOME/bin/columnt +++HOME/bin/recipients | sort -k4 ) | HOME/bin/columnt ++diff -x .svn -Naur qmailanalog-0.70/zrhosts.sh qmailanalog/zrhosts.sh ++--- qmailanalog-0.70/zrhosts.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zrhosts.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -7,4 +7,4 @@ ++ * xdelay is the total xdelay incurred by this host. ++ ' ++ ( echo sbytes mess tries xdelay host ++-HOME/bin/rhosts | sort +4 ) | HOME/bin/columnt +++HOME/bin/rhosts | sort -k4 ) | HOME/bin/columnt ++diff -x .svn -Naur qmailanalog-0.70/zsenders.sh qmailanalog/zsenders.sh ++--- qmailanalog-0.70/zsenders.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zsenders.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -10,4 +10,4 @@ ++ * xdelay is the total xdelay incurred by this sender. ++ ' ++ ( echo mess bytes sbytes rbytes recips tries xdelay sender ++-HOME/bin/senders | sort -n +7 ) | HOME/bin/columnt +++HOME/bin/senders | sort -k7,7n ) | HOME/bin/columnt ++diff -x .svn -Naur qmailanalog-0.70/zsuccesses.sh qmailanalog/zsuccesses.sh ++--- qmailanalog-0.70/zsuccesses.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zsuccesses.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -5,4 +5,4 @@ ++ * xdelay is the total xdelay on those deliveries. ++ ' ++ ( echo del xdelay reason ++-HOME/bin/successes | sort +2 ) | HOME/bin/columnt | tr _ ' ' +++HOME/bin/successes | sort -k2 ) | HOME/bin/columnt | tr _ ' ' ++diff -x .svn -Naur qmailanalog-0.70/zsuids.sh qmailanalog/zsuids.sh ++--- qmailanalog-0.70/zsuids.sh 1998-08-30 23:39:27.000000000 +0200 +++++ qmailanalog/zsuids.sh 2007-04-30 20:57:24.000000000 +0200 ++@@ -10,4 +10,4 @@ ++ * xdelay is the total xdelay incurred by this uid. ++ ' ++ ( echo mess bytes sbytes rbytes recips tries xdelay uid ++-HOME/bin/suids | sort -n +7 ) | HOME/bin/columnt +++HOME/bin/suids | sort -k7,7n ) | HOME/bin/columnt +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-runit.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-runit.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,71 @@ +From 75311c3bd2ccd1d82d189c44fccc2ee9e142dda2 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:43:16 +0100 +Subject: [PATCH] diet-runit-1.8.0-1-i686 + * added + +--- + source/dietlibc/diet-runit/FrugalBuild | 51 ++++++++++++++++++++++++++++++++ + 1 files changed, 51 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-runit/FrugalBuild + +diff --git a/source/dietlibc/diet-runit/FrugalBuild b/source/dietlibc/diet-runit/FrugalBuild +new file mode 100644 +index 0000000..b827f83 +--- /dev/null ++++ b/source/dietlibc/diet-runit/FrugalBuild +@@ -0,0 +1,51 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=runit ++pkgname=$branch-$pkgorig ++pkgver=1.8.0 ++pkgrel=1 ++pkgdesc="init replacement" ++url="http://smarden.org/runit/" ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++makedepends=(dietlibc) ++source=($url/$pkgorig-$pkgver.tar.gz) ++sha1sums=('a8a968cd8f17f78fcf9db36a3ac9107e3e68d86c') ++provides=(runit) ++ ++build() { ++ mkdir -p $Fdestdir/package/admin ++ ++ mv $Fsrcdir/admin/$pkgorig-$pkgver $Fdestdir/package/admin ++ cd $Fdestdir/package/admin/$pkgorig-$pkgver ++ ++ echo "diet gcc $CFLAGS" > src/conf-cc ++ echo "diet gcc -s -static" > src/conf-ld ++ package/compile || return 1 ++ ++ rm -rf compile ++ chown -R root.root $Fdestdir/package/ ++ ++ cd $Fdestdir/package/admin/ && ln -s $pkgorig-$pkgver $pkgorig ++ ++ mkdir -p $Fdestdir/usr/share/man/man8 ++ cd $pkgorig && cp man/*.8 $Fdestdir/usr/share/man/man8 ++ mkdir -p $Fdestdir/sbin ++ install -m750 $Fdestdir/package/admin/runit/command/runit-init $Fdestdir/sbin/runit-init ++ install -m750 $Fdestdir/package/admin/runit/command/runit $Fdestdir/sbin/runit ++ ++ mkdir $Fdestdir/command && cd $Fdestdir/command ++ for i in `ls $Fdestdir/package/admin/$pkgorig/command`; do ln -sf /package/admin/$pkgorig/command/$i $i; done ++ ++ ++ mkdir -p $Fdestdir/etc/runit/runsvdir/default ++ mkdir $Fdestdir/var ++ ln -sf default $Fdestdir/etc/runit/runsvdir/current ++ ln -sf /etc/runit/runsvdir/default $Fdestdir/var/service ++ ++ sed 's,/var/service,/etc/runit/runsvdir/default,' \ ++ < $Fdestdir/package/admin/runit/etc/2 > $Fdestdir/sbin/runsvdir-start ++ chmod 755 $Fdestdir/sbin/runsvdir-start ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-ucspi-ipc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-ucspi-ipc.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,52 @@ +From 3abefdd51bc395b46a6ae273f8043ea50cab5dc5 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 30 Oct 2007 22:42:20 +0100 +Subject: [PATCH] diet-ucspi-ipc-0.67-1-i686 + * added + +--- + source/dietlibc/diet-ucspi-ipc/FrugalBuild | 32 ++++++++++++++++++++++++++++ + 1 files changed, 32 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-ucspi-ipc/FrugalBuild + +diff --git a/source/dietlibc/diet-ucspi-ipc/FrugalBuild b/source/dietlibc/diet-ucspi-ipc/FrugalBuild +new file mode 100644 +index 0000000..5271af3 +--- /dev/null ++++ b/source/dietlibc/diet-ucspi-ipc/FrugalBuild +@@ -0,0 +1,32 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=ucspi-ipc ++pkgname=$branch-$pkgorig ++pkgver=0.67 ++pkgrel=1 ++pkgdesc="command-line tools for building local-domain client-server applications" ++makedepends=(dietlibc) ++url="http://www.superscript.com/ucspi-ipc/intro.html" ++source=(http://www.superscript.com/$pkgorig/$pkgorig-$pkgver.tar.gz) ++archs=(i686) ++up2date='lynx -dump http://www.superscript.com/ucspi-ipc/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++sha1sums=('5f53c5fa487f4baa46eb071f40117454ee1eeef8') ++ ++build() { ++ sPATH=host/superscript.com/net ++ Fcd $sPATH/$pkgorig-$pkgver ++ echo "diet gcc $CFLAGS" > src/conf-cc ++ echo "diet gcc -s -static" > src/conf-ld ++ package/compile base || Fdie ++ Fmkdir package/$sPATH/$pkgorig-$pkgver ++ cd $Fdestdir/package/$sPATH ++ rm -f $pkgorig ++ ln -s $pkgorig-$pkgver $pkgorig ++ mv $Fsrcdir/$sPATH/$pkgorig-$pkgver/command $Fdestdir/package/$sPATH/$pkgorig ++ Fmkdir command ++ for cmd in `cat $Fsrcdir/$sPATH/$pkgorig-$pkgver/package/commands-base`; do ++ ln -s /package/host/superscript.com/net/$pkgorig/command/$cmd $Fdestdir/command ++ done; ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-ucspi-proxy.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-ucspi-proxy.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,51 @@ +From 8272ede6f6bef869f0d714f4f6dd97e648b5cd2e Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sat, 3 Nov 2007 23:38:45 +0100 +Subject: [PATCH] diet-ucspi-proxy-0.97-1-i686: + * added + +--- + source/dietlibc/diet-ucspi-proxy/FrugalBuild | 31 ++++++++++++++++++++++++++ + 1 files changed, 31 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-ucspi-proxy/FrugalBuild + +diff --git a/source/dietlibc/diet-ucspi-proxy/FrugalBuild b/source/dietlibc/diet-ucspi-proxy/FrugalBuild +new file mode 100644 +index 0000000..c310b9e +--- /dev/null ++++ b/source/dietlibc/diet-ucspi-proxy/FrugalBuild +@@ -0,0 +1,31 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=ucspi-proxy ++pkgname=$branch-$pkgorig ++pkgver=0.97 ++pkgrel=1 ++pkgdesc="Connection proxy for UCSPI tools" ++makedepends=(dietlibc 'diet-bglibs>=1.025') ++url="http://untroubled.org/ucspi-proxy" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgorig|grep .tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgorig-$pkgver.tar.gz) ++sha1sums=('750b0ac0fe09a682e6f36e3f1e97dcc230b57f0e') ++provides=($pkgorig) ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd $pkgorig-$pkgver ++ echo "$Fdestdir/usr" > conf-home ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ echo "$DDIR/include/bglibs" > conf-bgincs ++ echo "$DDIR/lib" > conf-bglibs ++ echo "$Fdestdir/usr/man" > conf-man ++ echo "$Fdestdir/usr/bin" > conf-bin ++ make || Fdie ++ make install || Fdie ++ install -m755 ucspi-proxy $Fdestdir/usr/bin ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-ucspi-ssl.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-ucspi-ssl.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,55 @@ +From 2797c9f0aa1355d5c1404b050576895599d5e2a1 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sat, 3 Nov 2007 22:46:57 +0100 +Subject: [PATCH] diet-ucspi-ssl-0.70-1-i686: + * added + +--- + source/dietlibc/diet-ucspi-ssl/FrugalBuild | 35 ++++++++++++++++++++++++++++ + 1 files changed, 35 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-ucspi-ssl/FrugalBuild + +diff --git a/source/dietlibc/diet-ucspi-ssl/FrugalBuild b/source/dietlibc/diet-ucspi-ssl/FrugalBuild +new file mode 100644 +index 0000000..8181e54 +--- /dev/null ++++ b/source/dietlibc/diet-ucspi-ssl/FrugalBuild +@@ -0,0 +1,35 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=ucspi-ssl ++pkgname=$branch-$pkgorig ++pkgver=0.70 ++pkgrel=1 ++pkgdesc="command-line tools for building SSL client-server applications" ++makedepends=(dietlibc diet-openssl) ++url="http://www.superscript.com/$pkgorig/intro.html" ++archs=(i686) ++up2date='lynx -dump http://www.superscript.com/$pkgorig/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=(http://www.superscript.com/$pkgorig/$pkgorig-$pkgver.tar.gz) ++sha1sums=('56466bc4a7272ebd937f4ae20dbdcce30235be27') ++provides=($pkgorig) ++ ++build() { ++ export PKG=$startdir/pkg ++ export SRC=$startdir/src ++ sPATH=host/superscript.com/net ++ ++ cd $SRC/$sPATH/$pkgorig-$pkgver ++ echo "diet gcc $CFLAGS" > src/conf-cc ++ echo "diet gcc -s -static" > src/conf-ld ++ echo "" > src/conf-ssl ++ echo "/usr/bin" > src/conf-tcpbin ++ package/compile base || Fdie ++ #package/rts base || return 1 ++ ++ mkdir -p $PKG/usr/bin ++ for cmd in `cat src/it-base\=d`; do ++ install -m755 -oroot -groot compile/$cmd $PKG/usr/bin ++ done ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-ucspi-tcp-fix-provides.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-ucspi-tcp-fix-provides.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,25 @@ +From 283d6ba8c7672c1ef223ab62b6a2b5fa2d6fbfcf Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sat, 3 Nov 2007 22:42:07 +0100 +Subject: [PATCH] diet-ucspi-tcp-0.88-1-i686: fix provides=() + +--- + source/dietlibc/diet-ucspi-tcp/FrugalBuild | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/source/dietlibc/diet-ucspi-tcp/FrugalBuild b/source/dietlibc/diet-ucspi-tcp/FrugalBuild +index 8e65323..e368e1e 100644 +--- a/source/dietlibc/diet-ucspi-tcp/FrugalBuild ++++ b/source/dietlibc/diet-ucspi-tcp/FrugalBuild +@@ -12,7 +12,7 @@ archs=(i686) + up2date='lynx -dump -nolist http://cr.yp.to/$pkgorig/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' + source=(http://cr.yp.to/$pkgorig/$pkgorig-$pkgver.tar.gz) + sha1sums=('793b4189795b563085602c030dd8aa0d206ddc0e') +- ++provides=($pkgorig) + + build() { + Fcd $pkgorig-$pkgver +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 diet-ucspi-tcp.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diet-ucspi-tcp.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,49 @@ +From ba13ad56091f19679347a67ba5a4216deb9cb960 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:49:41 +0100 +Subject: [PATCH] diet-ucspi-tcp-0.88-1-i686 + * added + +--- + source/dietlibc/diet-ucspi-tcp/FrugalBuild | 29 ++++++++++++++++++++++++++++ + 1 files changed, 29 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/diet-ucspi-tcp/FrugalBuild + +diff --git a/source/dietlibc/diet-ucspi-tcp/FrugalBuild b/source/dietlibc/diet-ucspi-tcp/FrugalBuild +new file mode 100644 +index 0000000..8e65323 +--- /dev/null ++++ b/source/dietlibc/diet-ucspi-tcp/FrugalBuild +@@ -0,0 +1,29 @@ ++# Maintainer: Tomas Zeman ++ ++branch=diet ++pkgorig=ucspi-tcp ++pkgname=$branch-$pkgorig ++pkgver=0.88 ++pkgrel=1 ++pkgdesc="command-line tools for building TCP client-server applications" ++makedepends=(dietlibc) ++url="http://cr.yp.to/ucspi-tcp.html" ++archs=(i686) ++up2date='lynx -dump -nolist http://cr.yp.to/$pkgorig/install.html|grep $pkgorig|grep tar.gz|head -1|sed -e "s/.*$pkgorig-\(.*\)\.tar.gz.*$/\1/"' ++source=(http://cr.yp.to/$pkgorig/$pkgorig-$pkgver.tar.gz) ++sha1sums=('793b4189795b563085602c030dd8aa0d206ddc0e') ++ ++ ++build() { ++ Fcd $pkgorig-$pkgver ++ echo "/usr" > conf-home ++ echo "diet gcc $CFLAGS" > conf-cc ++ echo "diet gcc -s -static" > conf-ld ++ make || return 1 ++ for bin in tcpserver tcprules tcprulescheck argv0 recordio \ ++ tcpclient *\@ tcpcat mconnect mconnect-io addcr \ ++ delcr fixcrio rblsmtpd; do ++ install -m 755 -D $bin $Fdestdir/usr/bin/$bin ++ done ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 drbd-module.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/drbd-module.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,96 @@ +From 4853c86a80d071ab2171b1c9d77831f292ebf00a Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 21 Oct 2007 12:33:08 +0200 +Subject: [PATCH] drbd-module-8.0.6-1-i686 + * added + +--- + source/custom/drbd-module/FrugalBuild | 25 ++++++++++++++++++ + source/custom/drbd-module/drbd.install | 43 ++++++++++++++++++++++++++++++++ + 2 files changed, 68 insertions(+), 0 deletions(-) + create mode 100644 source/custom/drbd-module/FrugalBuild + create mode 100644 source/custom/drbd-module/drbd.install + +diff --git a/source/custom/drbd-module/FrugalBuild b/source/custom/drbd-module/FrugalBuild +new file mode 100644 +index 0000000..6eadd82 +--- /dev/null ++++ b/source/custom/drbd-module/FrugalBuild +@@ -0,0 +1,25 @@ ++# Maintainer: Tomas Zeman ++ ++pkgorig=drbd ++pkgname=$pkgorig-module ++pkgver=8.0.6 ++pkgrel=1 ++pkgdesc="block device mirroring a whole block device via network; network raid-1 implementation" ++url="http://www.drbd.org" ++license="GPL" ++depends=(kernel-source gcc make) ++archs=(i686) ++install=drbd.install ++up2date="lynx -dump -nolist http://oss.linbit.com/drbd/|grep drbd-8.0|grep tar.gz|head -1|sed -e 's/^.*drbd-\(.*\)\.tar\.gz.*$/\1/'" ++source=(http://oss.linbit.com/drbd/8.0/$pkgorig-$pkgver.tar.gz) ++sha1sums=(6c19883b19813ee0a3d02a07d89e6ba21517edb9) ++ ++ ++build() { ++ Fcd $pkgorig-$pkgver ++ mkdir -p $startdir/pkg/usr/src/$pkgname ++ cp -aR drbd $startdir/pkg/usr/src/$pkgname ++ cp -aR scripts $startdir/pkg/usr/src/$pkgname ++} ++ ++# vim: ft=sh +diff --git a/source/custom/drbd-module/drbd.install b/source/custom/drbd-module/drbd.install +new file mode 100644 +index 0000000..3bb4f68 +--- /dev/null ++++ b/source/custom/drbd-module/drbd.install +@@ -0,0 +1,43 @@ ++# This is a default template for a post-install scriptlet. You can ++# remove any functions you don't need (and this header). ++ ++# arg 1: the new package version ++pre_install() { ++ /bin/true ++} ++ ++# arg 1: the new package version ++post_install() { ++ post_upgrade $1 ++} ++ ++# arg 1: the new package version ++# arg 2: the old package version ++pre_upgrade() { ++ /bin/true ++} ++ ++# arg 1: the new package version ++# arg 2: the old package version ++post_upgrade() { ++ cd /usr/src/drbd-module/drbd ++ make clean ++ make KDIR=/usr/src/linux-`uname -r` all || /bin/false ++ make install || /bin/false ++ /bin/true ++} ++ ++# arg 1: the old package version ++pre_remove() { ++ /bin/true ++} ++ ++# arg 1: the old package version ++post_remove() { ++ /bin/true ++} ++ ++op=$1 ++shift ++$op $* ++ +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 drbd-tools.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/drbd-tools.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,46 @@ +From 1fe8d9875967ec89f54382eec6a1a2b8a317eab9 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 21 Oct 2007 21:43:36 +0200 +Subject: [PATCH] drbd-tools-8.0.6-1-i686 + * added + +--- + source/custom/drbd-tools/FrugalBuild | 26 ++++++++++++++++++++++++++ + 1 files changed, 26 insertions(+), 0 deletions(-) + create mode 100644 source/custom/drbd-tools/FrugalBuild + +diff --git a/source/custom/drbd-tools/FrugalBuild b/source/custom/drbd-tools/FrugalBuild +new file mode 100644 +index 0000000..6b0dff4 +--- /dev/null ++++ b/source/custom/drbd-tools/FrugalBuild +@@ -0,0 +1,26 @@ ++# Maintainer: Tomas Zeman ++ ++pkgorig=drbd ++pkgname=$pkgorig-tools ++pkgver=8.0.6 ++pkgrel=1 ++pkgdesc="block device mirroring a whole block device via network; network raid-1 implementation" ++url="http://www.drbd.org" ++license="GPL" ++archs=(i686) ++depends=(glibc) ++makedepends=(gcc bison flex m4) ++backup=(etc/drbd.conf) ++up2date="lynx -dump -nolist http://oss.linbit.com/drbd/|grep drbd-8.0|grep tar.gz|head -1|sed -e 's/^.*drbd-\(.*\)\.tar\.gz.*$/\1/'" ++source=(http://oss.linbit.com/drbd/8.0/$pkgorig-$pkgver.tar.gz) ++sha1sums=('6c19883b19813ee0a3d02a07d89e6ba21517edb9') ++ ++ ++build() { ++ Fcd $pkgorig-$pkgver ++ make clean tools || Fdie ++ make install-tools PREFIX=$startdir/pkg INITD=$startdir/pkg/etc/rc.d/ || Fdie ++ Fmv etc/rc.d/drbd etc/rc.d/rc.drbd ++} ++ ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 embutils.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/embutils.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,40 @@ +From 8276d6d428b5926c0dae86915c5cf841b32b7548 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sat, 3 Nov 2007 23:55:40 +0100 +Subject: [PATCH] embutils-0.19-1-i686: + * added + +--- + source/dietlibc/embutils/FrugalBuild | 20 ++++++++++++++++++++ + 1 files changed, 20 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/embutils/FrugalBuild + +diff --git a/source/dietlibc/embutils/FrugalBuild b/source/dietlibc/embutils/FrugalBuild +new file mode 100644 +index 0000000..cea4126 +--- /dev/null ++++ b/source/dietlibc/embutils/FrugalBuild +@@ -0,0 +1,20 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=embutils ++pkgver=0.19 ++pkgrel=1 ++pkgdesc="small system utilities for embedded systems" ++url="http://www.fefe.de/embutils/" ++makedepends=(dietlibc) ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep Version|head -1|sed -e "s/.*Version \([0-9\.]\+\).*$/\1/"' ++source=(http://dl.fefe.de/$pkgname-$pkgver.tar.bz2) ++sha1sums=('9781090f7570b6b471e0dc576efcbe31e1807794') ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd ++ make || Fdie ++ Fmkdir $DDIR/bin ++ make install prefix=$Fdestdir/$DDIR || Fdie ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 execline.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/execline.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,56 @@ +From 7b8c6e6f766894f9b4500a3ca25dcaa8b51ae0a8 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 4 Nov 2007 00:24:21 +0100 +Subject: [PATCH] execline-1.07-1-i686: + * added + +--- + source/dietlibc/execline/FrugalBuild | 36 ++++++++++++++++++++++++++++++++++ + 1 files changed, 36 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/execline/FrugalBuild + +diff --git a/source/dietlibc/execline/FrugalBuild b/source/dietlibc/execline/FrugalBuild +new file mode 100644 +index 0000000..ea37b63 +--- /dev/null ++++ b/source/dietlibc/execline/FrugalBuild +@@ -0,0 +1,36 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=execline ++pkgver=1.07 ++pkgrel=1 ++pkgdesc="scripting language" ++url="http://www.skarnet.org/software/execline/" ++makedepends=(dietlibc 'skalibs>=0.46') ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgname|grep tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('339761a2a018ec2e3821cb863cf1e7d7919038ac') ++ ++build() { ++ Fmkdir package/admin ++ mv $Fsrcdir/admin/$pkgname-$pkgver $Fdestdir/package/admin || Fdie ++ cd $Fdestdir/package/admin || Fdie ++ ln -sf $pkgname-$pkgver $pkgname || Fdie ++ cd $Fdestdir/package/admin/$pkgname-$pkgver || Fdie ++ ++ echo "diet gcc -nostdinc $CFLAGS" > conf-compile/conf-cc ++ echo "diet gcc -s -static" > conf-compile/conf-ld ++ echo "" > conf-compile/conf-stripbins ++ echo "" > conf-compile/conf-striplibs ++ ++ package/compile || Fdie ++ ++ Fmkdir command ++ for i in `cat package/command.exported`; do ++ ln -sf /package/admin/$pkgname/command/$i $Fdestdir/command/$i ++ done ++ ++ package/run || Fdie ++ chown -R root.root $Fdestdir/package/ || Fdie ++ rm -rf compile ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 fgetty.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fgetty.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,39 @@ +From fec5f43160d215f171f2c461967e0fa7afc59fd2 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 4 Nov 2007 12:04:50 +0100 +Subject: [PATCH] fgetty-0.6-1-i686: + * added + +--- + source/dietlibc/fgetty/FrugalBuild | 19 +++++++++++++++++++ + 1 files changed, 19 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/fgetty/FrugalBuild + +diff --git a/source/dietlibc/fgetty/FrugalBuild b/source/dietlibc/fgetty/FrugalBuild +new file mode 100644 +index 0000000..13a5cda +--- /dev/null ++++ b/source/dietlibc/fgetty/FrugalBuild +@@ -0,0 +1,19 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=fgetty ++pkgver=0.6 ++pkgrel=1 ++pkgdesc="a very small getty for Linux" ++url="http://www.fefe.de/fgetty/" ++makedepends=(dietlibc) ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgname|grep tar.bz2|head -1|sed -e "s/.*$pkgname-\([0-9\.]\+\)\.tar\.bz2.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.bz2) ++sha1sums=('fc1ee8bd1b85c4f44c8d494aadd49476244bdb39') ++ ++build() { ++ Fcd ++ make || Fdie ++ Fmkdir /usr/man/man8 ++ make install DESTDIR=$Fdestdir || Fdie ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 gitignore.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gitignore.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,22 @@ +From 9d4dac5327cd6cb2553c2379b36e141c93fd9cfd Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 25 Sep 2007 22:50:58 +0200 +Subject: [PATCH] .gitignore: ignore vim swap+backup files + +--- + .gitignore | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 8fec23a..ecc256f 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -23,3 +23,5 @@ pkg + src + frugalware-i686 + frugalware-x86_64 ++*~ ++.*.swp +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 ipsvd.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ipsvd.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,56 @@ +From 452e7c11ea7a78848ce58e46c76be2e6b9e06216 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 27 Nov 2007 11:07:02 +0100 +Subject: [PATCH] ipsvd-0.13.0-1-i686.fpm: + *added + +--- + source/dietlibc/ipsvd/FrugalBuild | 36 ++++++++++++++++++++++++++++++++++++ + 1 files changed, 36 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/ipsvd/FrugalBuild + +diff --git a/source/dietlibc/ipsvd/FrugalBuild b/source/dietlibc/ipsvd/FrugalBuild +new file mode 100644 +index 0000000..09a6db9 +--- /dev/null ++++ b/source/dietlibc/ipsvd/FrugalBuild +@@ -0,0 +1,36 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=ipsvd ++pkgver=0.13.0 ++pkgrel=1 ++pkgdesc="internet protocol service daemons" ++url="http://smarden.org/$pkgname/" ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgname|grep tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++makedepends=(dietlibc) ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('d8a602ba32c0af35091cd90ebe17709c7ea9ea7f') ++ ++build() { ++ mkdir -p $Fdestdir/package/net ++ ++ mv $Fsrcdir/net/$pkgname-$pkgver $Fdestdir/package/net ++ cd $Fdestdir/package/net/$pkgname-$pkgver ++ ++ echo "diet gcc $CFLAGS" > src/conf-cc ++ echo "diet gcc -s -static" > src/conf-ld ++ package/compile || Fdie ++ ++ rm -rf compile ++ chown -R root.root $Fdestdir/package/ ++ ++ cd $Fdestdir/package/net/ && ln -s $pkgname-$pkgver $pkgname || Fdie ++ ++ Fmkdir /usr/share/man/man8 /usr/share/man/man5 /usr/share/man/man7 ++ cd $pkgname || Fdie ++ for i in 5 7 8; do cp man/*.$i $Fdestdir/usr/share/man/man$i; done || Fdie ++ ++ Fmkdir /command && cd $Fdestdir/command ++ for i in `ls $Fdestdir/package/net/$pkgname/command`; do ln -sf /package/net/$pkgname/command/$i $i; done ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 libowfat.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libowfat.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,40 @@ +From 0e67eeb8cafaef06736a7aa298dee574c0bfb444 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 4 Nov 2007 11:57:31 +0100 +Subject: [PATCH] libowfat-0.26-1-i686 + * added + +--- + source/dietlibc/libowfat/FrugalBuild | 20 ++++++++++++++++++++ + 1 files changed, 20 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/libowfat/FrugalBuild + +diff --git a/source/dietlibc/libowfat/FrugalBuild b/source/dietlibc/libowfat/FrugalBuild +new file mode 100644 +index 0000000..7a79cec +--- /dev/null ++++ b/source/dietlibc/libowfat/FrugalBuild +@@ -0,0 +1,20 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=libowfat ++pkgver=0.26 ++pkgrel=1 ++pkgdesc="reimplement libdjb under GPL" ++depends=(dietlibc) ++url="http://www.fefe.de/libowfat/" ++license=GPL ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep Version|head -1|sed -e "s/.*Version \([0-9\.]\+\).*$/\1/"' ++source=(http://dl.fefe.de/$pkgname-$pkgver.tar.bz2) ++sha1sums=('5dca6d7eb70a0e65d827dc7bf583df62bf752ec2') ++ ++build() { ++ DDIR=/usr/lib/diet ++ Fcd ++ make prefix=$DDIR || Fdie ++ make install prefix=$Fdestdir/$DDIR LIBDIR=$Fdestdir/$DDIR/lib ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 mailfront.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mailfront.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,47 @@ +From 6ed9cc4ad38dc55a6a4b19cfd029c961136f8234 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 28 Oct 2007 23:31:21 +0100 +Subject: [PATCH] mailfront-1.11-1 + * added + +--- + source/custom/mailfront/FrugalBuild | 27 +++++++++++++++++++++++++++ + 1 files changed, 27 insertions(+), 0 deletions(-) + create mode 100644 source/custom/mailfront/FrugalBuild + +diff --git a/source/custom/mailfront/FrugalBuild b/source/custom/mailfront/FrugalBuild +new file mode 100644 +index 0000000..c57644a +--- /dev/null ++++ b/source/custom/mailfront/FrugalBuild +@@ -0,0 +1,27 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=mailfront ++pkgver=1.11 ++pkgrel=1 ++pkgdesc="Mail server network protocol front-ends" ++depends=('bglibs>=1.101' 'cvm>=0.81') ++url="http://untroubled.org/$pkgname/" ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgname|grep .tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('2f102870f754291e431cfe343488cd0465352131') ++ ++build() { ++ Fcd $pkgname-$pkgver ++ echo "/usr/include/bglibs" > conf-bgincs ++ echo "/usr/lib" > conf-bglibs ++ echo "/usr/bin" > conf-bin ++ echo "/usr/include" > conf-include ++ echo "/usr/lib/$pkgname" > conf-modules ++ echo "gcc -s -L/usr/lib" > conf-ld ++ echo "gcc -W -Wall -Wshadow -O -g -fPIC -shared -L/usr/lib" > conf-ccso ++ ++ make || Fdie ++ make install_prefix=$Fdestdir install ++} ++# vim: ft=sh +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 minit.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/minit.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,177 @@ +From 79715802ed5a69fed419b9042407b73231424734 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 4 Nov 2007 12:50:46 +0100 +Subject: [PATCH] minit-0.10-2-i686: + * added + +--- + source/dietlibc/minit/FrugalBuild | 31 +++++++++++++++++++ + source/dietlibc/minit/minit-scripts-other.tar.gz | Bin 0 -> 3770 bytes + source/dietlibc/minit/minit.install | 36 ++++++++++++++++++++++ + 3 files changed, 67 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/minit/FrugalBuild + create mode 100644 source/dietlibc/minit/minit-scripts-other.tar.gz + create mode 100644 source/dietlibc/minit/minit.install + +diff --git a/source/dietlibc/minit/FrugalBuild b/source/dietlibc/minit/FrugalBuild +new file mode 100644 +index 0000000..a733f3c +--- /dev/null ++++ b/source/dietlibc/minit/FrugalBuild +@@ -0,0 +1,31 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=minit ++pkgver=0.10 ++pkgrel=2 ++pkgdesc="a small yet feature-complete init" ++url="http://www.fefe.de/minit/" ++makedepends=(dietlibc) ++archs=(i686) ++up2date='lynx -dump -nolist $url|grep $pkgname|grep tar.bz2|head -1|sed -e "s/.*$pkgname-\([0-9\.]\+\)\.tar\.bz2.*$/\1/"' ++source=(http://dl.fefe.de/$pkgname-$pkgver.tar.bz2 \ ++ http://icculus.org/~boris/data/$pkgname-scripts.tar.bz2 \ ++ minit-scripts-other.tar.gz) ++sha1sums=('f4ca32bafb3e9567bbc21f13f2f06fe009fe64db' \ ++ '32bce667773a26008d5de0e08cb8060f6065e735' \ ++ '1d8c5e4f7b07a08f51df3ead29d8d05d1b65b395') ++install=$pkgname.install ++ ++build() { ++ Fcd ++ make || Fdie ++ make install-files DESTDIR=$Fdestdir || Fdie ++ install -m 700 killall5 $Fdestdir/sbin/killall5.minit || Fdie ++ Fmkdir /usr/share/$pkgname ++ mv $Fsrcdir/$pkgname-scripts $Fdestdir/usr/share/$pkgname || Fdie ++ mv $Fsrcdir/$pkgname-scripts-other $Fdestdir/usr/share/$pkgname || Fdie ++ mv $Fsrcdir/$pkgname-$pkgver/contrib $Fdestdir/usr/share/$pkgname || Fdie ++ Fmv /sbin/shutdown /sbin/shutdown.minit ++ chmod 700 $Fdestdir/sbin/shutdown.minit || Fdie ++ Frm /sbin/init ++} +diff --git a/source/dietlibc/minit/minit-scripts-other.tar.gz b/source/dietlibc/minit/minit-scripts-other.tar.gz +new file mode 100644 +index 0000000000000000000000000000000000000000..b38450a05c71fc586aa12f9711ab33087856a99b +GIT binary patch +literal 3770 +zcmY+HdpuP6|Hm1ZA?zp?+is3(qm|Z_ij-~Iv4t7CLBV|R1 +zyN1^AuJ+LG*VAPVWXuZPanqWi1^Fx!tJk41YnHjP9o#IL-(AVm_P_1wCx0ipSM)<$ +z-j5y0P5!S8#Y2_J2iGseerkF!==CU|_u=)W`%BuM)@A>idORwk`r>eH<@0w=cvgvk=F7v2OF%9SbS>S($sdUUM3wi6`N3wUSvV(CNy`wPXEra +zdi@)(aqV{!ZhxKiaa+1L&U)*wfpL=hr?i1(Z902gDnDukHVRQ>S71d8@m{_MU^ +zc4GC~jjeczD$lm*7b?C-`!dW$0hTYC*>d8oY7t~C(AiCqLY+|eFA)~^_!KtAJxHH= +z?-UetJ7>zXHn-37S@yL9MJI!Q#3w6zlWn-4HGH&)S{fXyb@TeQj)c6** +zy{xItexY>9puEO{;fWmltbo0Bi5q7!@7K1)+xqK8>n_+v9Xr+7Gu-c8V%r|Kd&q5W +zaoIkgjlv!oTg-%KkTCZ;RIY_R6v!=Jf%StVS$lW%3RLX^s|TFthBa(+3fU%4bS~9GV@!Xd;98bGz?Xdr)(wTQ=GzZeOu(XR%7K={xL;iby^|4 +zLrm6xEfB9R{d?-r2UzW{BCOfKEOSLUwmK`i@#9y)_pO-1?;3XF+GcefcOSDyIA3cG +zgY9(5SxWFl#x0u4Ih*wS44FX9G${Z+#ZA!`N^yA?$S5p+^+kkf=ilp`ol{$!7O|1+ +zx0rVKw7;AztZ$cRkxM&0WaI;2m!Q}Kj?qd?!wf|&1dCkcVJWfy#uHdEvzote+4VPy +zk(n2h#`Kw2#$y$w!SFsnyYM3zlMZDtW8+w$P+tSF|x(V1eRgLl%f$J9C$%uwZhrMDgBuCs+;RLSs-U@S_24e@pjnJNz^kl29W)7Z +z)tksLZ96L8SB5%C_xtwX)5t!<-`$z^yGgf3T)fcXlc5jfdVvPBY7L +zCN`X(GhZry@DMv1;-c-H|2F2PkgOM5J<3{a@aAaJjo>L?-WwEAP&yw8)?9~bDIT=D +z8+!vuh;ppNQw*C4t(*PA`;qlTYC-KUpxH{e3b4ke=XCQinZk>Ig{PD66O}rvD>Suy3!x1!S+yd{x>IsJXmAz#@idZ88#*Dfz8Pje; +zh3hKK!eLO_mF|bt-?fp+_rXoFVIslBLfh%19Nz%y18c2=w4h^(+m=QKsGQWPEcLN?2*2n(mF$vnpE8r&vM$>}|9YBX#NA$)rYvEHiLa>CT}~hjf`94>Z7u$ +zr^)%^Awi`RFk>N)2W|7xQ@T{!2TrsbXU6oSC1Tg}7_ +zbr;0AQQWIqftSH|hQTaYUPfb9YPzH>>I?_Y+!8p^56xTdR*m(3>#aE#)TGGPER^BP +zB@nhT7cjlZOTJ2u$ugDW^4UX5;vwr)ql_2=11(3`lMShhtEC3qwrp +zt&{1?)TjMM$*o!hTKro`+-q2RLz%!c6UU48(aaIh<|h$3!32(MBQdQOVCUEuXYe}|I$5wsXg2#nM) +zst2ceyJ*L9DY3h=2Xlh%>0ie2Y>3s6lKU(6L+O~nlhKV^Wl*tw5Jd$zGWx)Z?HM^Z +zB&gTvgNE1!`MdU@GqD~=PFtq@; +z++RjEccliW3Fhmz!4}(2H8@)XVY2VQ|L2^JGmW390qq-Y>MH!pIh*UUx`1@gRm5kN +zizQk)JtL3kkk;&w3evsmp;0L~d`U&P@%|(@CD_so>VgMKQK>u0m8WXhwf#}^`l}ti +zM9=;wwo-dHUcte^>r;M{?oKM5iZa%DseJU_WWiZ~n57^d?1=e`*6Or_m)FP+!>fSz +z;qGcwzJw5w{P572)$Xu7i0JmGxwk?8h7fELf*Zlgse<$z#f#CNsf3HDzYt-%Q8YJd +zS3rASlX<%x@yeBLl<|a!;zUmpALN*R1I+6>h8)$fII$mvANEDf(u96OqpXTd?X!0@ +zzYfp3xqg=vnBKm<(FPjUhUv8G8iPFsR}{nygEtct5kbXWxf56wHbd&TToqPH*?M3(vAZ<@gy^0lgpX+kbr_#FySAT638 +z5@+dE;1s&2ewNm#{{oODDG3jB4ZTq3zm=_VS7d8GKFu1DW +z7Q4CKI>#4h1gFulO~eDMSB*p%Fb#FbSuScelqtA+hTT{(vTw~&5{{;XAd>Z(j3uI# +zTszh{X;DvTmtR(jhM!VP`MfVOSNPKcEPd&2ZAd8ew1H5*8fWlJBvmxmi +zGBD(!Lv0quFk1}C#z8~ef738SCD%0vdjw;tGA!`{IP3(S*nq=PWeaMn)7Y9BdEg8; +zLyt;mt`JNb;&BVsti!8U#f4uy*A6wvzV=}H7S6m0MS>7+^*Dox(1=|{Xlzw5aY*!ylEk&bLN@X! +zeM8nu1@GGNAV13%@_X%mLXD23*TCE|2(J)KPh8@a5Kd!w-vD_{d0{;v^dB +zZI0O$TZ-cPe5QpQkZB$MEkK%fHs9{#7C*g&yMJ;}ctHFy`hGfFSYm|tK8wt{T~~2? +zzI(|`mqXWz^+Ssiqc$(U@Xf>_peDp|M4aHE1gA%f4ML0D@a*&ME;~*;%qhp|XX%Ny +z1#6~%T(&0jko)wHna9cqTCN&>Y)&b9#EH8n<5X!Y2hCNNleazl3hz5Ef2=b3d0XN3 +zVn@!$4;`EZvaR*e3ml5YFP9!@G%4RK_(Ps~ntN?B=I_fRq)1$#XrY@RaPyanqFF(; +z_cr5(A^8Wh(11hTnr9nTA?S+D{-Vf_iy-+oW&hGa;dZ<7ZQ-T4q2}h=wCLdEVpv%B +z;-GR3dSW|%NwRNpTR~q)Uy4wKF5@6)?hQG?(Z_q%FUxwbd(8)LzVb@JuzoF`%~gpSHY~m)c(~-Iz#uIa*D+W +zQB0$;!{S{VNluL3r0g%f +zRkCWrXnVa}Mf=mRKsfFNpK{Rxvx^f7fe%dlaWcM7Lme@R=Kgd9C7Z6=j$0Vk!Gr=j +z5LPy4Cm5-(v!yh)6nq_F?$uXQEX@qKx-46c{{)^h!)%XGj?cI*8GB_1eIT=#-l2#a +zgu2NteBND%`1hCKZsn(U<;ooCQ(JTXm!h~ZO}?v@v7R>Le~+#e)u6f4L9brpvZluW +E0U0|+-v9sr + +literal 0 +HcmV?d00001 + +diff --git a/source/dietlibc/minit/minit.install b/source/dietlibc/minit/minit.install +new file mode 100644 +index 0000000..0330a23 +--- /dev/null ++++ b/source/dietlibc/minit/minit.install +@@ -0,0 +1,36 @@ ++# arg 1: the new package version ++post_install() { ++ post_upgrade ++} ++ ++# arg 1: the new package version ++# arg 2: the old package version ++post_upgrade() { ++ if [ ! -L /sbin/shutdown -a ! -e /sbin/shutdown.sysv ]; then ++ mv /sbin/shutdown /sbin/shutdown.sysv ++ ln -sf /sbin/shutdown.minit /sbin/shutdown ++ fi ++ for i in in out; do ++ if [ ! -p /etc/minit/$i ]; then ++ rm -f /etc/minit/$i ++ mkfifo -m 600 /etc/minit/$i ++ fi ++ done ++ /bin/true ++} ++ ++# arg 1: the old package version ++pre_remove() { ++ if [ -L /sbin/shutdown -a -e /sbin/shutdown.sysv ]; then ++ rm /sbin/shutdown && mv /sbin/shutdown.sysv /sbin/shutdown ++ fi ++} ++ ++# arg 1: the old package version ++post_remove() { ++ /bin/true ++} ++ ++op=$1 ++shift ++$op $* +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 omail-admin-htaccess.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omail-admin-htaccess.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,23 @@ +From 980cbaca550c893c9afb8142df03281ae70c3533 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 21 Dec 2007 22:51:07 +0100 +Subject: [PATCH] omail-admin: add .htaccess + +--- + source/custom/omail-admin/.htaccess | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + create mode 100644 source/custom/omail-admin/.htaccess + +diff --git a/source/custom/omail-admin/.htaccess b/source/custom/omail-admin/.htaccess +new file mode 100644 +index 0000000..978961b +--- /dev/null ++++ b/source/custom/omail-admin/.htaccess +@@ -0,0 +1,4 @@ ++php_value session.bug_compat_42 1 ++php_value session.bug_compat_warn 0 ++php_value session.use_cookies 0 ++php_value register_globals 1 +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 omail-admin.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omail-admin.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,49 @@ +From 8ca5ccf45da1875cc595a3adec0a841fa5063828 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 21 Dec 2007 10:49:47 +0100 +Subject: [PATCH] omail-admin-1.2rc1-1-i686.fpm: + *added + +--- + source/custom/omail-admin/FrugalBuild | 29 +++++++++++++++++++++++++++++ + 1 files changed, 29 insertions(+), 0 deletions(-) + create mode 100644 source/custom/omail-admin/FrugalBuild + +diff --git a/source/custom/omail-admin/FrugalBuild b/source/custom/omail-admin/FrugalBuild +new file mode 100644 +index 0000000..5f08d43 +--- /dev/null ++++ b/source/custom/omail-admin/FrugalBuild +@@ -0,0 +1,29 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=omail-admin ++pkgver=1.2rc1 ++pkgrel=1 ++pkgdesc="PHP4 based qmail+vmailmgrd Web interface" ++_F_sourceforge_dirname="omail" ++Finclude sourceforge ++backup=(etc/$pkgname/config.php etc/$pkgname/vmailmgrquotas) ++url="http://omail.omnis.ch/omail-admin/" ++purl="http://sourceforge.net/project/showfiles.php?group_id=3658" ++depends=('php' 'libmysqlclient' 'qmail-autoresponder') ++archs=('i686') ++up2date="lynx -nolist -dump '$purl'|grep -i '$pkgname'|grep .tar.gz|head -1|sed 's/.*$pkgname-\(.*\).tar.gz .*/\1/'" ++sha1sums=('7f652ba56f6b4064efbbae57204f5d661fbe937a') ++ ++build() { ++ www='/var/www' ++ Fmkdir $www/$pkgname /etc/$pkgname/vmailmgrd-tcp-hosts /usr/sbin /var/vmailstats ++ Fcd ++ find . -name 'CVS' |xargs rm -fr || Fdie ++ mv *.php *.inc images templates $Fdestdir$www/$pkgname || Fdie ++ cp scripts/README* . || Fdie ++ cp scripts/vmailstats.pl $Fdestdir/usr/sbin/vmailstats || Fdie ++ chmod 755 $Fdestdir/usr/sbin/vmailstats || Fdie ++ Fmv $www/$pkgname/config.php /etc/$pkgname/ ++ Fsed '^$vmailmgrquota_file .*' "\$vmailmgrquota_file = '/etc/$pkgname/vmailmgrquotas';" $Fdestdir/etc/$pkgname/config.php ++ Fln /etc/$pkgname/config.php $www/$pkgname/config.php ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 ospam-fix.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ospam-fix.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,117 @@ +From 291afcd40d85547bb2c34219c57742fcfcc7552b Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 16 Dec 2007 11:55:13 +0100 +Subject: [PATCH] ospam-0.01-1-i686.fpm: + *added missing spamclam to repo + +--- + source/custom/ospam/spamclam | 97 ++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 97 insertions(+), 0 deletions(-) + create mode 100755 source/custom/ospam/spamclam + +diff --git a/source/custom/ospam/spamclam b/source/custom/ospam/spamclam +new file mode 100755 +index 0000000..dae445b +--- /dev/null ++++ b/source/custom/ospam/spamclam +@@ -0,0 +1,97 @@ ++#!/bin/sh ++ ++[ -f /etc/ospam/spamclam ] && . /etc/ospam/spamclam ++ ++# CONFIG ++SPAMC=${SPAMC:-/usr/bin/spamc} ++CLAMDSCAN=${CLAMDSCAN:-/usr/bin/clamdscan} ++FORWARDBIN=${FORWARDBIN:-/var/qmail/bin/forward} ++M822FIELD=${M822FIELD:-/usr/bin/822field} ++FILEPIPE=${FILEPIPE:-/command/seekablepipe} #/usr/bin/filepipe ++VDELIVER=${VDELIVER:-/usr/bin/vdeliver} ++TMP=${TMP:-.} ++ ++[ -x $SPAMC -a -x $CLAMDSCAN -a -x $FORWARDBIN -a -x $M822FIELD ] || { ++ echo -e "$0: Required programs do not exist" ++ cat | $FILEPIPE $VDELIVER ++ exit 0 ++} ++ ++ADDR_QUARANTINE="$1" ++DELIVER_VIRUS="$2" ++ADDR_SPAM="$3" ++DELIVER_SPAM="$4" ++MAILUSER="$5" ++ ++if [ -z "$ADDR_QUARANTINE" -o -z "$ADDR_SPAM" -o -z "$DELIVER_VIRUS" -o -z "$DELIVER_SPAM" ]; then ++ echo -e "Usage: $0 quarantine_address deliver_virus_to_recipient(0/1) spam_address deliver_spam_to_recipient(0/1) [mailuser address]" ++ echo -e "address may be: _ignore_ -> checking of that feature is ignored" ++ echo -e " _noaddr_ -> if infected, do not forward" ++ cat ++ exit 0 ++fi ++ ++MAILFILE="$TMP/mail.tmp.$$" ++ ++cat >$MAILFILE ++ ++VIRUS=0 ++SPAM=0 ++STATUS=0 ++ ++spam_flags="" ++ ++if [ "$ADDR_QUARANTINE" != "_ignore_" ]; then ++ virus=`$CLAMDSCAN --disable-summary --stdout $MAILFILE | grep FOUND` ++ if [ ! "$virus" = "" ]; then ++ VIRUS=1 ++ cat $MAILFILE | sed -e 's/^Subject:/Subject: [virus]/' > $MAILFILE.1 ++ fi ++fi ++ ++if [ $VIRUS -eq 0 -a "$ADDR_SPAM" != "_ignore_" ]; then ++ if [ ! -z $MAILUSER ]; then ++ spam_flags="-u $MAILUSER" ++ fi ++ $SPAMC $spam_flags < $MAILFILE > $MAILFILE.1 ++ isspam=`$M822FIELD X-Spam-Flag < $MAILFILE.1 | grep YES | wc -l` ++ if [ $isspam -ne 0 ]; then ++ SPAM=1 ++ fi ++fi ++ ++ ++if [ $VIRUS -eq 1 ]; then ++ STATUS=99 ++ if [ $DELIVER_VIRUS -eq 1 ]; then ++ cat $MAILFILE.1 | $FILEPIPE $VDELIVER ++ fi ++ if [ "$ADDR_QUARANTINE" != "_noaddr_" ]; then ++ $FORWARDBIN $ADDR_QUARANTINE < $MAILFILE.1 ++ if [ $? -ne 0 ]; then ++ STATUS=111 ++ fi ++ fi ++else ++if [ $SPAM -eq 1 ]; then ++ STATUS=99 ++ if [ $DELIVER_SPAM -eq 1 ]; then ++ cat $MAILFILE.1 | $FILEPIPE $VDELIVER ++ fi ++ if [ "$ADDR_SPAM" != "_noaddr_" ]; then ++ $FORWARDBIN $ADDR_SPAM < $MAILFILE.1 ++ if [ $? -ne 0 ]; then ++ STATUS=111 ++ fi ++ fi ++fi ++fi ++ ++if [ $VIRUS -eq 0 -a $SPAM -eq 0 ]; then ++ cat $MAILFILE | $FILEPIPE $VDELIVER ++fi ++ ++rm -f $MAILFILE $MAILFILE.1 ++ ++exit $STATUS ++ +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 ospam.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ospam.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,135 @@ +From aad149d8eae95620d3ed9a2bd0cd81c8a01ce79d Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 16 Dec 2007 00:18:44 +0100 +Subject: [PATCH] ospam-0.01-1-i686: + *added + +--- + source/custom/ospam/FrugalBuild | 25 ++++++++++++ + source/custom/ospam/ospam.patch | 82 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 107 insertions(+), 0 deletions(-) + create mode 100644 source/custom/ospam/FrugalBuild + create mode 100644 source/custom/ospam/ospam.patch + +diff --git a/source/custom/ospam/FrugalBuild b/source/custom/ospam/FrugalBuild +new file mode 100644 +index 0000000..d1191b7 +--- /dev/null ++++ b/source/custom/ospam/FrugalBuild +@@ -0,0 +1,25 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=ospam ++pkgver=0.01 ++pkgrel=1 ++pkgdesc="" ++url="http://omail.omnis.ch/ospam/" ++archs=(i686) ++up2date="lynx $url?M=D -dump -nolist|grep 'tar.gz'|head -1|sed -e 's/.*$pkgname-\(.*\)\.tar\.gz.*$/\1/'" ++depends=('spamassassin' 'clamav' 'conn-tools' 'qmail' 'perl-dbd-mysql' 'mess822') ++backup=(etc/ospam/ospam-dotqmail etc/ospam/spamclam) ++source=($url/$pkgname-$pkgver.tar.gz spamclam ospam.patch) ++sha1sums=('7a47fbdedddc16d8fe04ca400daee00a962408da' \ ++ 'acd24f2b9daa5f15e2e9360050d9ea0bd96c1dbc' \ ++ '7e8aa8d7d8b9a0ac5e88e5304a0f69d4b267a784') ++ ++build() { ++ Fcd ++ Fpatchall ++ Fmkdir /usr/bin /usr/share/$pkgname /etc/$pkgname ++ Finstall 755 $pkgname-$pkgver/ospam-dotqmail.pl /usr/bin/ospam-dotqmail ++ Finstall 755 spamclam /usr/bin ++ Finstall 644 $pkgname-$pkgver/sql/nospam.sql /usr/share/ospam/dbschema.sql ++} ++# vim: ft=sh +diff --git a/source/custom/ospam/ospam.patch b/source/custom/ospam/ospam.patch +new file mode 100644 +index 0000000..36535a7 +--- /dev/null ++++ b/source/custom/ospam/ospam.patch +@@ -0,0 +1,82 @@ ++diff -u ospam-0.01.orig/ospam-dotqmail.pl ospam-0.01/ospam-dotqmail.pl ++--- ospam-0.01.orig/ospam-dotqmail.pl 2003-05-04 04:21:26.000000000 +0200 +++++ ospam-0.01/ospam-dotqmail.pl 2007-12-16 00:13:19.000000000 +0100 ++@@ -32,50 +32,52 @@ ++ ++ # SETUP: ++ ++-my $debug = 1; +++our $debug = 1; ++ ++ # emails: ++ ++-my $debug_bcc_mail = ''; # keep empty after testing ++-my $admin_mail = ''; # for error notices ++-my $mail_sender = 'oSpam system '; +++our $debug_bcc_mail = ''; # keep empty after testing +++our $admin_mail = ''; # for error notices +++our $mail_sender = 'oSpam system '; ++ ++ # database: ++ ++-my $db_username = "nospam"; ++-my $db_password = "*********"; ++-my $db_hostname = "localhost"; ++-my $db_database = "nospam"; +++our $db_username = "nospam"; +++our $db_password = "*********"; +++our $db_hostname = "localhost"; +++our $db_database = "nospam"; ++ ++-my $tb_userpref = "userpref"; # SA sql table ++-my $tb_dotqmail = "dotqmail"; # ospam data +++our $tb_userpref = "userpref"; # SA sql table +++our $tb_dotqmail = "dotqmail"; # ospam data ++ ++ # file & cmd path: ++ ++-my $cmd_preline = "/var/qmail/bin/preline"; ++-my $cmd_spamc = "/usr/bin/spamc"; ++-my $cmd_vdeliver = "/usr/local/bin/vdeliver"; ++-my $cmd_filepipe = "/usr/local/nospam/filepipe"; ++-my $cmd_ifspamh = "/usr/local/nospam/ifspamh"; ++-my $spamc_options = "-f"; ++-my $cmd_md5sum = "/usr/bin/md5sum"; ++-my $cmd_chown = "/bin/chown"; ++-my $cmd_chmod = "/bin/chmod"; ++-my $cmd_sendmail = "/usr/sbin/sendmail"; ++-my $sendmail_opt = "-oem -oi -t"; +++our $cmd_preline = "/var/qmail/bin/preline"; +++our $cmd_spamc = "/usr/bin/spamc"; +++our $cmd_vdeliver = "/usr/local/bin/vdeliver"; +++our $cmd_filepipe = "/usr/local/nospam/filepipe"; +++our $cmd_ifspamh = "/usr/local/nospam/ifspamh"; +++our $spamc_options = "-f"; +++our $cmd_md5sum = "/usr/bin/md5sum"; +++our $cmd_chown = "/bin/chown"; +++our $cmd_chmod = "/bin/chmod"; +++our $cmd_sendmail = "/usr/sbin/sendmail"; +++our $sendmail_opt = "-oem -oi -t"; ++ ++ # qmail setup: ++ ++-my $cfg_virtualdomains = "/var/qmail/control/virtualdomains"; ++-my $cfg_rcpthosts = "/var/qmail/control/rcpthosts"; ++-my $dot_qmail_prefix = ".qmail-"; +++our $cfg_virtualdomains = "/var/qmail/control/virtualdomains"; +++our $cfg_rcpthosts = "/var/qmail/control/rcpthosts"; +++our $dot_qmail_prefix = ".qmail-"; ++ ++ # internal values ++ ++ my $version = 1; # integer ++ my $internal_version = 1000; # incrementing this number will force re-generation of all .qmail-files ++ +++my $cfg_file = "/etc/ospam/ospam-dotqmail"; ++ +++do $cfg_file if (-f $cfg_file); ++ ++ ################################################# ++ ++Only in ospam-0.01: ospam-dotqmail.pl~ ++Common subdirectories: ospam-0.01.orig/sql and ospam-0.01/sql +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 series --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/series Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,45 @@ +stgit-fix-path.patch +vpnc.patch +gitignore.patch +drbd-module.patch +drbd-tools.patch +vmailmgr.patch +diet-bglibs +diet-cvm +diet-bglibs-fix.patch +diet-daemontools.patch +diet-djbdns.patch +diet-bglibs-fix-path.patch +diet-cvm-fix-path.patch +bglibs.patch +cvm.patch +mailfront.patch +diet-runit.patch +diet-ucspi-tcp.patch +diet-mess822.patch +diet-ucspi-ipc.patch +diet-openssl.patch +diet-ucspi-tcp-fix-provides.patch +diet-ucspi-ssl.patch +diet-qmail.patch +diet-qmail-autoresponder.patch +diet-ucspi-proxy.patch +embutils.patch +skalibs.patch +execline.patch +libowfat.patch +fgetty.patch +minit.patch +socklog.patch +diet-qmailanalog.patch +skaembutils.patch +conn-tools.patch +diet-qmail-fix-qmail.install +ipsvd.patch +bincimap.patch +ospam.patch +ospam-fix.patch +diet-pure-ftpd.patch +vegadns.patch +omail-admin.patch +omail-admin-htaccess.patch diff -r ad6bd3a91cab -r 32f160a66da4 skaembutils.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/skaembutils.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,49 @@ +From 9b0678c0052ccc968ddfbafc50e7cf4544e266ba Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 6 Nov 2007 13:47:20 +0100 +Subject: [PATCH] skaembutils-0.18-1-i686.fpm + * added + +--- + source/dietlibc/skaembutils/FrugalBuild | 29 +++++++++++++++++++++++++++++ + 1 files changed, 29 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/skaembutils/FrugalBuild + +diff --git a/source/dietlibc/skaembutils/FrugalBuild b/source/dietlibc/skaembutils/FrugalBuild +new file mode 100644 +index 0000000..3846171 +--- /dev/null ++++ b/source/dietlibc/skaembutils/FrugalBuild +@@ -0,0 +1,29 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=skaembutils ++pkgver=0.18 ++pkgrel=1 ++pkgdesc="Tiny portable utilities" ++url="http://www.skarnet.org/software/skaembutils/" ++makedepends=(dietlibc 'skalibs>=0.45') ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgname|grep tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('4dcb46630ac458e3135fe68ab0ca61e78d0798e6') ++ ++build() { ++ Fmkdir /package ++ mv host $Fdestdir/package || Fdie ++ cd $Fdestdir/package/host/skarnet.org/$pkgname-$pkgver ++ ++ echo "diet gcc -nostdinc $CFLAGS" > conf-compile/conf-cc ++ echo "diet gcc -s -static" > conf-compile/conf-ld ++ ++ package/install || Fdie ++ chown -R root.root $Fdestdir/package ++ Fmkdir /command ++ for i in command/*; do ++ ln -sf /package/host/skarnet.org/$pkgname/$i $Fdestdir/$i || Fdie ++ done ++ rm -rf compile || Fdie ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 skalibs.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/skalibs.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,45 @@ +From 662bed7bb29a2e5461911a475a80dad151225a72 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 4 Nov 2007 00:10:52 +0100 +Subject: [PATCH] skalibs-0.46-1-i686: + * added + +--- + source/dietlibc/skalibs/FrugalBuild | 25 +++++++++++++++++++++++++ + 1 files changed, 25 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/skalibs/FrugalBuild + +diff --git a/source/dietlibc/skalibs/FrugalBuild b/source/dietlibc/skalibs/FrugalBuild +new file mode 100644 +index 0000000..c55ce00 +--- /dev/null ++++ b/source/dietlibc/skalibs/FrugalBuild +@@ -0,0 +1,25 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=skalibs ++pkgver=0.46 ++pkgrel=1 ++pkgdesc="package centralizing the public-domain C development files" ++url="http://www.skarnet.org/software/skalibs/" ++makedepends=(dietlibc) ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgname|grep tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('57647785f3c0564f1fe67aa4a002eea983f379b2') ++ ++build() { ++ Fmkdir package/prog ++ mv $Fsrcdir/prog/$pkgname-$pkgver $Fdestdir/package/prog ++ cd $Fdestdir/package/prog/$pkgname-$pkgver || Fdie ++ ++ echo "diet gcc -nostdinc $CFLAGS" > conf-compile/conf-cc ++ echo "diet gcc -s -static" > conf-compile/conf-ld ++ ++ package/install || Fdie ++ chown -R root.root $Fdestdir/package/ ++ rm -rf compile ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 socklog.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/socklog.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,52 @@ +From 6467bcea4931f562877726bf42a1dbf948cc1660 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 6 Nov 2007 10:47:06 +0100 +Subject: [PATCH] socklog-2.1.0-1-i686 + * added + +--- + source/dietlibc/socklog/FrugalBuild | 32 ++++++++++++++++++++++++++++++++ + 1 files changed, 32 insertions(+), 0 deletions(-) + create mode 100644 source/dietlibc/socklog/FrugalBuild + +diff --git a/source/dietlibc/socklog/FrugalBuild b/source/dietlibc/socklog/FrugalBuild +new file mode 100644 +index 0000000..1f9a58b +--- /dev/null ++++ b/source/dietlibc/socklog/FrugalBuild +@@ -0,0 +1,32 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=socklog ++pkgver=2.1.0 ++pkgrel=1 ++pkgdesc="System and kernel logging services" ++url="http://smarden.org/socklog/" ++archs=(i686) ++up2date='lynx -dump -nolist $url/install.html|grep $pkgname|grep tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++makedepends=(dietlibc) ++source=($url/$pkgname-$pkgver.tar.gz) ++sha1sums=('27a117eae00105f491e6ef301206f7b92d7438ce') ++ ++build() { ++ Fmkdir /package ++ mv admin $Fdestdir/package || Fdie ++ cd $Fdestdir/package/admin/$pkgname-$pkgver || Fdie ++ ++ echo "diet gcc -nostdinc $CFLAGS" > src/conf-cc ++ echo "diet gcc -s -static" > src/conf-ld ++ ++ package/compile || Fdie ++ package/check || Fdie ++ chown -R root.root $Fdestdir/package ++ Fmkdir /command ++ for i in command/*; do ++ ln -sf /package/admin/$pkgname/$i $Fdestdir/$i || Fdie ++ done ++ rm -rf compile || Fdie ++ cd $Fdestdir/package/admin || Fdie ++ ln -sf $pkgname-$pkgver $pkgname || Fdie ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 stgit-fix-path.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stgit-fix-path.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,19 @@ +From f5f95f1d1cb108b2cea7fa80abc0aa69c1605353 Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 25 Sep 2007 22:47:43 +0200 +Subject: [PATCH] stgit: fix deliverables (proper path) + +diff --git a/source/devel-extra/stgit/FrugalBuild b/source/devel-extra/stgit/FrugalBuild +index c37eeae..65e4df9 100644 +--- a/source/devel-extra/stgit/FrugalBuild ++++ b/source/devel-extra/stgit/FrugalBuild +@@ -12,3 +12,9 @@ archs=('i686' 'x86_64') + up2date="lynx -dump $url|Flasttar" + source=(http://homepage.ntlworld.com/cmarinas/stgit/stgit-$pkgver.tar.gz) + sha1sums=('c7375590e58fd9a2a59dfe9031cb9667911af2a8') ++ ++build() ++{ ++ Fcd $pkgname-$pkgver ++ python setup.py install --prefix=$Fdestdir/usr ++} diff -r ad6bd3a91cab -r 32f160a66da4 vegadns.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vegadns.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,50 @@ +From 661a66ae76f24e1f618458f1fda29ad442adafbd Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Fri, 21 Dec 2007 00:38:25 +0100 +Subject: [PATCH] vegadns-0.9.10-1-i686: + *added + +--- + source/custom/vegadns/FrugalBuild | 30 ++++++++++++++++++++++++++++++ + 1 files changed, 30 insertions(+), 0 deletions(-) + create mode 100644 source/custom/vegadns/FrugalBuild + +diff --git a/source/custom/vegadns/FrugalBuild b/source/custom/vegadns/FrugalBuild +new file mode 100644 +index 0000000..5574128 +--- /dev/null ++++ b/source/custom/vegadns/FrugalBuild +@@ -0,0 +1,30 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=vegadns ++pkgver=0.9.10 ++pkgrel=1 ++pkgdesc="tinydns administration tool" ++_F_sourceforge_dirname="vegadns" ++_F_sourceforge_ext=".tgz" ++Finclude sourceforge ++backup=(etc/vegadns/config.php) ++url="http://www.vegadns.org/" ++purl="http://sourceforge.net/project/showfiles.php?group_id=136918" ++depends=('php' 'libmysqlclient') ++archs=('i686') ++up2date="lynx -nolist -dump '$purl'|grep -m1 '$pkgname-stable'|sed 's/.*$pkgname-\([0-9.]*\) .*/\1/'" ++sha1sums=('18403649ca84743622defd79f37e5cbc6b21c822') ++ ++build() { ++ www='/var/www' ++ Fmkdir $www/$pkgname /etc/$pkgname /usr/share/$pkgname ++ Fcd ++ mv .htaccess *.php images smarty src templates $Fdestdir$www/$pkgname || Fdie ++ mv update-data.sh $Fdestdir/usr/share/$pkgname/update-data || Fdie ++ Fmkdir /var/$pkgname/{templates_c,configs,cache,sessions} ++ chown -R nobody:nobody $Fdestdir/var/$pkgname || Fdie ++ chmod -R 770 $Fdestdir/var/$pkgname || Fdie ++ Fmv $www/$pkgname/src/config.php /etc/$pkgname/ ++ Fsed '$private_dirs .*' "\$private_dirs = '/var/$pkgname';" $Fdestdir/etc/$pkgname/config.php ++ Fln /etc/$pkgname/config.php $www/$pkgname/src/config.php ++} +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 vmailmgr.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vmailmgr.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,91 @@ +From d53eaf175f4ccfebfc244020445694baedaa1cec Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Sun, 21 Oct 2007 23:00:03 +0200 +Subject: [PATCH] vmailmgr-0.97-1-i686 + * added + +--- + source/custom/vmailmgr/FrugalBuild | 40 +++++++++++++++++++++++++++++++ + source/custom/vmailmgr/vmailmgr.install | 23 +++++++++++++++++ + 2 files changed, 63 insertions(+), 0 deletions(-) + create mode 100644 source/custom/vmailmgr/FrugalBuild + create mode 100644 source/custom/vmailmgr/vmailmgr.install + +diff --git a/source/custom/vmailmgr/FrugalBuild b/source/custom/vmailmgr/FrugalBuild +new file mode 100644 +index 0000000..a13ffa5 +--- /dev/null ++++ b/source/custom/vmailmgr/FrugalBuild +@@ -0,0 +1,40 @@ ++# Maintainer: Tomas Zeman ++ ++pkgname=vmailmgr ++pkgver=0.97 ++pkgrel=1 ++pkgdesc="Virtual e-mail domains/users management programs." ++url="http://www.vmailmgr.org" ++makedepends=('python' 'gcc' 'sed') # it's not required for running it, ++ # plus python pkg requires xfree86. ++archs=(i686) ++up2date='lynx -dump -nolist $url/current|grep $pkgname|grep .tar.gz|head -1|sed -e "s/.*$pkgname-\(.*\)\.tar.gz.*$/\1/"' ++install="$pkgname.install" ++source=($url/current/$pkgname-$pkgver.tar.gz ) ++sha1sums=('0d97c8fd6df79001dd4f3b842a145089333eae8c') ++Finclude python ++ ++build() { ++ echo $_F_python_libdir ++ Fcd ++ sed -i -e "s{phpdir=.*\${phpdir=\"/var/www/php\"{" configure ++ local_cv_python_lib_dir=/$_F_python_libdir ./configure \ ++ --prefix=/usr --sysconfdir=/etc/vmailmgr \ ++ --localstatedir=/var ++ make || Fdie ++ make DESTDIR=$startdir/pkg install || Fdie ++ ++ # install some conf files ++ confdir=$startdir/pkg/etc/vmailmgr ++ install -D -m 755 scripts/vmailmgrd.run \ ++ $confdir/supervise/vmailmgrd/run ++ install -D -m 755 scripts/vmailmgrd-log.run \ ++ $confdir/supervise/vmailmgrd/log/run ++ install -D -m 755 scripts/autoresponder.sh \ ++ $confdir/vdeliver-postdeliver ++ echo "@:%" > $confdir/separators ++} ++ ++# vim: ft=sh ++ ++# optimization OK +diff --git a/source/custom/vmailmgr/vmailmgr.install b/source/custom/vmailmgr/vmailmgr.install +new file mode 100644 +index 0000000..9b9b1e5 +--- /dev/null ++++ b/source/custom/vmailmgr/vmailmgr.install +@@ -0,0 +1,23 @@ ++post_install() { ++ cat << EOF ++ ++NOTE ++---- ++To start vmailmgr you need to create the symlink: ++ln -s /etc/vmailmgr/supervise/vmailmgrd /service ++ ++EOF ++} ++ ++post_upgrade() { ++ /bin/true ++} ++ ++pre_remove() { ++ /bin/true ++} ++ ++op=$1 ++shift ++ ++$op $* +-- +1.5.3.4 + diff -r ad6bd3a91cab -r 32f160a66da4 vpnc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vpnc.patch Sun Jan 13 23:14:33 2008 +0100 @@ -0,0 +1,44 @@ +From 122ec78ff400fa04aba662b17bf5ff73366beaec Mon Sep 17 00:00:00 2001 +From: Tomas Zeman +Date: Tue, 25 Sep 2007 22:49:46 +0200 +Subject: [PATCH] vpnc-0.5.1-1-i686 + * added + +--- + source/network-extra/vpnc/FrugalBuild | 24 ++++++++++++++++++++++++ + 1 files changed, 24 insertions(+), 0 deletions(-) + create mode 100644 source/network-extra/vpnc/FrugalBuild + +diff --git a/source/network-extra/vpnc/FrugalBuild b/source/network-extra/vpnc/FrugalBuild +new file mode 100644 +index 0000000..833169a +--- /dev/null ++++ b/source/network-extra/vpnc/FrugalBuild +@@ -0,0 +1,24 @@ ++# Compiling Time: 0 SBU ++# Contributor: Tomas Zeman ++# Maintainer: Tomas Zeman ++ ++pkgname=vpnc ++pkgver=0.5.1 ++pkgrel=1 ++pkgdesc="vpnc - client for cisco vpn concentrator" ++url="http://www.unix-ag.uni-kl.de/~massar/vpnc" ++groups=('network-extra') ++archs=('i686') ++depends=('libgcrypt') ++backup=('etc/vpnc/default.conf') ++source=($url/$pkgname-$pkgver.tar.gz) ++up2date="lynx -dump $url|grep 'vpnc-.*tar.gz'|head -1|sed 's/.*-\(.*\).t.*/\1/'" ++sha1sums=('efc71dba03aa40945af35e4b074d99f922ff7ffd') ++ ++build() { ++ Fmake PREFIX=/usr ++ Fmakeinstall PREFIX=/usr ++} ++ ++ ++# optimization OK +-- +1.5.3.4 +