diff options
author | Sebastian Pipping <sping@gentoo.org> | 2012-01-19 06:38:23 +0000 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2012-01-19 06:38:23 +0000 |
commit | 3f065bd8b7857b555766259eab3a8ab19046b1a0 (patch) | |
tree | e8ea2416abef45ec6a3ac6315d0eb11208a0c440 /net-mail | |
parent | whitespace (diff) | |
download | gentoo-2-3f065bd8b7857b555766259eab3a8ab19046b1a0.tar.gz gentoo-2-3f065bd8b7857b555766259eab3a8ab19046b1a0.tar.bz2 gentoo-2-3f065bd8b7857b555766259eab3a8ab19046b1a0.zip |
net-mail/mpack: 1.6-r3
(Portage version: 2.1.10.44/cvs/Linux x86_64)
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/mpack/ChangeLog | 8 | ||||
-rw-r--r-- | net-mail/mpack/files/mpack-1.6-munpack.patch | 55 | ||||
-rw-r--r-- | net-mail/mpack/mpack-1.6-r3.ebuild | 36 |
3 files changed, 98 insertions, 1 deletions
diff --git a/net-mail/mpack/ChangeLog b/net-mail/mpack/ChangeLog index 5214dbfec45a..4a3408cff8b3 100644 --- a/net-mail/mpack/ChangeLog +++ b/net-mail/mpack/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-mail/mpack # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/mpack/ChangeLog,v 1.21 2012/01/14 18:44:57 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/mpack/ChangeLog,v 1.22 2012/01/19 06:38:23 sping Exp $ + +*mpack-1.6-r3 (19 Jan 2012) + + 19 Jan 2012; Sebastian Pipping <sping@gentoo.org> +mpack-1.6-r3.ebuild, + +files/mpack-1.6-munpack.patch: + Integrate bugfix patch for munpack 14 Jan 2012; Raúl Porcel <armin76@gentoo.org> mpack-1.5.ebuild, mpack-1.5-r1.ebuild, mpack-1.6.ebuild, mpack-1.6-r1.ebuild, diff --git a/net-mail/mpack/files/mpack-1.6-munpack.patch b/net-mail/mpack/files/mpack-1.6-munpack.patch new file mode 100644 index 000000000000..9d5c8af6e814 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-munpack.patch @@ -0,0 +1,55 @@ +From a4ececa89969adfa53c30878b21178e1427cb6c5 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Wed, 18 Jan 2012 05:22:25 +0100 +Subject: [PATCH] Fix unpacking of multiple parts + +The problem was reported by Dirk Meyer of FreeBSD. + +He shared these commands to reproduce: +$ ./mpack -s Subject -m 1700 -o zparts md5c.c +$ ./munpack zparts.* +--- + decode.c | 2 +- + unixos.c | 13 +++++++++++++ + 2 files changed, 14 insertions(+), 1 deletions(-) + +diff --git a/decode.c b/decode.c +index 7349abd..e8e8d56 100644 +--- a/decode.c ++++ b/decode.c +@@ -633,7 +633,7 @@ int handlePartial(struct part *inpart, char *headers, params contentParams, int + } + /* Store number of parts in reassembly directory */ + sprintf(buf, "%sCT", dir); +- partfile = os_createnewfile(buf); ++ partfile = os_resetfile(buf); + if (!partfile) { + os_perror(buf); + goto ignore; +diff --git a/unixos.c b/unixos.c +index 0e2f469..1650594 100644 +--- a/unixos.c ++++ b/unixos.c +@@ -146,6 +146,19 @@ FILE *os_createnewfile(char *fname) + return ret; + } + ++FILE *os_resetfile(char *fname) ++{ ++ int fd; ++ FILE *ret; ++ ++ fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0600); ++ if (fd == -1) ++ return NULL; ++ ++ ret=fdopen(fd, "w"); ++ return ret; ++} ++ + + /* + * Create a new file, with suggested filename "fname". +-- +1.7.8.3 + diff --git a/net-mail/mpack/mpack-1.6-r3.ebuild b/net-mail/mpack/mpack-1.6-r3.ebuild new file mode 100644 index 000000000000..4130118ea769 --- /dev/null +++ b/net-mail/mpack/mpack-1.6-r3.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/mpack/mpack-1.6-r3.ebuild,v 1.1 2012/01/19 06:38:23 sping Exp $ + +EAPI="3" + +AT_M4DIR=cmulocal + +inherit eutils autotools + +DESCRIPTION="Command-line MIME encoding and decoding utilities" +HOMEPAGE="ftp://ftp.andrew.cmu.edu/pub/mpack/" +SRC_URI="ftp://ftp.andrew.cmu.edu/pub/mpack/${P}.tar.gz" + +SLOT="0" +LICENSE="as-is" +KEYWORDS="~amd64 ~x86 ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-filenames.patch + epatch "${FILESDIR}"/${P}-usage.patch + epatch "${FILESDIR}"/${P}-munpack.patch + + # NOTE: These three patches replace <mpack-1.6-gentoo.patch> + epatch "${FILESDIR}"/${P}-compile.patch + epatch "${FILESDIR}"/${P}-paths.patch + epatch "${FILESDIR}"/${P}-cve-2011-4919.patch + + eautoreconf +} + +src_install () { + emake DESTDIR="${D}" install || die + dodoc README.* Changes +} |