Hello community,
here is the log from the commit of package thunar-plugin-shares for openSUSE:Factory
checked in at Fri Mar 18 09:13:11 CET 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/thunar-plugin-shares/thunar-plugin-shares.changes 2011-03-10 17:00:48.000000000 +0100
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------
+Thu Mar 10 14:11:13 UTC 2011 - gber@opensuse.org
+
+- new package (split off from thunar-plugins)
+
calling whatdependson for head-i586
New:
----
thunar-plugin-shares-0.2.0-fix-missing-include.patch
thunar-plugin-shares-0.2.0-port-to-thunarx-2.patch
thunar-plugin-shares.changes
thunar-plugin-shares.spec
thunar-shares-plugin-0.2.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ thunar-plugin-shares.spec ++++++
#
# spec file for package thunar-plugin-shares
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define thunar_version 1.2.0
%define plugin_name thunar-shares-plugin
Name: thunar-plugin-shares
Group: System/GUI/XFCE
Url: http://thunar.xfce.org/plugins.html#thunar-shares-plugin
License: GPLv2+
Version: 0.2.0
Release: 1
Source0: %{plugin_name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM thunar-plugin-shares-0.2.0-port-to-thunarx-2.patch gber@opensuse.org -- Port of thunar-shares-plugin to thunarx-2 from upstream git.
Patch0: thunar-plugin-shares-0.2.0-port-to-thunarx-2.patch
# PATCH-FIX-UPSTREAM thunar-plugin-shares-0.2.0-fix-missing-include.patch gber@opensuse.org -- Fix missing include of glib/gi18n-lib.h for gettext support from upstream git.
Patch1: thunar-plugin-shares-0.2.0-fix-missing-include.patch
Summary: Thunar Plugin for Sharing files using Samba
BuildRequires: intltool
BuildRequires: thunar-devel >= %{thunar_version}
BuildRequires: pkgconfig(thunarx-2)
BuildRequires: xfce4-dev-tools
Requires: thunar >= %{thunar_version}
Recommends: samba
Provides: %{plugin_name} = %{version}
Obsoletes: %{plugin_name} < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Thunar Shares Plugin allows for quickly sharing a directory using Samba
from within Thunar without requiring root access.
%prep
%setup -q -n %{plugin_name}-%{version}
%patch0 -p1
%patch1 -p1
%build
xdt-autogen
%configure --disable-static
make %{?_smp_mflags} V=1
%install
%make_install
# remove unsupported locales
rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK}
%find_lang %{plugin_name}
rm -rf %{buildroot}%{_libdir}/thunarx-2/thunar-shares-plugin.la
%clean
rm -rf "%{buildroot}"
%files -f %{plugin_name}.lang
%defattr(-,root,root)
%{_libdir}/thunarx-2/thunar-shares-plugin.so
%changelog
++++++ thunar-plugin-shares-0.2.0-fix-missing-include.patch ++++++
diff -urNp thunar-shares-plugin-0.2.0.orig/libshares/libshares-util.c thunar-shares-plugin-0.2.0/libshares/libshares-util.c
--- thunar-shares-plugin-0.2.0.orig/libshares/libshares-util.c 2011-01-23 14:23:48.000000000 +0100
+++ thunar-shares-plugin-0.2.0/libshares/libshares-util.c 2011-01-23 14:29:21.000000000 +0100
@@ -24,6 +24,7 @@
#include
#include
+#include
#include
++++++ thunar-plugin-shares-0.2.0-port-to-thunarx-2.patch ++++++
diff -urNp thunar-shares-plugin-0.2.0.orig/configure.in thunar-shares-plugin-0.2.0/configure.in
--- thunar-shares-plugin-0.2.0.orig/configure.in 2009-02-15 21:00:53.000000000 +0100
+++ thunar-shares-plugin-0.2.0/configure.in 2011-01-23 11:16:26.000000000 +0100
@@ -21,7 +21,7 @@ m4_define([tsp_debug_default], [ifelse(t
dnl -------------------------------------------------------
dnl Init autoconf
dnl -------------------------------------------------------
-AC_COPYRIGHT([Copyright (c) 2008 Daniel Morales .])
+AC_COPYRIGHT([Copyright (c) 2009-2010 Daniel Morales .])
AC_INIT([thunar-shares-plugin], [tsp_version], [thunar-dev@xfce.org])
AC_CONFIG_SRCDIR([thunar-plugin/thunar-shares-plugin.c])
AC_PREREQ(2.59)
@@ -49,15 +49,14 @@ AC_PROG_INTLTOOL([0.31])
dnl -------------------------------------------------------
dnl Check headers
dnl -------------------------------------------------------
-AC_CHECK_HEADERS([string.h sys/types.h sys/wait.h time.h])
+AC_CHECK_HEADERS([string.h sys/types.h sys/wait.h time.h sys/stat.h unistd.h])
dnl -------------------------------------------------------
dnl Packages checks
dnl -------------------------------------------------------
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.10.0])
-XDT_CHECK_PACKAGE([THUNARX], [thunarx-1], [0.8.0])
-XDT_CHECK_PACKAGE([THUNARVFS], [thunar-vfs-1], [0.8.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
+XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
dnl -------------------------------------------------------
dnl Languages
diff -urNp thunar-shares-plugin-0.2.0.orig/libshares/libshares-util.c thunar-shares-plugin-0.2.0/libshares/libshares-util.c
--- thunar-shares-plugin-0.2.0.orig/libshares/libshares-util.c 2009-02-15 20:54:41.000000000 +0100
+++ thunar-shares-plugin-0.2.0/libshares/libshares-util.c 2011-01-23 13:06:43.000000000 +0100
@@ -25,18 +25,23 @@
#include
#include
-#include
+#include
+
+#ifdef HAVE_UNISTD_H
+#include
+#endif
+
+#include
#include
#include "libshares-util.h"
#include "shares.h"
-static gboolean tsp_ask_perms (gboolean need_r,
- gboolean need_w,
- gboolean need_x);
+static gboolean tsp_ask_perms (void);
static gboolean tsp_check_perms (const gchar *path,
- gboolean is_writable);
+ gboolean is_writable,
+ gboolean guests_ok);
/**
* libshares_get_local_file:
@@ -190,7 +195,7 @@ libshares_shares_share (const gchar *fi
}
}
- if (tsp_check_perms (file_local, is_writable))
+ if (tsp_check_perms (file_local, is_writable, guests_ok))
{
share_info = g_new0 (ShareInfo, 1);
@@ -289,17 +294,17 @@ gboolean
libshares_is_shareable (ThunarxFileInfo *info)
{
gboolean retval;
- gchar *scheme;
+ GFile *file;
if (!thunarx_file_info_is_directory (info)){
return FALSE;
}
- scheme = thunarx_file_info_get_uri_scheme (info);
+ file = thunarx_file_info_get_location (info);
- retval = g_str_equal ("file", scheme);
+ retval = g_file_is_native (file);
- g_free (scheme);
+ g_object_unref (file);
return retval;
}
@@ -315,19 +320,22 @@ libshares_is_shareable (ThunarxFileInfo
gboolean
libshares_check_owner (ThunarxFileInfo *info)
{
- ThunarVfsInfo *vfsinfo;
- gboolean retval = TRUE;
- gboolean owner_only;
+ GFileInfo *fileinfo;
+ gboolean retval = TRUE;
+ gboolean owner_only;
+ guint32 uid;
if (shares_has_owner_only (&owner_only, NULL))
{
if (owner_only)
{
- vfsinfo = thunarx_file_info_get_vfs_info (info);
+ fileinfo = thunarx_file_info_get_file_info (info);
- retval = (geteuid () == vfsinfo->uid);
+ uid = g_file_info_get_attribute_uint32 (fileinfo, G_FILE_ATTRIBUTE_UNIX_UID);
- thunar_vfs_info_unref (vfsinfo);
+ retval = (geteuid () == uid);
+
+ g_object_unref (fileinfo);
}
}
@@ -336,9 +344,7 @@ libshares_check_owner (ThunarxFileInfo *
/* Asks to the user if we can change the permissions of the folder */
static gboolean
-tsp_ask_perms (gboolean need_r,
- gboolean need_w,
- gboolean need_x)
+tsp_ask_perms (void)
{
return libshares_ask_user (_("Thunar needs to add some permissions to your folder in order to share it. Do you agree?"));
}
@@ -346,35 +352,33 @@ tsp_ask_perms (gboolean need_r,
/* Checks if the current file has the necesary permissions */
static gboolean
tsp_check_perms (const gchar *path,
- gboolean is_writable)
+ gboolean is_writable,
+ gboolean guests_ok)
{
struct stat st;
- gboolean need_r;
- gboolean need_w;
- gboolean need_x;
mode_t new_mode;
mode_t mode;
+ mode_t need_mask;
- if (stat (path, &st) != 0)
+ if (g_stat (path, &st) != 0)
return FALSE;
- mode = st.st_mode;
-
- new_mode = mode;
+ new_mode = mode = st.st_mode;
- need_r = (mode & THUNAR_VFS_FILE_MODE_OTH_READ) == 0;
- new_mode |= THUNAR_VFS_FILE_MODE_OTH_READ;
+ /* go+rx is necesary to guest enabled shares */
+ if (guests_ok)
+ new_mode |= (S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
- need_w = is_writable && (mode & THUNAR_VFS_FILE_MODE_OTH_WRITE) == 0;
- if (need_w)
- new_mode |= THUNAR_VFS_FILE_MODE_OTH_WRITE;
+ /* go+w is necesary to writable shares */
+ if (is_writable)
+ new_mode |= (S_IWGRP | S_IWOTH);
- need_x = (mode & THUNAR_VFS_FILE_MODE_OTH_EXEC) == 0;
- new_mode |= THUNAR_VFS_FILE_MODE_OTH_EXEC;
+ /* Compare both modes */
+ need_mask = new_mode & ~mode;
- if (need_r || need_w || need_x)
+ if (need_mask != 0)
{
- if (!tsp_ask_perms (need_r, need_w, need_x))
+ if (!tsp_ask_perms ())
return FALSE;
#ifdef G_ENABLE_DEBUG
g_message ("Changing permissions of '%s'", path);
diff -urNp thunar-shares-plugin-0.2.0.orig/libshares/Makefile.am thunar-shares-plugin-0.2.0/libshares/Makefile.am
--- thunar-shares-plugin-0.2.0.orig/libshares/Makefile.am 2009-02-15 20:54:41.000000000 +0100
+++ thunar-shares-plugin-0.2.0/libshares/Makefile.am 2011-01-23 11:16:26.000000000 +0100
@@ -17,14 +17,12 @@ libshares_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
$(GTK_CFLAGS) \
$(GLIB_CFLAGS) \
- $(THUNARX_CFLAGS) \
- $(THUNARVFS_CFLAGS)
+ $(THUNARX_CFLAGS)
libshares_la_LDFLAGS = \
$(GTK_LIBS) \
$(GLIB_LIBS) \
$(THUNARX_LIBS) \
- $(THUNARVFS_LIBS) \
$(PLATFORM_LDFLAGS)
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff -urNp thunar-shares-plugin-0.2.0.orig/thunar-plugin/Makefile.am thunar-shares-plugin-0.2.0/thunar-plugin/Makefile.am
--- thunar-shares-plugin-0.2.0.orig/thunar-plugin/Makefile.am 2009-02-15 20:54:41.000000000 +0100
+++ thunar-shares-plugin-0.2.0/thunar-plugin/Makefile.am 2011-01-23 11:16:26.000000000 +0100
@@ -7,7 +7,7 @@ INCLUDES = \
-DDATADIR=\"$(datadir)\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-1
+extensionsdir = $(libdir)/thunarx-2
extensions_LTLIBRARIES = thunar-shares-plugin.la
thunar_shares_plugin_la_SOURCES = \
@@ -19,8 +19,7 @@ thunar_shares_plugin_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
$(GTK_CFLAGS) \
$(GLIB_CFLAGS) \
- $(THUNARX_CFLAGS) \
- $(THUNARVFS_CFLAGS)
+ $(THUNARX_CFLAGS)
thunar_shares_plugin_la_LDFLAGS = \
-avoid-version \
@@ -29,7 +28,6 @@ thunar_shares_plugin_la_LDFLAGS = \
$(GTK_LIBS) \
$(GLIB_LIBS) \
$(THUNARX_LIBS) \
- $(THUNARVFS_LIBS) \
$(PLATFORM_LDFLAGS)
thunar_shares_plugin_la_LIBADD= \
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org