Commit 216a8e5b authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Fixes the pid file handling in the gdm-restart/stop/safe-restart scripts.

2007-04-20  William Jon McCann  <mccann@jhu.edu>

	* Makefile.am:
	* configure.ac:
	* gdm-restart.in:
	* gdm-safe-restart.in:
	* gdm-stop.in:
	* gdm.spec.in:
	* gdmsetup-pam:
	* gdmsetup-security.in:
	* utils/Makefile.am:
	* utils/gdm-restart.in:
	* utils/gdm-safe-restart.in:
	* utils/gdm-stop.in:
	Fixes the pid file handling in the gdm-restart/stop/safe-restart
	scripts. Moves the scripts to the utils subdir.  Moves the
	gdmsetup stuff from toplevel to utils subdir.  Removes gdm.spec.
	Fixes #431462


svn path=/trunk/; revision=4845
parent 9b4f9050
2007-04-20 William Jon McCann <mccann@jhu.edu>
* Makefile.am:
* configure.ac:
* gdm-restart.in:
* gdm-safe-restart.in:
* gdm-stop.in:
* gdm.spec.in:
* gdmsetup-pam:
* gdmsetup-security.in:
* utils/Makefile.am:
* utils/gdm-restart.in:
* utils/gdm-safe-restart.in:
* utils/gdm-stop.in:
Fixes the pid file handling in the gdm-restart/stop/safe-restart
scripts. Moves the scripts to the utils subdir. Moves the
gdmsetup stuff from toplevel to utils subdir. Removes gdm.spec.
Fixes #431462
2007-04-19 Brian Cameron <brian.cameron@sun.com>
* configure.ac, acconfig.h, daemon/gdm.c,
......
......@@ -11,7 +11,6 @@ SUBDIRS = \
docs \
$(NULL)
# add these when help gets added back
# docs omf-install
......@@ -20,39 +19,14 @@ EXTRA_DIST = \
ChangeLog \
README \
README.install \
gdm.spec \
gdm.spec.in \
gdmsetup-pam \
gdmsetup-security.in \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
gdm-stop.in \
gdm-restart.in \
gdm-safe-restart.in \
gnome-doc-utils.make \
xmldocs.make \
omf.make
sbin_SCRIPTS = gdm-stop gdm-restart gdm-safe-restart
if CONSOLE_HELPER
cappsdir = $(PAM_PREFIX)/security/console.apps
capps_DATA = gdmsetup
CLEANFILES = gdmsetup-security
gdmsetup: $(srcdir)/gdmsetup-security.in
sed -e 's,[@]sbindir[@],$(sbindir),g' <$(srcdir)/gdmsetup-security.in >gdmsetup
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d
$(INSTALL_DATA) $(srcdir)/gdmsetup-pam $(DESTDIR)$(PAM_PREFIX)/pam.d/gdmsetup
else
install-data-local:
endif
DISTCLEANFILES = \
gdmsetup \
gnome-doc-utils.make \
intltool-extract \
intltool-merge \
......
......@@ -1292,10 +1292,6 @@ config/PostSession
config/gdmprefetchlist
config/gnome.desktop.in
config/ssh.desktop.in
gdm-stop
gdm-restart
gdm-safe-restart
gdm.spec
])
dnl add back when help comes back
......
%define sysconfdir /etc
Summary: The GNOME Display Manager.
Name: gdm
Version: @VERSION@
Release: 1
Epoch: 1
License: LGPL/GPL
Group: User Interface/X
Source: ftp://ftp.5z.com/pub/unix/gdm-%{version}.tar.gz
BuildRoot: %{_tmppath}/gdm-%{version}-root
Prereq: /usr/sbin/useradd
Requires: pam >= 0.68
Requires: gnome-libs >= 1.0.17
Requires: gtk2 >= 2.6.0
BuildRequires: usermode, libglade-devel
BuildRequires: gnome-libs-devel >= 1.0.17
BuildRequires: gdk-pixbuf-devel >= 0.7.0
%description
Gdm (the GNOME Display Manager) is a highly configurable
reimplementation of xdm, the X Display Manager. Gdm allows you to log
into your system with the X Window System running and supports running
several different X sessions on your local machine at the same time.
%prep
%setup -q
%build
CFLAGS="-g $RPM_OPT_FLAGS" ./configure --localstatedir=%{_localstatedir} \
--prefix=%{_prefix} --sysconfdir=%{sysconfdir}/X11 \
--bindir=%{_bindir} --datadir=%{_datadir} --sbindir=%{_sbindir} \
--enable-console-helper --with-pam-prefix=%{sysconfdir}
make
%install
rm -rf $RPM_BUILD_ROOT
/usr/sbin/useradd -r gdm > /dev/null 2>&1 || /bin/true
make sysconfdir=$RPM_BUILD_ROOT%{sysconfdir}/X11 \
prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
datadir=$RPM_BUILD_ROOT%{_datadir} \
localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \
sbindir=$RPM_BUILD_ROOT%{_sbindir} \
PAM_PREFIX=$RPM_BUILD_ROOT%{sysconfdir} \
install
# install RH specific session files
# rm -f $RPM_BUILD_ROOT%{sysconfdir}/X11/gdm/Sessions/*
# install -m 755 config/Default.redhat $RPM_BUILD_ROOT%{sysconfdir}/X11/gdm/Sessions/Default
# install -m 755 config/Gnome $RPM_BUILD_ROOT%{sysconfdir}/X11/gdm/Sessions/Gnome
# ln -sf Default $RPM_BUILD_ROOT%{sysconfdir}/X11/gdm/Sessions/default
# change default Init script to be Red Hat default
# Note that this just sets up background and we already do that ourselves
#ln -sf ../../xdm/Xsetup_0 $RPM_BUILD_ROOT%{sysconfdir}/X11/gdm/Init/Default
# done right nowdays
# move pam.d stuff to right place
# mv $RPM_BUILD_ROOT%{sysconfdir}/X11/pam.d $RPM_BUILD_ROOT%{sysconfdir}
# move security stuff to right place
# mv $RPM_BUILD_ROOT%{sysconfdir}/X11/security $RPM_BUILD_ROOT%{sysconfdir}
%find_lang %{name}-2.4
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/useradd -u 42 -r gdm > /dev/null 2>&1
# ignore errors, as we can't disambiguate between gdm already existed
# and couldn't create account with the current adduser.
exit 0
%post
# Attempt to restart GDM softly by use of the fifo. Wont work on older
# then 2.2.3.1 versions but should work nicely on later upgrades.
# FIXME: this is just way too complex
FIFOFILE=`grep '^ServAuthDir=' %{sysconfdir}/X11/gdm/gdm.conf | sed -e 's/^ServAuthDir=//'`
if test x$FIFOFILE = x ; then
FIFOFILE=%{_localstatedir}/gdm/.gdmfifo
else
FIFOFILE="$FIFOFILE"/.gdmfifo
fi
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
PIDFILE=/var/run/gdm.pid
fi
if test -w $FIFOFILE ; then
if test -f $PIDFILE ; then
if kill -0 `cat $PIDFILE` ; then
(echo;echo SOFT_RESTART) >> $FIFOFILE
fi
fi
fi
# ignore error in the above
exit 0
%files -f %name-2.4.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/*
%{_sbindir}/*
%{_libexecdir}/*
%{_libdir}/gtk-2.0/modules/*
%config %{sysconfdir}/pam.d/*
%config %{sysconfdir}/X11/gdm
%config %{sysconfdir}/security/console.apps/*
%{_datadir}/pixmaps/*
%{_datadir}/xsessions/*
%{_datadir}/gdm
%{_datadir}/applications/*
%{_datadir}/gnome/capplets/*
# DOCUMENTATION!
%{_datadir}/omf/gdm
%{_datadir}/gnome/help/gdm
%{_prefix}/man/man*/*
%{_localstatedir}/scrollkeeper/*/*
%{_localstatedir}/scrollkeeper/scrollkeeper_docs
%attr(1770, root, gdm) %dir %{_localstatedir}/gdm
%attr(755, root, root) %dir %{_localstatedir}/log/gdm
%changelog
* Mon Aug 26 2003 George Lebl <jirka@5z.com>
- whack localstatedir
- update file list
* Mon Aug 25 2003 George Lebl <jirka@5z.com>
- Updated file list
* Mon Jun 9 2003 George Lebl <jirka@5z.com>
- Updated for the new session setup
* Mon May 5 2003 George Lebl <jirka@5z.com>
- Updated the lang stuff, and the file lists
* Tue Nov 6 2001 Gregory Leblanc <gleblanc@linuxweasel.com>
- removed some unnecessary %defines
- fixed find_lang stuff
- added some BuildRequires lines
* Sun Jul 01 2001 George Lebl <jirka@5z.com>
- Fixed file listing
* Sun May 24 2001 George Lebl <jirka@5z.com>
- Hmmm, simplified the file listing, dunno why normally people list
things file by file/dir by dir, but the old file list was out of date
* Sun May 06 2001 George Lebl <jirka@5z.com>
- Kill the Failsafe script. GDM will now do failsafe itself, in an actual
failsafe way (meaning it will work with greater degree of hosage)
* Wed Mar 07 2001 George Lebl <jirka@5z.com>
- Fixups, move the security dir as well and build with console helper and
hardwire the sysconfdir to /etc as that seems broke on my 6.2 box otherwise
* Wed Mar 07 2001 Gregory Leblanc <gleblanc@cu-portland.edu>
- finalize patches that have been pending. Merge changes forward, and
commit to CVS.
* Mon Mar 05 2001 Lee Mallabone <lee0@callnetuk.com>
- Change glade file paths and add gdmchooser glade file.
* Wed Feb 28 2001 Lee Mallabone <lee0@callnetuk.com>
- Add necessary paths/flags to use console-helper for gdmconfig.
* Thu Feb 22 2001 Gregory Leblanc <gleblanc@cu-portland.edu>
- %define localstatedir /var/lib and related changes
* Tue Feb 20 2001 Gregory Leblanc <gleblanc@cu-portland.edu>
- macro cleanups
* Fri Feb 03 2001 George Lebl <jirka@5z.com>
- Add gdmconfig files
* Fri Feb 02 2001 George Lebl <jirka@5z.com>
- Remove all the patches and do the voodoo that I don't do so well
to make this thingie work with 2.0.97.1
* Fri Feb 04 2000 Havoc Pennington <hp@redhat.com>
- Modify Default.session and Failsafe.session not to add -login option to bash
- exec the session scripts with the user's shell with a hyphen prepended
- doesn't seem to actually work yet with tcsh, but it doesn't seem to
break anything. needs a look to see why it doesn't work
* Fri Feb 04 2000 Havoc Pennington <hp@redhat.com>
- Link PreSession/Default to xdm/GiveConsole
- Link PostSession/Default to xdm/TakeConsole
* Fri Feb 04 2000 Havoc Pennington <hp@redhat.com>
- Fix the fix to the fix (8877)
- remove docs/gdm-manual.txt which doesn't seem to exist from %doc
* Fri Feb 04 2000 Havoc Pennington <hp@redhat.com>
- Enhance 8877 fix by not deleting the "Please login"
message
* Fri Feb 04 2000 Havoc Pennington <hp@redhat.com>
- Try to fix bug 8877 by clearing the message below
the entry box when the prompt changes. may turn
out to be a bad idea.
* Mon Jan 17 2000 Elliot Lee <sopwith@redhat.com>
- Fix bug #7666: exec Xsession instead of just running it
* Mon Oct 25 1999 Jakub Jelinek <jakub@redhat.com>
- Work around so that russian works (uses koi8-r instead
of the default iso8859-5)
* Tue Oct 12 1999 Owen Taylor <otaylor@redhat.com>
- Try again
* Tue Oct 12 1999 Owen Taylor <otaylor@redhat.com>
- More fixes for i18n
* Tue Oct 12 1999 Owen Taylor <otaylor@redhat.com>
- Fixes for i18n
* Fri Sep 26 1999 Elliot Lee <sopwith@redhat.com>
- Fixed pipewrite bug (found by mkj & ewt).
* Fri Sep 17 1999 Michael Fulbright <drmike@redhat.com>
- added requires for pam >= 0.68
* Fri Sep 10 1999 Elliot Lee <sopwith@redhat.com>
- I just update this package every five minutes, so any recent changes are my fault.
* Thu Sep 02 1999 Michael K. Johnson <johnsonm@redhat.com>
- built gdm-2.0beta2
* Mon Aug 30 1999 Michael K. Johnson <johnsonm@redhat.com>
- built gdm-2.0beta1
* Tue Aug 17 1999 Michael Fulbright <drmike@redhat.com>
- included rmeier@liberate.com patch for tcp socket X connections
* Mon Apr 19 1999 Michael Fulbright <drmike@redhat.com>
- fix to handling ancient gdm config files with non-standard language specs
- dont close display connection for xdmcp connections, else we die if remote
end dies.
* Fri Apr 16 1999 Michael Fulbright <drmike@redhat.com>
- fix language handling to set GDM_LANG variable so gnome-session
can pick it up
* Wed Apr 14 1999 Michael Fulbright <drmike@redhat.com>
- fix so certain dialog boxes dont overwrite background images
* Wed Apr 14 1999 Michael K. Johnson <johnsonm@redhat.com>
- do not specify -r 42 to useradd -- it doesn't know how to fall back
if id 42 is already taken
* Fri Apr 9 1999 Michael Fulbright <drmike@redhat.com>
- removed suspend feature
* Mon Apr 5 1999 Jonathan Blandford <jrb@redhat.com>
- added patch from otaylor to not call gtk funcs from a signal.
- added patch to tab when username not added.
- added patch to center About box (and bring up only one) and ignore "~"
and ".rpm" files.
* Fri Mar 26 1999 Michael Fulbright <drmike@redhat.com>
- fixed handling of default session, merged all gdmgreeter patches into one
* Tue Mar 23 1999 Michael Fulbright <drmike@redhat.com>
- remove GNOME/KDE/AnotherLevel session scripts, these have been moved to
the appropriate packages instead.
- added patch to make option menus always active (security problem otherwise)
- added jrb's patch to disable stars in passwd entry field
* Fri Mar 19 1999 Michael Fulbright <drmike@redhat.com>
- made sure /usr/bin isnt in default path twice
- strip binaries
* Wed Mar 17 1999 Michael Fulbright <drmike@redhat.com>
- fixed to use proper system path when root logs in
* Tue Mar 16 1999 Michael Fulbright <drmike@redhat.com>
- linked Init/Default to Red Hat default init script for xdm
- removed logo from login dialog box
* Mon Mar 15 1999 Michael Johnson <johnsonm@redhat.com>
- pam_console integration
* Tue Mar 09 1999 Michael Fulbright <drmike@redhat.com>
- added session files for GNOME/KDE/AnotherLevel/Default/Failsafe
- patched gdmgreeter to not complete usernames
- patched gdmgreeter to not safe selected session permanently
- patched gdmgreeter to center dialog boxes
* Mon Mar 08 1999 Michael Fulbright <drmike@redhat.com>
- removed comments from gdm.conf file, these are not parsed correctly
* Sun Mar 07 1999 Michael Fulbright <drmike@redhat.com>
- updated source line for accuracy
* Fri Feb 26 1999 Owen Taylor <otaylor@redhat.com>
- Updated patches for 1.0.0
- Fixed some problems in 1.0.0 with installation directories
- moved /usr/var/gdm /var/gdm
* Thu Feb 25 1999 Michael Fulbright <drmike@redhat.com>
- moved files from /usr/etc to /etc
* Tue Feb 16 1999 Michael Johnson <johnsonm@redhat.com>
- removed commented-out #1 definition -- put back after testing gnome-libs
comment patch
* Sat Feb 06 1999 Michael Johnson <johnsonm@redhat.com>
- initial packaging
## Process this file with automake to produce makefile.in
NULL =
DEFS = @DEFS@ -DGDM_CONFIG_FILE=\"$(gdmconfdir)/gdm.conf\" \
-DGDM_FACTORY_CONFIG_FILE=\"$(gdmconfdir)/factory-gdm.conf\" \
-DGDM_GLADE_DIR=\"@datadir@/gdm\"
......@@ -11,7 +12,36 @@ INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(UTILS_CFLAGS)
EXTRA_DIST = gdm-ssh-session
edit = sed \
-e 's|@sbindir[@]|$(sbindir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@GDM_PID_FILE[@]|$(GDM_PID_FILE)|g'
gdm-stop: gdm-stop.in Makefile
$(edit) $< >$@
gdm-restart: gdm-restart.in Makefile
$(edit) $< >$@
gdm-safe-restart: gdm-safe-restart.in Makefile
$(edit) $< >$@
gdmsetup: gdmsetup-security.in
$(edit) <gdmsetup-security.in >gdmsetup
sbin_SCRIPTS = \
gdm-stop \
gdm-restart \
gdm-safe-restart \
$(NULL)
EXTRA_DIST = \
gdm-ssh-session \
gdm-stop.in \
gdm-restart.in \
gdm-safe-restart.in \
gdmsetup-pam \
gdmsetup-security.in \
$(NULL)
libexec_SCRIPTS = \
@GDMSSHSESSION@
......@@ -20,7 +50,7 @@ libexec_PROGRAMS = \
@GDMASKPASS@ \
@GDMOPEN@ \
@GDMPREFETCH@ \
gdmtranslate
gdmtranslate
if DMX_SUPPORT
bin_PROGRAMS = gdm-dmx-reconnect-proxy
......@@ -63,3 +93,22 @@ gdm_dmx_reconnect_proxy_LDADD = \
-lX11 \
$(DMX_LIBS)
endif
if CONSOLE_HELPER
cappsdir = $(PAM_PREFIX)/security/console.apps
capps_DATA = gdmsetup
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d
$(INSTALL_DATA) $(srcdir)/gdmsetup-pam $(DESTDIR)$(PAM_PREFIX)/pam.d/gdmsetup
else
install-data-local:
endif
CLEANFILES = \
gdmsetup-security \
$(NULL)
DISTCLEANFILES = \
gdmsetup \
$(NULL)
#!/bin/sh
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
echo "Can't find the PID file in the configuration file, going to try:"
echo "/var/run/gdm.pid"
PIDFILE=/var/run/gdm.pid
fi
PIDFILE=@GDM_PID_FILE@
if test '!' -f $PIDFILE ; then
echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
exit 1
......
#!/bin/sh
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
echo "Can't find the PID file in the configuration file, going to try:"
echo "/var/run/gdm.pid"
PIDFILE=/var/run/gdm.pid
fi
PIDFILE=@GDM_PID_FILE@
if test '!' -f $PIDFILE ; then
echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
exit 1
......
#!/bin/sh
PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
PIDFILE=""
fi
if test x$PIDFILE = x ; then
echo "Can't find the PID file in the configuration file, going to try:"
echo "/var/run/gdm.pid"
PIDFILE=/var/run/gdm.pid
fi
PIDFILE=@GDM_PID_FILE@
if test '!' -f $PIDFILE ; then
echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment