From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MIPNFYBVaGfMagEAe85BDQ:P1 (envelope-from ) for ; Sun, 22 Dec 2024 18:08:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id MIPNFYBVaGfMagEAe85BDQ (envelope-from ) for ; Sun, 22 Dec 2024 19:08:00 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers eddsa verify failed") header.d=josefsson.org header.s=ed2303 header.b=uOtBc+i7; dkim=fail ("headers rsa verify failed") header.d=josefsson.org header.s=rsa2303 header.b=Y6WbjC8F; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734890879; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature:openpgp:openpgp; bh=kQDh0hAc+2Vl/TYrlYzRLGAR/m+lBcy8EDdpVVFfMkI=; b=tgM/TBsVR/CvQ7Fr4iVOZmh548VQVfUDpTHIclQzUiTvhVBBMzaOvlXlO7g+YAFrZk1UxO 8AWo2Kjje51Iu0OoYQPbSrZwwMPYcWc5000Lq4BaLhxDACl8hOyLfM2FXpFSRgaMggx13n BPLsLLoCSHwGtnnn+/4pW7rP22XFq1YUplNl3n6o7jo0zYdbXVe4tFOOKh2wmGkhKBAEFV XXDJgcm6cIYQpjqBikh4ZMLE7d8ibpbwi+iiP4VZZ8QJ/AcSOVmSu9m96Zf6CiuoqpEVHo qycCcMvk4qGYVdCNfZMznR6pHVIB4buem8npTD4hhP49JGoNXTOfEMkg5qMyHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers eddsa verify failed") header.d=josefsson.org header.s=ed2303 header.b=uOtBc+i7; dkim=fail ("headers rsa verify failed") header.d=josefsson.org header.s=rsa2303 header.b=Y6WbjC8F; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734890879; a=rsa-sha256; cv=none; b=QV8DcQqw8sW8wE+rX6x+cqT8D3flgdvRuqizko66cRLP84aHpoEcnQPtLn+MvbmvvpsU+U jajD3m3D7nuB2/M2X/fEk6NnHFtp+D3EInGFnlrmFAYvRNqeV3FxXWDuXgyW14vOJsfef+ w6/+xeiVKriiAggPDOq4786acGgNzziTgN8pTh8itWiwSokCkT2255M4VcuxjJO7VeoyBA nE6StFSe3DF/8J7qcvLZHbaHHcLVah+ecVhy6VyAaxzxwI1CW1a40eeHLYC5VQj2GEcKok ul8k7ekepzDqjoSZVJ0qzH2dBskKjDckV1hadu9OM4kiTlTAmfb9R3FxVYG0xQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6D3E2A21BF for ; Sun, 22 Dec 2024 19:07:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPQMO-0008Cn-Mi; Sun, 22 Dec 2024 13:07:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPQMG-0008CD-Eo for help-guix@gnu.org; Sun, 22 Dec 2024 13:07:17 -0500 Received: from uggla.sjd.se ([2001:9b1:8633::107]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPQMB-0006ew-QB; Sun, 22 Dec 2024 13:07:14 -0500 DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:In-Reply-To :Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description; bh=kQDh0hAc+2Vl/TYrlYzRLGAR/m+lBcy8EDdpVVFfMkI=; t=1734890822; x=1736100422; b=uOtBc+i7HkEpGR8caaqAESVfcUaipt/05uVwtFEzRMqi7JyFweewLK2bGDHWTcF2rmHxyQB1ybo BT/XSPeSFDg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=kQDh0hAc+2Vl/TYrlYzRLGAR/m+lBcy8EDdpVVFfMkI=; t=1734890822; x=1736100422; b=Y6WbjC8FqHWCEz9s+fbLctc/MY58GSlrQvmfiDhLeRlX0mElaXw1guKyijxW0zTvdZPCxJ2hmt+ mHo1wGkdtn4TzKWYpM8q01eCI/3KU/nlUIeJjQKwmPl30daiEURMGOwCnupfX+ekSKN2EZ0dgrt8i 4nj1NjrEHqbHBXdX5NSioPJCKc0MV0AZD/wno0Zra9PCELvCI1gCNF8Wu6sB2amKTzvF8mSxKJSQi k/LZxjE1zvfti+SSJ2GOf0VihqgPX4ndpxonBps6xQoP8NipMs55+ID93Sr4xffOe9orP1hyIJqwY xqT1aTVpokPWm6E5DElK0x3evkmMg6OFBk6zs8HlAYPYXqj4PWkc45ZlU5dVe+qGKvbdUbKPkV5y0 HryRRi2H4lyJipqxpS8vpDYZAWSjOQfrLcHmPN4QCAO13pR5AzV1LKGHC3/hAWwM0yPdvLngQ; Received: from h-178-174-130-130.a498.priv.bahnhof.se ([178.174.130.130]:55224 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tPQLt-002Jhl-CT; Sun, 22 Dec 2024 18:06:53 +0000 To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: help-guix@gnu.org, suhail@bayesians.ca, Cayetano Santos Subject: Re: Building a Docker image for GitLab-CI References: <87ttb4d5c8.fsf@inventati.org> <87a5cwd4bn.fsf@inventati.org> <87ed27oqn9.fsf@kaka.sjd.se> <87zfkurbja.fsf@inria.fr> <87zfkulolb.fsf@kaka.sjd.se> <87o71ar4j5.fsf@inria.fr> <87ed25lvol.fsf@kaka.sjd.se> <87h66xgie9.fsf@inria.fr> OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt X-Hashcash: 1:23:241222:help-guix@gnu.org::ZSR9nSfFQ/DBgU4i:2KO2 X-Hashcash: 1:23:241222:ludo@gnu.org::qSWe4p0HKmUgn9x4:2zm4 X-Hashcash: 1:23:241222:suhail@bayesians.ca::wxXI3EG8ik0Yi6zr:5AXV X-Hashcash: 1:23:241222:csantosb@inventati.org::utq9BsuXgY67z5mN:sWgG Date: Sun, 22 Dec 2024 19:07:06 +0100 In-Reply-To: <87h66xgie9.fsf@inria.fr> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Sat, 21 Dec 2024 16:33:50 +0100") Message-ID: <87ldw7pp6d.fsf@kaka.sjd.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:9b1:8633::107; envelope-from=simon@josefsson.org; helo=uggla.sjd.se X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Simon Josefsson From: Simon Josefsson via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -8.82 X-Spam-Score: -8.82 X-Migadu-Queue-Id: 6D3E2A21BF X-Migadu-Scanner: mx10.migadu.com X-TUID: ANAbeL7JK30+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> - guix package -i fails: `guix perform-download: error: refusing to >> run with elevated privileges (UID 0)` > > Should be fixed by running guix-daemon with > =E2=80=9C--build-users-group=3Dwhatever=E2=80=9D so that downloads run as= one of the build > users, not as root. Yes, I discovered that too. >> - GitLab pipeline job entrypoints: three possible entry-point usages >> behave somewhat different depending on how `guix pack` was invoked > > This image uses Guix installed on Debian though, no? No - the resulting image is purely from 'guix pack', no Debian in the final image at all. I didn't test now but I think Debian images handle all three entrypoint values, but the 'guix pack' image doesn't. >> - Adding `nss-certs` to the `guix pack` command breaks: `(symlink >> "NetLock_Arany_=3DClass_Gold=3D_F?tan?s?tv?ny.pem" #) Throw to key >> encoding-error' with args ("scm_to_stringn" "cannot convert wide >> string to output locale" 84 #f #f)'.` > > You need to run guix-daemon in a UTF-8 locale like =E2=80=9CC.UTF-8=E2=80= =9D (which is > supported out-of-the-box). > > See also . Thanks - I finally figured this one out in the same way. >> Finally, you may wonder why things didn't work before. Some of the >> major reasons: 1) --max-layer=3D100 and 2) -S /etc=3Detc and 3) Missing >> /etc/protocols etc. GitLab's docker setup doesn't handle many layers, >> and it happens to just mount a sub-set of layers (see mount output, >> missing a lot of layers). Which files are put at which layer seems to >> vary between `guix pack` runs for some reason, making it really hard to >> debug (sometimes things worked partially, sometimes not, depending on >> which files ended up visible). I use --max-layers=3D8 now. > > Interesting. Did you find points in the code (Docker? GitLab?) about > this subset of layers being mounted? No, I didn't go down chasing the root cause. I wonder if maybe it isn't as simple as some Linux kernel restriction on mount point sizes? If you try to load a --max-layer=3D100 image on GitLab you end up with a /proc/mounts containing lines like this: rw,relatime,lowerdir=3Dl/ZPVAK6UICUAWUUE4GUD6AYFCEM:l/HI6HL2SJWTZDQHPTA3SGR= 4PWNE:l/OAJJQ5NKJAJLIAOEWBNLI6WRNC:l/MRDSZ2V6PLTEQGMEDSOPX6FKEY:l/FG4SISAU6= TZNHB6CQR5X5GNEJB:l/EZGDP6A5CMVPA5O6IKOOKPDMBE:l/DA5NZCY6NVIGU2X6U5XQQXV54M= :l/P4MIVQ3I7VCYFTQ3AG6RCXZVW5:l/FGPCINKKCYRDHZI5BAAU7HEETW:l/MUYJFZRJLR4Z3B= NBFRBRTGP4S5:l/UPGZHVDAILBRLLEH6T5RKWIFG7:l/YNTBNOTPU7QRK5K6RD63VSXG5Q:l/XU= PHFGGN36OPHNU334M3V7HDXP:l/PVA2QRQE4D5MAKI6BMGVPETNZN:l/VTGADKUDL4KA4HPA2YC= CQ2JQNI:l/WZHWY243PTUZTQIZJM26PVSYG4:l/7YLLGUSIRSUFPXIFI57F2UQSFQ:l/ZEOCYJR= 44J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:l/B37PUETDZKC3MUZZX6CT3M6ZEC:l/LTVIXAHIS7O45NFIVNP= DVGYMR4:l/GGBS4BWCAD6UMV3755MJ3BQRI5:l/4XGXVIO5QQ2ARZTTG74M4UDK4V:l/X673P4Q= 5TGPWBLQIXOQ5JXKG2C:l/3K2Q6NGZ5EEIKCFBRMEWWZFWQK:l/ALTG2QI6YZVKXIP4UCRDMQWS= 5Q:l/P4AE6X6G5GK66GHHRBZ27BTBF3:l/2UEJWLKTB2GNGT2G6UWFZVDFRN:l/OCTYS4BHPFX4= HC3OXJJVGABEPX:l/M766VP6Y5QL2OGI6EYO5OEB6H4:l/DNITYWJFFEVGWQPFQ37S57EIB5:l/= PQE5T2ER2OKPNC2YNHZEJXVIY6,upperdir=3D98dac307f50ae5da4c8f2cc5fdf024465f636= 00e30fc3bb434fca31191e2efdc/diff,workdir=3D98dac307f50ae5da4c8f2cc5fdf02446= 5f63600e30fc3bb434fca31191e2efdc/work That doesn't contain all of the 100 layers (although I didn't double count..). Something is truncating those lines. That would explain why it works for me locally with 'podman': it seems podman uses much shorter names, like: rw,relatime,lowerdir=3D0:1:2:3:4.. instead of those longer strings above. >> Re /etc=3Detc it seems GitLab's docker setup bind-mounts things below >> /etc/ and it cannot handle the root /etc symlink. A workaround is to >> use `lndir` which I use in the `test-amd64-package-install` job. This >> is limitation of GitLab's docker setup: I tried running a `-S >> /etc=3Detc` image on my own GitLab runner based on Trisquel [1] and it >> worked fine, it mounted things below the symlinked tree properly. >> Could `guix pack` be teached how to do a lndir-approach for /etc >> instead of symlink, perhaps? > > It could symlink individual files and make /etc a directory. Is this possible now? How? The --symlink is defined like this now: =E2=80=98-S SPEC=E2=80=99 Add the symlinks specified by SPEC to the pack. This option can appear several times. SPEC has the form =E2=80=98SOURCE=3DTARGET=E2=80=99, where SOURCE is t= he symlink that will be created and TARGET is the symlink target. For instance, =E2=80=98-S /opt/gnu/bin=3Dbin=E2=80=99 creates a =E2=80= =98/opt/gnu/bin=E2=80=99 symlink pointing to the =E2=80=98bin=E2=80=99 sub-directory of the pro= file. Could we extend that somehow to support the model of recursively creating directories, but symlink files within them? Or a new --symlink-mkdir parameter or similar? > (What=E2=80=99s =E2=80=98lndir=E2=80=99, if I may ask?) Exactly that :) One of those ancient tools that still is surprisingly useful: https://manpages.debian.org/bookworm/xutils-dev/lndir.1.en.html https://gitlab.freedesktop.org/xorg/util/lndir/-/blob/master/lndir.c /Simon --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZ2hVShQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFoqIRAPwKA/dUwBwMcVTonGYJV9OOL5oBvEgD 9fujq1fiC6UDCQEAmPaChT7AeG7hveoPfdjFiBMtDeS0BEoCK29kXhaMEA8= =a+qL -----END PGP SIGNATURE----- --=-=-=--