File: Group-write-if-write-access-is-needed.patch

package info (click to toggle)
php-crypt-gpg 1.6.11-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,376 kB
  • sloc: php: 9,156; xml: 191; makefile: 8
file content (38 lines) | stat: -rw-r--r-- 1,275 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: David Prévot <david@tilapin.org>
Date: Fri, 25 Mar 2016 14:20:33 -0400
Subject: Group write if write access is needed

In the build and autopkgtest environment ~/.gnupg is not accessible and
cannot be created, failing GeneralTestCase::testSetEngine with

    Crypt_GPG_FileException: The 'homedir' "…/.gnupg" is not readable or
    does not exist and cannot be created. This can happen if 'homedir'
    is not specified in the Crypt_GPG options, Crypt_GPG is run as the
    web user, and the web user has no home directory.

Forwarded: not-needed
---
 Crypt_GPG-1.6.11/tests/GeneralTest.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Crypt_GPG-1.6.11/tests/GeneralTest.php b/Crypt_GPG-1.6.11/tests/GeneralTest.php
index 8941af0..6a7f704 100644
--- a/Crypt_GPG-1.6.11/tests/GeneralTest.php
+++ b/Crypt_GPG-1.6.11/tests/GeneralTest.php
@@ -40,6 +40,8 @@
  * @link      http://pear.php.net/package/Crypt_GPG
  */
 
+use PHPUnit\Framework\Attributes\Group;
+
 /**
  * Base test case.
  */
@@ -140,6 +142,7 @@ class GeneralTest extends Crypt_GPG_TestCase
         new Crypt_GPG(['gpgBinary' => './non-existent-binary']);
     }
 
+    #[Group('write')]
     public function testSetEngine()
     {
         $engine = new Crypt_GPG_Engine($this->getOptions());