mythtv: Strange init.d/pidfile permissions problems on jessi…

Top Page

Reply to this message
Author: Stephan Sürken
Date:  
To: Debian Multimedia Discussion
Subject: mythtv: Strange init.d/pidfile permissions problems on jessie
Hi Christian,

in jessie "/var/run/mythtv/" seems to pre-exists at boot time with the
"x" flag missing at the time the init script runs:

drw-r-xr-x 2 mythtv root 40 May 10 12:41 .

-- which makes the backend fail to start (pidfile perms).

Attached patch 0007 has the obvious workaround for that.

Any idea what causes this?

Thx!

S

Btw, you may check if would consider any of the other patches, too...

From 85a6c9d643078af69e66f38149d0c442d0c39172 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Wed, 10 Apr 2013 16:27:28 +0200
Subject: [PATCH 1/7] debian/control: mythlogserver: Recommned logrotate >=
3.8.0 (needed for the 'su' option).

(cherry picked from commit 7365398c8f8f7b385dc5f9f31f5a73af444f5ca4)
---
debian/control | 1 +
1 file changed, 1 insertion(+)

diff --git a/debian/control b/debian/control
index f8de9ef..5515bd9 100644
--- a/debian/control
+++ b/debian/control
@@ -140,6 +140,7 @@ Description: Personal video recorder application (client)
Package: mythlogserver
Architecture: any
Depends: mythtv-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, rsyslog | system-log-daemon
+Recommends: logrotate (>= 3.8.0)
Description: MythTV log messages server
Log messages generated by MythTV programs are sent to mythlogserver which
distributes them based on the --syslog, and --logpath command line options
--
2.1.4

From 841844fec2674449070a0d2211c05e3d8cfd0de6 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Tue, 8 Jan 2013 22:03:22 +0000
Subject: [PATCH 2/7] debian/control: Change libcec1-dev back to libcec-dev
(use Debian libcec, not mm).

(cherry picked from commit 97b753f8ba135c0df89c0116ee8e19ad8602da1b)
---
debian/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 5515bd9..8aadec7 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 9),libmp3lame-dev, libxext-dev, libvorbis-dev,
libavc1394-dev [linux-any], libfaad-dev, liblircclient-dev, libsamplerate0-dev,
libasound2-dev [linux-any], libxinerama-dev, libdts-dev, quilt, libtag1-dev,
libiec61883-dev (>= 1.0.0) [linux-any], libxxf86vm-dev, po-debconf,
- libxvmc-dev, libdvdnav-dev, texi2html, ccache, libssl-dev, libcec1-dev (>= 1.5),
+ libxvmc-dev, libdvdnav-dev, texi2html, ccache, libssl-dev, libcec-dev (>= 1.5),
yasm [any-amd64 any-i386], libxrandr-dev, libfftw3-dev, dh-autoreconf,
libfaac-dev, libfribidi-dev, libxml2-dev, libgl1-mesa-dev | libgl-dev,
liba52-0.7.4-dev, libxvidcore-dev, xserver-xorg-video-openchrome [any-amd64],
--
2.1.4

From 3c80b5b0e94e965122248b81e9abee2d8c97c131 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Tue, 18 Dec 2012 21:33:45 +0100
Subject: [PATCH 3/7] debian/control: b-d: libvpx-dev (>= 0.9.6)

(cherry picked from commit 0441d47a818224237ada1f3ce328ca836f1694fa)
---
debian/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 8aadec7..01d75eb 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Build-Depends: debhelper (>= 9),libmp3lame-dev, libxext-dev, libvorbis-dev,
libpulse-dev, libvdpau-dev [any-amd64 any-i386], libqt4-opengl-dev (>= 4.5),
libdirectfb-dev, distcc [mipsel armel mips], libsdl-dev [!armel], uuid-dev,
libva-dev [any-amd64 any-i386], libqtwebkit-dev, libx264-dev (>= 3:0.144~),
- libvpx-dev, libass-dev (>= 0.10.2), libavahi-compat-libdnssd-dev, libsdl1.2-dev,
+ libvpx-dev (>= 0.9.6), libass-dev (>= 0.10.2), libavahi-compat-libdnssd-dev, libsdl1.2-dev,
libcrystalhd-dev [any-amd64 i386], python | python-all | python-dev | python-all-dev,
libqjson-dev, libhdhomerun-dev, libtool-bin

--
2.1.4

From 1dbc286f35bd734bedbc2d280ccf7e5ed674a5dd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Thu, 18 Apr 2013 13:10:42 +0200
Subject: [PATCH 4/7] debian/control: libcrystalhd-dev (>= 1:0.0~git20110715).

(cherry picked from commit 1c359eff1b2bbdf598df159bc47e4e90d3ac1f3b)
---
debian/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 01d75eb..6c8daa5 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Build-Depends: debhelper (>= 9),libmp3lame-dev, libxext-dev, libvorbis-dev,
libdirectfb-dev, distcc [mipsel armel mips], libsdl-dev [!armel], uuid-dev,
libva-dev [any-amd64 any-i386], libqtwebkit-dev, libx264-dev (>= 3:0.144~),
libvpx-dev (>= 0.9.6), libass-dev (>= 0.10.2), libavahi-compat-libdnssd-dev, libsdl1.2-dev,
- libcrystalhd-dev [any-amd64 i386], python | python-all | python-dev | python-all-dev,
+ libcrystalhd-dev (>= 1:0.0~git20110715) [any-amd64 i386], python | python-all | python-dev | python-all-dev,
libqjson-dev, libhdhomerun-dev, libtool-bin

Package: mythtv
--
2.1.4

From 4cbb85260cacc6044c7fe09efb4d5e7540a70f7a Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Tue, 23 Oct 2012 16:39:02 +0200
Subject: [PATCH 5/7] debian/rules, debian/patches: Don't use ccache
explicitly.

(cherry picked from commit 6ac5ac93d0b197f11cd4aeef062b823ba1b45b31)
---
 debian/patches/series | 2 +-
 debian/rules          | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/debian/patches/series b/debian/patches/series
index f2e4d0c..7c723bd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
01_FTBFS.diff
02_LDFLAGS.diff
03_python.diff
-04_zeromq-ccache.diff
+#04_zeromq-ccache.diff
05_use-system-libs.diff
06_bug-mythtv-10080.diff
diff --git a/debian/rules b/debian/rules
index 922d7a3..cb30f7b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -43,8 +43,8 @@ endif

CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)

-CC := ccache $(CC)
-CXX := ccache $(CXX)
+#CC := ccache $(CC)
+#CXX := ccache $(CXX)

# grep MYTH_BINARY_VERSION libs/libmythbase/mythversion.h
# 0.27.20141016-1 as 0.27.4+fixes20141029
--
2.1.4

From 5c46eda840c3708d7620b104eec260b712dcc93d Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Thu, 1 Jan 2015 02:33:14 +0000
Subject: [PATCH 6/7] debian/control: [wheezy] Remove versioned b-d >=3:0.144~
on libx264 (not in wheezy, not in Debian).

---
debian/control | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 6c8daa5..85bdc49 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Build-Depends: debhelper (>= 9),libmp3lame-dev, libxext-dev, libvorbis-dev,
liba52-0.7.4-dev, libxvidcore-dev, xserver-xorg-video-openchrome [any-amd64],
libpulse-dev, libvdpau-dev [any-amd64 any-i386], libqt4-opengl-dev (>= 4.5),
libdirectfb-dev, distcc [mipsel armel mips], libsdl-dev [!armel], uuid-dev,
- libva-dev [any-amd64 any-i386], libqtwebkit-dev, libx264-dev (>= 3:0.144~),
+ libva-dev [any-amd64 any-i386], libqtwebkit-dev, libx264-dev,
libvpx-dev (>= 0.9.6), libass-dev (>= 0.10.2), libavahi-compat-libdnssd-dev, libsdl1.2-dev,
libcrystalhd-dev (>= 1:0.0~git20110715) [any-amd64 i386], python | python-all | python-dev | python-all-dev,
libqjson-dev, libhdhomerun-dev, libtool-bin
--
2.1.4

From 6d197e90277777fc006faf0a5a3f6d87d7768423 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stephan=20S=C3=BCrken?= <absurd@???>
Date: Sun, 10 May 2015 10:02:03 +0000
Subject: [PATCH 7/7] debian/mythtv-backend.init: Workaround for the
jessie/pidfile issue.

---
debian/mythtv-backend.init | 2 ++
1 file changed, 2 insertions(+)
mode change 100644 => 100755 debian/mythtv-backend.init

diff --git a/debian/mythtv-backend.init b/debian/mythtv-backend.init
old mode 100644
new mode 100755
index b62e5b5..9136100
--- a/debian/mythtv-backend.init
+++ b/debian/mythtv-backend.init
@@ -41,6 +41,8 @@ ARGS="$ARGS $EXTRA_ARGS"

mkdir -p $RUNDIR
chown -R $USER $RUNDIR
+# BUG workaround: RUNDIR misses the "x" flag when created on bootup (why?), making this fail
+chmod u=rwx $RUNDIR

unset DISPLAY
unset SESSION_MANAGER
--
2.1.4