GNU bug report logs - #30464
[PATCH 0/2] Add console-agetty-service.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Danny Milosavljevic <dannym@HIDDEN>; Keywords: patch; dated Thu, 15 Feb 2018 11:44:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 26 Feb 2018 17:52:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 26 12:52:51 2018
Received: from localhost ([127.0.0.1]:33792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eqMxG-0006oP-QG
	for submit <at> debbugs.gnu.org; Mon, 26 Feb 2018 12:52:50 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:46920)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1eqMxE-0006oH-Pn
 for 30464 <at> debbugs.gnu.org; Mon, 26 Feb 2018 12:52:49 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 3CD8B10C6B;
 Mon, 26 Feb 2018 18:52:48 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id dOyNPvWp8aPE; Mon, 26 Feb 2018 18:52:46 +0100 (CET)
Received: from ribbon (unknown [193.50.110.216])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id EA66C1A3;
 Mon, 26 Feb 2018 18:52:45 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#30464] [PATCH 1/2] services: Add console-agetty-service.
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN> <87r2pm8gfl.fsf@HIDDEN>
 <20180215164135.188beed0@HIDDEN> <878tbu8dat.fsf@HIDDEN>
Date: Mon, 26 Feb 2018 18:52:45 +0100
In-Reply-To: <878tbu8dat.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Thu, 15 Feb 2018 16:47:54 +0100")
Message-ID: <877eqzvdsi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Hi Danny,

The discussion drifted a bit=E2=80=A6  :-)

ludo@HIDDEN (Ludovic Court=C3=A8s) skribis:

> Danny Milosavljevic <dannym@HIDDEN> skribis:

[...]

>> It doesn't make sense to have agetty itself depend on syslogd because
>> agetty can be (and usually is) used for modems etc which have nothing
>> to do with the local console.
>
> Alright.
>
> How about adding a =E2=80=98dependencies=E2=80=99 field to <agetty-config=
uration>?  It=E2=80=99d
> default to the empty list, and could be set to '(syslogd) in this case.
>
> Does that sound too obscure to you, or would it be OK?

Thoughts?  The =E2=80=98dependencies=E2=80=99 hack looks simple enough and =
would solve
this immediate need, I think.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 17 Feb 2018 16:58:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 17 11:58:01 2018
Received: from localhost ([127.0.0.1]:48538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1en5oH-0000Pe-H7
	for submit <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:58:01 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:42588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1en5oG-0000PX-5K
 for 30464 <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:58:00 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 72EF511163;
 Sat, 17 Feb 2018 17:57:59 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id KiTkdmG53uq0; Sat, 17 Feb 2018 17:57:58 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 7AFA210D80;
 Sat, 17 Feb 2018 17:57:58 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: shepherd logging
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN> <87r2pm8gfl.fsf@HIDDEN>
 <20180215164135.188beed0@HIDDEN> <878tbu8dat.fsf@HIDDEN>
 <20180216215725.58607c8c@HIDDEN>
 <20180216220737.0b5b7c0d@HIDDEN> <87k1vbk2ho.fsf@HIDDEN>
 <20180217174723.7a5daf84@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 29 =?utf-8?Q?Pluvi=C3=B4se?= an 226 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 17 Feb 2018 17:57:58 +0100
In-Reply-To: <20180217174723.7a5daf84@HIDDEN> (Danny Milosavljevic's
 message of "Sat, 17 Feb 2018 17:47:23 +0100")
Message-ID: <87efljk0yx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Danny Milosavljevic <dannym@HIDDEN> skribis:

>>   https://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/startup/startup.c=
#n731
>>=20
>> It=E2=80=99s comparable to /dev/kmsg, but it exists before file system s=
ervers
>> are brought up, which is why it doesn=E2=80=99t have an entry in the file
>> system hierarchy.
>
> Huh, so it's just connected to stderr?  That means it should work fine al=
ready
> with no changes in shepherd.  Nice!

Indeed!

> Just to be sure, it is possible to read out these messages and log them t=
o a
> file later on, right?

I think what goes to =E2=80=9Cconsole=E2=80=9D is printed and then forever =
lost:

  https://git.savannah.gnu.org/cgit/hurd/gnumach.git/tree/device/cons.c

That said, not much should go there since as soon as the root file
system is up, processes can start using /dev/klog.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 17 Feb 2018 16:47:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 17 11:47:31 2018
Received: from localhost ([127.0.0.1]:48526 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1en5e7-00009N-0u
	for submit <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:47:31 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:38688)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1en5e5-00009F-Me
 for 30464 <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:47:30 -0500
Received: from localhost (178.113.229.194.wireless.dyn.drei.com
 [178.113.229.194])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 71A7433602D4;
 Sat, 17 Feb 2018 17:47:28 +0100 (CET)
Date: Sat, 17 Feb 2018 17:47:23 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: shepherd logging
Message-ID: <20180217174723.7a5daf84@HIDDEN>
In-Reply-To: <87k1vbk2ho.fsf@HIDDEN>
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN>
 <87r2pm8gfl.fsf@HIDDEN> <20180215164135.188beed0@HIDDEN>
 <878tbu8dat.fsf@HIDDEN> <20180216215725.58607c8c@HIDDEN>
 <20180216220737.0b5b7c0d@HIDDEN> <87k1vbk2ho.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>   https://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/startup/startup.c#=
n731
>=20
> It=E2=80=99s comparable to /dev/kmsg, but it exists before file system se=
rvers
> are brought up, which is why it doesn=E2=80=99t have an entry in the file
> system hierarchy.

Huh, so it's just connected to stderr?  That means it should work fine alre=
ady
with no changes in shepherd.  Nice!

Just to be sure, it is possible to read out these messages and log them to a
file later on, right?




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 17 Feb 2018 16:25:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 17 11:25:10 2018
Received: from localhost ([127.0.0.1]:48513 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1en5IU-00083k-Jx
	for submit <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:25:10 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:42412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1en5IS-00083c-N1
 for 30464 <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:25:09 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 4395B11152;
 Sat, 17 Feb 2018 17:25:08 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id LTc1zb1wYBVb; Sat, 17 Feb 2018 17:25:07 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 6D9B43D09;
 Sat, 17 Feb 2018 17:25:07 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: shepherd logging
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN> <87r2pm8gfl.fsf@HIDDEN>
 <20180215164135.188beed0@HIDDEN> <878tbu8dat.fsf@HIDDEN>
 <20180216215725.58607c8c@HIDDEN>
 <20180216220737.0b5b7c0d@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 29 =?utf-8?Q?Pluvi=C3=B4se?= an 226 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 17 Feb 2018 17:25:07 +0100
In-Reply-To: <20180216220737.0b5b7c0d@HIDDEN> (Danny Milosavljevic's
 message of "Fri, 16 Feb 2018 22:07:37 +0100")
Message-ID: <87k1vbk2ho.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Danny Milosavljevic <dannym@HIDDEN> skribis:

> Oops, didn't see /var/log/shepherd.log - but I think it should just
> use syslog for that - and it's possible to use syslog for that by
> writing to /dev/kmsg .
>
> Does the Hurd with /dev/kmsg ?

It doesn=E2=80=99t have /dev/kmsg, but it has /dev/klog:

--8<---------------cut here---------------start------------->8---
ludo@darnassus:~$ ls -l /dev/klog=20
crw-rw---- 1 root root 0, 0 Jul 16  2015 /dev/klog
ludo@darnassus:~$ showtrans /dev/klog=20
/hurd/streamio kmsg
--8<---------------cut here---------------end--------------->8---

> How do they solve early boot logging ?

GNU=C2=A0Mach has a special =E2=80=9Cconsole=E2=80=9D device that early boo=
t processes can
open and write too, as in:

  https://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/startup/startup.c#n7=
31

It=E2=80=99s comparable to /dev/kmsg, but it exists before file system serv=
ers
are brought up, which is why it doesn=E2=80=99t have an entry in the file
system hierarchy.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 17 Feb 2018 16:20:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 17 11:20:11 2018
Received: from localhost ([127.0.0.1]:48501 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1en5De-0007vV-Vy
	for submit <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:20:11 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:42384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1en5Dd-0007vN-BG
 for 30464 <at> debbugs.gnu.org; Sat, 17 Feb 2018 11:20:10 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id CDBC811152;
 Sat, 17 Feb 2018 17:20:08 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id K070mBxdoF-c; Sat, 17 Feb 2018 17:20:07 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 2C62710D80;
 Sat, 17 Feb 2018 17:20:07 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: shepherd logging; console-agetty-service
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN> <87r2pm8gfl.fsf@HIDDEN>
 <20180215164135.188beed0@HIDDEN> <878tbu8dat.fsf@HIDDEN>
 <20180216215725.58607c8c@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 29 =?utf-8?Q?Pluvi=C3=B4se?= an 226 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 17 Feb 2018 17:20:06 +0100
In-Reply-To: <20180216215725.58607c8c@HIDDEN> (Danny Milosavljevic's
 message of "Fri, 16 Feb 2018 21:57:25 +0100")
Message-ID: <87sh9zk2q1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Hi,

Danny Milosavljevic <dannym@HIDDEN> skribis:

> On Thu, 15 Feb 2018 16:47:54 +0100
> ludo@HIDDEN (Ludovic Court=C3=A8s) wrote:
>
>> (Which has me thinking that longer term it=E2=80=99d be nice to have the
>> Shepherd take care of syslogd-ish activity.)
>
> If you mean that we should make sure to log shepherd's own messages, I ag=
ree.

That=E2=80=99s already done.

> Integrating syslogd into shepherd, not sure.  I think external syslogd is=
 fine.
> If not, there are a lot of other logging programs to choose from.
> I like modularity.

Yes, I like it too.  OTOH, there=E2=80=99s a chicken-and-egg problem here:
shepherd ends up implementing its own logging facility, and we have
situations like the one you mentioned earlier in this thread.

> shepherd could write its messages to the kernel log ringbuffer in /dev/km=
sg [3].
> That sounds dirty, but it would synchronize messages oh-so-nicely and wou=
ld
> not immediately require syslogd.  It would also make sure that syslogd
> eventually picks shepherd's messages up (right now they are somewhere on =
the
> first terminal - if you are lucky and they didn't scroll off).

Indeed, that=E2=80=99s something we can easily do already, and it would add=
ress
a major annoyance.  :-)  Actually, could it use syslog(3), which writes
to /dev/log?

> Also a way of capturing stderr and stdout (and maybe even /dev/log) of se=
rvices
> would be nice.

Yes.  Though again capturing service stdout/stderr is kinda redundant
with what syslogd does.  What I like in journald is the fact that it
unifies all logging facilities, and also connects them to service
management.

> We could also instead open /dev/klog and dup2 its fd to 1 and 2.
> That way, shepherd messages and all stray messages by any process shepherd
> started will end up in the kernel log.  (problem: there are some reserved
> patterns that have special meaning - and we don't control what the servic=
es
> do as well as we do what just shepherd does)

Right, so we=E2=80=99d need shepherd to filter these and pass them through
syslog(3), which ensures correct message formatting.  That=E2=80=99s what
<https://cgit.freedesktop.org/systemd/systemd/tree/src/journal/journald-kms=
g.c>
does apparently (thanks for the link!).

> Also, I know one is supposed to write UNIX services as daemons, but that's
> not really composable and kinda complicated to debug for no good reason.
> I'd prefer if shepherd also keeps a way to run regular programs as servic=
es,
> making sure that they are session leader, their output is logged, they are
> kept alive and monitored.

Sure!

> daemontools[1][2] have done all this stuff already and I like it much more
> than traditional service managers.  It's much more modular, handles loggi=
ng
> on its own, handles error cases well, uses the file system well etc, hand=
les
> errors in the loggers (!).

Sounds like a great source of inspiration then.  :-)

>> How about adding a =E2=80=98dependencies=E2=80=99 field to <agetty-confi=
guration>?  It=E2=80=99d
>> default to the empty list, and could be set to '(syslogd) in this case.
>>=20
>> Does that sound too obscure to you, or would it be OK?
>
> Sure, let's do that.
>
> It's a little weird to have it for all agettys, although maybe some other=
 users
> of agetty require it anyway.
>
> Then I wonder if all guix shepherd service configs should have such a fie=
ld.

That brings us to the topic of a general service customization
mechanism: <https://bugs.gnu.org/27155>.  Well, one thing at a time.
:-)

Thanks for the great ideas!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 16 Feb 2018 21:08:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 16 16:08:41 2018
Received: from localhost ([127.0.0.1]:47262 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emnFJ-00069f-Iu
	for submit <at> debbugs.gnu.org; Fri, 16 Feb 2018 16:08:41 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:35728)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1emnFH-00069X-E3
 for 30464 <at> debbugs.gnu.org; Fri, 16 Feb 2018 16:08:39 -0500
Received: from localhost (178.113.146.86.wireless.dyn.drei.com
 [178.113.146.86])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 9C9C3336048E;
 Fri, 16 Feb 2018 22:08:05 +0100 (CET)
Date: Fri, 16 Feb 2018 22:07:37 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: shepherd logging
Message-ID: <20180216220737.0b5b7c0d@HIDDEN>
In-Reply-To: <20180216215725.58607c8c@HIDDEN>
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN>
 <87r2pm8gfl.fsf@HIDDEN> <20180215164135.188beed0@HIDDEN>
 <878tbu8dat.fsf@HIDDEN> <20180216215725.58607c8c@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Oops, didn't see /var/log/shepherd.log - but I think it should just
use syslog for that - and it's possible to use syslog for that by
writing to /dev/kmsg .

Does the Hurd with /dev/kmsg ? How do they solve early boot logging ?




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 16 Feb 2018 20:57:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 16 15:57:33 2018
Received: from localhost ([127.0.0.1]:47258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emn4X-0005sP-De
	for submit <at> debbugs.gnu.org; Fri, 16 Feb 2018 15:57:33 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:34934)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1emn4V-0005sH-Ss
 for 30464 <at> debbugs.gnu.org; Fri, 16 Feb 2018 15:57:32 -0500
Received: from localhost (178.113.146.86.wireless.dyn.drei.com
 [178.113.146.86])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 151D7336048E;
 Fri, 16 Feb 2018 21:57:29 +0100 (CET)
Date: Fri, 16 Feb 2018 21:57:25 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: shepherd logging; console-agetty-service
Message-ID: <20180216215725.58607c8c@HIDDEN>
In-Reply-To: <878tbu8dat.fsf@HIDDEN>
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN>
 <87r2pm8gfl.fsf@HIDDEN> <20180215164135.188beed0@HIDDEN>
 <878tbu8dat.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi Ludo,

On Thu, 15 Feb 2018 16:47:54 +0100
ludo@HIDDEN (Ludovic Court=C3=A8s) wrote:

> (Which has me thinking that longer term it=E2=80=99d be nice to have the
> Shepherd take care of syslogd-ish activity.)

If you mean that we should make sure to log shepherd's own messages, I agre=
e.

Integrating syslogd into shepherd, not sure.  I think external syslogd is f=
ine.
If not, there are a lot of other logging programs to choose from.
I like modularity.

shepherd could write its messages to the kernel log ringbuffer in /dev/kmsg=
 [3].
That sounds dirty, but it would synchronize messages oh-so-nicely and would
not immediately require syslogd.  It would also make sure that syslogd
eventually picks shepherd's messages up (right now they are somewhere on the
first terminal - if you are lucky and they didn't scroll off).

I'm not sure whether then they would be printed to /dev/console as well the=
n -
probably.

We'd need a guile soft-port, but it's not like I haven't done that before.

User-shepherd shouldn't do it though (and can't because it doesn't have
permission to write to /dev/kmsg).

Please stop me and tell me why it's a bad idea :)

Also a way of capturing stderr and stdout (and maybe even /dev/log) of serv=
ices
would be nice.

If you thought that the above was bad, you ain't seen nothing yet :->

We could also instead open /dev/klog and dup2 its fd to 1 and 2.
That way, shepherd messages and all stray messages by any process shepherd
started will end up in the kernel log.  (problem: there are some reserved
patterns that have special meaning - and we don't control what the services
do as well as we do what just shepherd does)

Also, I know one is supposed to write UNIX services as daemons, but that's
not really composable and kinda complicated to debug for no good reason.
I'd prefer if shepherd also keeps a way to run regular programs as services,
making sure that they are session leader, their output is logged, they are
kept alive and monitored.

daemontools[1][2] have done all this stuff already and I like it much more
than traditional service managers.  It's much more modular, handles logging
on its own, handles error cases well, uses the file system well etc, handles
errors in the loggers (!).

> How about adding a =E2=80=98dependencies=E2=80=99 field to <agetty-config=
uration>?  It=E2=80=99d
> default to the empty list, and could be set to '(syslogd) in this case.
>=20
> Does that sound too obscure to you, or would it be OK?

Sure, let's do that.

It's a little weird to have it for all agettys, although maybe some other u=
sers
of agetty require it anyway.

Then I wonder if all guix shepherd service configs should have such a field.

[1] https://isotope11.com/blog/manage-your-services-with-daemontools
[2] https://cr.yp.to/daemontools/faq/create.html
[3] https://cgit.freedesktop.org/systemd/systemd/tree/src/journal/journald-=
kmsg.c
dev_kmsg_fd =3D open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
printf "<%i>" priority identifier "[" pid "]: " message "\n"

Linux:

	/*
	 * Extract and skip the syslog prefix <[0-9]*>. Coming from userspace
	 * the decimal value represents 32bit, the lower 3 bit are the log
	 * level, the rest are the log facility.
	 *
	 * If no prefix or no userspace facility is specified, we
	 * enforce LOG_USER [which is 1], to be able to reliably distinguish
	 * kernel-generated messages from userspace-injected ones.
	 */




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 15 Feb 2018 15:48:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 15 10:48:01 2018
Received: from localhost ([127.0.0.1]:44996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emLlQ-0008WC-A2
	for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 10:48:01 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:56412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1emLlN-0008W2-9A
 for 30464 <at> debbugs.gnu.org; Thu, 15 Feb 2018 10:47:59 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 163411163C;
 Thu, 15 Feb 2018 16:47:56 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id VQbFzWDL3Kee; Thu, 15 Feb 2018 16:47:55 +0100 (CET)
Received: from ribbon (unknown [193.50.110.160])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 49903114D2;
 Thu, 15 Feb 2018 16:47:55 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#30464] [PATCH 1/2] services: Add console-agetty-service.
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN> <87r2pm8gfl.fsf@HIDDEN>
 <20180215164135.188beed0@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 27 =?utf-8?Q?Pluvi=C3=B4se?= an 226 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 15 Feb 2018 16:47:54 +0100
In-Reply-To: <20180215164135.188beed0@HIDDEN> (Danny Milosavljevic's
 message of "Thu, 15 Feb 2018 16:41:35 +0100")
Message-ID: <878tbu8dat.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Heya,

Danny Milosavljevic <dannym@HIDDEN> skribis:

> On Thu, 15 Feb 2018 15:40:14 +0100
> ludo@HIDDEN (Ludovic Court=C3=A8s) wrote:
>
>> Could you explain the rationale?
>>=20
>> The only difference is that this shepherd service depends on =E2=80=98sy=
slogd=E2=80=99
>> whereas the current agetty service doesn=E2=80=99t, right?
>
> Yes, it's my inner OCD.
>
> Right now, the agetty is started while the Linux kernel is still booting =
and
> printing stuff to the console.  So you have two parties printing stuff
> to the same console simultaneously.  That looks ... not nice.

Right.

> What this would do is the getty would only be started (and printing stuff)
> after syslogd.  The first thing syslogd does is it disables the Linux dir=
ect
> console printing.

OK, got it.

(Which has me thinking that longer term it=E2=80=99d be nice to have the
Shepherd take care of syslogd-ish activity.)

> It doesn't make sense to have agetty itself depend on syslogd because
> agetty can be (and usually is) used for modems etc which have nothing
> to do with the local console.

Alright.

How about adding a =E2=80=98dependencies=E2=80=99 field to <agetty-configur=
ation>?  It=E2=80=99d
default to the empty list, and could be set to '(syslogd) in this case.

Does that sound too obscure to you, or would it be OK?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 15 Feb 2018 15:41:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 15 10:41:42 2018
Received: from localhost ([127.0.0.1]:44992 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emLfK-0008NE-I9
	for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 10:41:42 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:44182)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1emLfI-0008N5-EB
 for 30464 <at> debbugs.gnu.org; Thu, 15 Feb 2018 10:41:40 -0500
Received: from localhost (178.113.165.248.wireless.dyn.drei.com
 [178.113.165.248])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id BBDC03361813;
 Thu, 15 Feb 2018 16:41:38 +0100 (CET)
Date: Thu, 15 Feb 2018 16:41:35 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: ludo@HIDDEN (Ludovic =?ISO-8859-1?Q?Court=E8s?=)
Subject: Re: [bug#30464] [PATCH 1/2] services: Add console-agetty-service.
Message-ID: <20180215164135.188beed0@HIDDEN>
In-Reply-To: <87r2pm8gfl.fsf@HIDDEN>
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN>
 <87r2pm8gfl.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi Ludo,

On Thu, 15 Feb 2018 15:40:14 +0100
ludo@HIDDEN (Ludovic Court=C3=A8s) wrote:

> Could you explain the rationale?
>=20
> The only difference is that this shepherd service depends on =E2=80=98sys=
logd=E2=80=99
> whereas the current agetty service doesn=E2=80=99t, right?

Yes, it's my inner OCD.

Right now, the agetty is started while the Linux kernel is still booting and
printing stuff to the console.  So you have two parties printing stuff
to the same console simultaneously.  That looks ... not nice.

What this would do is the getty would only be started (and printing stuff)
after syslogd.  The first thing syslogd does is it disables the Linux direct
console printing.

It doesn't make sense to have agetty itself depend on syslogd because
agetty can be (and usually is) used for modems etc which have nothing
to do with the local console.

> > +(define* (console-agetty-service config)
> > +  "Return a service to run agetty according to @var{config}, which spe=
cifies
> > +the tty to run, defaulting to the Linux console."
> > +  (service console-agetty-service-type config)) =20
>=20
> In general we don=E2=80=99t provide such procedures any more and instead =
expose
> service types and configs directly.

Okay, I can remove that one and inline it at the (only) call site.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 15 Feb 2018 14:40:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 15 09:40:17 2018
Received: from localhost ([127.0.0.1]:43836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emKht-0006ff-Li
	for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 09:40:17 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:55830)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1emKhs-0006fY-Dr
 for 30464 <at> debbugs.gnu.org; Thu, 15 Feb 2018 09:40:16 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id EAB0511644;
 Thu, 15 Feb 2018 15:40:15 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id lo6je1OOnBt5; Thu, 15 Feb 2018 15:40:15 +0100 (CET)
Received: from ribbon (unknown [193.50.110.160])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 3A0E811600;
 Thu, 15 Feb 2018 15:40:15 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#30464] [PATCH 1/2] services: Add console-agetty-service.
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 27 =?utf-8?Q?Pluvi=C3=B4se?= an 226 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 15 Feb 2018 15:40:14 +0100
In-Reply-To: <20180215114742.663-1-dannym@HIDDEN> (Danny
 Milosavljevic's message of "Thu, 15 Feb 2018 12:47:41 +0100")
Message-ID: <87r2pm8gfl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30464
Cc: 30464 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Hello,

Danny Milosavljevic <dannym@HIDDEN> skribis:

> * gnu/services/base.scm (<agetty-configuration>): Make tty default to #f.
> (console-agetty-shepherd-service): New variable.
> (console-agetty-service-type): New variable.
> (console-agetty-service): New variable.
> (%base-services): Replace agetty-service instance by console-agetty-servi=
ce
> instance.

Could you explain the rationale?

The only difference is that this shepherd service depends on =E2=80=98syslo=
gd=E2=80=99
whereas the current agetty service doesn=E2=80=99t, right?

> +(define* (console-agetty-service config)
> +  "Return a service to run agetty according to @var{config}, which speci=
fies
> +the tty to run, defaulting to the Linux console."
> +  (service console-agetty-service-type config))

In general we don=E2=80=99t provide such procedures any more and instead ex=
pose
service types and configs directly.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 15 Feb 2018 11:47:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 15 06:47:53 2018
Received: from localhost ([127.0.0.1]:43692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emI13-0000fi-5S
	for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:47:53 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:52400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1emI10-0000fM-JK
 for 30464 <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:47:50 -0500
Received: from dayas.3.home (178.113.165.248.wireless.dyn.drei.com
 [178.113.165.248])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 91A473361629;
 Thu, 15 Feb 2018 12:47:49 +0100 (CET)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 30464 <at> debbugs.gnu.org
Subject: [PATCH 2/2] services: agetty-shepherd-service: Default to providing
 'term-console instead of 'term-auto .
Date: Thu, 15 Feb 2018 12:47:42 +0100
Message-Id: <20180215114742.663-2-dannym@HIDDEN>
X-Mailer: git-send-email 2.15.1
In-Reply-To: <20180215114742.663-1-dannym@HIDDEN>
References: <20180215114256.551-1-dannym@HIDDEN>
 <20180215114742.663-1-dannym@HIDDEN>
Tags: patch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30464
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

* gnu/services/base.scm (agetty-shepherd-service): Default to providing
'term-console instead of 'term-auto .
---
 gnu/services/base.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 29ae5fca3..4ab83d1d2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -937,7 +937,8 @@ to use as the tty.  This is primarily useful for headless systems."
        (shepherd-service
          (modules '((ice-9 match) (gnu build linux-boot)))
          (documentation "Run agetty on a tty.")
-         (provision (list (symbol-append 'term- (string->symbol (or tty "auto")))))
+         (provision (list (symbol-append 'term- (string->symbol
+                                                 (or tty "console")))))
 
          ;; Since the login prompt shows the host name, wait for the 'host-name'
          ;; service to be done.  Also wait for udev essentially so that the tty




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at 30464 <at> debbugs.gnu.org:


Received: (at 30464) by debbugs.gnu.org; 15 Feb 2018 11:47:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 15 06:47:51 2018
Received: from localhost ([127.0.0.1]:43690 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emI10-0000fO-Ri
	for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:47:51 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:52396)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1emI0z-0000fF-Gh
 for 30464 <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:47:49 -0500
Received: from dayas.3.home (178.113.165.248.wireless.dyn.drei.com
 [178.113.165.248])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 57AE133609ED;
 Thu, 15 Feb 2018 12:47:48 +0100 (CET)
From: Danny Milosavljevic <dannym@HIDDEN>
To: 30464 <at> debbugs.gnu.org
Subject: [PATCH 1/2] services: Add console-agetty-service.
Date: Thu, 15 Feb 2018 12:47:41 +0100
Message-Id: <20180215114742.663-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.15.1
In-Reply-To: <20180215114256.551-1-dannym@HIDDEN>
References: <20180215114256.551-1-dannym@HIDDEN>
Tags: patch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30464
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

* gnu/services/base.scm (<agetty-configuration>): Make tty default to #f.
(console-agetty-shepherd-service): New variable.
(console-agetty-service-type): New variable.
(console-agetty-service): New variable.
(%base-services): Replace agetty-service instance by console-agetty-service
instance.
---
 gnu/services/base.scm | 35 ++++++++++++++++++++++++++++++-----
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 1ad7c2320..29ae5fca3 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -817,7 +817,8 @@ the message of the day, among other things."
   agetty-configuration?
   (agetty           agetty-configuration-agetty   ;<package>
                     (default util-linux))
-  (tty              agetty-configuration-tty)     ;string | #f
+  (tty              agetty-configuration-tty      ;string | #f
+                    (default #f))
   (term             agetty-term                   ;string | #f
                     (default #f))
   (baud-rate        agetty-baud-rate              ;string | #f
@@ -1072,6 +1073,31 @@ program.")))
 the tty to run, among other things."
   (service agetty-service-type config))
 
+(define console-agetty-shepherd-service
+  (lambda (config)
+    (let ((base-service
+           (car
+            (agetty-shepherd-service
+             (agetty-configuration (inherit config)
+              (keep-baud? #t))))))
+      (list
+       (shepherd-service (inherit base-service)
+         ;; Make sure that Linux doesn't log to the same console as well.
+         (requirement (cons 'syslogd (shepherd-service-requirement base-service))))))))
+
+(define console-agetty-service-type
+  (service-type (name 'console-agetty)
+                (extensions (list (service-extension shepherd-root-service-type
+                                                     console-agetty-shepherd-service)))
+                (description
+                 "Provide console login using the @command{agetty}
+program on the Linux console.")))
+
+(define* (console-agetty-service config)
+  "Return a service to run agetty according to @var{config}, which specifies
+the tty to run, defaulting to the Linux console."
+  (service console-agetty-service-type config))
+
 (define-record-type* <mingetty-configuration>
   mingetty-configuration make-mingetty-configuration
   mingetty-configuration?
@@ -2053,10 +2079,9 @@ This service is not part of @var{%base-services}."
                         (cons tty %default-console-font))
                       '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
 
-        (agetty-service (agetty-configuration
-                         (extra-options '("-L")) ; no carrier detect
-                         (term "vt100")
-                         (tty #f))) ; automatic
+        (console-agetty-service (agetty-configuration
+                                 (extra-options '("-L")) ; no carrier detect
+                                 (term "vt100")))
 
         (mingetty-service (mingetty-configuration
                            (tty "tty1")))




Information forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Feb 2018 11:43:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 15 06:43:17 2018
Received: from localhost ([127.0.0.1]:43681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1emHwb-0000VV-9H
	for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:43:17 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50307)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1emHwZ-0000VI-MH
 for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:43:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1emHwT-00089E-OU
 for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:43:10 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40711)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1emHwT-000898-LT
 for submit <at> debbugs.gnu.org; Thu, 15 Feb 2018 06:43:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41278)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1emHwS-0003vF-NJ
 for guix-patches@HIDDEN; Thu, 15 Feb 2018 06:43:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1emHwN-00087n-RE
 for guix-patches@HIDDEN; Thu, 15 Feb 2018 06:43:08 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:33454)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1emHwN-00087b-Jm
 for guix-patches@HIDDEN; Thu, 15 Feb 2018 06:43:03 -0500
Received: from dayas.3.home (178.113.165.248.wireless.dyn.drei.com
 [178.113.165.248])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 0BB0633609ED;
 Thu, 15 Feb 2018 12:43:01 +0100 (CET)
From: Danny Milosavljevic <dannym@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/2] Add console-agetty-service.
Date: Thu, 15 Feb 2018 12:42:56 +0100
Message-Id: <20180215114256.551-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.15.1
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Danny Milosavljevic (2):
  services: Add console-agetty-service.
  services: agetty-shepherd-service: Default to providing  'term-console
    instead of 'term-auto .

 gnu/services/base.scm | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)





Acknowledgement sent to Danny Milosavljevic <dannym@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#30464; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.