rpms/lat/devel lat-1.2.3-deprecated-stuff.patch, NONE, 1.1 lat-1.2.3-no-groups-crash.patch, NONE, 1.1 lat-1.2.3-watches.patch, NONE, 1.1 lat.spec, 1.26, 1.27

Paul Howarth pghmcfc at fedoraproject.org
Wed Oct 28 14:01:18 UTC 2009


Author: pghmcfc

Update of /cvs/pkgs/rpms/lat/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30603/devel

Modified Files:
	lat.spec 
Added Files:
	lat-1.2.3-deprecated-stuff.patch 
	lat-1.2.3-no-groups-crash.patch lat-1.2.3-watches.patch 
Log Message:
* Wed Oct 28 2009 Paul Howarth <paul at city-fan.org> 1.2.3-10
- Fix deprecation warnings and port to new GtkTooltip API
- Build/Require gtk-sharp2 >= 2.12.0 for new GtkTooltip API
- Add upstream patch for FileSystemWatcher watches
- Add upstream patch for fixing crashes when adding objects
- Update icon cache scriptlets to current best practice
- Scrollkeeper obsoleted by rarian-compat; scriplets now redundant
- Don't need to own directory %{_datadir}/gnome (owned by filesystem)
- Don't need to own directory %{_datadir}/gnome/help (owned by yelp)
- Don't generate mono provides for private plugins
- Add bugzilla reference for ExcludeArch sparc64 (#531451)


lat-1.2.3-deprecated-stuff.patch:
 AboutDialog.cs   |    2 +-
 ProfileDialog.cs |    4 ++--
 Window.cs        |   21 +++++++--------------
 3 files changed, 10 insertions(+), 17 deletions(-)

--- NEW FILE lat-1.2.3-deprecated-stuff.patch ---
diff -up lat-1.2.3/lat/AboutDialog.cs.dep lat-1.2.3/lat/AboutDialog.cs
--- lat-1.2.3/lat/AboutDialog.cs.dep	2007-09-02 12:54:16.000000000 +0100
+++ lat-1.2.3/lat/AboutDialog.cs	2009-10-27 16:49:48.009259770 +0000
@@ -38,7 +38,7 @@ namespace lat 
 			ab.Comments = _desc;
 			ab.Copyright = _copy;
 			ab.Documenters = _docs;
-			ab.Name = Defines.PACKAGE;
+			ab.ProgramName = Defines.PACKAGE;
 			ab.TranslatorCredits = _translators;
 			ab.Version = Defines.VERSION;
 			ab.Icon = Global.latIcon;
diff -up lat-1.2.3/lat/ProfileDialog.cs.dep lat-1.2.3/lat/ProfileDialog.cs
--- lat-1.2.3/lat/ProfileDialog.cs.dep	2007-09-02 12:54:16.000000000 +0100
+++ lat-1.2.3/lat/ProfileDialog.cs	2009-10-27 16:49:48.010419363 +0000
@@ -202,7 +202,7 @@ namespace lat
 					ab.Authors = vp.Authors;
 					ab.Comments = vp.Description;
 					ab.Copyright = vp.Copyright;
-					ab.Name = vp.Name;
+					ab.ProgramName = vp.Name;
 					ab.Version = vp.Version;
 					ab.Icon = vp.Icon;
 
@@ -227,7 +227,7 @@ namespace lat
 					ab.Authors = vp.Authors;
 					ab.Comments = vp.Description;
 					ab.Copyright = vp.Copyright;
-					ab.Name = vp.Name;
+					ab.ProgramName = vp.Name;
 					ab.Version = vp.Version;
 
 					ab.Run ();
diff -up lat-1.2.3/lat/Window.cs.dep lat-1.2.3/lat/Window.cs
--- lat-1.2.3/lat/Window.cs.dep	2007-09-02 12:54:16.000000000 +0100
+++ lat-1.2.3/lat/Window.cs	2009-10-28 11:26:52.719168938 +0000
@@ -326,17 +326,11 @@ namespace lat 
 
 		void SetBrowserTooltips ()
 		{
-			Tooltips t = new Tooltips ();
-			string tipMsg = null;
-
-			tipMsg = "Create a new directory entry";
-			newMenuToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			newMenuToolButton.TooltipText = "Create a new directory entry";
 
-			tipMsg = "Delete an entry from the directory";
-			deleteToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			deleteToolButton.TooltipText = "Delete an entry from the directory";
 
-			tipMsg = "Manage templates for creating new entries";
-			templateToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			templateToolButton.TooltipText = "Manage templates for creating new entries";
 		}
 
 		void TogglePages (bool pageOneState, bool pageTwoState, bool pageThreeState, bool pageFourState)
@@ -398,23 +392,22 @@ namespace lat 
 
 		void SetupToolbar (ViewPlugin vp)
 		{
-			Tooltips t = new Tooltips ();
 			string tipMsg = null;
 
 			tipMsg = String.Format ("Create a new {0}", vp.Name.ToLower());
-			newMenuToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			newMenuToolButton.TooltipText = tipMsg;
 			newMenuToolButton.Clicked += new EventHandler (viewDataTreeView.OnNewEntryActivate);
 
 			tipMsg = String.Format ("Edit the properties of a {0}", vp.Name.ToLower());
-			propertiesToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			propertiesToolButton.TooltipText = tipMsg;
 			propertiesToolButton.Clicked += new EventHandler (viewDataTreeView.OnEditActivate);
 			
 			tipMsg = String.Format ("Delete a {0} from the directory", vp.Name.ToLower());
-			deleteToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			deleteToolButton.TooltipText = tipMsg;
 			deleteToolButton.Clicked += new EventHandler (viewDataTreeView.OnDeleteActivate);
 
 			tipMsg = "Refreshes the data from the server";
-			refreshToolButton.SetTooltip (t,  tipMsg, tipMsg);			
+			refreshToolButton.TooltipText = tipMsg;
 			refreshToolButton.Clicked += new EventHandler (viewDataTreeView.OnRefreshActivate);
 
 			ToggleButtons (true);

lat-1.2.3-no-groups-crash.patch:
 AttributeEditorWidget.cs                    |    3 +++
 ConnectionManager.cs                        |    2 +-
 ViewPluginManager.cs                        |   15 ++++++++++++++-
 plugins/PosixCoreViews/NewUserViewDialog.cs |    7 ++++++-
 4 files changed, 24 insertions(+), 3 deletions(-)

--- NEW FILE lat-1.2.3-no-groups-crash.patch ---
Index: lat/ViewPluginManager.cs
===================================================================
--- lat/ViewPluginManager.cs	(revision 11)
+++ lat/ViewPluginManager.cs	(revision 14)
@@ -253,8 +253,21 @@
 			if (!di.Exists)
 				di.Create ();
 
+			DirectoryInfo dir = null;
+
+#if DEBUG
+			// Load any plugins in the plugins directory
+			// relative to the executing path.
+			// This is for debug purposes only.
+			//		-- JA 19/10/2008
+			Assembly exeAsm = Assembly.GetExecutingAssembly();
+			string runLocation = Path.GetDirectoryName(exeAsm.Location);
+			dir = new DirectoryInfo(runLocation);
+			foreach(FileInfo fi in dir.GetFiles("*.dll"))
+				LoadPluginsFromFile(fi.FullName);
+#endif
 			// Load any plugins in sys dir
-			DirectoryInfo dir = new System.IO.DirectoryInfo (Defines.SYS_PLUGIN_DIR);
+			dir = new System.IO.DirectoryInfo (Defines.SYS_PLUGIN_DIR);
 			if (dir.Exists)
 				foreach (FileInfo f in dir.GetFiles("*.dll"))
 					LoadPluginsFromFile (f.FullName);
Index: lat/ConnectionManager.cs
===================================================================
--- lat/ConnectionManager.cs	(revision 11)
+++ lat/ConnectionManager.cs	(revision 14)
@@ -94,7 +94,7 @@
 			} catch (Exception e) {
 
 				Log.Debug (e);
-				throw e;
+				throw;
 			}
 		}
 		
Index: lat/plugins/PosixCoreViews/NewUserViewDialog.cs
===================================================================
--- lat/plugins/PosixCoreViews/NewUserViewDialog.cs	(revision 11)
+++ lat/plugins/PosixCoreViews/NewUserViewDialog.cs	(revision 14)
@@ -326,6 +326,9 @@
 			if (name == null)
 				return null;
 
+			if (!_allGroups.ContainsKey(name))
+				return null;
+			
 			LdapEntry le = (LdapEntry) _allGroups [name];		
 			LdapAttribute attr = le.getAttribute ("gidNumber");
 
@@ -343,7 +346,9 @@
 				
 			if (primaryGroupComboBox.GetActiveIter (out iter)) {
 				string pg = (string) primaryGroupComboBox.Model.GetValue (iter, 0);
-				aset.Add (new LdapAttribute ("gidNumber", getGidNumber(pg)));
+				string gid = getGidNumber(pg);
+				if (gid != null)
+					aset.Add (new LdapAttribute ("gidNumber", gid));
 			}
 						
 			aset.Add (new LdapAttribute ("givenName", firstNameEntry.Text));
Index: lat/AttributeEditorWidget.cs
===================================================================
--- lat/AttributeEditorWidget.cs	(revision 11)
+++ lat/AttributeEditorWidget.cs	(revision 14)
@@ -555,6 +555,9 @@
 			foreach (string s in dlg.ObjectClasses) {
 				string[] req = conn.Data.GetRequiredAttrs (s);
 				store.AppendValues ("objectClass", s);
+
+				if (req == null)
+					continue;
 				
 				foreach (string r in req) {
 					if (allAttrs.Contains (r))

lat-1.2.3-watches.patch:
 ViewPluginManager.cs |   46 ++++++++++++++++++++++++++++------------------
 1 file changed, 28 insertions(+), 18 deletions(-)

--- NEW FILE lat-1.2.3-watches.patch ---
Index: lat/ViewPluginManager.cs
===================================================================
--- lat/ViewPluginManager.cs	(revision 9)
+++ lat/ViewPluginManager.cs	(revision 10)
@@ -273,27 +273,37 @@
 			Load ();
 
 			// Watch for any plugins to be added/removed
-			try {
-					
-				sysPluginWatch = new FileSystemWatcher (Defines.SYS_PLUGIN_DIR, "*.dll");
-				sysPluginWatch.Created += OnPluginCreated;
-				sysPluginWatch.Deleted += OnPluginDeleted;
-				sysPluginWatch.EnableRaisingEvents = true;
-			
-			} catch (Exception e) {			
-				Log.Debug ("Plugin system watch error: {0}", e);			
+			if (Directory.Exists(Defines.SYS_PLUGIN_DIR))
+			{
+				try {
+						
+					sysPluginWatch = new FileSystemWatcher (Defines.SYS_PLUGIN_DIR, "*.dll");
+					sysPluginWatch.Created += OnPluginCreated;
+					sysPluginWatch.Deleted += OnPluginDeleted;
+					sysPluginWatch.EnableRaisingEvents = true;
+				
+				} catch (Exception e) {			
+					Log.Debug ("Plugin system watch error: {0}", e);			
+				}
 			}
+			else
+				Log.Debug("Plugin system directory does not exist.");
 
-			try {
-			
-				usrPluginWatch = new FileSystemWatcher (pluginDirectory, "*.dll");
-				usrPluginWatch.Created += OnPluginCreated;
-				usrPluginWatch.Deleted += OnPluginDeleted;
-				usrPluginWatch.EnableRaisingEvents = true;
-			
-			} catch (Exception e) {			
-				Log.Debug ("Plugin user dir watch error: {0}", e);			
+			if (Directory.Exists(pluginDirectory))
+			{
+				try {
+				
+					usrPluginWatch = new FileSystemWatcher (pluginDirectory, "*.dll");
+					usrPluginWatch.Created += OnPluginCreated;
+					usrPluginWatch.Deleted += OnPluginDeleted;
+					usrPluginWatch.EnableRaisingEvents = true;
+				
+				} catch (Exception e) {			
+					Log.Debug ("Plugin user dir watch error: {0}", e);			
+				}
 			}
+			else
+				Log.Debug("Plugin user dir does not exist.");
 		}
 
 		void OnPluginCreated (object sender, FileSystemEventArgs args)


Index: lat.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lat/devel/lat.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- lat.spec	26 Oct 2009 20:57:03 -0000	1.26
+++ lat.spec	28 Oct 2009 14:01:18 -0000	1.27
@@ -1,29 +1,33 @@
 Name:               lat
 Summary:            LDAP Administration Tool
 Version:            1.2.3
-Release:            9%{?dist}
+Release:            10%{?dist}
 License:            GPLv2
 Group:              Applications/Productivity
 Url:                http://sourceforge.net/projects/ldap-at/
 Source0:            http://downloads.sf.net/ldap-at/lat-%{version}.tar.gz
 Patch0:             lat-1.2.2-libdir.patch
 Patch1:             lat-1.2.3-desktop-icon-no-ext.patch
+Patch2:             lat-1.2.3-deprecated-stuff.patch
+Patch10:            lat-1.2.3-watches.patch
+Patch11:            lat-1.2.3-no-groups-crash.patch
 BuildRoot:          %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:      mono-devel >= 1.1.12.1, gnome-keyring-devel >= 0.4.2, avahi-sharp
-BuildRequires:      scrollkeeper, gettext, intltool, dbus-sharp, desktop-file-utils
-BuildRequires:      gnome-sharp-devel, gtk-sharp2-devel >= 2.8.0, dbus-sharp-devel
-Requires:           scrollkeeper, gnome-sharp
-Requires:           mono-data, gtk-sharp2, dbus-sharp, avahi-sharp, yelp
+BuildRequires:      rarian-compat, gettext, intltool, dbus-sharp, desktop-file-utils
+BuildRequires:      gnome-sharp-devel, gtk-sharp2-devel >= 2.12.0, dbus-sharp-devel
+Requires:           gnome-sharp, gtk-sharp2 >= 2.12.0, dbus-sharp
+Requires:           mono-data, avahi-sharp, yelp
 
-Requires(post):     scrollkeeper
-Requires(postun):   scrollkeeper
-
-# ausil added this without a bug reference...
+# Mono and hence lat not available on sparc64 (#531451)
 ExcludeArch:        sparc64
 
 # Debuginfo package would be empty as there are no binaries in this package
 %define debug_package %{nil}
 
+# Don't generate mono provides for private plugins
+%filter_from_provides /mono([A-Za-z-]*) = 0\.0\.0\.0/d
+%filter_setup
+
 %description
 LAT stands for LDAP Administration Tool. The tool allows you to browse
 LDAP-based directories and add/edit/delete entries contained within. It can
@@ -35,7 +39,7 @@ manage objects easily without having to 
 Summary:            Development files for building plugins for LDAP Administration Tool
 Group:              Development/Libraries
 Requires:           %{name} = %{version}-%{release}, pkgconfig
-Requires:           gtk-sharp2-devel
+Requires:           gtk-sharp2-devel >= 2.12.0
 
 %description devel
 The lat-devel package contains the files needed to build plugins for lat
@@ -50,6 +54,18 @@ The lat-devel package contains the files
 # Remove filename extension from Icon field of desktop file
 %patch1 -p1 -b .no-ext
 
+# Update some deprecated methods; port to newer GtkTooltip API
+%patch2 -p1 -b .dep
+
+# Don't add FileSystemWatcher watches on directories that don't exist -
+# upstream changeset 10
+%patch10 -p0
+
+# Fix a crash when trying to create a user while no groups (and thus no gid)
+# are available yet for this user, or when adding an object without any
+# required attributes - upstream changesets 12 and 14
+%patch11 -p0
+
 %build
 %configure --disable-dependency-tracking
 %{__make} %{_smp_mflags} appicondir=%{_datadir}/icons/hicolor/22x22/apps
@@ -60,9 +76,6 @@ The lat-devel package contains the files
         appicondir=%{_datadir}/icons/hicolor/22x22/apps \
         install
 
-# Remove scrollkeeper crud (rebuilt in %%post)
-%{__rm} -rf %{buildroot}%{_localstatedir}/scrollkeeper
-
 # Fix up desktop file
 /usr/bin/desktop-file-install \
         --vendor fedora \
@@ -78,16 +91,16 @@ The lat-devel package contains the files
 %{__rm} -rf %{buildroot}
 
 %post
-/usr/bin/scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
-/bin/touch --no-create %{_datadir}/icons/hicolor || :
-[ -x %{_bindir}/gtk-update-icon-cache ] && %{_bindir}/gtk-update-icon-cache \
-        --quiet %{_datadir}/icons/hicolor || :
+touch --no-create %{_datadir}/icons/hicolor || :
 
 %postun
-/usr/bin/scrollkeeper-update -q || :
-/bin/touch --no-create %{_datadir}/icons/hicolor || :
-[ -x %{_bindir}/gtk-update-icon-cache ] && %{_bindir}/gtk-update-icon-cache \
-        --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+	touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+	gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %files -f %{name}.lang
 %defattr(-,root,root,-)
@@ -96,8 +109,6 @@ The lat-devel package contains the files
 %{_libdir}/lat/
 %{_datadir}/application-registry/lat.applications
 %{_datadir}/applications/fedora-lat.desktop
-%dir %{_datadir}/gnome/
-%dir %{_datadir}/gnome/help/
 %{_datadir}/gnome/help/lat/
 %{_datadir}/icons/hicolor/22x22/apps/lat.png
 %{_datadir}/omf/lat/
@@ -108,6 +119,18 @@ The lat-devel package contains the files
 %{_libdir}/pkgconfig/lat-plugins.pc
 
 %changelog
+* Wed Oct 28 2009 Paul Howarth <paul at city-fan.org> 1.2.3-10
+- Fix deprecation warnings and port to new GtkTooltip API
+- Build/Require gtk-sharp2 >= 2.12.0 for new GtkTooltip API
+- Add upstream patch for FileSystemWatcher watches
+- Add upstream patch for fixing crashes when adding objects
+- Update icon cache scriptlets to current best practice
+- Scrollkeeper obsoleted by rarian-compat; scriplets now redundant
+- Don't need to own directory %%{_datadir}/gnome (owned by filesystem)
+- Don't need to own directory %%{_datadir}/gnome/help (owned by yelp)
+- Don't generate mono provides for private plugins
+- Add bugzilla reference for ExcludeArch sparc64 (#531451)
+
 * Mon Oct 26 2009 Dennis Gilmore <dennis at ausil.us> - 1.2.3-9
 - Remove Fedora 5 conditionals
 - ExcludeArch sparc64 due to missing mono support on that arch




More information about the fedora-extras-commits mailing list