pkgsrc-WIP-changes archive

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

update GDM



Module Name:	pkgsrc-wip
Committed By:	Dan CÃirnat <cirnatdan%NetBSD.org@localhost>
Pushed By:	cirnatdan
Date:		Tue Mar 23 15:21:11 2021 +0100
Changeset:	003a11b98e268946b20e3c28a2131f405a28959a

Modified Files:
	gdm/Makefile
	gdm/PLIST
	gdm/distinfo
	gdm/files/gdm.sh
	gdm/patches/patch-daemon_gdm-local-display-factory_c
	gdm/patches/patch-daemon_gdm-manager_c
	gdm/patches/patch-daemon_gdm-session-worker_c
	gdm/patches/patch-data_Init_in
Added Files:
	gdm/patches/patch-build-aux_find-x-server.sh
	gdm/patches/patch-common_meson.build
	gdm/patches/patch-daemon_gdm-display-access-file.c
	gdm/patches/patch-daemon_gdm-x-session.c
	gdm/patches/patch-data_meson.build
	gdm/patches/patch-libgdm_meson.build
	gdm/patches/patch-meson.build
	gdm/patches/patch-pam__gdm_pam__gdm.c
Removed Files:
	gdm/options.mk
	gdm/patches/patch-Makefile.am
	gdm/patches/patch-configure_ac
	gdm/patches/patch-daemon_Makefile_am
	gdm/patches/patch-data_Makefile_am
	gdm/patches/patch-data_gnome-login.session.in

Log Message:
update GDM

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=003a11b98e268946b20e3c28a2131f405a28959a

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gdm/Makefile                                       |  48 +++---
 gdm/PLIST                                          |  14 +-
 gdm/distinfo                                       |  29 ++--
 gdm/files/gdm.sh                                   |   2 +-
 gdm/options.mk                                     |  34 ----
 gdm/patches/patch-Makefile.am                      |  12 --
 gdm/patches/patch-build-aux_find-x-server.sh       |  13 ++
 gdm/patches/patch-common_meson.build               |  12 ++
 gdm/patches/patch-configure_ac                     | 185 ---------------------
 gdm/patches/patch-daemon_Makefile_am               |  43 -----
 gdm/patches/patch-daemon_gdm-display-access-file.c |  16 ++
 .../patch-daemon_gdm-local-display-factory_c       |  36 ++--
 gdm/patches/patch-daemon_gdm-manager_c             |  28 ++--
 gdm/patches/patch-daemon_gdm-session-worker_c      |  67 ++++----
 gdm/patches/patch-daemon_gdm-x-session.c           |  22 +++
 gdm/patches/patch-data_Init_in                     |   4 +-
 gdm/patches/patch-data_Makefile_am                 |  59 -------
 gdm/patches/patch-data_gnome-login.session.in      |   9 -
 gdm/patches/patch-data_meson.build                 |  47 ++++++
 gdm/patches/patch-libgdm_meson.build               |  12 ++
 gdm/patches/patch-meson.build                      |  59 +++++++
 gdm/patches/patch-pam__gdm_pam__gdm.c              |  19 +++
 22 files changed, 310 insertions(+), 460 deletions(-)

diffs:
diff --git a/gdm/Makefile b/gdm/Makefile
index 8e54a6eca3..a679548ff6 100644
--- a/gdm/Makefile
+++ b/gdm/Makefile
@@ -1,7 +1,6 @@
 # $NetBSD: Makefile,v 1.6 2015/06/06 20:44:44 krytarowski Exp $
 
-DISTNAME=	gdm-3.36.2
-PKGREVISION=	2
+DISTNAME=	gdm-3.38.2.1
 CATEGORIES=	x11 gnome
 MASTER_SITES=	${MASTER_SITE_GITHUB:=GNOME/}
 
@@ -21,34 +20,26 @@ BUILD_DEFS+=		VARBASE
 
 USE_LANGUAGES=		c c++
 
-.include "options.mk"
-
-SUBST_CLASSES+=		paths
-SUBST_STAGE.paths=	pre-configure
-SUBST_FILES.paths+=	configure.ac
-SUBST_FILES.paths+=	daemon/gdm-session-worker.c
-SUBST_FILES.paths+=	data/Init.in
-SUBST_VARS.paths=	PREFIX
-SUBST_VARS.paths+=	VARBASE
-
-CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
-CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=	--with-dmconfdir=${PKG_SYSCONFDIR}/dm
-CONFIGURE_ARGS+=	--with-sysconfsubdir=
-CONFIGURE_ARGS+=	--with-prefetch=yes
-CONFIGURE_ARGS+=	--without-plymouth
-CONFIGURE_ARGS+=	--without-systemd
-CONFIGURE_ARGS+=	--disable-systemd-journal
-CONFIGURE_ARGS+=	--disable-user-display-server
-CONFIGURE_ARGS+=	--with-user=${GDMOWN}
-CONFIGURE_ARGS+=	--with-group=${GDMGRP}
-CONFIGURE_ARGS+=	--with-dbus-sys=${PREFIX}/etc/dbus-1/system.d
-CONFIGURE_ARGS+=	--with-initial-vt=05
-CONFIGURE_ARGS+=	--enable-gdm-xsession
-CONFIGURE_ARGS+=	--with-default-path="/usr/local/bin:/usr/local/sbin:${PREFIX}/bin:${PREFIX}/sbin:/usr/bin:/usr/sbin:/bin/sbin"
+CPPFLAGS+=		-DWITH_CONSOLE_KIT=1
+CPPFLAGS+=		-DCONSOLEKIT_DIR=\"${PREFIX}/libexec\"
+
+MESON_ARGS+=		-Dlocalstatedir=${VARBASE}
+MESON_ARGS+=		--sysconfdir=${EGDIR}
+MESON_ARGS+=		-Ddmconfdir=${PKG_SYSCONFDIR}/dm
+MESON_ARGS+=		-Dsysconfsubdir=
+MESON_ARGS+=		-Dprefetch=yes
+MESON_ARGS+=		-Dplymouth=disabled
+MESON_ARGS+=		-Dsystemd=disabled
+MESON_ARGS+=		-Dsystemd-journal=false
+MESON_ARGS+=		-Duser-display-server=false
+MESON_ARGS+=		-Duser=${GDMOWN}
+MESON_ARGS+=		-Dgroup=${GDMGRP}
+MESON_ARGS+=		-Ddbus-sys=${PREFIX}/etc/dbus-1/system.d
+MESON_ARGS+=		-Dinitial-vt=05
+MESON_ARGS+=		-Dgdm-xsession=true
+MESON_ARGS+=		-Dwith-default-path="/usr/local/bin:/usr/local/sbin:${PREFIX}/bin:${PREFIX}/sbin:/usr/bin:/usr/sbin:/bin/sbin"
 CONFIGURE_ENV+=		PREFIX=${PREFIX}
 CONFIGURE_ENV+=		X11BASE=${X11BASE}
-CONFIGURE_SCRIPT=	./autogen.sh
 INSTALL_MAKE_FLAGS+=	${MAKE_FLAGS}
 INSTALL_MAKE_FLAGS+=	GDM_CUSTOM_CONF=${EGDIR}/custom.conf
 INSTALL_MAKE_FLAGS+=	sysconfdir=${EGDIR}
@@ -110,6 +101,7 @@ post-install:
 	${INSTALL_DATA} ${FILESDIR}/gdm-* ${DESTDIR}/${PREFIX}/share/examples/pam.d
 	${CHMOD} +x ${DESTDIR}${PREFIX}/share/examples/gdm/Xsession
 
+.include "../../devel/meson/build.mk"
 .include "../../sysutils/gsettings-desktop-schemas/buildlink3.mk"
 .include "../../security/openpam/buildlink3.mk"
 .include "../../devel/dconf/buildlink3.mk"
diff --git a/gdm/PLIST b/gdm/PLIST
index 1d7c792bb9..d95f489728 100644
--- a/gdm/PLIST
+++ b/gdm/PLIST
@@ -7,8 +7,11 @@ include/gdm/gdm-client.h
 include/gdm/gdm-sessions.h
 include/gdm/gdm-user-switching.h
 lib/girepository-1.0/Gdm-1.0.typelib
-lib/libgdm.la
+lib/libgdm.so
+lib/libgdm.so.1
+lib/libgdm.so.1.0.0
 lib/pkgconfig/gdm.pc
+lib/security/pam_gdm.so
 libexec/gdm-disable-wayland
 libexec/gdm-host-chooser
 libexec/gdm-session-worker
@@ -23,12 +26,6 @@ share/examples/gdm/PostSession/Default
 share/examples/gdm/PreSession/Default
 share/examples/gdm/Xsession
 share/examples/gdm/custom.conf
-${PLIST.pam}share/examples/gdm/pam.d/gdm-autologin
-${PLIST.pam}share/examples/gdm/pam.d/gdm-fingerprint
-${PLIST.pam}share/examples/gdm/pam.d/gdm-launch-environment
-${PLIST.pam}share/examples/gdm/pam.d/gdm-password
-${PLIST.pam}share/examples/gdm/pam.d/gdm-pin
-${PLIST.pam}share/examples/gdm/pam.d/gdm-smartcard
 share/examples/pam.d/gdm-launch-environment
 share/gdm/BuiltInSessions/custom.desktop
 share/gdm/gdb-cmd
@@ -198,6 +195,3 @@ share/locale/zh_HK/LC_MESSAGES/gdm.mo
 share/locale/zh_TW/LC_MESSAGES/gdm.mo
 share/locale/zu/LC_MESSAGES/gdm.mo
 share/pixmaps/NetBSD.xpm
-@pkgdir var/run/gdm/greeter
-@pkgdir var/lib/gdm/.local/share/applications
-@pkgdir var/cache/gdm
diff --git a/gdm/distinfo b/gdm/distinfo
index 496077155b..ec2c16fc29 100644
--- a/gdm/distinfo
+++ b/gdm/distinfo
@@ -1,32 +1,35 @@
 $NetBSD: distinfo,v 1.5 2015/06/06 20:00:43 krytarowski Exp $
 
-SHA1 (gdm-3.36.2.tar.gz) = 3d6912431458e6972ef35093c10dc57b5f734aa5
-RMD160 (gdm-3.36.2.tar.gz) = 5920f54069a351f61e37ac013f0fed22ba899ced
-SHA512 (gdm-3.36.2.tar.gz) = f4ed10b13d0da938ec90f50e37d32dd16828ac514d6d034e4512a75649386b16698436cc6aef04298ccb4fc33491433971b18e5da76634d85fd58624efff65cc
-Size (gdm-3.36.2.tar.gz) = 1535203 bytes
-SHA1 (patch-Makefile.am) = 06b2d36d6fad1abb9405414c9f4e12ca11b409c4
+SHA1 (gdm-3.38.2.1.tar.gz) = f7ca6e8a13d3ba4eb93092766aa02e84d836da16
+RMD160 (gdm-3.38.2.1.tar.gz) = 8b38542db6b59fde8b809526c00b112c2663e2ef
+SHA512 (gdm-3.38.2.1.tar.gz) = 541da6bed8b197166f865e5c29883c20d1eb62162ac450b614176f88f31ed57fcc69209df3628696fd07638ae6f838895615a93794a0a7aedbe025431d1d12cd
+Size (gdm-3.38.2.1.tar.gz) = 1545544 bytes
+SHA1 (patch-build-aux_find-x-server.sh) = bd5dfe8f35220837b08495e11f4639c861c8efa0
 SHA1 (patch-common_gdm-address_c) = dbcf524882299d890103ed1d90b5d20af28cf667
 SHA1 (patch-common_gdm-common_c) = 347e9a527b22a79bfee6fd2e6f41f0e75e34cec2
 SHA1 (patch-common_gdm-common_h) = dfdb0758c65bc5426b214dd8f4a47a7f9df48aa4
 SHA1 (patch-common_gdm-log_c) = 270e98fd085ac2e7d39a48daa2c52954f7527869
-SHA1 (patch-configure_ac) = 8b6f3a95e1921970f2511aa107f7b1cf20000998
-SHA1 (patch-daemon_Makefile_am) = d22f31609e2024aa7fa229d96a276a4f2312dab5
+SHA1 (patch-common_meson.build) = 77ff3a8d7f0c365b97aaca15a4d273cdda2ace4a
+SHA1 (patch-daemon_gdm-display-access-file.c) = 622556719238da6b3f77dd598699cb1c8f1e0953
 SHA1 (patch-daemon_gdm-display_c) = db972d3248c6e2cd5ac24cc72b838e6d1a8529c3
 SHA1 (patch-daemon_gdm-launch-environment_c) = 8804435a54afe85145cd995eb709096d9928a2b7
-SHA1 (patch-daemon_gdm-local-display-factory_c) = f6ac9469d744fd1a3c718a7831152e608166f559
-SHA1 (patch-daemon_gdm-manager_c) = 10e61840ceadc2eee610b67399063b565f1b15cc
+SHA1 (patch-daemon_gdm-local-display-factory_c) = 9849167ce35655922db5afc2e5fb441e99e19070
+SHA1 (patch-daemon_gdm-manager_c) = f8ebde1311179c90a1a1172a3d6f0e73fccec1da
 SHA1 (patch-daemon_gdm-server_c) = 738e9e17c2b8102ff3d248fbac017b3bf3b114ea
 SHA1 (patch-daemon_gdm-session-record_c) = 367e4b9351a41abf78b4ac47e501e40ed9a93fe5
 SHA1 (patch-daemon_gdm-session-worker-job_c) = 11b5f2c1dde26aa6b6ff25d7913eff009c707724
-SHA1 (patch-daemon_gdm-session-worker_c) = 89246c3b7d2ac2b3e4b03033a7a6262c149457b0
+SHA1 (patch-daemon_gdm-session-worker_c) = 5ec5beab7068cbeaa542bc42e9b8f1f65f030be1
 SHA1 (patch-daemon_gdm-session-worker_xml) = e384aed90c0ffc6483dad9c806e55a8e9d9f3e13
 SHA1 (patch-daemon_gdm-session_c) = 6cb462c9aebb6958624a6c11416a1dcdbdab0aa4
 SHA1 (patch-daemon_gdm-session_h) = b350278af12865e4f0565e69a0e52238ff9aa4b0
+SHA1 (patch-daemon_gdm-x-session.c) = a19222ac83f8b7bd9054a99885b487c36783ec76
 SHA1 (patch-daemon_main_c) = 95d05534528a22f66315dc4b0b841aab760fc3d2
-SHA1 (patch-data_Init_in) = 045f87fa5513ae9f8190a99acef84213e4b2e74e
-SHA1 (patch-data_Makefile_am) = 857b281e59d6611a7e3e631db74a9de068a79e1f
+SHA1 (patch-data_Init_in) = 1e133a79fde3bd7a8c09f0a055cdc51d17aadbe4
 SHA1 (patch-data_PostSession_in) = 0951d9c4e1404478c1ac9fba996bc96b41ed4d5b
 SHA1 (patch-data_PreSession_in) = cf1fec76b9555a911b0af6d3e32a838a94c57ca1
 SHA1 (patch-data_gdm.conf-custom.in) = 005a58326ab108f578c56c50768ae2ee164e3a5a
-SHA1 (patch-data_gnome-login.session.in) = ac5734a93290311a6fec8b5845e393eaa198199d
+SHA1 (patch-data_meson.build) = f6defe9994a1906d8c2ab80832c1dfc206b3918a
 SHA1 (patch-libgdm_gdm-user-switching_c) = 91ebba68b5496c1de00108e1609f47c6019eadcc
+SHA1 (patch-libgdm_meson.build) = 47289abb9e3031448c1007891caf1fadd1de001b
+SHA1 (patch-meson.build) = bb1aff71d391212e1709d5fb7d3553f0a409f651
+SHA1 (patch-pam__gdm_pam__gdm.c) = 0b84ae2a118abab28f96717e3bbd71bf6c87c772
diff --git a/gdm/files/gdm.sh b/gdm/files/gdm.sh
index 5cceaa19ab..362498936a 100644
--- a/gdm/files/gdm.sh
+++ b/gdm/files/gdm.sh
@@ -22,7 +22,7 @@ extra_commands="reload"
 
 if [ -f /etc/rc.subr ]; then
 	load_rc_config ${name}
-	PATH=@PREFIX@/bin:$PATH run_rc_command "$1"
+	PATH=@PREFIX@/bin:$PATH XCURSOR_PATH=@PREFIX@/share/icons run_rc_command "$1"
 else
 	echo -n " ${name}"
 	${command} ${gdm_flags} ${command_args}
diff --git a/gdm/options.mk b/gdm/options.mk
deleted file mode 100644
index 209ca45efc..0000000000
--- a/gdm/options.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# $NetBSD: options.mk,v 1.1 2015/06/06 00:53:43 krytarowski Exp $
-
-PKG_OPTIONS_VAR=	PKG_OPTIONS.gdm
-PKG_SUPPORTED_OPTIONS=	consolekit inet6 pam
-PKG_SUGGESTED_OPTIONS=	consolekit inet6
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Minet6)
-CONFIGURE_ARGS+=	--enable-ipv6
-.else
-CONFIGURE_ARGS+=	--disable-ipv6
-.endif
-
-.if !empty(PKG_OPTIONS:Mconsolekit)
-CONFIGURE_ARGS+=	--with-console-kit=yes
-.include "../../sysutils/consolekit/buildlink3.mk"
-.include "../../sysutils/dbus/buildlink3.mk"
-.include "../../sysutils/dbus-glib/buildlink3.mk"
-.else
-CONFIGURE_ARGS+=	--with-console-kit=no
-.endif
-
-PLIST_VARS+=		pam
-
-.if !empty(PKG_OPTIONS:Mpam)
-.  include "../../mk/pam.buildlink3.mk"
-CONFIGURE_ARGS+=	--enable-authentication-scheme=pam
-PLIST.pam=		yes
-.elif exists(/etc/shadow)
-CONFIGURE_ARGS+=	--enable-authentication-scheme=shadow
-.else
-CONFIGURE_ARGS+=	--enable-authentication-scheme=crypt
-.endif
diff --git a/gdm/patches/patch-Makefile.am b/gdm/patches/patch-Makefile.am
deleted file mode 100644
index ab11df4273..0000000000
--- a/gdm/patches/patch-Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Makefile.am.orig	2020-05-04 20:11:25.000000000 +0000
-+++ Makefile.am
-@@ -7,7 +7,6 @@ SUBDIRS = 			\
- 	daemon 			\
- 	libgdm 			\
- 	utils 			\
--	pam_gdm			\
- 	po 			\
- 	tests 			\
- 	$(NULL)
diff --git a/gdm/patches/patch-build-aux_find-x-server.sh b/gdm/patches/patch-build-aux_find-x-server.sh
new file mode 100644
index 0000000000..4d7a9cbf93
--- /dev/null
+++ b/gdm/patches/patch-build-aux_find-x-server.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build-aux/find-x-server.sh.orig	2020-12-15 18:16:43.000000000 +0000
++++ build-aux/find-x-server.sh
+@@ -21,6 +21,8 @@ elif test ! -h /usr/X11 -a -x /usr/X11/b
+     echo "/usr/X11/bin/X"
+ elif test -x /usr/X11R6/bin/X; then
+     echo "/usr/X11R6/bin/X"
++elif test -x /usr/X11R7/bin/X; then
++    echo "/usr/X11R7/bin/X"
+ elif test -x /usr/bin/Xorg; then
+     echo "/usr/bin/Xorg"
+ elif test -x /usr/X11/bin/X; then
diff --git a/gdm/patches/patch-common_meson.build b/gdm/patches/patch-common_meson.build
new file mode 100644
index 0000000000..e9392f9b51
--- /dev/null
+++ b/gdm/patches/patch-common_meson.build
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- common/meson.build.orig	2020-12-15 18:16:43.000000000 +0000
++++ common/meson.build
+@@ -11,7 +11,6 @@ libgdmcommon_src = files(
+ )
+ 
+ libgdmcommon_deps = [
+-  libsystemd_dep,
+   gobject_dep,
+   gio_dep,
+   gio_unix_dep,
diff --git a/gdm/patches/patch-configure_ac b/gdm/patches/patch-configure_ac
deleted file mode 100644
index 4b1bc2a109..0000000000
--- a/gdm/patches/patch-configure_ac
+++ /dev/null
@@ -1,185 +0,0 @@
-$NetBSD$
-
-$OpenBSD: patch-configure_ac,v 1.18 2020/05/14 15:25:54 ajacoutot Exp $
-
-REVERT - Linux-PAM
-From 714b6af29b916ac7da0cdab6f83460574ed49cf2 Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode%redhat.com@localhost>
-Date: Mon, 15 Aug 2016 13:48:00 -0400
-Subject: pam_gdm: add stub pam module
-
-REVERT - OpenBSD does not have a systemd implementation (we need ConsoleKit)
-From 1ac67f522f5690c27023d98096ca817f12f7eb88 Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode%redhat.com@localhost>
-Date: Fri, 12 Jun 2015 13:28:01 -0400
-Subject: drop consolekit support
-
-https://bugzilla.gnome.org/show_bug.cgi?id=722482
-
-Index: configure.ac
---- configure.ac.orig	2020-05-04 20:11:25.000000000 +0000
-+++ configure.ac
-@@ -224,12 +224,6 @@ AM_CONDITIONAL(ENABLE_EXHERBO_PAM_CONFIG
- AM_CONDITIONAL(ENABLE_LFS_PAM_CONFIG, test x$with_default_pam_config = xlfs)
- AM_CONDITIONAL(ENABLE_ARCH_PAM_CONFIG, test x$with_default_pam_config = xarch)
- 
--AC_CHECK_HEADERS([security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
--                 [have_pam=yes],
--                 [if test "x$have_pam" = xyes ; then
--                        AC_MSG_ERROR([PAM development files not found.])
--                 fi])
--
- AC_ARG_ENABLE(console-helper,
- 	      AS_HELP_STRING([--enable-console-helper],
-                              [Enable PAM console helper @<:@default=auto@:>@]),,
-@@ -259,6 +253,17 @@ AC_ARG_WITH([udevdir],
-             AS_HELP_STRING([--with-udevdir=DIR],
-                            [Directory for udev files]),
-                 [with_udevdir=$withval], [with_udevdir=$($PKG_CONFIG --variable=udevdir udev)])
-+
-+AC_ARG_WITH(console-kit,
-+            AS_HELP_STRING([--with-console-kit],
-+                           [Add ConsoleKit support @<:@default=auto@:>@]),,
-+            with_console_kit=no)
-+
-+AC_ARG_WITH(systemd,
-+            AS_HELP_STRING([--with-systemd],
-+                           [Add systemd support @<:@default=auto@:>@]),
-+            [with_systemd=$withval], [with_systemd=auto])
-+
- AC_ARG_WITH([systemdsystemunitdir],
-             AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
-                            [Directory for systemd service files]),
-@@ -530,6 +535,8 @@ fi
- if test "x$supports_pam_extensions" = "xyes" ; then
- 	AM_CONDITIONAL(SUPPORTS_PAM_EXTENSIONS, true)
- 	AC_DEFINE(SUPPORTS_PAM_EXTENSIONS, 1, [Define if PAM supports GDMs custom extensions])
-+else
-+	AM_CONDITIONAL(SUPPORTS_PAM_EXTENSIONS, false)
- fi
- 
- PKG_CHECK_MODULES([KEYUTILS],
-@@ -612,14 +619,8 @@ dnl ------------------------------------
- dnl - Check for utmp stuff
- dnl ---------------------------------------------------------------------------
- 
--AC_CHECK_HEADERS(utmp.h utmpx.h libutil.h sys/param.h)
--AC_CHECK_FUNCS([getutxent updwtmpx updwtmp])
--AC_CHECK_LIB(util, login, [
--		   AC_DEFINE(HAVE_LOGIN, 1, [Define if have login])
--		       EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
--AC_CHECK_LIB(util, logout, [
--		   AC_DEFINE(HAVE_LOGOUT, 1, [Define if have logout])
--		       EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
-+AC_CHECK_HEADERS(utmp.h utmpx.h util.h sys/param.h)
-+AC_CHECK_FUNCS([getutxent getttyent updwtmpx updwtmp])
- AC_CHECK_LIB(util, logwtmp, [
- 	  	   AC_DEFINE(HAVE_LOGWTMP, 1, [Define if have logwtmp])
- 		       EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
-@@ -828,12 +829,42 @@ AC_SUBST(XINERAMA_LIBS)
- CPPFLAGS="$xinerama_save_cppflags"
- 
- dnl ---------------------------------------------------------------------------
-+dnl - Check for ConsoleKit support
-+dnl ---------------------------------------------------------------------------
-+
-+use_console_kit=no
-+if test "x$with_console_kit" != "xno" ; then
-+	use_console_kit=yes
-+	AC_DEFINE(WITH_CONSOLE_KIT, 1, [Define to enable ConsoleKit support])
-+fi
-+AM_CONDITIONAL(WITH_CONSOLE_KIT, test x$use_console_kit = xyes)
-+AC_SUBST(WITH_CONSOLE_KIT)
-+
-+dnl ---------------------------------------------------------------------------
- dnl - Check for systemd support
- dnl ---------------------------------------------------------------------------
- 
- PKG_CHECK_MODULES(SYSTEMD,
--                  [libsystemd])
-+                  [libsystemd-login >= 186 libsystemd-daemon],
-+                  [have_systemd=yes], [have_systemd=no])
- 
-+if test "x$with_systemd" = "xauto" ; then
-+        if test x$have_systemd = xno ; then
-+                use_systemd=no
-+        else
-+                use_systemd=yes
-+        fi
-+else
-+        use_systemd="$with_systemd"
-+fi
-+
-+if test "x$use_systemd" != "xno" ; then
-+        if test "x$have_systemd" = "xno"; then
-+                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
-+        fi
-+
-+        AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support])
-+fi
- AC_SUBST(SYSTEMD_CFLAGS)
- AC_SUBST(SYSTEMD_LIBS)
- 
-@@ -1026,6 +1057,14 @@ fi
- AC_SUBST(GDM_CUSTOM_CONF)
- AC_SUBST(GDM_OLD_CONF, '${gdmconfdir}/gdm.conf')
- 
-+AC_ARG_WITH(consolekit-directory,
-+              [AC_HELP_STRING([--with-consolekit-directory],
-+                              [Specify the directory of ck-get-x11-display-device @<:@default=libexecdir@:>@])],,
-+                              [with_consolekit_directory="\${libexecdir}"])
-+
-+CONSOLEKIT_DIR=$with_consolekit_directory
-+AC_SUBST(CONSOLEKIT_DIR)
-+
- AC_ARG_WITH(gnome-settings-daemon-directory,
-               [AC_HELP_STRING([--with-gnome-settings-daemon-directory],
-                               [Specify the directory of gnome-settings-daemon used by the chooser @<:@default=libexecdir@:>@])],,
-@@ -1142,10 +1181,10 @@ elif test -x /usr/X11/bin/Xserver; then
-    X_PATH="/usr/X11/bin"
-    X_SERVER_PATH="/usr/X11/bin"
-    X_SERVER="/usr/X11/bin/Xserver"
--elif test ! -h /usr/X11R6 -a -x /usr/X11R6/bin/X; then
--   X_PATH="/usr/X11R6/bin"
--   X_SERVER_PATH="/usr/X11R6/bin"
--   X_SERVER="/usr/X11R6/bin/X"
-+elif test ! -h /usr/X11R7 -a -x /usr/X11R7/bin/X; then
-+   X_PATH="/usr/X11R7/bin"
-+   X_SERVER_PATH="/usr/X11R7/bin"
-+   X_SERVER="/usr/X11R7/bin/X"
- elif test ! -h /usr/X11 -a -x /usr/X11/bin/X; then
-    X_PATH="/usr/X11/bin"
-    X_SERVER_PATH="/usr/X11/bin"
-@@ -1173,6 +1212,10 @@ elif test -x /opt/X11R6/bin/X; then
-    X_PATH="/opt/X11R6/bin"
-    X_SERVER_PATH="/opt/X11R6/bin"
-    X_SERVER="/opt/X11R6/bin/X"
-+elif test -x @PREFIX@/bin/X; then
-+   X_PATH="@PREFIX@/bin"
-+   X_SERVER_PATH="@PREFIX@/bin"
-+   X_SERVER="@PREFIX@/bin/X"
- 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
-@@ -1489,6 +1532,7 @@ echo "
-         dmconfdir:                ${dmconfdir}
-         localstatedir:            ${localstatedir}
-         datadir:                  ${datadir}
-+	consolekit location:      ${with_consolekit_directory}
- 	gnome-settings-daemon location: ${with_gnome_settings_daemon_directory}
- 	gnome-session-check-accel location: ${with_check_accelerated_directory}
- 	source code location:	  ${srcdir}
-@@ -1519,6 +1563,8 @@ echo \
- "        Xinerama support:         ${XINERAMA_SUPPORT}
-         XDMCP support:            ${XDMCP_SUPPORT}
-         SELinux support:          ${use_selinux}
-+        ConsoleKit support:       ${use_console_kit}
-+        systemd support:          ${use_systemd}
-         systemd unit dir:         ${with_systemdsystemunitdir}
-         udev dir:                 ${with_udevdir}
-         plymouth support:         ${use_plymouth}
-@@ -1528,3 +1574,4 @@ echo \
-         Enable documentation:     ${enable_documentation}
-         Install GDM's Xsession:   ${enable_gdm_xsession}
- "
-+
diff --git a/gdm/patches/patch-daemon_Makefile_am b/gdm/patches/patch-daemon_Makefile_am
deleted file mode 100644
index 3ecbfd6fee..0000000000
--- a/gdm/patches/patch-daemon_Makefile_am
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD$
-
-$OpenBSD: patch-daemon_Makefile_am,v 1.1 2015/10/18 13:25:54 ajacoutot Exp $
-
-REVERT - OpenBSD does not have a systemd implementation (we need ConsoleKit)
-From 1ac67f522f5690c27023d98096ca817f12f7eb88 Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode%redhat.com@localhost>
-Date: Fri, 12 Jun 2015 13:28:01 -0400
-Subject: drop consolekit support
-
---- daemon/Makefile.am.orig	2015-11-17 17:16:04.000000000 +0000
-+++ daemon/Makefile.am
-@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
- 	-DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\"		\
- 	-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\"	\
- 	-DGDM_SESSION_DEFAULT_PATH=\"$(GDM_SESSION_DEFAULT_PATH)\" \
-+	-DCONSOLEKIT_DIR=\"$(CONSOLEKIT_DIR)\" \
- 	$(DISABLE_DEPRECATED_CFLAGS)			\
- 	$(DAEMON_CFLAGS)				\
- 	$(XLIB_CFLAGS)					\
-@@ -264,6 +265,11 @@ EXTRA_gdm_SOURCES = 	\
- 	$(XDMCP_SOURCES)	\
- 	$(NULL)
- 
-+CONSOLE_KIT_SOURCES = 		\
-+	$(NULL)
-+
-+EXTRA_gdm_SOURCES += $(CONSOLE_KIT_SOURCES)
-+
- gdm_LDADD = \
- 	$(top_builddir)/common/libgdmcommon.la	\
- 	$(XLIB_LIBS)				\
-@@ -275,6 +281,10 @@ gdm_LDADD = \
- 	$(EXTRA_DAEMON_LIBS)			\
- 	$(NULL)
- 
-+if WITH_CONSOLE_KIT
-+gdm_SOURCES += $(CONSOLE_KIT_SOURCES)
-+endif
-+
- CLEANFILES =					\
- 	gdm-display-glue.c			\
- 	gdm-local-display-factory-glue.c	\
diff --git a/gdm/patches/patch-daemon_gdm-display-access-file.c b/gdm/patches/patch-daemon_gdm-display-access-file.c
new file mode 100644
index 0000000000..c20841be60
--- /dev/null
+++ b/gdm/patches/patch-daemon_gdm-display-access-file.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- daemon/gdm-display-access-file.c.orig	2020-12-15 18:16:43.000000000 +0000
++++ daemon/gdm-display-access-file.c
+@@ -441,9 +441,9 @@ _get_auth_info_for_display (GdmDisplayAc
+                  *
+                  * https://bugs.freedesktop.org/show_bug.cgi?id=43425
+                  */
+-                char localhost[HOST_NAME_MAX + 1] = "";
++                char localhost[_POSIX_HOST_NAME_MAX + 1] = "";
+                 *family = FamilyLocal;
+-                if (gethostname (localhost, HOST_NAME_MAX) == 0) {
++                if (gethostname (localhost, _POSIX_HOST_NAME_MAX) == 0) {
+                         *address = g_strdup (localhost);
+                 } else {
+                         *address = g_strdup ("localhost");
diff --git a/gdm/patches/patch-daemon_gdm-local-display-factory_c b/gdm/patches/patch-daemon_gdm-local-display-factory_c
index 1a8b7f7f9a..6a274cc398 100644
--- a/gdm/patches/patch-daemon_gdm-local-display-factory_c
+++ b/gdm/patches/patch-daemon_gdm-local-display-factory_c
@@ -15,7 +15,7 @@ Date: Fri, 12 Jun 2015 13:48:52 -0400
 Subject: require logind support
 
 Index: daemon/gdm-local-display-factory.c
---- daemon/gdm-local-display-factory.c.orig
+--- daemon/gdm-local-display-factory.c.orig	2020-12-15 18:16:43.000000000 +0000
 +++ daemon/gdm-local-display-factory.c
 @@ -28,7 +28,9 @@
  #include <glib-object.h>
@@ -36,18 +36,20 @@ Index: daemon/gdm-local-display-factory.c
  #define GDM_DBUS_PATH                       "/org/gnome/DisplayManager"
  #define GDM_LOCAL_DISPLAY_FACTORY_DBUS_PATH GDM_DBUS_PATH "/LocalDisplayFactory"
  #define GDM_MANAGER_DBUS_NAME               "org.gnome.DisplayManager.LocalDisplayFactory"
-@@ -60,8 +64,10 @@ struct _GdmLocalDisplayFactory
+@@ -59,10 +63,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
- 
- #if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
+ #if defined(ENABLE_USER_DISPLAY_SERVER)
          unsigned int     active_vt;
-@@ -87,7 +93,9 @@ static void     on_display_status_changed             
+         guint            active_vt_watch_id;
+@@ -87,7 +91,9 @@ static void     on_display_status_change
                                                           GParamSpec                  *arg1,
                                                           GdmLocalDisplayFactory      *factory);
  
@@ -57,7 +59,7 @@ Index: daemon/gdm-local-display-factory.c
  static gpointer local_display_factory_object = NULL;
  static gboolean lookup_by_session_id (const char *id,
                                        GdmDisplay *display,
-@@ -231,7 +239,7 @@ gdm_local_display_factory_create_transient_display (Gd
+@@ -232,7 +238,7 @@ gdm_local_display_factory_create_transie
  
          g_debug ("GdmLocalDisplayFactory: Creating transient display");
  
@@ -66,7 +68,7 @@ Index: daemon/gdm-local-display-factory.c
          display = gdm_local_display_new ();
          if (gdm_local_display_factory_use_wayland ())
                  g_object_set (G_OBJECT (display), "session-type", "wayland", NULL);
-@@ -370,7 +378,7 @@ on_display_status_changed (GdmDisplay             *dis
+@@ -373,7 +379,7 @@ on_display_status_changed (GdmDisplay   
                          /* reset num failures */
                          factory->num_failures = 0;
  
@@ -75,7 +77,7 @@ Index: daemon/gdm-local-display-factory.c
                  }
                  break;
          case GDM_DISPLAY_FAILED:
-@@ -464,15 +472,19 @@ create_display (GdmLocalDisplayFactory *factory,
+@@ -467,15 +473,19 @@ create_display (GdmLocalDisplayFactory *
  {
          GdmDisplayStore *store;
          GdmDisplay      *display = NULL;
@@ -95,7 +97,7 @@ Index: daemon/gdm-local-display-factory.c
                  display = gdm_display_store_find (store, lookup_by_seat_id, (gpointer) seat_id);
  
          /* Ensure we don't create the same display more than once */
-@@ -481,6 +493,7 @@ create_display (GdmLocalDisplayFactory *factory,
+@@ -484,6 +494,7 @@ create_display (GdmLocalDisplayFactory *
                  return NULL;
          }
  
@@ -103,7 +105,7 @@ Index: daemon/gdm-local-display-factory.c
          /* If we already have a login window, switch to it */
          if (gdm_get_login_window_session_id (seat_id, &login_session_id)) {
                  GdmDisplay *display;
-@@ -494,14 +507,15 @@ create_display (GdmLocalDisplayFactory *factory,
+@@ -497,14 +508,15 @@ create_display (GdmLocalDisplayFactory *
                          g_object_set (G_OBJECT (display), "status", GDM_DISPLAY_MANAGED, NULL);
                          g_debug ("GdmLocalDisplayFactory: session %s found, activating.",
                                   login_session_id);
@@ -121,7 +123,7 @@ Index: daemon/gdm-local-display-factory.c
          if (g_strcmp0 (seat_id, "seat0") == 0) {
                  display = gdm_local_display_new ();
                  if (session_type != NULL) {
-@@ -533,6 +547,7 @@ create_display (GdmLocalDisplayFactory *factory,
+@@ -536,6 +548,7 @@ create_display (GdmLocalDisplayFactory *
          return display;
  }
  
@@ -129,7 +131,7 @@ Index: daemon/gdm-local-display-factory.c
  static void
  delete_display (GdmLocalDisplayFactory *factory,
                  const char             *seat_id) {
-@@ -911,6 +926,7 @@ gdm_local_display_factory_stop_monitor (GdmLocalDispla
+@@ -905,6 +918,7 @@ gdm_local_display_factory_stop_monitor (
          }
  #endif
  }
@@ -137,7 +139,7 @@ Index: daemon/gdm-local-display-factory.c
  
  static void
  on_display_added (GdmDisplayStore        *display_store,
-@@ -944,6 +960,7 @@ static gboolean
+@@ -938,6 +952,7 @@ static gboolean
  gdm_local_display_factory_start (GdmDisplayFactory *base_factory)
  {
          GdmLocalDisplayFactory *factory = GDM_LOCAL_DISPLAY_FACTORY (base_factory);
@@ -145,7 +147,7 @@ Index: daemon/gdm-local-display-factory.c
          GdmDisplayStore *store;
  
          g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
-@@ -962,8 +979,17 @@ gdm_local_display_factory_start (GdmDisplayFactory *ba
+@@ -956,8 +971,17 @@ gdm_local_display_factory_start (GdmDisp
                                   factory,
                                   0);
  
@@ -165,7 +167,7 @@ Index: daemon/gdm-local-display-factory.c
  }
  
  static gboolean
-@@ -974,7 +1000,9 @@ gdm_local_display_factory_stop (GdmDisplayFactory *bas
+@@ -968,7 +992,9 @@ gdm_local_display_factory_stop (GdmDispl
  
          g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
  
@@ -175,7 +177,7 @@ Index: daemon/gdm-local-display-factory.c
  
          store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
  
-@@ -1126,7 +1154,9 @@ gdm_local_display_factory_finalize (GObject *object)
+@@ -1120,7 +1146,9 @@ gdm_local_display_factory_finalize (GObj
  
          g_hash_table_destroy (factory->used_display_numbers);
  
diff --git a/gdm/patches/patch-daemon_gdm-manager_c b/gdm/patches/patch-daemon_gdm-manager_c
index 1554ee59bb..476694598e 100644
--- a/gdm/patches/patch-daemon_gdm-manager_c
+++ b/gdm/patches/patch-daemon_gdm-manager_c
@@ -33,7 +33,7 @@ Date: Fri, 12 Jun 2015 13:48:52 -0400
 Subject: require logind support
 
 Index: daemon/gdm-manager.c
---- daemon/gdm-manager.c.orig	2020-05-04 20:11:25.000000000 +0000
+--- daemon/gdm-manager.c.orig	2020-12-15 18:16:43.000000000 +0000
 +++ daemon/gdm-manager.c
 @@ -36,7 +36,9 @@
  
@@ -113,7 +113,7 @@ Index: daemon/gdm-manager.c
 +        return retval;
 +}
 +#endif
-+
+ 
 +static char *
 +get_session_id_for_pid (GDBusConnection  *connection,
 +                        pid_t             pid,
@@ -131,7 +131,7 @@ Index: daemon/gdm-manager.c
 +
 +        return NULL;
 +}
- 
++
 +#ifdef WITH_SYSTEMD
  static gboolean
 -get_uid_for_session_id (const char  *session_id,
@@ -513,14 +513,14 @@ Index: daemon/gdm-manager.c
 +                return is_systemd_remote_session (self, session_id, error);
 +        }
 +#endif
- 
++
 +#ifdef WITH_CONSOLE_KIT
 +        return is_consolekit_remote_session (self, connection, session_id, error);
 +#endif
 +
 +        return FALSE;
 +}
-+
+ 
 +#ifdef WITH_CONSOLE_KIT
  static char *
 -get_tty_for_session_id (const char  *session_id,
@@ -656,7 +656,7 @@ Index: daemon/gdm-manager.c
  
                  if (error != NULL) {
                          g_debug ("GdmManager: Error while retrieving remoteness for session: %s",
-@@ -609,7 +1019,7 @@ switch_to_compatible_user_session (GdmMa
+@@ -610,7 +1020,7 @@ switch_to_compatible_user_session (GdmMa
          if (existing_session != NULL) {
                  ssid_to_activate = gdm_session_get_session_id (existing_session);
                  if (seat_id != NULL) {
@@ -665,7 +665,7 @@ Index: daemon/gdm-manager.c
                          if (! res) {
                                  g_debug ("GdmManager: unable to activate session: %s", ssid_to_activate);
                                  goto out;
-@@ -711,29 +1121,6 @@ out:
+@@ -712,29 +1122,6 @@ out:
          return recorded;
  }
  
@@ -695,7 +695,7 @@ Index: daemon/gdm-manager.c
  static gboolean
  gdm_manager_handle_register_display (GdmDBusManager        *manager,
                                       GDBusMethodInvocation *invocation,
-@@ -773,7 +1160,7 @@ gdm_manager_handle_register_display (Gdm
+@@ -774,7 +1161,7 @@ gdm_manager_handle_register_display (Gdm
                  }
          }
  
@@ -704,7 +704,7 @@ Index: daemon/gdm-manager.c
  
          if (session != NULL) {
                  GPid pid;
-@@ -980,7 +1367,8 @@ on_reauthentication_client_rejected (Gdm
+@@ -981,7 +1368,8 @@ on_reauthentication_client_rejected (Gdm
                   * same audit session, ignore it since it doesn't "own" the
                   * reauthentication session
                   */
@@ -714,14 +714,14 @@ Index: daemon/gdm-manager.c
                                                              NULL);
                  session_id = g_object_get_data (G_OBJECT (session), "caller-session-id");
  
-@@ -1199,16 +1587,19 @@ static gboolean
+@@ -1200,16 +1588,19 @@ static gboolean
  display_is_on_seat0 (GdmDisplay *display)
  {
          gboolean is_on_seat0 = TRUE;
 -        char *seat_id = NULL;
--
--        g_object_get (G_OBJECT (display), "seat-id", &seat_id, NULL);
  
+-        g_object_get (G_OBJECT (display), "seat-id", &seat_id, NULL);
+-
 -        if (g_strcmp0 (seat_id, "seat0") != 0) {
 -            is_on_seat0 = FALSE;
 -        }
@@ -741,7 +741,7 @@ Index: daemon/gdm-manager.c
          return is_on_seat0;
  }
  
-@@ -2031,11 +2422,57 @@ on_user_session_died (GdmSession *sessio
+@@ -2016,11 +2407,57 @@ on_user_session_died (GdmSession *sessio
  }
  
  static char *
@@ -801,7 +801,7 @@ Index: daemon/gdm-manager.c
  }
  
  static void
-@@ -2045,25 +2482,6 @@ on_session_reauthenticated (GdmSession *
+@@ -2030,25 +2467,6 @@ on_session_reauthenticated (GdmSession *
  {
          gboolean fail_if_already_switched = FALSE;
  
diff --git a/gdm/patches/patch-daemon_gdm-session-worker_c b/gdm/patches/patch-daemon_gdm-session-worker_c
index 4249902110..3a16dc9698 100644
--- a/gdm/patches/patch-daemon_gdm-session-worker_c
+++ b/gdm/patches/patch-daemon_gdm-session-worker_c
@@ -27,7 +27,7 @@ Date: Mon, 11 Apr 2016 23:18:10 +1000
 Subject: gdm-session: set PAM_TTY when initialising pam
 
 Index: daemon/gdm-session-worker.c
---- daemon/gdm-session-worker.c.orig	2020-05-04 20:11:25.000000000 +0000
+--- daemon/gdm-session-worker.c.orig	2020-12-15 18:16:43.000000000 +0000
 +++ daemon/gdm-session-worker.c
 @@ -28,9 +28,11 @@
  #include <string.h>
@@ -51,16 +51,16 @@ Index: daemon/gdm-session-worker.c
  
  #ifdef ENABLE_SYSTEMD_JOURNAL
  #include <systemd/sd-journal.h>
-@@ -93,7 +97,7 @@
+@@ -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 "@PREFIX@/bin:/usr/bin:/bin"
++#define GDM_SESSION_DEFAULT_PATH "/usr/pkg/bin:/usr/bin:/bin"
  #endif
  
  #ifndef GDM_SESSION_ROOT_UID
-@@ -125,6 +129,10 @@ struct GdmSessionWorkerPrivate
+@@ -126,6 +130,10 @@ struct GdmSessionWorkerPrivate
  
          int               exit_code;
  
@@ -71,7 +71,7 @@ Index: daemon/gdm-session-worker.c
          pam_handle_t     *pam_handle;
  
          GPid              child_pid;
-@@ -139,6 +147,7 @@ struct GdmSessionWorkerPrivate
+@@ -140,6 +148,7 @@ struct GdmSessionWorkerPrivate
          char             *hostname;
          char             *username;
          char             *log_file;
@@ -79,7 +79,7 @@ Index: daemon/gdm-session-worker.c
          char             *session_id;
          uid_t             uid;
          gid_t             gid;
-@@ -213,6 +222,204 @@ G_DEFINE_TYPE_WITH_CODE (GdmSessionWorke
+@@ -214,6 +223,204 @@ G_DEFINE_TYPE_WITH_CODE (GdmSessionWorke
                                                  worker_interface_init)
                           G_ADD_PRIVATE (GdmSessionWorker))
  
@@ -284,7 +284,7 @@ Index: daemon/gdm-session-worker.c
  /* adapted from glib script_execute */
  static void
  script_execute (const gchar *file,
-@@ -664,7 +871,9 @@ gdm_session_worker_process_pam_message (
+@@ -665,7 +872,9 @@ gdm_session_worker_process_pam_message (
          char    *user_answer;
          gboolean res;
          char    *utf8_msg;
@@ -294,7 +294,7 @@ Index: daemon/gdm-session-worker.c
  
          if (response != NULL) {
                  *response = NULL;
-@@ -868,6 +1077,7 @@ gdm_session_worker_stop_auditor (GdmSess
+@@ -869,6 +1078,7 @@ gdm_session_worker_stop_auditor (GdmSess
          worker->priv->auditor = NULL;
  }
  
@@ -302,7 +302,7 @@ Index: daemon/gdm-session-worker.c
  static void
  on_release_display (int signal)
  {
-@@ -1010,6 +1220,7 @@ jump_to_vt (GdmSessionWorker  *worker,
+@@ -1011,6 +1221,7 @@ jump_to_vt (GdmSessionWorker  *worker,
  
          close (active_vt_tty_fd);
  }
@@ -310,7 +310,7 @@ Index: daemon/gdm-session-worker.c
  
  static void
  gdm_session_worker_set_state (GdmSessionWorker      *worker,
-@@ -1126,7 +1337,6 @@ gdm_session_worker_initialize_pam (GdmSe
+@@ -1115,7 +1326,6 @@ gdm_session_worker_initialize_pam (GdmSe
  {
          struct pam_conv        pam_conversation;
          int                    error_code;
@@ -318,7 +318,7 @@ Index: daemon/gdm-session-worker.c
  
          g_assert (worker->priv->pam_handle == NULL);
  
-@@ -1193,10 +1403,12 @@ gdm_session_worker_initialize_pam (GdmSe
+@@ -1182,10 +1392,12 @@ gdm_session_worker_initialize_pam (GdmSe
                  }
          }
  
@@ -332,7 +332,7 @@ Index: daemon/gdm-session-worker.c
  
          if (strcmp (service, "gdm-launch-environment") == 0) {
                  gdm_session_worker_set_environment_variable (worker, "XDG_SESSION_CLASS", "greeter");
-@@ -1205,12 +1417,14 @@ gdm_session_worker_initialize_pam (GdmSe
+@@ -1194,12 +1406,14 @@ gdm_session_worker_initialize_pam (GdmSe
          g_debug ("GdmSessionWorker: state SETUP_COMPLETE");
          gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE);
  
@@ -347,7 +347,7 @@ Index: daemon/gdm-session-worker.c
  
   out:
          if (error_code != PAM_SUCCESS) {
-@@ -1506,7 +1720,7 @@ _lookup_passwd_info (const char *usernam
+@@ -1495,7 +1709,7 @@ _lookup_passwd_info (const char *usernam
                  if (passwd_entry->pw_shell != NULL && passwd_entry->pw_shell[0] != '\0') {
                          *shellp = g_strdup (passwd_entry->pw_shell);
                  } else {
@@ -356,7 +356,7 @@ Index: daemon/gdm-session-worker.c
                  }
          }
          ret = TRUE;
-@@ -1759,6 +1973,26 @@ gdm_session_worker_get_environment (GdmS
+@@ -1748,6 +1962,26 @@ gdm_session_worker_get_environment (GdmS
          return (const char * const *) pam_getenvlist (worker->priv->pam_handle);
  }
  
@@ -383,17 +383,18 @@ Index: daemon/gdm-session-worker.c
  static gboolean
  run_script (GdmSessionWorker *worker,
              const char       *dir)
-@@ -1789,6 +2023,9 @@ session_worker_child_watch (GPid        
+@@ -1825,6 +2059,10 @@ session_worker_child_watch (GPid        
                   : WIFSIGNALED (status) ? WTERMSIG (status)
                   : -1);
  
 +#ifdef WITH_CONSOLE_KIT
 +        close_ck_session (worker);
 +#endif
- 
++
          gdm_session_worker_uninitialize_pam (worker, PAM_SUCCESS);
  
-@@ -1979,6 +2216,7 @@ gdm_session_worker_start_session (GdmSes
+         worker->priv->child_pid = -1;
+@@ -2037,6 +2275,7 @@ gdm_session_worker_start_session (GdmSes
  
          error_code = PAM_SUCCESS;
  
@@ -401,7 +402,7 @@ Index: daemon/gdm-session-worker.c
          /* 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. */
-@@ -1987,6 +2225,7 @@ gdm_session_worker_start_session (GdmSes
+@@ -2045,6 +2284,7 @@ gdm_session_worker_start_session (GdmSes
                          jump_to_vt (worker, worker->priv->session_vt);
                  }
          }
@@ -409,7 +410,7 @@ Index: daemon/gdm-session-worker.c
  
          if (!worker->priv->is_program_session && !run_script (worker, GDMCONFDIR "/PostLogin")) {
                  g_set_error (error,
-@@ -2049,6 +2288,7 @@ gdm_session_worker_start_session (GdmSes
+@@ -2107,6 +2347,7 @@ gdm_session_worker_start_session (GdmSes
                          _exit (EXIT_FAILURE);
                  }
  
@@ -417,7 +418,7 @@ Index: daemon/gdm-session-worker.c
                  /* Take control of the tty
                   */
                  if (needs_controlling_terminal) {
-@@ -2056,6 +2296,7 @@ gdm_session_worker_start_session (GdmSes
+@@ -2114,6 +2355,7 @@ gdm_session_worker_start_session (GdmSes
                                  g_debug ("GdmSessionWorker: could not take control of tty: %m");
                          }
                  }
@@ -425,7 +426,7 @@ Index: daemon/gdm-session-worker.c
  
  #ifdef HAVE_LOGINCAP
                  if (setusercontext (NULL, passwd_entry, passwd_entry->pw_uid, LOGIN_SETALL) < 0) {
-@@ -2187,11 +2428,13 @@ gdm_session_worker_start_session (GdmSes
+@@ -2245,11 +2487,13 @@ gdm_session_worker_start_session (GdmSes
          return TRUE;
  }
  
@@ -439,7 +440,7 @@ Index: daemon/gdm-session-worker.c
          int session_vt = 0;
  
          /* open the initial vt.  We need it for two scenarios:
-@@ -2209,6 +2452,11 @@ set_up_for_new_vt (GdmSessionWorker *wor
+@@ -2267,6 +2511,11 @@ set_up_for_new_vt (GdmSessionWorker *wor
                  return FALSE;
          }
  
@@ -451,7 +452,7 @@ Index: daemon/gdm-session-worker.c
          if (worker->priv->display_is_initial) {
                  session_vt = GDM_INITIAL_VT;
          } else {
-@@ -2222,6 +2470,7 @@ set_up_for_new_vt (GdmSessionWorker *wor
+@@ -2280,6 +2529,7 @@ set_up_for_new_vt (GdmSessionWorker *wor
                  }
          }
  
@@ -459,7 +460,7 @@ Index: daemon/gdm-session-worker.c
          worker->priv->session_vt = session_vt;
  
          g_assert (session_vt > 0);
-@@ -2287,6 +2536,7 @@ fail:
+@@ -2345,6 +2595,7 @@ fail:
          close (fd);
          return FALSE;
  }
@@ -467,7 +468,7 @@ Index: daemon/gdm-session-worker.c
  
  static gboolean
  set_up_for_current_vt (GdmSessionWorker  *worker,
-@@ -2354,12 +2604,14 @@ set_up_for_current_vt (GdmSessionWorker 
+@@ -2412,12 +2663,14 @@ set_up_for_current_vt (GdmSessionWorker 
           }
  #endif
  
@@ -482,7 +483,7 @@ Index: daemon/gdm-session-worker.c
  
          return TRUE;
  out:
-@@ -2385,6 +2637,7 @@ gdm_session_worker_open_session (GdmSess
+@@ -2443,6 +2696,7 @@ gdm_session_worker_open_session (GdmSess
                  break;
          case GDM_SESSION_DISPLAY_MODE_NEW_VT:
          case GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED:
@@ -490,7 +491,7 @@ Index: daemon/gdm-session-worker.c
                  if (!set_up_for_new_vt (worker)) {
                          g_set_error (error,
                                       GDM_SESSION_WORKER_ERROR,
-@@ -2392,6 +2645,7 @@ gdm_session_worker_open_session (GdmSess
+@@ -2450,6 +2704,7 @@ gdm_session_worker_open_session (GdmSess
                                       "Unable to open VT");
                          return FALSE;
                  }
@@ -498,7 +499,7 @@ Index: daemon/gdm-session-worker.c
                  break;
          }
  
-@@ -2414,7 +2668,17 @@ gdm_session_worker_open_session (GdmSess
+@@ -2472,7 +2727,17 @@ gdm_session_worker_open_session (GdmSess
          g_debug ("GdmSessionWorker: state SESSION_OPENED");
          gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_SESSION_OPENED);
  
@@ -516,7 +517,7 @@ Index: daemon/gdm-session-worker.c
  
          if (session_id != NULL) {
                  g_free (worker->priv->session_id);
-@@ -2523,6 +2787,19 @@ gdm_session_worker_handle_set_session_na
+@@ -2582,6 +2847,19 @@ gdm_session_worker_handle_set_session_na
  }
  
  static gboolean
@@ -536,7 +537,7 @@ Index: daemon/gdm-session-worker.c
  gdm_session_worker_handle_set_session_display_mode (GdmDBusWorker         *object,
                                                      GDBusMethodInvocation *invocation,
                                                      const char            *str)
-@@ -2949,6 +3226,7 @@ gdm_session_worker_handle_open (GdmDBusW
+@@ -3008,6 +3286,7 @@ gdm_session_worker_handle_open (GdmDBusW
          return TRUE;
  }
  
@@ -544,7 +545,7 @@ Index: daemon/gdm-session-worker.c
  static char **
  filter_extensions (const char * const *extensions)
  {
-@@ -2974,6 +3252,7 @@ filter_extensions (const char * const *e
+@@ -3033,6 +3312,7 @@ filter_extensions (const char * const *e
  
          return filtered_extensions;
  }
@@ -552,7 +553,7 @@ Index: daemon/gdm-session-worker.c
  
  static gboolean
  gdm_session_worker_handle_initialize (GdmDBusWorker         *object,
-@@ -2993,8 +3272,10 @@ gdm_session_worker_handle_initialize (Gd
+@@ -3052,8 +3332,10 @@ gdm_session_worker_handle_initialize (Gd
          while (g_variant_iter_loop (&iter, "{sv}", &key, &value)) {
                  if (g_strcmp0 (key, "service") == 0) {
                          worker->priv->service = g_variant_dup_string (value, NULL);
@@ -563,7 +564,7 @@ Index: daemon/gdm-session-worker.c
                  } 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) {
-@@ -3434,6 +3715,7 @@ worker_interface_init (GdmDBusWorkerIfac
+@@ -3493,6 +3775,7 @@ worker_interface_init (GdmDBusWorkerIfac
          interface->handle_open = gdm_session_worker_handle_open;
          interface->handle_set_language_name = gdm_session_worker_handle_set_language_name;
          interface->handle_set_session_name = gdm_session_worker_handle_set_session_name;
diff --git a/gdm/patches/patch-daemon_gdm-x-session.c b/gdm/patches/patch-daemon_gdm-x-session.c
new file mode 100644
index 0000000000..83bbf8deeb
--- /dev/null
+++ b/gdm/patches/patch-daemon_gdm-x-session.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- daemon/gdm-x-session.c.orig	2020-12-15 18:16:43.000000000 +0000
++++ daemon/gdm-x-session.c
+@@ -114,7 +114,7 @@ prepare_auth_file (void)
+         GError   *error = NULL;
+         gboolean  prepared = FALSE;
+         Xauth     auth_entry = { 0 };
+-        char      localhost[HOST_NAME_MAX + 1] = "";
++        char      localhost[_POSIX_HOST_NAME_MAX + 1] = "";
+ 
+         g_debug ("Preparing auth file for X server");
+ 
+@@ -124,7 +124,7 @@ prepare_auth_file (void)
+                 return NULL;
+         }
+ 
+-        if (gethostname (localhost, HOST_NAME_MAX) < 0) {
++        if (gethostname (localhost, _POSIX_HOST_NAME_MAX) < 0) {
+                 strncpy (localhost, "localhost", sizeof (localhost) - 1);
+         }
+ 
diff --git a/gdm/patches/patch-data_Init_in b/gdm/patches/patch-data_Init_in
index 7ed2e0e7ee..11b5108bda 100644
--- a/gdm/patches/patch-data_Init_in
+++ b/gdm/patches/patch-data_Init_in
@@ -2,7 +2,7 @@ $NetBSD$
 
 $OpenBSD: patch-data_Init_in,v 1.7 2015/04/15 14:47:00 ajacoutot Exp $
 
---- data/Init.in.orig	2015-11-17 17:16:04.000000000 +0000
+--- data/Init.in.orig	2020-12-15 18:16:43.000000000 +0000
 +++ data/Init.in
 @@ -6,6 +6,9 @@
  PATH="@X_PATH@:$PATH"
@@ -23,6 +23,6 @@ $OpenBSD: patch-data_Init_in,v 1.7 2015/04/15 14:47:00 ajacoutot Exp $
 +    /sbin/chown _gdm /dev/drm0
 +fi
 +# XXX OpenBSD needs an implementation of XDG_RUNTIME_DIR
-+rm -rf @VARBASE@/db/gdm/.cache/gnome-shell/runtime-state-*
++rm -rf /var/db/gdm/.cache/gnome-shell/runtime-state-*
 +
  exit 0
diff --git a/gdm/patches/patch-data_Makefile_am b/gdm/patches/patch-data_Makefile_am
deleted file mode 100644
index 65525a229b..0000000000
--- a/gdm/patches/patch-data_Makefile_am
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD$
-
-$OpenBSD: patch-data_Makefile_am,v 1.10 2019/11/02 16:34:15 ajacoutot Exp $
-
-Index: data/Makefile.am
---- data/Makefile.am.orig
-+++ data/Makefile.am
-@@ -220,6 +220,7 @@ if ENABLE_GDM_XSESSION
- Xsession: $(srcdir)/Xsession.in
- 	sed	-e 's,[@]XSESSION_SHELL[@],$(XSESSION_SHELL),g' \
- 		-e 's,[@]libexecdir[@],$(libexecdir),g' \
-+		-e 's,[@]X_PATH[@],$(X_PATH),g' \
- 		<$(srcdir)/Xsession.in >Xsession
- Xsession_files += Xsession
- CLEANFILES += Xsession
-@@ -293,7 +294,7 @@ endif
- 	if test '!' -d $(DESTDIR)$(logdir); then \
- 		$(mkinstalldirs) $(DESTDIR)$(logdir); \
- 		chmod 755 $(DESTDIR)$(logdir); \
--		chown root:root $(DESTDIR)$(logdir) || : ; \
-+		chown root:wheel $(DESTDIR)$(logdir) || : ; \
- 	fi
- 
- 	system=`uname`; \
-@@ -316,29 +317,29 @@ endif
- 	if test '!' -d $(DESTDIR)$(xauthdir); then \
- 		$(mkinstalldirs) $(DESTDIR)$(xauthdir); \
- 		chmod 0711 $(DESTDIR)$(xauthdir); \
--		chown root:gdm $(DESTDIR)$(xauthdir) || : ; \
-+		chown root:676 $(DESTDIR)$(xauthdir) || : ; \
- 	fi
- 
- 	if test '!' -d $(DESTDIR)$(screenshotdir); then \
- 		$(mkinstalldirs) $(DESTDIR)$(screenshotdir); \
- 		chmod 0755 $(DESTDIR)$(screenshotdir); \
--		chown gdm:gdm $(DESTDIR)$(screenshotdir) || : ; \
-+		chown 676:676 $(DESTDIR)$(screenshotdir) || : ; \
- 	fi
- 
- 	if test '!' -d $(DESTDIR)$(workingdir); then \
- 		$(mkinstalldirs) $(DESTDIR)$(workingdir); \
- 		chmod 1770 $(DESTDIR)$(workingdir); \
--		chown root:gdm $(DESTDIR)$(workingdir) || : ; \
-+		chown root:676 $(DESTDIR)$(workingdir) || : ; \
- 	fi
- 
- 	if test '!' -d $(DESTDIR)$(workingdir)/.local/share/applications; then \
- 		$(mkinstalldirs) $(DESTDIR)$(workingdir)/.local/share/applications; \
- 		chmod 0755 $(DESTDIR)$(workingdir)/.local/share/applications; \
--		chown gdm:gdm $(DESTDIR)$(workingdir)/.local/share/applications || : ; \
-+		chown 676:676 $(DESTDIR)$(workingdir)/.local/share/applications || : ; \
- 	fi
- 
- 	if test '!' -d $(DESTDIR)$(cachedir); then \
- 		$(mkinstalldirs) $(DESTDIR)$(cachedir); \
- 		chmod 1755 $(DESTDIR)$(cachedir); \
--		chown root:gdm $(DESTDIR)$(cachedir) || : ; \
-+		chown root:676 $(DESTDIR)$(cachedir) || : ; \
- 	fi
diff --git a/gdm/patches/patch-data_gnome-login.session.in b/gdm/patches/patch-data_gnome-login.session.in
deleted file mode 100644
index 6acce517ff..0000000000
--- a/gdm/patches/patch-data_gnome-login.session.in
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD$
-
---- data/gnome-login.session.in.orig	2020-05-04 20:11:25.000000000 +0000
-+++ data/gnome-login.session.in
-@@ -1,3 +1,3 @@
- [GNOME Session]
- Name=Display Manager
--RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;
-+RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;
diff --git a/gdm/patches/patch-data_meson.build b/gdm/patches/patch-data_meson.build
new file mode 100644
index 0000000000..20545d0ded
--- /dev/null
+++ b/gdm/patches/patch-data_meson.build
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- data/meson.build.orig	2020-12-15 18:16:43.000000000 +0000
++++ data/meson.build
+@@ -170,42 +170,11 @@ else
+   service_config.set('PLYMOUTH_QUIT_SERVICE', '')
+ endif
+ 
+-if get_option('systemdsystemunitdir') != ''
+-  systemd_systemunitdir = get_option('systemdsystemunitdir')
+-else
+-  systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
+-endif
+-
+-if get_option('systemduserunitdir') != ''
+-  systemd_userunitdir = get_option('systemduserunitdir')
+-else
+-  systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+-                                                           define_variable: ['prefix', get_option('prefix')])
+-endif
+-
+-configure_file(
+-  input: 'gdm.service.in',
+-  output: '@BASENAME@',
+-  configuration: service_config,
+-  install_dir: systemd_systemunitdir,
+-  format: 'cmake'
+-)
+-
+ gdm_gnome_session_wanted_targets = []
+ foreach component: gdm_gnome_user_session_wanted_components
+   gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
+ endforeach
+ 
+-configure_file(
+-  input: 'session.conf.in',
+-  output: 'session.conf',
+-  configuration: {
+-    'requires_component': gdm_gnome_shell_component,
+-    'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
+-  },
+-  install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
+-)
+-
+ # XSession
+ if get_option('gdm-xsession')
+   configure_file(
diff --git a/gdm/patches/patch-libgdm_meson.build b/gdm/patches/patch-libgdm_meson.build
new file mode 100644
index 0000000000..197221415f
--- /dev/null
+++ b/gdm/patches/patch-libgdm_meson.build
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- libgdm/meson.build.orig	2020-12-15 18:16:43.000000000 +0000
++++ libgdm/meson.build
+@@ -56,7 +56,6 @@ libgdm_deps = [
+   glib_dep,
+   gio_dep,
+   gio_unix_dep,
+-  libsystemd_dep,
+   libgdmcommon_dep,
+ ]
+ 
diff --git a/gdm/patches/patch-meson.build b/gdm/patches/patch-meson.build
new file mode 100644
index 0000000000..d35c5cc905
--- /dev/null
+++ b/gdm/patches/patch-meson.build
@@ -0,0 +1,59 @@
+$NetBSD$
+
+--- meson.build.orig	2020-12-15 18:16:43.000000000 +0000
++++ meson.build
+@@ -38,7 +38,7 @@ gdm_screenshot_dir = (get_option('screen
+ config_h_dir = include_directories('.')
+ 
+ # Dependencies
+-udev_dep = dependency('udev')
++#udev_dep = dependency('udev')
+ 
+ glib_min_version = '2.44.0'
+ 
+@@ -54,14 +54,14 @@ keyutils_dep = dependency('libkeyutils',
+ libselinux_dep = dependency('libselinux', required: get_option('selinux'))
+ 
+ # udev
+-if udev_dir == ''
+-  if udev_dep.found()
+-    udev_prefix = udev_dep.get_pkgconfig_variable('udevdir')
+-  else
+-    udev_prefix = gdm_prefix / 'lib' / 'udev'
+-  endif
+-  udev_dir = udev_prefix / 'rules.d'
+-endif
++#if udev_dir == ''
++#  if udev_dep.found()
++#    udev_prefix = udev_dep.get_pkgconfig_variable('udevdir')
++#  else
++#    udev_prefix = gdm_prefix / 'lib' / 'udev'
++#  endif
++#  udev_dir = udev_prefix / 'rules.d'
++#endif
+ 
+ # X11
+ x_deps = declare_dependency(
+@@ -94,19 +94,9 @@ if xdmcp_dep.found() and get_option('tcp
+   libwrap_dep = cc.find_library('libwrap')
+ endif
+ # systemd
+-systemd_dep = dependency('systemd')
+-libsystemd_dep = dependency('libsystemd')
+-if meson.version().version_compare('>= 0.53')
+-  systemd_multiseat_x = find_program('systemd-multi-seat-x',
+-    required: false,
+-    dirs: [
+-      systemd_dep.get_pkgconfig_variable('systemdutildir'),
+-      '/lib/systemd',
+-      '/usr/lib/systemd',
+-    ])
+-else
+-  systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
+-endif
++systemd_dep = ''
++libsystemd_dep = ''
++systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
+ systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
+ # Plymouth
+ plymouth_dep = dependency('ply-boot-client', required: get_option('plymouth'))
diff --git a/gdm/patches/patch-pam__gdm_pam__gdm.c b/gdm/patches/patch-pam__gdm_pam__gdm.c
new file mode 100644
index 0000000000..d726063d49
--- /dev/null
+++ b/gdm/patches/patch-pam__gdm_pam__gdm.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- pam_gdm/pam_gdm.c.orig	2020-12-15 18:16:43.000000000 +0000
++++ pam_gdm/pam_gdm.c
+@@ -21,11 +21,13 @@
+ 
+ #include <unistd.h>
+ 
++#ifdef __linux__
+ #include <security/_pam_macros.h>
+ #include <security/pam_ext.h>
+ #include <security/pam_misc.h>
+-#include <security/pam_modules.h>
+ #include <security/pam_modutil.h>
++#endif
++#include <security/pam_modules.h>
+ 
+ #ifdef HAVE_KEYUTILS
+ #include <keyutils.h>


Home | Main Index | Thread Index | Old Index