# [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x

8 messages from 2014-12-11 to 2014-12-12. Participants: Christian Hesse, Torsten Bögershausen, Michael J Gruber, Junio C Hamano.
Thread: https://gitlist.dev/t/38165

## Christian Hesse, 2014-12-11 09:30

Subject: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <1418290234-21516-1-git-send-email-mail@eworm.de>
URL: https://gitlist.dev/e/1418290234-21516-1-git-send-email-mail%40eworm.de

```
---
 t/lib-gpg.sh   |  6 ++++++
 t/t7004-tag.sh | 14 +++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index cd2baef..05b07c6 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -22,6 +22,12 @@ else
 		GNUPGHOME="$(pwd)/gpghome"
 		export GNUPGHOME
 		test_set_prereq GPG
+		case "$gpg_version" in
+		'gpg (GnuPG) 2.1.'*)
+			say "Your version of gpg (2.1.x) is missing some legacy features"
+			test_set_prereq GNUPG21
+			;;
+		esac
 		;;
 	esac
 fi
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 796e9f7..1c40967 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1081,7 +1081,7 @@ test_expect_success GPG \
 get_tag_header rfc1991-signed-tag $commit commit $time >expect
 echo "RFC1991 signed tag" >>expect
 echo '-----BEGIN PGP MESSAGE-----' >>expect
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'creating a signed tag with rfc1991' '
 	echo "rfc1991" >gpghome/gpg.conf &&
 	git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
@@ -1095,7 +1095,7 @@ cp "$1" actual
 EOF
 chmod +x fakeeditor
 
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'reediting a signed tag body omits signature' '
 	echo "rfc1991" >gpghome/gpg.conf &&
 	echo "RFC1991 signed tag" >expect &&
@@ -1103,13 +1103,13 @@ test_expect_success GPG \
 	test_cmp expect actual
 '
 
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'verifying rfc1991 signature' '
 	echo "rfc1991" >gpghome/gpg.conf &&
 	git tag -v rfc1991-signed-tag
 '
 
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'list tag with rfc1991 signature' '
 	echo "rfc1991" >gpghome/gpg.conf &&
 	echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
@@ -1123,12 +1123,12 @@ test_expect_success GPG \
 
 rm -f gpghome/gpg.conf
 
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'verifying rfc1991 signature without --rfc1991' '
 	git tag -v rfc1991-signed-tag
 '
 
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'list tag with rfc1991 signature without --rfc1991' '
 	echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
 	git tag -l -n1 rfc1991-signed-tag >actual &&
@@ -1139,7 +1139,7 @@ test_expect_success GPG \
 	test_cmp expect actual
 '
 
-test_expect_success GPG \
+test_expect_success GPG,!GNUPG21 \
 	'reediting a signed tag body omits signature' '
 	echo "RFC1991 signed tag" >expect &&
 	GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
-- 
2.1.3

```

## Torsten Bögershausen, 2014-12-11 15:32

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <5489B90B.6070706@web.de>
URL: https://gitlist.dev/e/5489B90B.6070706%40web.de
In-Reply-To: <1418290234-21516-1-git-send-email-mail@eworm.de>

```
On 11.12.14 10:30, Christian Hesse wrote:
> ---
>  t/lib-gpg.sh   |  6 ++++++
>  t/t7004-tag.sh | 14 +++++++-------
>  2 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
> index cd2baef..05b07c6 100755
> --- a/t/lib-gpg.sh
> +++ b/t/lib-gpg.sh
> @@ -22,6 +22,12 @@ else
>  		GNUPGHOME="$(pwd)/gpghome"
>  		export GNUPGHOME
>  		test_set_prereq GPG
> +		case "$gpg_version" in
> +		'gpg (GnuPG) 2.1.'*)
> +			say "Your version of gpg (2.1.x) is missing some legacy features"
> +			test_set_prereq GNUPG21
> +			;;
> +		esac
>  		;;
>  	esac
>  fi
We do not really need the GNUPG21 (and we don't need to touch the TC at all)
		case "$gpg_version" in
		'gpg (GnuPG) 2.1.'*)
			say "Your version of gpg (2.1.x) is missing some legacy features"
			;;
		*)
			test_set_prereq GPG
			;;

		esac
  		;;

```

## Michael J Gruber, 2014-12-11 16:54

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <5489CC60.7080704@drmicha.warpmail.net>
URL: https://gitlist.dev/e/5489CC60.7080704%40drmicha.warpmail.net
In-Reply-To: <5489B90B.6070706@web.de>

```
Torsten Bögershausen schrieb am 11.12.2014 um 16:32:
> On 11.12.14 10:30, Christian Hesse wrote:
>> ---
>>  t/lib-gpg.sh   |  6 ++++++
>>  t/t7004-tag.sh | 14 +++++++-------
>>  2 files changed, 13 insertions(+), 7 deletions(-)
>>
>> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
>> index cd2baef..05b07c6 100755
>> --- a/t/lib-gpg.sh
>> +++ b/t/lib-gpg.sh
>> @@ -22,6 +22,12 @@ else
>>  		GNUPGHOME="$(pwd)/gpghome"
>>  		export GNUPGHOME
>>  		test_set_prereq GPG
>> +		case "$gpg_version" in
>> +		'gpg (GnuPG) 2.1.'*)
>> +			say "Your version of gpg (2.1.x) is missing some legacy features"
>> +			test_set_prereq GNUPG21
>> +			;;
>> +		esac
>>  		;;
>>  	esac
>>  fi
> We do not really need the GNUPG21 (and we don't need to touch the TC at all)
> 		case "$gpg_version" in
> 		'gpg (GnuPG) 2.1.'*)
> 			say "Your version of gpg (2.1.x) is missing some legacy features"
> 			;;
> 		*)
> 			test_set_prereq GPG
> 			;;
> 
> 		esac
>   		;;
> 

That would disable all GPG tests, which is pretty harsh.

If gpg 2.1 is the future of gpg (which I don't know), which should
rather prepare for that and make our tests independent of the version.
Is gpg 2.1 stable enough to cater for its special needs?

Michael

```

## Christian Hesse, 2014-12-11 22:44

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <20141211234405.3513d5d7@leda.localdomain>
URL: https://gitlist.dev/e/20141211234405.3513d5d7%40leda.localdomain
In-Reply-To: <5489CC60.7080704@drmicha.warpmail.net>

```
Michael J Gruber <git@drmicha.warpmail.net> on Thu, 2014/12/11 17:54:
> Torsten Bögershausen schrieb am 11.12.2014 um 16:32:
> > On 11.12.14 10:30, Christian Hesse wrote:
> >> ---
> >>  t/lib-gpg.sh   |  6 ++++++
> >>  t/t7004-tag.sh | 14 +++++++-------
> >>  2 files changed, 13 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
> >> index cd2baef..05b07c6 100755
> >> --- a/t/lib-gpg.sh
> >> +++ b/t/lib-gpg.sh
> >> @@ -22,6 +22,12 @@ else
> >>  		GNUPGHOME="$(pwd)/gpghome"
> >>  		export GNUPGHOME
> >>  		test_set_prereq GPG
> >> +		case "$gpg_version" in
> >> +		'gpg (GnuPG) 2.1.'*)
> >> +			say "Your version of gpg (2.1.x) is missing
> >> some legacy features"
> >> +			test_set_prereq GNUPG21
> >> +			;;
> >> +		esac
> >>  		;;
> >>  	esac
> >>  fi
> > We do not really need the GNUPG21 (and we don't need to touch the TC at
> > all) case "$gpg_version" in
> > 		'gpg (GnuPG) 2.1.'*)
> > 			say "Your version of gpg (2.1.x) is missing some
> > legacy features" ;;
> > 		*)
> > 			test_set_prereq GPG
> > 			;;
> > 
> > 		esac
> >   		;;
> > 
> 
> That would disable all GPG tests, which is pretty harsh.

Agreed. ;)

It's just six tests we have to disable. Everything else works just perfectly.

> If gpg 2.1 is the future of gpg (which I don't know), which should
> rather prepare for that and make our tests independent of the version.
> Is gpg 2.1 stable enough to cater for its special needs?

GnuPG 2.0.x is still the official stable, 2.1.x is the "modern" branch. Looks
like the decision about whether or not 2.1.x will be stable has not been made
yet.

Though "official stable" is to be read as "absolutely rock solid stable"
IMHO. That is what enterprise distributions should use.
The modern branch is stable for daily use but has some experimental features.
Arch Linux for example already uses it [0], so stability can not be that
bad. ;)

However... Even if GnuPG 2.2.x (or whatever future release) will become next
stable: It will not reintroduce support for rfc1991. So applying my patch is
the way to go. (And version 2 of the patch even simplifies things and makes it
more generic.)

[0] https://www.archlinux.org/packages/?name=gnupg
-- 
Best Regards,
Chris

```

## Junio C Hamano, 2014-12-11 23:10

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <xmqqegs5dbqu.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqegs5dbqu.fsf%40gitster.dls.corp.google.com
In-Reply-To: <20141211234405.3513d5d7@leda.localdomain>

```
Christian Hesse <mail@eworm.de> writes:

> However... Even if GnuPG 2.2.x (or whatever future release) will become next
> stable: It will not reintroduce support for rfc1991.

How certain are we about the deprecation?

It also would make us feel safer if we did not have to depend on the
version or keyfile format (which would not have anything to do with
the decision to support or not to support rfc1991 format) to check
if the feature is supported, but that is a separate issue.

```

## Christian Hesse, 2014-12-12 08:35

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <20141212093543.5175e7a5@leda.localdomain>
URL: https://gitlist.dev/e/20141212093543.5175e7a5%40leda.localdomain
In-Reply-To: <xmqqegs5dbqu.fsf@gitster.dls.corp.google.com>

```
Junio C Hamano <gitster@pobox.com> on Thu, 2014/12/11 15:10:
> Christian Hesse <mail@eworm.de> writes:
> 
> > However... Even if GnuPG 2.2.x (or whatever future release) will become
> > next stable: It will not reintroduce support for rfc1991.
> 
> How certain are we about the deprecation?

The sixth beta of GnuPG [0] had this change:

 * gpg: Removed the option --pgp2 and --rfc1991 and the ability to
   create PGP-2 compatible messages.

> It also would make us feel safer if we did not have to depend on the
> version or keyfile format (which would not have anything to do with
> the decision to support or not to support rfc1991 format) to check
> if the feature is supported, but that is a separate issue.

Changed in next version.

[0] http://lists.gnupg.org/pipermail/gnupg-announce/2014q3/000354.html
-- 
Best regards,
Chris

```

## Christian Hesse, 2014-12-12 09:54

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <20141212105444.50adca35@leda.localdomain>
URL: https://gitlist.dev/e/20141212105444.50adca35%40leda.localdomain
In-Reply-To: <20141212093543.5175e7a5@leda.localdomain>

```
Christian Hesse <mail@eworm.de> on Fri, 2014/12/12 09:35:
> Junio C Hamano <gitster@pobox.com> on Thu, 2014/12/11 15:10:
> > Christian Hesse <mail@eworm.de> writes:
> >   
> > > However... Even if GnuPG 2.2.x (or whatever future release) will become
> > > next stable: It will not reintroduce support for rfc1991.  
> > 
> > How certain are we about the deprecation?  
> 
> The sixth beta of GnuPG [0] had this change:
> 
>  * gpg: Removed the option --pgp2 and --rfc1991 and the ability to
>    create PGP-2 compatible messages.

This is the corresponding commit:

http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2b8d8369d59249b89526c18c5ac276e6445dc35e
-- 
Best regards,
Chris

```

## Michael J Gruber, 2014-12-12 16:00

Subject: Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
Message-ID: <548B1129.80202@drmicha.warpmail.net>
URL: https://gitlist.dev/e/548B1129.80202%40drmicha.warpmail.net
In-Reply-To: <20141212105444.50adca35@leda.localdomain>

```
Christian Hesse schrieb am 12.12.2014 um 10:54:
> Christian Hesse <mail@eworm.de> on Fri, 2014/12/12 09:35:
>> Junio C Hamano <gitster@pobox.com> on Thu, 2014/12/11 15:10:
>>> Christian Hesse <mail@eworm.de> writes:
>>>   
>>>> However... Even if GnuPG 2.2.x (or whatever future release) will become
>>>> next stable: It will not reintroduce support for rfc1991.  
>>>
>>> How certain are we about the deprecation?  
>>
>> The sixth beta of GnuPG [0] had this change:
>>
>>  * gpg: Removed the option --pgp2 and --rfc1991 and the ability to
>>    create PGP-2 compatible messages.
> 
> This is the corresponding commit:
> 
> http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2b8d8369d59249b89526c18c5ac276e6445dc35e
> 

So, in fact, gpg2.1 removes support for creating pgp2 (rfc1991)
signatures only. That is: We could put an armor exported signature
into our test suite, test verification against that signature,
and restrict the test for creation of that signature by gpg version (or
skip it completely).

Michael

```
