Hello community, here is the log from the commit of package xdm for openSUSE:Factory checked in at 2016-06-10 23:58:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xdm (Old) and /work/SRC/openSUSE:Factory/.xdm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xdm" Changes: -------- --- /work/SRC/openSUSE:Factory/xdm/xdm.changes 2016-05-13 09:21:42.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.xdm.new/xdm.changes 2016-06-10 23:58:58.000000000 +0200 @@ -1,0 +2,22 @@ +Fri Jun 03 13:49:07 UTC 2016 - pjano...@suse.de + +- spec-cleaner cleanups + +------------------------------------------------------------------- +Fri Jun 03 13:48:56 UTC 2016 - e...@suse.com + +- xdm.tar.bz2: + sys.xsession - factor out scriptlets to add services + to start in the context of a desktop session. These + scriptlets sould be shipped with their respective + services, not with xdm. + Check etc/X11/sdm/scripts/xsession-sriptlets.HOWTO for + further details (boo#972787). + +------------------------------------------------------------------- +Wed May 25 10:44:56 UTC 2016 - wer...@suse.de + +- Simplify dbus detection to support all kind of (boo#980521) +- Avoid option --write-env-file for newer gpg (boo#972787) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xdm.spec ++++++ --- /var/tmp/diff_new_pack.etsfvt/_old 2016-06-10 23:58:59.000000000 +0200 +++ /var/tmp/diff_new_pack.etsfvt/_new 2016-06-10 23:58:59.000000000 +0200 @@ -16,20 +16,20 @@ # +%define _dminitdir %{_libexecdir}/X11/displaymanagers %if 0%{?suse_version} > 1230 %define with_systemd 1 %else %define with_systemd 0 %endif - -%define _dminitdir %{_libexecdir}/X11/displaymanagers - %if 0%{?suse_version} < 01210 %define dm_fallbacks 1 %else %define dm_fallbacks 0 %endif - +%if !%with_systemd +%define _unitdir %{_prefix}/lib/systemd/system +%endif Name: xdm Version: 1.1.11 Release: 0 @@ -43,14 +43,7 @@ Source3: xdm-fallbacks.tar.bz2 Source4: display-manager.service Source5: xsession.desktop -%if !%with_systemd -Patch0: xdm-consolekit.diff -%endif Patch1: xdm-tolerant-hostname-changes.diff -%if 0%{?suse_version} >= 01140 && 0%{?suse_version} < 1320 -# Needed to create the man page symlink to init.d -BuildRequires: aaa_base-extras -%endif # needed for patch0, patch2, patch3, patch4 BuildRequires: libtool BuildRequires: pam-devel @@ -67,13 +60,6 @@ BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtrans) -%if !%with_systemd -BuildRequires: ConsoleKit-devel -Requires: ConsoleKit -%else -BuildRequires: systemd-rpm-macros -%{?systemd_requires} -%endif Requires: /sbin/pidof Requires: logrotate Requires: sessreg @@ -83,18 +69,28 @@ Requires: xrdb Requires: xset Requires: xsetroot -%if 0%{?suse_version} > 1320 -Requires: xterm-bin -%else -Requires: xterm -%endif Recommends: dbus-1-x11 # This was part of the xorg-x11 package up to version 7.6 Conflicts: xorg-x11 <= 7.6 BuildRoot: %{_tmppath}/%{name}-%{version}-build - %if !%with_systemd -%define _unitdir /usr/lib/systemd/system +Patch0: xdm-consolekit.diff +%endif +%if 0%{?suse_version} >= 01140 && 0%{?suse_version} < 1320 +# Needed to create the man page symlink to init.d +BuildRequires: aaa_base-extras +%endif +%if !%with_systemd +BuildRequires: ConsoleKit-devel +Requires: ConsoleKit +%else +BuildRequires: systemd-rpm-macros +%{?systemd_requires} +%endif +%if 0%{?suse_version} > 1320 +Requires: xterm-bin +%else +Requires: xterm %endif %description @@ -110,7 +106,7 @@ %description xsession This package contains the System desktop file which will cause the execution of a user provided $HOME/.xsession script or pick -the system wide DM default set in /etc/sysconfig/displaymanager. +the system wide DM default set in %{_sysconfdir}/sysconfig/displaymanager. %prep %setup -q @@ -159,7 +155,7 @@ mv %{buildroot}%{_libdir}/X11/xdm/chooser %{buildroot}%{_bindir} # fdo#35868 (closed INVALID, but because of above fix, we want it) ln -s xdm.1%{?ext_man} %{buildroot}%{_mandir}/man1/chooser.1%{?ext_man} -%__install -D %{S:5} -m 0644 %{buildroot}%{_datadir}/xsessions/xsession.desktop +install -D %{SOURCE5} -m 0644 %{buildroot}%{_datadir}/xsessions/xsession.desktop %if 0%{?suse_version} < 1315 # missing manual page mkdir -p %{buildroot}%{_mandir}/man8 @@ -167,7 +163,7 @@ ln -sf %{_sysconfdir}/init.d/xdm %{buildroot}%{_sbindir}/rcxdm %else rm -f %{buildroot}%{_sbindir}/rcxdm -%__install -D %{S:4} -m 0444 %{buildroot}%{_unitdir}/display-manager.service +install -D %{SOURCE4} -m 0444 %{buildroot}%{_unitdir}/display-manager.service ln -sf service %{buildroot}%{_sbindir}/rcdisplay-manager cat > %{buildroot}%{_sbindir}/rcxdm <<-'EOF' #!/bin/bash @@ -217,6 +213,7 @@ %{_dminitdir}/wdm.fallback %endif %config %{_sysconfdir}/X11/xdm/ +%dir %{_sysconfdir}/X11/xdm/scripts %config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/xdmcp %if 0%{?suse_version} < 1315 %{_sysconfdir}/init.d/xdm ++++++ xdm.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/Xsession new/etc/X11/xdm/Xsession --- old/etc/X11/xdm/Xsession 2016-03-30 14:56:14.000000000 +0200 +++ new/etc/X11/xdm/Xsession 2016-05-25 12:34:18.000000000 +0200 @@ -216,7 +216,7 @@ ;; [a-z][a-z]_[A-Z][A-Z]*) export GDM_LANG=$l - unset argv[$argc] # remove from command line: not an argument + unset argv[$argc] # remove from command line: not an argument test $extra_env_settings = yes && parse_error=1 ;; *) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/scripts/09-ssh-vars new/etc/X11/xdm/scripts/09-ssh-vars --- old/etc/X11/xdm/scripts/09-ssh-vars 1970-01-01 01:00:00.000000000 +0100 +++ new/etc/X11/xdm/scripts/09-ssh-vars 2016-06-03 13:59:30.000000000 +0200 @@ -0,0 +1,15 @@ +# +# If ssh is configured and ssh-agent is wanted set "yes" +# or gpg-agent *with* ssh support is wanted set "gpg" +# + +: ${usessh:=yes} + +# +# No ssh-agent if a ssh session is already provided by an other agent. +# +if test "$usessh" = yes -a -n "$GNOME_KEYRING_PID" ; then + if test -S "$GNOME_KEYRING_SOCKET" -o -d "$GNOME_KEYRING_CONTROL"; then + usessh=no + fi +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/scripts/10-gpg-agent new/etc/X11/xdm/scripts/10-gpg-agent --- old/etc/X11/xdm/scripts/10-gpg-agent 1970-01-01 01:00:00.000000000 +0100 +++ new/etc/X11/xdm/scripts/10-gpg-agent 2016-06-03 13:59:30.000000000 +0200 @@ -0,0 +1,117 @@ +# +# If gpg is configured and gpg-agent is wanted set "yes" +# +: ${usegpg:=yes} +: ${GNUPGHOME:=$HOME/.gnupg} +: ${XDG_RUNTIME_DIR:=/run/user/$UID} + +# +# No gpg-agent if a gpg session is already provided by an other agent. +# +if test "$usegpg" = yes -a -n "$GNOME_KEYRING_PID" ; then + # gnome-keyring provides a gpg agent starting with GNOME 3 + if test -d "$GNOME_KEYRING_CONTROL"; then + usegpg=no + fi +fi + +# +# No gpg-agent if a gpg session is already provided by an other agent. +# +if test "$usegpg" = yes -a -n "$GNOME_KEYRING_PID" ; then + case "${WINDOWMANAGER##*/}" in + gnome*) + # gnome-keyring provides a gpg agent starting with GNOME 3 (the + # gnome-version.xml file only exists in GNOME 3) + if test -d "$GNOME_KEYRING_CONTROL" -a -f "/usr/share/gnome/gnome-version.xml"; then + usegpg=no + fi + esac +fi + +# Run gpg-agent only if gpg service is configured and avaliable. +# Check if there is already a running gpg-agent and if use this. + +if test "$usegpg" = yes -a -d "$GNUPGHOME" && gpgagent=$(type -p gpg-agent) +then + found=false + version=($($gpgagent --version)) + if [[ ${version[2]} =~ [0-9]+\.[0-9]+\.[0-9]+ ]] + then + version=(${version[2]//\./ }) + else + version=(0 0 0) + fi + + if test ${version[0]} -lt 2 -o \( ${version[0]} -eq 2 -a ${version[1]} -le 0 \) + then + for GPG_AGENT_FILE in "$GNUPGHOME/agent.info" \ + "$GNUPGHOME/agent.info-${HOSTNAME:-$(hostname -f)}:${DISPLAY#*:}" + do + test -s "$GPG_AGENT_FILE" && . "$GPG_AGENT_FILE" + if test -n "$GPG_AGENT_INFO" + then + GPG_AGENT_PID=${GPG_AGENT_INFO#*:} + GPG_AGENT_PID=${GPG_AGENT_PID%%:*} + if test -n "$GPG_AGENT_PID" && checkproc -p $GPG_AGENT_PID $gpgagent + then + found=true + break + fi + fi + agtfile="$GPG_AGENT_FILE" + done + else + test -S $GNUPGHOME/S.gpg-agent && rm -f $GNUPGHOME/S.gpg-agent + if ! test -e $GNUPGHOME/S.gpg-agent + then + cat>$GNUPGHOME/S.gpg-agent<<-EOF + %Assuan% + socket=$XDG_RUNTIME_DIR/S.gpg-agent + EOF + chmod 0600 $GNUPGHOME/S.gpg-agent + fi + GPG_AGENT_PID=$(fuser $XDG_RUNTIME_DIR/S.gpg-agent 2>/dev/null) + if test -n "$GPG_AGENT_PID" + then + GPG_AGENT_INFO=$XDG_RUNTIME_DIR/S.gpg-agent:${GPG_AGENT_PID%% } + found=true + fi + agtfile="" + fi + + if $found + then + export GPG_AGENT_INFO + else + unset GPG_AGENT_INFO + fi + +# Use the file ~/.myagents to overide the defaults +# and if this does not exist check for enable-ssh-support +# in ~/.gnupg/gpg-agent.conf +# +# Be warned: If usessh=gpg is used then read the manual +# page gpg-agent below the option --enable-ssh-support +# and do not forget to use +# +# gpg-connect-agent /bye +# +# as otherwise none of the commands ssh/slogin/scp will +# work! + if [ "$usessh" == yes ]; then + if test -s "$HOME/.myagents" ; then + eval $(grep -E '^use.*=.*' "$HOME/.myagents") + elif test -s "$GNUPGHOME/gpg-agent.conf" ; then + grep -Eq '^enable-ssh-support' "$GNUPGHOME/gpg-agent.conf" && usessh=gpg + fi + fi + + if [ -z "$GPG_AGENT_INFO" ]; then + if test "$usessh" = gpg; then + set -- $gpgagent --sh --daemon --enable-ssh-support --keep-display ${agtfile:+--write-env-file "$agtfile"} ${1+"$@"} + else + set -- $gpgagent --sh --daemon --keep-display ${agtfile:+--write-env-file "$agtfile"} ${1+"$@"} + fi + fi +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/scripts/11-ssh-agent new/etc/X11/xdm/scripts/11-ssh-agent --- old/etc/X11/xdm/scripts/11-ssh-agent 1970-01-01 01:00:00.000000000 +0100 +++ new/etc/X11/xdm/scripts/11-ssh-agent 2016-06-03 13:59:30.000000000 +0200 @@ -0,0 +1,44 @@ + +if test -n $GPG_AGENT_INFO ; then + if test -n "$SSH_AUTH_SOCK" -a "$usessh" = yes ; then + export SSH_AUTH_SOCK + fi +else + if test -n "$SSH_AUTH_SOCK" -a "$usessh" != yes ; then + unset SSH_AUTH_SOCK + fi +fi + +# +# Run ssh-agent only if ssh service is configured and avaliable. +# Check if there is already a running ssh-agent and if use this. +# +if test "$usessh" = yes -a -d "$HOME/.ssh" && sshagent=$(type -p ssh-agent) ; then + if test -S "$SSH_AUTH_SOCK" ; then + if test -n "$SSH_AGENT_PID" && checkproc -p $SSH_AGENT_PID $sshagent ; then + export SSH_AGENT_PID SSH_AUTH_SOCK + else + rm -f "$SSH_AUTH_SOCK" + case "${SSH_AUTH_SOCK%/*}" in + /tmp/*) rm -rf "${SSH_AUTH_SOCK%/*}" + esac + unset SSH_AUTH_SOCK + fi + else + unset SSH_AUTH_SOCK + fi + + if test -z "$SSH_AUTH_SOCK" ; then + set -- $sshagent ${1+"$@"} + fi +fi + +if [ "$usessh" != no ]; then + if test -x /usr/lib/ssh/ssh-askpass ; then + SSH_ASKPASS=/usr/lib/ssh/ssh-askpass + export SSH_ASKPASS + elif test -x /usr/lib64/ssh/ssh-askpass ; then + SSH_ASKPASS=/usr/lib64/ssh/ssh-askpass + export SSH_ASKPASS + fi +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/scripts/20-dbus new/etc/X11/xdm/scripts/20-dbus --- old/etc/X11/xdm/scripts/20-dbus 1970-01-01 01:00:00.000000000 +0100 +++ new/etc/X11/xdm/scripts/20-dbus 2016-06-03 15:22:48.000000000 +0200 @@ -0,0 +1,43 @@ +# +# Check if a dbus is required for e.g. plain xdm sessions +# +if test -S "$XDG_RUNTIME_DIR/bus" ; then + # socket /run/user/uid/bus exists, this means dbus is managed by systemd + # all we have to do now is make sure $DBUS_SESSION_BUS_ADDRESS is set correctly + DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus" + export DBUS_SESSION_BUS_ADDRESS +elif dbusdaemon=$(type -p dbus-daemon) && dbuslaunch=$(type -p dbus-launch) ; then + if test -n "$DBUS_SESSION_BUS_ADDRESS" ; then + dpid=$(dbus-send --print-reply=literal --dest=org.freedesktop.DBus --type=method_call \ + /org/freedesktop/DBus org.freedesktop.DBus.GetId 2> /dev/null) + test -n "$dpid" || unset DBUS_SESSION_BUS_ADDRESS + unset dpid + fi + # + # Find a valid dbus-daemon if active, therefore scan below + # ~/.dbus/session-bus/ which is only found if dbus-launch was used + # + if test -z "$DBUS_SESSION_BUS_ADDRESS" -a -d "${HOME}/.dbus/session-bus" ; then + if test -s /var/lib/dbus/machine-id ; then + read -t1 mid < /var/lib/dbus/machine-id + elif test -s /etc/machine-id ; then + read -t1 mid < /etc/machine-id + else + mid= + fi + for suid in "${HOME}/.dbus/session-bus/"${mid}-${DISPLAY##*:} ; do + test -e "$suid" || break + dpid=$(grep -E '^DBUS_SESSION_BUS_PID=[[:digit:]]+' "$suid") + test /proc/${dpid#*=}/exe -ef $dbusdaemon || continue + . "$suid" + export DBUS_SESSION_BUS_ADDRESS + break + done + unset mid suid dpid + fi + # No dbus-daemon then launch a new session + if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + set -- $dbuslaunch --sh-syntax --exit-with-session ${1+"$@"} + fi + unset dbuslaunch dbusdaemon +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/scripts/30-console-kit new/etc/X11/xdm/scripts/30-console-kit --- old/etc/X11/xdm/scripts/30-console-kit 1970-01-01 01:00:00.000000000 +0100 +++ new/etc/X11/xdm/scripts/30-console-kit 2016-06-03 13:59:30.000000000 +0200 @@ -0,0 +1,7 @@ +# +# Check if ConsoleKit is required for e.g. plain xdm sessions +# (outdated due systemd login manager) +# +if test -z "$XDG_SESSION_COOKIE" && cklaunch=$(type -p ck-launch-session) ; then + set -- $cklaunch ${1+"$@"} +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/scripts/session-scriptlets.HOWTO new/etc/X11/xdm/scripts/session-scriptlets.HOWTO --- old/etc/X11/xdm/scripts/session-scriptlets.HOWTO 1970-01-01 01:00:00.000000000 +0100 +++ new/etc/X11/xdm/scripts/session-scriptlets.HOWTO 2016-06-03 15:28:18.000000000 +0200 @@ -0,0 +1,24 @@ +This directory contains scriptlets to start in the context +of an Xsession. + +1. Scriptlets should be delivered with packages containing + the services they start. They should not be shipped with + xdm. This way, it is ensured that only scriptlets for + installed services are run and the scriptlet will work + with the exact version of the service to be run. +2. The scriptlets are ordered. Prepend an <NN>- to the + file name where <NN> is a two digit number specifying + when a scriptlet is to be run. +3. Normally, the scriptlets will set up a command line + to be run as the services started here will monitor + other services and exit when they exit. + a. The scriptlets should be 'sourced' ie run in the + context of sys.xsession: + - Do not set the execute bit. + - Do not prepend a '#! ..'. + - Use bash syntax. + b. To prepend a service to the command line (ie have + it monitor all previous serivces) use + set -- <myservice> <myservice_args> ${1+"$@"} + c. scriptlets may pass variables to other scriptlets + which run later. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/sys.xsession new/etc/X11/xdm/sys.xsession --- old/etc/X11/xdm/sys.xsession 2016-02-27 12:49:15.000000000 +0100 +++ new/etc/X11/xdm/sys.xsession 2016-06-03 15:25:42.000000000 +0200 @@ -6,38 +6,6 @@ # # -# If ssh is configured and ssh-agent is wanted set "yes" -# or gpg-agent *with* ssh support is wanted set "gpg" -# -usessh=yes - -# -# If gpg is configured and gpg-agent is wanted set "yes" -# -usegpg=yes -: ${GNUPGHOME:=$HOME/.gnupg} - -# -# Use the file ~/.myagents to overide the defaults -# and if this does not exist check for enable-ssh-support -# in ~/.gnupg/gpg-agent.conf -# -# Be warned: If usessh=gpg is used then read the manual -# page gpg-agent below the option --enable-ssh-support -# and do not forget to use -# -# gpg-connect-agent /bye -# -# as otherwise no of the commands ssh/slogin/scp will -# work! -# -if test -s "$HOME/.myagents" ; then - eval $(grep -E '^use.*=.*' "$HOME/.myagents") -elif test -s "$GNUPGHOME/gpg-agent.conf" ; then - grep -Eq '^enable-ssh-support' "$GNUPGHOME/gpg-agent.conf" && usessh=gpg -fi - -# # What we do if we fail at least ... emergency fall back. # failsafe="xterm -ls -T Failsafe -n Failsafe -bg purple -fg white -geometry 80x24+0+0" @@ -70,182 +38,27 @@ argv=("$@") set -- -# -# No gpg-agent if a gpg session is already provided by an other agent. -# -if test "$usegpg" = yes -a -n "$GNOME_KEYRING_PID" ; then - case "${WINDOWMANAGER##*/}" in - gnome*) - # gnome-keyring provides a gpg agent starting with GNOME 3 (the - # gnome-version.xml file only exists in GNOME 3) - if test -d "$GNOME_KEYRING_CONTROL" -a -f "/usr/share/gnome/gnome-version.xml"; then - usegpg=no - fi +for script in /etc/X11/xdm/scripts/* +do + test -e $script || continue + test -d $script && continue + case "${script##*/}" in + .*) continue ;; + *.rpm*) continue ;; + *.swap) continue ;; + *.bak) continue ;; + *.orig) continue ;; + \#*) continue ;; + *~) continue ;; + [0-9][0-9]-*) ;; + *) continue ;; esac -fi - -# -# No gpg-agent if a gpg session is already provided by an other agent. -# -if test "$usegpg" = yes -a -n "$GNOME_KEYRING_PID" ; then - # gnome-keyring provides a gpg agent starting with GNOME 3 - if test -d "$GNOME_KEYRING_CONTROL"; then - usegpg=no - fi -fi - -# -# No ssh-agent if a ssh session is already provided by an other agent. -# -if test "$usessh" = yes -a -n "$GNOME_KEYRING_PID" ; then - if test -S "$GNOME_KEYRING_SOCKET" -o -d "$GNOME_KEYRING_CONTROL"; then - usessh=no - fi -fi - -# -# Run gpg-agent only if gpg service is configured and avaliable. -# Check if there is already a running gpg-agent and if use this. -# -if test "$usegpg" = yes -a -d "$GNUPGHOME" && gpgagent=$(type -p gpg-agent) ; then - found=no - - for GPG_AGENT_FILE in "$GNUPGHOME/agent.info" \ - "$GNUPGHOME/agent.info-${HOSTNAME:-$(hostname -f)}:${DISPLAY#*:}" - do - test -s "$GPG_AGENT_FILE" && . "$GPG_AGENT_FILE" - if test -n "$GPG_AGENT_INFO" ; then - GPG_AGENT_PID=${GPG_AGENT_INFO#*:} - GPG_AGENT_PID=${GPG_AGENT_PID%%:*} - if test -n "$GPG_AGENT_PID" && checkproc -p $GPG_AGENT_PID $gpgagent ; then - found=yes - break - fi - fi - done - - if test "$found" = yes ; then - export GPG_AGENT_INFO - if test -n "$SSH_AUTH_SOCK" -a "$usessh" = yes ; then - export SSH_AUTH_SOCK - fi - else - unset GPG_AGENT_INFO - if test -n "$SSH_AUTH_SOCK" -a "$usessh" != yes ; then - unset SSH_AUTH_SOCK - fi - fi - - if test -z "$GPG_AGENT_INFO" ; then - if test "$usessh" = gpg -a -z "$SSH_AUTH_SOCK" ; then - set -- $gpgagent --sh --daemon --enable-ssh-support --keep-display --write-env-file "$GPG_AGENT_FILE" ${1+"$@"} - if test -x /usr/lib/ssh/ssh-askpass ; then - SSH_ASKPASS=/usr/lib/ssh/ssh-askpass - export SSH_ASKPASS - elif test -x /usr/lib64/ssh/ssh-askpass ; then - SSH_ASKPASS=/usr/lib64/ssh/ssh-askpass - export SSH_ASKPASS - fi - usessh=no - else - set -- $gpgagent --sh --daemon --keep-display --write-env-file "$GPG_AGENT_FILE" ${1+"$@"} - fi - fi -fi - -# -# Run ssh-agent only if ssh service is configured and avaliable. -# Check if there is already a running ssh-agent and if use this. -# -if test "$usessh" = yes -a -d "$HOME/.ssh" && sshagent=$(type -p ssh-agent) ; then - if test -S "$SSH_AUTH_SOCK" ; then - if test -n "$SSH_AGENT_PID" && checkproc -p $SSH_AGENT_PID $sshagent ; then - export SSH_AGENT_PID SSH_AUTH_SOCK - else - rm -f "$SSH_AUTH_SOCK" - case "${SSH_AUTH_SOCK%/*}" in - /tmp/*) rm -rf "${SSH_AUTH_SOCK%/*}" - esac - unset SSH_AUTH_SOCK - fi - else - unset SSH_AUTH_SOCK - fi - - if test -z "$SSH_AUTH_SOCK" ; then - set -- $sshagent ${1+"$@"} - fi - - if test -x /usr/lib/ssh/ssh-askpass ; then - SSH_ASKPASS=/usr/lib/ssh/ssh-askpass - export SSH_ASKPASS - elif test -x /usr/lib64/ssh/ssh-askpass ; then - SSH_ASKPASS=/usr/lib64/ssh/ssh-askpass - export SSH_ASKPASS - fi -fi - -# -# Check if a dbus is required for e.g. plain xdm sessions -# -if test -S "$XDG_RUNTIME_DIR/bus" ; then - # socket /run/user/uid/bus exists, this means dbus is managed by systemd - # all we have to do now is make sure $DBUS_SESSION_BUS_ADDRESS is set correctly - DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus" - export DBUS_SESSION_BUS_ADDRESS -elif dbusdaemon=$(type -p dbus-daemon) && dbuslaunch=$(type -p dbus-launch) ; then - if test -s /var/lib/dbus/machine-id ; then - read -t1 mid < /var/lib/dbus/machine-id - elif test -s /etc/machine-id ; then - read -t1 mid < /etc/machine-id + if test -x $script ; then + $script else - mid= - fi - if test -n "$DBUS_SESSION_BUS_ADDRESS" ; then - # Determine dbus identifier - for guid in ${DBUS_SESSION_BUS_ADDRESS//,/ } ; do - case "$guid" in - guid=*) break - esac - done - # Check if dbus-daemon is active - dpid= - for suid in "${HOME}/.dbus/session-bus/"${mid}* ; do - test -e "$suid" || break - grep -q $guid "$suid" || continue - dpid=$(grep -E '^DBUS_SESSION_BUS_PID=[[:digit:]]+' "$suid") - test /proc/${dpid#*=}/exe -ef $dbusdaemon && continue - unset DBUS_SESSION_BUS_ADDRESS - break - done - test -n "$dpid" || unset DBUS_SESSION_BUS_ADDRESS + . $script fi - # Find a valid dbus-daemon if active - if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then - for suid in "${HOME}/.dbus/session-bus/"${mid}* ; do - test -e "$suid" || break - dpid=$(grep -E '^DBUS_SESSION_BUS_PID=[[:digit:]]+' "$suid") - test /proc/${dpid#*=}/exe -ef $dbusdaemon || continue - dadd=$(grep -E '^DBUS_SESSION_BUS_ADDRESS=' "$suid") - DBUS_SESSION_BUS_ADDRESS=${dadd#*=} - export DBUS_SESSION_BUS_ADDRESS - done - fi - unset mid guid suid dadd - # No dbus-daemon then launch a new session - if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then - set -- $dbuslaunch --sh-syntax --exit-with-session ${1+"$@"} - fi - unset dbuslaunch dbusdaemon -fi - -# -# Check if ConsoleKit is required for e.g. plain xdm sessions -# (outdated due systemd login manager) -# -if test -z "$XDG_SESSION_COOKIE" && cklaunch=$(type -p ck-launch-session) ; then - set -- $cklaunch ${1+"$@"} -fi +done # # Use system default xinitrc if the users does not have one.