[Pkg-gnupg-commit] [gnupg2] 08/241: Move http module from common/ to dirmngr/.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:31:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 5aa1b392b1bf6fcf4cd380862c5affac39a4f34d
Author: Werner Koch <wk at gnupg.org>
Date: Sun Oct 18 20:07:44 2015 +0200
Move http module from common/ to dirmngr/.
* common/http.c: Move to ../dirmngr/.
* common/http.h: Move to ../dirmngr/.
* common/t-http.c: Move to ../dirmngr/.
* common/tls-ca.pem: Move to ../dirmngr/.
* common/Makefile.am: Do not build libcommontls.a libcommontlsnpth.a.
Remove http.c related stuff.
* po/POTFILES.in: Move http.c to dirmngr/.
* dirmngr/Makefile.am (EXTRA_DIST): Add tls-ca.pem.
(module_maint_tests): New.
(noinst_PROGRAMS): Add module_maint_tests.
(dirmngr_SOURCES): Add http.c and http.h.
(dirmngr_LDADD): Remove libcommontlsnpth.
(t_common_ldadd): Ditto.
(t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
(t_ldap_parse_uri_SOURCES): Add http.c.
(t_ldap_parse_uri_CFLAGS): Build without npth.
($(PROGRAMS)): Do not require libcommontls.a libcommontlsnpth.a.
* dirmngr/dirmngr.h, dirmngr/ks-engine.h: Fix include of http.h.
--
All network access is done via dirmngr and thus http.c should be
there.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
common/Makefile.am | 27 ++++-----------------------
dirmngr/Makefile.am | 30 +++++++++++++++++++++++-------
dirmngr/dirmngr.h | 2 +-
{common => dirmngr}/http.c | 0
{common => dirmngr}/http.h | 0
dirmngr/ks-engine.h | 2 +-
{common => dirmngr}/t-http.c | 0
{common => dirmngr}/tls-ca.pem | 0
po/POTFILES.in | 2 +-
9 files changed, 30 insertions(+), 33 deletions(-)
diff --git a/common/Makefile.am b/common/Makefile.am
index 7c87fa9..2be51f1 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -20,10 +20,9 @@
EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk ChangeLog-2011 \
audit-events.h status-codes.h ChangeLog.jnlib \
- ChangeLog-2011.include w32info-rc.h.in gnupg.ico tls-ca.pem
+ ChangeLog-2011.include w32info-rc.h.in gnupg.ico
-noinst_LIBRARIES = libcommon.a libcommonpth.a libgpgrl.a \
- libcommontls.a libcommontlsnpth.a
+noinst_LIBRARIES = libcommon.a libcommonpth.a libgpgrl.a
if !HAVE_W32CE_SYSTEM
noinst_LIBRARIES += libsimple-pwquery.a
endif
@@ -93,12 +92,6 @@ if HAVE_W32_SYSTEM
common_sources += w32-reg.c w32-afunix.c w32-afunix.h
endif
-# Sources possible requiring a TLS library are put into a separate
-# conveince library.
-tls_sources = \
- http.c http.h
-
-
# To make the code easier to read we have split home some code into
# separate source files.
if HAVE_W32_SYSTEM
@@ -128,12 +121,6 @@ libcommonpth_a_SOURCES += srv.c
endif
libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(NPTH_CFLAGS)
-libcommontls_a_SOURCES = $(tls_sources)
-libcommontls_a_CFLAGS = $(AM_CFLAGS) $(LIBGNUTLS_CFLAGS) -DWITHOUT_NPTH=1
-
-libcommontlsnpth_a_SOURCES = $(tls_sources)
-libcommontlsnpth_a_CFLAGS = $(AM_CFLAGS) $(LIBGNUTLS_CFLAGS) $(NPTH_CFLAGS)
-
if !HAVE_W32CE_SYSTEM
libsimple_pwquery_a_SOURCES = \
simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
@@ -179,7 +166,7 @@ module_tests += t-w32-reg
endif
if MAINTAINER_MODE
-module_maint_tests = t-helpfile t-b64 t-http
+module_maint_tests = t-helpfile t-b64
else
module_maint_tests =
endif
@@ -222,11 +209,5 @@ t_w32_reg_SOURCES = t-w32-reg.c $(t_extra_src)
t_w32_reg_LDADD = $(t_common_ldadd)
endif
-# http tests
-t_http_SOURCES = t-http.c
-t_http_CFLAGS = $(t_common_cflags) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS)
-t_http_LDADD = libcommontls.a $(t_common_ldadd) \
- $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
-
# All programs should depend on the created libs.
-$(PROGRAMS) : libcommon.a libcommonpth.a libcommontls.a libcommontlsnpth.a
+$(PROGRAMS) : libcommon.a libcommonpth.a
diff --git a/dirmngr/Makefile.am b/dirmngr/Makefile.am
index cee777a..a9f09fd 100644
--- a/dirmngr/Makefile.am
+++ b/dirmngr/Makefile.am
@@ -19,7 +19,7 @@
## Process this file with automake to produce Makefile.in
-EXTRA_DIST = OAUTHORS ONEWS ChangeLog-2011
+EXTRA_DIST = OAUTHORS ONEWS ChangeLog-2011 tls-ca.pem
bin_PROGRAMS = dirmngr dirmngr-client
@@ -27,7 +27,7 @@ if USE_LDAPWRAPPER
libexec_PROGRAMS = dirmngr_ldap
endif
-noinst_PROGRAMS = $(module_tests)
+noinst_PROGRAMS = $(module_tests) $(module_maint_tests)
TESTS = $(module_tests)
AM_CPPFLAGS = -I$(top_srcdir)/common
@@ -62,6 +62,7 @@ dirmngr_SOURCES = dirmngr.c dirmngr.h server.c crlcache.c crlfetch.c \
cdb.h cdblib.c misc.c dirmngr-err.h \
ocsp.c ocsp.h validate.c validate.h \
dns-cert.c dns-cert.h \
+ http.c http.h \
ks-action.c ks-action.h ks-engine.h \
ks-engine-hkp.c ks-engine-http.c ks-engine-finger.c ks-engine-kdns.c
@@ -75,7 +76,7 @@ ldaplibs =
endif
-dirmngr_LDADD = $(libcommontlsnpth) $(libcommonpth) \
+dirmngr_LDADD = $(libcommonpth) \
$(DNSLIBS) $(LIBASSUAN_LIBS) \
$(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
@@ -108,8 +109,7 @@ no-libgcrypt.c : $(top_srcdir)/tools/no-libgcrypt.c
t_common_src = t-support.h
-# We need libcommontls, because we use the http functions.
-t_common_ldadd = $(libcommontls) $(libcommon) no-libgcrypt.o \
+t_common_ldadd = $(libcommon) no-libgcrypt.o \
$(GPG_ERROR_LIBS) $(NETLIBS) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) \
$(DNSLIBS) $(LIBINTL) $(LIBICONV)
@@ -120,12 +120,28 @@ if USE_LDAP
module_tests += t-ldap-parse-uri
endif
+if MAINTAINER_MODE
+module_maint_tests = t-http
+else
+module_maint_tests =
+endif
+
+
+# http tests
+t_http_SOURCES = t-http.c http.c
+t_http_CFLAGS = -DWITHOUT_NPTH=1 \
+ $(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
+ $(GPG_ERROR_CFLAGS)
+t_http_LDADD = $(t_common_ldadd) \
+ $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
+
t_ldap_parse_uri_SOURCES = \
- t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
+ t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h http.c \
$(ldap_url) $(t_common_src)
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd)
t_dns_cert_SOURCES = t-dns-cert.c dns-cert.c
t_dns_cert_LDADD = $(t_common_ldadd)
-$(PROGRAMS) : $(libcommon) $(libcommonpth) $(libcommontls) $(libcommontlsnpth)
+$(PROGRAMS) : $(libcommon) $(libcommonpth)
diff --git a/dirmngr/dirmngr.h b/dirmngr/dirmngr.h
index b2b94f9..dff902a 100644
--- a/dirmngr/dirmngr.h
+++ b/dirmngr/dirmngr.h
@@ -33,7 +33,7 @@
#include "../common/membuf.h"
#include "../common/sysutils.h" /* (gnupg_fd_t) */
#include "../common/i18n.h"
-#include "../common/http.h" /* (parsed_uri_t) */
+#include "http.h" /* (parsed_uri_t) */
/* This objects keeps information about a particular LDAP server and
is used as item of a single linked list of servers. */
diff --git a/common/http.c b/dirmngr/http.c
similarity index 100%
rename from common/http.c
rename to dirmngr/http.c
diff --git a/common/http.h b/dirmngr/http.h
similarity index 100%
rename from common/http.h
rename to dirmngr/http.h
diff --git a/dirmngr/ks-engine.h b/dirmngr/ks-engine.h
index aff6cf4..6684a12 100644
--- a/dirmngr/ks-engine.h
+++ b/dirmngr/ks-engine.h
@@ -21,7 +21,7 @@
#ifndef DIRMNGR_KS_ENGINE_H
#define DIRMNGR_KS_ENGINE_H 1
-#include "../common/http.h"
+#include "http.h"
/*-- ks-action.c --*/
gpg_error_t ks_print_help (ctrl_t ctrl, const char *text);
diff --git a/common/t-http.c b/dirmngr/t-http.c
similarity index 100%
rename from common/t-http.c
rename to dirmngr/t-http.c
diff --git a/common/tls-ca.pem b/dirmngr/tls-ca.pem
similarity index 100%
rename from common/tls-ca.pem
rename to dirmngr/tls-ca.pem
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 09c6ec4..dc88448 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,7 +15,6 @@ agent/cvt-openpgp.c
common/exechelp-posix.c
common/exechelp-w32.c
common/exechelp-w32ce.c
-common/http.c
common/simple-pwquery.c
common/sysutils.c
common/yesno.c
@@ -110,6 +109,7 @@ dirmngr/crlfetch.c
dirmngr/dirmngr-client.c
dirmngr/dirmngr.c
dirmngr/dirmngr_ldap.c
+dirmngr/http.c
dirmngr/ldap-wrapper-ce.c
dirmngr/ldap-wrapper.c
dirmngr/ldap.c
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list