From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5FA4A15808D for ; Wed, 20 Apr 2022 23:26:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2EBC3E0886; Wed, 20 Apr 2022 23:26:44 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DBA79E0886 for ; Wed, 20 Apr 2022 23:26:43 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id r13so6585216ejd.5 for ; Wed, 20 Apr 2022 16:26:43 -0700 (PDT) X-Gm-Message-State: AOAM5313osjEyesGPp5CikIkJIhHGbotXuLvcap3bwEQsgdn7vB0nLtT QiqDVmLl2hviVtBkuUVhamKtTf9eSGoqM3xCNZw= X-Google-Smtp-Source: ABdhPJxKkpd3Vtf6PiHEpc95Z8WjME2yuQ8ymNOtYOO+cgg1wOKGyXaDgbg2yLjS+GSlN8rSjQ7EftcQHd0y5ofk86Q= X-Received: by 2002:a17:907:3398:b0:6e8:6802:2a8f with SMTP id zj24-20020a170907339800b006e868022a8fmr20610872ejb.234.1650497200386; Wed, 20 Apr 2022 16:26:40 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20220327233712.1282001-1-mattst88@gentoo.org> In-Reply-To: From: Matt Turner Date: Wed, 20 Apr 2022 16:26:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-catalyst] [PATCH 1/3] catalyst: support 3 new options To: Daniel Cordero Cc: gentoo-catalyst@lists.gentoo.org, Patrice Clement Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 3aff3ea9-6ce6-421d-b086-4e5e5cf7944e X-Archives-Hash: 6f33aa9c1a3b0f47ac68cbbbddbe7a1f On Tue, Apr 19, 2022 at 8:23 AM Daniel Cordero wrote: > > On Sun, Mar 27, 2022 at 04:37:10PM -0700, Matt Turner wrote: > > From: Patrice Clement > > > > * stage4/groups: create a a list of groups. > > * stage4/users: create a list of users. users can also be added to > > groups using the "foo.bar=wheel,audio,baz" format. > > * stage4/ssh_public_keys: copy an SSH public key into the stage4 user's home > > (.ssh/authorized_keys) and set the file permission to 0644. > > > > Bug: https://bugs.gentoo.org/236905 > > --- > > catalyst/base/stagebase.py | 70 ++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 70 insertions(+) > > > > diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py > > index de1e30ef..76feb5f0 100644 > > --- a/catalyst/base/stagebase.py > > +++ b/catalyst/base/stagebase.py > > @@ -894,6 +930,40 @@ class StageBase(TargetBase, ClearBase, GenBase): > > cmd(['rsync', '-a', x + '/', self.settings['stage_path']], > > env=self.env) > > > > + def groups(self): > > + for x in self.settings["groups"].split(): > > For users() and ssh_public_keys() the setting is used as-is, but for > groups it is .split(). > > None of them handle 0/1/2+ length settings as they get converted into lists and strings. > > These need to be able to handle both cases. Would you like to send a patch? (Or Patrice?)