Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2016-03-02 Thread Anton Zinoviev
On Mon, Feb 29, 2016 at 04:41:41PM -0300, Felipe Sateler wrote:
> On 29 February 2016 at 15:22, Anton Zinoviev  wrote:
>
> > this script will move out of runlevel S on Linux and on FreeBSD there is no 
> > systemd.
> 
> Interesting. Why is it no longer required during early boot?

Because Udev scripts will be used.  Normally this script is not going to 
configure anything and its main function will be to keep the files in 
/etc/console-setup in good shape.

Anton Zinoviev



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2016-02-29 Thread Felipe Sateler
On 29 February 2016 at 15:22, Anton Zinoviev  wrote:
> On Mon, Feb 29, 2016 at 09:54:23AM -0300, Felipe Sateler wrote:
>>
>> On Mon, 22 Feb 2016 19:33:28 +0300 Anton Zinoviev  wrote:
>> > tags 796603 + help patch
>>
>> I see you tagged this bug help. What can I do to help move this forward?
>
> Thank you.  In the new version I am preparing now (should be ready in a
> couple of days), this script will move out of runlevel S on Linux and on
> FreeBSD there is no systemd.

Interesting. Why is it no longer required during early boot?

> So it seems there will be no need for a
> systemd service unit.

Well, that depends on the value of "need" ;).  A systemd unit would
still be useful, as it allows better tracking by systemd of the
process. I can submit a systemd unit, after I see the end result of
this rework you are doing now.


-- 

Saludos,
Felipe Sateler



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2016-02-29 Thread Anton Zinoviev
tags 796603 -help
thanks

On Mon, Feb 29, 2016 at 09:54:23AM -0300, Felipe Sateler wrote:
> 
> On Mon, 22 Feb 2016 19:33:28 +0300 Anton Zinoviev  wrote:
> > tags 796603 + help patch
> 
> I see you tagged this bug help. What can I do to help move this forward?

Thank you.  In the new version I am preparing now (should be ready in a 
couple of days), this script will move out of runlevel S on Linux and on 
FreeBSD there is no systemd.  So it seems there will be no need for a 
systemd service unit.

Anton Zinoviev



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2016-02-29 Thread Felipe Sateler
Hi Anton,

On Mon, 22 Feb 2016 19:33:28 +0300 Anton Zinoviev  wrote:
> tags 796603 + help patch

I see you tagged this bug help. What can I do to help move this forward?


-- 
Saludos,
Felipe Sateler



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-11-03 Thread Felipe Sateler
On 10 October 2015 at 09:54, Felipe Sateler  wrote:
> Control: tags -1 patch
>
> Missed the bug cc, sorry for the duplicate.
>
> On 1 September 2015 at 17:54, Michael Biebl  wrote:
>> Am 01.09.2015 um 19:38 schrieb Felipe Sateler:
>>> On 1 September 2015 at 14:05, Anton Zinoviev  wrote:
 On Thu, Aug 27, 2015 at 03:18:17PM -0300, Felipe Sateler wrote:
>
> Does console-setup actually need to be run before user services are
> started? My guess is that it only needs to run before getty, but it
> should not block other services that want to start.

 It should run before fsck.
>>>
>>> That is definitely not what the init script says[1]:
>>>
>>> # Provides:  console-setup
>>> # Required-Start:$remote_fs
>>
>> Right, the $remote_fs dependency means it's actually started pretty late.
>> I guess what Anton meant was keyboard-setup.
>
> OK, so I added 2 service files, and preserved the early startup. However:
>
> 1. keyboard-setup is setup very early at boot, before
> local-fs-pre.target so that it occurs before fsck (at least the ones
> that don't happen in the initrd).
> 2. The ordering on console-setup is relaxed so that it starts early,
> but after /usr and /usr/local are mounted and the root fs is remounted
> (so that it can be saved in /etc). At the same time, this will not
> delay any further services except the gettys by being
> Before=system-getty.slice (BTW, maybe we need a getty-pre.target?).

I have attached a new version. Changes:

1. Add ConditionPathExists (because the service is shipped in another package).
2. Add RemainAfterExit=yes. I was getting the service started multiple
times during boot.


-- 

Saludos,
Felipe Sateler
From 7bf25445c6c72e532235448e9342572a138cbccf Mon Sep 17 00:00:00 2001
From: Felipe Sateler 
Date: Sat, 10 Oct 2015 08:40:50 -0300
Subject: [PATCH] Add systemd units

---
 debian/changelog |  7 +++
 debian/keyboard-configuration.console-setup.service  | 16 
 debian/keyboard-configuration.keyboard-setup.service | 16 
 debian/rules |  8 
 4 files changed, 47 insertions(+)
 create mode 100644 debian/keyboard-configuration.console-setup.service
 create mode 100644 debian/keyboard-configuration.keyboard-setup.service

diff --git a/debian/changelog b/debian/changelog
index 8c7915f..0a63688 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+console-setup (1.134+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add systemd units
+
+ -- Felipe Sateler   Thu, 08 Oct 2015 20:18:37 -0300
+
 console-setup (1.134) unstable; urgency=medium
 
   [ Colin Watson ]
diff --git a/debian/keyboard-configuration.console-setup.service b/debian/keyboard-configuration.console-setup.service
new file mode 100644
index 000..d75c3dd
--- /dev/null
+++ b/debian/keyboard-configuration.console-setup.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Set console font and keymap
+DefaultDependencies=no
+After=console-screen.service kbd.service local-fs.target
+Before=system-getty.slice
+RequiresMountsFor=/usr /usr/local
+ConditionPathExists=/bin/setupcon
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/locale
+ExecStart=/bin/setupcon --save
+RemainAfterExit=yes
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/keyboard-configuration.keyboard-setup.service b/debian/keyboard-configuration.keyboard-setup.service
new file mode 100644
index 000..946b91f
--- /dev/null
+++ b/debian/keyboard-configuration.keyboard-setup.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Set preliminary keymap
+DefaultDependencies=no
+Before=local-fs-pre.target
+Wants=local-fs-pre.target
+After=udev.service keymap.service
+ConditionPathExists=/bin/setupcon
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/locale
+ExecStart=/bin/setupcon --keyboard-only
+RemainAfterExit=yes
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/rules b/debian/rules
index d709312..1982d0d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -145,10 +145,18 @@ install-main: build
 		usr/share/console-setup/
 	dh_link -pkeyboard-configuration usr/share/X11/xkb/rules/xorg.lst \
 		usr/share/doc/keyboard-configuration/xorg.lst
+	dh_systemd_enable -pkeyboard-configuration \
+		--name keyboard-setup
+	dh_systemd_enable -pkeyboard-configuration \
+		--name console-setup
 	dh_installinit -pkeyboard-configuration \
 		--no-start --name keyboard-setup -- start 06 S .
 	dh_installinit -pkeyboard-configuration \
 		--no-start --name console-setup -- start 49 S .
+	dh_systemd_start -pkeyboard-configuration \
+		--no-start --name keyboard-setup
+	dh_systemd_start -pkeyboard-configuration \
+		--no-start --name console-setup
 
 .PHONY : install-bdf2psf
 install-bdf2psf: build
-- 
2.6.2



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-10-10 Thread Felipe Sateler
On 10 October 2015 at 09:54, Felipe Sateler  wrote:
> On 1 September 2015 at 17:54, Michael Biebl  wrote:
>> Am 01.09.2015 um 19:38 schrieb Felipe Sateler:
>>> On 1 September 2015 at 14:05, Anton Zinoviev  wrote:
 On Thu, Aug 27, 2015 at 03:18:17PM -0300, Felipe Sateler wrote:
>
> Does console-setup actually need to be run before user services are
> started? My guess is that it only needs to run before getty, but it
> should not block other services that want to start.

 It should run before fsck.
>>>
>>> That is definitely not what the init script says[1]:
>>>
>>> # Provides:  console-setup
>>> # Required-Start:$remote_fs
>>
>> Right, the $remote_fs dependency means it's actually started pretty late.
>> I guess what Anton meant was keyboard-setup.
>
> OK, so I added 2 service files, and preserved the early startup.

On IRC it was pointed out that --save is not necessary under systemd:
/usr must always be mounted. However I decided to preserve it because:

1. I am not 100% sure that /usr is guaranteed to be mounted (the
initrd AFAIK does not handle all cases).
2. On reboot to sysv it would be good to preserve the files in /etc.

If /usr is actually guaranteed to be available, then we should drop
--save from both the init script and service file.

-- 

Saludos,
Felipe Sateler



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-10-10 Thread Josh Triplett
On Sat, 10 Oct 2015 10:59:23 -0300 Felipe Sateler  wrote:
> On IRC it was pointed out that --save is not necessary under systemd:
> /usr must always be mounted. However I decided to preserve it because:
> 
> 1. I am not 100% sure that /usr is guaranteed to be mounted (the
> initrd AFAIK does not handle all cases).

Any case of mounting /usr that the initrd *doesn't* handle should get
filed as a bug against initramfs-tools.

- Josh Triplett



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-10-10 Thread Ben Hutchings
On Sat, 2015-10-10 at 15:05 -0700, Josh Triplett wrote:
> On Sat, 10 Oct 2015 10:59:23 -0300 Felipe Sateler  wrote:
> > On IRC it was pointed out that --save is not necessary under systemd:
> > /usr must always be mounted. However I decided to preserve it because:
> > 
> > 1. I am not 100% sure that /usr is guaranteed to be mounted (the
> > initrd AFAIK does not handle all cases).
> 
> Any case of mounting /usr that the initrd *doesn't* handle should get
> filed as a bug against initramfs-tools.

Unless it's a bug in one of the scripts provided by another package.

Ben.

-- 
Ben Hutchings
It's easier to fight for one's principles than to live up to them.

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


Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-10-10 Thread Josh Triplett
On Sun, Oct 11, 2015 at 12:20:11AM +0100, Ben Hutchings wrote:
> On Sat, 2015-10-10 at 15:05 -0700, Josh Triplett wrote:
> > On Sat, 10 Oct 2015 10:59:23 -0300 Felipe Sateler  
> > wrote:
> > > On IRC it was pointed out that --save is not necessary under systemd:
> > > /usr must always be mounted. However I decided to preserve it because:
> > > 
> > > 1. I am not 100% sure that /usr is guaranteed to be mounted (the
> > > initrd AFAIK does not handle all cases).
> > 
> > Any case of mounting /usr that the initrd *doesn't* handle should get
> > filed as a bug against initramfs-tools.
> 
> Unless it's a bug in one of the scripts provided by another package.

Fair enough, but either way other programs can safely assume /usr gets
mounted along with the root filesystem.

- Josh Triplett



Bug#796603: Fwd: Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-10-10 Thread Felipe Sateler
Control: tags -1 patch

Missed the bug cc, sorry for the duplicate.

On 1 September 2015 at 17:54, Michael Biebl  wrote:
> Am 01.09.2015 um 19:38 schrieb Felipe Sateler:
>> On 1 September 2015 at 14:05, Anton Zinoviev  wrote:
>>> On Thu, Aug 27, 2015 at 03:18:17PM -0300, Felipe Sateler wrote:

 Does console-setup actually need to be run before user services are
 started? My guess is that it only needs to run before getty, but it
 should not block other services that want to start.
>>>
>>> It should run before fsck.
>>
>> That is definitely not what the init script says[1]:
>>
>> # Provides:  console-setup
>> # Required-Start:$remote_fs
>
> Right, the $remote_fs dependency means it's actually started pretty late.
> I guess what Anton meant was keyboard-setup.

OK, so I added 2 service files, and preserved the early startup. However:

1. keyboard-setup is setup very early at boot, before
local-fs-pre.target so that it occurs before fsck (at least the ones
that don't happen in the initrd).
2. The ordering on console-setup is relaxed so that it starts early,
but after /usr and /usr/local are mounted and the root fs is remounted
(so that it can be saved in /etc). At the same time, this will not
delay any further services except the gettys by being
Before=system-getty.slice (BTW, maybe we need a getty-pre.target?).

Review welcome.

-- 

Saludos,
Felipe Sateler
From 7ed5dcd10e76b25304ca2584cd828be4aa61e61c Mon Sep 17 00:00:00 2001
From: Felipe Sateler 
Date: Sat, 10 Oct 2015 08:40:50 -0300
Subject: [PATCH] Add systemd units

---
 debian/changelog |  7 +++
 debian/keyboard-configuration.console-setup.service  | 14 ++
 debian/keyboard-configuration.keyboard-setup.service | 14 ++
 debian/rules |  8 
 4 files changed, 43 insertions(+)
 create mode 100644 debian/keyboard-configuration.console-setup.service
 create mode 100644 debian/keyboard-configuration.keyboard-setup.service

diff --git a/debian/changelog b/debian/changelog
index 73796fb..6b8dae1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+console-setup (1.133+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add systemd units
+
+ -- Felipe Sateler   Thu, 08 Oct 2015 20:18:37 -0300
+
 console-setup (1.133) unstable; urgency=medium
 
   [ Updated translations ]
diff --git a/debian/keyboard-configuration.console-setup.service b/debian/keyboard-configuration.console-setup.service
new file mode 100644
index 000..67af770
--- /dev/null
+++ b/debian/keyboard-configuration.console-setup.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set console font and keymap
+DefaultDependencies=no
+After=console-screen.service kbd.service local-fs.target
+Before=system-getty.slice
+RequiresMountsFor=/usr /usr/local
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/locale
+ExecStart=/bin/setupcon --save
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/keyboard-configuration.keyboard-setup.service b/debian/keyboard-configuration.keyboard-setup.service
new file mode 100644
index 000..d50247b
--- /dev/null
+++ b/debian/keyboard-configuration.keyboard-setup.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set preliminary keymap
+DefaultDependencies=no
+Before=local-fs-pre.target
+Wants=local-fs-pre.target
+After=udev.service keymap.service
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/locale
+ExecStart=/bin/setupcon -k
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/rules b/debian/rules
index d709312..1982d0d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -145,10 +145,18 @@ install-main: build
 		usr/share/console-setup/
 	dh_link -pkeyboard-configuration usr/share/X11/xkb/rules/xorg.lst \
 		usr/share/doc/keyboard-configuration/xorg.lst
+	dh_systemd_enable -pkeyboard-configuration \
+		--name keyboard-setup
+	dh_systemd_enable -pkeyboard-configuration \
+		--name console-setup
 	dh_installinit -pkeyboard-configuration \
 		--no-start --name keyboard-setup -- start 06 S .
 	dh_installinit -pkeyboard-configuration \
 		--no-start --name console-setup -- start 49 S .
+	dh_systemd_start -pkeyboard-configuration \
+		--no-start --name keyboard-setup
+	dh_systemd_start -pkeyboard-configuration \
+		--no-start --name console-setup
 
 .PHONY : install-bdf2psf
 install-bdf2psf: build
-- 
2.6.0



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-09-01 Thread Felipe Sateler
On 1 September 2015 at 14:05, Anton Zinoviev  wrote:
> On Thu, Aug 27, 2015 at 03:18:17PM -0300, Felipe Sateler wrote:
>>
>> Does console-setup actually need to be run before user services are
>> started? My guess is that it only needs to run before getty, but it
>> should not block other services that want to start.
>
> It should run before fsck.

That is definitely not what the init script says[1]:

# Provides:  console-setup
# Required-Start:$remote_fs
# Required-Stop:
# Should-Start:  console-screen kbd
# Default-Start: S

The keyboard-setup script does, though[2]:

# X-Start-Before: checkroot


[1] 
http://sources.debian.net/src/console-setup/1.132/debian/keyboard-configuration.console-setup.init/
[2] 
http://sources.debian.net/src/console-setup/1.132/debian/keyboard-configuration.keyboard-setup.init/
-- 

Saludos,
Felipe Sateler



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-09-01 Thread Anton Zinoviev
On Thu, Aug 27, 2015 at 03:18:17PM -0300, Felipe Sateler wrote:
> 
> Does console-setup actually need to be run before user services are
> started? My guess is that it only needs to run before getty, but it
> should not block other services that want to start.

It should run before fsck.

Anton Zinoviev



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-08-27 Thread Felipe Sateler
On 23 August 2015 at 09:56, Cyril Brulebois k...@debian.org wrote:
 Hi,

 fsate...@debian.org fsate...@debian.org (2015-08-22):
 Package: keyboard-configuration
 Severity: important
 User: pkg-systemd-maintain...@lists.alioth.debian.org
 Usertags: init-rcs-service

 (maintonly considered slightly annoying.)

 Hi,

 Your package keyboard-configuration has an initscript that is enabled
 in runlevel S, but it does not provide a corresponding systemd
 service unit.

 Systemd generates units for all sysv init scripts that do not have a
 corresponding systemd unit. By default, it sets
 DefaultDependencies=yes, which means they get ordered after early
 boot has finished.

 The problem is that to preserve the runlevel S semantics, systemd in
 debian is currently[1] ordering all S services Before=sysinit.target.
 This target is particularly early in the boot sequence, which means
 that it is most of the time too strict. In turn, this means it is
 fairly easy to end up with dependency cycles. For an example, see bug
 [763315]. Do note that the cycle still exists with sysvinit, it is
 just that systemd complains more loudly.

 Please add a systemd unit for the given service with the appropriate
 dependencies, which most of the time will be less strict than
 Before=sysinit.target. In other cases, the script is simply not
 applicable in systemd, in which case the package should ship a
 symlink to /dev/null as /lib/systemd/system/initscript.service.

 We have prepared a transition wiki page[2] explaining the issue in
 more detail, and outlining some general guidance. Please refer to it
 as it will have useful information.

 If you have any other doubts, feel free to ask in
 pkg-systemd-maintain...@lists.alioth.debian.org

 (Talking more as d-i RM than possible comaintainer, which I'm not.)

 src:console-setup could probably do with more hands on it, especially
 given (very friendly) bug reports like #763695. If you guys had any time
 to spend on making sure boot time dependencies are correct, and possibly
 that boot time performances improve over time, that would be much
 appreciated.

Does console-setup actually need to be run before user services are
started? My guess is that it only needs to run before getty, but it
should not block other services that want to start.

If someone could answer that question it should be very simple to
provide a patch for this.

-- 

Saludos,
Felipe Sateler



Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file

2015-08-23 Thread Cyril Brulebois
Hi,

fsate...@debian.org fsate...@debian.org (2015-08-22):
 Package: keyboard-configuration
 Severity: important
 User: pkg-systemd-maintain...@lists.alioth.debian.org
 Usertags: init-rcs-service

(maintonly considered slightly annoying.)

 Hi,
 
 Your package keyboard-configuration has an initscript that is enabled
 in runlevel S, but it does not provide a corresponding systemd
 service unit.
 
 Systemd generates units for all sysv init scripts that do not have a
 corresponding systemd unit. By default, it sets
 DefaultDependencies=yes, which means they get ordered after early
 boot has finished.
 
 The problem is that to preserve the runlevel S semantics, systemd in
 debian is currently[1] ordering all S services Before=sysinit.target.
 This target is particularly early in the boot sequence, which means
 that it is most of the time too strict. In turn, this means it is
 fairly easy to end up with dependency cycles. For an example, see bug
 [763315]. Do note that the cycle still exists with sysvinit, it is
 just that systemd complains more loudly.
 
 Please add a systemd unit for the given service with the appropriate
 dependencies, which most of the time will be less strict than
 Before=sysinit.target. In other cases, the script is simply not
 applicable in systemd, in which case the package should ship a
 symlink to /dev/null as /lib/systemd/system/initscript.service.
 
 We have prepared a transition wiki page[2] explaining the issue in
 more detail, and outlining some general guidance. Please refer to it
 as it will have useful information.
 
 If you have any other doubts, feel free to ask in
 pkg-systemd-maintain...@lists.alioth.debian.org

(Talking more as d-i RM than possible comaintainer, which I'm not.)

src:console-setup could probably do with more hands on it, especially
given (very friendly) bug reports like #763695. If you guys had any time
to spend on making sure boot time dependencies are correct, and possibly
that boot time performances improve over time, that would be much
appreciated.

Mraw,
KiBi.


signature.asc
Description: Digital signature