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

Subscribers

People subscribed via source and target branches