Hello community, here is the log from the commit of package libgnomesu for openSUSE:Factory checked in at Thu Jul 21 09:01:50 CEST 2011.
-------- --- GNOME/libgnomesu/libgnomesu.changes 2011-06-17 17:46:16.000000000 +0200 +++ /mounts/work_src_done/STABLE/libgnomesu/libgnomesu.changes 2011-07-19 14:12:41.000000000 +0200 @@ -1,0 +2,15 @@ +Tue Jul 19 13:19:41 CEST 2011 - [email protected] + +- Add libgnomesu-no-gconf.patch: use GSettings instead of gconf to + find the preferred terminal; this is needed for GNOME 3 + integration. +- Add libgnomesu-gtk3.patch: port to GTK+ 3. +- Change gtk2-devel BuildRequires to gtk3-devel. +- Remove now unneeded gconf2-devel BuildRequires. +- Add gsettings-desktop-schemas Requires, since the use of + GSettings require the schema to be installed. +- Remove explicit Requires for glib2-devel and gtk2-devel in devel + subpackage: if needed, they will automatically be added the + pkgconfig() way. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- libgnomesu-gtk3.patch libgnomesu-no-gconf.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgnomesu.spec ++++++ --- /var/tmp/diff_new_pack.rduIoR/_old 2011-07-21 08:59:12.000000000 +0200 +++ /var/tmp/diff_new_pack.rduIoR/_new 2011-07-21 08:59:12.000000000 +0200 @@ -19,7 +19,7 @@ Name: libgnomesu Version: 1.0.0 -Release: 335 +Release: 337 License: LGPLv2.1+ Summary: GNOME su Library Url: http://members.chello.nl/~h.lai/libgnomesu/ @@ -62,16 +62,21 @@ Patch17: libgnomesu-reorder-pam-init.patch # PATCH-FIX-UPSTREAM libgnomesu-check-setuid-retval.patch bnc#695627 CVE-2011-1946 [email protected] -- Really handle return value of setuid() Patch18: libgnomesu-check-setuid-retval.patch +# PATCH-FIX-UPSTREAM libgnomesu-no-gconf.patch [email protected] -- Do not use gconf but gsettings to find preferred terminal (needed for GNOME 3) +Patch19: libgnomesu-no-gconf.patch +# PATCH-FIX-UPSTREAM libgnomesu-gtk3.patch [email protected] -- Port to GTK+ 3 +Patch20: libgnomesu-gtk3.patch BuildRequires: fdupes -BuildRequires: gconf2-devel -BuildRequires: gtk2-devel +BuildRequires: gtk3-devel BuildRequires: intltool BuildRequires: pam-devel BuildRequires: translation-update-upstream PreReq: permissions -Recommends: %{name}-lang = %{version} +# Needed for patch19 +Requires: gsettings-desktop-schemas Requires: libgnomesu0 Requires: pam +Recommends: %{name}-lang = %{version} # obsolete in >9.3 Provides: xsu Obsoletes: xsu @@ -96,9 +101,6 @@ Summary: Development files for libgnomesu Group: Development/Libraries/GNOME Requires: %{name} = %{version} -Requires: glib2-devel -Requires: gtk2-devel -# libgnome-devel libgnomecanvas-devel libbonoboui-devel pam-devel %description devel This package contains all files needed to develop with libgnomesu. @@ -124,6 +126,8 @@ %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 +%patch20 -p1 cp -a %{S:1} pam-backend/gnomesu-pam # Upstream is dead, libgnomesu.po in LCN includes strings in our patches: translation-update-upstream ++++++ libgnomesu-gtk3.patch ++++++ Index: libgnomesu-1.0.0/configure.in =================================================================== --- libgnomesu-1.0.0.orig/configure.in +++ libgnomesu-1.0.0/configure.in @@ -19,7 +19,7 @@ AC_PROG_MAKE_SET PKG_CHECK_MODULES(LIBGNOMESU, [ glib-2.0 - gtk+-2.0 + gtk+-3.0 ]) AC_MSG_CHECKING(for forkpty()) Index: libgnomesu-1.0.0/src/gnomesu-auth-dialog.c =================================================================== --- libgnomesu-1.0.0.orig/src/gnomesu-auth-dialog.c +++ libgnomesu-1.0.0/src/gnomesu-auth-dialog.c @@ -190,7 +190,7 @@ create_stock_button (const gchar *stock, align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); gtk_container_add (GTK_CONTAINER (button), align); - hbox = gtk_hbox_new (FALSE, 2); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); gtk_container_add (GTK_CONTAINER (align), hbox); image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); @@ -273,6 +273,11 @@ gnomesu_auth_dialog_init (GnomesuAuthDia GtkWidget *left_action_area; GtkWidget *default_button; GtkWidget *image; + GtkWidget *action_area; + GtkWidget *dialog_vbox; + + action_area = gtk_dialog_get_action_area (dialog); + dialog_vbox = gtk_dialog_get_content_area (dialog); priv = auth_dialog->_priv = g_new0 (GnomesuAuthDialogPrivate, 1); @@ -287,25 +292,24 @@ gnomesu_auth_dialog_init (GnomesuAuthDia gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK); gtk_window_set_default (GTK_WINDOW (dialog), default_button); - gtk_dialog_set_has_separator (dialog, FALSE); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */ - gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5); - gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6); + gtk_box_set_spacing (GTK_BOX (dialog_vbox), 2); /* 2 * 5 + 2 = 12 */ + gtk_container_set_border_width (GTK_CONTAINER (action_area), 5); + gtk_box_set_spacing (GTK_BOX (action_area), 6); GtkWidget *hbox, *main_vbox, *vbox; /* Reparent dialog->action_area into a hbox */ - g_object_ref (dialog->action_area); - action_area_parent = gtk_widget_get_parent (dialog->action_area); - gtk_container_remove (GTK_CONTAINER (action_area_parent), dialog->action_area); - hbox = gtk_hbox_new (FALSE, 12); + g_object_ref (action_area); + action_area_parent = gtk_widget_get_parent (action_area); + gtk_container_remove (GTK_CONTAINER (action_area_parent), action_area); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); gtk_box_pack_end (GTK_BOX (action_area_parent), hbox, FALSE, TRUE, 0); gtk_box_reorder_child (GTK_BOX (action_area_parent), hbox, -1); /* Add another (left-aligned) button box to the dialog */ - left_action_area = gtk_hbutton_box_new (); + left_action_area = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL); gtk_container_set_border_width (GTK_CONTAINER (left_action_area), 6); /* gtk_button_box_set_spacing (GTK_BUTTON_BOX (left_action_area), 12); */ gtk_box_set_spacing (GTK_BOX (left_action_area), 12); @@ -313,19 +317,19 @@ gnomesu_auth_dialog_init (GnomesuAuthDia priv->left_action_area = left_action_area; gtk_box_pack_start (GTK_BOX (hbox), left_action_area, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), dialog->action_area, TRUE, TRUE, 0); - g_object_unref (dialog->action_area); + gtk_box_pack_start (GTK_BOX (hbox), action_area, TRUE, TRUE, 0); + g_object_unref (action_area); gtk_widget_show_all (action_area_parent); - hbox = gtk_hbox_new (FALSE, 12); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); - gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (dialog_vbox), hbox, TRUE, TRUE, 0); priv->icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (priv->icon), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (hbox), priv->icon, FALSE, FALSE, 0); - main_vbox = gtk_vbox_new (FALSE, 10); + main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10); gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0); /* main message */ @@ -344,7 +348,7 @@ gnomesu_auth_dialog_init (GnomesuAuthDia FALSE, FALSE, 0); /* password entry */ - vbox = gtk_vbox_new (FALSE, 6); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0); GtkWidget *table_alignment; @@ -362,10 +366,10 @@ gnomesu_auth_dialog_init (GnomesuAuthDia priv->details_expander = gtk_expander_new_with_mnemonic (_("<small><b>_Details</b></small>")); gtk_expander_set_use_markup (GTK_EXPANDER (priv->details_expander), TRUE); - gtk_box_pack_start (GTK_BOX (dialog->vbox), priv->details_expander, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (dialog_vbox), priv->details_expander, FALSE, FALSE, 0); GtkWidget *details_vbox; - details_vbox = gtk_vbox_new (FALSE, 10); + details_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10); gtk_container_add (GTK_CONTAINER (priv->details_expander), details_vbox); table_alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0); @@ -396,7 +400,7 @@ gnomesu_auth_dialog_init (GnomesuAuthDia priv->command_desc_label = add_row (table, 0, msg, FALSE, scroll); g_free (msg); - gtk_widget_show_all (dialog->vbox); + gtk_widget_show_all (dialog_vbox); gtk_widget_grab_default (default_button); /* Configure */ @@ -548,7 +552,7 @@ gnomesu_auth_dialog_set_desc_ps (Gnomesu /* Force both labels to be as wide as their parent; one of them will decide the width */ GtkRequisition requisition; - gtk_widget_size_request (dialog->_priv->message_label->parent, &requisition); + gtk_widget_size_request (gtk_widget_get_parent (dialog->_priv->message_label), &requisition); gtk_widget_set_size_request (dialog->_priv->message_label, requisition.width, -1); gtk_widget_set_size_request (dialog->_priv->message_label_secondary, requisition.width, -1); } @@ -637,11 +641,7 @@ gnomesu_auth_dialog_set_mode (GnomesuAut gtk_widget_realize (GTK_WIDGET (dialog)); } -#ifdef gtk_widget_get_window window = gtk_widget_get_window (GTK_WIDGET (dialog)); -#else - window = GTK_WIDGET (dialog)->window; -#endif switch (mode) { case GNOMESU_MODE_CHECKING: @@ -663,7 +663,7 @@ gnomesu_auth_dialog_set_mode (GnomesuAut gtk_widget_set_sensitive (dialog->_priv->password_entry, enabled); gtk_widget_set_sensitive (dialog->_priv->left_action_area, enabled); - gtk_widget_set_sensitive (GTK_DIALOG (dialog)->action_area, enabled); + gtk_widget_set_sensitive (gtk_dialog_get_action_area (GTK_DIALOG (dialog)), enabled); if (enabled) gtk_widget_grab_focus (dialog->_priv->password_entry); ++++++ libgnomesu-no-gconf.patch ++++++ Index: libgnomesu-1.0.0/configure.in =================================================================== --- libgnomesu-1.0.0.orig/configure.in +++ libgnomesu-1.0.0/configure.in @@ -48,7 +48,7 @@ AC_TRY_LINK( PKG_CHECK_MODULES(GNOMESU,[ - gconf-2.0 + gio-2.0 >= 2.26.0 ]) AC_SUBST(GNOMESU_CFLAGS) AC_SUBST(GNOMESU_LIBS) @@ -68,13 +68,6 @@ AM_GLIB_GNU_GETTEXT AC_PROG_INTLTOOL -AC_PATH_PROG(GCONFTOOL, gconftool-2, no) -if test x"$GCONFTOOL" = xno; then - AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) -fi -AM_GCONF_SOURCE_2 - - # FreeBSD doesn't have a 'root' group, but it has a 'wheel' group instead AC_MSG_CHECKING(whether there's a 'root' group) AC_RUN_IFELSE([ Index: libgnomesu-1.0.0/tools/gnomesu.c =================================================================== --- libgnomesu-1.0.0.orig/tools/gnomesu.c +++ libgnomesu-1.0.0/tools/gnomesu.c @@ -19,8 +19,8 @@ */ #include <glib/gi18n.h> +#include <gio/gio.h> #include <gtk/gtk.h> -#include <gconf/gconf-client.h> #include <string.h> #include <libintl.h> @@ -98,16 +98,23 @@ main (int argc, char *argv[]) } if (argc == 0) { + GSettings *settings; gchar *terminal; - terminal = gconf_client_get_string (gconf_client_get_default (), - "/desktop/gnome/applications/terminal/exec", NULL); - if (!terminal) - terminal = "gnome-terminal"; + settings = g_settings_new ("org.gnome.desktop.default-applications.terminal"); + terminal = g_settings_get_string (settings, "exec"); + g_object_unref (settings); + + if (!terminal || !terminal[0]) + terminal = g_strdup ("gnome-terminal"); /* Default action: launch a terminal */ - if (!gnomesu_spawn_command_async (user, terminal, &pid)) + if (!gnomesu_spawn_command_async (user, terminal, &pid)) { + g_free (terminal); return 255; + } + + g_free (terminal); g_child_watch_add (pid, child_exit_cb, NULL); g_main_loop_run (main_loop); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
