summaryrefslogtreecommitdiff
path: root/x11/lightdm/files
diff options
context:
space:
mode:
authorBen Woods <woodsb02@FreeBSD.org>2016-12-26 06:53:37 +0000
committerBen Woods <woodsb02@FreeBSD.org>2016-12-26 06:53:37 +0000
commit81a45042c342bf0f62a4c96fb97d90ec979d9f23 (patch)
tree590486ac88d7babc478cab49e7a99301356865d8 /x11/lightdm/files
parentgames/openbor: skip non-existing bor.pak (diff)
Add x11/lightdm and x11/lightdm-gtk-greeter.
Lightdm is a display manager that: * Is cross-desktop - supports different desktops * Supports different display technologies * Is lightweight - low memory usage and fast performance * Has a comprehensive test suite WWW: https://www.freedesktop.org/wiki/Software/LightDM/ lightdm-gtk-greeter is the reference GTK+ greeter for LightDM. WWW: https://launchpad.net/lightdm-gtk-greeter Approved by: adamw (mentor, implicit)
Diffstat (limited to 'x11/lightdm/files')
-rw-r--r--x11/lightdm/files/Xsession.in71
-rw-r--r--x11/lightdm/files/lightdm.in29
-rw-r--r--x11/lightdm/files/patch-data_lightdm.conf20
-rw-r--r--x11/lightdm/files/patch-data_pam_lightdm26
-rw-r--r--x11/lightdm/files/patch-data_pam_lightdm-autologin27
-rw-r--r--x11/lightdm/files/patch-data_pam_lightdm-greeter18
-rw-r--r--x11/lightdm/files/patch-data_users.conf10
-rw-r--r--x11/lightdm/files/patch-liblightdm-gobject_language.c38
-rw-r--r--x11/lightdm/files/patch-src_process.c11
-rw-r--r--x11/lightdm/files/patch-src_session-child.c64
-rw-r--r--x11/lightdm/files/patch-src_x-server.c11
-rw-r--r--x11/lightdm/files/patch-tests_src_libsystem.c10
12 files changed, 335 insertions, 0 deletions
diff --git a/x11/lightdm/files/Xsession.in b/x11/lightdm/files/Xsession.in
new file mode 100644
index 000000000000..76de7d9060a9
--- /dev/null
+++ b/x11/lightdm/files/Xsession.in
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# LightDM wrapper to run around X sessions.
+
+echo "Running X session wrapper"
+
+# Load profile
+for file in "%%LOCALBASE%%/etc/profile" "$HOME/.profile" "%%LOCALBASE%%/etc/xprofile" "$HOME/.xprofile"; do
+ if [ -f "$file" ]; then
+ echo "Loading profile from $file";
+ . "$file"
+ fi
+done
+
+# Load resources
+for file in "%%LOCALBASE%%/etc/X11/Xresources" "$HOME/.Xresources"; do
+ if [ -f "$file" ]; then
+ echo "Loading resource: $file"
+ xrdb -merge "$file"
+ fi
+done
+
+# Load keymaps
+for file in "%%LOCALBASE%%/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading keymap: $file"
+ setxkbmap `cat "$file"`
+ XKB_IN_USE=yes
+ fi
+done
+
+# Load xmodmap if not using XKB
+if [ -z "$XKB_IN_USE" ]; then
+ for file in "%%LOCALBASE%%/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading modmap: $file"
+ xmodmap "$file"
+ fi
+ done
+fi
+
+unset XKB_IN_USE
+
+# Run all system xinitrc shell scripts
+xinitdir="%%LOCALBASE%%/etc/X11/xinit/xinitrc.d"
+if [ -d "$xinitdir" ]; then
+ for script in $xinitdir/*; do
+ echo "Loading xinit script $script"
+ if [ -x "$script" -a ! -d "$script" ]; then
+ . "$script"
+ fi
+ done
+fi
+
+# Load Xsession scripts
+xsessiondir="%%LOCALBASE%%/share/xsessions"
+if [ -d "$xsessiondir" ]; then
+ for file in `ls $xsessiondir`; do
+ script="$xsessiondir/$file"
+ echo "Loading X session script $script"
+ if [ -r "$script" -a -f "$script" ] && expr "$file" : '^[[:alnum:]_-]\+$' > /dev/null; then
+ . "$script"
+ fi
+ done
+fi
+
+echo "X session wrapper complete, running session $@"
+
+exec $@
diff --git a/x11/lightdm/files/lightdm.in b/x11/lightdm/files/lightdm.in
new file mode 100644
index 000000000000..227abd106976
--- /dev/null
+++ b/x11/lightdm/files/lightdm.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: lightdm
+# REQUIRE: LOGIN cleanvar moused syscons dbus
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable the LightDM:
+#
+# lightdm_enable="YES"
+#
+
+. /etc/rc.subr
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
+
+name="lightdm"
+rcvar=lightdm_enable
+
+load_rc_config ${name}
+
+: ${lightdm_enable:="NO"}
+
+command="%%PREFIX%%/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+command_args="--pid-file=${pidfile} > /dev/null 2>&1 &"
+
+run_rc_command "$1"
diff --git a/x11/lightdm/files/patch-data_lightdm.conf b/x11/lightdm/files/patch-data_lightdm.conf
new file mode 100644
index 000000000000..c2f0c35050a6
--- /dev/null
+++ b/x11/lightdm/files/patch-data_lightdm.conf
@@ -0,0 +1,20 @@
+--- data/lightdm.conf.orig 2016-12-26 04:21:00 UTC
++++ data/lightdm.conf
+@@ -22,7 +22,7 @@
+ #start-default-seat=true
+ #greeter-user=lightdm
+ #minimum-display-number=0
+-#minimum-vt=7
++minimum-vt=9
+ #lock-memory=true
+ #user-authority-in-system-dir=false
+ #guest-account-script=guest-account
+@@ -114,7 +114,7 @@
+ #allow-user-switching=true
+ #allow-guest=true
+ #guest-session=
+-#session-wrapper=lightdm-session
++session-wrapper=%%PREFIX%%/etc/lightdm/Xsession
+ #greeter-wrapper=
+ #guest-wrapper=
+ #display-setup-script=
diff --git a/x11/lightdm/files/patch-data_pam_lightdm b/x11/lightdm/files/patch-data_pam_lightdm
new file mode 100644
index 000000000000..7a7b46b1d6fb
--- /dev/null
+++ b/x11/lightdm/files/patch-data_pam_lightdm
@@ -0,0 +1,26 @@
+--- data/pam/lightdm.orig 2015-08-09 23:30:00 UTC
++++ data/pam/lightdm
+@@ -1,13 +1,13 @@
+ #%PAM-1.0
+
+ # Block login if they are globally disabled
+-auth required pam_nologin.so
++account required pam_nologin.so
+
+ # Load environment from /etc/environment and ~/.pam_environment
+-auth required pam_env.so
++#auth required pam_env.so
+
+ # Use /etc/passwd and /etc/shadow for passwords
+-auth required pam_unix.so
++auth required pam_unix.so no_warn try_first_pass
+
+ # Check account is active, change password if required
+ account required pam_unix.so
+@@ -16,5 +16,4 @@ account required pam_unix.so
+ password required pam_unix.so
+
+ # Setup session
+-session required pam_unix.so
+-session optional pam_systemd.so
++session required pam_permit.so
diff --git a/x11/lightdm/files/patch-data_pam_lightdm-autologin b/x11/lightdm/files/patch-data_pam_lightdm-autologin
new file mode 100644
index 000000000000..e2dba909866b
--- /dev/null
+++ b/x11/lightdm/files/patch-data_pam_lightdm-autologin
@@ -0,0 +1,27 @@
+--- data/pam/lightdm-autologin.orig 2015-08-09 23:30:00 UTC
++++ data/pam/lightdm-autologin
+@@ -1,20 +1,19 @@
+ #%PAM-1.0
+
+ # Block login if they are globally disabled
+-auth required pam_nologin.so
++account required pam_nologin.so
+
+ # Load environment from /etc/environment and ~/.pam_environment
+-auth required pam_env.so
++#auth required pam_env.so
+
+ # Allow access without authentication
+ auth required pam_permit.so
+
+ # Stop autologin if account requires action
+-account required pam_unix.so
++account required pam_unix.so no_warn try_first_pass
+
+ # Can't change password
+ password required pam_deny.so
+
+ # Setup session
+-session required pam_unix.so
+-session optional pam_systemd.so
++session required pam_permit.so
diff --git a/x11/lightdm/files/patch-data_pam_lightdm-greeter b/x11/lightdm/files/patch-data_pam_lightdm-greeter
new file mode 100644
index 000000000000..77496c0095ae
--- /dev/null
+++ b/x11/lightdm/files/patch-data_pam_lightdm-greeter
@@ -0,0 +1,18 @@
+--- data/pam/lightdm-greeter.orig 2015-08-09 23:30:00 UTC
++++ data/pam/lightdm-greeter
+@@ -1,7 +1,7 @@
+ #%PAM-1.0
+
+ # Load environment from /etc/environment and ~/.pam_environment
+-auth required pam_env.so
++#auth required pam_env.so
+
+ # Always let the greeter start without authentication
+ auth required pam_permit.so
+@@ -13,5 +13,4 @@ account required pam_permit.so
+ password required pam_deny.so
+
+ # Setup session
+-session required pam_unix.so
+-session optional pam_systemd.so
++session required pam_permit.so
diff --git a/x11/lightdm/files/patch-data_users.conf b/x11/lightdm/files/patch-data_users.conf
new file mode 100644
index 000000000000..5366e684f798
--- /dev/null
+++ b/x11/lightdm/files/patch-data_users.conf
@@ -0,0 +1,10 @@
+--- data/users.conf.orig 2015-08-09 23:30:00 UTC
++++ data/users.conf
+@@ -9,6 +9,6 @@
+ # hidden-shells = Shells that indicate a user cannot login
+ #
+ [UserList]
+-minimum-uid=500
++minimum-uid=1001
+ hidden-users=nobody nobody4 noaccess
+ hidden-shells=/bin/false /usr/sbin/nologin
diff --git a/x11/lightdm/files/patch-liblightdm-gobject_language.c b/x11/lightdm/files/patch-liblightdm-gobject_language.c
new file mode 100644
index 000000000000..b64d8642594d
--- /dev/null
+++ b/x11/lightdm/files/patch-liblightdm-gobject_language.c
@@ -0,0 +1,38 @@
+https://bugs.launchpad.net/lightdm/+bug/790186
+
+--- liblightdm-gobject/language.c.orig 2016-12-09 01:04:48 UTC
++++ liblightdm-gobject/language.c
+@@ -248,10 +248,16 @@ lightdm_language_get_name (LightDMLangua
+ if (locale)
+ {
+ gchar *current = setlocale (LC_ALL, NULL);
++#ifdef LC_IDENTIFICATION
+ setlocale (LC_IDENTIFICATION, locale);
++#endif
+ setlocale (LC_MESSAGES, "");
+
++#ifdef _NL_IDENTIFICATION_LANGUAGE
+ gchar *language_en = nl_langinfo (_NL_IDENTIFICATION_LANGUAGE);
++#else
++ gchar *language_en = "Unknown";
++#endif
+ if (language_en && strlen (language_en) > 0)
+ priv->name = g_strdup (dgettext ("iso_639_3", language_en));
+
+@@ -291,10 +297,16 @@ lightdm_language_get_territory (LightDML
+ if (locale)
+ {
+ gchar *current = setlocale (LC_ALL, NULL);
++#ifdef LC_IDENTIFICATION
+ setlocale (LC_IDENTIFICATION, locale);
++#endif
+ setlocale (LC_MESSAGES, "");
+
++#ifdef _NL_IDENTIFICATION_TERRITORY
+ gchar *country_en = nl_langinfo (_NL_IDENTIFICATION_TERRITORY);
++#else
++ gchar *country_en = "Unknown";
++#endif
+ if (country_en && strlen (country_en) > 0 && g_strcmp0 (country_en, "ISO") != 0)
+ priv->territory = g_strdup (dgettext ("iso_3166", country_en));
+
diff --git a/x11/lightdm/files/patch-src_process.c b/x11/lightdm/files/patch-src_process.c
new file mode 100644
index 000000000000..df43c5e4d2e3
--- /dev/null
+++ b/x11/lightdm/files/patch-src_process.c
@@ -0,0 +1,11 @@
+--- src/process.c.orig 2016-12-08 21:38:14 UTC
++++ src/process.c
+@@ -231,7 +231,7 @@ process_start (Process *process, gboolea
+ #ifdef HAVE_CLEARENV
+ clearenv ();
+ #else
+- environ = NULL;
++ putenv ("environ=NULL");
+ #endif
+ for (i = 0; i < env_length; i++)
+ setenv (env_keys[i], env_values[i], TRUE);
diff --git a/x11/lightdm/files/patch-src_session-child.c b/x11/lightdm/files/patch-src_session-child.c
new file mode 100644
index 000000000000..d0cd13b4a84c
--- /dev/null
+++ b/x11/lightdm/files/patch-src_session-child.c
@@ -0,0 +1,64 @@
+--- src/session-child.c.orig 2016-10-19 12:20:14 UTC
++++ src/session-child.c
+@@ -13,7 +13,6 @@
+ #include <grp.h>
+ #include <glib.h>
+ #include <security/pam_appl.h>
+-#include <utmp.h>
+ #include <utmpx.h>
+ #include <sys/mman.h>
+
+@@ -202,29 +201,6 @@ read_xauth (void)
+ return x_authority_new (x_authority_family, x_authority_address, x_authority_address_length, x_authority_number, x_authority_name, x_authority_data, x_authority_data_length);
+ }
+
+-/* GNU provides this but we can't rely on that so let's make our own version */
+-static void
+-updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
+-{
+- struct utmp u;
+-
+- memset (&u, 0, sizeof (u));
+- u.ut_type = ut->ut_type;
+- u.ut_pid = ut->ut_pid;
+- if (ut->ut_line)
+- strncpy (u.ut_line, ut->ut_line, sizeof (u.ut_line));
+- if (ut->ut_id)
+- strncpy (u.ut_id, ut->ut_id, sizeof (u.ut_id));
+- if (ut->ut_user)
+- strncpy (u.ut_user, ut->ut_user, sizeof (u.ut_user));
+- if (ut->ut_host)
+- strncpy (u.ut_host, ut->ut_host, sizeof (u.ut_host));
+- u.ut_tv.tv_sec = ut->ut_tv.tv_sec;
+- u.ut_tv.tv_usec = ut->ut_tv.tv_usec;
+-
+- updwtmp (wtmp_file, &u);
+-}
+-
+ #if HAVE_LIBAUDIT
+ static void
+ audit_event (int type, const gchar *username, uid_t uid, const gchar *remote_host_name, const gchar *tty, gboolean success)
+@@ -420,7 +396,6 @@ session_child_run (int argc, char **argv
+ ut.ut_tv.tv_sec = tv.tv_sec;
+ ut.ut_tv.tv_usec = tv.tv_usec;
+
+- updwtmpx ("/var/log/btmp", &ut);
+
+ #if HAVE_LIBAUDIT
+ audit_event (AUDIT_USER_LOGIN, username, -1, remote_host_name, tty, FALSE);
+@@ -749,7 +724,6 @@ session_child_run (int argc, char **argv
+ if (!pututxline (&ut))
+ g_printerr ("Failed to write utmpx: %s\n", strerror (errno));
+ endutxent ();
+- updwtmpx ("/var/log/wtmp", &ut);
+
+ #if HAVE_LIBAUDIT
+ audit_event (AUDIT_USER_LOGIN, username, uid, remote_host_name, tty, TRUE);
+@@ -786,7 +760,6 @@ session_child_run (int argc, char **argv
+ if (!pututxline (&ut))
+ g_printerr ("Failed to write utmpx: %s\n", strerror (errno));
+ endutxent ();
+- updwtmpx ("/var/log/wtmp", &ut);
+
+ #if HAVE_LIBAUDIT
+ audit_event (AUDIT_USER_LOGOUT, username, uid, remote_host_name, tty, TRUE);
diff --git a/x11/lightdm/files/patch-src_x-server.c b/x11/lightdm/files/patch-src_x-server.c
new file mode 100644
index 000000000000..d329ba9a6aa9
--- /dev/null
+++ b/x11/lightdm/files/patch-src_x-server.c
@@ -0,0 +1,11 @@
+--- src/x-server.c.orig 2016-06-17 04:53:18 UTC
++++ src/x-server.c
+@@ -143,7 +143,7 @@ x_server_connect_session (DisplayServer
+ {
+ gchar *t;
+
+- t = g_strdup_printf ("/dev/tty%d", vt);
++ t = g_strdup_printf ("/dev/ttyv%d", vt);
+ session_set_tty (session, t);
+ g_free (t);
+
diff --git a/x11/lightdm/files/patch-tests_src_libsystem.c b/x11/lightdm/files/patch-tests_src_libsystem.c
new file mode 100644
index 000000000000..5aabfa020323
--- /dev/null
+++ b/x11/lightdm/files/patch-tests_src_libsystem.c
@@ -0,0 +1,10 @@
+--- tests/src/libsystem.c.orig 2016-11-13 22:45:48 UTC
++++ tests/src/libsystem.c
+@@ -20,7 +20,6 @@
+ #include <security/pam_appl.h>
+ #include <fcntl.h>
+ #include <dlfcn.h>
+-#include <utmp.h>
+ #include <utmpx.h>
+ #ifdef __linux__
+ #include <linux/vt.h>