[squid-dev] [PATCH] convenience library renaming

Amos Jeffries squid3 at treenet.co.nz
Mon Feb 8 20:41:29 UTC 2016


I have been trying to automate graphing of the Squid internal
dependencies. One of the major issues that has encountered is that some
of our convenience libraries use the '-' hyphen character which is a
reserved character in DOT graph format.

To make the scripts much simpler and the visual output reflect exactly
what the library names this patch cleans up the library names to follow
our pre-existing policy, and now also to remove punctuation from the
library names.

Amos
-------------- next part --------------
=== modified file 'compat/Makefile.am'
--- compat/Makefile.am	2016-01-01 00:12:18 +0000
+++ compat/Makefile.am	2016-02-08 12:09:32 +0000
@@ -14,8 +14,8 @@
 
 # Port Specific Configurations
 
-noinst_LTLIBRARIES = libcompat-squid.la
-libcompat_squid_la_SOURCES = \
+noinst_LTLIBRARIES = libcompatsquid.la
+libcompatsquid_la_SOURCES = \
 	assert.cc \
 	assert.h \
 	cmsg.h \
@@ -86,7 +86,7 @@
 	os/solaris.h \
 	os/sunos.h
 
-libcompat_squid_la_LIBADD= $(LTLIBOBJS)
+libcompatsquid_la_LIBADD= $(LTLIBOBJS)
 
 check_PROGRAMS += testPreCompiler
 TESTS += testPreCompiler

=== modified file 'compat/compat.dox'
--- compat/compat.dox	2016-01-01 00:12:18 +0000
+++ compat/compat.dox	2016-02-08 12:09:14 +0000
@@ -22,7 +22,7 @@
 current equivalent.
 
 \par
-The Portability library libcompat-squid.la has been created to correct the three issues of
+The Portability library libcompatsquid.la has been created to correct the three issues of
 stable build portability, code cleanliness, and clearer licensing.
 
 
@@ -38,7 +38,7 @@
       available to be included with the Squid sources and used when required.
 
 \par
-To be built into the libcompat-squid.la as a layer below all Squid-bundled binaries. The
+To be built into the libcompatsquid.la as a layer below all Squid-bundled binaries. The
 code must also qualify by being provided natively by some OS where Squid builds. \br
 Code and Algorithms which do not meet this final criteria are relegated to the slightly
 higher level of basic component, rather than portability.
@@ -71,7 +71,7 @@
 
 
 \section sec4 Layout
-The internal code structure of libcompat-squid.la files has a hierarchy. The API has a flat
+The internal code structure of libcompatsquid.la files has a hierarchy. The API has a flat
 global scope separate from the file layout. The API is pulled in by including compat/compat.h.
 The strict dependency requirements which exist within the compat API make including an
 individual part separately a risky operation.

=== modified file 'configure.ac'
--- configure.ac	2016-02-02 06:35:09 +0000
+++ configure.ac	2016-02-08 12:10:51 +0000
@@ -1011,7 +1011,7 @@
 if test "x$squid_opt_use_ecap" = "xyes";
 then
     AC_DEFINE(USE_ECAP,1,[Enable eCAP support])
-    ECAP_LIBS="ecap/libsquid-ecap.la"
+    ECAP_LIBS="ecap/libecapsquid.la"
     squid_opt_use_adaptation=yes
 else
     AC_DEFINE(USE_ECAP,0,[Disable eCAP support])

=== modified file 'src/Common.am'
--- src/Common.am	2016-01-01 00:12:18 +0000
+++ src/Common.am	2016-02-08 12:08:55 +0000
@@ -50,7 +50,7 @@
 endif
 
 ## Because compatibility is almost universal. And the link order is important.
-COMPAT_LIB = $(top_builddir)/compat/libcompat-squid.la $(LIBPROFILER)
+COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
 
 ## Some helpers are written in Perl and need the local shell defined properly
 subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)

=== modified file 'src/Makefile.am'
--- src/Makefile.am	2016-02-01 11:52:03 +0000
+++ src/Makefile.am	2016-02-08 12:41:23 +0000
@@ -553,8 +553,8 @@
 	servers/libservers.la \
 	ftp/libftp.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	dns/libdns.la \
 	base/libbase.la \
 	libsquid.la \
@@ -568,7 +568,7 @@
 	comm/libcomm.la \
 	security/libsecurity.la \
 	eui/libeui.la \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	log/liblog.la \
 	format/libformat.la \
 	$(XTRA_OBJS) \
@@ -1044,8 +1044,8 @@
 tests_testHttpReply_LDFLAGS = $(LIBADD_DL)
 tests_testHttpReply_LDADD=\
 	CommCalls.o \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	acl/libacls.la \
 	acl/libapi.la \
 	acl/libstate.la \
@@ -1176,8 +1176,8 @@
 tests_testACLMaxUserIP_LDADD= \
 	libsquid.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	$(AUTH_ACL_LIBS) \
 	ident/libident.la \
 	acl/libacls.la \
@@ -1448,8 +1448,8 @@
 	servers/libservers.la \
 	ftp/libftp.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	ident/libident.la \
 	acl/libacls.la \
 	acl/libstate.la \
@@ -1460,7 +1460,7 @@
 	fs/libfs.la \
 	comm/libcomm.la \
 	eui/libeui.la \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	log/liblog.la \
 	format/libformat.la \
 	$(REPL_OBJS) \
@@ -1630,8 +1630,8 @@
 	swap_log_op.cc
 tests_testDiskIO_LDADD = \
 	libsquid.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	SquidConfig.o \
 	CommCalls.o \
 	ident/libident.la \
@@ -1892,8 +1892,8 @@
 	servers/libservers.la \
 	ftp/libftp.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	ident/libident.la \
 	acl/libacls.la \
 	acl/libstate.la \
@@ -1903,7 +1903,7 @@
 	ip/libip.la \
 	fs/libfs.la \
 	anyp/libanyp.la \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	comm/libcomm.la \
 	log/liblog.la \
 	format/libformat.la \
@@ -2137,8 +2137,8 @@
 	servers/libservers.la \
 	ftp/libftp.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	ident/libident.la \
 	acl/libacls.la \
 	acl/libstate.la \
@@ -2148,7 +2148,7 @@
 	ip/libip.la \
 	fs/libfs.la \
 	anyp/libanyp.la \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	comm/libcomm.la \
 	log/liblog.la \
 	format/libformat.la \
@@ -2377,17 +2377,17 @@
 	servers/libservers.la \
 	ftp/libftp.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	ident/libident.la \
 	acl/libacls.la \
 	acl/libstate.la \
 	acl/libapi.la \
-	parser/libsquid-parser.la \
+	parser/libparser.la \
 	ip/libip.la \
 	fs/libfs.la \
 	anyp/libanyp.la \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	comm/libcomm.la \
 	log/liblog.la \
 	format/libformat.la \
@@ -2432,7 +2432,7 @@
 	tests/stub_SBufDetailedStats.cc
 tests_testTokenizer_LDFLAGS = $(LIBADD_DL)
 tests_testTokenizer_LDADD = \
-	parser/libsquid-parser.la \
+	parser/libparser.la \
 	base/libbase.la \
 	$(top_builddir)/lib/libmiscutil.la \
 	$(COMPAT_LIB) \
@@ -2475,8 +2475,8 @@
 nodist_tests_testHttp1Parser_SOURCES = \
 	$(TESTSOURCES)
 tests_testHttp1Parser_LDADD= \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	anyp/libanyp.la \
 	SquidConfig.o \
 	base/libbase.la \
@@ -2694,23 +2694,23 @@
 	servers/libservers.la \
 	helper/libhelper.la \
 	ftp/libftp.la \
-	http/libsquid-http.la \
+	http/libhttp.la \
 	ident/libident.la \
 	acl/libacls.la \
 	acl/libstate.la \
 	acl/libapi.la \
-	parser/libsquid-parser.la \
+	parser/libparser.la \
 	ip/libip.la \
 	fs/libfs.la \
 	$(SSL_LIBS) \
 	ipc/libipc.la \
-	parser/libsquid-parser.la \
+	parser/libparser.la \
 	dns/libdns.la \
 	base/libbase.la \
 	mgr/libmgr.la \
 	anyp/libanyp.la \
 	$(SNMP_LIBS) \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	comm/libcomm.la \
 	log/liblog.la \
 	format/libformat.la \
@@ -2735,7 +2735,7 @@
 	$(SQUID_CPPUNIT_LA)
 
 ## Tests for icmp/* objects
-# icmp/libicmp-core.la is used by pinger so SHOULD NOT require more dependancies! :-(
+# icmp/libicmpcore.la is used by pinger so SHOULD NOT require more dependancies! :-(
 tests_testIcmp_SOURCES = \
 	tests/testIcmp.h \
 	tests/testIcmp.cc
@@ -2748,7 +2748,7 @@
 	globals.cc
 tests_testIcmp_LDFLAGS = $(LIBADD_DL)
 tests_testIcmp_LDADD=\
-	icmp/libicmp-core.la \
+	icmp/libicmpcore.la \
 	ip/libip.la \
 	base/libbase.la \
 	$(COMPAT_LIB) \
@@ -2915,8 +2915,8 @@
 
 tests_testStore_LDADD= \
 	libsquid.la \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	ident/libident.la \
 	acl/libacls.la \
 	acl/libstate.la \
@@ -3139,8 +3139,8 @@
 	SquidMath.h \
 	swap_log_op.cc
 tests_testUfs_LDADD = \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	CommCalls.o \
 	ident/libident.la \
 	acl/libacls.la \
@@ -3320,8 +3320,8 @@
 	SquidMath.h \
 	$(TESTSOURCES)
 tests_testRock_LDADD = \
-	http/libsquid-http.la \
-	parser/libsquid-parser.la \
+	http/libhttp.la \
+	parser/libparser.la \
 	libsquid.la \
 	comm/libcomm.la \
 	ip/libip.la \
@@ -3558,9 +3558,9 @@
 	clients/libclients.la \
 	servers/libservers.la \
 	helper/libhelper.la \
-	http/libsquid-http.la \
+	http/libhttp.la \
 	ftp/libftp.la \
-	parser/libsquid-parser.la \
+	parser/libparser.la \
 	anyp/libanyp.la \
 	ident/libident.la \
 	acl/libacls.la \
@@ -3575,7 +3575,7 @@
 	ipc/libipc.la \
 	mgr/libmgr.la \
 	$(SNMP_LIBS) \
-	icmp/libicmp.la icmp/libicmp-core.la \
+	icmp/libicmp.la \
 	comm/libcomm.la \
 	log/liblog.la \
 	format/libformat.la \

=== modified file 'src/adaptation/ecap/Makefile.am'
--- src/adaptation/ecap/Makefile.am	2016-01-01 00:12:18 +0000
+++ src/adaptation/ecap/Makefile.am	2016-02-08 12:11:33 +0000
@@ -8,9 +8,9 @@
 include $(top_srcdir)/src/Common.am
 include $(top_srcdir)/src/TestHeaders.am
 
-noinst_LTLIBRARIES = libsquid-ecap.la
+noinst_LTLIBRARIES = libecapsquid.la
 
-libsquid_ecap_la_SOURCES = \
+libecapsquid_la_SOURCES = \
 	Config.h \
 	Config.cc \
 	Host.h \
@@ -25,5 +25,5 @@
 	Registry.h
 
 # add libecap using its pkg-config-produced configuration variables
-libsquid_ecap_la_CXXFLAGS = $(EXT_LIBECAP_CFLAGS)
-libsquid_ecap_la_LIBADD = $(EXT_LIBECAP_LIBS) 
+libecapsquid_la_CXXFLAGS = $(EXT_LIBECAP_CFLAGS)
+libecapsquid_la_LIBADD = $(EXT_LIBECAP_LIBS)

=== modified file 'src/http/Makefile.am'
--- src/http/Makefile.am	2016-01-31 12:05:30 +0000
+++ src/http/Makefile.am	2016-02-08 12:03:58 +0000
@@ -11,9 +11,9 @@
 SUBDIRS = one url_rewriters
 DIST_SUBDIRS = one url_rewriters
 
-noinst_LTLIBRARIES = libsquid-http.la
+noinst_LTLIBRARIES = libhttp.la
 
-libsquid_http_la_SOURCES = \
+libhttp_la_SOURCES = \
 	forward.h \
 	MethodType.cc \
 	MethodType.h \
@@ -30,7 +30,7 @@
 	Stream.cc \
 	Stream.h
 
-libsquid_http_la_LIBADD= one/libhttp1.la
+libhttp_la_LIBADD= one/libhttp1.la
 
 MethodType.cc: MethodType.h $(top_srcdir)/src/mk-string-arrays.awk
 	($(AWK) -f $(top_srcdir)/src/mk-string-arrays.awk sbuf=1 < $(srcdir)/MethodType.h | \

=== modified file 'src/icmp/Makefile.am'
--- src/icmp/Makefile.am	2016-01-01 00:12:18 +0000
+++ src/icmp/Makefile.am	2016-02-08 12:40:21 +0000
@@ -21,10 +21,10 @@
 EXTRA_PROGRAMS = pinger
 endif
 
-noinst_LTLIBRARIES = libicmp-core.la libicmp.la
+noinst_LTLIBRARIES = libicmpcore.la libicmp.la
 
 # ICMP API definition ...
-libicmp_core_la_SOURCES = \
+libicmpcore_la_SOURCES = \
 	Icmp.h \
 	Icmp.cc
 
@@ -37,6 +37,8 @@
 	net_db.h \
 	net_db.cc
 
+libicmp_la_LIBADD= libicmpcore.la
+
 # pinger depends on these but install/dist is done elsewhere.
 COPIED_SOURCE= \
 	debug.cc \
@@ -61,7 +63,7 @@
 nodist_pinger_SOURCES = $(COPIED_SOURCE)
 pinger_LDFLAGS = $(LIBADD_DL)
 pinger_LDADD=\
-	libicmp-core.la \
+	libicmpcore.la \
 	$(top_builddir)/src/ip/libip.la \
 	$(top_builddir)/src/base/libbase.la \
 	$(COMPAT_LIB) \

=== modified file 'src/parser/Makefile.am'
--- src/parser/Makefile.am	2016-01-01 00:12:18 +0000
+++ src/parser/Makefile.am	2016-02-08 12:06:07 +0000
@@ -8,9 +8,9 @@
 include $(top_srcdir)/src/Common.am
 include $(top_srcdir)/src/TestHeaders.am
 
-noinst_LTLIBRARIES = libsquid-parser.la
+noinst_LTLIBRARIES = libparser.la
 
-libsquid_parser_la_SOURCES = \
+libparser_la_SOURCES = \
 	Tokenizer.h \
 	Tokenizer.cc
 

=== modified file 'src/security/Context.h'
--- src/security/Context.h	2016-01-01 00:12:18 +0000
+++ src/security/Context.h	2016-02-08 12:08:02 +0000
@@ -25,7 +25,7 @@
 namespace Security {
 
 /* IMPORTANT:
- * Due to circular dependency issues between ssl/libsquidssl.la and
+ * Due to circular dependency issues between ssl/libsslsquid.la and
  * security/libsecurity.la the code within src/ssl/ is restricted to
  * only using Security::ContextPtr, it MUST NOT use ContextPointer
  *

=== modified file 'src/security/PeerOptions.cc'
--- src/security/PeerOptions.cc	2016-01-15 06:57:17 +0000
+++ src/security/PeerOptions.cc	2016-02-08 19:52:33 +0000
@@ -430,12 +430,19 @@
         SBuf option;
         long value = 0;
 
+debugs(83, DBG_PARSE_NOTE(1), "Tokenizer remaining=" << tok.remaining());
+
         if (tok.int64(hex, 16, false)) {
             /* Special case.. hex specification */
             value = hex;
         }
 
-        else if (tok.prefix(option, optChars)) {
+        else {
+debugs(83, DBG_PARSE_NOTE(1), "AA Tokenizer remaining=" << tok.remaining());
+if (tok.prefix(option, optChars)) {
+
+debugs(83, DBG_PARSE_NOTE(1), "BB Tokenizer option=" << option << ", remaining=" << tok.remaining());
+
             // find the named option in our supported set
             for (struct ssl_option *opttmp = ssl_options; opttmp->name; ++opttmp) {
                 if (option.cmp(opttmp->name) == 0) {
@@ -444,6 +451,7 @@
                 }
             }
         }
+}
 
         if (value) {
             switch (mode) {
@@ -458,8 +466,11 @@
             debugs(83, DBG_PARSE_NOTE(1), "ERROR: Unknown TLS option " << option);
         }
 
+debugs(83, DBG_PARSE_NOTE(1), "CC Tokenizer remaining=" << tok.remaining());
+
         static const CharacterSet delims("TLS-option-delim",":,");
         if (!tok.skipAll(delims) && !tok.atEnd()) {
+debugs(83, DBG_PARSE_NOTE(1), "DD Tokenizer remaining=" << tok.remaining());
             fatalf("Unknown TLS option '" SQUIDSBUFPH "'", SQUIDSBUFPRINT(tok.remaining()));
         }
 



More information about the squid-dev mailing list