git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
@ 2014-12-11  9:30 Christian Hesse
  2014-12-11 15:32 ` Torsten Bögershausen
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Hesse @ 2014-12-11  9:30 UTC (permalink / raw)
  To: git; +Cc: Christian Hesse

---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-11  9:30 [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x Christian Hesse
@ 2014-12-11 15:32 ` Torsten Bögershausen
  2014-12-11 16:54   ` Michael J Gruber
  0 siblings, 1 reply; 8+ messages in thread
From: Torsten Bögershausen @ 2014-12-11 15:32 UTC (permalink / raw)
  To: Christian Hesse, git

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
  		;;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-11 15:32 ` Torsten Bögershausen
@ 2014-12-11 16:54   ` Michael J Gruber
  2014-12-11 22:44     ` Christian Hesse
  0 siblings, 1 reply; 8+ messages in thread
From: Michael J Gruber @ 2014-12-11 16:54 UTC (permalink / raw)
  To: Torsten Bögershausen, Christian Hesse, git

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-11 16:54   ` Michael J Gruber
@ 2014-12-11 22:44     ` Christian Hesse
  2014-12-11 23:10       ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Hesse @ 2014-12-11 22:44 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Torsten Bögershausen, git

[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-11 22:44     ` Christian Hesse
@ 2014-12-11 23:10       ` Junio C Hamano
  2014-12-12  8:35         ` Christian Hesse
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2014-12-11 23:10 UTC (permalink / raw)
  To: Christian Hesse; +Cc: Michael J Gruber, Torsten Bögershausen, git

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-11 23:10       ` Junio C Hamano
@ 2014-12-12  8:35         ` Christian Hesse
  2014-12-12  9:54           ` Christian Hesse
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Hesse @ 2014-12-12  8:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Michael J Gruber, Torsten Bögershausen, git

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-12  8:35         ` Christian Hesse
@ 2014-12-12  9:54           ` Christian Hesse
  2014-12-12 16:00             ` Michael J Gruber
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Hesse @ 2014-12-12  9:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Michael J Gruber, Torsten Bögershausen, git

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x
  2014-12-12  9:54           ` Christian Hesse
@ 2014-12-12 16:00             ` Michael J Gruber
  0 siblings, 0 replies; 8+ messages in thread
From: Michael J Gruber @ 2014-12-12 16:00 UTC (permalink / raw)
  To: Christian Hesse, Junio C Hamano; +Cc: Torsten Bögershausen, git

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-12 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11  9:30 [PATCH 1/1] skip RFC1991 tests with gnupg 2.1.x Christian Hesse
2014-12-11 15:32 ` Torsten Bögershausen
2014-12-11 16:54   ` Michael J Gruber
2014-12-11 22:44     ` Christian Hesse
2014-12-11 23:10       ` Junio C Hamano
2014-12-12  8:35         ` Christian Hesse
2014-12-12  9:54           ` Christian Hesse
2014-12-12 16:00             ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).