From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qOiSGB7Oc2K2pAAAbAwnHQ (envelope-from ) for ; Thu, 05 May 2022 15:16:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sAsJGB7Oc2I1UwAAG6o9tA (envelope-from ) for ; Thu, 05 May 2022 15:16:14 +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 BF41E973E for ; Thu, 5 May 2022 15:16:13 +0200 (CEST) Received: from localhost ([::1]:50698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmbL2-0004WG-SS for larch@yhetil.org; Thu, 05 May 2022 09:16:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmbKs-0004Sj-Qc for bug-guix@gnu.org; Thu, 05 May 2022 09:16:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50908) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmbKs-0008Oq-Ho for bug-guix@gnu.org; Thu, 05 May 2022 09:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nmbKs-0007D8-D3 for bug-guix@gnu.org; Thu, 05 May 2022 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55270: unpack phase randomly changes the cwd Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 05 May 2022 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55270 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Cc: 55270@debbugs.gnu.org Received: via spool by 55270-submit@debbugs.gnu.org id=B55270.165175654726747 (code B ref 55270); Thu, 05 May 2022 13:16:02 +0000 Received: (at 55270) by debbugs.gnu.org; 5 May 2022 13:15:47 +0000 Received: from localhost ([127.0.0.1]:44804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmbKc-0006x5-Vb for submit@debbugs.gnu.org; Thu, 05 May 2022 09:15:47 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:11088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmbKZ-0006lp-Bb for 55270@debbugs.gnu.org; Thu, 05 May 2022 09:15:45 -0400 Date: Thu, 05 May 2022 13:15:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail3; t=1651756536; bh=jB6f2sTbM7hQ7UEGxBJXAiKsBa50JHGNMYF7k+oXMA4=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=N0B1bx4qR2/SeRINiGq3qt7yU6rWqQs/43BJ2hWQlnD/YzkPvAwpwmYWxfbUobzVH gfOEZf0rA4cm506Di4yHpV/EpJ+Su3eIqRE4hBYpWqP4zL6TBsew/smihekKirFnZ0 Vks1jeEnuRS4e+bMqCs73BWuMKkkZGK01V7Q0+d45XNCxllNfr18q8tGbVRxetILZU 71aUDSR24gsuzhNzq8X2bJfdl4M73CetJNnMxZ66+GQHFCGEN4OqyOApQOfZ+6do8s jmSBZ5csVu1s3E/4EK7vIoKAbpgD3KkJNT8XfrgWp6fZlVpax6+/i9ckQI2K6Hmk5T /oR1Yxt0j4UmQ== From: Attila Lendvai Message-ID: In-Reply-To: <378a823f4ae3a60c2d3ad419b22958524c933b19.camel@telenet.be> References: <378a823f4ae3a60c2d3ad419b22958524c933b19.camel@telenet.be> Feedback-ID: 28384833:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Attila Lendvai Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1651756574; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jB6f2sTbM7hQ7UEGxBJXAiKsBa50JHGNMYF7k+oXMA4=; b=MdGX9GlGO3CbNbF3it/y0b8G9GRzl7odBG0Ou1QPb0yyCB54mw/WnhIi64PuaYlUM8NpHR Ci8pJ8I39o/9A0aic+pPPMWKkfajs/NPr5F1ZYe38GhcWUYRg1TkWudtW+JXWJbRGDV49H 8g8gBbNiEjJKPR8nz8KZpqxZwu4KBK0A98WqWE+gujZ+8pgWX3iezRJkgDsIGrUMZBdTCB cgCU4x03HUqeIiEBigmjlygUtN2AtGfWJSW5AkjcCySZW1APwlg7R3SDWMLsvYXdrQK0n3 0I9eso1zLx2yN8mBcysemLHWq2h9Z31HXoEmXKJRa9Xc5w/f1py4milGIyDnRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651756574; a=rsa-sha256; cv=none; b=DcqFeC5PqZbCP+pTIVs5jxunMG66TbS1V2lCjSBigxxzVNfjRftkOmJNPeoXAxR08pw5cs rhoZFqo7mdbZelwmimFw7jIHDwDChRbriPzbOAfblvAG++7PGEzFFYVwKamFWVbrwUCL7N YEtmeTNKd4Fwn542gHu1piSr7ar7f1Ejb7d2h/q0IxrcZvuyPpTEbutB7/e5tAHvj4qvxB pYjHbxdcycD/MjT92M/4Muw8Bh3DjPF8h0Jny99CjP9rbS/syVkXuCFeZDwx5l9Lf2fmo7 9o4rmXOCvwHqFA3PE+KGTMMwqVObEjzeIu4fM9dZiZrmNK5+k0Cx9kbz1gSaDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail3 header.b=N0B1bx4q; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lendvai.name header.s=protonmail3 header.b=N0B1bx4q; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BF41E973E X-Spam-Score: 2.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: mgvYzNKsUtVi > It takes the first result 'scandir' -- i.e., the 'smallest' file name > according to string-locale reproducibility problems) fair enough. what i meant to communicate is that it's arbitrary, not random= . another potential issue: if the root of the archive contains a file called 'environment-variables', = then this way it would overwrite the one generated by Guix. this may not ne= cessarily be an issue, though, if that file is never used after the unpack = phase. maybe the cleanest would be to: 1) mkdir a directory ('extracted/'?) and chdir into it prior to unpacking, and 2) only do the DWIM chdir if the toplevel of the archive was a single dir. but i lack the necessary perspective to see all the implications. -- =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CThere is always a philosophy for lack of courage.=E2=80=9D =09=E2=80=94 Albert Camus (1913=E2=80=931960)