From 92e0ffdd1b44102212d2ecc2e06c12657facd9a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Tue, 22 Jan 2008 22:21:53 +0000 Subject: [PATCH] * OpenBSD compatibility: select properly while reading/writing to sockets * some minor deb changes. --- citadel/buildpackages | 2 + citadel/debian/changelog | 295 ++++++++++++++++++++++++++++++++++++++- citadel/debian/control | 4 +- citadel/debian/rules | 5 +- citadel/sysdep.c | 18 +++ 5 files changed, 318 insertions(+), 6 deletions(-) diff --git a/citadel/buildpackages b/citadel/buildpackages index 4361b2ef5..eae5332ce 100755 --- a/citadel/buildpackages +++ b/citadel/buildpackages @@ -12,6 +12,8 @@ PACKAGE_VERSION=`cat packageversion` DATE=`date '+%a, %d %b %Y %H:%I:00 %z'` ACTUAL_DIR=`pwd` + +rm -rf debian/citadel-client debian/citadel-common debian/citadel-doc debian/citadel-mta debian/citadel-server debian/citadel-suite debian/tmp if echo "$ACTUAL_DIR" |grep -q "$CITADEL_VERSION"; then echo "directory ($ACTUAL_DIR) naming scheme seems right. nothing done." else diff --git a/citadel/debian/changelog b/citadel/debian/changelog index db8debaec..23b493cb3 100644 --- a/citadel/debian/changelog +++ b/citadel/debian/changelog @@ -1,5 +1,294 @@ -citadel (7.10-0ubuntu1) unstable; urgency=low +citadel (7.24-27) stable; urgency=high - * Initial Debian package for Ubuntu. + * managesieve permission and auth problems fixed. + + -- Wilfried Goesgens Fri, 4 Jan 2008 16:37:29 +0001 +citadel (7.24-26) stable; urgency=high + + * RSS Aggregator Timestamp fix + + -- Wilfried Goesgens Thu, 13 Dec 2007 17:37:29 +0001 +citadel (7.24-25) stable; urgency=high + + * fixes bug in citadel networking code + -- Wilfried Goesgens Thu, 15 Nov 2007 17:37:29 +0001 + +citadel (7.23-24) stable; urgency=high + + * fix bug in init script. + -- Wilfried Goesgens Tue, 13 Nov 2007 18:57:00 +0001 + +citadel (7.23-23) stable; urgency=high + + * new RSS aggregator; several bugfixes + + -- Wilfried Goesgens Thu, 8 Nov 2007 23:01:21 +0002 +citadel (7.22-22) stable; urgency=high + + * Performance improvements. + + -- Wilfried Goesgens Do, 25 Oct 2007 8:48:00 +0000 + +citadel (7.22-21) stable; urgency=high + + * fixed calculation of network spool filenames + + -- Wilfried Goesgens Sa, 13 Oct 2007 8:48:00 +0000 + +citadel (7.22-20) stable; urgency=high + + * some flaws fixed + * LDAP Code reworked. change in the scheme! + + -- Wilfried Goesgens Fr, 12 Oct 2007 8:48:00 +0000 + +citadel (7.20-19) stable; urgency=high + + * several performance upgrades, source code reorganisations + + -- Wilfried Goesgens Fr, 20 Sep 2007 8:48:00 +0000 + +citadel (7.11-18) stable; urgency=high + + * we don't need to chown chkpwd anymore. + + -- Wilfried Goesgens Sa, 7 Jul 2007 22:10:00 +0000 + +citadel (7.11-17) stable; urgency=high + + * update to actual Citadel SVN. many new features. see Packages changelog. + + -- Wilfried Goesgens Fr, 6 Jul 2007 22:10:00 +0000 + +citadel (7.10-16) stable; urgency=high + + * update to actual Citadel SVN. many new features. see Packages changelog. + + -- Wilfried Goesgens Thu, 19 Apr 2007 22:10:00 +0000 + +citadel (7.09-1) unstable; urgency=low + + * update to actual Citadel SVN. many new features. see Packages changelog. + + -- Wilfried Goesgens Thu, 19 Apr 2007 22:10:00 +0000 + +citadel (7.08-15) unstable; urgency=high + + * fix permission bug + + -- Wilfried Goesgens Fri, 06 Apr 2007 19:07:00 +0000 +citadel (7.07-14) unstable; urgency=low + + * update to actual Citadel SVN. many new features. see Packages changelog. + + -- Wilfried Goesgens Fri, 06 Apr 2007 19:07:00 +0000 +citadel (7.06-13) stable; urgency=high + + * fixed location of key files + + -- Wilfried Goesgens Sun, 1 Apr 2007 11:09:00 +0100 + +citadel (7.06-12) stable; urgency=high + + * updated mime-parser + + -- Wilfried Goesgens Mon, 21 Mar 2007 11:09:00 +0100 +citadel (7.06-11) unstable; urgency=low + + * fixes to the configure script. + + -- Wilfried Goesgens Mon, 19 Mar 2007 12:12:00 +0000 + +citadel (7.06-10) unstable; urgency=low + + * update to actual Citadel SVN. many new features. see Packages changelog. + + -- Wilfried Goesgens Wed, 07 Mar 2007 12:12:00 +0000 + +citadel (7.05-9) stable; urgency=high + + * maintainance release, ical upgrade + + -- Wilfried Goesgens Thu, 1 Mar 2007 21:09:00 +0100 + +citadel (7.05-8) stable; urgency=low + + * Citadel 7.05 release + + -- Art Cancro Thu, 22 Feb 2007 06:12:00 -0500 + +citadel (7.03-7) unstable; urgency=high + + * fixup @'s in usernames when doing smtpauth client + * ignore returns from db_input + + -- Wilfried Goesgens Wed, 07 Feb 2007 00:12:00 +0100 + +citadel (7.03-7) unstable; urgency=high + + * fixup in quoted printable decoder + + -- Wilfried Goesgens Wed, 07 Feb 2007 00:12:00 +0100 + +citadel (7.03-6) unstable; urgency=high + + * fixup in quoted printable decoder + + -- Wilfried Goesgens Wed, 07 Feb 2007 00:12:00 +0100 + +citadel (7.03-5) unstable; urgency=low + + * fixed user create bug + + -- Wilfried Goesgens Wed, 07 Feb 2007 00:12:00 +0100 + +citadel (7.03-4) unstable; urgency=low + + * varyous fixes from our valgrind session + + -- Wilfried Goesgens Fri, 05 Jan 2007 00:12:00 +0100 + +citadel (7.03-3) unstable; urgency=low + + * create user without error messages in citadel-common + * ask our questions on login. + + -- Wilfried Goesgens Fri, 05 Jan 2007 00:12:00 +0100 + +citadel (7.03-2) unstable; urgency=low + + * corrected locating chkpwd + * added missing files to citadel-common + + -- Wilfried Goesgens Fri, 05 Jan 2007 00:12:00 +0100 + +citadel (7.03-1) unstable; urgency=low + + * update to actual Citadel SVN. many new features. see Packages changelog. + * Add welcome mail on fresh citadel install + * Fix configure-stamp token + + -- Wilfried Goesgens Fri, 05 Jan 2007 00:12:00 +0100 + +citadel (7.02-2) unstable; urgency=low + + * Initial Debian release + * Removed useless files: + * citadel-client.examples + * citadel-doc.docs + * citadel-mta.postrm + * citadel-server.1.manpage + * citadel-server.examples + * citadel-server.postrm.debhelper + * files_preview + * README.Debian + * citadel-client.install: merged with citadel-client.examples + * citadel-client.postinst: + * clean up + * remove ucf mechanisms + * add debhelper token + * citadel-doc.install : merged with citadel-doc.docs + * citadel-mta.postinst: + * clean up + * add debhelper token + * citadel-server.dirs: + * clean up + * add var/lib/citadel/data and var/run/citadel dir + * move help and messages to /etc/citadel + * citadel-server.install: merged with citadel-server.examples + * citadel-server.postinst: + * clean up + * remove mkdir call as we create them with citadel-server.dirs + * remove loops as we don't use ucf here anymore + * add debhelper token + * citadel-server.postrm: + * clean up + * remove ucf + * add debhelper token + * citadel-server.prerm: + * clean up + * use invoke-rc.d + * add debhelper token + * citadel-server.templates: add po support + * control: + * priority set to extra instead optional + * add myself in uploaders + * add po-debconf to Build-Depends + * bump Standards-Version to 3.7.2 + * remove useless pre-depends on debconf + * rewrite descriptions + * add Replaces: mail-transport-agent to citadel-mta package + * copyright: complete rewrite + * docs: clean up + * rules: + * add explicit zlib extra configure option + * exclude citadel.rc, intro, nice, summary from compression + + -- Fathi Boudra Fri, 29 Dec 2006 16:24:48 +0100 + +citadel (7.02-1) unstable; urgency=low + + * update to actual Citadel SVN. many new features. see Packages changelog. + + -- Wilfried Goesgens Thu, 28 Dec 2006 22:10:00 +0100 + +citadel (7.01-1) stable; urgency=low + + * we can now configure logintype on installation time. + + -- Wilfried Goesgens Thu, 21 Dec 2006 22:10:00 +0100 + +citadel (7.00-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Sat, 16 Dec 2006 01:01:00 +0100 + +citadel (6.84-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Thu, 31 Aug 2006 23:11:00 +0200 + +citadel (6.82-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Thu, 22 Jun 2006 20:08:00 +0200 + +citadel (6.71-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Sat, 21 Jan 2006 19:07:00 +0100 + +citadel (6.70-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Sun, 15 Jan 2006 15:03:00 +0100 + +citadel (6.63-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Mon, 12 Dec 2005 11:11:00 +0100 + +citadel (6.62-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Fri, 18 Nov 2005 16:04:00 +0100 + +citadel (6.61-2) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Tue, 01 Nov 2005 12:23:15 +0200 + +citadel (6.53-1) unstable; urgency=low + + * Initial release + + -- Wilfried Goesgens Sat, 23 Jul 2005 12:23:15 +0200 - -- Wilfried Goesgens Sun, 29 Apr 2007 13:01:00 +0200 diff --git a/citadel/debian/control b/citadel/debian/control index 34397ef0b..e59ed5cb8 100644 --- a/citadel/debian/control +++ b/citadel/debian/control @@ -5,7 +5,7 @@ Maintainer: Wilfried Goesgens Build-Depends: debhelper (>= 4), po-debconf, bison, autotools-dev, libdb4.4-dev | libdb4.3-dev, libical-dev, libldap2-dev, libncurses5-dev, libpam0g-dev, libsieve2-dev, libssl-dev, libexpat1-dev, libcitadel-dev -Standards-Version: 3.7.2 +Standards-Version: 3.7.3 Package: citadel-server Architecture: any @@ -152,7 +152,7 @@ Description: complete and feature-rich groupware server Package: citadel-mta Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, citadel-server (= ${Source-Version}), citadel-common +Depends: ${shlibs:Depends}, ${misc:Depends}, citadel-server, citadel-common Conflicts: mail-transport-agent Provides: mail-transport-agent Replaces: mail-transport-agent diff --git a/citadel/debian/rules b/citadel/debian/rules index 4c651a403..501fed62c 100755 --- a/citadel/debian/rules +++ b/citadel/debian/rules @@ -4,6 +4,9 @@ #export DH_VERBOSE=1 # This has to be exported to make some magic below work. +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + export DH_OPTIONS DEB_DESTDIR = $(CURDIR)/debian/tmp @@ -73,7 +76,7 @@ clean: dh_testroot rm -f build-arch-stamp build-indep-stamp configure-stamp - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean dh_clean rm -f config.status config.log diff --git a/citadel/sysdep.c b/citadel/sysdep.c index b6b10c187..164cafd5a 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -547,7 +547,9 @@ void client_write(char *buf, int nbytes) #ifndef HAVE_TCP_BUFFERING int old_buffer_len = 0; #endif + fd_set wset; t_context *Ctx; + int fdflags; Ctx = CC; if (Ctx->redirect_buffer != NULL) { @@ -582,7 +584,23 @@ void client_write(char *buf, int nbytes) } #endif + fdflags = fcntl(Ctx->client_socket, F_GETFL); + while (bytes_written < nbytes) { + if ((fdflags & O_NONBLOCK) == O_NONBLOCK) { + FD_ZERO(&wset); + FD_SET(Ctx->client_socket, &wset); + if (select(1, NULL, &wset, NULL, NULL) == -1) { + CtdlLogPrintf(CTDL_ERR, + "client_write(%d bytes) select failed: %s (%d)\n", + nbytes - bytes_written, + strerror(errno), errno); + cit_backtrace(); + Ctx->kill_me = 1; + return; + } + } + retval = write(Ctx->client_socket, &buf[bytes_written], nbytes - bytes_written); if (retval < 1) { -- 2.30.2