diff options
author | Ulrich Müller <ulm@gentoo.org> | 2013-10-13 07:12:46 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2013-10-13 07:12:46 +0000 |
commit | be7ec6728b6c0d1d13c664ad6697d2427900e639 (patch) | |
tree | 4ea0902e50e1e3ed2b51e968f9fe643642c539e1 /app-editors/mg | |
parent | Backport fixes from -9999 to release, remove old (diff) | |
download | gentoo-2-be7ec6728b6c0d1d13c664ad6697d2427900e639.tar.gz gentoo-2-be7ec6728b6c0d1d13c664ad6697d2427900e639.tar.bz2 gentoo-2-be7ec6728b6c0d1d13c664ad6697d2427900e639.zip |
Fix dirname(3) call in writeout function, bug 487758.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)
Diffstat (limited to 'app-editors/mg')
-rw-r--r-- | app-editors/mg/ChangeLog | 9 | ||||
-rw-r--r-- | app-editors/mg/files/mg-20130922-dirname.patch | 20 | ||||
-rw-r--r-- | app-editors/mg/mg-20130922-r1.ebuild (renamed from app-editors/mg/mg-20130922.ebuild) | 7 |
3 files changed, 33 insertions, 3 deletions
diff --git a/app-editors/mg/ChangeLog b/app-editors/mg/ChangeLog index 52dc530e9a48..d5f9ebb33b45 100644 --- a/app-editors/mg/ChangeLog +++ b/app-editors/mg/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-editors/mg # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/ChangeLog,v 1.60 2013/10/09 10:06:19 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/ChangeLog,v 1.61 2013/10/13 07:12:45 ulm Exp $ + +*mg-20130922-r1 (13 Oct 2013) + + 13 Oct 2013; Ulrich Müller <ulm@gentoo.org> -mg-20130922.ebuild, + +mg-20130922-r1.ebuild, +files/mg-20130922-dirname.patch: + Fix dirname(3) call in writeout function, bug 487758. Thanks to Marien Zwart + <marienz@gentoo.org>. 09 Oct 2013; Ulrich Müller <ulm@gentoo.org> mg-20130922.ebuild: Specify CPPFLAGS not CFLAGS for preprocessor options. Add missing EPREFIX. diff --git a/app-editors/mg/files/mg-20130922-dirname.patch b/app-editors/mg/files/mg-20130922-dirname.patch new file mode 100644 index 000000000000..c97958948bfe --- /dev/null +++ b/app-editors/mg/files/mg-20130922-dirname.patch @@ -0,0 +1,20 @@ +Fix dirname(3) call in writeout function. +https://bugs.gentoo.org/487758 + +--- mg-20130922-orig/file.c ++++ mg-20130922/file.c +@@ -669,11 +669,11 @@ + { + struct stat statbuf; + int s; +- char *dp; +- +- dp = dirname(fn); ++ char ts[NFILEN], *dp; + + if (stat(fn, &statbuf) == -1 && errno == ENOENT) { ++ (void)strlcpy(ts, fn, NFILEN); ++ dp = dirname(ts); + errno = 0; + if (access(dp, W_OK) && errno == EACCES) { + ewprintf("Directory %s%s write-protected", dp, diff --git a/app-editors/mg/mg-20130922.ebuild b/app-editors/mg/mg-20130922-r1.ebuild index 368751e61d1b..2cee2c59dee9 100644 --- a/app-editors/mg/mg-20130922.ebuild +++ b/app-editors/mg/mg-20130922-r1.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/mg-20130922.ebuild,v 1.5 2013/10/09 10:06:19 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/mg-20130922-r1.ebuild,v 1.1 2013/10/13 07:12:46 ulm Exp $ EAPI=5 -inherit toolchain-funcs +inherit eutils toolchain-funcs DESCRIPTION="MicroGnuEmacs, a port from the BSDs" HOMEPAGE="http://homepage.boetes.org/software/mg/" @@ -21,6 +21,9 @@ DEPEND="${RDEPEND} dev-libs/clens" src_prepare() { + epatch "${FILESDIR}"/${P}-dirname.patch + epatch_user + # create our own Makefile to avoid BSD make echo -e 'SRCS =' *.c '\n\nmg: $(SRCS:.c=.o)' \ '\n\t$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)' >Makefile || die |