diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile index 3e4ea839fa38..d724d456eee5 100644 --- a/x11/gdm/Makefile +++ b/x11/gdm/Makefile @@ -1,160 +1,159 @@ # Created by: Joe Marcus Clarke PORTNAME= gdm -PORTVERSION= 41.3 -PORTREVISION= 2 +PORTVERSION= 42.0 CATEGORIES= x11 gnome MASTER_SITES= GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+)\..*/\1/} DIST_SUBDIR= gnome MAINTAINER= gnome@FreeBSD.org -COMMENT= GNOME 3 display manager +COMMENT= GNOME display manager LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= iso-codes>=0:misc/iso-codes \ itstool:textproc/itstool \ zenity>=3.0.0:x11/zenity LIB_DEPENDS= libaccountsservice.so:sysutils/accountsservice \ libcanberra-gtk3.so:audio/libcanberra-gtk3 \ libcanberra.so:audio/libcanberra \ libck-connector.so:sysutils/consolekit2 \ libfribidi.so:converters/fribidi RUN_DEPENDS= at-spi2-core>=0:accessibility/at-spi2-core \ gnome-icon-theme-symbolic>=0:x11-themes/gnome-icon-theme-symbolic \ gnome-keyring-3:security/gnome-keyring \ gnome-session>=3.0.0:x11/gnome-session \ gnome-settings-daemon>=3.0.0:sysutils/gnome-settings-daemon \ iso-codes>=0:misc/iso-codes \ polkit-gnome>=0.105:sysutils/polkit-gnome \ zenity>=3.0.0:x11/zenity # used in scripts RUN_DEPENDS+= setxkbmap:x11/setxkbmap \ xhost:x11/xhost \ xmodmap:x11/xmodmap \ xrdb:x11/xrdb \ xsetroot:x11/xsetroot \ xterm:x11/xterm USERS= gdm GROUPS= gdm video PORTSCOUT= limitw:1,even USES= cpe gettext gnome libtool localbase:ldflags meson pathfix \ pkgconfig tar:xz xorg CPE_VENDOR= gnome CPE_PRODUCT= gnome_display_manager USE_GNOME= cairo dconf gtk30 intltool introspection USE_LDCONFIG= yes USE_XORG= x11 xau xcb xdmcp xorgproto USE_RC_SUBR= gdm USE_GNOME_SUBR= yes GLIB_SCHEMAS= org.gnome.login-screen.gschema.xml MESON_ARGS= -Dat-spi-registryd-dir=${PREFIX}/libexec \ -Dcustom-conf=${PREFIX}/etc/gdm/custom.conf \ -Ddbus-sys=${PREFIX}/etc/dbus-1/system.d \ -Ddefault-pam-config=none \ -Ddmconfdir=${PREFIX}/share/xsessions \ -Dgdm-xsession=true \ -Dgroup=gdm \ -Dinitial-vt=09 \ -Dlang-file=${PREFIX}/etc/gdm/locale.conf \ -Dlibaudit=disabled \ -Dlog-dir=/var/log/gdm \ -Dpid-file=/var/run/gdm.pid \ -Dplymouth=disabled \ -Dscreenshot-dir=/var/run/gdm/greeter \ -Dselinux=disabled \ -Dsysconfsubdir=gdm \ -Dsystemd-journal=false \ -Duser-display-server=false \ -Duser=gdm \ -Dwayland-support=false \ -Dworking-dir=/var/db/gdm \ -Dxauth-dir=/var/run/gdm # this is a hack until we can get our own pam dir and dir in order. CPPFLAGS+= -DHAS_SA_LEN -DWITH_CONSOLE_KIT=1 INSTALL_TARGET= install-strip SUB_FILES+= client.conf gdm-autologin gdm-launch-environment gdm-password \ locale.conf GDMDIR?= ${PREFIX}/etc/gdm GNOME_LOCALSTATEDIR= /var OPTIONS_DEFINE= IPV6 IPV6_MESON_ENABLE= ipv6 .include post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ -e 's|/bin/bash|/bin/sh|g' \ ${WRKSRC}/daemon/gdm-session-worker.c @${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' \ -e 's|/usr/bin/X|${LOCALBASE}/bin/X|g' \ -e 's|/usr/bin/Xorg|${LOCALBASE}/bin/Xorg|g' \ ${WRKSRC}/meson.build ${WRKSRC}/daemon/*.c ${WRKSRC}/po/*.po @${REINPLACE_CMD} -e 's|/at-spi-registryd|/at-spi2-registryd|g' \ ${WRKSRC}/chooser/gdm-host-chooser.c \ ${WRKSRC}/chooser/chooser-main.c @${REINPLACE_CMD} -e 's|/etc/X11|${LOCALBASE}/etc/X11|g' \ ${WRKSRC}/data/Init.in \ ${WRKSRC}/data/PostLogin \ ${WRKSRC}/data/PostSession.in \ ${WRKSRC}/data/PreSession.in \ ${WRKSRC}/data/Xsession.in @${RM} ${WRKSRC}/data/applications/gdm-simple-greeter.desktop \ ${WRKSRC}/data/applications/gdm-simple-greeter.desktop.in \ ${WRKSRC}/data/applications/gnome-shell.desktop \ post-install: ${MV} ${STAGEDIR}${PREFIX}/etc/gdm/custom.conf \ ${STAGEDIR}${PREFIX}/etc/gdm/custom.conf.sample ${MV} ${STAGEDIR}${PREFIX}/etc/gdm/PostSession/Default \ ${STAGEDIR}${PREFIX}/etc/gdm/PostSession/Default.sample ${MV} ${STAGEDIR}${PREFIX}/etc/gdm/PreSession/Default \ ${STAGEDIR}${PREFIX}/etc/gdm/PreSession/Default.sample ${MV} ${STAGEDIR}${PREFIX}/etc/gdm/Init/Default \ ${STAGEDIR}${PREFIX}/etc/gdm/Init/Default.sample ${MV} ${STAGEDIR}${PREFIX}/etc/gdm/Xsession \ ${STAGEDIR}${PREFIX}/etc/gdm/Xsession.sample ${MV} ${STAGEDIR}${PREFIX}/etc/dbus-1/system.d/gdm.conf \ ${STAGEDIR}${PREFIX}/etc/dbus-1/system.d/gdm.conf.sample ${MKDIR} ${STAGEDIR}${PREFIX}/share/xsessions ${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdm/Sessions ${MKDIR} ${STAGEDIR}${PREFIX}/etc/dm/Sessions ${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdm/home ${MKDIR} ${STAGEDIR}${PREFIX}/etc/gdm/home/.pulse/ ${INSTALL_DATA} ${WRKDIR}/gdm-autologin \ ${STAGEDIR}${PREFIX}/etc/pam.d/gdm-autologin.sample ${INSTALL_DATA} ${WRKDIR}/gdm-launch-environment \ ${STAGEDIR}${PREFIX}/etc/pam.d/gdm-launch-environment.sample ${INSTALL_DATA} ${WRKDIR}/gdm-password \ ${STAGEDIR}${PREFIX}/etc/pam.d/gdm-password.sample ${INSTALL_DATA} ${WRKDIR}/client.conf \ ${STAGEDIR}${PREFIX}/etc/gdm/home/.pulse/client.conf.sample ${INSTALL_DATA} ${WRKDIR}/locale.conf \ ${STAGEDIR}${PREFIX}/etc/gdm/locale.conf.sample ${MKDIR} ${STAGEDIR}/var/cache/gdm ${MKDIR} ${STAGEDIR}/var/log/gdm ${MKDIR} ${STAGEDIR}/var/run/gdm ${MKDIR} ${STAGEDIR}/var/run/gdm/greeter @${RM} ${STAGEDIR}${PREFIX}/lib/udev/rules.d/61-gdm.rules @${RMDIR} ${STAGEDIR}${PREFIX}/lib/udev/rules.d @${RMDIR} ${STAGEDIR}${PREFIX}/lib/udev .include diff --git a/x11/gdm/distinfo b/x11/gdm/distinfo index 01635d103c86..a80583954905 100644 --- a/x11/gdm/distinfo +++ b/x11/gdm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1643405191 -SHA256 (gnome/gdm-41.3.tar.xz) = bb0b650a7cea90f09a33284fbd02975315407efc18e814009852d1bcad3437d4 -SIZE (gnome/gdm-41.3.tar.xz) = 807452 +TIMESTAMP = 1647984111 +SHA256 (gnome/gdm-42.0.tar.xz) = a328ac976937bec179971ff07829a1246b98ce724181c128ae32a0ba47ad3855 +SIZE (gnome/gdm-42.0.tar.xz) = 811200 diff --git a/x11/gdm/files/patch-daemon_gdm-local-display-factory.c b/x11/gdm/files/patch-daemon_gdm-local-display-factory.c index d9b65326ca26..5219f30fc618 100644 --- a/x11/gdm/files/patch-daemon_gdm-local-display-factory.c +++ b/x11/gdm/files/patch-daemon_gdm-local-display-factory.c @@ -1,206 +1,218 @@ ---- daemon/gdm-local-display-factory.c.orig 2022-01-12 14:15:56 UTC +--- daemon/gdm-local-display-factory.c.orig 2022-03-21 18:12:40 UTC +++ daemon/gdm-local-display-factory.c -@@ -28,7 +28,9 @@ - #include +@@ -29,10 +29,12 @@ #include + #ifdef HAVE_UDEV +-#include ++#undef HAVE_UDEV + #endif + +#ifdef WITH_SYSTEMD #include +#endif #include "gdm-common.h" #include "gdm-manager.h" -@@ -61,8 +63,10 @@ struct _GdmLocalDisplayFactory +@@ -68,8 +70,10 @@ struct _GdmLocalDisplayFactory /* FIXME: this needs to be per seat? */ guint num_failures; +#ifdef WITH_SYSTEMD guint seat_new_id; guint seat_removed_id; +#endif guint seat_properties_changed_id; - gboolean seat0_graphics_check_timed_out; -@@ -94,9 +98,11 @@ static void on_display_status_changed + gboolean seat0_has_platform_graphics; +@@ -106,9 +110,11 @@ static gpointer local_display_factory_object = NULL; static gboolean gdm_local_display_factory_sync_seats (GdmLocalDisplayFactory *factory); static gpointer local_display_factory_object = NULL; +#ifdef WITH_SYSTEMD static gboolean lookup_by_session_id (const char *id, GdmDisplay *display, gpointer user_data); +#endif G_DEFINE_TYPE (GdmLocalDisplayFactory, gdm_local_display_factory, GDM_TYPE_DISPLAY_FACTORY) -@@ -233,9 +239,9 @@ struct GdmDisplayServerConfiguration { +@@ -245,9 +251,9 @@ struct GdmDisplayServerConfiguration { const char *session_type; } display_server_configuration[] = { #ifdef ENABLE_WAYLAND_SUPPORT - { "wayland", GDM_KEY_WAYLAND_ENABLE, "/usr/bin/Xwayland", "wayland" }, + { "wayland", GDM_KEY_WAYLAND_ENABLE, "/usr/local/bin/Xwayland", "wayland" }, #endif - { "xorg", GDM_KEY_XORG_ENABLE, "/usr/bin/Xorg", "x11" }, + { "xorg", GDM_KEY_XORG_ENABLE, X_SERVER, "x11" }, { NULL, NULL, NULL }, }; -@@ -439,6 +445,7 @@ gdm_local_display_factory_create_transient_display (Gd +@@ -373,7 +379,6 @@ gdm_local_display_factory_create_transient_display (Gd + gboolean ret; + GdmDisplay *display = NULL; + gboolean is_initial = FALSE; +- const char *session_type; + g_autofree gchar *preferred_display_server = NULL; + + g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE); +@@ -451,6 +456,7 @@ gdm_local_display_factory_create_transient_display (Gd return ret; } +#ifdef WITH_SYSTEMD static void finish_display_on_seat_if_waiting (GdmDisplayStore *display_store, GdmDisplay *display, -@@ -493,6 +500,7 @@ on_session_registered_cb (GObject *gobject, +@@ -505,6 +511,7 @@ on_session_registered_cb (GObject *gobject, finish_waiting_displays_on_seat (factory, "seat0"); } +#endif static void on_display_status_changed (GdmDisplay *display, -@@ -540,7 +548,7 @@ on_display_status_changed (GdmDisplay *dis +@@ -552,7 +559,7 @@ on_display_status_changed (GdmDisplay *dis * if there isn't one. */ if (is_local && - (g_strcmp0 (session_class, "greeter") != 0 || factory->active_vt == GDM_INITIAL_VT)) { + (g_strcmp0 (session_class, "greeter") != 0)) { /* reset num failures */ factory->num_failures = 0; -@@ -649,7 +657,9 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto +@@ -741,7 +748,9 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto const char *legacy_session_types[] = { "x11", NULL }; GdmDisplayStore *store; GdmDisplay *display = NULL; +#ifdef WITH_SYSTEMD g_autofree char *login_session_id = NULL; +#endif gboolean wayland_enabled = FALSE, xorg_enabled = FALSE; g_autofree gchar *preferred_display_server = NULL; gboolean falling_back = FALSE; -@@ -679,7 +689,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto - seat_supports_graphics = TRUE; +@@ -781,7 +790,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto + seat_supports_graphics = FALSE; } - if (g_strcmp0 (seat_id, "seat0") == 0) { + if (g_strcmp0 (seat_id, SEAT_ID) == 0) { is_seat0 = TRUE; falling_back = factory->num_failures > 0; -@@ -767,6 +777,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto +@@ -869,6 +878,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto return; } +#ifdef WITH_SYSTEMD /* If we already have a login window, switch to it */ if (gdm_get_login_window_session_id (seat_id, &login_session_id)) { GdmDisplay *display; -@@ -784,6 +795,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto +@@ -886,6 +896,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto return; } } +#endif g_debug ("GdmLocalDisplayFactory: Adding display on seat %s", seat_id); -@@ -827,6 +839,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto +@@ -929,6 +940,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *facto return; } +#ifdef WITH_SYSTEMD static void delete_display (GdmLocalDisplayFactory *factory, const char *seat_id) { -@@ -838,6 +851,7 @@ delete_display (GdmLocalDisplayFactory *factory, +@@ -940,6 +952,7 @@ delete_display (GdmLocalDisplayFactory *factory, store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory)); gdm_display_store_foreach_remove (store, lookup_by_seat_id, (gpointer) seat_id); } +#endif static gboolean gdm_local_display_factory_sync_seats (GdmLocalDisplayFactory *factory) -@@ -849,6 +863,8 @@ gdm_local_display_factory_sync_seats (GdmLocalDisplayF +@@ -951,6 +964,8 @@ gdm_local_display_factory_sync_seats (GdmLocalDisplayF const char *seat; g_debug ("GdmLocalDisplayFactory: enumerating seats from logind"); + +#ifdef WITH_SYSTEMD result = g_dbus_connection_call_sync (factory->connection, "org.freedesktop.login1", "/org/freedesktop/login1", -@@ -859,6 +875,18 @@ gdm_local_display_factory_sync_seats (GdmLocalDisplayF +@@ -961,6 +976,18 @@ gdm_local_display_factory_sync_seats (GdmLocalDisplayF G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); +#elif defined(WITH_CONSOLE_KIT) + result = g_dbus_connection_call_sync (factory->connection, + CK_NAME, + CK_MANAGER_PATH, + CK_MANAGER_INTERFACE, + "ListSeats", + NULL, + G_VARIANT_TYPE ("(a(so))"), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, &error); +#endif if (!result) { g_warning ("GdmLocalDisplayFactory: Failed to issue method call: %s", error->message); -@@ -878,6 +906,7 @@ gdm_local_display_factory_sync_seats (GdmLocalDisplayF +@@ -980,6 +1007,7 @@ gdm_local_display_factory_sync_seats (GdmLocalDisplayF return TRUE; } +#ifdef WITH_SYSTEMD static void on_seat_new (GDBusConnection *connection, const gchar *sender_name, -@@ -989,6 +1018,7 @@ lookup_by_tty (const char *id, +@@ -1093,6 +1121,7 @@ lookup_by_tty (const char *id, return g_strcmp0 (tty_to_check, tty_to_find) == 0; } +#endif #if defined(ENABLE_USER_DISPLAY_SERVER) static void -@@ -1166,6 +1196,7 @@ on_vt_changed (GIOChannel *source, +@@ -1295,6 +1324,7 @@ on_uevent (GUdevClient *client, } #endif +#ifdef WITH_SYSTEMD static void gdm_local_display_factory_start_monitor (GdmLocalDisplayFactory *factory) { -@@ -1215,10 +1246,12 @@ gdm_local_display_factory_start_monitor (GdmLocalDispl +@@ -1352,10 +1382,12 @@ gdm_local_display_factory_start_monitor (GdmLocalDispl } #endif } +#endif static void gdm_local_display_factory_stop_monitor (GdmLocalDisplayFactory *factory) { -+#ifdef WITH_SYSTEMD - if (factory->seat_new_id) { - g_dbus_connection_signal_unsubscribe (factory->connection, - factory->seat_new_id); -@@ -1244,6 +1277,7 @@ gdm_local_display_factory_stop_monitor (GdmLocalDispla ++#ifdef HAVE_UDEV + if (factory->uevent_handler_id) { + g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id); + factory->uevent_handler_id = 0; +@@ -1387,6 +1419,7 @@ gdm_local_display_factory_stop_monitor (GdmLocalDispla factory->wait_to_finish_timeout_id = 0; } #endif +#endif } static void -@@ -1298,7 +1332,9 @@ gdm_local_display_factory_start (GdmDisplayFactory *ba +@@ -1441,7 +1474,9 @@ gdm_local_display_factory_start (GdmDisplayFactory *ba factory, 0); +#ifdef WITH_SYSTEMD gdm_local_display_factory_start_monitor (factory); +#endif return gdm_local_display_factory_sync_seats (factory); } diff --git a/x11/gdm/files/patch-daemon_gdm-session-worker.c b/x11/gdm/files/patch-daemon_gdm-session-worker.c index a05cb45b5d4c..23d9aaa34d46 100644 --- a/x11/gdm/files/patch-daemon_gdm-session-worker.c +++ b/x11/gdm/files/patch-daemon_gdm-session-worker.c @@ -1,511 +1,502 @@ ---- daemon/gdm-session-worker.c.orig 2022-01-12 14:15:56 UTC +--- daemon/gdm-session-worker.c.orig 2022-03-21 18:12:40 UTC +++ daemon/gdm-session-worker.c @@ -28,9 +28,11 @@ #include #include #include +#ifdef WITH_SYSTEMD #include #include #include +#endif #include #include #include @@ -49,7 +51,9 @@ #include +#ifdef WITH_SYSTEMD #include +#endif #ifdef ENABLE_SYSTEMD_JOURNAL #include -@@ -94,7 +98,7 @@ - #endif - - #ifndef GDM_SESSION_DEFAULT_PATH --#define GDM_SESSION_DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin" -+#define GDM_SESSION_DEFAULT_PATH "%%LOCALBASE%%/bin:/usr/bin:/bin" - #endif - - #ifndef GDM_SESSION_ROOT_UID @@ -126,6 +130,10 @@ struct GdmSessionWorkerPrivate int exit_code; +#ifdef WITH_CONSOLE_KIT + char *session_cookie; +#endif + pam_handle_t *pam_handle; GPid child_pid; @@ -140,6 +148,11 @@ struct GdmSessionWorkerPrivate char *hostname; char *username; char *log_file; +#ifdef WITH_CONSOLE_KIT + char *session_type; + char *session_class; + char *session_service; +#endif char *session_id; uid_t uid; gid_t gid; @@ -207,6 +220,12 @@ typedef int (* GdmSessionWorkerPamNewMessagesFunc) (in struct pam_response **, gpointer); +#ifdef WITH_CONSOLE_KIT +static char * +gdm_session_worker_get_environment_variable (GdmSessionWorker *worker, + const char *key); +#endif + G_DEFINE_TYPE_WITH_CODE (GdmSessionWorker, gdm_session_worker, GDM_DBUS_TYPE_WORKER_SKELETON, @@ -214,6 +233,211 @@ G_DEFINE_TYPE_WITH_CODE (GdmSessionWorker, worker_interface_init) G_ADD_PRIVATE (GdmSessionWorker)) +#ifdef WITH_CONSOLE_KIT +static gboolean +open_ck_session (GdmSessionWorker *worker) +{ + GDBusConnection *system_bus; + GVariantBuilder builder; + GVariant *parameters; + GVariant *in_args; + struct passwd *pwent; + GVariant *reply; + GError *error = NULL; + const char *display_name; + const char *display_device; + const char *display_hostname; + gint32 uid; + + g_assert (worker->priv->session_cookie == NULL); + + if (worker->priv->x11_display_name != NULL) { + display_name = worker->priv->x11_display_name; + } else { + display_name = ""; + } + if (worker->priv->hostname != NULL) { + display_hostname = worker->priv->hostname; + } else { + display_hostname = ""; + } + if (worker->priv->display_device != NULL) { + display_device = worker->priv->display_device; + } else { + display_device = ""; + } + + g_assert (worker->priv->username != NULL); + + gdm_get_pwent_for_name (worker->priv->username, &pwent); + if (pwent == NULL) { + goto out; + } + + uid = (gint32) pwent->pw_uid; + + error = NULL; + system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); + + if (system_bus == NULL) { + g_warning ("Couldn't create connection to system bus: %s", + error->message); + + g_error_free (error); + goto out; + } + + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(sv)")); + g_variant_builder_add_parsed (&builder, "('unix-user', <%i>)", uid); + g_variant_builder_add_parsed (&builder, "('x11-display-device', <%s>)", display_device); + g_variant_builder_add_parsed (&builder, "('x11-display', <%s>)", display_name); + g_variant_builder_add_parsed (&builder, "('remote-host-name', <%s>)", display_hostname); + g_variant_builder_add_parsed (&builder, "('is-local', <%b>)", worker->priv->display_is_local); + + worker->priv->session_type = gdm_session_worker_get_environment_variable (worker, "XDG_SESSION_TYPE"); + if (worker->priv->session_type != NULL) { + g_variant_builder_add_parsed (&builder, "('session-type', <%s>)", worker->priv->session_type); + } + + worker->priv->session_class = gdm_session_worker_get_environment_variable (worker, "XDG_SESSION_CLASS"); + if (worker->priv->session_class != NULL) { + g_variant_builder_add_parsed (&builder, "('session-class', <%s>)", worker->priv->session_class); + } + + worker->priv->session_service = gdm_session_worker_get_environment_variable (worker, "XDG_SESSION_SERVICE"); + if (worker->priv->session_service != NULL) { + g_variant_builder_add_parsed (&builder, "('session-service', <%s>)", worker->priv->session_service); + } + + parameters = g_variant_builder_end (&builder); + in_args = g_variant_new_tuple (¶meters, 1); + + reply = g_dbus_connection_call_sync (system_bus, + CK_NAME, + CK_MANAGER_PATH, + CK_MANAGER_INTERFACE, + "OpenSessionWithParameters", + in_args, + G_VARIANT_TYPE ("(s)"), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + if (! reply) { + g_warning ("%s\n", error->message); + g_clear_error (&error); + goto out; + } + + g_variant_get (reply, "(s)", &worker->priv->session_cookie); + + g_variant_unref (reply); + +out: + return worker->priv->session_cookie != NULL; +} + +static void +close_ck_session (GdmSessionWorker *worker) +{ + GDBusConnection *system_bus; + GVariant *reply; + GError *error = NULL; + gboolean was_closed; + + if (worker->priv->session_cookie == NULL) { + return; + } + + error = NULL; + system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); + + if (system_bus == NULL) { + g_warning ("Couldn't create connection to system bus: %s", + error->message); + + g_error_free (error); + goto out; + } + + reply = g_dbus_connection_call_sync (system_bus, + CK_NAME, + CK_MANAGER_PATH, + CK_MANAGER_INTERFACE, + "CloseSession", + g_variant_new ("(s)", worker->priv->session_cookie), + G_VARIANT_TYPE ("(b)"), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + if (! reply) { + g_warning ("%s", error->message); + g_clear_error (&error); + goto out; + } + + g_variant_get (reply, "(b)", &was_closed); + + if (!was_closed) { + g_warning ("Unable to close ConsoleKit session"); + } + + g_variant_unref (reply); + +out: + g_clear_pointer (&worker->priv->session_cookie, + (GDestroyNotify) g_free); +} + +static char * +get_ck_session_id (GdmSessionWorker *worker) +{ + GDBusConnection *system_bus; + GVariant *reply; + GError *error = NULL; + char *session_id = NULL; + + error = NULL; + system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); + + if (system_bus == NULL) { + g_warning ("Couldn't create connection to system bus: %s", + error->message); + + g_error_free (error); + goto out; + } + + reply = g_dbus_connection_call_sync (system_bus, + CK_NAME, + CK_MANAGER_PATH, + CK_MANAGER_INTERFACE, + "GetSessionForCookie", + g_variant_new ("(s)", worker->priv->session_cookie), + G_VARIANT_TYPE ("(o)"), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + if (reply == NULL) { + g_warning ("%s", error->message); + g_clear_error (&error); + goto out; + } + + g_variant_get (reply, "(o)", &session_id); + + g_variant_unref (reply); + +out: + return session_id; +} +#endif + /* adapted from glib script_execute */ static void script_execute (const gchar *file, @@ -670,7 +894,9 @@ gdm_session_worker_process_pam_message (GdmSessionWork char *user_answer; gboolean res; char *utf8_msg; +#ifdef PAM_RADIO_TYPE char *msg; +#endif if (response != NULL) { *response = NULL; @@ -914,6 +1140,7 @@ gdm_session_worker_stop_auditor (GdmSessionWorker *wor worker->priv->auditor = NULL; } +#ifdef WITH_SYSTEMD static void on_release_display (int signal) { @@ -1056,6 +1283,7 @@ jump_to_vt (GdmSessionWorker *worker, close (active_vt_tty_fd); } +#endif static void gdm_session_worker_set_state (GdmSessionWorker *worker, @@ -1158,7 +1386,9 @@ gdm_session_worker_initialize_pam (GdmSessionWorker { struct pam_conv pam_conversation; int error_code; +#ifdef WITH_SYSTEMD char tty_string[256]; +#endif g_assert (worker->priv->pam_handle == NULL); @@ -1230,6 +1460,10 @@ gdm_session_worker_initialize_pam (GdmSessionWorker gdm_session_worker_set_environment_variable (worker, "XDG_SEAT", seat_id); } +#ifdef WITH_CONSOLE_KIT + gdm_session_worker_set_environment_variable (worker, "XDG_SESSION_SERVICE", service); +#endif + if (strcmp (service, "gdm-launch-environment") == 0) { gdm_session_worker_set_environment_variable (worker, "XDG_SESSION_CLASS", "greeter"); } @@ -1237,12 +1471,14 @@ gdm_session_worker_initialize_pam (GdmSessionWorker g_debug ("GdmSessionWorker: state SETUP_COMPLETE"); gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE); +#ifdef WITH_SYSTEMD /* Temporarily set PAM_TTY with the login VT, PAM_TTY will be reset with the users VT right before the user session is opened */ g_snprintf (tty_string, 256, "/dev/tty%d", GDM_INITIAL_VT); pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string); if (!display_is_local) worker->priv->password_is_required = TRUE; +#endif out: if (error_code != PAM_SUCCESS) { @@ -1545,7 +1781,11 @@ _lookup_passwd_info (const char *username, if (passwd_entry->pw_shell != NULL && passwd_entry->pw_shell[0] != '\0') { *shellp = g_strdup (passwd_entry->pw_shell); } else { - *shellp = g_strdup ("/bin/bash"); +#if defined(__OpenBSD__) + *shellp = g_strdup ("/bin/ksh"); +#else + *shellp = g_strdup ("/bin/sh"); +#endif } } ret = TRUE; @@ -1689,6 +1929,20 @@ gdm_session_worker_get_environment (GdmSessionWorker * return (const char * const *) pam_getenvlist (worker->priv->pam_handle); } +#ifdef WITH_CONSOLE_KIT +static void +register_ck_session (GdmSessionWorker *worker) +{ + open_ck_session (worker); + + if (worker->priv->session_cookie != NULL) { + gdm_session_worker_set_environment_variable (worker, + "XDG_SESSION_COOKIE", + worker->priv->session_cookie); + } +} +#endif + static gboolean run_script (GdmSessionWorker *worker, const char *dir) @@ -1766,6 +2020,10 @@ session_worker_child_watch (GPid pid, : WIFSIGNALED (status) ? WTERMSIG (status) : -1); +#ifdef WITH_CONSOLE_KIT + close_ck_session (worker); +#endif + gdm_session_worker_uninitialize_pam (worker, PAM_SUCCESS); worker->priv->child_pid = -1; @@ -1978,6 +2236,7 @@ gdm_session_worker_start_session (GdmSessionWorker *w error_code = PAM_SUCCESS; +#ifdef WITH_SYSTEMD /* If we're in new vt mode, jump to the new vt now. There's no need to jump for * the other two modes: in the logind case, the session will activate itself when * ready, and in the reuse server case, we're already on the correct VT. */ @@ -1986,6 +2245,7 @@ gdm_session_worker_start_session (GdmSessionWorker *w jump_to_vt (worker, worker->priv->session_vt); } } +#endif if (!worker->priv->is_program_session && !run_script (worker, GDMCONFDIR "/PostLogin")) { g_set_error (error, @@ -2048,6 +2308,7 @@ gdm_session_worker_start_session (GdmSessionWorker *w _exit (EXIT_FAILURE); } +#ifdef WITH_SYSTEMD /* Take control of the tty */ if (needs_controlling_terminal) { @@ -2055,6 +2316,7 @@ gdm_session_worker_start_session (GdmSessionWorker *w g_debug ("GdmSessionWorker: could not take control of tty: %m"); } } +#endif #ifdef HAVE_LOGINCAP if (setusercontext (NULL, passwd_entry, passwd_entry->pw_uid, LOGIN_SETALL) < 0) { @@ -2186,6 +2448,7 @@ gdm_session_worker_start_session (GdmSessionWorker *w return TRUE; } +#ifdef WITH_SYSTEMD static gboolean set_up_for_new_vt (GdmSessionWorker *worker) { @@ -2286,6 +2549,7 @@ fail: close (fd); return FALSE; } +#endif static gboolean set_up_for_current_vt (GdmSessionWorker *worker, @@ -2353,12 +2617,14 @@ set_up_for_current_vt (GdmSessionWorker *worker, } #endif +#ifdef WITH_SYSTEMD if (g_strcmp0 (worker->priv->display_seat_id, "seat0") == 0) { g_debug ("GdmSessionWorker: setting XDG_VTNR to current vt"); set_xdg_vtnr_to_current_vt (worker); } else { g_debug ("GdmSessionWorker: not setting XDG_VTNR since not seat0"); } +#endif return TRUE; out: @@ -2384,6 +2650,7 @@ gdm_session_worker_open_session (GdmSessionWorker *wo break; case GDM_SESSION_DISPLAY_MODE_NEW_VT: case GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED: +#ifdef WITH_SYSTEMD if (!set_up_for_new_vt (worker)) { g_set_error (error, GDM_SESSION_WORKER_ERROR, @@ -2391,6 +2658,7 @@ gdm_session_worker_open_session (GdmSessionWorker *wo "Unable to open VT"); return FALSE; } +#endif break; } @@ -2413,8 +2681,16 @@ gdm_session_worker_open_session (GdmSessionWorker *wo g_debug ("GdmSessionWorker: state SESSION_OPENED"); gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_SESSION_OPENED); +#if defined(WITH_SYSTEMD) session_id = gdm_session_worker_get_environment_variable (worker, "XDG_SESSION_ID"); +#elif defined(WITH_CONSOLE_KIT) + register_ck_session (worker); + if (session_id == NULL) { + session_id = get_ck_session_id (worker); + } +#endif + if (session_id != NULL) { g_free (worker->priv->session_id); worker->priv->session_id = session_id; @@ -2968,6 +3244,7 @@ gdm_session_worker_handle_open (GdmDBusWorker return TRUE; } +#ifdef SUPPORTS_PAM_EXTENSIONS static char ** filter_extensions (const char * const *extensions) { @@ -2993,6 +3270,7 @@ filter_extensions (const char * const *extensions) return filtered_extensions; } +#endif static gboolean gdm_session_worker_handle_initialize (GdmDBusWorker *object, @@ -3012,8 +3290,10 @@ gdm_session_worker_handle_initialize (GdmDBusWorker while (g_variant_iter_loop (&iter, "{sv}", &key, &value)) { if (g_strcmp0 (key, "service") == 0) { worker->priv->service = g_variant_dup_string (value, NULL); +#ifdef SUPPORTS_PAM_EXTENSIONS } else if (g_strcmp0 (key, "extensions") == 0) { worker->priv->extensions = filter_extensions (g_variant_get_strv (value, NULL)); +#endif } else if (g_strcmp0 (key, "username") == 0) { worker->priv->username = g_variant_dup_string (value, NULL); } else if (g_strcmp0 (key, "is-program-session") == 0) { diff --git a/x11/gdm/files/patch-daemon_main.c b/x11/gdm/files/patch-daemon_main.c index abdcc0604e97..bf8e2ba56b83 100644 --- a/x11/gdm/files/patch-daemon_main.c +++ b/x11/gdm/files/patch-daemon_main.c @@ -1,28 +1,28 @@ ---- daemon/main.c.orig 2022-01-12 14:15:56 UTC +--- daemon/main.c.orig 2022-03-21 18:12:40 UTC +++ daemon/main.c -@@ -289,6 +289,7 @@ is_debug_set (void) +@@ -281,6 +281,7 @@ is_debug_set (void) return debug; } +#ifdef HAVE_SIGWAITINFO /* SIGUSR1 is used by the X server to tell us that we're ready, so * block it. We'll unblock it in the worker thread in gdm-server.c */ -@@ -301,6 +302,7 @@ block_sigusr1 (void) +@@ -293,6 +294,7 @@ block_sigusr1 (void) sigaddset (&mask, SIGUSR1); sigprocmask (SIG_BLOCK, &mask, NULL); } +#endif int main (int argc, -@@ -321,7 +323,9 @@ main (int argc, +@@ -313,7 +315,9 @@ main (int argc, { NULL } }; +#ifdef HAVE_SIGWAITINFO block_sigusr1 (); +#endif bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); textdomain (GETTEXT_PACKAGE); diff --git a/x11/gdm/files/patch-daemon_meson.build b/x11/gdm/files/patch-daemon_meson.build index b9d96a12b5dc..710e52e9e3d1 100644 --- a/x11/gdm/files/patch-daemon_meson.build +++ b/x11/gdm/files/patch-daemon_meson.build @@ -1,18 +1,18 @@ ---- daemon/meson.build.orig 2022-01-12 14:15:56 UTC +--- daemon/meson.build.orig 2022-03-21 18:12:40 UTC +++ daemon/meson.build -@@ -128,6 +128,7 @@ endif +@@ -128,6 +128,7 @@ gdm_session_worker = executable('gdm-session-worker', gdm_session_worker = executable('gdm-session-worker', gdm_session_worker_src, dependencies: gdm_session_worker_deps, + link_args : ['-lutil'], include_directories: gdm_session_worker_includes, install: true, install_dir: get_option('libexecdir'), -@@ -207,6 +208,7 @@ endif +@@ -211,6 +212,7 @@ gdm_daemon = executable('gdm', gdm_daemon = executable('gdm', [ gdm_daemon_sources, gdm_daemon_gen_sources ], dependencies: gdm_daemon_deps, + link_args : ['-lutil'], include_directories: config_h_dir, install: true, install_dir: get_option('sbindir') diff --git a/x11/gdm/files/patch-data_61-gdm.rules.in b/x11/gdm/files/patch-data_61-gdm.rules.in deleted file mode 100644 index 7818313a987a..000000000000 --- a/x11/gdm/files/patch-data_61-gdm.rules.in +++ /dev/null @@ -1,23 +0,0 @@ ---- data/61-gdm.rules.in.orig 2022-01-12 14:15:56 UTC -+++ data/61-gdm.rules.in -@@ -10,7 +10,9 @@ IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland - LABEL="gdm_nomodeset_end" - - # Disable wayland when nvidia modeset is disabled or when drivers are a lower --# version than 470, in any case always prefer Xorg -+# version than 470, -+# For versions above 470 but lower than 510 prefer Xorg, -+# Above 510, prefer Wayland. - KERNEL!="nvidia_drm", GOTO="gdm_nvidia_drm_end" - SUBSYSTEM!="module", GOTO="gdm_nvidia_drm_end" - ACTION!="add", GOTO="gdm_nvidia_drm_end" -@@ -18,6 +20,9 @@ ACTION!="add", GOTO="gdm_nvidia_drm_end" - ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland" - # disable wayland for nvidia drivers versions lower than 470 - ATTR{version}=="4[0-6][0-9].*|[0-3][0-9][0-9].*|[0-9][0-9].*|[0-9].*", GOTO="gdm_disable_wayland" -+# For nvidia drivers versions Above 510, keep Wayland by default -+ATTR{version}=="[5-9][1-9][0-9].*", GOTO="gdm_end" -+# For nvidia drivers versions 470-495, prefer Xorg by default - GOTO="gdm_prefer_xorg" - LABEL="gdm_nvidia_drm_end" - diff --git a/x11/gdm/files/patch-data_Init.in b/x11/gdm/files/patch-data_Init.in index ec1ed65598d1..7ec028b66b5b 100644 --- a/x11/gdm/files/patch-data_Init.in +++ b/x11/gdm/files/patch-data_Init.in @@ -1,66 +1,66 @@ ---- data/Init.in.orig 2022-01-12 14:15:56 UTC +--- data/Init.in.orig 2022-03-21 18:12:40 UTC +++ data/Init.in -@@ -6,6 +6,19 @@ +@@ -6,6 +6,19 @@ OLD_IFS=$IFS PATH="@X_PATH@:$PATH" OLD_IFS=$IFS +# enhance fade in look; +# gnome-shell-3.38.1/data/theme/gnome-shell-sass/widgets/_screen-shield.scss: +# #lockDialogGroup { +# background-color: lighten(#2e3436, 8%); +# } +xsetroot -solid "#2e3436" + +# wait for ttys to be initialized +while ! pgrep -qf "^/usr/libexec/getty "; do + sleep 1 + [ $((i++)) -ge 10 ] && break +done + gdmwhich () { COMMAND="$1" OUTPUT= @@ -22,10 +35,10 @@ gdmwhich () { echo "$OUTPUT" } -if [ -f /etc/X11/Xresources ]; then - sysresources=/etc/X11/Xresources -+if [ -f /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xresources ]; then -+ sysresources=/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xresources ++if [ -f /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xresources ]; then ++ sysresources=/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xresources else - sysresources=/usr/etc/X11/Xresources -+ sysresources=/usr/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xresources ++ sysresources=/usr/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xresources fi # merge in defaults -@@ -33,10 +46,10 @@ if [ -f "$sysresources" ]; then +@@ -33,10 +46,10 @@ fi xrdb -nocpp -merge "$sysresources" fi -if [ -f /etc/X11/Xmodmap ]; then - sysmodmap=/etc/X11/Xmodmap -+if [ -f /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xmodmap ]; then -+ sysmodmap=/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xmodmap ++if [ -f /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xmodmap ]; then ++ sysmodmap=/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xmodmap else - sysmodmap=/usr/etc/X11/Xmodmap -+ sysmodmap=/usr/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xmodmap ++ sysmodmap=/usr/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/Xmodmap fi XMODMAP=`gdmwhich xmodmap` -@@ -93,5 +106,15 @@ if [ "x$SETXKBMAP" != "x" ] ; then +@@ -93,5 +106,15 @@ fi fi fi fi + -+# /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/xenodm/GiveConsole, fbtab(5) ++# /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/xenodm/GiveConsole, fbtab(5) +if [ -c /dev/dri/card0 ]; then + /usr/sbin/chown _gdm /dev/dri/card0 +fi +if [ -c /dev/dri/renderD128 ]; then + /usr/sbin/chown _gdm /dev/dri/renderD128 +fi +# XXX OpenBSD needs an implementation of XDG_RUNTIME_DIR +rm -rf /var/db/gdm/.cache/gnome-shell/runtime-state-* exit 0 diff --git a/x11/gdm/files/patch-data_PostSession.in b/x11/gdm/files/patch-data_PostSession.in index bcb06fbdcc99..d8752cc882b3 100644 --- a/x11/gdm/files/patch-data_PostSession.in +++ b/x11/gdm/files/patch-data_PostSession.in @@ -1,14 +1,14 @@ ---- data/PostSession.in.orig 2022-01-12 14:15:56 UTC +--- data/PostSession.in.orig 2022-03-21 18:12:40 UTC +++ data/PostSession.in @@ -1,3 +1,11 @@ #!/bin/sh -+# /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/xenodm/TakeConsole, fbtab(5) ++# /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/xenodm/TakeConsole, fbtab(5) +if [ -c /dev/dri/card0 ]; then + /usr/sbin/chown root /dev/dri/card0 +fi +if [ -c /dev/dri/renderD128 ]; then + /usr/sbin/chown root /dev/dri/renderD128 +fi + exit 0 diff --git a/x11/gdm/files/patch-data_PreSession.in b/x11/gdm/files/patch-data_PreSession.in index f6731620e957..31abf42f57d9 100644 --- a/x11/gdm/files/patch-data_PreSession.in +++ b/x11/gdm/files/patch-data_PreSession.in @@ -1,14 +1,14 @@ ---- data/PreSession.in.orig 2022-01-12 14:15:56 UTC +--- data/PreSession.in.orig 2022-03-21 18:12:40 UTC +++ data/PreSession.in -@@ -7,3 +7,11 @@ +@@ -7,3 +7,11 @@ PATH="@X_PATH@:$PATH" # Note that output goes into the .xsession-errors file for easy debugging # PATH="@X_PATH@:$PATH" + -+# /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/xenodm/GiveConsole, fbtab(5) ++# /usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/usr/local/etc/X11/xenodm/GiveConsole, fbtab(5) +if [ -c /dev/dri/card0 ]; then + /usr/sbin/chown $USER /dev/dri/card0 +fi +if [ -c /dev/dri/renderD128 ]; then + /usr/sbin/chown $USER /dev/dri/renderD128 +fi diff --git a/x11/gdm/files/patch-data_pam-exherbo_gdm-autologin.pam b/x11/gdm/files/patch-data_pam-exherbo_gdm-autologin.pam deleted file mode 100644 index 79bd730409f8..000000000000 --- a/x11/gdm/files/patch-data_pam-exherbo_gdm-autologin.pam +++ /dev/null @@ -1,20 +0,0 @@ ---- data/pam-exherbo/gdm-autologin.pam.orig 2022-01-12 14:15:56 UTC -+++ data/pam-exherbo/gdm-autologin.pam -@@ -1,9 +1,7 @@ --# mirrors system-auth / system(-local)-login --# except for the authentication method, which is: --# always permit login -+#%PAM-1.0 - - auth [success=ok default=1] pam_gdm.so ---auth optional pam_gnome_keyring.so -+auth optional pam_gnome_keyring.so - auth sufficient pam_permit.so - - account include system-local-login -@@ -11,4 +9,4 @@ account include system-local-login - password include system-local-login - - session include system-local-login ---session optional pam_gnome_keyring.so auto_start -+session optional pam_gnome_keyring.so auto_start diff --git a/x11/gdm/files/patch-data_pam-exherbo_gdm-fingerprint.pam b/x11/gdm/files/patch-data_pam-exherbo_gdm-fingerprint.pam deleted file mode 100644 index 3e7098a3d6fb..000000000000 --- a/x11/gdm/files/patch-data_pam-exherbo_gdm-fingerprint.pam +++ /dev/null @@ -1,25 +0,0 @@ ---- data/pam-exherbo/gdm-fingerprint.pam.orig 2022-01-12 14:15:56 UTC -+++ data/pam-exherbo/gdm-fingerprint.pam -@@ -1,10 +1,16 @@ --account include system-login -+#%PAM-1.0 - --auth substack fingerprint-auth --auth optional pam_gnome_keyring.so -+auth required pam_shells.so -+auth required pam_nologin.so -+auth required pam_faillock.so preauth -+auth required pam_fprintd.so -+auth required pam_env.so -+auth [success=ok default=1] pam_gdm.so -+auth optional pam_gnome_keyring.so - --password required pam_deny.so -+account include system-local-login - --session substack system-login --session optional pam_gnome_keyring.so auto_start -+password include system-local-login - -+session include system-local-login -+session optional pam_gnome_keyring.so auto_start diff --git a/x11/gdm/files/patch-data_pam-exherbo_gdm-launch-environment.pam b/x11/gdm/files/patch-data_pam-exherbo_gdm-launch-environment.pam deleted file mode 100644 index 249c803fd05d..000000000000 --- a/x11/gdm/files/patch-data_pam-exherbo_gdm-launch-environment.pam +++ /dev/null @@ -1,25 +0,0 @@ ---- data/pam-exherbo/gdm-launch-environment.pam.orig 2022-01-12 14:15:56 UTC -+++ data/pam-exherbo/gdm-launch-environment.pam -@@ -1,15 +1,16 @@ --account required pam_nologin.so --account required pam_succeed_if.so audit quiet_success user = gdm --account required pam_permit.so -+#%PAM-1.0 - --auth required pam_env.so - auth required pam_succeed_if.so audit quiet_success user = gdm - auth required pam_permit.so -+auth required pam_env.so - -+account required pam_succeed_if.so audit quiet_success user = gdm -+account required pam_permit.so -+ - password required pam_deny.so - ---session optional pam_systemd.so -+session optional pam_loginuid.so - session optional pam_keyinit.so force revoke - session required pam_succeed_if.so audit quiet_success user = gdm - session required pam_permit.so -- -+-session optional pam_systemd.so diff --git a/x11/gdm/files/patch-data_pam-exherbo_gdm-password.pam b/x11/gdm/files/patch-data_pam-exherbo_gdm-password.pam deleted file mode 100644 index dca6f4c51c84..000000000000 --- a/x11/gdm/files/patch-data_pam-exherbo_gdm-password.pam +++ /dev/null @@ -1,20 +0,0 @@ ---- data/pam-exherbo/gdm-password.pam.orig 2022-01-12 14:15:56 UTC -+++ data/pam-exherbo/gdm-password.pam -@@ -1,10 +1,12 @@ --account include system-login -+#%PAM-1.0 - --auth substack system-login -+auth include system-local-login - auth optional pam_gnome_keyring.so - --password required pam_deny.so -+account include system-local-login - --session substack system-login --session optional pam_gnome_keyring.so auto_start -+password include system-local-login -+password optional pam_gnome_keyring.so use_authtok - -+session include system-local-login -+session optional pam_gnome_keyring.so auto_start diff --git a/x11/gdm/files/patch-data_pam-exherbo_gdm-smartcard.pam b/x11/gdm/files/patch-data_pam-exherbo_gdm-smartcard.pam deleted file mode 100644 index 3331fca00fe6..000000000000 --- a/x11/gdm/files/patch-data_pam-exherbo_gdm-smartcard.pam +++ /dev/null @@ -1,28 +0,0 @@ ---- data/pam-exherbo/gdm-smartcard.pam.orig 2022-01-12 14:15:56 UTC -+++ data/pam-exherbo/gdm-smartcard.pam -@@ -1,18 +1,16 @@ --# mirrors system-auth / system(-local)-login --# except for the authentication method, which is: --# smartcard login -+#%PAM-1.0 - --auth required pam_env.so --auth required pam_tally.so file=/var/log/faillog onerr=succeed - auth required pam_shells.so - auth required pam_nologin.so --auth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card card_only ---auth optional pam_gnome_keyring.so -+auth required pam_faillock.so preauth -+auth required pam_pkcs11.so wait_for_card card_only -+auth required pam_env.so -+auth [success=ok default=1] pam_gdm.so -+auth optional pam_gnome_keyring.so - - account include system-local-login - - password include system-local-login - - session include system-local-login ---session optional pam_gnome_keyring.so auto_start -- -+session optional pam_gnome_keyring.so auto_start diff --git a/x11/gdm/files/patch-meson.build b/x11/gdm/files/patch-meson.build index 18d3af61c242..33555b783dc8 100644 --- a/x11/gdm/files/patch-meson.build +++ b/x11/gdm/files/patch-meson.build @@ -1,52 +1,55 @@ ---- meson.build.orig 2022-01-12 14:15:56 UTC +--- meson.build.orig 2022-03-21 18:12:40 UTC +++ meson.build -@@ -37,7 +37,12 @@ gdm_screenshot_dir = (get_option('screenshot-dir') != +@@ -37,8 +37,14 @@ config_h_dir = include_directories('.') config_h_dir = include_directories('.') # Dependencies -udev_dep = dependency('udev') +-gudev_dep = dependency('gudev-1.0', version: '>= 232') +if host_machine.system() == 'linux' + udev_dep = dependency('udev') ++ gudev_dep = dependency('gudev-1.0', version: '>= 232') +else + udev_dep = declare_dependency() ++ gudev_dep = declare_dependency() + udev_dir = '/usr/local/lib/udev/rules.d' +endif glib_min_version = '2.56.0' -@@ -88,17 +93,22 @@ if find_x_server_out != '' +@@ -89,17 +95,22 @@ else else # what to do, what to do, this is wrong, but this just sets the # defaults, perhaps this user is cross compiling or some such - x_path = '/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin' - x_bin = '/usr/bin/X' + x_path = '/usr/local/bin/X11:/usr/local/bin:/opt/X11R6/bin' + x_bin = '/usr/local/bin/X' endif xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp')) if xdmcp_dep.found() and get_option('tcp-wrappers') libwrap_dep = cc.find_library('wrap') endif # systemd -systemd_dep = dependency('systemd') -libsystemd_dep = dependency('libsystemd') -if meson.version().version_compare('>= 0.53') +if host_machine.system() == 'linux' + systemd_dep = dependency('systemd') + libsystemd_dep = dependency('libsystemd') +else + systemd_dep = declare_dependency() + libsystemd_dep = declare_dependency() +endif +if host_machine.system() == 'linux' systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false, dirs: [ -@@ -255,6 +265,7 @@ conf.set('HAVE_UT_UT_TIME', utmp_has_time_field) +@@ -257,6 +268,7 @@ conf.set('ENABLE_IPV6', get_option('ipv6')) conf.set('HAVE_UT_UT_TV', utmp_has_tv_field) conf.set('HAVE_UT_UT_SYSLEN', utmp_has_syslen_field) conf.set('ENABLE_IPV6', get_option('ipv6')) +conf.set('HAVE_SIGWAITINFO', cc.has_function('sigwaitinfo')) configure_file(output: 'config.h', configuration: conf) # Subdirs