Skip to content

Commit 2125f22

Browse files
committed
build: Remove configure option --enable-gpg-is-gpg2
* configure.ac (--enable-gpg-is-gpg2): Remove option. (USE_GPG2_HACK): Remove var. * common/homedir.c (gnupg_module_name): Remove code for gpg2 installation option. * g10/keygen.c (generate_keypair): Ditto. * g10/Makefile.am (noinst_PROGRAMS): Ditto. * doc/gpg.texi: Ditto. * doc/gpgv.texi: Ditto. -- This option and all its build stuff does not make anymore sense. gpg1 is way too old for anyone to use on a regualar base along with a standard gpg. It is better to rename that single gpg (1.4) binary to gpg1 and adjust any scripts.
1 parent 51bccae commit 2125f22

File tree

7 files changed

+9
-156
lines changed

7 files changed

+9
-156
lines changed

common/homedir.c

+2-12
Original file line numberDiff line numberDiff line change
@@ -1864,20 +1864,10 @@ gnupg_module_name (int which)
18641864
X(bindir, "sm", "gpgsm");
18651865

18661866
case GNUPG_MODULE_NAME_GPG:
1867-
#if USE_GPG2_HACK
1868-
if (! gnupg_build_directory)
1869-
X(bindir, "g10", GPG_NAME "2");
1870-
else
1871-
#endif
1872-
X(bindir, "g10", GPG_NAME);
1867+
X(bindir, "g10", GPG_NAME);
18731868

18741869
case GNUPG_MODULE_NAME_GPGV:
1875-
#if USE_GPG2_HACK
1876-
if (! gnupg_build_directory)
1877-
X(bindir, "g10", GPG_NAME "v2");
1878-
else
1879-
#endif
1880-
X(bindir, "g10", GPG_NAME "v");
1870+
X(bindir, "g10", GPG_NAME "v");
18811871

18821872
case GNUPG_MODULE_NAME_CONNECT_AGENT:
18831873
X(bindir, "tools", "gpg-connect-agent");

configure.ac

-12
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,6 @@ test -n "$GNUPG_DIRMNGR_LDAP_PGM" \
233233
&& show_gnupg_dirmngr_ldap_pgm="$GNUPG_DIRMNGR_LDAP_PGM"
234234

235235

236-
#
237-
# For a long time gpg 2.x was installed as gpg2. This changed with
238-
# 2.2. This option can be used to install gpg under the name gpg2.
239-
#
240-
AC_ARG_ENABLE(gpg-is-gpg2,
241-
AS_HELP_STRING([--enable-gpg-is-gpg2],[Set installed name of gpg to gpg2]),
242-
gpg_is_gpg2=$enableval)
243-
if test "$gpg_is_gpg2" = "yes"; then
244-
AC_DEFINE(USE_GPG2_HACK, 1, [Define to install gpg as gpg2])
245-
fi
246-
AM_CONDITIONAL(USE_GPG2_HACK, test "$gpg_is_gpg2" = "yes")
247-
248236

249237
# SELinux support includes tracking of sensitive files to avoid
250238
# leaking their contents through processing these files by gpg itself

doc/gpg.texi

+2-35
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
@cindex options, GPG command
1313

1414

15-
@c Begin standard stuff
16-
@ifclear gpgtwohack
1715
@manpage gpg.1
1816
@ifset manverb
1917
.B gpg
@@ -31,30 +29,6 @@
3129
.I command
3230
.RI [ args ]
3331
@end ifset
34-
@end ifclear
35-
@c End standard stuff
36-
37-
@c Begin gpg2 hack stuff
38-
@ifset gpgtwohack
39-
@manpage gpg2.1
40-
@ifset manverb
41-
.B gpg2
42-
\- OpenPGP encryption and signing tool
43-
@end ifset
44-
45-
@mansect synopsis
46-
@ifset manverb
47-
.B gpg2
48-
.RB [ \-\-homedir
49-
.IR dir ]
50-
.RB [ \-\-options
51-
.IR file ]
52-
.RI [ options ]
53-
.I command
54-
.RI [ args ]
55-
@end ifset
56-
@end ifset
57-
@c End gpg2 hack stuff
5832

5933

6034
@mansect description
@@ -68,18 +42,11 @@ There are two main versions of GnuPG: GnuPG 1.x and GnuPG 2.x. GnuPG
6842
2.x supports modern encryption algorithms and thus should be preferred
6943
over GnuPG 1.x. You only need to use GnuPG 1.x if your platform
7044
doesn't support GnuPG 2.x, or you need support for some features that
71-
GnuPG 2.x has deprecated, e.g., decrypting data created with PGP-2
72-
keys.
45+
GnuPG 2.x has deprecated for security reasons, e.g., decrypting data
46+
created with PGP-2 keys.
7347

74-
@ifclear gpgtwohack
7548
If you are looking for version 1 of GnuPG, you may find that version
7649
installed under the name @command{gpg1}.
77-
@end ifclear
78-
@ifset gpgtwohack
79-
In contrast to the standalone command @command{gpg} from GnuPG 1.x,
80-
the 2.x version is commonly installed under the name
81-
@command{@gpgname}.
82-
@end ifset
8350

8451
@manpause
8552

doc/gpgv.texi

-24
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
@include defs.inc
1010

11-
@c Begin standard stuff
12-
@ifclear gpgtwohack
1311
@manpage gpgv.1
1412
@node gpgv
1513
@section Verify OpenPGP signatures
@@ -25,28 +23,6 @@
2523
.I sigfile
2624
.RI [ datafiles ]
2725
@end ifset
28-
@end ifclear
29-
@c End standard stuff
30-
31-
@c Begin gpg2 hack stuff
32-
@ifset gpgtwohack
33-
@manpage gpgv2.1
34-
@node gpgv
35-
@section Verify OpenPGP signatures
36-
@ifset manverb
37-
.B gpgv2
38-
\- Verify OpenPGP signatures
39-
@end ifset
40-
41-
@mansect synopsis
42-
@ifset manverb
43-
.B gpgv2
44-
.RI [ options ]
45-
.I sigfile
46-
.RI [ datafiles ]
47-
@end ifset
48-
@end ifset
49-
@c End gpg2 hack stuff
5026

5127
@mansect description
5228
@code{@gpgvname} is an OpenPGP signature verification tool.

doc/mkdefsinc.c

+2-11
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@
4949
#endif /*HAVE_W32_SYSTEM*/
5050

5151

52-
#if USE_GPG2_HACK
53-
# define gpg2_suffix "2"
54-
#else
55-
# define gpg2_suffix ""
56-
#endif
5752

5853

5954
static int verbose;
@@ -303,10 +298,6 @@ main (int argc, char **argv)
303298

304299
fputs ("\n@c Flags\n\n", stdout);
305300

306-
#if USE_GPG2_HACK
307-
fputs ("@set gpgtwohack 1\n\n", stdout);
308-
#endif
309-
310301
fputs ("\n@c Directories\n\n", stdout);
311302

312303
print_filename ("@set BINDIR ", GNUPG_BINDIR );
@@ -345,8 +336,8 @@ main (int argc, char **argv)
345336

346337
fputs ("\n@c Macros\n\n", stdout);
347338

348-
printf ("@macro gpgname\n%s%s\n@end macro\n", GPG_NAME, gpg2_suffix);
349-
printf ("@macro gpgvname\n%sv%s\n@end macro\n", GPG_NAME, gpg2_suffix);
339+
printf ("@macro gpgname\n%s\n@end macro\n", GPG_NAME);
340+
printf ("@macro gpgvname\n%sv\n@end macro\n", GPG_NAME);
350341

351342

352343
/* Trailer. */

g10/Makefile.am

+3-58
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,10 @@ AM_CFLAGS = $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS) \
3535

3636
needed_libs = ../kbx/libkeybox.a $(libcommonpth) ../regexp/libregexp.a
3737

38-
# Because there are no program specific transform macros we need to
39-
# work around that to allow installing gpg as gpg2.
40-
gpg2_hack_list = gpg gpgv
41-
if USE_GPG2_HACK
42-
gpg2_hack_uninst = gpg2 gpgv2
43-
use_gpg2_hack = yes
44-
else
45-
gpg2_hack_uninst = $(gpg2_hack_list)
46-
use_gpg2_hack = no
47-
endif
4838

49-
# NB: We use noinst_ for gpg and gpgv so that we can install them with
50-
# the install-hook target under the name gpg2/gpgv2.
51-
noinst_PROGRAMS = gpg
52-
noinst_PROGRAMS += gpgv
53-
noinst_PROGRAMS += $(module_tests)
39+
bin_PROGRAMS = gpg gpgv
40+
41+
noinst_PROGRAMS = $(module_tests)
5442
if DISABLE_TESTS
5543
TESTS =
5644
else
@@ -208,54 +196,11 @@ t_keyid_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) \
208196

209197
$(PROGRAMS): $(needed_libs) ../common/libgpgrl.a
210198

211-
# NB: To install gpg and gpgv we use this -hook. This code has to
212-
# duplicate most of the automake generated install-binPROGRAMS target
213-
# so that directories are created and the transform feature works.
214-
install-exec-hook:
215-
@echo "running install-exec-hook"; \
216-
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
217-
$(MKDIR_P) "$(DESTDIR)$(bindir)"; \
218-
for p in $(gpg2_hack_list); do \
219-
echo "$$p$(EXEEXT) $$p$(EXEEXT)"; done | \
220-
sed 's/$(EXEEXT)$$//' | \
221-
while read p p1; do if test -f $$p \
222-
; then echo "$$p"; echo "$$p"; else :; fi; \
223-
done | \
224-
sed -e 'p;s,.*/,,;n;h' \
225-
-e 's|.*|.|' \
226-
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
227-
sed 'N;N;N;s,\n, ,g' | \
228-
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
229-
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
230-
if ($$2 == $$4) files[d] = files[d] " " $$1; \
231-
else { print "f", $$3 "/" $$4, $$1; } } \
232-
END { for (d in files) print "f", d, files[d] }' | \
233-
while read type dir files; do \
234-
for f in $$files; do \
235-
if test $(use_gpg2_hack) = yes ; \
236-
then f2=`echo "$${f}" | sed 's/$(EXEEXT)$$//'`2$(EXEEXT); \
237-
else f2="$${f}" ;\
238-
fi ; \
239-
echo "$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \
240-
$${f} '$(DESTDIR)$(bindir)/$${f2}'"; \
241-
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \
242-
$${f} "$(DESTDIR)$(bindir)/$${f2}"; \
243-
done; \
244-
done
245-
246199

247200
install-data-local:
248201
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
249202
$(INSTALL_DATA) $(srcdir)/distsigkey.gpg \
250203
$(DESTDIR)$(pkgdatadir)/distsigkey.gpg
251204

252-
# NB: For uninstalling gpg and gpgv we use -local because there is
253-
# no need for a specific order the targets need to be run.
254205
uninstall-local:
255206
-@rm $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
256-
-@files=`for p in $(gpg2_hack_uninst); do echo "$$p"; done | \
257-
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
258-
-e 's/$$/$(EXEEXT)/' \
259-
`; \
260-
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
261-
cd "$(DESTDIR)$(bindir)" && rm -f $$files

g10/keygen.c

-4
Original file line numberDiff line numberDiff line change
@@ -5859,11 +5859,7 @@ generate_keypair (ctrl_t ctrl, int full, const char *fname,
58595859

58605860
tty_printf ( _("Note: Use \"%s %s\""
58615861
" for a full featured key generation dialog.\n"),
5862-
#if USE_GPG2_HACK
5863-
GPG_NAME "2"
5864-
#else
58655862
GPG_NAME
5866-
#endif
58675863
, "--full-generate-key" );
58685864

58695865
err = parse_key_parameter_string (ctrl, NULL, -1, 0,

0 commit comments

Comments
 (0)