diff options
Diffstat (limited to 'x11')
-rw-r--r-- | x11/gdm/Makefile | 6 | ||||
-rw-r--r-- | x11/gdm/distinfo | 6 | ||||
-rw-r--r-- | x11/gdm/files/patch-daemon_getvt.c | 56 | ||||
-rw-r--r-- | x11/gdm/files/patch-daemon_slave.c | 415 | ||||
-rw-r--r-- | x11/gdm/pkg-plist | 25 |
5 files changed, 499 insertions, 9 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile index c1773b78d..ed136ea11 100644 --- a/x11/gdm/Makefile +++ b/x11/gdm/Makefile @@ -3,11 +3,11 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/x11/gdm/Makefile,v 1.69 2007/06/18 23:48:55 marcus Exp $ +# $MCom: ports/x11/gdm/Makefile,v 1.70 2007/07/04 15:52:38 mezz Exp $ # PORTNAME= gdm -PORTVERSION= 2.19.3 +PORTVERSION= 2.19.4 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} @@ -85,6 +85,8 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/config/gdm.conf-custom \ ${PREFIX}/etc/gdm/custom.conf.default @${MKDIR} ${PREFIX}/etc/gdm/Sessions + @${LOCALBASE}/bin/gtk-update-icon-cache -f -q --ignore-theme-index \ + ${PREFIX}/share/gdm/icons/hicolor @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' < ${PKGDIR}/pkg-message \ | /usr/bin/fmt 75 79 > ${PKGMESSAGE} @${CAT} ${PKGMESSAGE} diff --git a/x11/gdm/distinfo b/x11/gdm/distinfo index 9fe49d83f..6d1ae9563 100644 --- a/x11/gdm/distinfo +++ b/x11/gdm/distinfo @@ -1,3 +1,3 @@ -MD5 (gnome2/gdm-2.19.3.tar.bz2) = 6799c09e84237a83d50dd746bad8dde6 -SHA256 (gnome2/gdm-2.19.3.tar.bz2) = fda3335079e0a2da0953c61fa515f89393d35a1567b0fb7c988d0aaf02faed1a -SIZE (gnome2/gdm-2.19.3.tar.bz2) = 3555139 +MD5 (gnome2/gdm-2.19.4.tar.bz2) = 8e0e96a9e0ba8113f2e739a18a2a57e3 +SHA256 (gnome2/gdm-2.19.4.tar.bz2) = fcd160593cfdf3aa933e1a954fb0368a2b222f626556f250859713fb62c604d3 +SIZE (gnome2/gdm-2.19.4.tar.bz2) = 3628031 diff --git a/x11/gdm/files/patch-daemon_getvt.c b/x11/gdm/files/patch-daemon_getvt.c new file mode 100644 index 000000000..25bdebead --- /dev/null +++ b/x11/gdm/files/patch-daemon_getvt.c @@ -0,0 +1,56 @@ +--- daemon/getvt.c.orig 2007-07-11 13:06:10.000000000 -0400 ++++ daemon/getvt.c 2007-07-11 13:13:29.000000000 -0400 +@@ -102,6 +102,27 @@ gdm_get_current_vtnum (Display *display) + return num; + } + ++#if defined (GDM_USE_SYS_VT) ++#include <sys/vt.h> ++#elif defined (GDM_USE_CONSIO_VT) ++#include <sys/consio.h> ++ ++static const char* ++__itovty (int val) ++{ ++ static char str[8]; ++ char* next = str + sizeof (str) - 1; ++ ++ *next = '\0'; ++ do { ++ *--next = "0123456789abcdefghigklmnopqrstuv"[val % 32]; ++ } while (val /= 32); ++ ++ return next; ++} ++#endif ++ ++ + gchar * + gdm_get_vt_device (int vtno) + { +@@ -128,25 +149,6 @@ gdm_get_vt_device (int vtno) + #define GDMCONSOLEDEVICE "/dev/console" + #endif + +-#if defined (GDM_USE_SYS_VT) +-#include <sys/vt.h> +-#elif defined (GDM_USE_CONSIO_VT) +-#include <sys/consio.h> +- +-static const char* +-__itovty (int val) +-{ +- static char str[8]; +- char* next = str + sizeof (str) - 1; +- +- *next = '\0'; +- do { +- *--next = "0123456789abcdefghigklmnopqrstuv"[val % 32]; +- } while (val /= 32); +- +- return next; +-} +-#endif + + static int + open_vt (int vtno) diff --git a/x11/gdm/files/patch-daemon_slave.c b/x11/gdm/files/patch-daemon_slave.c new file mode 100644 index 000000000..ba3de44b3 --- /dev/null +++ b/x11/gdm/files/patch-daemon_slave.c @@ -0,0 +1,415 @@ +--- daemon/slave.c.orig 2007-07-11 12:51:13.000000000 -0400 ++++ daemon/slave.c 2007-07-11 13:05:50.000000000 -0400 +@@ -35,6 +35,7 @@ + #include <login_cap.h> + #endif + #include <fcntl.h> ++#include <sys/param.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/wait.h> +@@ -45,7 +46,8 @@ + #include <netinet/in.h> + #include <arpa/inet.h> + #include <string.h> +-#include <utmpx.h> ++#include <utmp.h> ++#include <libutil.h> + + #if !defined (MAXPATHLEN) && defined (PATH_MAX) + #define MAXPATHLEN PATH_MAX +@@ -119,7 +121,7 @@ + /* Per-slave globals */ + + static GdmDisplay *d = 0; +-static gchar *login = NULL; ++static gchar *gdm_login = NULL; + static gboolean greet = FALSE; + static gboolean configurator = FALSE; + static gboolean remanage_asap = FALSE; +@@ -686,7 +688,7 @@ term_session_stop_and_quit (void) + /* only if we're not hanging in session stop and getting a + TERM signal again */ + if (in_session_stop == 0 && session_started) +- gdm_slave_session_stop (d->logged_in && login != NULL, ++ gdm_slave_session_stop (d->logged_in && gdm_login != NULL, + TRUE /* no_shutdown_check */); + + gdm_debug ("term_session_stop_and_quit: Final cleanup"); +@@ -956,11 +958,11 @@ static gboolean + setup_automatic_session (GdmDisplay *display, const char *name) + { + char *new_login; +- g_free (login); +- login = g_strdup (name); ++ g_free (gdm_login); ++ gdm_login = g_strdup (name); + + greet = FALSE; +- gdm_debug ("setup_automatic_session: Automatic login: %s", login); ++ gdm_debug ("setup_automatic_session: Automatic login: %s", gdm_login); + + /* Run the init script. gdmslave suspends until script + * has terminated */ +@@ -970,12 +972,12 @@ setup_automatic_session (GdmDisplay *dis + gdm_debug ("setup_automatic_session: DisplayInit script finished"); + + new_login = NULL; +- if ( ! gdm_verify_setup_user (display, login, &new_login)) ++ if ( ! gdm_verify_setup_user (display, gdm_login, &new_login)) + return FALSE; + + if (new_login != NULL) { +- g_free (login); +- login = g_strdup (new_login); ++ g_free (gdm_login); ++ gdm_login = g_strdup (new_login); + } + + gdm_debug ("setup_automatic_session: Automatic login successful"); +@@ -1652,7 +1654,7 @@ gdm_slave_run (GdmDisplay *display) + gdm_slave_session_start (); + } + } else { +- gdm_slave_send_string (GDM_SOP_LOGIN, login); ++ gdm_slave_send_string (GDM_SOP_LOGIN, gdm_login); + gdm_slave_session_start (); + } + +@@ -1982,8 +1984,8 @@ restart_the_greeter (void) + gdm_slave_desensitize_config (); + + /* no login */ +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + + /* Now restart it */ + if (greet) { +@@ -2061,11 +2063,11 @@ gdm_slave_wait_for_login (void) + { + const char *successsound; + char *username; +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + + /* Chat with greeter */ +- while (login == NULL) { ++ while (gdm_login == NULL) { + /* init to a sane value */ + do_timed_login = FALSE; + do_configurator = FALSE; +@@ -2087,21 +2089,21 @@ gdm_slave_wait_for_login (void) + gdm_debug ("gdm_slave_wait_for_login: In loop"); + username = d->preset_user; + d->preset_user = NULL; +- login = gdm_verify_user (d /* the display */, ++ gdm_login = gdm_verify_user (d /* the display */, + username /* username */, + TRUE /* allow retry */); + g_free (username); + + gdm_debug ("gdm_slave_wait_for_login: end verify for '%s'", +- ve_sure_string (login)); ++ ve_sure_string (gdm_login)); + + /* Complex, make sure to always handle the do_configurator + * do_timed_login and do_restart_greeter after any call + * to gdm_verify_user */ + + if G_UNLIKELY (do_restart_greeter) { +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + do_restart_greeter = FALSE; + restart_the_greeter (); + continue; +@@ -2114,8 +2116,8 @@ gdm_slave_wait_for_login (void) + gboolean oldAllowRoot; + + do_configurator = FALSE; +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + /* clear any error */ + gdm_slave_greeter_ctl_no_ret (GDM_ERRBOX, ""); + gdm_slave_greeter_ctl_no_ret +@@ -2134,7 +2136,7 @@ gdm_slave_wait_for_login (void) + } + + gdm_slave_greeter_ctl_no_ret (GDM_SETLOGIN, pwent->pw_name); +- login = gdm_verify_user (d, ++ gdm_login = gdm_verify_user (d, + pwent->pw_name, + FALSE); + gdm_daemon_config_set_value_bool (GDM_KEY_ALLOW_ROOT, oldAllowRoot); +@@ -2143,8 +2145,8 @@ gdm_slave_wait_for_login (void) + gdm_slave_greeter_ctl_no_ret (GDM_MSG, ""); + + if G_UNLIKELY (do_restart_greeter) { +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + do_restart_greeter = FALSE; + restart_the_greeter (); + continue; +@@ -2153,15 +2155,15 @@ gdm_slave_wait_for_login (void) + check_notifies_now (); + + /* The user can't remember his password */ +- if (login == NULL) { ++ if (gdm_login == NULL) { + gdm_debug ("gdm_slave_wait_for_login: No login/Bad login"); + gdm_slave_greeter_ctl_no_ret (GDM_RESET, ""); + continue; + } + + /* Wipe the login */ +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + + /* Note that this can still fall through to + * the timed login if the user doesn't type in the +@@ -2240,7 +2242,7 @@ gdm_slave_wait_for_login (void) + break; + } + +- if (login == NULL) { ++ if (gdm_login == NULL) { + const char *failuresound = gdm_daemon_config_get_value_string (GDM_KEY_SOUND_ON_LOGIN_FAILURE_FILE); + + gdm_debug ("gdm_slave_wait_for_login: No login/Bad login"); +@@ -2258,8 +2260,8 @@ gdm_slave_wait_for_login (void) + + /* The user timed out into a timed login during the conversation */ + if (do_timed_login) { +- g_free (login); +- login = NULL; ++ g_free (gdm_login); ++ gdm_login = NULL; + /* timed login is automatic, thus no need for greeter, + * we'll take default values */ + gdm_slave_whack_greeter (); +@@ -2269,7 +2271,7 @@ gdm_slave_wait_for_login (void) + + successsound = gdm_daemon_config_get_value_string (GDM_KEY_SOUND_ON_LOGIN_SUCCESS_FILE); + /* Play sounds if specified for a successful login */ +- if (login != NULL && successsound && ++ if (gdm_login != NULL && successsound && + gdm_daemon_config_get_value_bool (GDM_KEY_SOUND_ON_LOGIN_SUCCESS) && + d->attached && + ! play_login_sound (successsound)) { +@@ -2278,7 +2280,7 @@ gdm_slave_wait_for_login (void) + } + + gdm_debug ("gdm_slave_wait_for_login: got_login for '%s'", +- ve_sure_string (login)); ++ ve_sure_string (gdm_login)); + + + } +@@ -3716,7 +3718,7 @@ session_child_run (struct passwd *pwent, + gdm_child_exit (DISPLAY_REMANAGE, + _("%s: Could not setup environment for %s. " + "Aborting."), +- "session_child_run", login); ++ "session_child_run", gdm_login); + + /* setup euid/egid to the correct user, + * not to leave the egid around. It's +@@ -3783,11 +3785,11 @@ session_child_run (struct passwd *pwent, + gdm_child_exit (DISPLAY_REMANAGE, + _("%s: setusercontext () failed for %s. " + "Aborting."), "session_child_run", +- login); ++ gdm_login); + #else + if G_UNLIKELY (setuid (pwent->pw_uid) < 0) + gdm_child_exit (DISPLAY_REMANAGE, +- _("%s: Could not become %s. Aborting."), "session_child_run", login); ++ _("%s: Could not become %s. Aborting."), "session_child_run", gdm_login); + #endif + + /* Only force GDM_LANG to something if there is other then +@@ -3977,7 +3979,7 @@ session_child_run (struct passwd *pwent, + failsafe = TRUE; + } + +- gdm_debug ("Running %s for %s on %s", fullexec->str, login, d->name); ++ gdm_debug ("Running %s for %s on %s", fullexec->str, gdm_login, d->name); + + if ( ! ve_string_empty (pwent->pw_shell)) { + shell = pwent->pw_shell; +@@ -4002,7 +4004,7 @@ session_child_run (struct passwd *pwent, + + #ifdef CAN_USE_SETPENV + /* Call the function setpenv which instanciates the extern variable "newenv" */ +- setpenv (login, (PENV_INIT | PENV_NOEXEC), NULL, NULL); ++ setpenv (gdm_login, (PENV_INIT | PENV_NOEXEC), NULL, NULL); + + /* Add the content of the "newenv" variable to the environment */ + for (i=0; newenv != NULL && newenv[i] != NULL; i++) { +@@ -4208,8 +4210,8 @@ gdm_slave_write_utmp_wtmp_record (GdmDis + const gchar *username, + GPid pid) + { +- struct utmpx record = { 0 }; +- struct utmpx *u = NULL; ++ struct utmp record = { 0 }; ++ struct utmp *u = NULL; + GTimeVal now = { 0 }; + gchar *device_name = NULL; + gchar *host; +@@ -4231,40 +4233,40 @@ gdm_slave_write_utmp_wtmp_record (GdmDis + * username entry to accidently get logged. + */ + if (username != NULL) { +- strncpy (record.ut_user, ++ strncpy (record.ut_name, + username, +- sizeof (record.ut_user)); ++ sizeof (record.ut_name)); + } else { + g_assert (record_type == GDM_SESSION_RECORD_TYPE_FAILED_ATTEMPT); +- strncpy (record.ut_user, ++ strncpy (record.ut_name, + "(unknown)", +- sizeof (record.ut_user)); ++ sizeof (record.ut_name)); + } + + gdm_debug ("utmp-wtmp: Using username %.*s", +- sizeof (record.ut_user), +- record.ut_user); ++ sizeof (record.ut_name), ++ record.ut_name); + } + + if (record_type == GDM_SESSION_RECORD_TYPE_LOGOUT) { +- record.ut_type = DEAD_PROCESS; ++ /*record.ut_type = DEAD_PROCESS;*/ + gdm_debug ("utmp-wtmp: Using type DEAD_PROCESS"); + } else { +- record.ut_type = USER_PROCESS; ++ /*record.ut_type = USER_PROCESS;*/ + gdm_debug ("utmp-wtmp: Using type USER_PROCESS"); + } + +- record.ut_pid = pid; +- gdm_debug ("utmp-wtmp: Using pid %d", (gint)record.ut_pid); ++ /*record.ut_pid = pid;*/ ++ gdm_debug ("utmp-wtmp: Using pid %d", (gint)pid); + + g_get_current_time (&now); +- record.ut_tv.tv_sec = now.tv_sec; +- gdm_debug ("utmp-wtmp: Using time %ld", (glong) record.ut_tv.tv_sec); ++ record.ut_time = now.tv_sec; ++ gdm_debug ("utmp-wtmp: Using time %ld", (glong) record.ut_time); + +- strncpy (record.ut_id, d->name, sizeof (record.ut_id)); ++/* strncpy (record.ut_id, d->name, sizeof (record.ut_id)); + gdm_debug ("utmp-wtmp: Using id %.*s", + sizeof (record.ut_id), +- record.ut_id); ++ record.ut_id);*/ + + if (device_name != NULL) { + g_assert (g_str_has_prefix (device_name, "/dev/")); +@@ -4303,6 +4305,7 @@ gdm_slave_write_utmp_wtmp_record (GdmDis + switch (record_type) + { + case GDM_SESSION_RECORD_TYPE_LOGIN: ++#if 0 + gdm_debug ("Login utmp/wtmp record"); + updwtmpx (GDM_NEW_RECORDS_FILE, &record); + +@@ -4326,11 +4329,15 @@ gdm_slave_write_utmp_wtmp_record (GdmDis + gdm_debug ("Adding new utmp record"); + pututxline (&record); + } ++#else ++ login(&record); ++#endif + + break; + + case GDM_SESSION_RECORD_TYPE_LOGOUT: + gdm_debug ("Logout utmp/wtmp record"); ++#if 0 + + updwtmpx (GDM_NEW_RECORDS_FILE, &record); + +@@ -4357,12 +4364,15 @@ gdm_slave_write_utmp_wtmp_record (GdmDis + } + + endutxent (); ++#else ++ logout(record.ut_line); ++#endif + break; + + case GDM_SESSION_RECORD_TYPE_FAILED_ATTEMPT: + gdm_debug ("Writing failed session attempt record to " + GDM_BAD_RECORDS_FILE); +- updwtmpx (GDM_BAD_RECORDS_FILE, &record); ++ /*updwtmpx (GDM_BAD_RECORDS_FILE, &record);*/ + break; + } + } +@@ -4391,16 +4401,16 @@ gdm_slave_session_start (void) + int logfilefd; + + gdm_debug ("gdm_slave_session_start: Attempting session for user '%s'", +- login); ++ gdm_login); + +- pwent = getpwnam (login); ++ pwent = getpwnam (gdm_login); + + if G_UNLIKELY (pwent == NULL) { + /* This is sort of an "assert", this should NEVER happen */ + if (greet) + gdm_slave_whack_greeter (); + gdm_slave_exit (DISPLAY_REMANAGE, +- _("%s: User passed auth but getpwnam (%s) failed!"), "gdm_slave_session_start", login); ++ _("%s: User passed auth but getpwnam (%s) failed!"), "gdm_slave_session_start", gdm_login); + } + + logged_in_uid = uid = pwent->pw_uid; +@@ -4408,7 +4418,7 @@ gdm_slave_session_start (void) + + /* Run the PostLogin script */ + if G_UNLIKELY (gdm_slave_exec_script (d, gdm_daemon_config_get_value_string (GDM_KEY_POSTLOGIN), +- login, pwent, ++ gdm_login, pwent, + TRUE /* pass_stdout */) != EXIT_SUCCESS && + /* ignore errors in failsafe modes */ + ! failsafe) { +@@ -4448,7 +4458,7 @@ gdm_slave_session_start (void) + + gdm_error (_("%s: Home directory for %s: '%s' does not exist!"), + "gdm_slave_session_start", +- login, ++ gdm_login, + ve_sure_string (pwent->pw_dir)); + + /* Check what the user wants to do */ +@@ -4900,8 +4910,8 @@ gdm_slave_session_stop (gboolean run_pos + + session_started = FALSE; + +- local_login = login; +- login = NULL; ++ local_login = gdm_login; ++ gdm_login = NULL; + + /* don't use NEVER_FAILS_ here this can be called from places + kind of exiting and it's ok if this doesn't work (when shouldn't diff --git a/x11/gdm/pkg-plist b/x11/gdm/pkg-plist index 0722f326f..dad8bd485 100644 --- a/x11/gdm/pkg-plist +++ b/x11/gdm/pkg-plist @@ -48,6 +48,14 @@ sbin/gdmsetup %%DATADIR%%/gdmchooser.glade %%DATADIR%%/gdmphotosetup.glade %%DATADIR%%/gdmsetup.glade +%%DATADIR%%/icons/hicolor/24x24/actions/system-log-out.png +%%DATADIR%%/icons/hicolor/24x24/actions/system-restart.png +%%DATADIR%%/icons/hicolor/24x24/actions/system-shut-down.png +%%DATADIR%%/icons/hicolor/24x24/actions/system-suspend.png +%%DATADIR%%/icons/hicolor/24x24/apps/preferences-desktop-locale.png +%%DATADIR%%/icons/hicolor/24x24/apps/preferences-desktop-remote-desktop.png +%%DATADIR%%/icons/hicolor/24x24/places/user-desktop.png +%%DATADIR%%/icons/hicolor/icon-theme.cache %%DATADIR%%/themes/circles/GdmGreeterTheme.desktop %%DATADIR%%/themes/circles/background.svg %%DATADIR%%/themes/circles/circles.xml @@ -78,6 +86,10 @@ share/gnome/help/gdm/uk/gdm.xml share/icons/hicolor/16x16/apps/gdm-xnest.png share/icons/hicolor/32x32/apps/gdm-setup.png share/icons/hicolor/32x32/apps/gdm-xnest.png +share/icons/hicolor/48x48/apps/gdm-login-photo.png +share/icons/hicolor/48x48/apps/gdm-setup.png +share/icons/hicolor/48x48/apps/gdm-xnest.png +share/icons/hicolor/48x48/apps/gdm.png share/locale/af/LC_MESSAGES/gdm.mo share/locale/am/LC_MESSAGES/gdm.mo share/locale/ar/LC_MESSAGES/gdm.mo @@ -141,6 +153,7 @@ share/locale/pt_BR/LC_MESSAGES/gdm.mo share/locale/ro/LC_MESSAGES/gdm.mo share/locale/ru/LC_MESSAGES/gdm.mo share/locale/rw/LC_MESSAGES/gdm.mo +share/locale/si/LC_MESSAGES/gdm.mo share/locale/sk/LC_MESSAGES/gdm.mo share/locale/sl/LC_MESSAGES/gdm.mo share/locale/sq/LC_MESSAGES/gdm.mo @@ -190,10 +203,6 @@ share/pixmaps/faces/sunset.jpg share/pixmaps/faces/tennis-ball.png share/pixmaps/faces/yellow-rose.jpg share/pixmaps/gdm-foot-logo.png -share/pixmaps/gdm-setup.png -share/pixmaps/gdm-xnest.png -share/pixmaps/gdm.png -share/pixmaps/login-photo.png share/pixmaps/nobody.png share/pixmaps/nohost.png share/xsessions/gnome.desktop @@ -212,6 +221,12 @@ share/xsessions/gnome.desktop @dirrm %%DATADIR%%/themes/happygnome @dirrm %%DATADIR%%/themes/circles @dirrm %%DATADIR%%/themes +@dirrm %%DATADIR%%/icons/hicolor/24x24/places +@dirrm %%DATADIR%%/icons/hicolor/24x24/apps +@dirrm %%DATADIR%%/icons/hicolor/24x24/actions +@dirrm %%DATADIR%%/icons/hicolor/24x24 +@dirrm %%DATADIR%%/icons/hicolor +@dirrm %%DATADIR%%/icons @dirrm %%DATADIR%%/applications @dirrm %%DATADIR%%/BuiltInSessions @dirrm %%DATADIR%% @@ -235,6 +250,8 @@ share/xsessions/gnome.desktop @dirrmtry share/locale/zh_HK @dirrmtry share/locale/xh/LC_MESSAGES @dirrmtry share/locale/xh +@dirrmtry share/locale/si/LC_MESSAGES +@dirrmtry share/locale/si @dirrmtry share/locale/rw/LC_MESSAGES @dirrmtry share/locale/rw @dirrmtry share/locale/oc/LC_MESSAGES |