From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6EAON6rEmGIpAAAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 16:09:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YLQ8NqrEmGJLJAEAG6o9tA (envelope-from ) for ; Thu, 02 Jun 2022 16:09:46 +0200 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 7BFB137D8D for ; Thu, 2 Jun 2022 16:09:46 +0200 (CEST) Received: from localhost ([::1]:49750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwlWD-0004SZ-8J for larch@yhetil.org; Thu, 02 Jun 2022 10:09:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwlVO-0004Rz-Gc for guix-devel@gnu.org; Thu, 02 Jun 2022 10:08:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwlVO-0004g6-1W; Thu, 02 Jun 2022 10:08:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=WBtOme6srdEkp1r1GVqP5KsBRNBpwAWWdIOZDwR7q+U=; b=VaSCDRQ4FaqB1ENbuvtu mZyLDzJWt4/CObrRgDaQocOJXfWFvnq8L4JhZDls6zZQEYzxHEnWjoOZyAKLKD7atwk5Uzk/nrv0Q tNQcdr6HtMdvkesi/5ra8jAYsvhObl1iBNaZf7J9NHVm0mRiooECYuL9kNamrXQ9nlDr76YqHejRy GQsJiqtQuJQvgZSDzMwMyJ4QBdZK3eXyTi+BOTUyDoY3Ij+JFkz+FbehHUdSIObz8eBEKH88qXFmj SfcqycoCNAFsZHPZ3+HqNzUD5aqHVVx6nR6KJlw7xDQGDPUKkJxai73EOYC4Pqxp2cZide3BG8br2 NUzBC2Cs5N7+Lw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50164 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwlVN-0003ln-M0; Thu, 02 Jun 2022 10:08:53 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Cc: Felix Lechner , Guix Devel Subject: Re: A corner case of broken reproducibility References: <87leuj108h.fsf@gnu.org> <31d13a6014b14c886686bca833d926604ce3379d.camel@telenet.be> <87bkvcuynd.fsf@gnu.org> <6b761f22d333b0acd21f407a9f5f529aaa8b16d5.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 Prairial an 230 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de l'Acacia 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, 02 Jun 2022 16:08:52 +0200 In-Reply-To: <6b761f22d333b0acd21f407a9f5f529aaa8b16d5.camel@telenet.be> (Maxime Devos's message of "Wed, 01 Jun 2022 22:09:11 +0200") Message-ID: <87o7zbnonf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654178986; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=WBtOme6srdEkp1r1GVqP5KsBRNBpwAWWdIOZDwR7q+U=; b=Te2icqhpHQ9vN0jJMhE2ppj6Q8nJ3/jfaPBzwV2bb+IC1EJDgr0h6+Fbh+uGeZLY5hR+Wi EZ2FbKWIRtipU2w8B9VDwFqlYiYr3Di8NnB1rhNKC9glFmmsisQFTpkkN0KAm/jDzxA3/h aWgaSjbKROGG5dUUyRrcwXN42F6a/V7vQnk0nB3gAdtRpfh+jIcLrce9kZnv4jLGjcJqlv vyn8p3+lI8c6LWISYqSAe6koLeXiA9/rvuM0vhLaJmJCEGrsFKf6rMVtBf1VGEbECRSq/+ xXBtY3j4b1pgTIZzrqbbfLkwA/vZpCetIWaOvv5aLPbTryaVQ74XkFx17I6UHg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654178986; a=rsa-sha256; cv=none; b=Gp+x9HG1MNNIR/HGUu279Ir0vwvfQcmUz8BhRTbDWNiBzmBVA3y5a9b926gGFGmL9J5E7R 36uiReixFPX1+AcCHp+AWkFxIQP6YsquSfk6nz5NjNRdDjbsTmxT3IREG1K/ijHIvT6qxf UOltuI7kdEhFiez3uxpd/DqI7ijtQuthOXHuJBBFYaz8os+pGdj/0N9x8P7JQb0fBbtxvg XCZwmSmnhDv0Xia220HxT52VlsRsLCvJEpTJcNsmP5vDIaCkDez4a8Fd4eY3Ie2UDG23Ji 0Icix7M2XgY2Ii3AhgBg1YJt/bDsCXu/UopOPWZiGDEuvZSIH1dkEm707ymzCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=VaSCDRQ4; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=VaSCDRQ4; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7BFB137D8D X-Spam-Score: -5.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: WcZGIq1uRd8v Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op wo 01-06-2022 om 18:38 [+0200]: >> There=E2=80=99s a talk by Lennart Poettering where he explains that, con= trary to >> what one might think, =E2=80=9Cchown -R $HOME=E2=80=9D turns out to be f= ast enough that >> systemd-homed can do that unconditionally (off the of my head). > > Interesting. =E2=80=98%gdm-activation=E2=80=99 has an optimization to recurse only if th= e top-level directory has itself the wrong UID: --8<---------------cut here---------------start------------->8--- (define %gdm-activation ;; Ensure /var/lib/gdm is owned by the "gdm" user. This is normally the ;; case but could be wrong if the "gdm" user was created, then removed, a= nd ;; then recreated under a different UID/GID: . (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) (let* ((gdm (getpwnam "gdm")) (uid (passwd:uid gdm)) (gid (passwd:gid gdm)) (st (stat "/var/lib/gdm" #f))) ;; Recurse into /var/lib/gdm only if it has wrong ownership. (when (and st (or (not (=3D uid (stat:uid st))) (not (=3D gid (stat:gid st))))) (for-each (lambda (file) (chown file uid gid)) (find-files "/var/lib/gdm" #:directories? #t))))))) --8<---------------cut here---------------end--------------->8--- We can use that trick if needed: we=E2=80=99d get only one stat(2) call in = the common case. Ludo=E2=80=99.