From patchwork Mon Jan 10 23:14:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 36210 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 AB30E27BBEA; Mon, 10 Jan 2022 23:16:03 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0FC5427BBE9 for ; Mon, 10 Jan 2022 23:16:03 +0000 (GMT) Received: from localhost ([::1]:54730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n73tS-00079c-5d for patchwork@mira.cbaines.net; Mon, 10 Jan 2022 18:16:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n73sV-00079F-O7 for guix-patches@gnu.org; Mon, 10 Jan 2022 18:15:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n73sU-0006C5-KI for guix-patches@gnu.org; Mon, 10 Jan 2022 18:15:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n73sU-0004vh-Fc for guix-patches@gnu.org; Mon, 10 Jan 2022 18:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53040] [PATCH] gnu: bubblewrap: Update to 0.5.0. Resent-From: kiasoc5@tutanota.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 10 Jan 2022 23:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53040 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53040@debbugs.gnu.org Cc: ludo@gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.164185647418892 (code B ref -1); Mon, 10 Jan 2022 23:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jan 2022 23:14:34 +0000 Received: from localhost ([127.0.0.1]:53521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n73rz-0004ua-3E for submit@debbugs.gnu.org; Mon, 10 Jan 2022 18:14:34 -0500 Received: from lists.gnu.org ([209.51.188.17]:56380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n73rw-0004uQ-In for submit@debbugs.gnu.org; Mon, 10 Jan 2022 18:14:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n73rw-00075v-7Z for guix-patches@gnu.org; Mon, 10 Jan 2022 18:14:28 -0500 Received: from w1.tutanota.de ([81.3.6.162]:39194) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n73rr-00066q-Vx; Mon, 10 Jan 2022 18:14:26 -0500 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 785F2FBF5FB; Mon, 10 Jan 2022 23:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1641856459; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=hGVIEqgu5UOhdevNzyfd4Oc81JsAEMjTeS5XY+4UKsU=; b=fghNfCMStj4Y1nqpW+qd1caklWxMtFgfPNlCZLZoj6zHr5sMgWminzREJ9NOCJGp G+ZHsaZx9cAEQz0IkKGGg7CbhvEa7aZKtFTx/YjlTEnbBjfaY8RecCK96jg8rUoSKjf l5dgDoR8REI4WgIwG1tsdUpZIFbUkkKQIC7BIxGlnmbqQslzNZ5v+GjDhLJnHpzwUtE TBg1HPJxDJ32z/SkLC8CgPeGEh8Tbp1FSQFJdCO+BDL+yf2XjMUBXfW5JmHarlKCLFP vs6J1hIZlHKTCZ7j4d6xvllljspQ/buPvgjVehEwNCIZu76DJByofna+PPWsIxxuOvQ 6k+vtzOZJA== Date: Tue, 11 Jan 2022 00:14:19 +0100 (CET) Message-ID: In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=81.3.6.162; envelope-from=kiasoc5@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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" Reply-to: kiasoc5@tutanota.com X-ACL-Warn: , kiasoc5--- via Guix-patches X-Patchwork-Original-From: kiasoc5--- via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches Fixed locale in tests, thanks Ludo for the suggestion via email. Also fixed more test substitutions and simplified inputs. From f5c56100d62d315c3ed860898998a7c8afc78d50 Mon Sep 17 00:00:00 2001 From: kiasoc5 Date: Mon, 10 Jan 2022 17:58:35 -0500 Subject: [PATCH] gnu: bubblewrap: Update to 0.5.0. * gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch: Add it. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/virtualization.scm (bubblewrap): Update to 0.5.0. [source]: Add patch. [arguments]: Adjust test substitutions. [inputs]: Remove labels. [native-inputs]: Remove labels. --- gnu/local.mk | 1 + .../bubblewrap-fix-locale-in-tests.patch | 34 +++++++++++++++++++ gnu/packages/virtualization.scm | 24 ++++++++----- 3 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch diff --git a/gnu/local.mk b/gnu/local.mk index fe21cf8062..c511d78c07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -910,6 +910,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ %D%/packages/patches/byobu-writable-status.patch \ + %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ %D%/packages/patches/cabal-install-base16-bytestring1.0.patch \ %D%/packages/patches/cabal-install-ghc8.10.patch \ %D%/packages/patches/cairo-CVE-2018-19876.patch \ diff --git a/gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch b/gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch new file mode 100644 index 0000000000..bd5924ef87 --- /dev/null +++ b/gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch @@ -0,0 +1,34 @@ +From 9282223de4b511aeda3b7d2caf3810a56a865710 Mon Sep 17 00:00:00 2001 +From: kiasoc5 +Date: Mon, 10 Jan 2022 14:16:32 -0500 +Subject: [PATCH] Use C locale unconditionally for tests. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The ‘en_US.utf8’ locale is available. However, the ‘locale -a’ command won’t list it. +--- + tests/libtest-core.sh | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh +index 9632e90..82951dd 100644 +--- a/tests/libtest-core.sh ++++ b/tests/libtest-core.sh +@@ -41,12 +41,7 @@ assert_not_reached () { + # + # If we can't find the locale command assume we have support for C.UTF-8 + # (e.g. musl based systems) +-if type -p locale >/dev/null; then +- export LC_ALL=$(locale -a | grep -iEe '^(C|en_US)\.(UTF-8|utf8)$' | head -n1 || true) +- if [ -z "${LC_ALL}" ]; then fatal "Can't find suitable UTF-8 locale"; fi +-else +- export LC_ALL=C.UTF-8 +-fi ++export LC_ALL=en_US.utf8 + # A GNU extension, used whenever LC_ALL is not C + unset LANGUAGE + +-- +2.34.1 + diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 6a40955dbb..39acb90570 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1927,7 +1927,7 @@ (define-public python-vagrant (define-public bubblewrap (package (name "bubblewrap") - (version "0.4.1") + (version "0.5.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/containers/bubblewrap/" @@ -1935,7 +1935,8 @@ (define-public bubblewrap version ".tar.xz")) (sha256 (base32 - "00ycgi6q2yngh06bnz50wkvar6r2jnjf3j158grhi9k13jdrpimr")))) + "0608l2sjwhnb1c0mslah1h6yjvqr17wk60by6i710qwxg4rszz8n")) + (patches (search-patches "bubblewrap-fix-locale-in-tests.patch")))) (build-system gnu-build-system) (arguments `(#:phases @@ -1951,7 +1952,9 @@ (define-public bubblewrap (substitute* "tests/test-run.sh" (("/var/tmp") tmp-dir) ;; Tests create a temporary python script, so fix its shebang. - (("/usr/bin/env python") (which "python")) + (("/usr/bin/env python3") (which "python3")) + ;; Tests call /usr/bin/env, so fix its path. + (("/usr/bin/env") (which "env")) ;; Some tests try to access /usr, but that doesn't exist. ;; Give them /gnu instead. (("/usr") "/gnu") @@ -1960,18 +1963,21 @@ (define-public bubblewrap (("--ro-bind /lib /lib") "--ro-bind /gnu /lib") ((" */bin/bash") (which "bash")) (("/bin/sh") (which "sh")) - (("findmnt") (which "findmnt")))) + (("findmnt") (which "findmnt"))) + (substitute* "tests/libtest.sh" + (("/var/tmp") tmp-dir) + (("/usr") "/gnu") + (("--ro-bind /bin /bin") "--ro-bind /gnu /bin") + (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin") + (("--ro-bind /lib /lib") "--ro-bind /gnu /lib"))) #t)) ;; Remove the directory we gave to tests to have a clean package. (add-after 'check 'remove-tmp-dir (lambda* (#:key outputs #:allow-other-keys) (delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp")) #t))))) - (inputs - (list libcap)) - (native-inputs - `(("python" ,python-wrapper) - ("util-linux" ,util-linux))) + (inputs (list libcap)) + (native-inputs (list python-wrapper util-linux)) (home-page "https://github.com/containers/bubblewrap") (synopsis "Unprivileged sandboxing tool") (description "Bubblewrap is aimed at running applications in a sandbox, base-commit: 19a4759cadf601f40d2a32efdbf6190d7341a8ca -- 2.34.1