threads / patch / 38165

patchskip RFC1991 tests with gnupg 2.1.x

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

## tl;dr

8 messages between Dec 11, 2014 and Dec 12, 2014. Diffs are folded; open one to read it.

replies: 7people: 4as markdown or json

Christian Hesse· Dec 11, 2014, 09:30 UTC · lore
---
 t/lib-gpg.sh   |  6 ++++++
 t/t7004-tag.sh | 14 +++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
Show changes to 2 files +13 −7

t/lib-gpg.sh, t/t7004-tag.sh

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· Dec 11, 2014, 15:32 UTC · re: Christian Hesse · lore

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

On 11.12.14 10:30, Christian Hesse wrote:
Show 22 quoted lines
> ---
>  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· Dec 11, 2014, 16:54 UTC · re: Torsten Bögershausen · lore

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

Torsten Bögershausen schrieb am 11.12.2014 um 16:32:
Show 35 quoted lines
> 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· Dec 11, 2014, 22:44 UTC · re: Michael J Gruber · lore

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

Michael J Gruber <git@drmicha.warpmail.net> on Thu, 2014/12/11 17:54:
Show 39 quoted lines
> 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· Dec 11, 2014, 23:10 UTC · re: Christian Hesse · lore

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

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· Dec 12, 2014, 08:35 UTC · re: Junio C Hamano · lore

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

Junio C Hamano <gitster@pobox.com> on Thu, 2014/12/11 15:10:
Show 6 quoted lines
> 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· Dec 12, 2014, 09:54 UTC · re: Christian Hesse · lore

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

Christian Hesse <mail@eworm.de> on Fri, 2014/12/12 09:35:
Show 12 quoted lines
> 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· Dec 12, 2014, 16:00 UTC · re: Christian Hesse · lore

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

Christian Hesse schrieb am 12.12.2014 um 10:54:
Show 18 quoted lines
> 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

← back to recent threads