rpms/vdr/devel vdr-1.4.7-syncearly-syslog.patch, NONE, 1.1 vdr-runvdr.sh, 1.4, 1.5 vdr-shutdown.sh, 1.2, 1.3 vdr.init, 1.6, 1.7 vdr.spec, 1.21, 1.22 vdr.sysconfig, 1.4, 1.5

Ville Skytta (scop) fedora-extras-commits at redhat.com
Mon Mar 17 19:53:54 UTC 2008


Author: scop

Update of /cvs/pkgs/rpms/vdr/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14553

Modified Files:
	vdr-runvdr.sh vdr-shutdown.sh vdr.init vdr.spec vdr.sysconfig 
Added Files:
	vdr-1.4.7-syncearly-syslog.patch 
Log Message:
* Sun Mar 16 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.4.7-11
- Kill runvdr before vdr in init script's "stop" action in order to prevent
  it from restarting vdr in case something goes wrong when shutting down.
- Direct debug messages from sync early patch to to syslog instead of stderr.
- Make time to wake up before a timer configurable.
- Enable shutdown script by default.


vdr-1.4.7-syncearly-syslog.patch:

--- NEW FILE vdr-1.4.7-syncearly-syslog.patch ---
diff -up vdr-1.4.7/remux.c~ vdr-1.4.7/remux.c
--- vdr-1.4.7/remux.c~	2008-03-16 12:25:07.000000000 +0200
+++ vdr-1.4.7/remux.c	2008-03-16 12:26:23.000000000 +0200
@@ -2111,7 +2111,7 @@ uchar *cRemux::Get(int &Count, uchar *Pi
                         synced = true;
                         if (pt == I_FRAME) // syncEarly: it's ok but there is no need to call SetBrokenLink()
                            SetBrokenLink(data + i, l);
-else fprintf(stderr, "video: synced early\n");
+else dsyslog("video: synced early");
                         }
                      }
                   else if (Count)
@@ -2130,7 +2130,7 @@ else fprintf(stderr, "video: synced earl
                         *PictureType = I_FRAME;
                      resultSkipped = i; // will drop everything before this position
                      synced = true;
-if (!isRadio) fprintf(stderr, "audio: synced early\n");
+if (!isRadio) dsyslog("audio: synced early");
                      }
                   else if (Count)
                      return resultData;


Index: vdr-runvdr.sh
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr-runvdr.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vdr-runvdr.sh	17 Feb 2008 20:25:39 -0000	1.4
+++ vdr-runvdr.sh	17 Mar 2008 19:53:15 -0000	1.5
@@ -74,6 +74,7 @@
             ulimit -S -c $DAEMON_COREFILE_LIMIT >/dev/null 2>&1 && \
                 cd ${TMPDIR:-/tmp}
         fi
+        export VDR_WAKEUP_BEFORE_RECORDING
         build_cmdline
     fi
 


Index: vdr-shutdown.sh
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr-shutdown.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vdr-shutdown.sh	2 Jan 2007 20:25:47 -0000	1.2
+++ vdr-shutdown.sh	17 Mar 2008 19:53:15 -0000	1.3
@@ -7,18 +7,21 @@
 # thus getting the system to wake up at the correct time.
 
 # How many minutes before the next timer event should the system wake up,
-# ie. how long does it take to boot until VDR is running?
-delay=3
+# ie. how long does it take to boot until VDR is running and ready to record?
+# Some CI/CAM's take a long time to initialize so we use a pretty generous
+# value here by default.
+
+mins=${VDR_WAKEUP_BEFORE_RECORDING:-30}
 
 file=/var/lib/vdr/acpi-wakeup
 rm -f $file
 
 if [ ${1:-0} -gt 0 -a -e /proc/acpi/alarm ] ; then
-    date -d "1970-01-01 UTC $1 sec -$delay min" +"%Y-%m-%d %H:%M:%S" > $file
+    date -d "1970-01-01 UTC $1 sec -$mins min" +"%Y-%m-%d %H:%M:%S" > $file
 fi
 
 # In order to make this work, the vdr user needs to be allowed to run
-# /sbin/shutdown -h now with sudo as root, without giving a password and
+# "/sbin/shutdown -h now" with sudo as root, without entering a password and
 # without a tty.  Example sudoers(5) configuration to accomplish that:
 #     Defaults:vdr    !requiretty
 #     vdr             ALL = (root) NOPASSWD: /sbin/shutdown -h now


Index: vdr.init
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.init,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vdr.init	17 Feb 2008 20:25:39 -0000	1.6
+++ vdr.init	17 Mar 2008 19:53:15 -0000	1.7
@@ -61,9 +61,15 @@
 
 stop() {
     echo -n $"Stopping Video Disk Recorder ($prog): "
+
+    # Kill runvdr so it won't cause a restart in case of problems at shutdown.
+    killproc $runner >/dev/null
+
     # Shutdown can be a bit slow sometimes with some plugins or lots of them,
     # so let's give it some time and a chance to go down gracefully.
+    # TODO: make this configurable
     killproc -d 7 $prog
+
     retval=$?
     echo
     [ $retval -eq 0 ] && rm -f $lockfile


Index: vdr.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vdr.spec	20 Feb 2008 15:53:56 -0000	1.21
+++ vdr.spec	17 Mar 2008 19:53:15 -0000	1.22
@@ -19,7 +19,7 @@
 
 Name:           vdr
 Version:        1.4.7
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        Video Disk Recorder
 
 Group:          Applications/Multimedia
@@ -55,6 +55,7 @@
 Patch8:         %{name}-1.4.7-hlcutter-0.2.0.diff
 Patch9:         %{name}-1.4.7-hlcutter-0.2.0-finnish.patch
 Patch10:        %{name}-1.4.7-gcc43.patch
+Patch11:        %{name}-1.4.7-syncearly-syslog.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libjpeg-devel
@@ -147,6 +148,7 @@
 %patch8 -p0
 %patch9 -p0
 %patch10 -p1
+%patch11 -p1
 
 # Fix up paths
 sed -i \
@@ -451,6 +453,13 @@
 %endif
 
 %changelog
+* Sun Mar 16 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.4.7-11
+- Kill runvdr before vdr in init script's "stop" action in order to prevent
+  it from restarting vdr in case something goes wrong when shutting down.
+- Direct debug messages from sync early patch to to syslog instead of stderr.
+- Make time to wake up before a timer configurable.
+- Enable shutdown script by default.
+
 * Wed Feb 20 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.4.7-10
 - Rebuild.
 


Index: vdr.sysconfig
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.sysconfig,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vdr.sysconfig	20 Jan 2008 22:07:12 -0000	1.4
+++ vdr.sysconfig	17 Mar 2008 19:53:15 -0000	1.5
@@ -1,9 +1,13 @@
 # System configuration for VDR                                       -*- sh -*-
 
 # The "master" options.  Some examples of options you may want to set
-# here are -r, -s, -t, and --rcu.  See the vdr(8) man page for more info.
+# here are -r, -t, and --rcu.  See the vdr(8) man page for more info.
 #
-VDR_OPTIONS=(--lirc --vfat)
+# The default shutdown script (/usr/lib*/vdr/bin/vdr-shutdown.sh) needs
+# sudo(8) configuration to work as expected, see the script source for
+# details.
+#
+VDR_OPTIONS=(--lirc --vfat -s vdr-shutdown.sh)
 
 # VDR_PLUGIN_ORDER is a space separated list of plugins that should be
 # loaded in a specific order.  This affects eg. the order the plugins'
@@ -50,6 +54,13 @@
 #
 PATH="/usr/lib/vdr/bin:$PATH"
 
+# How many minutes before a recording should the VDR box wake up?
+# Some CI/CAM combinations can take quite a long time to initialize, so
+# we default to a pretty generous value here.
+#
+VDR_WAKEUP_BEFORE_RECORDING=30
+
 # For debugging: allow vdr to dump core.  Note that depending on the operating
 # environment, core dumps from setuid processes may be a security issue.
+#
 #DAEMON_COREFILE_LIMIT="unlimited"




More information about the fedora-extras-commits mailing list