From patchwork Wed Apr 29 08:47:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 21746 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D385B27BBE4; Wed, 29 Apr 2020 09:54:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id AE34827BBE1 for ; Wed, 29 Apr 2020 09:54:10 +0100 (BST) Received: from localhost ([::1]:41518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTiTq-0000HV-8c for patchwork@mira.cbaines.net; Wed, 29 Apr 2020 04:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTiQH-00072o-9H for guix-patches@gnu.org; Wed, 29 Apr 2020 04:53:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTiOt-0002tf-3j for guix-patches@gnu.org; Wed, 29 Apr 2020 04:50:29 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTiOs-0002tK-NQ for guix-patches@gnu.org; Wed, 29 Apr 2020 04:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTiOs-0005DO-Lv for guix-patches@gnu.org; Wed, 29 Apr 2020 04:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40955] [PATCH 2/5] build: install: Ignore chown exceptions. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Apr 2020 08:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40955 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40955@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 40955-submit@debbugs.gnu.org id=B40955.158815009619952 (code B ref 40955); Wed, 29 Apr 2020 08:49:02 +0000 Received: (at 40955) by debbugs.gnu.org; 29 Apr 2020 08:48:16 +0000 Received: from localhost ([127.0.0.1]:42386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTiO6-0005Bb-0a for submit@debbugs.gnu.org; Wed, 29 Apr 2020 04:48:16 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTiO1-0005B1-B4 for 40955@debbugs.gnu.org; Wed, 29 Apr 2020 04:48:09 -0400 Received: by mail-wm1-f67.google.com with SMTP id 188so1079424wmc.2 for <40955@debbugs.gnu.org>; Wed, 29 Apr 2020 01:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N4b8zymqUyhaBguhVjxacR/W4doLh8jxheDJT9oTcz0=; b=szNxxIauY8O+Fnln0blwZLXC4rQWJleeecjdXQU9k/WQMMN2GD1+4ftmJZdC2Hm6wd XXHGpAsL3NEaSOyJBw/Nr8HymLySQ6H0HKjjzC0oV5N9Ktv+6UFGwO5DabPkE87NCVpy 6z2NvcP2N9oDc83s0oQDnIKD7d1h+EirmoJkV1SlrIIdt6jhwkkzFXWXEOpcFWS/IFw3 57FqdvJAZfQo/+15+Q1oGoGK9vjR74+sZ+ghlbCmOPSsvYeqXKTg9o6DIDhFcCqDMH2x 6CV3/wk/IPpD+OLjoEL4WxbrXYHVU/ppIrWWB0ru0PAXwIDWmwoFGIS+Rl17ty2iCo9+ xnVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N4b8zymqUyhaBguhVjxacR/W4doLh8jxheDJT9oTcz0=; b=Hm6+PFzpAa6CYp7f0q8XsTiGvzXpm7HRWXuv9TSgui0SqTb/maHux/LIqYkOxIpvCY o0bV6OHNSBlqCKTdtecrxE2Cb91lWehw4tHnX9peb4XVBGywKrHRsURRvGiwJrjCjN55 ui2R4iLW95oZbBzAlrj3e/4rS95nQqWzWURf6ayake+hhC86VVHLPKgLKFqR1v1j+ib6 l/z/a1vl96cbB8EKxmaJz0Ql2ADb7W+7UwPo7VWUXextOMxWikotIg/eUa94j998rPP8 cZte5A/BsQEr9Im0dSgekZZkWdUZIyWN1UCgwS5fIsxoWiXQSZdoGp0h4N4snWx1xTh6 Kx8A== X-Gm-Message-State: AGi0PuZa/oIYZK65RR+xK8gEcdBrTzxbZ8mDpAjrTsbVtX6TlcyIC1Mx PdXMxj7ytHAgWfTPMKgROAfK6dyy X-Google-Smtp-Source: APiQypKyshEcxKSuQxowqLNbGE56OQU6Hzx5Henwv/xPrK/VQwd8aC7K9qWkJe/2mKIkIrewEjAa4Q== X-Received: by 2002:a05:600c:224a:: with SMTP id a10mr2114031wmm.174.1588150083482; Wed, 29 Apr 2020 01:48:03 -0700 (PDT) Received: from meru.fronius.com ([2a01:cb18:832e:5f00:e9fd:9d65:b691:fcb3]) by smtp.gmail.com with ESMTPSA id x132sm6812621wmg.33.2020.04.29.01.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 01:48:02 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 29 Apr 2020 10:47:53 +0200 Message-Id: <20200429084756.25072-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200429084756.25072-1-m.othacehe@gmail.com> References: <20200429084756.25072-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Changing ownership may require root permissions. As image can now be generated without root permissions (no VM involved), ignore those exceptions. * gnu/build/install.scm (evaluate-populate-directive): Ignore chown exceptions. --- gnu/build/install.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index c0d4d44091..0b0d01cf86 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -63,7 +63,9 @@ directory TARGET." (('directory name uid gid) (let ((dir (string-append target name))) (mkdir-p dir) - (chown dir uid gid))) + ;; This will fail if this is not run from a VM, ignore those + ;; errors. + (false-if-exception (chown dir uid gid)))) (('directory name uid gid mode) (loop `(directory ,name ,uid ,gid)) (chmod (string-append target name) mode))