Skip to content

Commit b6482ac

Browse files
committed
Merge branch 'next' for the 0.10.0 release
2 parents dcaa5bd + 9e70b71 commit b6482ac

32 files changed

Lines changed: 658 additions & 179 deletions

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.*swp
2+
*.gcda
3+
*.gcno
24
*.la
35
*.lo
46
*.o
@@ -11,6 +13,9 @@
1113
/build-aux
1214
/config.*
1315
/configure
16+
/coverage-html
17+
/coverage.info
18+
/coveragereport
1419
/libtool
1520
/stamp-h1
1621
/test-suite.log

COPYRIGHT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2009-2017 by Farsight Security, Inc.
1+
Copyright (c) 2009-2019 by Farsight Security, Inc.
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

ChangeLog

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
1+
wdns (0.10.0)
2+
3+
* Handle corner case of NSEC3 hash field with length zero.
4+
5+
* Preserve name case when parsing rdata strings.
6+
7+
* Fix printing of bitmap entries for rrtypes larger than 255.
8+
Improve rrtype sorting.
9+
10+
* Preserve character-string boundaries when formatting TXT rdata.
11+
12+
* Add ./configure --with-coverage option to build with code coverage
13+
and make targets: clean-coverage to remove the coverage data and results
14+
and report-coverage to generate report (after running the code such as
15+
with "make check").
16+
17+
* Configure check for python which is used to generate some of the C code.
18+
19+
* Lots of compiler warning cleanups.
20+
21+
* Unit testing improvements and additional tests added.
22+
23+
* Added library versioning API: wdns_get_version() and
24+
wdns_get_version_number() available at run-time and WDNS_LIBRARY_VERSION
25+
and WDNS_LIBRARY_VERSION_NUMBER for compile-time.
26+
27+
-- Farsight Security, Inc. <software@farsightsecurity.com> Wed, 27 Nov 2019 13:03:14 -0500
28+
129
wdns (0.9.1)
230

3-
* t/: Fix format specifiers for size_t in some tests.
31+
* t/: Fix format specifiers for size_t in some tests.
432

5-
* Add README.md.
33+
* Add README.md.
634

7-
* Don't install the compiled example programs.
35+
* Don't install the compiled example programs.
836

937
-- Farsight Security <software@fsi.io> Tue, 3 Jan 2017 17:56:25 +0000
1038

Makefile.am

Lines changed: 66 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ noinst_PROGRAMS =
44
TESTS =
55
EXTRA_DIST =
66
CLEANFILES =
7+
DISTCLEANFILES =
78
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
89

910
EXTRA_DIST += COPYRIGHT
@@ -13,28 +14,67 @@ EXTRA_DIST += README.md
1314
AM_CPPFLAGS = \
1415
-include $(top_builddir)/config.h \
1516
-I$(top_srcdir)/wdns
16-
AM_CFLAGS = $(my_CFLAGS)
17+
AM_CFLAGS = $(my_CFLAGS) \
18+
-I$(top_builddir)/wdns
1719
AM_LDFLAGS =
1820

19-
LIBWDNS_CURRENT=1
21+
USE_LCOV=@USE_LCOV@
22+
LCOV=@LCOV@
23+
GENHTML=@GENHTML@
24+
25+
clean-coverage:
26+
@if [ $(USE_LCOV) = yes ] ; then \
27+
$(LCOV) --directory . --zerocounters ; \
28+
echo "Removing coverage info files and generated $(abs_top_builddir)/coverage-html/ directory" ; \
29+
rm -rf all.coverage report.coverage ; \
30+
rm -rf $(abs_top_builddir)/coverage-html/ ; \
31+
else \
32+
echo "Code coverage not enabled at configuration time." ; \
33+
echo "Use: ./configure --with-coverage" ; \
34+
fi
35+
36+
report-coverage:
37+
@if [ $(USE_LCOV) = yes ] ; then \
38+
$(LCOV) --capture --directory . --output-file all.coverage ; \
39+
$(LCOV) --remove all.coverage \
40+
$(abs_top_srcdir)/t/\* \
41+
/usr/include/\* \
42+
--output report.coverage ; \
43+
$(GENHTML) --legend -o $(abs_top_builddir)/coverage-html report.coverage ; \
44+
echo "Generated Code Coverage report in HTML at $(abs_top_builddir)/coverage-html" ; \
45+
else \
46+
echo "Code coverage not enabled at configuration time." ; \
47+
echo "Use: ./configure --with-coverage" ; \
48+
fi
49+
50+
#
51+
##
52+
### library
53+
##
54+
#
55+
56+
LIBWDNS_CURRENT=3
2057
LIBWDNS_REVISION=0
21-
LIBWDNS_AGE=0
58+
LIBWDNS_AGE=2
2259

2360
include_HEADERS = wdns/wdns.h
2461
lib_LTLIBRARIES = wdns/libwdns.la
2562

2663
EXTRA_DIST += wdns/gen_rcode_to_str
2764
EXTRA_DIST += wdns/gen_rrclass_to_str
2865
EXTRA_DIST += wdns/gen_rrtype_to_str
66+
DISTCLEANFILES += wdns/rrtype_to_str.c \
67+
wdns/rcode_to_str.c \
68+
wdns/rrclass_to_str.c
2969

3070
wdns/rcode_to_str.c: wdns/wdns.h wdns/gen_rcode_to_str
31-
$(AM_V_GEN)wdns/gen_rcode_to_str wdns/wdns.h wdns/rcode_to_str.c
71+
$(PYTHON) $(top_srcdir)/wdns/gen_rcode_to_str wdns/wdns.h wdns/rcode_to_str.c
3272

3373
wdns/rrclass_to_str.c: wdns/wdns.h wdns/gen_rrclass_to_str
34-
$(AM_V_GEN)wdns/gen_rrclass_to_str wdns/wdns.h wdns/rrclass_to_str.c
74+
$(PYTHON) $(top_srcdir)/wdns/gen_rrclass_to_str wdns/wdns.h wdns/rrclass_to_str.c
3575

3676
wdns/rrtype_to_str.c: wdns/wdns.h wdns/gen_rrtype_to_str
37-
$(AM_V_GEN)wdns/gen_rrtype_to_str wdns/wdns.h wdns/rrtype_to_str.c
77+
$(PYTHON) $(top_srcdir)/wdns/gen_rrtype_to_str wdns/wdns.h wdns/rrtype_to_str.c
3878

3979
wdns_libwdns_la_CPPFLAGS = \
4080
-include $(top_builddir)/wdns/wdns-private.h
@@ -107,7 +147,8 @@ wdns_libwdns_la_SOURCES = \
107147
wdns/skip_name.c \
108148
wdns/str_to_name.c \
109149
wdns/str_to_rdata_ubuf.c \
110-
wdns/unpack_name.c
150+
wdns/unpack_name.c \
151+
wdns/version.c
111152

112153
pkgconfig_DATA = wdns/libwdns.pc
113154
EXTRA_DIST += wdns/libwdns.pc.in
@@ -127,6 +168,12 @@ examples_wdns_dump_pcap_SOURCES = \
127168
examples/wdns-dump-pcap.c
128169
endif
129170

171+
noinst_PROGRAMS += examples/wdns-print-version
172+
examples_wdns_print_version_LDADD = wdns/libwdns.la
173+
examples_wdns_print_version_SOURCES = \
174+
examples/private.h \
175+
examples/wdns-print-version.c
176+
130177
noinst_PROGRAMS += examples/wdns-test-deserialize-rrset
131178
examples_wdns_test_deserialize_rrset_LDADD = wdns/libwdns.la
132179
examples_wdns_test_deserialize_rrset_SOURCES = \
@@ -161,30 +208,37 @@ examples_wdns_test_serialize_rrset_SOURCES = \
161208
##
162209
#
163210

211+
EXTRA_DIST += t/test-common.h
212+
164213
AM_TESTS_ENVIRONMENT = top_builddir='$(top_builddir)'; top_srcdir='$(top_srcdir)'; export top_builddir top_srcdir;
165214
TESTS_ENVIRONMENT = $(AM_TESTS_ENVIRONMENT)
166215

216+
TESTS += t/test-name_to_str
217+
check_PROGRAMS += t/test-name_to_str
218+
t_test_name_to_str_SOURCES = t/test-name_to_str.c t/test-common.c
219+
t_test_name_to_str_LDADD = wdns/libwdns.la
220+
167221
TESTS += t/test-str_to_name
168222
check_PROGRAMS += t/test-str_to_name
169-
t_test_str_to_name_SOURCES = t/test-str_to_name.c
223+
t_test_str_to_name_SOURCES = t/test-str_to_name.c t/test-common.c
170224
t_test_str_to_name_LDADD = wdns/libwdns.la
171225

172226
TESTS += t/test-str_to_rcode
173227
check_PROGRAMS += t/test-str_to_rcode
174-
t_test_str_to_rcode_SOURCES = t/test-str_to_rcode.c
228+
t_test_str_to_rcode_SOURCES = t/test-str_to_rcode.c t/test-common.c
175229
t_test_str_to_rcode_LDADD = wdns/libwdns.la
176230

177231
TESTS += t/test-str_to_rdata
178232
check_PROGRAMS += t/test-str_to_rdata
179-
t_test_str_to_rdata_SOURCES = t/test-str_to_rdata.c
233+
t_test_str_to_rdata_SOURCES = t/test-str_to_rdata.c t/test-common.c
180234
t_test_str_to_rdata_LDADD = wdns/libwdns.la
181235

182236
TESTS += t/test-rdata_to_str
183237
check_PROGRAMS += t/test-rdata_to_str
184-
t_test_rdata_to_str_SOURCES = t/test-rdata_to_str.c
238+
t_test_rdata_to_str_SOURCES = t/test-rdata_to_str.c t/test-common.c
185239
t_test_rdata_to_str_LDADD = wdns/libwdns.la
186240

187241
TESTS += t/test-str_to_rrtype
188242
check_PROGRAMS += t/test-str_to_rrtype
189-
t_test_str_to_rrtype_SOURCES = t/test-str_to_rrtype.c
243+
t_test_str_to_rrtype_SOURCES = t/test-str_to_rrtype.c t/test-common.c
190244
t_test_str_to_rrtype_LDADD = wdns/libwdns.la

configure.ac

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
AC_PREREQ(2.64)
2+
3+
m4_define(wdns_major_version, 0)
4+
m4_define(wdns_minor_version, 10)
5+
m4_define(wdns_patchlevel_version, 0)
6+
m4_define(wdns_version,
7+
wdns_major_version.wdns_minor_version.wdns_patchlevel_version)
8+
29
AC_INIT([wdns],
3-
[0.9.1],
10+
[wdns_version()],
411
[https://github.com/farsightsec/wdns/issues],
512
[wdns],
613
[https://github.com/farsightsec/wdns])
7-
AC_CONFIG_SRCDIR([wdns/wdns.h])
14+
AC_CONFIG_SRCDIR([wdns/wdns.h.in])
815
AC_CONFIG_AUX_DIR([build-aux])
916
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules subdir-objects])
1017
AC_PROG_CC_STDC
@@ -14,8 +21,18 @@ AC_CONFIG_MACRO_DIR([m4])
1421
AM_SILENT_RULES([yes])
1522
LT_INIT
1623

24+
WDNS_MAJOR_VERSION=wdns_major_version()
25+
WDNS_MINOR_VERSION=wdns_minor_version()
26+
WDNS_PATCHLEVEL_VERSION=wdns_patchlevel_version()
27+
WDNS_VERSION=wdns_version()
28+
29+
AC_SUBST(WDNS_MAJOR_VERSION)
30+
AC_SUBST(WDNS_MINOR_VERSION)
31+
AC_SUBST(WDNS_PATCHLEVEL_VERSION)
32+
AC_SUBST(WDNS_VERSION)
33+
1734
AC_CONFIG_HEADERS(config.h)
18-
AC_CONFIG_FILES([Makefile wdns/libwdns.pc])
35+
AC_CONFIG_FILES([Makefile wdns/libwdns.pc wdns/wdns.h])
1936

2037
PKG_PROG_PKG_CONFIG
2138
if test -n "$PKG_CONFIG"; then
@@ -53,6 +70,39 @@ AM_CONDITIONAL([LIBPCAP], [test "$have_libpcap" = "true"])
5370

5471
gl_LD_VERSION_SCRIPT
5572

73+
AM_PATH_PYTHON(,, [:])
74+
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
75+
76+
AC_ARG_WITH(coverage,
77+
[ --with-coverage[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
78+
79+
80+
USE_LCOV="no"
81+
if test "$lcov" != "no"; then
82+
if test "$lcov" != "yes"; then
83+
LCOV=$lcov
84+
else
85+
AC_PATH_PROG([LCOV], [lcov])
86+
fi
87+
if test -x "${LCOV}"; then
88+
USE_LCOV="yes"
89+
else
90+
AC_MSG_ERROR([Cannot find lcov.])
91+
fi
92+
# is genhtml always in the same directory?
93+
GENHTML=`echo "$LCOV" | ${SED} s/lcov$/genhtml/`
94+
if test ! -x $GENHTML; then
95+
AC_MSG_ERROR([genhtml not found, needed for lcov])
96+
fi
97+
CFLAGS="$CFLAGS --coverage"
98+
LIBS=" $LIBS -lgcov"
99+
AC_SUBST(CPPFLAGS)
100+
AC_SUBST(LIBS)
101+
AC_SUBST(LCOV)
102+
AC_SUBST(GENHTML)
103+
fi
104+
AC_SUBST(USE_LCOV)
105+
56106
AC_OUTPUT
57107
AC_MSG_RESULT([
58108
$PACKAGE $VERSION
@@ -67,4 +117,6 @@ AC_MSG_RESULT([
67117
libdir: ${libdir}
68118
includedir: ${includedir}
69119
pkgconfigdir: ${pkgconfigdir}
120+
121+
code coverage enabled: ${USE_LCOV}
70122
])

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
wdns (0.10.0-1) debian-fsi; urgency=medium
2+
3+
* New release.
4+
5+
-- Farsight Security, Inc. <software@farsightsecurity.com> Wed, 27 Nov 2019 13:03:14 -0500
6+
17
wdns (0.9.1-1) wheezy-farsightsec; urgency=medium
28

39
* New release.

debian/control

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ Build-Depends:
66
debhelper (>= 9~),
77
dh-autoreconf (>= 5~),
88
dpkg-dev (>= 1.16.0~),
9+
lcov,
910
pkg-config,
1011
python,
11-
Standards-Version: 3.9.6
12+
Standards-Version: 3.9.8
1213

1314
Package: libwdns-dev
1415
Section: libdevel

debian/copyright

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
22

33
Files: *
4-
Copyright: 2009-2015 by Farsight Security, Inc.
4+
Copyright: 2009-2019 by Farsight Security, Inc.
55
License: Apache-2.0
66
Licensed under the Apache License, Version 2.0 (the "License"); you
77
may not use this file except in compliance with the License. You may

debian/libwdns1.docs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ChangeLog
2+
COPYRIGHT
3+
README.md

debian/libwdns1.symbols

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
libwdns.so.1 libwdns1 #MINVER#
2+
LIBWDNS_0.10.0@LIBWDNS_0.10.0 0.10.0
23
LIBWDNS_0.6.0@LIBWDNS_0.6.0 0.6.0
34
LIBWDNS_0.7.0@LIBWDNS_0.7.0 0.7.0
45
LIBWDNS_0.8.0@LIBWDNS_0.8.0 0.8.0
@@ -15,6 +16,8 @@ libwdns.so.1 libwdns1 #MINVER#
1516
wdns_downcase_rdata@LIBWDNS_0.6.0 0.6.0
1617
wdns_downcase_rrset@LIBWDNS_0.6.0 0.6.0
1718
wdns_file_load_names@LIBWDNS_0.6.0 0.6.0
19+
wdns_get_version@LIBWDNS_0.10.0 0.10.0
20+
wdns_get_version_number@LIBWDNS_0.10.0 0.10.0
1821
wdns_is_subdomain@LIBWDNS_0.6.0 0.6.0
1922
wdns_left_chop@LIBWDNS_0.6.0 0.6.0
2023
wdns_len_uname@LIBWDNS_0.6.0 0.6.0

0 commit comments

Comments
 (0)