diff options
author | Peter Volkov <pva@gentoo.org> | 2007-09-29 07:26:12 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2007-09-29 07:26:12 +0000 |
commit | 23973e9bc6a7abe0c340fe8254e4df88644abeea (patch) | |
tree | caab4094d74dfb70b89ea85b02e53e6c53dbc540 /app-text/unix2dos | |
parent | Use tc-getCC compiler, fixes bug #193245, reported by Chris Slycord <cslycord... (diff) | |
download | gentoo-2-23973e9bc6a7abe0c340fe8254e4df88644abeea.tar.gz gentoo-2-23973e9bc6a7abe0c340fe8254e4df88644abeea.tar.bz2 gentoo-2-23973e9bc6a7abe0c340fe8254e4df88644abeea.zip |
Fixes rename() fails with errno = EXDEV reported by Doan Vu <chronic.tautologist AT gmail.com> bug #131313.
(Portage version: 2.1.3.10)
Diffstat (limited to 'app-text/unix2dos')
-rw-r--r-- | app-text/unix2dos/ChangeLog | 10 | ||||
-rw-r--r-- | app-text/unix2dos/files/digest-unix2dos-2.2-r1 | 3 | ||||
-rw-r--r-- | app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch | 57 | ||||
-rw-r--r-- | app-text/unix2dos/unix2dos-2.2-r1.ebuild | 33 |
4 files changed, 102 insertions, 1 deletions
diff --git a/app-text/unix2dos/ChangeLog b/app-text/unix2dos/ChangeLog index 9dae8bf1af69..a209617cbf89 100644 --- a/app-text/unix2dos/ChangeLog +++ b/app-text/unix2dos/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-text/unix2dos # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/unix2dos/ChangeLog,v 1.18 2007/03/01 17:21:45 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/unix2dos/ChangeLog,v 1.19 2007/09/29 07:26:12 pva Exp $ + +*unix2dos-2.2-r1 (29 Sep 2007) + + 29 Sep 2007; <pva@gentoo.org> + +files/unix2dos-2.2-workaround-rename-EXDEV.patch, + +unix2dos-2.2-r1.ebuild: + Fixes rename() fails with errno = EXDEV reported by Doan Vu + <chronic.tautologist AT gmail.com> bug #131313. 01 Mar 2007; <genstef@gentoo.org> unix2dos-2.2.ebuild: Dropped ppc-macos keyword, see you in prefix diff --git a/app-text/unix2dos/files/digest-unix2dos-2.2-r1 b/app-text/unix2dos/files/digest-unix2dos-2.2-r1 new file mode 100644 index 000000000000..efedafc62977 --- /dev/null +++ b/app-text/unix2dos/files/digest-unix2dos-2.2-r1 @@ -0,0 +1,3 @@ +MD5 e4488c241fa9067a48a7534a21d4babb unix2dos-2.2.src.tar.gz 5898 +RMD160 7a06b892859d6ac22ae7add2ff2aa2017dbb5a2d unix2dos-2.2.src.tar.gz 5898 +SHA256 e23d4fc9806b12bc04065123729b95c24b1f3ed48609019ab754b5934559f9aa unix2dos-2.2.src.tar.gz 5898 diff --git a/app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch b/app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch new file mode 100644 index 000000000000..f2a7cff4feba --- /dev/null +++ b/app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch @@ -0,0 +1,57 @@ +--- ./unix2dos.c.orig 2007-09-29 11:13:16.000000000 +0400 ++++ ./unix2dos.c 2007-09-29 11:15:22.000000000 +0400 +@@ -204,7 +204,7 @@ + int RetVal = 0; + FILE *InF = NULL; + FILE *TempF = NULL; +- char TempPath[16]; ++ char *TempPath = (char *) malloc(sizeof(char) * strlen(ipInFN)+14); + struct stat StatBuf; + struct utimbuf UTimeBuf; + int fd; +@@ -213,7 +213,8 @@ + if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) + RetVal = -1; + +- strcpy (TempPath, "./u2dtmpXXXXXX"); ++ strcpy (TempPath, ipInFN); ++ strcat (TempPath, "_u2dtmpXXXXXX"); + if((fd=mkstemp (TempPath)) < 0) { + perror("Can't open output temp file"); + RetVal = -1; +@@ -276,6 +277,7 @@ + } + } + ++ free (TempPath); + return RetVal; + } + +@@ -289,7 +291,7 @@ + int RetVal = 0; + FILE *InF = NULL; + FILE *TempF = NULL; +- char TempPath[16]; ++ char *TempPath = (char *) malloc(sizeof(char) * strlen(ipInFN)+14); + struct stat StatBuf; + struct utimbuf UTimeBuf; + int fd; +@@ -298,7 +300,8 @@ + if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) + RetVal = -1; + +- strcpy (TempPath, "./u2dtmpXXXXXX"); ++ strcpy (TempPath, ipInFN); ++ strcat (TempPath, "_u2dtmpXXXXXX"); + if((fd=mkstemp (TempPath)) < 0) { + perror("Can't open output temp file"); + RetVal = -1; +@@ -361,6 +364,8 @@ + } + RetVal = -1; + } ++ ++ free (TempPath); + return RetVal; + } + diff --git a/app-text/unix2dos/unix2dos-2.2-r1.ebuild b/app-text/unix2dos/unix2dos-2.2-r1.ebuild new file mode 100644 index 000000000000..559801503c42 --- /dev/null +++ b/app-text/unix2dos/unix2dos-2.2-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/unix2dos/unix2dos-2.2-r1.ebuild,v 1.1 2007/09/29 07:26:12 pva Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="UNIX to DOS text file format converter" +HOMEPAGE="I HAVE NO HOME :(" +SRC_URI="mirror://gentoo/${P}.src.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="" + +S=${WORKDIR} + +src_unpack() { + unpack ${A} + epatch "${FILESDIR}"/${PN}-mkstemp.patch + epatch "${FILESDIR}"/${P}-segfault.patch + epatch "${FILESDIR}"/${P}-manpage.patch + epatch "${FILESDIR}"/${P}-workaround-rename-EXDEV.patch +} + +src_compile() { + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o unix2dos unix2dos.c || die +} + +src_install() { + dobin unix2dos || die + doman unix2dos.1 +} |