debian/0000755000000000000000000000000012237155666007203 5ustar debian/README.source0000644000000000000000000000350711642542130011350 0ustar This package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. To configure quilt to use debian/patches instead of patches, you want either to export QUILT_PATCHES=debian/patches in your environment or use this snippet in your ~/.quiltrc: for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then export QUILT_PATCHES=debian/patches fi done To get the fully patched source after unpacking the source package, cd to the root level of the source package and run: quilt push -a The last patch listed in debian/patches/series will become the current patch. To add a new set of changes, first run quilt push -a, and then run: quilt new where is a descriptive name for the patch, used as the filename in debian/patches. Then, for every file that will be modified by this patch, run: quilt add before editing those files. You must tell quilt with quilt add what files will be part of the patch before making changes or quilt will not work properly. After editing the files, run: quilt refresh to save the results as a patch. Alternately, if you already have an external patch and you just want to add it to the build system, run quilt push -a and then: quilt import -P /path/to/patch quilt push -a (add -p 0 to quilt import if needed). as above is the filename to use in debian/patches. The last quilt push -a will apply the patch to make sure it works properly. To remove an existing patch from the list of patches that will be applied, run: quilt delete You may need to run quilt pop -a to unapply patches first before running this command. debian/README.Debian0000644000000000000000000000125611642542130011231 0ustar nautilus-share for Debian ------------------------- A quick and easy way to have it running (must be done as root): #export USERSHARES_DIR="/var/lib/samba/usershares" #export USERSHARES_GROUP="sambashare" #mkdir ${USERSHARES_DIR} #groupadd ${USERSHARES_GROUP} #chown root:${USERSHARES_GROUP} ${USERSHARES_DIR} #chmod 01770 ${USERSHARES_DIR} #mv /etc/samba/smb.conf{,.bak} #cp /usr/share/doc/nautilus-share/examples/smb.conf /etc/samba/ #/etc/init.d/samba restart You must add users who can share folder in the usershare group, in this example the group is "sambashare": #usermod -a -G sambashare your_username -- Chow Loong Jin , Federico Mena Quintero Upstream-Source: http://gentoo.ovibes.net/nautilus-share/ Files: * Copyright: Copyright 2005 Ethium, Inc. License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, a full copy of this license can be found in /usr/share/common-licenses/GPL-2 Files: debian/* Copyright: Copyright 2007-2008, Thierry Randrianiriana Copyright: Copyright 2009, Chow Loong Jin License: GPL-2+ debian/changelog0000644000000000000000000002400412237155572011051 0ustar nautilus-share (0.7.3-1ubuntu5) trusty; urgency=low * Add debian/patches/04_change_share_labels.patch + Ayatana Design requests that "Sharing Options" and "Share" in Nautilus properties be changed to "Local Network Share" to avoid user confusion about sharing. (LP: #1214534) -- Chris Townsend Tue, 20 Aug 2013 16:58:50 -0400 nautilus-share (0.7.3-1ubuntu4) saucy; urgency=low * Use the autotools-dev dh addon to update config.guess/config.sub for arm64. -- Colin Watson Mon, 14 Oct 2013 10:52:24 +0100 nautilus-share (0.7.3-1ubuntu3) quantal; urgency=low * Rebuild for new armel compiler default of ARMv5t. -- Colin Watson Mon, 08 Oct 2012 08:34:33 +0100 nautilus-share (0.7.3-1ubuntu2) precise; urgency=low * No-change rebuild against libnautilus-extension1a. -- Martin Pitt Mon, 12 Dec 2011 09:21:00 +0100 nautilus-share (0.7.3-1ubuntu1) oneiric; urgency=low * Add debian/patches/03_use_apturl.patch + Transition synaptic to apturl (LP: #840292) -- Mitsuya Shibata Tue, 04 Oct 2011 10:34:37 +0200 nautilus-share (0.7.3-1) unstable; urgency=low * [216b642] Update watch URL * [5935de3] Imported Upstream version 0.7.3 (Closes: #630248) * [aee4fd0] Drop upstreamed patches * [8b469c0] Refresh 02_install_missing_samba.patch * [b3611df] Refresh 99_ltmain_as-needed.patch * [a049722] Drop explicit libglib2.0-dev build-dep * [63b282f] Move to dh7 -- Chow Loong Jin Fri, 08 Jul 2011 19:29:57 +0800 nautilus-share (0.7.2-15) experimental; urgency=low * debian/patches/02_install_missing_samba.patch, debian/patches/05_dependencies.patch, debian/patches/11_use-gio.patch: + Drop libgnomeui dependency as part of the GNOME 3 cleaning effort (LP: #664745). Thanks Michael Terry for the patch * debian/source/format: Move to 3.0 (quilt) * debian/patches/*: Refresh all patches for 3.0 (quilt) since dpkg-source is less tolerant -- Chow Loong Jin Sat, 06 Nov 2010 13:01:19 +0800 nautilus-share (0.7.2-14) unstable; urgency=low * debian/patches/15_user-acl.patch: + Fix inverted logic when freeing memory causing nautilus to crash (LP: #655721) * debian/control: No change Standards-version bump from 3.8.4 to 3.9.1 -- Chow Loong Jin Fri, 22 Oct 2010 14:46:29 +0800 nautilus-share (0.7.2-13) unstable; urgency=low * debian/patches/02_install_missing_samba.patch: + Fix bug where restarting session does not work due to gnome_master_client () yielding NULL (LP: #487474) * debian/patches/15_user-acl.patch: + Make owner have full control over share (LP: #480316) * debian/patches/*: + Update DEP3 tags * debian/control: + No change bump of Standards-Version -- Chow Loong Jin Sat, 17 Apr 2010 21:03:23 +0800 nautilus-share (0.7.2-12) unstable; urgency=low * debian/patches/02_install_missing_samba.patch: + Correct spelling "ou" to "you" * debian/control: + No change Standards-Version bump to 3.8.3 * debian/README.source: + Copied from /usr/share/doc/quilt to satisfy lintian * debian/patches/12_undoable-action.patch: + Fix "Create Share" wording to "Create _Share" which resulted in untranslated strings. * debian/patches/14_glade-to-gtkbuilder.patch: + Transition po files properly, and patch .ui file in instead of auto-generating it. Also, manually specify gettext domain for GtkBuilder. Fixes issue where interface loaded from GtkBuilder file is untranslated. (LP: #425677) -- Chow Loong Jin Tue, 08 Sep 2009 03:32:03 +0800 nautilus-share (0.7.2-11) unstable; urgency=low * debian/control: + Add samba-common-bin to binary dependencies, since testparm has been moved to samba-common-bin (Closes: #536271) -- Chow Loong Jin Thu, 09 Jul 2009 13:03:49 +0800 nautilus-share (0.7.2-10) unstable; urgency=low * debian/patches/12_undoable-action.patch: + Fix bug where user is unable to undo sharing/unsharing a folder without closing the property window (LP: #392165) * debian/patches/13_permissions.patch: + Don't require permissions go+rx on folders to be shared any more, since * debian/patches/14_glade-to-gtkbuilder.patch: + Migrate from glade to gtkbuilder samba doesn't appear to have that requirement * debian/patches/*.patch: + Organize/Add information to patch headers as per DEP-3 * debian/control: + Drop libglade2-dev build dependency -- Chow Loong Jin Wed, 01 Jul 2009 05:16:40 +0800 nautilus-share (0.7.2-9) unstable; urgency=low * debian/patches/05_dependencies.patch, 11_use-gio.patch: + Drop GnomeVFS dependency and use GIO instead. Thanks Andreas Henriksson for the patch * debian/control: + Bump Standards-Version to 3.8.2 + Add Enhances: nautilus + Drop libgnomevfs2-dev build-dependency -- Chow Loong Jin Mon, 22 Jun 2009 01:18:11 +0800 nautilus-share (0.7.2-8) unstable; urgency=low * debian/patches/10_fix-writable-detection.patch: + Fix parsing of share writability from the output of net (LP: #280480) * debian/rules: + Add -Wl,-z,defs to LDFLAGS -- Chow Loong Jin Sun, 21 Jun 2009 16:37:48 +0800 nautilus-share (0.7.2-7) unstable; urgency=low * debian/patches/08_change-confusing-wording.patch: + Change some confusing wording: "Allow other people to write in this folder" to "Allow others to make changes in this folder" (LP: #385801) * debian/patches/09_change-comments-location.patch: + Change confusing position of "Comment" field (LP: #385801) * debian/patches/*.patch: + Amend patch headers, the top line was accidentally excluded from all of them * debian/control: + Change of email address in Maintainer field -- Chow Loong Jin Fri, 12 Jun 2009 00:51:17 +0800 nautilus-share (0.7.2-6) unstable; urgency=low * debian/control: + Bumped up samba suggests to 3.0.27a + Depends on samba-common 3.0.27a for "net" binary * debian/patches/*: + Add descriptions to patches * debian/patches/01_fix_install_dir.patch: + Drop FIXME lines from Makefile.am and Makefile.in, since it's fixed + Fix Makefile.in to grab extensiondir from pkg-config as well + Use $(PKG_CONFIG) instead of pkg-config directly * debian/patches/02_install_missing_samba.patch: + Rewritten to fix LP: #258570, and also be more robust when attempting to enable sharing of multiple directories while installing samba. * debian/patches/07_set-title.patch: + Manually set the title of the Sharing Options dialog so that it can be translated (LP: #356191) -- Chow Loong Jin Mon, 11 May 2009 00:55:13 +0800 nautilus-share (0.7.2-5) unstable; urgency=low * debian/control, debian/patches/05_dependencies.patch: + Drop libeel dependency (Closes: #525543) * debian/control: + Bump Standards-Version -- Chow Loong Jin Mon, 27 Apr 2009 03:22:34 +0800 nautilus-share (0.7.2-4) unstable; urgency=low * debian/patches/06_fix-validation.patch: + Fix issue where field validation errors aren't cleared after being corrected * debian/patches/02_install_missing_samba.patch: + Ask to retry if installation failed -- Chow Loong Jin Sat, 21 Mar 2009 20:11:02 +0800 nautilus-share (0.7.2-3) unstable; urgency=low * debian/patches/04_use_correct_icon.patch: + Use folder-remote instead of gnome-fs-share -- Chow Loong Jin Fri, 20 Mar 2009 01:37:56 +0800 nautilus-share (0.7.2-2) unstable; urgency=low * debian/patches/04_use_correct_icon.patch: + Updated to fix icon in properties dialog as well -- Chow Loong Jin Thu, 19 Mar 2009 23:21:45 +0800 nautilus-share (0.7.2-1) unstable; urgency=low * New upstream release * debian/control: + Change maintainer (Closes: #501938) + Change build-dep to include CDBS and Quilt + Move samba from Depends to Suggests since 02_install_missing_samba.patch allows for automatic installing of samba + Add libgnomevfs2-dev dependency * debian/rules: + Move to CDBS + Build translation templates + Omit installing useless doc files (retain AUTHORS only) + Add -Wl,--as-needed to LDFLAGS to drop unnecessary dependencies * debian/examples: + Add smb.conf to this * debian/copyright: + Switched to new copyright format + Added another name to Upstream-Maintainers * debian/docs: + Dropped, not needed. * debian/smb.conf, debian/README.Debian: + Update usershare directory (Closes: #500443) * Import patches from Ubuntu: + debian/patches/01_fix_install_dir.patch: - Fix install dir location for nautilus extensions (Closes: #475230) - Modified to use extension path from pkg-config + debian/patches/02_install_missing_samba.patch: - Ask to install samba and libpam-smbpass if it is not installed already + debian/patches/03_no_verbose_logging.patch: - Don't print extra messages in session logs when there is no issue - Modified to also omit initializing and shutdown messages + debian/patches/04_use_correct_icon.patch: - Use gnome-fs-share icon in Nautilus * debian/patches/05_dependencies.patch: + Add needed cflags and libs from libgnomeui-2.0 and gnome-vfs-2.0 * debian/patches/99_ltmain_as-needed.patch: + Imported from Banshee packaging, adds -Wl,--as-needed support -- Chow Loong Jin Wed, 18 Mar 2009 00:30:15 +0800 nautilus-share (0.7.1-2) unstable; urgency=low * Upload to unstable * Added an example of samba configuration file -- Thierry Randrianiriana Sun, 29 Apr 2007 18:48:52 +0300 nautilus-share (0.7.1-1) experimental; urgency=low * Initial release (Closes: #315229) -- Thierry Randrianiriana Sun, 18 Mar 2007 08:21:12 +0300 debian/rules0000755000000000000000000000056612226737317010267 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 export LDFLAGS += -Wl,-z,defs -Wl,--as-needed override_dh_auto_build: dh_auto_build cd po; intltool-update -p --verbose override_dh_auto_install: dh_auto_install find debian/nautilus-share -name '*.*a' -delete override_dh_auto_test: # disable tests override_dh_makeshlibs: # disable shlibs %: dh $@ --with autotools_dev debian/source/0000755000000000000000000000000011642543010010462 5ustar debian/source/format0000644000000000000000000000001411642542130011672 0ustar 3.0 (quilt) debian/control0000644000000000000000000000147511642542231010600 0ustar Source: nautilus-share Section: gnome Priority: optional Maintainer: Chow Loong Jin Build-Depends: debhelper (>= 7.0.50), autotools-dev, intltool (>= 0.29), libnautilus-extension-dev (>= 2.10.0) Standards-Version: 3.9.1 Homepage: http://gentoo.ovibes.net/nautilus-share/ Package: nautilus-share Architecture: any Depends: nautilus (>= 2.10), samba-common (>= 3.0.27a), samba-common-bin | samba-common (<< 2:3.4.0~pre2-1~0), gnome-session-bin, apturl, ${shlibs:Depends}, ${misc:Depends} Enhances: nautilus Suggests: samba (>= 3.0.27a) Description: Nautilus extension to share folder using Samba Nautilus Share allows you to quickly share a folder from the GNOME Nautilus file manager without requiring root access. debian/compat0000644000000000000000000000000211642542130010362 0ustar 5 debian/smb.conf0000644000000000000000000000027411642542130010617 0ustar [global] workgroup = HOME security = share usershare path = /var/lib/samba/usershares usershare max shares = 100 usershare allow guests = yes usershare owner only = yes wins support = no debian/watch0000644000000000000000000000015611642542130010217 0ustar version=3 http://ftp.gnome.org/pub/GNOME/sources/nautilus-share/([0-9.]+)/ nautilus-share-([0-9.]+)\.tar\.bz2 debian/examples0000644000000000000000000000002011642542130010715 0ustar debian/smb.conf debian/patches/0000755000000000000000000000000012237155655010630 5ustar debian/patches/02_install_missing_samba.patch0000644000000000000000000002222211642542130016477 0ustar # Description: Auto install samba and libpam-samba if needed. # Origin: vendor # Forwarded: not-needed # Author: Michael Vogt # Reviewed-By: Sebastien Bacher # Reviewed-By: Didier Roche # Reviewed-By: Chow Loong Jin # Reviewed-By: Michael Terry Index: nautilus-share/src/nautilus-share.c =================================================================== --- nautilus-share.orig/src/nautilus-share.c 2011-07-08 10:45:31.000000000 +0800 +++ nautilus-share/src/nautilus-share.c 2011-07-08 10:47:55.845693427 +0800 @@ -39,6 +39,9 @@ #include +#include +#include + #include #include @@ -46,6 +49,7 @@ #include #include #include +#include #include "shares.h" @@ -579,8 +583,279 @@ page->is_dirty = TRUE; property_page_check_sensitivity (page); } - /*--------------------------------------------------------------------------*/ +/*---------------------begin samba auto-install code------------------------*/ +static gboolean +check_samba_installed () +{ + return g_file_test ("/usr/sbin/smbd", G_FILE_TEST_IS_EXECUTABLE); +} + +/* a linked list of PropertyPages waiting for samba to be installed */ +static GList *pages_waiting_for_samba = NULL; +/* TRUE if currently installing samba, FALSE otherwise */ +static gboolean is_installing_samba = FALSE; + +static void +finish_samba_installation (gboolean success) +{ + gint response; + GtkWidget* dialog_ask_restart; + + is_installing_samba = FALSE; + + while (pages_waiting_for_samba) + { + PropertyPage *current = pages_waiting_for_samba->data; + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (current->checkbutton_share_folder), success); + property_page_check_sensitivity (current); + pages_waiting_for_samba = g_list_remove (pages_waiting_for_samba, current); + } + + if (!success) + return; + + /* if we're successful, then ask to restart to make libpam-smbpass create + NTLM password hash */ + dialog_ask_restart = gtk_message_dialog_new ( + NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("Restart your session")); + gtk_message_dialog_format_secondary_markup ( + GTK_MESSAGE_DIALOG (dialog_ask_restart), + _("You need to restart your session in order to enable sharing.")); + gtk_dialog_add_button (GTK_DIALOG (dialog_ask_restart), _("Restart session"), + GTK_RESPONSE_OK); + response = gtk_dialog_run (GTK_DIALOG (dialog_ask_restart)); + gtk_widget_destroy (dialog_ask_restart); + + if (response == GTK_RESPONSE_OK) { + g_spawn_command_line_async ("gnome-session-save --logout", NULL); + } +} + +static void +set_environment (gpointer display) +{ + g_setenv ("DISPLAY", display, TRUE); +} + +static gboolean +spawn_synaptic (GtkWidget *window, const gchar *path, gint *child_pid) +{ + GError *error = NULL; + gboolean retval = TRUE; + gchar **argv; + gchar *display; + + { /* generate argv */ + gchar *synaptic_path = g_find_program_in_path ("synaptic"); + gint i = 0; + + argv = g_new0 (gchar*, 5); + argv[i++] = g_find_program_in_path ("gksu"); + argv[i++] = g_strdup ("--desktop"); + argv[i++] = g_strdup ("/usr/share/applications/synaptic.desktop"); + argv[i++] = g_strdup_printf ("%s --hide-main-window " + "--set-selections-file %s " + "--non-interactive " + "--parent-window-id %d", + synaptic_path, + path, + GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window)))); + argv[i++] = NULL; + + g_free (synaptic_path); + } + + display = + gdk_screen_make_display_name (gtk_window_get_screen (GTK_WINDOW (window))); + + if (!g_spawn_async (NULL, /* working directory */ + argv, + NULL, /* envp */ + G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, + set_environment, display, child_pid, &error)) + { fprintf (stderr, "synaptic spawn failed; %s", (error) ? error->message : ""); + g_error_free (error); + retval = FALSE; + } + + g_strfreev (argv); + g_free (display); + + return retval; + + +} + +static gboolean +on_wait_timeout (gpointer data) +{ + gint pid, status; + + pid = GPOINTER_TO_INT (data); + + if (waitpid (pid, &status, WNOHANG) > 0) + { + gtk_main_quit (); + return FALSE; + } + + return TRUE; +} + +static gboolean +wait_for_synaptic (GtkWindow *window, pid_t pid) +{ + gint timer; + + /* set the cursor to a watch */ + GdkCursor *cursor = gdk_cursor_new (GDK_WATCH); + gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor); + gtk_widget_set_sensitive (GTK_WIDGET (window), FALSE); + + /* wait until synaptic is done */ + timer = g_timeout_add (500, on_wait_timeout, GINT_TO_POINTER (pid)); + gtk_main (); + g_source_remove (timer); + + /* set the cursor to nothing */ + gtk_widget_set_sensitive (GTK_WIDGET (window), FALSE); + gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL); + + gdk_cursor_unref (cursor); + + return check_samba_installed (); +} + +static gchar* +create_temp_file (const gchar *packages[]) +{ + int fd; + gchar *path, *str; + + path = g_strdup_printf ("/tmp/packages.XXXXXX"); + fd = mkstemp (path); + + while (*packages) + { + str = g_strdup_printf ("%s\ti\n", *packages); + write (fd, str, strlen (str)); + g_free (str); + packages++; + } + + close (fd); + return path; +} + +static void +run_synaptic (GtkWidget *window) +{ + gchar *path; + GtkWidget* dialog_ask_retry; + gboolean success = FALSE; + + /* generate list of packages for installing */ + { + const gchar *packages[] = { + "samba", + "libpam-smbpass", + NULL + }; + path = create_temp_file (packages); + } + + /* generate dialog_ask_retry */ + dialog_ask_retry = gtk_message_dialog_new (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("Sharing service installation failed")); + gtk_message_dialog_format_secondary_markup ( + GTK_MESSAGE_DIALOG (dialog_ask_retry), + _("Sharing service installation has failed. Would you like to retry the " + "installation?")); + gtk_dialog_add_button (GTK_DIALOG (dialog_ask_retry), + _("Retry"), + GTK_RESPONSE_OK); + + /* loop until either installed successfully, or user cancels */ + for (;;) + { + gint response; /* response from dialog */ + pid_t pid; /* synaptic's pid */ + + if (spawn_synaptic (window, path, &pid)) + if ((success = wait_for_synaptic (GTK_WINDOW (window), pid))) + break; + + response = gtk_dialog_run (GTK_DIALOG (dialog_ask_retry)); + gtk_widget_hide (dialog_ask_retry); + if (response != GTK_RESPONSE_OK) + { + success = FALSE; + break; + } + } + + /* clean up */ + gtk_widget_destroy (dialog_ask_retry); + finish_samba_installation (success); +} + +static void +start_samba_installation () +{ + gint response; /* response from dialog */ + GtkWidget* dialog; + + /* ask to install samba */ + dialog = gtk_message_dialog_new (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("Sharing service is not installed")); + gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), + _("You need to install the Windows networks " + "sharing service in order to share your folders.")); + gtk_dialog_add_button (GTK_DIALOG (dialog), _("Install service"), GTK_RESPONSE_OK); + response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_hide (dialog); + + if (response != GTK_RESPONSE_OK) + finish_samba_installation (FALSE); + else + { + is_installing_samba = TRUE; + run_synaptic (dialog); + } + gtk_widget_destroy (dialog); +} + +static void +wait_samba_installation (PropertyPage *page) +{ + /* if installed, do nothing */ + if (check_samba_installed ()) + return; + + pages_waiting_for_samba = g_list_prepend (pages_waiting_for_samba, page); + + /* start samba installation if not already started */ + if (!is_installing_samba) + start_samba_installation (); +} + +static void +unwait_samba_installation (PropertyPage *page) +{ + pages_waiting_for_samba = g_list_remove (pages_waiting_for_samba, page); +} +/*---------------------end samba auto-install code--------------------------*/ static void on_checkbutton_share_folder_toggled (GtkToggleButton *togglebutton, gpointer user_data) @@ -589,7 +864,13 @@ page = user_data; - property_page_check_sensitivity (page); + if (check_samba_installed ()) + property_page_check_sensitivity (page); + else if (gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON (page->checkbutton_share_folder))) + wait_samba_installation (page); + else + unwait_samba_installation (page); } static void @@ -625,6 +906,7 @@ page = data; + unwait_samba_installation (page); g_free (page->path); g_object_unref (page->fileinfo); g_object_unref (page->xml); debian/patches/99_ltmain_as-needed.patch0000644000000000000000000000217211642542130015350 0ustar # Description: Fix ltmain.sh to allow -Wl,--as-needed to be passed properly to # reduce dependencies # Origin: vendor # Forwarded: not-needed --- ltmain.sh | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) Index: nautilus-share/ltmain.sh =================================================================== --- nautilus-share.orig/ltmain.sh 2011-07-08 11:06:58.161049655 +0800 +++ nautilus-share/ltmain.sh 2011-07-08 11:10:44.909862117 +0800 @@ -4716,6 +4716,11 @@ arg=$func_stripname_result ;; + -Wl,--as-needed) + deplibs="$deplibs $arg" + continue + ;; + -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result @@ -5070,6 +5075,15 @@ lib= found=no case $deplib in + -Wl,--as-needed) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + fi + continue + ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" debian/patches/series0000644000000000000000000000031112237155655012040 0ustar # This series applies on GIT commit 637d65ba140214baf3889ee664c594ccc851c59d 02_install_missing_samba.patch 03_use_apturl.patch 15_user-acl.patch 99_ltmain_as-needed.patch 04_change_share_labels.patch debian/patches/15_user-acl.patch0000644000000000000000000000255711642542130013665 0ustar # Description: Grant full access to creator of share # Origin: vendor # Author: Chow Loong Jin # Forwarded: no # Bug-Ubuntu: https://bugs.launchpad.net/bugs/480316 Index: nautilus-share/src/shares.c =================================================================== --- nautilus-share.orig/src/shares.c 2009-12-15 19:19:37.381682791 +0800 +++ nautilus-share/src/shares.c 2009-12-15 19:19:52.489203930 +0800 @@ -605,6 +605,7 @@ GError *real_error; gboolean supports_success; gboolean supports_guest_ok; + gboolean net_usershare_success; /* g_message ("add_share() start"); */ @@ -626,7 +627,7 @@ argv[2] = info->share_name; argv[3] = info->path; argv[4] = info->comment; - argv[5] = info->is_writable ? "Everyone:F" : "Everyone:R"; + argv[5] = info->is_writable ? "Everyone:F" : g_strdup_printf ("Everyone:R,%s:F", g_get_user_name ()); if (supports_guest_ok) { argv[6] = info->guest_ok ? "guest_ok=y" : "guest_ok=n"; @@ -635,7 +636,10 @@ argc = 6; real_error = NULL; - if (!net_usershare_run (argc, argv, &key_file, &real_error)) { + net_usershare_success = net_usershare_run (argc, argv, &key_file, &real_error); + if (!info->is_writable) g_free (argv[5]); + + if (!net_usershare_success) { g_message ("Called \"net usershare add\" but it failed: %s", real_error->message); g_propagate_error (error, real_error); return FALSE; debian/patches/03_use_apturl.patch0000644000000000000000000000741611642542231014333 0ustar Index: nautilus-share/src/nautilus-share.c =================================================================== --- nautilus-share.orig/src/nautilus-share.c 2011-09-23 00:00:15.658603671 +0900 +++ nautilus-share/src/nautilus-share.c 2011-09-23 00:00:43.718603857 +0900 @@ -643,7 +643,7 @@ } static gboolean -spawn_synaptic (GtkWidget *window, const gchar *path, gint *child_pid) +spawn_apturl (GtkWidget *window, const gchar *packages, gint *child_pid) { GError *error = NULL; gboolean retval = TRUE; @@ -651,23 +651,12 @@ gchar *display; { /* generate argv */ - gchar *synaptic_path = g_find_program_in_path ("synaptic"); gint i = 0; - argv = g_new0 (gchar*, 5); - argv[i++] = g_find_program_in_path ("gksu"); - argv[i++] = g_strdup ("--desktop"); - argv[i++] = g_strdup ("/usr/share/applications/synaptic.desktop"); - argv[i++] = g_strdup_printf ("%s --hide-main-window " - "--set-selections-file %s " - "--non-interactive " - "--parent-window-id %d", - synaptic_path, - path, - GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window)))); + argv = g_new0 (gchar*, 3); + argv[i++] = g_find_program_in_path ("apturl"); + argv[i++] = g_strdup_printf ("apt:%s", packages); argv[i++] = NULL; - - g_free (synaptic_path); } display = @@ -678,7 +667,7 @@ NULL, /* envp */ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, set_environment, display, child_pid, &error)) - { fprintf (stderr, "synaptic spawn failed; %s", (error) ? error->message : ""); + { fprintf (stderr, "apturl spawn failed; %s", (error) ? error->message : ""); g_error_free (error); retval = FALSE; } @@ -708,7 +697,7 @@ } static gboolean -wait_for_synaptic (GtkWindow *window, pid_t pid) +wait_for_apturl (GtkWindow *window, pid_t pid) { gint timer; @@ -717,7 +706,7 @@ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor); gtk_widget_set_sensitive (GTK_WIDGET (window), FALSE); - /* wait until synaptic is done */ + /* wait until apturl is done */ timer = g_timeout_add (500, on_wait_timeout, GINT_TO_POINTER (pid)); gtk_main (); g_source_remove (timer); @@ -731,43 +720,14 @@ return check_samba_installed (); } -static gchar* -create_temp_file (const gchar *packages[]) -{ - int fd; - gchar *path, *str; - - path = g_strdup_printf ("/tmp/packages.XXXXXX"); - fd = mkstemp (path); - - while (*packages) - { - str = g_strdup_printf ("%s\ti\n", *packages); - write (fd, str, strlen (str)); - g_free (str); - packages++; - } - - close (fd); - return path; -} - static void -run_synaptic (GtkWidget *window) +run_apturl (GtkWidget *window) { - gchar *path; GtkWidget* dialog_ask_retry; gboolean success = FALSE; /* generate list of packages for installing */ - { - const gchar *packages[] = { - "samba", - "libpam-smbpass", - NULL - }; - path = create_temp_file (packages); - } + const gchar *packages = "samba,libpam-smbpass"; /* generate dialog_ask_retry */ dialog_ask_retry = gtk_message_dialog_new (NULL, @@ -787,10 +747,10 @@ for (;;) { gint response; /* response from dialog */ - pid_t pid; /* synaptic's pid */ + pid_t pid; /* apturl's pid */ - if (spawn_synaptic (window, path, &pid)) - if ((success = wait_for_synaptic (GTK_WINDOW (window), pid))) + if (spawn_apturl (window, packages, &pid)) + if ((success = wait_for_apturl (GTK_WINDOW (window), pid))) break; response = gtk_dialog_run (GTK_DIALOG (dialog_ask_retry)); @@ -831,7 +791,7 @@ else { is_installing_samba = TRUE; - run_synaptic (dialog); + run_apturl (dialog); } gtk_widget_destroy (dialog); } debian/patches/04_change_share_labels.patch0000644000000000000000000000207412237155655016110 0ustar # Description: Change wording of "Share Options" and "Share" to "Local Network Share". # Origin: vendor # Forwarded: not-needed # Author: Chris Townsend # Bug-Ubuntu: https://bugs.launchpad.net/bugs/1214534 Index: nautilus-share/src/nautilus-share.c =================================================================== --- nautilus-share.orig/src/nautilus-share.c +++ nautilus-share/src/nautilus-share.c @@ -1289,7 +1289,7 @@ nautilus_share_get_property_pages (Nauti pages = NULL; np_page = nautilus_property_page_new ("NautilusShare::property_page", - gtk_label_new (_("Share")), + gtk_label_new (_("Local Network Share")), page->main); pages = g_list_append (pages, np_page); @@ -1390,7 +1390,7 @@ nautilus_share_get_file_items (NautilusM /* FMQ: change the label to "Share with Windows users"? */ item = nautilus_menu_item_new ("NautilusShare::share", - _("Sharing Options"), + _("Local Network Share"), _("Share this Folder"), "folder-remote"); g_signal_connect (item, "activate",