diff --git a/common/homedir.c b/common/homedir.c index 392910867..a73182e30 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -1864,20 +1864,10 @@ gnupg_module_name (int which) X(bindir, "sm", "gpgsm"); case GNUPG_MODULE_NAME_GPG: -#if USE_GPG2_HACK - if (! gnupg_build_directory) - X(bindir, "g10", GPG_NAME "2"); - else -#endif - X(bindir, "g10", GPG_NAME); + X(bindir, "g10", GPG_NAME); case GNUPG_MODULE_NAME_GPGV: -#if USE_GPG2_HACK - if (! gnupg_build_directory) - X(bindir, "g10", GPG_NAME "v2"); - else -#endif - X(bindir, "g10", GPG_NAME "v"); + X(bindir, "g10", GPG_NAME "v"); case GNUPG_MODULE_NAME_CONNECT_AGENT: X(bindir, "tools", "gpg-connect-agent"); diff --git a/configure.ac b/configure.ac index c8999d923..29592fd41 100644 --- a/configure.ac +++ b/configure.ac @@ -233,18 +233,6 @@ test -n "$GNUPG_DIRMNGR_LDAP_PGM" \ && show_gnupg_dirmngr_ldap_pgm="$GNUPG_DIRMNGR_LDAP_PGM" -# -# For a long time gpg 2.x was installed as gpg2. This changed with -# 2.2. This option can be used to install gpg under the name gpg2. -# -AC_ARG_ENABLE(gpg-is-gpg2, - AS_HELP_STRING([--enable-gpg-is-gpg2],[Set installed name of gpg to gpg2]), - gpg_is_gpg2=$enableval) -if test "$gpg_is_gpg2" = "yes"; then - AC_DEFINE(USE_GPG2_HACK, 1, [Define to install gpg as gpg2]) -fi -AM_CONDITIONAL(USE_GPG2_HACK, test "$gpg_is_gpg2" = "yes") - # SELinux support includes tracking of sensitive files to avoid # leaking their contents through processing these files by gpg itself diff --git a/doc/gpg.texi b/doc/gpg.texi index a58b1bcc1..e88ba8589 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -12,8 +12,6 @@ @cindex options, GPG command -@c Begin standard stuff -@ifclear gpgtwohack @manpage gpg.1 @ifset manverb .B gpg @@ -31,30 +29,6 @@ .I command .RI [ args ] @end ifset -@end ifclear -@c End standard stuff - -@c Begin gpg2 hack stuff -@ifset gpgtwohack -@manpage gpg2.1 -@ifset manverb -.B gpg2 -\- OpenPGP encryption and signing tool -@end ifset - -@mansect synopsis -@ifset manverb -.B gpg2 -.RB [ \-\-homedir -.IR dir ] -.RB [ \-\-options -.IR file ] -.RI [ options ] -.I command -.RI [ args ] -@end ifset -@end ifset -@c End gpg2 hack stuff @mansect description @@ -68,18 +42,11 @@ There are two main versions of GnuPG: GnuPG 1.x and GnuPG 2.x. GnuPG 2.x supports modern encryption algorithms and thus should be preferred over GnuPG 1.x. You only need to use GnuPG 1.x if your platform doesn't support GnuPG 2.x, or you need support for some features that -GnuPG 2.x has deprecated, e.g., decrypting data created with PGP-2 -keys. +GnuPG 2.x has deprecated for security reasons, e.g., decrypting data +created with PGP-2 keys. -@ifclear gpgtwohack If you are looking for version 1 of GnuPG, you may find that version installed under the name @command{gpg1}. -@end ifclear -@ifset gpgtwohack -In contrast to the standalone command @command{gpg} from GnuPG 1.x, -the 2.x version is commonly installed under the name -@command{@gpgname}. -@end ifset @manpause diff --git a/doc/gpgv.texi b/doc/gpgv.texi index d70463b80..159c8dddb 100644 --- a/doc/gpgv.texi +++ b/doc/gpgv.texi @@ -8,8 +8,6 @@ @include defs.inc -@c Begin standard stuff -@ifclear gpgtwohack @manpage gpgv.1 @node gpgv @section Verify OpenPGP signatures @@ -25,28 +23,6 @@ .I sigfile .RI [ datafiles ] @end ifset -@end ifclear -@c End standard stuff - -@c Begin gpg2 hack stuff -@ifset gpgtwohack -@manpage gpgv2.1 -@node gpgv -@section Verify OpenPGP signatures -@ifset manverb -.B gpgv2 -\- Verify OpenPGP signatures -@end ifset - -@mansect synopsis -@ifset manverb -.B gpgv2 -.RI [ options ] -.I sigfile -.RI [ datafiles ] -@end ifset -@end ifset -@c End gpg2 hack stuff @mansect description @code{@gpgvname} is an OpenPGP signature verification tool. diff --git a/doc/mkdefsinc.c b/doc/mkdefsinc.c index b8fbed6e9..55a71a7d5 100644 --- a/doc/mkdefsinc.c +++ b/doc/mkdefsinc.c @@ -49,11 +49,6 @@ #endif /*HAVE_W32_SYSTEM*/ -#if USE_GPG2_HACK -# define gpg2_suffix "2" -#else -# define gpg2_suffix "" -#endif static int verbose; @@ -303,10 +298,6 @@ main (int argc, char **argv) fputs ("\n@c Flags\n\n", stdout); -#if USE_GPG2_HACK - fputs ("@set gpgtwohack 1\n\n", stdout); -#endif - fputs ("\n@c Directories\n\n", stdout); print_filename ("@set BINDIR ", GNUPG_BINDIR ); @@ -345,8 +336,8 @@ main (int argc, char **argv) fputs ("\n@c Macros\n\n", stdout); - printf ("@macro gpgname\n%s%s\n@end macro\n", GPG_NAME, gpg2_suffix); - printf ("@macro gpgvname\n%sv%s\n@end macro\n", GPG_NAME, gpg2_suffix); + printf ("@macro gpgname\n%s\n@end macro\n", GPG_NAME); + printf ("@macro gpgvname\n%sv\n@end macro\n", GPG_NAME); /* Trailer. */ diff --git a/g10/Makefile.am b/g10/Makefile.am index e8d8e9017..4e1306da3 100644 --- a/g10/Makefile.am +++ b/g10/Makefile.am @@ -35,22 +35,10 @@ AM_CFLAGS = $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS) \ needed_libs = ../kbx/libkeybox.a $(libcommonpth) ../regexp/libregexp.a -# Because there are no program specific transform macros we need to -# work around that to allow installing gpg as gpg2. -gpg2_hack_list = gpg gpgv -if USE_GPG2_HACK -gpg2_hack_uninst = gpg2 gpgv2 -use_gpg2_hack = yes -else -gpg2_hack_uninst = $(gpg2_hack_list) -use_gpg2_hack = no -endif -# NB: We use noinst_ for gpg and gpgv so that we can install them with -# the install-hook target under the name gpg2/gpgv2. -noinst_PROGRAMS = gpg -noinst_PROGRAMS += gpgv -noinst_PROGRAMS += $(module_tests) +bin_PROGRAMS = gpg gpgv + +noinst_PROGRAMS = $(module_tests) if DISABLE_TESTS TESTS = else @@ -208,54 +196,11 @@ t_keyid_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \ $(PROGRAMS): $(needed_libs) ../common/libgpgrl.a -# NB: To install gpg and gpgv we use this -hook. This code has to -# duplicate most of the automake generated install-binPROGRAMS target -# so that directories are created and the transform feature works. -install-exec-hook: - @echo "running install-exec-hook"; \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)"; \ - for p in $(gpg2_hack_list); do \ - echo "$$p$(EXEEXT) $$p$(EXEEXT)"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - for f in $$files; do \ - if test $(use_gpg2_hack) = yes ; \ - then f2=`echo "$${f}" | sed 's/$(EXEEXT)$$//'`2$(EXEEXT); \ - else f2="$${f}" ;\ - fi ; \ - echo "$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \ - $${f} '$(DESTDIR)$(bindir)/$${f2}'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \ - $${f} "$(DESTDIR)$(bindir)/$${f2}"; \ - done; \ - done - install-data-local: $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) $(INSTALL_DATA) $(srcdir)/distsigkey.gpg \ $(DESTDIR)$(pkgdatadir)/distsigkey.gpg -# NB: For uninstalling gpg and gpgv we use -local because there is -# no need for a specific order the targets need to be run. uninstall-local: -@rm $(DESTDIR)$(pkgdatadir)/distsigkey.gpg - -@files=`for p in $(gpg2_hack_uninst); do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files diff --git a/g10/keygen.c b/g10/keygen.c index 98608ad96..b39836cd0 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -5859,11 +5859,7 @@ generate_keypair (ctrl_t ctrl, int full, const char *fname, tty_printf ( _("Note: Use \"%s %s\"" " for a full featured key generation dialog.\n"), -#if USE_GPG2_HACK - GPG_NAME "2" -#else GPG_NAME -#endif , "--full-generate-key" ); err = parse_key_parameter_string (ctrl, NULL, -1, 0,