summaryrefslogtreecommitdiffstats
path: root/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make bzip2 an optional dependency for systemd-importdThiago Macieira2018-09-251-1/+0
| | | | | | Yes, there are still a lot of users of bzip2, but it's fallen out of favour after LZMA/xz, which can compress a lot more and often decompresses faster than bzip2 too.
* meson: drop some unneeded parensZbigniew Jędrzejewski-Szmek2018-09-131-6/+6
|
* meson: always allow compilation of tests binariesZbigniew Jędrzejewski-Szmek2018-09-131-10/+8
|
* meson: do not build tests by default when '-Dtests=false'Yu Watanabe2018-09-131-3/+6
| | | | | [zj: it is still possible to build tests explicitly by calling ninja -C build test-name. This way we have full flexibility.]
* meson: disable _all_ tests when -Dtests=falseZbigniew Jędrzejewski-Szmek2018-09-131-17/+31
| | | | | | Back in 08318a2c5acb3d0e4243c36461e69a3e45482441, value "false" was enabled for '-Dtests=', but various tests were not conditionalized properly. So even with -Dtests=false -Dslow-tests=false we'd run 120 tests. Let's make this consistent.
* meson: disable "slow tests" too when tests are generally disabledZbigniew Jędrzejewski-Szmek2018-09-131-4/+5
| | | | | | | We would have a strange situation where after setting -Dslow-tests=true -Dtests=false we'd get mostly the slow tests (plus some other ones which I'll fix in subsequent commit). Let's simplify things by making -Dtests=false just disable those tests too.
* test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIRFilipe Brandenburger2018-09-121-2/+2
| | | | | | | | | | | | | This makes it so that tests no longer need to know the absolute paths to the source and build dirs, instead using the systemd-runtest.env file to get these paths when running from the build tree. Confirmed that test-catalog works on `ninja test`, when called standalone and also when the environment file is not present, in which case it will use the installed location under /usr/lib/systemd/catalog. The location can now also be overridden for this test by setting the $SYSTEMD_CATALOG_DIR environment variable.
* test: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATAFilipe Brandenburger2018-09-121-1/+9
| | | | | | | | | | | | | | | | | | | | | This simplifies get_testdata_dir() to simply checking for an environment variable, with an additional function to locate a systemd-runtest.env file in the same directory as the test binary and reading environment variable assignments from that file if it exists. This makes it possible to: - Run `ninja test` from the build dir and have it use ${srcdir}/test for test unit definitions. - Run a test directly, such as `build/test-execute` and have it locate them correctly. - Run installed tests (from systemd-tests package) and locate the test units in the installed location (/usr/lib/systemd/tests/testdata), in which case the absence of the systemd-runtest.env file will have get_testdata_dir() use the installed location hardcoded into the binaries. Explicit setting of $SYSTEMD_TEST_DATA still overrides the contents of systemd-runtest.env.
* Merge pull request #10037 from filbranden/docs2Zbigniew Jędrzejewski-Szmek2018-09-091-9/+9
|\ | | | | Moving docs around and starting conversion to Markdown
| * docs: convert TRANSLATORS to MarkdownFilipe Brandenburger2018-09-081-1/+1
| | | | | | | | | | Also expand it to cover typical tasks of creating new translations, updating existing ones and compiling them (which can be useful to check syntax.)
| * docs: convert DISTRO_PORTING to MarkdownFilipe Brandenburger2018-09-081-1/+1
| |
| * docs: move doc/ to docs/Filipe Brandenburger2018-09-081-9/+9
| | | | | | | | | | | | | | | | | | The docs/ directory is special in GitHub, since it can be used to serve GitHub Pages from, so there's a benefit to switching to it in order to expose it directly as a website. Updated references to it from the documentations themselves, from the CONTRIBUTING.md file and from Meson build files.
* | build-sys: Use common gcc argument detection for negative warning flags.Filipe Brandenburger2018-09-091-17/+14
|/ | | | | | | | | | | | | | | | | | | | Starting with meson 0.46, it is able to detect these argument correctly. See this commit in meson codebase for more details: https://github.com/mesonbuild/meson/commit/695b8f3a0377d3e2ce78ba8716adc365b18edea1 We already carry a requirement for meson_version : '>= 0.46', so we can be sure our build system will include this commit. Tested by building systemd using a cloned meson synced to the 0.46.0 tag, confirmed the warnings were detected correctly in that case. The meson messages included this snippet: > Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES > Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES > Compiler for C supports arguments -Wno-unused-result -Wunused-result: YES > Compiler for C supports arguments -Wno-format-signedness -Wformat-signedness: YES > Compiler for C supports arguments -Wno-error=nonnull -Werror=nonnull: YES > Compiler for C supports arguments -Wno-maybe-uninitialized -Wmaybe-uninitialized: YES
* build-sys: disable -Wmaybe-uninitializedFilipe Brandenburger2018-09-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler flag -Wmaybe-uninitialized is quite noisy and produces many false positives, especially when optimization flags are enabled (tested gcc 8.2.1), so let's just disable it in systemd build. For example, with CFLAGS=-O2, the build produces 11 such warnings and the default CFLAGS of Fedora's rpmbuild warns about it in 176 places. A look at a sample of those shows that most are false positives, where the compiler just can't figure it out correctly. (While fixing those would be nice, I'm not sure it's a good use of our time.) The noisy [-Wmaybe-uninitialized] warnings are not just an annoyance, since they make it harder to spot warnings that indicate actual problems (such as variable declared but not used.) Silencing those is beneficial, so that contributors would see warnings where there are actually actionable problems, so there's a better chance of having those issues addressed before a PR is pushed. Tested: $ CFLAGS='-O2 -Wp,-D_FORTIFY_SOURCE=2' meson build/ $ ninja -C build/ (NOTE: -Wp,-D_FORTIFY_SOURCE=2 prevents [-Wstringop-truncation] warnings.) With the commands above, the build will not produce any [-Wmaybe-uninitialized] warnings (or any other warnings), which is not really the case before this commit. Also tested with rpmbuild on Fedora, after this commit there are no warnings produced in the build step.
* cryptsetup: add support for sector-size= option (#9936)Dimitri John Ledkov2018-08-291-0/+6
| | | | | Bug-Ubuntu: https://launchpad.net/bugs/1776626 Closes #8881.
* networkd and sd-netlink: add support for Generic netlink And FooOverUDP to ↵Susant Sahani2018-08-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPIP tunnel This work add support to generic netlink to sd-netlink. See https://lwn.net/Articles/208755/ networkd: add support FooOverUDP support to IPIP tunnel netdev https://lwn.net/Articles/614348/ Example conf: /lib/systemd/network/1-fou-tunnel.netdev ``` [NetDev] Name=fou-tun Kind=fou [FooOverUDP] Port=5555 Protocol=4 ``` /lib/systemd/network/ipip-tunnel.netdev ``` [NetDev] Name=ipip-tun Kind=ipip [Tunnel] Independent=true Local=10.65.208.212 Remote=10.65.208.211 FooOverUDP=true FOUDestinationPort=5555 ``` $ ip -d link show ipip-tun ``` 5: ipip-tun@NONE: <POINTOPOINT,NOARP> mtu 1472 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 10.65.208.212 peer 10.65.208.211 promiscuity 0 ipip remote 10.65.208.211 local 10.65.208.212 ttl inherit pmtudisc encap fou encap-sport auto encap-dport 5555 noencap-csum noencap-csum6 noencap-remcsum numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 ```
* meson: rename -Ddebug to -Ddebug-extraZbigniew Jędrzejewski-Szmek2018-08-211-1/+1
| | | | | | | Meson added -Doptimization and -Ddebug options, which obviously causes a conflict with our -Ddebug options. Let's rename it. Fixes #9883.
* meson: actually honor pkgconfig*dir options (#9841)Benedikt Morbach2018-08-101-2/+2
| | | | both were silently ignored leading to some of the pkg-config files ending up in the wrong place
* meson: drop parens when appending to listZbigniew Jędrzejewski-Szmek2018-07-311-44/+43
| | | | | | 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-6/+35
| | | | | | 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
* Merge pull request #8876 from yuwata/meson-0.46Zbigniew Jędrzejewski-Szmek2018-07-241-41/+21
|\ | | | | meson: bump minimum required version to 0.46
| * meson: use has_link_argument() and friendsYu Watanabe2018-07-231-20/+3
| | | | | | | | | | This bumps the minimum required version of meson to 0.46, as `has_link_argument()` and friends are supported since 0.46.
| * meson: use integer type in optionsYu Watanabe2018-07-231-22/+19
| | | | | | | | | | | | This bumps the minimum required version of meson to 0.45 and python to 3.5, as integer type option is supported since meson-0.45 and meson-0.45 requires python-3.5.
* | Merge pull request #9560 from mbiebl/uaccess-dev-kvmZbigniew Jędrzejewski-Szmek2018-07-231-1/+3
|\ \ | |/ |/| Re-add uaccess tag for /dev/kvm
| * Do not apply uaccess tag for /dev/kvm if mode is 0666Michael Biebl2018-07-131-1/+3
| |
* | meson: allow building resolved and machined without nss modulesYu Watanabe2018-07-231-6/+34
| | | | | | | | | | | | | | | | | | | | | | This adds -Dnss-resolve= and -Dnss-mymachines= meson options. By using this option, e.g., resolved can be built without nss-resolve. When no nss modules are built, then test-nss is neither built. Also, This changes the option name -Dmyhostname= to -Dnss-myhostname= for consistency to other nss related options. Closes #9596.
* | meson: drop redundant messagesYu Watanabe2018-07-231-2/+0
| | | | | | | | The equivalent messages are shown in the last summary.
* | check nobody user/group validity only when not cross compilingChen Qi2018-07-231-31/+33
| | | | | | | | | | | | | | | | | | | | | | Using `getent' and `id' command in case of cross compiling does not make much sense. This is because it is the host files that are checked. Besides, in some restricted cross compilation environment, these two command may not even be available. This is to avoid host comtamination. So we should only check the validity using getent and id when not cross compiling.
* | meson: remove false check for key_serial_tZbigniew Jędrzejewski-Szmek2018-07-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | key_serial_t is defined in keyutil.h, which wasn't included in the header list in the test, so the test always failed. We were always compiling stuff with !HAVE_KEY_SERIAL_T. We could try to add keyutil.h to the test, but then we'd have to first check if it is available, which just doesn't seem worth the trouble. key_serial_t should always be defined as int32_t. Let's keep the uncoditional define, since repeated compatible typedefs are not a problem, and it allows us to compile even if the header file is missing. If there's ever a change in the definition, we'll have to adjust the code for the different type anyway, and our compiler will tell us.
* | meson: unify linux/stat.h check with other checks and use _GNU_SOURCEZbigniew Jędrzejewski-Szmek2018-07-181-6/+14
| | | | | | | | | | | | Using _GNU_SOURCE is better because that's how we include the headers in the actual build, and some headers define different stuff when it is defined. sys/stat.h for example defines 'struct statx' conditionally.
* | build-sys: Detect whether struct statx is defined in sys/stat.hFilipe Brandenburger2018-07-161-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with glibc 2.27.9000-36.fc29, include file sys/stat.h will have a definition for struct statx, in which case include file linux/stat.h should be avoided, in order to prevent a duplicate definition. In file included from ../src/basic/missing.h:18, from ../src/basic/util.h:28, from ../src/basic/hashmap.h:10, from ../src/shared/bus-util.h:12, from ../src/libsystemd/sd-bus/bus-creds.c:11: /usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’ struct statx { ^~~~~ In file included from /usr/include/sys/stat.h:446, from ../src/basic/util.h:19, from ../src/basic/hashmap.h:10, from ../src/shared/bus-util.h:12, from ../src/libsystemd/sd-bus/bus-creds.c:11: /usr/include/bits/statx.h:36:8: note: originally defined here struct statx ^~~~~ Extend our meson.build to look for struct statx when only sys/stat.h is included and, in that case, do not include linux/stat.h anymore. Tested that systemd builds correctly when using a glibc version that includes a definition for struct statx. glibc Fedora RPM update: https://src.fedoraproject.org/rpms/glibc/c/28cb5d31fc1e5887912283c889689c47076278ae glibc upstream commit: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=fd70af45528d59a00eb3190ef6706cb299488fcd
* meson: do not compare objects of different typesYu Watanabe2018-06-281-1/+2
| | | | | | | | | | This fixes the following warning: ``` meson.build:1140: WARNING: Trying to compare values of different types (DependencyHolder, list) using !=. The result of this is undefined and will become a hard error in a future Meson release. ``` Follow-up for f02582f69fe1e7663a87ba80bd4f90d5d23ee75f(#9410).
* meson: check whether gnutls supports TCP fast openYu Watanabe2018-06-251-1/+1
| | | | Fixes #9403
* meson: bump package and library versionv239Lennart Poettering2018-06-221-3/+3
|
* meson: make DNS-over-TLS support optionalYu Watanabe2018-06-201-7/+15
| | | | | 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.
* resolve: rename PrivateDNS to DNSOverTLSIwan Timmer2018-06-141-9/+9
| | | PrivateDNS is not considered a good name for this option, so rename it to DNSOverTLS
* resolved: support for DNS-over-TLSIwan Timmer2018-06-111-0/+14
| | | | Add support for DNS-over-TLS using GnuTLS. To reduce latency also TLS False Start and TLS session resumption is supported.
* meson: also reject shifts that change the sign bitZbigniew Jędrzejewski-Szmek2018-06-111-0/+1
| | | | | | | | | | ../src/test/test-sizeof.c: In function ‘main’: ../src/test/test-sizeof.c:70:24: error: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=] X = (1 << 31), ^~ cc1: some warnings being treated as errors Follow-up for b05ecb8cadd8c32d31b1aabcff4e507bd89b5465.
* meson: do not allow bit-shift overflowsZbigniew Jędrzejewski-Szmek2018-06-091-0/+1
| | | | | | | | | | | | | | The primary motivation is to catch enum values created through a shift that is too big: ../src/test/test-sizeof.c:26:29: error: left shift count >= width of type [-Werror=shift-count-overflow] enum_with_shift = 1 << 32, ^~ cc1: some warnings being treated as errors The compiler will now reject those. This is an alternative to #9224.
* CODING_STYLE: allow c99-style mixed code and declarationsZbigniew Jędrzejewski-Szmek2018-06-071-2/+1
| | | | | | | | | | | | We already allowed variables to be declared in the middle of a function (whenever a new scope was opened), so this isn't such a big change. Sometimes we would open a scope just to work around this prohibition. But sometimes the code can be much clearer if the variable is declared somewhere in the middle of a scope, in particular if the declaration is combined with initialization or acquisition of some resources. So let's allow this, but keep things in the old style, unless there's a good reason to move the variable declaration to a different place.
* build-sys: Add option to link systemctl staticallyFelipe Sateler2018-05-311-1/+11
| | | | | | | | | | | | | | | | | Systemctl is special because it is required for many tasks that may need to be performed when the system is not fully configured and/or partially broken: 1. Installing/Uninstalling services during OS installs and upgrades 2. Shutting down the system Therefore reduce the number of dependencies that systemctl pulls in, by not linking to systemd-shared. This brings a bit of resilience to systemctl (and its aliases shutdown, reboot, etc), by linking against less external libraries. Because this extra resilience comes at a cost of approximately 580 KB extra space, this is done behind a meson build option.
* fuzz-journal-remote: a fuzzer for journal-remote over-the-wire inputZbigniew Jędrzejewski-Szmek2018-05-311-0/+1
|
* journal-remote: split out µhttpd support and main() into a separate fileZbigniew Jędrzejewski-Szmek2018-05-311-1/+2
| | | | | | | | | | | | | This is in preparation to reusing the RemoteServer in other concepts. I tried to keep changes to minimum: - arg_* global variables are now passed as state in RemoteServer - exported functions get the "journal_remote_" prefix - some variables are renamed In particular, there is an ugly global RemoveServer* variable. It was originally added because µhttpd did not allow state to be passed to the callbacks. I'm not sure if this has been remediated in µhttpd, but either way, this is not changed here, the global variable is only renamed for clarity.
* meson: use a convenience static library for nspawn coreZbigniew Jędrzejewski-Szmek2018-05-281-6/+5
| | | | | | | | | | | This makes it easier to link the nspawn implementation to the tests. Right now this just means that nspawn-patch-uid.c is not compiled twice, which is nice, but results in test-patch-uid being slightly bigger, which is not nice. But in general, we should use convenience libs to compile everything just once, as far as possible. Otherwise, once we start compiling a few files here twice, and a few file there thrice, we soon end up in a state where we are doing hundreds of extra compilations. So let's do the "right" thing, even if is might not be more efficient.
* add new portable service frameworkLennart Poettering2018-05-241-0/+24
| | | | | | | | | | | This adds a small service "systemd-portabled" and a matching client "portablectl", which implement the "portable service" concept. The daemon implements the actual operations, is PolicyKit-enabled and is activated on demand with exit-on-idle. Both the daemon and the client are an optional build artifact, enabled by default rhough.
* Merge pull request #9036 from keszybz/rpm-macro-cleanupYu Watanabe2018-05-201-0/+2
|\ | | | | rpm macro cleanup
| * rpm: add macros for common configuration dirsZbigniew Jędrzejewski-Szmek2018-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | %_environmnentdir /usr/lib/environment.d %_modulesloaddir /usr/lib/modules-load.d %_modprobedir /usr/lib/modprobe.d This makes installing files there more convenient because people don't need to construct the path from %_prefix/lib/… . See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/GBF5WJLTQVSXMHGYGBF3723ZYCWFBR7C/.
* | meson: use run_target for generating tags with ctagsEvegeny Vereshchagin2018-05-191-2/+1
|/ | | | | | | | | | In https://github.com/systemd/systemd/pull/6561, `run_target` was changed to `custom_target`, which inadvertently caused relative paths to be passed to ctags due to https://github.com/mesonbuild/meson/issues/3589. The switch to `run_target` causes absolute paths to be passed again and makes it easier to jump from file to file, hopefully delaying the need to exit Vim :-)