From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [V2 PATCH 1/1] services: Add agetty service. Date: Fri, 17 Feb 2017 09:24:24 -0500 Message-ID: <20170217142424.GA6165@jasmine> References: <8b9a83141665a7a86aa3d3c9ba6363c1ba2e93cd.1487117562.git.leo@famulari.name> <20170215002417.GA19546@jasmine> <20170216070650.GA21674@jasmine> <87tw7t8dgz.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cejSY-0003CV-Kg for guix-devel@gnu.org; Fri, 17 Feb 2017 09:24:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cejSV-0007AK-De for guix-devel@gnu.org; Fri, 17 Feb 2017 09:24:30 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56675) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cejSV-00077L-7c for guix-devel@gnu.org; Fri, 17 Feb 2017 09:24:27 -0500 Content-Disposition: inline In-Reply-To: <87tw7t8dgz.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 17, 2017 at 08:48:28AM +0100, Ricardo Wurmus wrote: > Leo Famulari writes: > > Is this the right way? Or would we rather wrap only the most > > commonly-used options, and leave an "escape hatch" as in the first > > version of the patch? If so, which options should we expose in Scheme? >=20 > That=E2=80=99s hard to say. I like to *always* keep an escape hatch, whi= ch is > useful in case we are too slow to adapt our code to changes introduced > by new versions. In my opinion this version of the patch is better > because it exposes more values; it would be even better if it added a > general purpose escape hatch. Okay. > Okay. (Can we generate documentation for the individual fields somehow?) Well, I'd really like that! IMO, the service that exposes most of agetty's options can be fully understood by reading the agetty(8) man page. I don't look forward to paraphrasing agetty(8). > Some naive comments follow. It's okay, my implementation is a naive copy-and-extend of the mingetty service :) [...] > > + #$@(if remote? > > + #~("--remote") > > + #~()) >=20 > Looking at all the syntactic noise makes me long for some prettier > abstraction here, but I can=E2=80=99t think of anything that would make t= his > considerably prettier. Oh well=E2=80=A6 =C2=AF\_(=E3=83=84)_/=C2=AF Agreed but, on the other hand, this is the level of abstraction that I understand. So, maybe that's a good thing for other Scheme newbies. > Maybe add a FIXME here, so we can more easily find it. It might also be > worth opening a bug report after merging this, so that we can track it. Okay. >=20 > > + #$@(if no-newline? > > + #~("--nonewline") > > + #~()) >=20 > I=E2=80=99m sure this will trip me up in the future. =E2=80=9Cnonewline= =E2=80=9D vs > =E2=80=9Cno-newline=E2=80=9D =E2=80=93 I prefer your choice, but the doub= le negative is tough > for me=E2=80=A6 I tried to copy the upstream configuration options but make them "Scheme-y" stylistically. > > + #$@(if no-hostname? > > + #~("--nohostname") > > + #~()) > > + #$@(if long-hostname? > > + #~("--long-hostname") > > + #~()) >=20 > Should we try to prevent nonsensical combinations of options? > Would it just be more confusing to merge =E2=80=9Cno-hostname?=E2=80=9D a= nd =E2=80=9Clong-hostname?=E2=80=9D as > =E2=80=9Cprint-hostname 'none 'long 'short=E2=80=9D? Sure... volunteers welcome :)=20 It was suggested in the past to reimplement mingetty in Scheme (it's ~400 lines of C). That's a case where we can really understand and control how the program is used. But for this case, we'd need an agetty expert. We could also add an activation phase that creates device nodes beyond ttyS0, because only ttyS0 is created on GuixSD currently. Either that or limit this service to ttyS0, instead of leaving the choice to the user. That's something that I will try to do. Thanks for your review! --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlinB5gACgkQJkb6MLrK fwiBCQ//U5U0aOixnX+4Sv70Xf+UHtay8rSBLcNydLypBNSZH7zbuAETxhNvx00l 9sgbE5ejAxlSvIlFd1A73klAVQATSpW5apXAKh1AGbp69hLy2DDzoC1NcNria9Kh 3BJQJsRZZGL+nXIxPqLryiRfMdwFEPuuf2G4ti60/uN0NdEZMCTZqASNKQ2RFG6Y ply4U5AaZ/jxcC1oksSMDI4mt/PjQuPTavHDhm0DIAFN5Ysuy2t7U6Jj7n1YUUO9 9E9OYCx5YfxLZHmcxN4Ngnkxl5AGG3CKOo50JakN9EsWBOSBy/BP2MaE2bWJ7oyO e8XYaM0nGMtD28okB5WwiTNv2VOT6jg5nASPJJpRB5kKxyps0L8kvpll5/bb2T0T l8/6qt78J2+TAbmuMd6Nq04YMpX/IWNgCvxEyC1AcuYkMI21MIM4p3qlsMv0PmmV VAZi1CRKa29i4Xaj1hzVgQ3HSvzdT46kRBG6U1MtB7q4DB1iZnu3g1ZTFcWZY17a M+Znmh4+u5Oq3QGxEw7w61nsbg3HxrhLKfnS0k4MEGZuGoh6dgLt+s6YBfCH2b1q eAlmPfWhc6Hh20pn+0BCyoZmufoz9ZuaK1HLIo3CEoN+5lYm5HIO7Pq5qEGtSoIV YwbIUOcvHPyVma5IEnOwDArMsb1l8jnD6bkKtvWYdo7y9W1BCjE= =oBcv -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG--