summaryrefslogtreecommitdiff
path: root/src/resolve/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* meson: Introduce userspace depJan Janssen2023-03-101-0/+1
| | | | This will help in a later commit to separate userspace from EFI builds.
* meson: Use dicts for fuzzer definitionsJan Janssen2023-02-211-16/+20
|
* meson: Use dicts for test definitionsJan Janssen2023-02-211-46/+47
| | | | | | | Although this slightly more verbose it makes it much easier to reason about. The code that produces the tests heavily benefits from this. Test lists are also now sorted by test name.
* meson: Do not include headers in source listsJan Janssen2023-01-241-43/+4
| | | | | | Meson+ninja+compiler do this for us and are better at it. https://mesonbuild.com/FAQ.html#do-i-need-to-add-my-headers-to-the-sources-list-like-in-autotools
* tests: fuzz dns resource recordsEvgeny Vereshchagin2022-11-261-0/+5
| | | | | It should help to catch issues like https://github.com/systemd/systemd/issues/19584, https://github.com/systemd/systemd/issues/25449.
* meson: also allow setting GIT_VERSION via templatesZbigniew Jędrzejewski-Szmek2022-04-051-1/+1
| | | | | | | | | GIT_VERSION is not available as a config.h variable, because it's rendered into version.h during builds. Let's rework jinja2 rendering to also parse version.h. No functional change, the new variable is so far unused. I guess this will make partial rebuilds a bit slower, but it's useful to be able to use the full version string.
* meson: move files' closing brace to separate lineZbigniew Jędrzejewski-Szmek2022-03-031-5/+10
|
* meson: do not use split() in file listsZbigniew Jędrzejewski-Szmek2022-03-021-76/+73
| | | | | | | | | | | The approach to use '''…'''.split() instead of a list of strings was initially used when converting from automake because it allowed identical blocks of lines to be used for both, making the conversion easier. But over the years we have been using normal lists more and more, especially when there were just a few filenames listed. This converts the rest. No functional change.
* resolved: Test for DnsStream (plain TCP DNS and DoT)Joan Bruguera2022-01-271-1/+10
| | | | | | | | | | Tests DnsStream event handling, both for plain TCP DNS and DNS over TLS. The DoT test requires the "openssl s_server" command line tool to mock a simple TLS server. Thus the test's TLS part is skipped if openssl it not available. The test works for both DNS_OVER_TLS_USE_GNUTLS and DNS_OVER_TLS_USE_OPENSSL. The DoT case fails due to a bug, which is fixed on the next commit.
* tests: fuzz etc_hosts_parseEvgeny Vereshchagin2022-01-201-0/+7
| | | | That's just a follow-up to https://github.com/systemd/systemd/pull/22179
* meson: Use files() for fuzzersJan Janssen2022-01-111-1/+1
| | | | | | Not having to provide the full path in the source tree is much nicer and the produced lists can also be used anywhere in the source tree.
* meson: Use files() for testsJan Janssen2022-01-111-8/+8
| | | | | | Not having to provide the full path in the source tree is much nicer and the produced lists can also be used anywhere in the source tree.
* meson: fix build with -Dcryptolib=openssl -Ddns-over-tls=falseYu Watanabe2021-12-241-8/+1
| | | | | | | | Previously, when -Ddns-over-tls=false, libopenssl was missing in the dependency of resolved. Also, this drops libgpg_error when it is not necessary. Replaces #21878.
* meson: stop building out convenience libraries by defaultZbigniew Jędrzejewski-Szmek2021-12-161-1/+2
| | | | | | | | | | | | | | | | | The meson default for static_library() are: build_by_default=true, install=false. We never interact with the static libraries, and we only care about them as a stepping-stone towards the installable executables or libraries. Thus let's only build them if they are a dependency of something else we are building. While at it, let's drop install:false, since this appears to be the default. This change would have fixed the issue with lib_import_common failing to build too: we wouldn't attempt to build it. In practice this changes very little, because we generally only declare static libraries where there's something in the default target that will make use of them. But it seems to be a better pattern to set build_by_default to false.
* meson: drop libgcrypt dep from resolved testsZbigniew Jędrzejewski-Szmek2021-12-081-7/+0
| | | | | | | | | Follow-up for pull request #21170. I hoped that we would drop libgcrypt fully and drop all references to the library in meson, but this doesn't seem feasible (because of the use in sd-journal). But let's remove it here, all the resolved code has been switched to work either of the two libraries.
* resolve: Port dnssec verify from gcrypt to openssl^gcryptKevin Kuehler2021-11-301-8/+16
| | | | Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
* build: preserve correct mode when generating files via jinja2Christian Brauner2021-11-081-2/+1
| | | | | | | | | When using "capture : true" in custom_target()s the mode of the source file is not preserved when the generated file is not installed and so needs to be tweaked manually. Switch from output capture to creating the target file and copy the permissions from the input file. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
* meson: use jinja2 for src/resolve/Zbigniew Jędrzejewski-Szmek2021-05-191-10/+9
|
* resolved: split out function to determine the local llmnr hostnameZbigniew Jędrzejewski-Szmek2021-03-261-0/+2
|
* meson: fix build error of test-dnssec-complexYu Watanabe2021-03-211-3/+7
| | | | Fixes #19065.
* resolved: instead of closing DNS UDP transaction fds right-away, add them to ↵Lennart Poettering2021-02-151-0/+2
| | | | | | | | | | | | | a socket "graveyard" The "socket graveyard" shall contain sockets we have sent a question out of, but not received a reply. If we'd close thus sockets immediately when we are not interested anymore, we'd trigger ICMP port unreachable messages once we after all *do* get a reply. Let's avoid that, by leaving the fds open for a bit longer, until a timeout is reached or a reply datagram received. Fixes: #17421
* meson: move test or fuzzer definitions to relevant meson.build in subdirectoriesYu Watanabe2021-01-191-0/+11
|
* meson: slightly disentangle code dependenciesYu Watanabe2021-01-191-1/+3
| | | | But, still sd-id128 is used in src/basic.
* meson: enable several tests even if the relevant features are disabledYu Watanabe2021-01-191-13/+7
|
* meson: fix indentationYu Watanabe2021-01-191-4/+6
|
* meson: drop unnecessary variable declarationsYu Watanabe2021-01-191-4/+2
|
* meson: drop unnecessary loopYu Watanabe2021-01-191-53/+36
|
* meson: make the second and third elements of tests or fuzzers optionalYu Watanabe2021-01-191-8/+6
| | | | Then, we can shorten many test definitions.
* Add install-sysconfdir=no-samples option for (non-)installation of sample ↵Josh Triplett2021-01-141-1/+1
| | | | | | | | | | | | | configs By default, systemd installs various sample configuration files containing commented-out defaults. Systems seeking to minimize the number of files in /etc may wish to install directories and configuration files that have semantic effects, but not install not commented-out sample configuration files. Turn install-sysconfdir into a multi-valued option, with a "no-samples" value to skip installing sample-only configuration files.
* meson: add option to skip installing to $sysconfdirJörg Thalheim2020-11-121-2/+4
| | | | | | | | | | | | | | | | | | | | | This is useful for development where overwriting files out side the configured prefix will affect the host as well as stateless systems such as NixOS that don't let packages install to /etc but handle configuration on their own. Alternative to https://github.com/systemd/systemd/pull/17501 tested with: $ mkdir inst build && cd build $ meson \ -Dcreate-log-dirs=false \ -Dsysvrcnd-path=$(realpath ../inst)/etc/rc.d \ -Dsysvinit-path=$(realpath ../inst)/etc/init.d \ -Drootprefix=$(realpath ../inst) \ -Dinstall-sysconfdir=false \ --prefix=$(realpath ../inst) .. $ ninja install
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* shared: make libidn/libdidn2 dependency a dlopen() oneLennart Poettering2020-10-091-1/+1
|
* resolved: add minimal varlink api for resolving hostnames/addressesLennart Poettering2020-08-261-38/+40
| | | | | | This allows us to later port nss-resolve to use Varlink rather than D-Bus for resolution. This has the benefit that nss-resolve based resoluton works even without D-Bus being up. And it's faster too.
* shared: move in_addr_ifindex_name_from_string_auto() thereMarc-André Lureau2020-05-071-8/+0
|
* Implement SNI when using DNS-over-TLSGuilhem Lettron2019-12-041-0/+8
| | | | | | | | | Some DNS providers need SNI to identify client. This can be used by adding #name to a DNS. Example: [Resolve] DNS=192.168.1.1#example.com
* Merge pull request #9770 from keszybz/etc-resolved-no-addressYu Watanabe2018-08-021-0/+10
|\ | | | | Slightly more efficient handling of /etc/hosts blacklist entries
| * test-resolved-etc-hosts: add tests for /etc/hosts parsingZbigniew Jędrzejewski-Szmek2018-08-011-0/+10
| | | | | | | | | | Calling 'build/test-resolved-etc-hosts filename' parses just that file. This is useful to test against https://hosts.ubuntu101.co.za/hosts.
* | meson: drop parens when appending to listZbigniew Jędrzejewski-Szmek2018-07-311-4/+6
|/ | | | | | Meson does not care either way, so let's use the simpler syntax. And files() already gives a list, so nesting this in a list wouldn't be necessary even if meson did not flatten everything.
* resolved: basic OpenSSL support for DNS-over-TLSIwan Timmer2018-07-271-2/+9
| | | | | | This provides basic OpenSSL support without optimizations like TCP Fast Open and TLS Session Tickets. Notice only a single SSL library can be enabled at a time and therefore journald functions provided by GnuTLS will be disabled when using OpenSSL. Fixes #9531
* resolved: refactor GnuTLS specific code in separate source fileIwan Timmer2018-07-271-0/+2
| | | | | | This is a first step towards supporting alternative TLS implementations for DNS-over-TLS. Co-authored-by: Filipe Brandenburger <filbranden@google.com>
* meson: make DNS-over-TLS support optionalYu Watanabe2018-06-201-0/+5
| | | | | This adds dns-over-tls option to meson. If set to 'false', systemd-resolved is not linked with libgnutls.
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* resolvectl: rename systemd-resolve to resolvectlYu Watanabe2018-04-191-3/+3
| | | | | For the compatibility, `systemd-resolve` will be created as a symbolic link to `resolvectl`.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* resolve-tool: provide resolvconf(8) compatibilityLennart Poettering2018-03-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns resolve-tool into a multi-call binary. When invoked as "resolvconf" it provides minimal compatibility with the resolvconf(8) tool of various distributions (and FreeBSD as it appears). This new interface understands to varying degrees features of the two major implementations of resolvconf(8): Debian's original one and "openresolv". Specifically: Fully supported: -a -d (supported by all implementations) -f (introduced by openresolv) Somewhat supported: -x (introduced by openresolv, mapped to a '~.' domain entry) Unsupported and ignored: -m -p (introduced by openresolv, not really necessary for us) Unsupported and resulting in failure: -u (supported by all other implementations) -I -i -l -R -r -v -V (all introduced by openresolv) --enable-updates --disable-updates --updates-are-enabled (specific to Debian's implementation) Of course, resolvconf(8) is a tool with multiple backends, in our implementation systemd-resolved is the only backend. Fixes: #7202
* meson: drop unnecessary "transformation" of policy filesZbigniew Jędrzejewski-Szmek2018-02-161-7/+2
| | | | | Those files don't contain any @variables@, so the configuration step was just copying them to build/. Let's avoid that, and fix their suffixes while at it.
* Gettextize policy filesGunnar Hjalmarsson2018-02-161-6/+4
| | | | | | | * Don't merge translations into the files * Add gettext-domain="systemd" to description and message Closes #8162, replaces #8118.
* meson: use a convenience lib for shared resolve filesZbigniew Jędrzejewski-Szmek2018-01-031-17/+16
| | | | | | | | | | | | | This reduces the man=false meson target count from 1281 to 1253. -- A fully scientific test: git grep _sources, :/*.build|cut -d: -f2|tr -d ' '|sort|uniq -c reveals that libudev_sources is the only source list now reused twice. There's some ugly circular dependency between libudev and libshared, and anyway I'm not sure if we don't want to use different compilation options (LOG_REALM_…) in those two cases, so I'm leaving that alone for now.
* resolved: consult Polkit for privileges when manipulating DNS-SDDmitry Rozhkov2017-12-081-0/+9
|