From b79647e0cd6c99a74c93e9d06a024b943edb2e9f Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Jul 08 2008 14:45:20 +0000 Subject: - Fix RETVAL for LSB compliant initscripts - #246971 - Fix Default driver path - #454194 --- diff --git a/lcdproc-0.5.2-initscripts.patch b/lcdproc-0.5.2-initscripts.patch new file mode 100644 index 0000000..8baa9d0 --- /dev/null +++ b/lcdproc-0.5.2-initscripts.patch @@ -0,0 +1,139 @@ +diff -up lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts lcdproc-0.5.2/scripts/init-lcdproc.LSB.in +--- lcdproc-0.5.2/scripts/init-lcdproc.LSB.in.initscripts 2007-04-14 16:41:20.000000000 +0200 ++++ lcdproc-0.5.2/scripts/init-lcdproc.LSB.in 2008-07-08 16:32:30.000000000 +0200 +@@ -4,6 +4,7 @@ + # Provides: lcdproc + # Required-Start: $syslog $local_fs $network $remote_fs + # Required-Stop: $syslog $local_fs $network $remote_fs ++# Should-Start: LCDd + # Default-Start: 2 3 4 5 + # Default-Stop: S 0 1 6 + # Short-Description: LCDproc system status information viewer +@@ -23,8 +24,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin + NAME=lcdproc + DAEMON=${bindir}/$NAME + DESC="LCDproc system status monitor" +-DEFAULTS=/etc/default/$NAME ++DEFAULTS=@sysconfdir@/${NAME} + START=yes ++RETVAL=0 + + # Source defaults file; edit that file to configure this script. + if [ -e "${DEFAULTS}" ]; then +@@ -40,29 +42,39 @@ fi + test -x $DAEMON || exit 5 + + # load LSB 3.x init functions +-. /lib/lsb/init-functions ++if [ -e /lib/lsb/init-functions ]; then ++ . /lib/lsb/init-functions ++fi ++ ++# Source function library. ++if [ -e /etc/rc.d/init.d/functions ]; then ++ . /etc/rc.d/init.d/functions ++fi + + + case "$1" in + start) +- log_daemon_msg "Starting $DESC" "$NAME" ++ echo -n $"Starting $DESC $NAME :" + start_daemon $DAEMON $OPTIONS +- log_end_msg $? ++ RETVAL=$? ++ echo + ;; + stop) +- log_daemon_msg "Stopping $DESC" "$NAME" ++ echo -n $"Stopping $DESC $NAME :" + killproc $DAEMON +- log_end_msg $? ++ RETVAL=$? ++ echo + ;; + restart|reload|force-reload) + $0 stop + sleep 1 ++ RETVAL=0 + $0 start + ;; + *) +- echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 ++ echo $"Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 2 + ;; + esac + +-exit 0 ++exit $RETVAL +diff -up lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts lcdproc-0.5.2/scripts/init-LCDd.LSB.in +--- lcdproc-0.5.2/scripts/init-LCDd.LSB.in.initscripts 2007-04-14 16:41:20.000000000 +0200 ++++ lcdproc-0.5.2/scripts/init-LCDd.LSB.in 2008-07-08 16:32:22.000000000 +0200 +@@ -4,6 +4,7 @@ + # Provides: LCDd + # Required-Start: $syslog $local_fs $network $remote_fs + # Required-Stop: $syslog $local_fs $network $remote_fs ++# Should-Start: udev + # Default-Start: 2 3 4 5 + # Default-Stop: S 0 1 6 + # Short-Description: LCDproc Server Daemon +@@ -23,8 +24,10 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin + NAME=LCDd + DAEMON=${sbindir}/$NAME + DESC="LCDproc display server daemon" +-DEFAULTS=/etc/default/$NAME ++DEFAULTS=@sysconfdir@/${NAME} + START=yes ++RETVAL=0 ++ + + # Source defaults file; edit that file to configure this script. + if [ -e "${DEFAULTS}" ]; then +@@ -40,29 +43,39 @@ fi + test -x $DAEMON || exit 5 + + # load LSB 3.x init functions +-. /lib/lsb/init-functions ++if [ -e /lib/lsb/init-functions ]; then ++ . /lib/lsb/init-functions ++fi ++ ++# Source function library. ++if [ -e /etc/rc.d/init.d/functions ]; then ++ . /etc/rc.d/init.d/functions ++fi + + + case "$1" in + start) +- log_daemon_msg "Starting $DESC" "$NAME" ++ echo -n $"Starting $DESC $NAME :" + start_daemon $DAEMON $OPTIONS +- log_end_msg $? ++ RETVAL=$? ++ echo + ;; + stop) +- log_daemon_msg "Stopping $DESC" "$NAME" ++ echo -n $"Stopping $DESC $NAME :" + killproc $DAEMON +- log_end_msg $? ++ RETVAL=$? ++ echo + ;; + restart|reload|force-reload) + $0 stop + sleep 1 ++ RETVAL=0 + $0 start + ;; + *) +- echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 ++ echo $"Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 2 + ;; + esac + +-exit 0 ++exit $RETVAL diff --git a/lcdproc-0.5.2-scripts.patch b/lcdproc-0.5.2-scripts.patch deleted file mode 100644 index 2571467..0000000 --- a/lcdproc-0.5.2-scripts.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- lcdproc-0.5.2/scripts/init-LCDd.rpm.in.initscripts 2007-05-20 14:17:36.000000000 +0200 -+++ lcdproc-0.5.2/scripts/init-LCDd.rpm.in 2007-05-20 14:22:24.000000000 +0200 -@@ -19,7 +19,7 @@ - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - # - # --# chkconfig: 345 70 21 -+# chkconfig: - 70 21 - # description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \ - # Apart from the main client lcdproc(1) there are various clients. \ - # See http://lcdproc.omnipotent.net for details. -@@ -73,6 +73,12 @@ - RETVAL=$? - } - -+reload() { -+ stop -+ start -+ RETVAL=$? -+} -+ - restart() { - stop - start -@@ -94,6 +100,9 @@ - status) - dostatus - ;; -+ reload) -+ restart -+ ;; - restart) - restart - ;; -@@ -101,7 +110,7 @@ - condrestart - ;; - *) -- echo "Usage: $0 {start|stop|status|restart|condrestart}" -+ echo "Usage: $0 {start|stop|status|reload|restart|condrestart}" - exit 1 - esac - ---- lcdproc-0.5.2/scripts/init-lcdproc.rpm.in.initscripts 2007-05-20 14:17:02.000000000 +0200 -+++ lcdproc-0.5.2/scripts/init-lcdproc.rpm.in 2007-05-20 14:21:13.000000000 +0200 -@@ -19,7 +19,7 @@ - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - # - # --# chkconfig: 345 71 20 -+# chkconfig: - 71 20 - # description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \ - # Apart from the main client lcdproc(1) there are various clients. \ - # See http://lcdproc.omnipotent.net for details. -@@ -73,6 +73,12 @@ - RETVAL=$? - } - -+reload() { -+ stop -+ start -+ RETVAL=$? -+} -+ - restart() { - stop - start -@@ -94,6 +100,9 @@ - status) - dostatus - ;; -+ reload) -+ restart -+ ;; - restart) - restart - ;; -@@ -101,7 +110,7 @@ - condrestart - ;; - *) -- echo "Usage: $0 {start|stop|status|restart|condrestart}" -+ echo "Usage: $0 {start|stop|status|reload|restart|condrestart}" - exit 1 - esac - diff --git a/lcdproc.spec b/lcdproc.spec index 0c3b70f..f573cac 100644 --- a/lcdproc.spec +++ b/lcdproc.spec @@ -1,12 +1,12 @@ Summary: LCDproc displays real-time system information on a 20x4 backlit LCD Name: lcdproc Version: 0.5.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 URL: http://lcdproc.omnipotent.net Group: System Environment/Libraries Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Patch0: lcdproc-0.5.2-scripts.patch +Patch0: lcdproc-0.5.2-initscripts.patch Patch1: lcdproc-0.5.2-memset_swp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -51,6 +51,8 @@ See also http://lcdproc.omnipotent.net. %patch1 -p1 -b .memset_swp chmod 644 server/drivers/timing.h +sed -i -e 's|server/drivers|%{_libdir}/lcdproc|' LCDd.conf +touch -r TODO LCDd.conf %build %configure \ @@ -83,8 +85,8 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc # init install -d $RPM_BUILD_ROOT%{_initrddir} -install -pm 0755 scripts/init-LCDd.rpm $RPM_BUILD_ROOT%{_initrddir}/LCDd -install -pm 0755 scripts/init-lcdproc.rpm $RPM_BUILD_ROOT%{_initrddir}/lcdproc +install -pm 0755 scripts/init-LCDd.LSB $RPM_BUILD_ROOT%{_initrddir}/LCDd +install -pm 0755 scripts/init-lcdproc.LSB $RPM_BUILD_ROOT%{_initrddir}/lcdproc @@ -125,6 +127,10 @@ rm -rf $RPM_BUILD_ROOT __doc %changelog +* Tue Jul 8 2008 kwizart < kwizart at gmail.com > - 0.5.2-5 +- Fix RETVAL for LSB compliant initscripts - #246971 +- Fix Default driver path - #454194 + * Sat Feb 9 2008 kwizart < kwizart at gmail.com > - 0.5.2-4 - Rebuild for gcc43