Updated to 1.20.3 Fixed init script to comply with LSB standard (#246937)

Mass patch cleanup Fixed typo in doc (#446679)
This commit is contained in:
Zdenek Prikryl 2008-05-29 11:51:59 +00:00
parent 2bd95e296a
commit 5b9f257ee7
6 changed files with 133 additions and 87 deletions

View File

@ -1,2 +1 @@
gpm-1.20.1.tar.gz gpm-1.20.3.tar.gz
gpm.rc

View File

@ -0,0 +1,13 @@
--- gpm-1.20.3/src/daemon/startup.c.close-fds 2008-05-28 13:18:59.000000000 +0200
+++ gpm-1.20.3/src/daemon/startup.c 2008-05-28 13:20:13.000000000 +0200
@@ -143,6 +143,10 @@ void startup(int argc, char **argv)
* remove and ignore it ?? FIXME */
if (chdir("/") < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_CHDIR_FAILED);
+ // close extra fds
+ close(0);
+ close(1);
+ close(2);
//return mouse_table[1].fd; /* the second is handled in the main() */

10
gpm-1.20.3-gcc4.3.patch Normal file
View File

@ -0,0 +1,10 @@
--- gpm-1.20.3/src/daemon/open_console.c.gcc4.3 2008-05-28 11:12:34.000000000 +0200
+++ gpm-1.20.3/src/daemon/open_console.c 2008-05-28 11:12:40.000000000 +0200
@@ -21,7 +21,6 @@
#include <fcntl.h> /* open and co. */
#include <sys/stat.h> /* stat() */
-#include <stropts.h> /* ioctl */
/* Linux specific (to be outsourced in gpm2 */
#include <linux/serial.h> /* for serial console check */

View File

@ -9,6 +9,19 @@
# pidfile: /var/run/gpm.pid # pidfile: /var/run/gpm.pid
# config: /etc/sysconfig/mouse # config: /etc/sysconfig/mouse
### BEGIN INIT INFO
# Provides: gpm
# Required-Start: $syslog $local_fs
# Required-Stop: $syslog $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop gpm daemon
# Description: GPM adds mouse support to text-based Linux applications such \
# as the Midnight Commander. It also allows mouse-based console \
# cut-and-paste operations, and includes support for pop-up \
# menus on the console.
### END INIT INFO
# source function library # source function library
. /etc/init.d/functions . /etc/init.d/functions
@ -18,7 +31,19 @@ fi
RETVAL=0 RETVAL=0
check() {
# Check that we're a privileged user
[ `id -u` = 0 ] || exit 4
# Check if acpid is executable
test -x /usr/sbin/gpm || exit 5
}
start() { start() {
check
if [ ! -f /var/lock/subsys/gpm ]; then
echo -n $"Starting console mouse services: " echo -n $"Starting console mouse services: "
if [ -z "$MOUSETYPE" ]; then if [ -z "$MOUSETYPE" ]; then
@ -48,25 +73,35 @@ start() {
fi fi
if [ -n "$MOUSETYPE" ]; then if [ -n "$MOUSETYPE" ]; then
daemon gpm -m $DEVICE -t $MOUSETYPE $OPTIONS daemon /usr/sbin/gpm -m $DEVICE -t $MOUSETYPE $OPTIONS
else else
daemon gpm -m $DEVICE $OPTIONS daemon /usr/sbin/gpm -m $DEVICE $OPTIONS
fi fi
RETVAL=$? RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpm [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpm
echo
fi
return $RETVAL
} }
stop() { stop() {
check
echo -n $"Shutting down console mouse services: " echo -n $"Shutting down console mouse services: "
killproc gpm killproc /usr/sbin/gpm
if [ -n "$IMOUSETYPE" ]; then if [ -n "$IMOUSETYPE" ]; then
killproc inputattach killproc inputattach
fi fi
RETVAL=$? RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gpm [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gpm
echo
return $RETVAL
}
restart() {
stop
start
} }
case "$1" in case "$1" in
@ -76,14 +111,16 @@ case "$1" in
stop) stop)
stop stop
;; ;;
restart|reload) force-reload|reload)
stop echo "$0: Unimplemented feature."
start RETVAL=3
;;
restart)
restart
;; ;;
condrestart) condrestart)
if [ -f /var/lock/subsys/gpm ]; then if [ -f /var/lock/subsys/gpm ]; then
stop restart
start
fi fi
;; ;;
status) status)
@ -91,8 +128,8 @@ case "$1" in
RETVAL=$? RETVAL=$?
;; ;;
*) *)
echo $"Usage: $0 {start|stop|restart|condrestart|status}" echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
exit 1 RETVAL=2
esac esac
exit $RETVAL exit $RETVAL

View File

@ -1,35 +1,23 @@
Summary: A mouse server for the Linux console. Summary: A mouse server for the Linux console.
Name: gpm Name: gpm
Version: 1.20.1 Version: 1.20.3
Release: 90%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
Source1: gpm.init Source1: gpm.init
Source2: inputattach.c Source2: inputattach.c
Patch1: gpm-evdev-cumulative.patch Patch1: gpm-1.20.1-multilib.patch
Patch2: gpm-1.20.1-math.patch Patch2: gpm-1.20.1-lib-silent.patch
Patch3: gpm-1.20.1-weak-wgetch.patch Patch3: gpm-1.20.3-gcc4.3.patch
Patch4: gpm-1.20.1-nodebug.patch Patch4: gpm-1.20.3-close-fds.patch
Patch5: gpm-1.20.1-gpmopen.patch Patch5: gpm-1.20.1-doc.patch
Patch6: gpm-1.20.1-idie.patch Patch6: gpm-1.20.1-weak-wgetch.patch
Patch16: gpm-1.20.1-subscript.patch
Patch17: gpm-1.20.1-input.patch
Patch18: gpm-1.20.1-consolename.patch
Patch19: gpm-1.20.1-multilib.patch
Patch20: gpm-1.20.1-no-console-error.patch
Patch21: gpm-1.20.1-lib-silent.patch
Patch22: gpm-1.20.1-close-fds.patch
Patch23: gpm-1.20.1-aligned-sleep.patch
Patch24: gpm-1.20.1-deadsocket.patch
Patch25: gpm-1.20.1-default-handler.patch
Patch26: gpm-1.20.1-va_list.patch
Patch27: gpm-1.20.1-openmax.patch
Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
Requires: bash >= 2.0 Requires: bash >= 2.0
# this defines the library version that this package builds. # this defines the library version that this package builds.
%define LIBVER 1.19.0 %define LIBVER 1.20.0
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildPrereq: sed gawk texinfo bison ncurses-devel autoconf BuildPrereq: sed gawk texinfo bison ncurses-devel autoconf
@ -40,7 +28,6 @@ also provides console cut-and-paste operations using the mouse and
includes a program to allow pop-up menus to appear at the click of a includes a program to allow pop-up menus to appear at the click of a
mouse button. mouse button.
%package devel %package devel
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Summary: A mouse server for the Linux console. Summary: A mouse server for the Linux console.
@ -56,27 +43,17 @@ mouse button.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .evdev %patch1 -p1 -b .multilib
%patch2 -p1 -b .math %patch2 -p1 -b .lib-silent
%patch3 -p1 -b .weak-wgetch %patch3 -p1 -b .gcc4.3
%patch4 -p1 -b .nodebug %patch4 -p1 -b .close-fds
%patch5 -p1 -b .gpmopen %patch5 -p1 -b .doc
%patch6 -p1 -b .idie %patch6 -p1 -b .weak-wgetch
%patch16 -p1 -b .subscript
%patch17 -p1 -b .input
%patch18 -p1 -b .consolename
%patch19 -p1 -b .multilib
%patch20 -p1 -b .no-console-error
%patch21 -p1 -b .lib-silent
%patch22 -p1 -b .close-fds
%patch23 -p1 -b .aligned-sleep
%patch24 -p1 -b .deadsocket
%patch25 -p1 -b .default-handler
%patch26 -p1 -b .va_list
%patch27 -p1 -b .openmax
%build %build
rm -f configure rm -f configure
rm -f src/prog/open_console.o
autoconf autoconf
CFLAGS="-D_GNU_SOURCE $RPM_OPT_FLAGS" \ CFLAGS="-D_GNU_SOURCE $RPM_OPT_FLAGS" \
lispdir=%{buildroot}%{_datadir}/emacs/site-lisp \ lispdir=%{buildroot}%{_datadir}/emacs/site-lisp \
@ -136,6 +113,8 @@ rm -f $RPM_BUILD_ROOT/usr/bin/hltest
rm -f $RPM_BUILD_ROOT/usr/bin/mouse-test rm -f $RPM_BUILD_ROOT/usr/bin/mouse-test
rm -rf $RPM_BUILD_ROOT/%{_mandir} rm -rf $RPM_BUILD_ROOT/%{_mandir}
rm -f $RPM_BUILD_ROOT/usr/sbin/inputattach rm -f $RPM_BUILD_ROOT/usr/sbin/inputattach
rm -f $RPM_BUILD_ROOT/usr/bin/display-buttons
rm -f $RPM_BUILD_ROOT/usr/bin/display-coords
%endif %endif
%clean %clean
@ -175,6 +154,8 @@ fi
%{_bindir}/gpm-root %{_bindir}/gpm-root
%{_bindir}/hltest %{_bindir}/hltest
%{_bindir}/mouse-test %{_bindir}/mouse-test
%{_bindir}/display-coords
%{_bindir}/display-buttons
%{_mandir}/man1/mev.1* %{_mandir}/man1/mev.1*
%{_mandir}/man1/gpm-root* %{_mandir}/man1/gpm-root*
%{_mandir}/man7/gpm-types* %{_mandir}/man7/gpm-types*
@ -193,6 +174,12 @@ fi
%{_libdir}/libgpm.so %{_libdir}/libgpm.so
%changelog %changelog
* Thu May 29 2008 Zdenek Prikryl <zprikryl@redhat.com> - 1.20.3-1
- Updated to 1.20.3
- Fixed init script to comply with LSB standard (#246937)
- Mass patch cleanup
- Fixed typo in doc (#446679)
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.20.1-90 * Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.20.1-90
- Autorebuild for GCC 4.3 - Autorebuild for GCC 4.3
@ -460,7 +447,7 @@ fi
- Don't crash if we can't open /dev/console - Don't crash if we can't open /dev/console
(Happens with some devfs enabled kernels) (Happens with some devfs enabled kernels)
* Tue Jan 23 2001 Trond Eivind Glomsrød <teg@redhat.com> * Tue Jan 23 2001 Trond Eivind Glomsr<EFBFBD>d <teg@redhat.com>
- fix bug in i18n of initscript - fix bug in i18n of initscript
* Tue Jan 23 2001 Preston Brown <pbrown@redhat.com> * Tue Jan 23 2001 Preston Brown <pbrown@redhat.com>

View File

@ -1 +1 @@
632a8fa8a6613027e407ee3e7a54cf13 gpm-1.20.1.tar.gz 212251312c7db0396974f25d86d4ae6c gpm-1.20.3.tar.gz