diff options
author | Alin Năstac <mrness@gentoo.org> | 2006-06-15 04:46:09 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2006-06-15 04:46:09 +0000 |
commit | fbed645567862f4598efa72495b6845215c9a619 (patch) | |
tree | 149d739f3e4a8da32c317c0db3ee4f9ce99ebe9b /net-mail | |
parent | Version bump. (diff) | |
download | gentoo-2-fbed645567862f4598efa72495b6845215c9a619.tar.gz gentoo-2-fbed645567862f4598efa72495b6845215c9a619.tar.bz2 gentoo-2-fbed645567862f4598efa72495b6845215c9a619.zip |
Fix vcheckquota inability to cope with non-maildir subdirectories (#136478).
(Portage version: 2.1)
Diffstat (limited to 'net-mail')
5 files changed, 97 insertions, 1 deletions
diff --git a/net-mail/vmailmgr-tools/ChangeLog b/net-mail/vmailmgr-tools/ChangeLog index 825e30cd20f0..f356450f7a76 100644 --- a/net-mail/vmailmgr-tools/ChangeLog +++ b/net-mail/vmailmgr-tools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-mail/vmailmgr-tools # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/vmailmgr-tools/ChangeLog,v 1.2 2006/03/07 15:22:04 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/vmailmgr-tools/ChangeLog,v 1.3 2006/06/15 04:46:09 mrness Exp $ + +*vmailmgr-tools-0.2-r1 (15 Jun 2006) + + 15 Jun 2006; Alin Nastac <mrness@gentoo.org> + +files/vmailmgr-tools-0.2-quota.patch, +vmailmgr-tools-0.2-r1.ebuild: + Fix vcheckquota inability to cope with non-maildir subdirectories (#136478). 07 Mar 2006; Alin Nastac <mrness@gentoo.org> vmailmgr-tools-0.2.ebuild: Added to ~amd64. diff --git a/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2 b/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2 index ceda1eac479f..6a78bd795da8 100644 --- a/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2 +++ b/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2 @@ -1 +1,3 @@ MD5 1c583f46a62821bc1a90cbf6ce83bf32 vmailmgr-tools-0.2.tar.gz 33925 +RMD160 d5ef695eb0886759f079bd6fa4016c9ccc6b4d28 vmailmgr-tools-0.2.tar.gz 33925 +SHA256 94e72dff32148b2fbfacc150938c303afe68297f90fda7421b8e98076ef231a0 vmailmgr-tools-0.2.tar.gz 33925 diff --git a/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2-r1 b/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2-r1 new file mode 100644 index 000000000000..6a78bd795da8 --- /dev/null +++ b/net-mail/vmailmgr-tools/files/digest-vmailmgr-tools-0.2-r1 @@ -0,0 +1,3 @@ +MD5 1c583f46a62821bc1a90cbf6ce83bf32 vmailmgr-tools-0.2.tar.gz 33925 +RMD160 d5ef695eb0886759f079bd6fa4016c9ccc6b4d28 vmailmgr-tools-0.2.tar.gz 33925 +SHA256 94e72dff32148b2fbfacc150938c303afe68297f90fda7421b8e98076ef231a0 vmailmgr-tools-0.2.tar.gz 33925 diff --git a/net-mail/vmailmgr-tools/files/vmailmgr-tools-0.2-quota.patch b/net-mail/vmailmgr-tools/files/vmailmgr-tools-0.2-quota.patch new file mode 100644 index 000000000000..214df9a6cb72 --- /dev/null +++ b/net-mail/vmailmgr-tools/files/vmailmgr-tools-0.2-quota.patch @@ -0,0 +1,46 @@ +diff -Nru vmailmgr-tools-0.2.orig/vcheckquota.c vmailmgr-tools-0.2/vcheckquota.c +--- vmailmgr-tools-0.2.orig/vcheckquota.c 2006-06-15 06:22:31.000000000 +0300 ++++ vmailmgr-tools-0.2/vcheckquota.c 2006-06-15 07:25:14.936298750 +0300 +@@ -33,10 +33,10 @@ + const char program[] = "vcheckquota"; + const int msg_show_pid = 0; + const char cli_help_prefix[] = "vmailmgr quota enforcement program\n"; +-const char cli_help_suffix[] = "\ +-Warning: the soft-message is linked into the users maildir once for each\ +-message that is received while the account is over its soft quota. This may\ +-result in multiple warning messages.\n"; ++const char cli_help_suffix[] = "\n" ++"Warning: the soft-message is linked into the users maildir once for each\n" ++"message that is received while the account is over its soft quota. This may\n" ++"result in multiple warning messages.\n"; + const char cli_args_usage[] = ""; + const int cli_args_min = 0; + const int cli_args_max = 0; +@@ -58,8 +58,13 @@ + static struct stat st; + static void wrap_stat(const char* path) + { +- if (stat(path, &st) == -1) +- die3sys(111, "Cannot stat '", path, "'"); ++ if (stat(path, &st) < 0) { ++ if (errno == ENOENT) { ++ st.st_blocks = 0; ++ st.st_mode = 0; ++ } else ++ die3sys(111, "Cannot stat '", path, "'"); ++ } + } + + static unsigned long stat_size(const char* path) +@@ -77,8 +82,10 @@ + DIR* dir; + direntry* entry; + +- if ((dir = opendir(path)) == 0) ++ if ((dir = opendir(path)) == 0) { ++ if (errno == ENOENT) return; + die3sys(111, "Could not open directory '", path, "'"); ++ } + + while((entry = readdir(dir)) != 0) { + const char* name = entry->d_name; diff --git a/net-mail/vmailmgr-tools/vmailmgr-tools-0.2-r1.ebuild b/net-mail/vmailmgr-tools/vmailmgr-tools-0.2-r1.ebuild new file mode 100644 index 000000000000..b917c3f63992 --- /dev/null +++ b/net-mail/vmailmgr-tools/vmailmgr-tools-0.2-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/vmailmgr-tools/vmailmgr-tools-0.2-r1.ebuild,v 1.1 2006/06/15 04:46:09 mrness Exp $ + +inherit toolchain-funcs eutils fixheadtails + +DESCRIPTION="Add-on tools for use with vmailmgr" +HOMEPAGE="http://untroubled.org/vmailmgr-tools/" +SRC_URI="http://untroubled.org/vmailmgr-tools/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="net-mail/vmailmgr" + +src_unpack() { + unpack ${A} + + epatch "${FILESDIR}/${P}-gcc34.patch" + epatch "${FILESDIR}/${P}-quota.patch" + ht_fix_file "${S}/Makefile" +} + +src_compile() { + echo "${D}/usr/bin" > conf-bin + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld + make || die "make failed" +} + +src_install() { + dodir /usr/bin + ./installer || die "install failed" + + doman *.1 + dodoc ANNOUNCEMENT NEWS README VERSION +} |