summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-06-11 23:30:32 +0200
committerMarius Bakke <marius@gnu.org>2020-06-11 23:30:32 +0200
commit9b043df7403a10b35b93d133aac796fd277a7339 (patch)
treef712922d9348ececc0d84e360ac653df3b8d2473 /gnu/packages/patches
parentd79ec4fd343bc2a72652aa3a4b4ae14bd8df88ac (diff)
parent648ae62112f62bc2106fb36d45c83fda787d3bed (diff)
downloadguix-9b043df7403a10b35b93d133aac796fd277a7339.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/dhall-remove-network-tests.patch97
-rw-r--r--gnu/packages/patches/exercism-disable-self-update.patch79
2 files changed, 79 insertions, 97 deletions
diff --git a/gnu/packages/patches/dhall-remove-network-tests.patch b/gnu/packages/patches/dhall-remove-network-tests.patch
deleted file mode 100644
index c260e7844d..0000000000
--- a/gnu/packages/patches/dhall-remove-network-tests.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-diff a/dhall-lang/tests/import/failure/referentiallyInsane.dhall b/dhall-lang/tests/import/failure/referentiallyInsane.dhall
---- a/dhall-lang/tests/import/failure/referentiallyInsane.dhall
-+++ /dev/null
-@@ -1,13 +0,0 @@
--{- The following remote import attempts to import an environment variable, which
--   must be disallowed by the referential sanity check
--
--   One reason for doing this is to protect against remote imports exfiltrating
--   environment variables (such as via custom headers).  Only referentially
--   opaque imports (i.e. local imports) have permission to refer to other
--   referentially opaque imports in order to protect against this attack.
--
--   The referential sanity check also ensures that remote imports are
--   referentially transparent.  Or in other words, any import that is globally
--   addressable must have a meaning that is not context-sensitive.
---}
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall
-diff a/dhall-lang/tests/import/success/customHeadersA.dhall b/dhall-lang/tests/import/success/customHeadersA.dhall
---- a/dhall-lang/tests/import/success/customHeadersA.dhall
-+++ /dev/null
-@@ -1,3 +0,0 @@
--https://httpbin.org/user-agent
--  using [ { mapKey = "User-Agent", mapValue = "Dhall" } ]
--  as Text
-diff a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall b/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
---- a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
-+++ /dev/null
-@@ -1,6 +0,0 @@
--{- The purpose of this test is to verify that the custom headers supplied to
--   this import are not forwarded to the transitive import of
--   https://httpbin.org/user-agent
---}
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/success/customHeadersA.dhall
--  using [ { mapKey = "User-Agent", mapValue = "Secret" } ]
-diff a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall b/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
---- a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/example.txt as Text
-diff a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall b/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
---- a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simpleLocation.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
-+++ /dev/null
-@@ -1,5 +0,0 @@
--{-
--    This test verifies that `env:VAR as Location` isn't rejected as referentially opaque,
--    as `env:VAR` on its own would.
---}
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/EnvA.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
-+++ /dev/null
-@@ -1,6 +0,0 @@
--{- This test verifies that `missing as Location` succeeds when chained since:
--   * The `missing` is never actually resolved (due to the `as Location`)
--   * The `missing` should be treated as referentially transparent (and therefore
--     be a valid transitive dependency of a remote import)
---}
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/MissingA.dhall
-diff a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
---- a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
-+++ /dev/null
-@@ -1,6 +0,0 @@
--{-
--    This URL returns (probably) a different result for each request. This test
--    ensures that import results for a given URL are correctly cached within an
--    execution of dhall.
---}
--let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text in 0
-diff a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
---- a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
-+++ /dev/null
-@@ -1,5 +0,0 @@
--{-
--    This URL returns (probably) a different result for each request. This test
--    ensures that import locations are canonicalized before being cached.
---}
--let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/../csrng/csrng.php?min=0&max=1000 as Text in 0
diff --git a/gnu/packages/patches/exercism-disable-self-update.patch b/gnu/packages/patches/exercism-disable-self-update.patch
new file mode 100644
index 0000000000..a96cbfbc55
--- /dev/null
+++ b/gnu/packages/patches/exercism-disable-self-update.patch
@@ -0,0 +1,79 @@
+From bc22f7d43c12c5f79c71b0319666e71f29d61322 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= <kuba@kadziolka.net>
+Date: Mon, 25 May 2020 18:53:04 +0200
+Subject: [PATCH] Disable self-update.
+
+Based on a Fedora patch by Elliott Sales de Andrade.
+---
+ cli/cli.go | 44 +-------------------------------------------
+ 1 file changed, 1 insertion(+), 43 deletions(-)
+
+diff --git a/cli/cli.go b/cli/cli.go
+index 4312eb0..5f62297 100644
+--- a/cli/cli.go
++++ b/cli/cli.go
+@@ -10,13 +10,10 @@ import (
+ 	"io"
+ 	"io/ioutil"
+ 	"net/http"
+-	"runtime"
+ 	"strings"
+ 	"time"
+ 
+ 	"github.com/blang/semver"
+-	"github.com/exercism/cli/debug"
+-	update "github.com/inconshreveable/go-update"
+ )
+ 
+ var (
+@@ -95,46 +92,7 @@ func (c *CLI) IsUpToDate() (bool, error) {
+ 
+ // Upgrade allows the user to upgrade to the latest version of the CLI.
+ func (c *CLI) Upgrade() error {
+-	var (
+-		OS   = osMap[runtime.GOOS]
+-		ARCH = archMap[runtime.GOARCH]
+-	)
+-
+-	if OS == "" || ARCH == "" {
+-		return fmt.Errorf("unable to upgrade: OS %s ARCH %s", OS, ARCH)
+-	}
+-
+-	buildName := fmt.Sprintf("%s-%s", OS, ARCH)
+-	if BuildARCH == "arm" {
+-		if BuildARM == "" {
+-			return fmt.Errorf("unable to upgrade: arm version not found")
+-		}
+-		buildName = fmt.Sprintf("%s-v%s", buildName, BuildARM)
+-	}
+-
+-	var downloadRC *bytes.Reader
+-	for _, a := range c.LatestRelease.Assets {
+-		if strings.Contains(a.Name, buildName) {
+-			debug.Printf("Downloading %s\n", a.Name)
+-			var err error
+-			downloadRC, err = a.download()
+-			if err != nil {
+-				return fmt.Errorf("error downloading executable: %s", err)
+-			}
+-			break
+-		}
+-	}
+-	if downloadRC == nil {
+-		return fmt.Errorf("no executable found for %s/%s%s", BuildOS, BuildARCH, BuildARM)
+-	}
+-
+-	bin, err := extractBinary(downloadRC, OS)
+-	if err != nil {
+-		return err
+-	}
+-	defer bin.Close()
+-
+-	return update.Apply(bin, update.Options{})
++	return fmt.Errorf("Please use Guix to update Exercism")
+ }
+ 
+ func (c *CLI) fetchLatestRelease() error {
+-- 
+2.26.2
+