Package: php-crypt-gpg / 1.6.4-2+deb11u1

Metadata

Package Version Patches format
php-crypt-gpg 1.6.4-2+deb11u1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
Group write if write access is needed.patch | (download)

Crypt_GPG-1.6.4/tests/GeneralTest.php | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 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.

Fix FTBFS with phpunit 8.5.13 1.patch | (download)

Crypt_GPG-1.6.4/tests/ImportKeyTest.php | 2 1 + 1 - 0 !
Crypt_GPG-1.6.4/tests/KeyGeneratorTest.php | 2 1 + 1 - 0 !
Crypt_GPG-1.6.4/tests/TestCase.php | 4 2 + 2 - 0 !
3 files changed, 4 insertions(+), 4 deletions(-)

 fix ftbfs with phpunit 8.5.13-1.

Fix FTBFS with phpunit 9.5.0 1.patch | (download)

Crypt_GPG-1.6.4/tests/DecryptAndVerifyTest.php | 36 12 + 24 - 0 !
Crypt_GPG-1.6.4/tests/DecryptTest.php | 30 10 + 20 - 0 !
Crypt_GPG-1.6.4/tests/DeletePrivateKeyTest.php | 6 2 + 4 - 0 !
Crypt_GPG-1.6.4/tests/DeletePublicKeyTest.php | 6 2 + 4 - 0 !
Crypt_GPG-1.6.4/tests/EncryptAndSignTest.php | 24 8 + 16 - 0 !
Crypt_GPG-1.6.4/tests/EncryptTest.php | 12 4 + 8 - 0 !
Crypt_GPG-1.6.4/tests/ExceptionsTest.php | 40 20 + 20 - 0 !
Crypt_GPG-1.6.4/tests/ExportPrivateKeyTest.php | 10 4 + 6 - 0 !
Crypt_GPG-1.6.4/tests/ExportPublicKeyTest.php | 5 2 + 3 - 0 !
Crypt_GPG-1.6.4/tests/GeneralTest.php | 38 11 + 27 - 0 !
Crypt_GPG-1.6.4/tests/ImportKeyTest.php | 12 4 + 8 - 0 !
Crypt_GPG-1.6.4/tests/KeyGeneratorTest.php | 194 118 + 76 - 0 !
Crypt_GPG-1.6.4/tests/SignTest.php | 18 6 + 12 - 0 !
Crypt_GPG-1.6.4/tests/VerifyTest.php | 15 5 + 10 - 0 !
14 files changed, 208 insertions(+), 238 deletions(-)

 fix ftbfs with phpunit 9.5.0-1.

Preemptively fix FTBFS with phpunit 10.patch | (download)

Crypt_GPG-1.6.4/tests/DecryptAndVerifyTest.php | 2 1 + 1 - 0 !
Crypt_GPG-1.6.4/tests/DecryptTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/DeletePrivateKeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/DeletePublicKeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/EncryptAndSignTest.php | 2 1 + 1 - 0 !
Crypt_GPG-1.6.4/tests/EncryptTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/ExceptionsTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/ExportPrivateKeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/ExportPublicKeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/GeneralTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/GetFingerprintTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/GetKeysTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/ImportKeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/KeyGeneratorTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/KeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/SignTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/SignatureTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/SubKeyTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/UserIdTest.php | 4 2 + 2 - 0 !
Crypt_GPG-1.6.4/tests/VerifyTest.php | 4 2 + 2 - 0 !
20 files changed, 38 insertions(+), 38 deletions(-)

 preemptively fix ftbfs with phpunit 10.

As of phpunit 9.5.0-3, the test suite passes but spits a bunch of
warnings:

    Warning:    Test case class not matching filename is deprecated in
                /<<PKGBUILDDIR>>/Crypt_GPG-1.6.4/tests/DecryptAndVerifyTest.php
                Class name was 'DecryptAndVerifyTestCase', expected 'DecryptAndVerifyTest'
    Warning:    Test case class not matching filename is deprecated in
                /<<PKGBUILDDIR>>/Crypt_GPG-1.6.4/tests/DecryptTest.php
                Class name was 'DecryptTestCase', expected 'DecryptTest'
    []

To fix this we simply drop the Case suffix from the class name:

    for p in Crypt_GPG-*/tests/*Test.php; do
        t="${p##*/}"
        t="${t%.php}"
        if grep -Fxq "class ${t}Case extends Crypt_GPG_TestCase" "$p"; then
            sed -ri "s/\b${t}Case\b/$t/" -- "$p"
        fi
    done

Insert the end of options marker before operation argumen.patch | (download)

Crypt_GPG-1.6.4/Crypt/GPG.php | 8 4 + 4 - 0 !
Crypt_GPG-1.6.4/Crypt/GPGAbstract.php | 4 2 + 2 - 0 !
2 files changed, 6 insertions(+), 6 deletions(-)

 insert the end-of-options marker before operation arguments.

This marker stops the parsing of additional options during external
calls to GPG. This behavior is unintended but its security impact is
dependent on the environment and the GPG version in use.