From 1a249758026af2c6fb84946ac54cda800999c84a Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Mon, 23 Apr 2012 15:59:12 +0000 Subject: Fixed crash when changing ownership wit "CTRL-x o" (bug #413259) (Portage version: 2.2.0_alpha101/cvs/Linux x86_64) --- app-misc/mc/ChangeLog | 9 ++- app-misc/mc/files/mc-4.8.3-fix-chown-crash.patch | 14 ++++ app-misc/mc/mc-4.8.3-r1.ebuild | 87 ++++++++++++++++++++++++ app-misc/mc/mc-4.8.3.ebuild | 84 ----------------------- 4 files changed, 109 insertions(+), 85 deletions(-) create mode 100644 app-misc/mc/files/mc-4.8.3-fix-chown-crash.patch create mode 100644 app-misc/mc/mc-4.8.3-r1.ebuild delete mode 100644 app-misc/mc/mc-4.8.3.ebuild (limited to 'app-misc') diff --git a/app-misc/mc/ChangeLog b/app-misc/mc/ChangeLog index e1b6e3d32c18..7c34655de082 100644 --- a/app-misc/mc/ChangeLog +++ b/app-misc/mc/ChangeLog @@ -1,6 +1,13 @@ # 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.252 2012/04/22 14:53:53 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.253 2012/04/23 15:59:12 polynomial-c Exp $ + +*mc-4.8.3-r1 (23 Apr 2012) + + 23 Apr 2012; Lars Wendler -mc-4.8.3.ebuild, + +mc-4.8.3-r1.ebuild, +files/mc-4.8.3-fix-chown-crash.patch: + non-maintainer commit: Fixed crash when changing ownership wit "CTRL-x o" + (bug #413259). Permission granted by slyfox. *mc-4.8.3 (22 Apr 2012) diff --git a/app-misc/mc/files/mc-4.8.3-fix-chown-crash.patch b/app-misc/mc/files/mc-4.8.3-fix-chown-crash.patch new file mode 100644 index 000000000000..8ea232d15593 --- /dev/null +++ b/app-misc/mc/files/mc-4.8.3-fix-chown-crash.patch @@ -0,0 +1,14 @@ +https://www.midnight-commander.org/ticket/2784 +https://www.midnight-commander.org/changeset/ac880c71a74c1fc75d7162b2ca3613970479e663 + +--- mc-4.8.3/src/filemanager/chown.c ++++ mc-4.8.3/src/filemanager/chown.c +@@ -378,7 +378,7 @@ + if (mc_chown (fname_vpath, new_user, new_group) == -1) + message (D_ERROR, MSG_ERROR, _("Cannot chown \"%s\"\n%s"), + fname, unix_error_string (errno)); +- vfs_path_free (vpath); ++ vfs_path_free (fname_vpath); + } + else + apply_chowns (new_user, new_group); diff --git a/app-misc/mc/mc-4.8.3-r1.ebuild b/app-misc/mc/mc-4.8.3-r1.ebuild new file mode 100644 index 000000000000..0e72f8a89b72 --- /dev/null +++ b/app-misc/mc/mc-4.8.3-r1.ebuild @@ -0,0 +1,87 @@ +# 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.3-r1.ebuild,v 1.1 2012/04/23 15:59:12 polynomial-c Exp $ + +EAPI=4 + +inherit eutils 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 + + # bug #413259 + epatch "${FILESDIR}"/${P}-fix-chown-crash.patch +} + +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" +} diff --git a/app-misc/mc/mc-4.8.3.ebuild b/app-misc/mc/mc-4.8.3.ebuild deleted file mode 100644 index 31937f9b405b..000000000000 --- a/app-misc/mc/mc-4.8.3.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.3.ebuild,v 1.1 2012/04/22 14:53:53 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" -} -- cgit v1.2.3-65-gdbad