# ChangeLog for xfce-base/thunar
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-base/thunar/ChangeLog,v 1.87 2010/03/09 10:41:19 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/thunar/ChangeLog,v 1.88 2010/04/22 15:42:00 ssuominen Exp $
+
+ 22 Apr 2010; Samuli Suominen <ssuominen@gentoo.org>
+ +thunar-1.0.1-r1.ebuild, +files/thunar-1.0.1-fix-umask-handling.patch:
+ Fix umask handling after Create Folder operation wrt #316681 by Ivan
+ Ponomarev.
09 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> thunar-1.0.1.ebuild,
+files/thunar-1.0.1-libpng14.patch:
+AUX thunar-1.0.1-fix-umask-handling.patch 2301 RMD160 909bd25d41aefd40e38ec9b009348edbe91d86a5 SHA1 88ca4f2844418564fe80060bdb9a59905db103ea SHA256 55d3cd91e983d96ad437acd9ea9d8fe9895eda66e72fc173ded10d8fcb30756e
AUX thunar-1.0.1-libpng14.patch 414 RMD160 e9c44d88bf3d995379c89d40283271cae2392684 SHA1 1e24009ec9162bf7ca22827e944d7745cb339a89 SHA256 907c5cfc2e56bffece40e04a580a1557c160162d700d1c0ca817c22e6a6b2ac4
DIST Thunar-1.0.1.tar.bz2 8802672 RMD160 203690b9eb05ca8e5248bb026f98b8e3e6881f2c SHA1 2fcd3a7b0e27b01f059dffc8ffdac94e2b2aa064 SHA256 7a2b6b493463756bbc9c54144fab2f2163bc84f0896b4c06fd225d11025a210d
DIST Thunar-1.1.0.tar.bz2 4008889 RMD160 32dd24f9ebb9c72aba8b206777cdef3048ef07d8 SHA1 b768ee32f360353e4fc70c640da8fd4ee065483b SHA256 6b1f91dd7de661e5cf46db4e487fce536172116660ea7be20edb2fa8cdddfd28
+EBUILD thunar-1.0.1-r1.ebuild 2218 RMD160 eac061567acd72b9b6be8b8eff70f3d4649a60b7 SHA1 81a1c850ff35b51348784d6ea5db78f517e8730c SHA256 a789eca85a6b3c402329d605be9de16c400cbe330b054a8a0cd4b4ff946fbdc7
EBUILD thunar-1.0.1.ebuild 2161 RMD160 a0723ae4174834a381253d70ec14bea55753aa72 SHA1 be904a5630ef6ce2a4733d966a70602ded943f90 SHA256 bd881bcb24c9d0aec404fcfb428a938dddc3cf8d661e373dc0764d8fde80373b
EBUILD thunar-1.1.0.ebuild 1875 RMD160 50f5bd5ce6ac0a1a18b0d3984337ff33e6312bbe SHA1 3257a0c3d39191a35ebb880baab4ff1a2402e299 SHA256 88381274cc1a0489ed3676bcd21610bd333ac19eb19f19287f7fd1ce3444ef86
-MISC ChangeLog 11726 RMD160 e0ed82154e294446d05d332934a69f22de7087a2 SHA1 8ddac469bf3ba80e88a6b56e698e486da6fc24b0 SHA256 7970987ca4a867002b257da0c57cf5454d6ce00f3790643d057db589a50b416a
+MISC ChangeLog 11938 RMD160 073ba47fba0ab9c78d4c512cce7660223c714165 SHA1 e44542c127cc9d3670b6d71972569a2d241195e4 SHA256 b761f725e1492a60c96ece3180b4791d8c618ff6c3805bc8680d0d5cd40ac45b
MISC metadata.xml 234 RMD160 5cf371faf236f472c7d98a92d7103c5a96c4d95a SHA1 f028da2a6c812a70d5a6c159a450899a5c8f29a2 SHA256 acb3aa4d6a184bbefb0ae06cbb0ed0416ecd1b87d01cae543365cfc0e330d8cb
--- /dev/null
+commit eb58c6a6ba7f77c2c16016db064524df598ef421
+Author: Jannis Pohlmann <jannis@xfce.org>
+Date: Sat Oct 3 11:49:41 2009 +0200
+
+ Fix bugs #3532 (umask < 0022 not honoured) and #5813 properly (I hope).
+
+ The previous patch applied in e53de71e6add9b28ba034111a1d19db7def8f7e7
+ made things worse than before: it used DEFFILEMODE which seems to be
+ BSD-specific for creating files. It also reset the umask to 0 when
+ creating the first directory with _thunar_vfs_io_jobs_mkdir().
+
+ What we really want is to use 0777 (dirs) and 0666 (files) and let the
+ standard C system calls like open() apply the umask value. This should
+ work on all POSIX-compliant systems.
+
+ Patch provided by Craig Ringer <craig@postnewspapers.com.au>.
+
+diff --git a/thunar-vfs/thunar-vfs-io-jobs.c b/thunar-vfs/thunar-vfs-io-jobs.c
+index 8d70812..c94523a 100644
+--- a/thunar-vfs/thunar-vfs-io-jobs.c
++++ b/thunar-vfs/thunar-vfs-io-jobs.c
+@@ -432,8 +432,12 @@ _thunar_vfs_io_jobs_create (ThunarVfsJob *job,
+ absolute_path = thunar_vfs_path_dup_string (lp->data);
+
+ again:
+- /* try to create the file at the given path */
+- fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE);
++ /* Try to create the file at the given path.
++ *
++ * Note that despite the 0666 mask, we won't really create a world-writable
++ * file unless the user's umask permits it (ie the umask is 0000).
++ */
++ fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0666);
+ if (G_UNLIKELY (fd < 0))
+ {
+ /* check if the file already exists */
+@@ -707,8 +711,13 @@ _thunar_vfs_io_jobs_mkdir (ThunarVfsJob *job,
+ /* update the progress information */
+ _thunar_vfs_job_process_path (job, lp);
+
+- /* try to create the target directory */
+- if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777 & ~umask(0), THUNAR_VFS_IO_OPS_NONE, error))
++ /* try to create the target directory
++ *
++ * Note that the mode specified here is limited by the user's umask, so we will not
++ * actually be creating a world writable directory unless the user's umask permits
++ * it.
++ */
++ if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777, THUNAR_VFS_IO_OPS_NONE, error))
+ return FALSE;
+ }
+
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/thunar/thunar-1.0.1-r1.ebuild,v 1.3 2010/04/22 15:42:00 ssuominen Exp $
+
+EAPI=2
+MY_P=${P/t/T}
+inherit virtualx xfconf
+
+DESCRIPTION="File manager for Xfce4"
+HOMEPAGE="http://thunar.xfce.org"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="dbus debug doc exif gnome hal pcre startup-notification +trash-plugin"
+
+RDEPEND=">=dev-lang/perl-5.6
+ >=dev-libs/glib-2.6:2
+ >=dev-util/desktop-file-utils-0.14
+ >=media-libs/freetype-2
+ >=media-libs/jpeg-6b:0
+ >=media-libs/libpng-1.2.0
+ virtual/fam
+ >=x11-libs/gtk+-2.6:2
+ x11-libs/libSM
+ >=x11-misc/shared-mime-info-0.20
+ >=xfce-base/exo-0.3.92[hal?]
+ <xfce-base/exo-0.5
+ >=xfce-base/libxfce4util-4.6
+ dbus? ( dev-libs/dbus-glib )
+ exif? ( >=media-libs/libexif-0.6 )
+ hal? ( dev-libs/dbus-glib
+ sys-apps/hal )
+ gnome? ( gnome-base/gconf )
+ pcre? ( >=dev-libs/libpcre-6 )
+ startup-notification? ( x11-libs/startup-notification )
+ trash-plugin? ( dev-libs/dbus-glib
+ >=xfce-base/xfce4-panel-4.6 )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ dev-util/pkgconfig
+ sys-devel/gettext
+ doc? ( dev-libs/libxslt )"
+
+pkg_setup() {
+ PATCHES=( "${FILESDIR}/${P}-libpng14.patch"
+ "${FILESDIR}/${P}-fix-umask-handling.patch" )
+ XFCONF="--disable-dependency-tracking
+ $(use_enable dbus)
+ $(use_enable gnome gnome-thumbnailers)
+ $(use_enable startup-notification)
+ $(use_enable doc xsltproc)
+ $(use_enable exif)
+ $(use_enable pcre)
+ $(use_enable debug)"
+
+ if use hal; then
+ XFCONF="${XFCONF} --enable-dbus --with-volume-manager=hal"
+ else
+ XFCONF="${XFCONF} --with-volume-manager=none"
+ fi
+
+ if use trash-plugin; then
+ XFCONF="${XFCONF} --enable-dbus"
+ else
+ XFCONF="${XFCONF} --disable-tpa-plugin"
+ fi
+ DOCS="AUTHORS ChangeLog FAQ HACKING NEWS README THANKS TODO"
+}
+
+src_test() {
+ Xemake check || die "Xemake check failed"
+}
+
+pkg_postinst() {
+ xfconf_pkg_postinst
+ elog "If you are seeing some odd dbus error, make sure your user is in the"
+ elog "plugdev group. See Gentoo bug #279077 for more info"
+}