Bug#784905: jessie-pu: (preapproval) package qcontrol/0.5.4-1

2015-05-30 Thread Adam D. Barratt
Control: tags -1 + pending

On Sat, 2015-05-30 at 16:58 +0100, Ian Campbell wrote:
 On Thu, 2015-05-28 at 18:55 +0100, Adam D. Barratt wrote:
  Control: tags -1 + confirmed
  
  On Sun, 2015-05-10 at 13:45 +0100, Ian Campbell wrote:
   I'd like to fix #781886 qcontrol failure to start on boot sometimes 
   (jessie,
   systemd?) in Jessie.
[...]
 Thanks I've just uploaded 0.5.4-1+deb8u1 to jessie, debdiff below. I've
 tested it locally on Jessie, although the issue is intermittent.

Flagged for acceptance.

 I should probably have though to mention this before, but src:qcontrol
 does generate udebs, which are included in the d-i initrds. The change
 in question does not impact them at all since they don't start the
 daemon and use qcontrol in one-shot mode only. I've CCd Kibi just in
 case this is an issue.

It doesn't sound like it should be, so I've accepted the package so that
we can get things moving as we're running up on the 8.1 window closure.
If there is something I've missed then apologies and I'll also accept a
revert upload later.

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#784905: jessie-pu: (preapproval) package qcontrol/0.5.4-1

2015-05-30 Thread Ian Campbell
On Thu, 2015-05-28 at 18:55 +0100, Adam D. Barratt wrote:
 Control: tags -1 + confirmed
 
 On Sun, 2015-05-10 at 13:45 +0100, Ian Campbell wrote:
  I'd like to fix #781886 qcontrol failure to start on boot sometimes 
  (jessie,
  systemd?) in Jessie.
  
  The issue is that when running in LSB compat mode the devices may not have 
  been
  created before the initscript runs. This isn't noticed under sysvinit 
  because
  there is an implicit (or perhaps explicit) udev settle somewhere earlier on.
  
  However the proper fix (enabling full systemd support) is IMHO too intrusive
  for a stable update (see below for the full patch in case you disagree). So
  instead I would like to upload a workaround:
 
 Assuming that the workaround has been tested on jessie, please go ahead.

Thanks I've just uploaded 0.5.4-1+deb8u1 to jessie, debdiff below. I've
tested it locally on Jessie, although the issue is intermittent.

I should probably have though to mention this before, but src:qcontrol
does generate udebs, which are included in the d-i initrds. The change
in question does not impact them at all since they don't start the
daemon and use qcontrol in one-shot mode only. I've CCd Kibi just in
case this is an issue.

Ian.

diff -Nru qcontrol-0.5.4/debian/changelog qcontrol-0.5.4/debian/changelog
--- qcontrol-0.5.4/debian/changelog 2014-04-11 17:40:46.0 +0100
+++ qcontrol-0.5.4/debian/changelog 2015-05-30 13:35:38.0 +0100
@@ -1,3 +1,11 @@
+qcontrol (0.5.4-1+deb8u1) jessie; urgency=medium
+
+  * Wait for necessary devices to appear before starting.
+(Closes: #781886). This works around an issue exposed by systemd LSB
+compatibility mode. Proper systemd support will come later.
+
+ -- Ian Campbell i...@debian.org  Sat, 30 May 2015 13:35:21 +0100
+
 qcontrol (0.5.4-1) unstable; urgency=low
 
   * New upstream release 0.5.4.
diff -Nru qcontrol-0.5.4/debian/qcontrol.qcontrold.init 
qcontrol-0.5.4/debian/qcontrol.qcontrold.init
--- qcontrol-0.5.4/debian/qcontrol.qcontrold.init   2013-10-20 
10:12:28.0 +0100
+++ qcontrol-0.5.4/debian/qcontrol.qcontrold.init   2015-05-30 
13:35:38.0 +0100
@@ -38,6 +38,11 @@
 
 case $1 in
 start)
+   # Ensure that /dev/input/by-path/platform-gpio-keys-event has
+   # arrived. Under systemd LSB compatibility mode it may not
+   # have yet.
+   udevadm settle
+
log_daemon_msg Starting qcontrol daemon qcontrol
if start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- -d; then
log_end_msg 0



signature.asc
Description: This is a digitally signed message part


Bug#784905: jessie-pu: (preapproval) package qcontrol/0.5.4-1

2015-05-28 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Sun, 2015-05-10 at 13:45 +0100, Ian Campbell wrote:
 I'd like to fix #781886 qcontrol failure to start on boot sometimes (jessie,
 systemd?) in Jessie.
 
 The issue is that when running in LSB compat mode the devices may not have 
 been
 created before the initscript runs. This isn't noticed under sysvinit because
 there is an implicit (or perhaps explicit) udev settle somewhere earlier on.
 
 However the proper fix (enabling full systemd support) is IMHO too intrusive
 for a stable update (see below for the full patch in case you disagree). So
 instead I would like to upload a workaround:

Assuming that the workaround has been tested on jessie, please go ahead.

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#784905: jessie-pu: (preapproval) package qcontrol/0.5.4-1

2015-05-19 Thread Ian Campbell
On Sun, 2015-05-10 at 13:45 +0100, Ian Campbell wrote:
 I'm thinking that the best way to approach this would be to upload the
 workaround to Sid and wait for it to propagate to Stretch, so it gets some
 degree of real world testing and then upload the workaround upload to 
 Jessie-pu
 and carry on with the proper fix in Sid+Stretch (and probably 
 jessie-backports).

FYI the workaround reach Stretch in qcontrol 0.5.4-2.

Ian.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#784905: jessie-pu: (preapproval) package qcontrol/0.5.4-1

2015-05-10 Thread Ian Campbell
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian@packages.debian.org
Usertags: pu

I'd like to fix #781886 qcontrol failure to start on boot sometimes (jessie,
systemd?) in Jessie.

The issue is that when running in LSB compat mode the devices may not have been
created before the initscript runs. This isn't noticed under sysvinit because
there is an implicit (or perhaps explicit) udev settle somewhere earlier on.

However the proper fix (enabling full systemd support) is IMHO too intrusive
for a stable update (see below for the full patch in case you disagree). So
instead I would like to upload a workaround:

diff --git a/debian/qcontrol.qcontrold.init b/debian/qcontrol.qcontrold.init
index ccbcb22..55bd5a1 100644
--- a/debian/qcontrol.qcontrold.init
+++ b/debian/qcontrol.qcontrold.init
@@ -38,6 +38,11 @@ set -e
 
 case $1 in
 start)
+   # Ensure that /dev/input/by-path/platform-gpio-keys-event has
+   # arrived. Under systemd LSB compatibility mode it may not
+   # have yet.
+   udevadm settle
+
log_daemon_msg Starting qcontrol daemon qcontrol
if start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- -d; then
log_end_msg 0

I'm thinking that the best way to approach this would be to upload the
workaround to Sid and wait for it to propagate to Stretch, so it gets some
degree of real world testing and then upload the workaround upload to Jessie-pu
and carry on with the proper fix in Sid+Stretch (and probably jessie-backports).

How does that sound?

Cheers,
Ian.

The full/proper fix (WIP) for Stretch, FYI (note that the build will autodetect
libsystemd-daemon-dev and enable some runtime support too):

diff --git a/debian/changelog b/debian/changelog
index 1b44c08..c4fb6ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 qcontrol (0.5.4-2) UNRELEASED; urgency=medium
 
   * Update Vcs-* to point to anonscm.
+  * Install and enable systemd unit files and corresponding udev rule.
+(Closes: #781886)
 
  -- Ian Campbell i...@debian.org  Sun, 14 Sep 2014 16:07:45 +0100
 
diff --git a/debian/control b/debian/control
index 573697f..7fa8ebc 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: qcontrol
 Section: utils
 Priority: optional
 Maintainer: Ian Campbell i...@debian.org
-Build-Depends: debhelper (= 9), liblua5.1-0-dev, pkg-config
+Build-Depends: debhelper (= 9), libsystemd-daemon-dev, dh-systemd, 
liblua5.1-0-dev, pkg-config
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/collab-maint/qcontrol.git
 Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/qcontrol.git
diff --git a/debian/qcontrol.install b/debian/qcontrol.install
index ab7899e..25d1727 100644
--- a/debian/qcontrol.install
+++ b/debian/qcontrol.install
@@ -1 +1,4 @@
-qcontrol   usr/sbin/
+qcontrol   usr/sbin/
+systemd/qcontrold.service  lib/systemd/system/
+systemd/qcontrold.socket   lib/systemd/system/
+systemd/qcontrol.service   lib/systemd/system/
diff --git a/debian/qcontrol.rules b/debian/qcontrol.rules
new file mode 100644
index 000..6fdab10
--- /dev/null
+++ b/debian/qcontrol.rules
@@ -0,0 +1,3 @@
+# qcontrold.socket requires notification of
+# /dev/input/by-path/platform-gpio-keys-event's arrival
+KERNELS==gpio-keys, SUBSYSTEMS==platform, DRIVERS==gpio-keys, 
TAG+=systemd
diff --git a/debian/rules b/debian/rules
index 9b88a50..a1ba03e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,11 +12,15 @@ UDEB_DIRS   = lib/debian-installer-startup.d \
 CONFIGS= ts209.lua ts219.lua ts409.lua ts41x.lua
 
 %:
-   dh $@
+   dh $@ --with systemd
 
 override_dh_auto_install:
dh_install
 
+   install -d debian/$(PACKAGE)/lib/udev/rules.d
+   install -m0644 debian/qcontrol.rules \
+   debian/$(PACKAGE)/lib/udev/rules.d/60-qcontrol.rules
+
# Install the following manually as they need a rename
@set -ex; $(foreach PACKAGE, $(PACKAGES), \
$(foreach CONFIG, $(CONFIGS), \


-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf, armel

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org