diff options
-rw-r--r-- | app-misc/mc/ChangeLog | 10 | ||||
-rw-r--r-- | app-misc/mc/files/mc-4.8.2-fix-existing.patch | 38 | ||||
-rw-r--r-- | app-misc/mc/mc-4.8.2-r2.ebuild (renamed from app-misc/mc/mc-4.8.2-r1.ebuild) | 4 | ||||
-rw-r--r-- | app-misc/mc/mc-4.8.2.ebuild | 84 |
4 files changed, 50 insertions, 86 deletions
diff --git a/app-misc/mc/ChangeLog b/app-misc/mc/ChangeLog index 23dd77b28cf6..8d7f95edaec0 100644 --- a/app-misc/mc/ChangeLog +++ b/app-misc/mc/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-misc/mc # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.250 2012/03/22 14:37:17 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.251 2012/03/27 16:54:22 slyfox Exp $ + +*mc-4.8.2-r2 (27 Mar 2012) + + 27 Mar 2012; Sergei Trofimovich <slyfox@gentoo.org> + +files/mc-4.8.2-fix-existing.patch, +mc-4.8.2-r2.ebuild, -mc-4.8.2-r1.ebuild, + -mc-4.8.2.ebuild: + Fix bug #409365 by Marcin Mirosław (broken permissions when attempt to save + file on top of directory). Patch picked from upstream. 22 Mar 2012; Alex Alexander <wired@gentoo.org> mc-4.8.2-r1.ebuild: removed whitespace diff --git a/app-misc/mc/files/mc-4.8.2-fix-existing.patch b/app-misc/mc/files/mc-4.8.2-fix-existing.patch new file mode 100644 index 000000000000..fbb1e6fba3b0 --- /dev/null +++ b/app-misc/mc/files/mc-4.8.2-fix-existing.patch @@ -0,0 +1,38 @@ +commit 2a5885fb7f5ce7af3576fa17ce697adbd9b61567 +Author: Slava Zanko <slavazanko@gmail.com> +Date: Fri Mar 23 13:40:25 2012 +0300 + + Ticket #2761: save file on top of existing directory changes dir's permissions + + Steps to reproduce: + + mkdir foo + chmod 0700 foo + mcedit bar + ls -ld foo + drw-r--r-- 1 slyfox users 0 Mar 22 22:10 foo + + We've lost dir's permissions. + + Signed-off-by: Slava Zanko <slavazanko@gmail.com> + +diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c +index 8e6c9a9..d52e48b 100644 +--- a/src/editor/editcmd.c ++++ b/src/editor/editcmd.c +@@ -1488,6 +1488,15 @@ edit_save_as_cmd (WEdit * edit) + if (vfs_path_cmp (edit->filename_vpath, exp_vpath) != 0) + { + int file; ++ struct stat sb; ++ ++ if (mc_stat (exp_vpath, &sb) == 0 && !S_ISREG (sb.st_mode)) ++ { ++ edit_error_dialog (_("Save as"), ++ get_sys_error (_ ++ ("Cannot save: destination is not a regular file"))); ++ goto ret; ++ } + + different_filename = 1; + file = mc_open (exp_vpath, O_RDONLY | O_BINARY); diff --git a/app-misc/mc/mc-4.8.2-r1.ebuild b/app-misc/mc/mc-4.8.2-r2.ebuild index cca79bfbbb27..385e63450ac8 100644 --- a/app-misc/mc/mc-4.8.2-r1.ebuild +++ b/app-misc/mc/mc-4.8.2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.8.2-r1.ebuild,v 1.2 2012/03/22 14:37:17 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.8.2-r2.ebuild,v 1.1 2012/03/27 16:54:22 slyfox Exp $ EAPI=4 @@ -43,6 +43,8 @@ src_prepare() { # bug 409107 epatch "${FILESDIR}"/"${P}"-mcedit-without-file-param-fix.patch + # bug 409365 + epatch "${FILESDIR}"/"${P}"-fix-existing.patch } src_configure() { diff --git a/app-misc/mc/mc-4.8.2.ebuild b/app-misc/mc/mc-4.8.2.ebuild deleted file mode 100644 index 512ae9d5836f..000000000000 --- a/app-misc/mc/mc-4.8.2.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.8.2.ebuild,v 1.1 2012/03/20 19:58:49 slyfox Exp $ - -EAPI=4 - -inherit flag-o-matic - -MY_P=${P/_/-} - -DESCRIPTION="GNU Midnight Commander is a text based file manager" -HOMEPAGE="http://www.midnight-commander.org" -SRC_URI="http://www.midnight-commander.org/downloads/${MY_P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris" -IUSE="+edit gpm mclib nls samba +slang test X +xdg" - -RDEPEND=">=dev-libs/glib-2.8:2 - gpm? ( sys-libs/gpm ) - kernel_linux? ( sys-fs/e2fsprogs ) - samba? ( net-fs/samba ) - slang? ( >=sys-libs/slang-2 ) - !slang? ( sys-libs/ncurses ) - X? ( x11-libs/libX11 - x11-libs/libICE - x11-libs/libXau - x11-libs/libXdmcp - x11-libs/libSM )" -DEPEND="${RDEPEND} - app-arch/xz-utils - dev-util/pkgconfig - nls? ( sys-devel/gettext ) - test? ( dev-libs/check ) - " - -S=${WORKDIR}/${MY_P} - -src_prepare() { - cp "${FILESDIR}"/${P}-missing-do_panel_cd_stub_env.c \ - tests/src/filemanager/do_panel_cd_stub_env.c || die -} - -src_configure() { - local myscreen=ncurses - use slang && myscreen=slang - [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket" - - local homedir=".mc" - use xdg && homedir="XDG" - - econf \ - --disable-dependency-tracking \ - $(use_enable nls) \ - --enable-vfs \ - $(use_enable kernel_linux vfs-undelfs) \ - --enable-charset \ - $(use_with X x) \ - $(use_enable samba vfs-smb) \ - $(use_with gpm gpm-mouse) \ - --with-screen=${myscreen} \ - $(use_with edit) \ - $(use_enable mclib) \ - $(use_enable test tests) \ - --with-homedir=${homedir} -} - -src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS README NEWS - - # fix bug #334383 - if use kernel_linux && [[ ${EUID} == 0 ]] ; then - fowners root:tty /usr/libexec/mc/cons.saver - fperms g+s /usr/libexec/mc/cons.saver - fi -} - -pkg_postinst() { - elog "To enable exiting to latest working directory," - elog "put this into your ~/.bashrc:" - elog ". ${EPREFIX}/usr/libexec/mc/mc.sh" -} |