From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: bug#37162: =?UTF-8?Q?=E2=80=98guix?= pack -f =?UTF-8?Q?docker=E2=80=99?= creates an image without /etc/passwd Date: Sun, 01 Sep 2019 00:02:32 +0900 Message-ID: <87k1at5qev.fsf@gmail.com> References: <87r25c3p0e.fsf@inria.fr> <87a7bxexs6.fsf@gmail.com> <871rx9jjl2.fsf@elephly.net> <87y2zge11z.fsf@gmail.com> <87y2zg2x7z.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42910) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3wUV-0005oJ-VB for bug-guix@gnu.org; Sat, 31 Aug 2019 02:04:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3wUU-0005As-ST for bug-guix@gnu.org; Sat, 31 Aug 2019 02:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46131) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3wUU-0005Am-Mr for bug-guix@gnu.org; Sat, 31 Aug 2019 02:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3wUU-000279-Gc for bug-guix@gnu.org; Sat, 31 Aug 2019 02:04:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87y2zg2x7z.fsf@inria.fr> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Mon, 26 Aug 2019 09:37:52 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 37162@debbugs.gnu.org Hello! Sorry for the late reply. Ludovic Court=C3=A8s writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >> Ricardo Wurmus writes: >> >>> Hi Maxim, >>> >>>> Ludovic Court=C3=A8s writes: >>>> >>>>> =E2=80=98guix pack -f docker=E2=80=99 currently creates an image with= out >>>>> /etc/{passwd,group,shadow}. >>>>> >>>>> It=E2=80=99s OK most of the time, but again it looks like a gratuitou= s annoyance >>>>> for those cases where having them around matters (that=E2=80=99s also= the reason >>>>> why guix-daemon creates them.) >>>> >>>> Would that include the files required for PAM authentication to work >>>> correctly? I remember struggling with this use case: using the Docker >>>> image with CQFD wrapper, which must be able to create a user and >>>> sudo'ing (or 'su') to it in the docker container. >>> >>> I wonder if at this point it wouldn=E2=80=99t be better to build a whol= e system >>> container. Isn=E2=80=99t that outside the scope of =E2=80=9Cguix pack= =E2=80=9D and rather a >>> task for =E2=80=9Cguix system=E2=80=9D? > > I think so. > >> Probably! But then one has to wonder if adding some base files to `guix >> pack' is not one of those slippery slopes where users come back >> expecting more stuff to be there? >> >> What use case(s) exactly depend on the presence of the >> /etc/{passwd,group,shadow} files? > > Generally, absent these files, getpw(3) and co. won=E2=80=99t give useful > results, and some applications will behave poorly (e.g., the PS1 prompt > in Bash can=E2=80=99t show the user name; =E2=80=98id=E2=80=99 fails). I see! I understand better the source of the annoyance now, thanks! > Most of the time it=E2=80=99s just a minor inconvenience. It seems OK to me to add those small files since make the experience better. Maxim