Bug#863085: unblock: dante/1.4.1+dfsg-5 [preapproval, RC]

2017-05-23 Thread Peter Pentchev
control: tags -1 - moreinfo

On Tue, May 23, 2017 at 05:37:00AM +, Niels Thykier wrote:
> Control: tags -1 confirmed
> 
> Peter Pentchev:
> > On Mon, May 22, 2017 at 06:15:00AM +, Niels Thykier wrote:
> >> Control: tags -1 moreinfo
> >>
> >> [...]
> > 
> > Thanks for the quick reply!
> > 
> > The error handler is invoked for systemd services, too - it's part of
> > an "invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#" command, and invoke-rc.d
> > takes care of starting the service in the init-system-dependent way.
> > With systemd (as tested using strace on my laptop), invoke-rc.d runs
> > systemctl directly (after checking for /run/systemd/system), and that's
> > how we get to the systemd service failure.  On a SysV init system,
> > invoke-rc.d would have invoked /etc/init.d/danted with the same result.
> > 
> > Even if invoke-rc.d did not know about systemctl, it would still have tried
> > to run /etc/init.d/danted start, and then the systemd redirection in
> > /lib/lsb/init-functions.d/40-systemd would have still started the systemd
> > service.
> 
> Ack, please go ahead and remove the moreinfo tag once the package has
> been uploaded and built on all relevant release architectures.

OK, it's done.  Still FTBFS on the Hurd, I have an idea how to fix it,
but it'll happen after the release.

unblock dante/1.4.1+dfsg-5

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Bug#863085: unblock: dante/1.4.1+dfsg-5 [preapproval, RC]

2017-05-22 Thread Niels Thykier
Control: tags -1 confirmed

Peter Pentchev:
> On Mon, May 22, 2017 at 06:15:00AM +, Niels Thykier wrote:
>> Control: tags -1 moreinfo
>>
>> [...]
> 
> Thanks for the quick reply!
> 
> The error handler is invoked for systemd services, too - it's part of
> an "invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#" command, and invoke-rc.d
> takes care of starting the service in the init-system-dependent way.
> With systemd (as tested using strace on my laptop), invoke-rc.d runs
> systemctl directly (after checking for /run/systemd/system), and that's
> how we get to the systemd service failure.  On a SysV init system,
> invoke-rc.d would have invoked /etc/init.d/danted with the same result.
> 
> Even if invoke-rc.d did not know about systemctl, it would still have tried
> to run /etc/init.d/danted start, and then the systemd redirection in
> /lib/lsb/init-functions.d/40-systemd would have still started the systemd
> service.
> 
> G'luck,
> Peter
> 

Ack, please go ahead and remove the moreinfo tag once the package has
been uploaded and built on all relevant release architectures.

Thanks,
~Niels



Bug#863085: unblock: dante/1.4.1+dfsg-5 [preapproval, RC]

2017-05-22 Thread Peter Pentchev
On Mon, May 22, 2017 at 06:15:00AM +, Niels Thykier wrote:
> Control: tags -1 moreinfo
> 
> Peter Pentchev:
> > Package: release.debian.org
> > Severity: normal
> > User: release.debian@packages.debian.org
> > Usertags: unblock
> > 
> > Hi,
> > 
> > This is a pre-approval request for dante to fix a long-standing
> > bug that makes the first installation of the dante-server binary
> > package fail, since the dante-server service cannot possibly be
> > started with the default config file.  The bug - #862988 - was
> > reported as "important", but I raised its priority to "serious",
> > and I should have fixed it a long time ago.
> > 
> > I'm attaching the proposed debdiff, a targeted fix that lets
> > the initial installation succeed even though the service fails
> > to start.  If it is approved, I'll upload the package and let
> > you know when the time comes to really unblock it.
> > 
> > Thanks in advance for your time!
> > 
> > G'luck,
> > Peter
> > 
> > [...]
> 
> Hi,
> 
> The debdiff adds an error handler for the postinst script generated by
> dh_installinit.  But the error seen in the bug (#862988) shows an error
> for starting the service via systemd.
> 
> I do not understand how adding an error handler for the sysvinit script
> would fix that bug.  Could you perhaps help me spot what I am missing?

Thanks for the quick reply!

The error handler is invoked for systemd services, too - it's part of
an "invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#" command, and invoke-rc.d
takes care of starting the service in the init-system-dependent way.
With systemd (as tested using strace on my laptop), invoke-rc.d runs
systemctl directly (after checking for /run/systemd/system), and that's
how we get to the systemd service failure.  On a SysV init system,
invoke-rc.d would have invoked /etc/init.d/danted with the same result.

Even if invoke-rc.d did not know about systemctl, it would still have tried
to run /etc/init.d/danted start, and then the systemd redirection in
/lib/lsb/init-functions.d/40-systemd would have still started the systemd
service.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Bug#863085: unblock: dante/1.4.1+dfsg-5 [preapproval, RC]

2017-05-22 Thread Niels Thykier
Control: tags -1 moreinfo

Peter Pentchev:
> Package: release.debian.org
> Severity: normal
> User: release.debian@packages.debian.org
> Usertags: unblock
> 
> Hi,
> 
> This is a pre-approval request for dante to fix a long-standing
> bug that makes the first installation of the dante-server binary
> package fail, since the dante-server service cannot possibly be
> started with the default config file.  The bug - #862988 - was
> reported as "important", but I raised its priority to "serious",
> and I should have fixed it a long time ago.
> 
> I'm attaching the proposed debdiff, a targeted fix that lets
> the initial installation succeed even though the service fails
> to start.  If it is approved, I'll upload the package and let
> you know when the time comes to really unblock it.
> 
> Thanks in advance for your time!
> 
> G'luck,
> Peter
> 
> [...]

Hi,

The debdiff adds an error handler for the postinst script generated by
dh_installinit.  But the error seen in the bug (#862988) shows an error
for starting the service via systemd.

I do not understand how adding an error handler for the sysvinit script
would fix that bug.  Could you perhaps help me spot what I am missing?

Thanks,
~Niels



Bug#863085: unblock: dante/1.4.1+dfsg-5 [preapproval, RC]

2017-05-21 Thread Peter Pentchev
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

Hi,

This is a pre-approval request for dante to fix a long-standing
bug that makes the first installation of the dante-server binary
package fail, since the dante-server service cannot possibly be
started with the default config file.  The bug - #862988 - was
reported as "important", but I raised its priority to "serious",
and I should have fixed it a long time ago.

I'm attaching the proposed debdiff, a targeted fix that lets
the initial installation succeed even though the service fails
to start.  If it is approved, I'll upload the package and let
you know when the time comes to really unblock it.

Thanks in advance for your time!

G'luck,
Peter

-- System Information:
Debian Release: 9.0
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru dante-1.4.1+dfsg/debian/changelog dante-1.4.1+dfsg/debian/changelog
--- dante-1.4.1+dfsg/debian/changelog   2017-01-12 13:07:24.0 +0200
+++ dante-1.4.1+dfsg/debian/changelog   2017-05-21 17:23:27.0 +0300
@@ -1,3 +1,12 @@
+dante (1.4.1+dfsg-5) unstable; urgency=medium
+
+  * Add an error handler to the post-install startup of dante-server so
+that it doesn't make the package installation fail if danted.conf
+has not been customized yet (i.e. always on first installation).
+Closes: #862988
+
+ -- Peter Pentchev   Sun, 21 May 2017 17:23:27 +0300
+
 dante (1.4.1+dfsg-4) unstable; urgency=medium
 
   * Add the 25-path-max patch as a temporary band-aid for building Dante
diff -Nru dante-1.4.1+dfsg/debian/dante-server.postinst 
dante-1.4.1+dfsg/debian/dante-server.postinst
--- dante-1.4.1+dfsg/debian/dante-server.postinst   1970-01-01 
02:00:00.0 +0200
+++ dante-1.4.1+dfsg/debian/dante-server.postinst   2017-05-21 
12:20:51.0 +0300
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+dante_service_error()
+{
+   local res="$?" conffile='/etc/danted.conf' notfound='' var
+   for var in internal external; do
+   if ! egrep -qe '^[[:space:]]*'"$var"'[[:space:]]*:' -- 
"$conffile"; then
+   notfound="$notfound $var"
+   fi
+   done
+   if [ -n "$notfound" ]; then
+   echo "Please edit the Dante server config file $conffile and 
specify at least the following directives:$notfound" 1>&2
+   else
+   # The required directives are specified, so propagate the error
+   exit "$res"
+   fi
+}
+
+#DEBHELPER#
diff -Nru dante-1.4.1+dfsg/debian/dante-server.prerm 
dante-1.4.1+dfsg/debian/dante-server.prerm
--- dante-1.4.1+dfsg/debian/dante-server.prerm  1970-01-01 02:00:00.0 
+0200
+++ dante-1.4.1+dfsg/debian/dante-server.prerm  2017-05-21 12:21:12.0 
+0300
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dante_service_error()
+{
+   exit "$?"
+}
+
+#DEBHELPER#
diff -Nru dante-1.4.1+dfsg/debian/rules dante-1.4.1+dfsg/debian/rules
--- dante-1.4.1+dfsg/debian/rules   2017-01-09 16:54:21.0 +0200
+++ dante-1.4.1+dfsg/debian/rules   2017-05-21 12:14:31.0 +0300
@@ -53,7 +53,7 @@
dh_installchangelogs NEWS
 
 override_dh_installinit:
-   dh_installinit -pdante-server --init-script=danted
+   dh_installinit -pdante-server --init-script=danted 
--error-handler=dante_service_error
 
 %:
dh '$@' --without systemd


signature.asc
Description: PGP signature