]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move irs_resconf into libdns and remove libirs
authorTony Finch <fanf@isc.org>
Fri, 16 Dec 2022 12:19:08 +0000 (12:19 +0000)
committerTony Finch <fanf@isc.org>
Fri, 24 Feb 2023 09:38:59 +0000 (09:38 +0000)
`libirs` used to be a reference implementation of `getaddrinfo` and
related modern resolver APIs. It was stripped down in BIND 9.18
leaving only the `irs_resconf` module, which parses
`/etc/resolv.conf`. I have kept its include path and namespace prefix,
so it remains a little fragment of libirs now embedded in libdns.

16 files changed:
CHANGES
Makefile.top
bin/delv/Makefile.am
bin/dig/Makefile.am
bin/nsupdate/Makefile.am
configure.ac
doc/dev/dev.md
doc/notes/notes-current.rst
lib/Makefile.am
lib/dns/Makefile.am
lib/dns/include/irs/resconf.h [moved from lib/irs/include/irs/resconf.h with 100% similarity]
lib/dns/resconf.c [moved from lib/irs/resconf.c with 99% similarity]
lib/irs/Makefile.am [deleted file]
lib/irs/include/.clang-format [deleted symlink]
lib/irs/tests [deleted symlink]
tests/irs/Makefile.am

diff --git a/CHANGES b/CHANGES
index 28d75d62e6b31ee3d9a81e5d1d6aad1c19c2db9b..33b2de8bb9b03151aa1b7fa0ea397c46d07cfed2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+6111.  [cleanup]       Move irs_resconf into libdns, and remove the
+                       now empty libirs. [GL !7463]
+
 6110.  [cleanup]       Refactor the dns_xfrin module to use dns_dispatch
                        to set up TCP connections and send and receive
                        messages. [GL #3886]
index 93047dc3136e4f315edeb7ba1875b226b90deb16..ffb63289a76fae7a8ce76ffbda502b3976868636 100644 (file)
@@ -40,12 +40,6 @@ LIBNS_CFLAGS = \
 LIBNS_LIBS = \
        $(top_builddir)/lib/ns/libns.la
 
-LIBIRS_CFLAGS = \
-       -I$(top_srcdir)/lib/irs/include
-
-LIBIRS_LIBS = \
-       $(top_builddir)/lib/irs/libirs.la
-
 LIBISCCFG_CFLAGS = \
        -I$(top_srcdir)/lib/isccfg/include
 
index 54050232bf0c35dc588088af2a2d8d64833da27b..df4661f6e95686cf97ebcdd0d5c7b053ce87668d 100644 (file)
@@ -4,8 +4,7 @@ AM_CPPFLAGS +=                          \
        -I$(top_builddir)/include       \
        $(LIBISC_CFLAGS)                \
        $(LIBDNS_CFLAGS)                \
-       $(LIBISCCFG_CFLAGS)             \
-       $(LIBIRS_CFLAGS)
+       $(LIBISCCFG_CFLAGS)
 
 AM_CPPFLAGS +=                         \
        -DSYSCONFDIR=\"${sysconfdir}\"
@@ -14,8 +13,8 @@ bin_PROGRAMS = delv
 
 delv_SOURCES =                         \
        delv.c
+
 delv_LDADD =                           \
        $(LIBISC_LIBS)                  \
        $(LIBDNS_LIBS)                  \
-       $(LIBISCCFG_LIBS)               \
-       $(LIBIRS_LIBS)
+       $(LIBISCCFG_LIBS)
index a14e418e458b1a651f832808085d3b1f1c9b222f..685829f75ce633459fb582ebc153b9f4289406a8 100644 (file)
@@ -4,7 +4,6 @@ AM_CPPFLAGS +=                  \
        $(LIBISC_CFLAGS)        \
        $(LIBDNS_CFLAGS)        \
        $(LIBISCCFG_CFLAGS)     \
-       $(LIBIRS_CFLAGS)        \
        $(LIBIDN2_CFLAGS)       \
        $(LIBUV_CFLAGS)
 
@@ -13,7 +12,6 @@ LDADD +=                      \
        $(LIBISC_LIBS)          \
        $(LIBDNS_LIBS)          \
        $(LIBISCCFG_LIBS)       \
-       $(LIBIRS_LIBS)          \
        $(LIBIDN2_LIBS)
 
 noinst_LTLIBRARIES = libdighost.la
index f76efed6f67efb36f9ffdf9b295b98a62c426bc3..4ef15ed799e2b834f028405a29333920cadc5d77 100644 (file)
@@ -4,7 +4,6 @@ AM_CPPFLAGS +=                  \
        $(LIBISC_CFLAGS)        \
        $(LIBDNS_CFLAGS)        \
        $(LIBISCCFG_CFLAGS)     \
-       $(LIBIRS_CFLAGS)        \
        $(GSSAPI_CFLAGS)        \
        $(KRB5_CFLAGS)          \
        $(READLINE_CFLAGS)
@@ -16,7 +15,6 @@ LDADD +=                      \
        $(LIBISC_LIBS)          \
        $(LIBDNS_LIBS)          \
        $(LIBISCCFG_LIBS)       \
-       $(LIBIRS_LIBS)          \
        $(GSSAPI_LIBS)          \
        $(KRB5_LIBS)
 
index 2fb95415143c7908b8f037d541597408bb050ae0..ca6c6974b7a04a461b7d9ef9a5f563cfbf5c7ccc 100644 (file)
@@ -1558,7 +1558,6 @@ AC_CONFIG_FILES([lib/Makefile
                 lib/isc/Makefile
                 lib/dns/Makefile
                 lib/ns/Makefile
-                lib/irs/Makefile
                 lib/isccfg/Makefile
                 lib/isccc/Makefile])
 
index a6f5aefedc3cc2531a8075a2bcbb862751ebf942..adbb40dcd0cf5f6b4af943200ff4da1fbe5bcf31 100644 (file)
@@ -272,8 +272,6 @@ libraries.
       configuration parser and checker.
     * `bind9/lib/isccc`: library implementing the control channel used
       by `rndc`
-    * `bind9/lib/irs`: provides mechanisms for reading `/etc/resolv.conf`
-      and other configuration files.
 
 #### Namespace
 
index b504c3aa787a84f86c24188b1abd667521fe8c90..af1d4162d2bbbf9b6465bb897dc4cad57488f6ec 100644 (file)
@@ -33,6 +33,10 @@ Removed Features
   moved to the ``libisc`` and ``libisccfg`` libraries, and the
   now-empty ``libbind9`` has been removed and is no longer installed.
 
+- The ``irs_resconf`` module has been moved to the ``libdns`` shared
+  library and the now-empty ``libirs`` library has been removed and is
+  no longer installed.
+
 Feature Changes
 ~~~~~~~~~~~~~~~
 
index 3f3b451d1d6a828e5bfaa3229e881df684467461..62caeeefec7aeb2412e8171993b9547d48e074d5 100644 (file)
@@ -1,3 +1,3 @@
 include $(top_srcdir)/Makefile.top
 
-SUBDIRS = isc dns isccc ns isccfg irs
+SUBDIRS = isc dns isccc ns isccfg
index 41ba474af5e1ad70076b2839fc1d6b0bf9dcb6cd..2539ad5517ce32baa2e60c2a87f3c099489f12da 100644 (file)
@@ -142,9 +142,14 @@ dst_HEADERS =                              \
        include/dst/dst.h               \
        include/dst/gssapi.h
 
+irsdir = $(includedir)/irs
+irs_HEADERS =                          \
+       include/irs/resconf.h
+
 libdns_la_SOURCES =                    \
        $(libdns_la_HEADERS)            \
        $(dst_HEADERS)                  \
+       $(irs_HEADERS)                  \
        acl.c                           \
        adb.c                           \
        badcache.c                      \
@@ -212,6 +217,7 @@ libdns_la_SOURCES =                 \
        rdataslab.c                     \
        remote.c                        \
        request.c                       \
+       resconf.c                       \
        resolver.c                      \
        result.c                        \
        rootns.c                        \
similarity index 99%
rename from lib/irs/resconf.c
rename to lib/dns/resconf.c
index 915abfee44fb3729564c03749ea225ba364d3550..17163405e094c4090f23a560070388ca464ae55e 100644 (file)
@@ -96,13 +96,11 @@ struct irs_resconf {
        isc_mem_t *mctx;
 
        isc_sockaddrlist_t nameservers;
-       unsigned int numns; /*%< number of configured servers
-                            * */
+       unsigned int numns; /*%< number of configured servers */
 
        char *domainname;
        char *search[RESCONFMAXSEARCH];
-       uint8_t searchnxt; /*%< index for next free slot
-                           * */
+       uint8_t searchnxt; /*%< index for next free slot */
 
        irs_resconf_searchlist_t searchlist;
 
diff --git a/lib/irs/Makefile.am b/lib/irs/Makefile.am
deleted file mode 100644 (file)
index 85c4065..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-include $(top_srcdir)/Makefile.top
-
-lib_LTLIBRARIES = libirs.la
-
-libirs_ladir = $(includedir)/irs
-libirs_la_HEADERS =            \
-       include/irs/resconf.h
-
-libirs_la_SOURCES =            \
-       $(libirs_la_HEADERS)    \
-       resconf.c
-
-libirs_la_CPPFLAGS =           \
-       $(AM_CPPFLAGS)          \
-       $(LIBISC_CFLAGS)        \
-       $(LIBDNS_CFLAGS)        \
-       $(LIBISCCFG_CFLAGS)     \
-       $(LIBIRS_CFLAGS)
-
-libirs_la_LIBADD =             \
-       $(LIBISC_LIBS)          \
-       $(LIBDNS_LIBS)          \
-       $(LIBISCCFG_LIBS)
-
-libirs_la_LDFLAGS =            \
-       $(AM_LDFLAGS)           \
-       -release "$(PACKAGE_VERSION)"
diff --git a/lib/irs/include/.clang-format b/lib/irs/include/.clang-format
deleted file mode 120000 (symlink)
index 0e62f72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../../.clang-format.headers
\ No newline at end of file
diff --git a/lib/irs/tests b/lib/irs/tests
deleted file mode 120000 (symlink)
index 247a63e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../tests/irs
\ No newline at end of file
index 8e6e52f6fb8eee7d7e540e74226fa4c3b7de37f5..5bf08463dfb6e461b0c92e127b3bf277f570e0e8 100644 (file)
@@ -2,11 +2,11 @@ include $(top_srcdir)/Makefile.top
 
 AM_CPPFLAGS +=                 \
        $(LIBISC_CFLAGS)        \
-       $(LIBIRS_CFLAGS)
+       $(LIBDNS_CFLAGS)
 
 LDADD +=                       \
        $(LIBISC_LIBS)          \
-       $(LIBIRS_LIBS)
+       $(LIBDNS_LIBS)
 
 check_PROGRAMS =               \
        resconf_test