guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

323/334: gnu: gdm: Update package definition.


From: guix-commits
Subject: 323/334: gnu: gdm: Update package definition.
Date: Sat, 15 Aug 2020 16:27:48 -0400 (EDT)

dannym pushed a commit to branch wip-desktop
in repository guix.

commit 2241feee14292b9e0ce17e30cf37635a6459a528
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Tue Aug 11 04:36:54 2020 -0400

    gnu: gdm: Update package definition.
    
    * gnu/packages/gnome.scm (gdm) [version]: Update to 3.36.3.
    [source]<origin>[sha256]: Modify base32.
    [patches]<search-patches>[gdm-default-session.patch]: Remove patch.
    [outputs]: New output "help".
    [arguments]<#:configure-flags>[--disable-static]: New flag.
    [--enable-gdm-xsession]: New flag.
    [--enable-ipv6]: New flag.
    [--with-help-dir]: New flag.
    [--with-systemdsystemunitdir]: New flag.
    [--with-default-path]: Modify flag.
    [--with-xevie]: New flag.
    [--without-plymouth]: Remove flag.
    [--localstatedir]: Remove flag.
    [--sbindir]: Remove flag.
    <#:phases>['pre-configure]: Modify phase.
    ['install-placeholder-desktop-entry]: Remove phase.
    ['link-autostart-files]: Remove phase.
    [native-inputs]: Add check.
    [inputs]: Add glib, audit, keyutils, libice, libselinux, plymouth,
    tcp-wrappers, libx11, libxau, libxcb, libxdmcp, libext and libxinerama.
    Remove check.
    [synopsis]: Modify.
    [description]: Modify.
    
    * gnu/packages/patches/gdm-default-session.patch: Remove file.
    
    * gnu/local.mk (gdm-default-session.patch): Remove reference.
    
    Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
 gnu/local.mk                                   |   1 -
 gnu/packages/gnome.scm                         | 241 ++++++++-----------------
 gnu/packages/patches/gdm-default-session.patch |  89 ---------
 3 files changed, 75 insertions(+), 256 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index edd0be3..92a9ffe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1006,7 +1006,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/gd-fix-tests-on-i686.patch              \
   %D%/packages/patches/gd-brect-bounds.patch                   \
   %D%/packages/patches/gdb-hurd.patch                          \
-  %D%/packages/patches/gdm-default-session.patch               \
   %D%/packages/patches/gegl-mrg.patch                  \
   %D%/packages/patches/geoclue-config.patch                    \
   %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch        \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index df55306..5875aea 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -92,6 +92,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages crates-io)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
@@ -9422,172 +9423,69 @@ libxml2.")
 (define-public gdm
   (package
     (name "gdm")
-    (version "3.34.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnome/sources/" name "/"
-                                  (version-major+minor version) "/"
-                                  name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1lyqvcwxhwxklbxn4xjswjzr6fhjix6h28mi9ypn34wdm9bzcpg8"))
-              (patches (search-patches "gdm-default-session.patch"))))
+    (version "3.36.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version) "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "10byz8jwqv1qpvjj8wd36vfb8pbh9g7pchsc1gbwplf0rchbdyrv"))))
     (build-system glib-or-gtk-build-system)
+    (outputs '("out" "help"))
     (arguments
-     '(#:configure-flags
-       `("--without-plymouth"
-         "--disable-systemd-journal"
-
-         ;; Using --with-initial-vt=7 allows GDM to run alongside TTY 1,
-         ;; instead of having to replace it (i.e., stopping the mingetty
-         ;; service for TTY 1 before starting GDM).
-         "--with-initial-vt=7"
-
-         ;; Use '/etc/environment' for locale settings instead of the
-         ;; systemd-specific '/etc/locale.conf'.
-         "--with-lang-file=/etc/environment"
-
-         ,(string-append "--with-udevdir="
-                         (assoc-ref %outputs "out") "/lib/udev")
-
-         "--localstatedir=/var"
-         ,(string-append "--with-default-path="
-                         (string-join '("/run/setuid-programs"
-                                        "/run/current-system/profile/bin"
-                                        "/run/current-system/profile/sbin")
-                                      ":"))
-         ;; Put GDM in bindir so that glib-or-gtk-build-system wraps the
-         ;; XDG_DATA_DIRS so that it finds its schemas.
-         "--sbindir" ,(string-append (assoc-ref %outputs "out") "/bin"))
+     `(#:configure-flags
+       (list
+        "--disable-static"
+        "--enable-gdm-xsession"
+        "--disable-systemd-journal"
+        "--enable-ipv6"
+        (string-append "--with-help-dir="
+                       (assoc-ref %outputs "help")
+                       "/share/help")
+        (string-append "--with-udevdir="
+                       (assoc-ref %outputs "out")
+                       "/lib/udev")
+        (string-append "--with-systemdsystemunitdir="
+                       (getcwd))
+        (string-append "--with-default-path="
+                       "/run/setuid-programs"
+                       ":"
+                       "/run/current-system/profile/bin"
+                       ":"
+                       "/run/current-system/profile/sbin")
+        "--with-lang-file=/etc/environment"
+        "--with-xevie"
+        "--with-initial-vt=7")
        #:phases
        (modify-phases %standard-phases
-         (add-before
-          'configure 'pre-configure
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            ;; We don't have <systemd/sd-daemon.h>.
-            (substitute* '("common/gdm-log.c"
-                           "daemon/gdm-server.c"
-                           "daemon/gdm-session-worker.c"
-                           "daemon/gdm-session-worker-job.c")
-              (("#include <systemd/sd-daemon\\.h>") ""))
-            ;; Use elogind for sd-login.
-            (substitute* '("common/gdm-common.c"
-                           "daemon/gdm-local-display-factory.c"
-                           "daemon/gdm-manager.c"
-                           "libgdm/gdm-user-switching.c")
-              (("#include <systemd/sd-login\\.h>")
-               "#include <elogind/sd-login.h>"))
-            ;; Check for elogind.
-            (substitute* '("configure")
-              (("libsystemd")
-               "libelogind"))
-            ;; Look for system-installed sessions in
-            ;; /run/current-system/profile/share.
-            (substitute* '("libgdm/gdm-sessions.c"
-                           "daemon/gdm-session.c"
-                           "daemon/gdm-display.c"
-                           "daemon/gdm-launch-environment.c")
-              (("DATADIR \"/x")
-               "\"/run/current-system/profile/share/x")
-              (("DATADIR \"/wayland")
-               "\"/run/current-system/profile/share/wayland")
-              (("DATADIR \"/gnome")
-               "\"/run/current-system/profile/share/gnome"))
-            (let ((propagate '("GDM_CUSTOM_CONF"
-                               "GDM_DBUS_DAEMON"
-                               "GDM_X_SERVER"
-                               "GDM_X_SESSION"
-                               ;; XXX: Remove this once GNOME Shell is
-                               ;; a dependency of GDM.
-                               "XDG_DATA_DIRS")))
-              (substitute* "daemon/gdm-session.c"
-                (("set_up_session_environment \\(self\\);")
-                 (apply string-append
-                        "set_up_session_environment (self);\n"
-                        (map (lambda (name)
-                               (string-append
-                                "gdm_session_set_environment_variable "
-                                "(self, \"" name "\","
-                                "g_getenv (\"" name "\"));\n"))
-                             propagate)))))
-            ;; Find the configuration file using an environment variable.
-            (substitute* '("common/gdm-settings.c")
-              (("GDM_CUSTOM_CONF")
-               (string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL"
-                              " ? g_getenv(\"GDM_CUSTOM_CONF\")"
-                              " : GDM_CUSTOM_CONF)")))
-            ;; Use service-supplied path to X.
-            (substitute* '("daemon/gdm-server.c")
-              (("\\(X_SERVER X_SERVER_ARG_FORMAT")
-               "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")"))
-            (substitute* '("daemon/gdm-wayland-session.c"
-                           "daemon/gdm-x-session.c")
-              (("\"dbus-daemon\"")
-               "g_getenv (\"GDM_DBUS_DAEMON\")")
-              (("X_SERVER")
-               "g_getenv (\"GDM_X_SERVER\")")
-              (("GDMCONFDIR \"/Xsession\"")
-               "g_getenv (\"GDM_X_SESSION\")"))
-            ;; Use an absolute path for GNOME Session.
-            (substitute* "daemon/gdm-launch-environment.c"
-              (("\"gnome-session\"")
-               (string-append "\"" (assoc-ref inputs "gnome-session")
-                              "/bin/gnome-session\"")))
-            ;; Do not automatically select the placeholder session.
-            (substitute* "daemon/gdm-session.c"
-              (("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
-               (string-append "!g_str_has_suffix (base_name, \".desktop\") || "
-                              "(g_strcmp0(search_dirs[i], \""
-                              (assoc-ref outputs "out") 
"/share/gdm/BuiltInSessions/"
-                              "\") == 0 && "
-                              "g_strcmp0(base_name, \"fail.desktop\") == 0)"))
-              (("g_error [(]\"GdmSession: no session desktop files installed, 
aborting\\.\\.\\.\"[)];")
-               "{ self->fallback_session_name = g_strdup(\"fail\"); goto out; 
}"))
-            #t))
-         ;; GDM requires that there be at least one desktop entry
-         ;; file.  This phase installs a hidden one that simply
-         ;; fails.  This enables users to use GDM with a
-         ;; '~/.xsession' script with no other desktop entry files.
-         ;; See <https://bugs.gnu.org/35068>.
-         (add-after 'install 'install-placeholder-desktop-entry
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (sessions (string-append out "/share/gdm/BuiltInSessions"))
-                    (fail (string-append sessions "/fail.desktop")))
-               (mkdir-p sessions)
-               (with-output-to-file fail
-                 (lambda ()
-                   (for-each
-                    display
-                    '("[Desktop Entry]\n"
-                      "Encoding=UTF-8\n"
-                      "Type=Application\n"
-                      "Name=Fail\n"
-                      "Comment=This session fails immediately.\n"
-                      "NoDisplay=true\n"
-                      "Exec=false\n"))))
-               #t)))
-         ;; GDM needs GNOME Session to run these applications.  We link
-         ;; their autostart files in `share/gdm/greeter/autostart'
-         ;; because GDM explicitly tells GNOME Session to look there.
-         ;;
-         ;; XXX: GNOME Shell should be linked here too, but currently
-         ;; GNOME Shell depends on GDM.
-         (add-after 'install 'link-autostart-files
+         (add-before 'configure 'pre-configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (autostart (string-append out "/share/gdm/"
-                                              "greeter/autostart"))
-                    (settings (assoc-ref inputs "gnome-settings-daemon")))
-               (mkdir-p autostart)
-               (with-directory-excursion autostart
-                 (for-each (lambda (desktop)
-                             (symlink desktop (basename desktop)))
-                           (find-files (string-append settings "/etc/xdg"))))
-               #t))))))
+             ;; We don't have <systemd/sd-daemon.h>.
+             (substitute* '("common/gdm-log.c"
+                            "daemon/gdm-server.c"
+                            "daemon/gdm-session-worker.c"
+                            "daemon/gdm-session-worker-job.c")
+               (("#include <systemd/sd-daemon\\.h>")
+                ""))
+             ;; Use elogind for sd-login.
+             (substitute* '("common/gdm-common.c"
+                            "daemon/gdm-local-display-factory.c"
+                            "daemon/gdm-manager.c"
+                            "libgdm/gdm-user-switching.c")
+               (("#include <systemd/sd-login\\.h>")
+                "#include <elogind/sd-login.h>"))
+             ;; Check for elogind.
+             (substitute* '("configure")
+               (("libsystemd")
+                "libelogind"))
+             #t)))))
     (native-inputs
-     `(("dconf" ,dconf)
-       ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
+     `(("check" ,check)
+       ("dconf" ,dconf)
+       ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)
        ("itstool" ,itstool)
@@ -9595,19 +9493,30 @@ libxml2.")
        ("xmllint" ,libxml2)))
     (inputs
      `(("accountsservice" ,accountsservice)
-       ("check" ,check) ; for testing
        ("elogind" ,elogind)
+       ("glib" ,glib)
        ("gnome-session" ,gnome-session)
        ("gnome-settings-daemon" ,gnome-settings-daemon)
        ("gtk+" ,gtk+)
+       ("ice" ,libice)
        ("iso-codes" ,iso-codes)
+       ("libaudit" ,audit)
        ("libcanberra" ,libcanberra)
-       ("linux-pam" ,linux-pam)))
-    (synopsis "Display manager for GNOME")
+       ("libkeyutils" ,keyutils)
+       ("libselinux" ,libselinux)
+       ("linux-pam" ,linux-pam)
+       ("plymouth" ,plymouth)
+       ("tcp-wrappers" ,tcp-wrappers)
+       ("x11" ,libx11)
+       ("xau" ,libxau)
+       ("xcb" ,libxcb)
+       ("xdmcp" ,libxdmcp)
+       ("xext" ,libxext)
+       ("xinerama" ,libxinerama)))
+    (synopsis "GNOME Display Manager")
+    (description "GDM is a program that manages graphical display servers and
+handles graphical user logins.")
     (home-page "https://wiki.gnome.org/Projects/GDM/";)
-    (description
-     "GNOME Display Manager is a system service that is responsible for
-providing graphical log-ins and managing local and remote displays.")
     (license license:gpl2+)))
 
 (define-public libgtop
diff --git a/gnu/packages/patches/gdm-default-session.patch 
b/gnu/packages/patches/gdm-default-session.patch
deleted file mode 100644
index 9ab2829..0000000
--- a/gnu/packages/patches/gdm-default-session.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-This patch ensures '.desktop' files are picked up in the system profile
-and not in the directories listed in $XDG_DATA_DIRS.  The latter includes
-'gnome-session.desktop', which should be used if it's in
-/run/current-system/profile, and only then.
-
-Fixes <https://bugs.gnu.org/37831>.
-
-diff -ur a/daemon/gdm-session.c b/daemon/gdm-session.c
---- a/daemon/gdm-session.c     2019-09-25 10:40:24.000000000 -0400
-+++ b/daemon/gdm-session.c     2020-04-18 18:30:02.671856808 -0400
-@@ -348,24 +348,18 @@
-         GArray *search_array = NULL;
-         char **search_dirs;
-         int i;
--        const gchar * const *system_data_dirs = g_get_system_data_dirs ();
- 
-         static const char *x_search_dirs[] = {
-                 "/etc/X11/sessions/",
-                 DMCONFDIR "/Sessions/",
-                 DATADIR "/gdm/BuiltInSessions/",
--                DATADIR "/xsessions/",
-+                "/run/current-system/profile/share/xsessions/"
-         };
- 
-         static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
- 
-         search_array = g_array_new (TRUE, TRUE, sizeof (char *));
- 
--        for (i = 0; system_data_dirs[i]; i++) {
--                gchar *dir = g_build_filename (system_data_dirs[i], 
"xsessions", NULL);
--                g_array_append_val (search_array, dir);
--        }
--
-         g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS 
(x_search_dirs));
- 
- #ifdef ENABLE_WAYLAND_SUPPORT
-@@ -373,16 +367,7 @@
- #ifdef ENABLE_USER_DISPLAY_SERVER
-                 g_array_prepend_val (search_array, wayland_search_dir);
- 
--                for (i = 0; system_data_dirs[i]; i++) {
--                        gchar *dir = g_build_filename (system_data_dirs[i], 
"wayland-sessions", NULL);
--                        g_array_insert_val (search_array, i, dir);
--                }
- #else
--                for (i = 0; system_data_dirs[i]; i++) {
--                        gchar *dir = g_build_filename (system_data_dirs[i], 
"wayland-sessions", NULL);
--                        g_array_append_val (search_array, dir);
--                }
--
-                 g_array_append_val (search_array, wayland_search_dir);
- #endif
-         }
-diff -ur a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
---- a/libgdm/gdm-sessions.c    2019-10-07 04:53:35.000000000 -0400
-+++ b/libgdm/gdm-sessions.c    2020-04-18 18:31:42.491348691 -0400
-@@ -245,19 +245,12 @@
-                 "/etc/X11/sessions/",
-                 DMCONFDIR "/Sessions/",
-                 DATADIR "/gdm/BuiltInSessions/",
--                DATADIR "/xsessions/",
-+                "/run/current-system/profile/share/xsessions/"
-         };
- 
-         names_seen_before = g_hash_table_new (g_str_hash, g_str_equal);
-         xorg_search_array = g_ptr_array_new_with_free_func (g_free);
- 
--        const gchar * const *system_data_dirs = g_get_system_data_dirs ();
--
--        for (i = 0; system_data_dirs[i]; i++) {
--                session_dir = g_build_filename (system_data_dirs[i], 
"xsessions", NULL);
--                g_ptr_array_add (xorg_search_array, session_dir);
--        }
--
-         for (i = 0; i < G_N_ELEMENTS (xorg_search_dirs); i++) {
-                 g_ptr_array_add (xorg_search_array, g_strdup 
(xorg_search_dirs[i]));
-         }
-@@ -269,11 +262,6 @@
- 
-         wayland_search_array = g_ptr_array_new_with_free_func (g_free);
- 
--        for (i = 0; system_data_dirs[i]; i++) {
--                session_dir = g_build_filename (system_data_dirs[i], 
"wayland-sessions", NULL);
--                g_ptr_array_add (wayland_search_array, session_dir);
--        }
--
-         for (i = 0; i < G_N_ELEMENTS (wayland_search_dirs); i++) {
-                 g_ptr_array_add (wayland_search_array, g_strdup 
(wayland_search_dirs[i]));
-         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]