diff options
author | Romain Perier <mrpouet@gentoo.org> | 2009-10-14 18:11:20 +0000 |
---|---|---|
committer | Romain Perier <mrpouet@gentoo.org> | 2009-10-14 18:11:20 +0000 |
commit | a00023541245f268c2b832394701f25eb48b597f (patch) | |
tree | fb90b759e29738f89b5c22fc09486f9540cd7fe8 /sys-block | |
parent | Version bump, thanks RSebastian Mingramm for his testing. (diff) | |
download | gentoo-2-a00023541245f268c2b832394701f25eb48b597f.tar.gz gentoo-2-a00023541245f268c2b832394701f25eb48b597f.tar.bz2 gentoo-2-a00023541245f268c2b832394701f25eb48b597f.zip |
Version bump. Import patch from upstream bug #582687 in order to resolve realpath for symlinks devices
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/gparted/ChangeLog | 9 | ||||
-rw-r--r-- | sys-block/gparted/files/gparted-0.4.7-realpath-symlink-device.patch | 45 | ||||
-rw-r--r-- | sys-block/gparted/gparted-0.4.7.ebuild | 88 |
3 files changed, 141 insertions, 1 deletions
diff --git a/sys-block/gparted/ChangeLog b/sys-block/gparted/ChangeLog index a4f01a684e57..0294c2d49019 100644 --- a/sys-block/gparted/ChangeLog +++ b/sys-block/gparted/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-block/gparted # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/gparted/ChangeLog,v 1.71 2009/08/25 20:10:30 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/gparted/ChangeLog,v 1.72 2009/10/14 18:11:20 mrpouet Exp $ + +*gparted-0.4.7 (14 Oct 2009) + + 14 Oct 2009; Romain Perier <mrpouet@gentoo.org> + +gparted-0.4.7.ebuild, +files/gparted-0.4.7-realpath-symlink-device.patch: + Version bump. Import patch from upstream bug #582687 in order to resolve + realpath for symlinks devices. 25 Aug 2009; Christian Faulhammer <fauli@gentoo.org> gparted-0.4.5.ebuild: stable x86, bug 280080 diff --git a/sys-block/gparted/files/gparted-0.4.7-realpath-symlink-device.patch b/sys-block/gparted/files/gparted-0.4.7-realpath-symlink-device.patch new file mode 100644 index 000000000000..dcbaa2964925 --- /dev/null +++ b/sys-block/gparted/files/gparted-0.4.7-realpath-symlink-device.patch @@ -0,0 +1,45 @@ +From 5f6301d1b05bb51a7604a350dea52fb6580fdfaa Mon Sep 17 00:00:00 2001 +From: Curtis Gedak <gedakc@gmail.com> +Date: Tue, 13 Oct 2009 23:45:04 +0000 +Subject: Rework logic to resolve real path for symbolic link devices (#582687) + +--- +diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc +index e07fa74..a47f7cc 100644 +--- a/src/GParted_Core.cc ++++ b/src/GParted_Core.cc +@@ -660,19 +660,21 @@ void GParted_Core::read_mountpoints_from_file( + mountpoint = Utils::regexp_label( line, "^/[^ \t]+[ \t]+([^ \t]+)" ) ; + if ( mountpoint .length() > 0 && node .length() > 0 ) + { +- //If node is a symbolic link (e.g., /dev/root), then find real path +- if ( file_test( node, Glib::FILE_TEST_IS_SYMLINK ) ) +- { +- char c_str[4096+1] ; +- Glib::ustring tmp_node = node ; +- //FIXME: it seems realpath is very unsafe to use (manpage)... +- realpath( tmp_node .c_str(), c_str ) ; +- if ( tmp_node .length() > 0 ) +- node = tmp_node ; +- } +- //only add this path if it exists ++ //Only add node path(s) if mount point exists + if ( file_test( mountpoint, Glib::FILE_TEST_EXISTS ) ) ++ { + map[ node ] .push_back( mountpoint ) ; ++ ++ //If node is a symbolic link (e.g., /dev/root) ++ // then find real path and add entry ++ if ( file_test( node, Glib::FILE_TEST_IS_SYMLINK ) ) ++ { ++ char c_str[4096+1] ; ++ //FIXME: it seems realpath is very unsafe to use (manpage)... ++ if ( realpath( node .c_str(), c_str ) != NULL ) ++ map[ c_str ] .push_back( mountpoint ) ; ++ } ++ } + } + } + +-- +cgit v0.8.2 diff --git a/sys-block/gparted/gparted-0.4.7.ebuild b/sys-block/gparted/gparted-0.4.7.ebuild new file mode 100644 index 000000000000..b275faba6a2c --- /dev/null +++ b/sys-block/gparted/gparted-0.4.7.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/gparted/gparted-0.4.7.ebuild,v 1.1 2009/10/14 18:11:20 mrpouet Exp $ + +EAPI="1" +GCONF_DEBUG="no" + +inherit eutils gnome2 + +DESCRIPTION="Gnome Partition Editor" +HOMEPAGE="http://gparted.sourceforge.net/" + +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="dmraid fat gnome hfs jfs kde ntfs reiserfs reiser4 xfs xfce" + +common_depends=">=sys-apps/parted-1.7.1 + >=dev-cpp/gtkmm-2.8.0" + +RDEPEND="${common_depends} + gnome? ( x11-libs/gksu ) + xfce? ( x11-libs/gksu ) + kde? ( || ( kde-base/kdesu kde-base/kdebase ) ) + + >=sys-fs/e2fsprogs-1.41.0 + dmraid? ( || ( + >=sys-fs/lvm2-2.02.45 + sys-fs/device-mapper ) + sys-fs/dmraid + sys-fs/multipath-tools ) + fat? ( sys-fs/dosfstools ) + ntfs? ( sys-fs/ntfsprogs ) + hfs? ( + sys-fs/udev + sys-fs/hfsutils ) + jfs? ( sys-fs/jfsutils ) + reiserfs? ( sys-fs/reiserfsprogs ) + reiser4? ( sys-fs/reiser4progs ) + xfs? ( sys-fs/xfsprogs sys-fs/xfsdump )" + +DEPEND="${common_depends} + >=dev-util/pkgconfig-0.12 + >=dev-util/intltool-0.35.5 + app-text/scrollkeeper + app-text/gnome-doc-utils + app-text/docbook-xml-dtd:4.1.2" + +DOCS="AUTHORS NEWS ChangeLog README" + +src_unpack() { + gnome2_src_unpack + + # Revert upstream changes to use gksu inconditionally + sed "s:Exec=@gksuprog@ :Exec=:" \ + -i gparted.desktop.in.in || die "sed 1 failed" + # Resolve real path for symbolic link devices, + # patch import related to upstream bug #582687 + epatch "${FILESDIR}"/${P}-realpath-symlink-device.patch +} + +pkg_setup() { + G2CONF="${G2CONF} + --enable-doc + --disable-scrollkeeper + GKSUPROG=$(type -P true)" +} + +src_install() { + gnome2_src_install + + if use kde; then + cp "${D}"/usr/share/applications/gparted.desktop \ + "${D}"/usr/share/applications/gparted-kde.desktop + + sed -i "s:Exec=:Exec=kdesu :" "${D}"/usr/share/applications/gparted-kde.desktop + echo "OnlyShowIn=KDE;" >> "${D}"/usr/share/applications/gparted-kde.desktop + fi + + if use gnome || use xfce; then + sed -i "s:Exec=:Exec=gksu :" "${D}"/usr/share/applications/gparted.desktop + echo "OnlyShowIn=GNOME;XFCE;" >> "${D}"/usr/share/applications/gparted.desktop + else + echo "OnlyShowIn=X-NeverShowThis;" >> "${D}"/usr/share/applications/gparted.desktop + fi +} |