Merge lp:~nalimilan/ubuntu/lucid/gnome-system-tools/shares-services into lp:ubuntu/lucid/gnome-system-tools

Proposed by Milan Bouchet-Valat
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~nalimilan/ubuntu/lucid/gnome-system-tools/shares-services
Merge into: lp:ubuntu/lucid/gnome-system-tools
Diff against target: 80 lines (+68/-0)
2 files modified
debian/patches/91_shares_services_detection.patch (+66/-0)
debian/patches/series (+2/-0)
To merge this branch: bzr merge lp:~nalimilan/ubuntu/lucid/gnome-system-tools/shares-services
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+26056@code.launchpad.net

Description of the change

This is a hack we need to fix bug 574046 in Lucid, and maybe in Maverick if we don't get real Upstart support. It's pretty Ubuntu-specific, but I think it's as reliable as the previous solution (which using SysV scripts). ATM shares-admin is completely broken in Lucid, so it would be a nice improvement.

I've not updated the Debian changelog since I think we should simply keep this patch in the repo, and make a SRU with this AND the new upstream version, when someone finds the time to. No need to do two different SRUs.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Milan! Indeed this is a hack and not quite a proper solution for upstream, but it will do nicely as a distro specific change to fix this bug in stable releases.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'debian/patches/91_shares_services_detection.patch'
--- debian/patches/91_shares_services_detection.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/91_shares_services_detection.patch 2010-05-26 14:25:43 +0000
@@ -0,0 +1,66 @@
1Index: shares-services/src/shares/shares-tool.c
2===================================================================
3--- shares-services.orig/src/shares/shares-tool.c 2010-05-26 15:55:30.000000000 +0200
4+++ shares-services/src/shares/shares-tool.c 2010-05-26 15:55:39.000000000 +0200
5@@ -62,9 +62,6 @@
6 tool->smb_config = oobs_smb_config_get ();
7 gst_tool_add_configuration_object (gst_tool, tool->smb_config, TRUE);
8
9- tool->services_config = oobs_services_config_get ();
10- gst_tool_add_configuration_object (gst_tool, tool->services_config, TRUE);
11-
12 tool->hosts_config = oobs_hosts_config_get ();
13 gst_tool_add_configuration_object (gst_tool, tool->hosts_config, TRUE);
14
15@@ -256,30 +253,19 @@
16 gst_shares_tool_update_services_availability (shares_tool);
17 }
18
19+/* Services detection is very rough:
20+ * since Upstart jobs are not supported (yet?), we fall back on checking
21+ * that files are present, which means packages are installed.
22+ * Anyway, the only right way to do this would be checking that
23+ * the package is present, e.g. using PackageKit. */
24 static void
25 gst_shares_tool_update_services_availability (GstSharesTool *tool)
26 {
27- OobsList *services;
28- OobsListIter iter;
29- GObject *service;
30- gboolean valid;
31- GstServiceRole role;
32-
33- services = oobs_services_config_get_services (OOBS_SERVICES_CONFIG (tool->services_config));
34- valid = oobs_list_get_iter_first (services, &iter);
35+ if (g_file_test ("/usr/sbin/smbd", G_FILE_TEST_EXISTS))
36+ tool->smb_available = TRUE;
37
38- while (valid) {
39- service = oobs_list_get (services, &iter);
40- role = gst_service_get_role (OOBS_SERVICE (service));
41-
42- if (role == GST_ROLE_FILE_SERVER_SMB)
43- tool->smb_available = TRUE;
44- else if (role == GST_ROLE_FILE_SERVER_NFS)
45- tool->nfs_available = TRUE;
46-
47- g_object_unref (service);
48- valid = oobs_list_iter_next (services, &iter);
49- }
50+ if (g_file_test ("/usr/sbin/rpc.nfsd", G_FILE_TEST_EXISTS))
51+ tool->nfs_available = TRUE;
52 }
53
54 GstSharesTool*
55Index: shares-services/src/shares/shares-tool.h
56===================================================================
57--- shares-services.orig/src/shares/shares-tool.h 2010-05-26 15:46:31.000000000 +0200
58+++ shares-services/src/shares/shares-tool.h 2010-05-26 15:55:39.000000000 +0200
59@@ -44,7 +44,6 @@
60 OobsObject *smb_config;
61
62 /* read only */
63- OobsObject *services_config;
64 OobsObject *hosts_config;
65 OobsObject *users_config;
66
067
=== modified file 'debian/patches/series'
--- debian/patches/series 2010-02-06 14:51:47 +0000
+++ debian/patches/series 2010-05-26 14:25:43 +0000
@@ -8,3 +8,5 @@
881_gst-packages-shares-admin.patch881_gst-packages-shares-admin.patch
982_gst-packages-time-admin.patch982_gst-packages-time-admin.patch
1090_relibtoolize.patch1090_relibtoolize.patch
1191_shares_services_detection.patch
12

Subscribers

People subscribed via source and target branches