summaryrefslogtreecommitdiffstats
path: root/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shared: make libcryptsetup dep dlopenLennart Poettering2020-09-021-4/+0
| | | | | | | | | | | | | | Let's make libcryptsetup a dlopen() style dep for PID 1 (i.e. for RootImage= and stuff), systemd-growfs and systemd-repart. (But leave to be a regulra dep in systemd-cryptsetup, systemd-veritysetup and systemd-homed since for them the libcryptsetup support is not auxiliary but pretty much at the core of what they do.) This should be useful for container images that want systemd in the payload but don't care for the cryptsetup logic since dm-crypt and stuff isn't available in containers anyway. Fixes: #8249
* shared: rename crypt-util.c → cryptsetup-util.cLennart Poettering2020-09-021-2/+2
| | | | | | | | | | | "crypt-util.c" is such a generic name, let's avoid that, in particular as libc's/libcrypt's crypt() function is so generically named too that one might thing this is about that. Let's hence be more precise, and make clear that this is about cryptsetup, and nothing else. We already had cryptsetup-util.[ch] in src/cryptsetup/ doing keyfile management. To avoid the needless confusion, let's rename that file to cryptsetup-keyfile.[ch].
* libudev: also expose API to check for current tags in libudevLennart Poettering2020-09-011-1/+1
|
* test: verify that dbus docs are freshZbigniew Jędrzejewski-Szmek2020-08-271-0/+1
| | | | | | | | | This makes use of the developer mode switch: the test is only done if the user opted-in into developer mode. Before the man/update-dbus-docs was using the argument form where we don't need to run find_command(), but that doesn't work with test(),, so find_command() is used and we get one more line in the config log.
* meson: add "develop mode" config switchZbigniew Jędrzejewski-Szmek2020-08-271-0/+3
|
* journal: move qrcode printing code to src/shared/Lennart Poettering2020-08-251-1/+2
| | | | That way we can make use of it in homctl, too.
* Merge pull request #16819 from keszybz/seccomp-enosysZbigniew Jędrzejewski-Szmek2020-08-251-7/+8
|\ | | | | Return ENOSYS in nspawn for "unknown" syscalls
| * meson: add syscall-names-update targetZbigniew Jędrzejewski-Szmek2020-08-191-7/+8
| | | | | | | | | | The calls to find_program("tools/*") are moved earlier so they can be used in libshared/ (and it doesn't make sense to split them).
* | tree-wide: fix spelling of "fallback"Zbigniew Jędrzejewski-Szmek2020-08-201-1/+1
| | | | | | | | | | | | Similarly to "setup" vs. "set up", "fallback" is a noun, and "fall back" is the verb. (This is pretty clear when we construct a sentence in the present continous: "we are falling back" not "we are fallbacking").
* | meson: add ENABLE_ANALYZE conditionalZbigniew Jędrzejewski-Szmek2020-08-201-28/+29
| |
* | Merge pull request #16771 from poettering/dyn-pwqLennart Poettering2020-08-191-4/+2
|\ \ | | | | | | make libpwquality a dlopen() dependency + use it in systemd-firstboot, too
| * | home: make libpwquality dep a runtime dlopen() oneLennart Poettering2020-08-191-4/+2
| |/ | | | | | | | | | | | | | | | | Also, let's move the glue for this to src/shared/ so that we later can reuse this in sysemd-firstboot. Given that libpwquality is a more a leaf dependency, let's make it runtime optional, so that downstream distros can downgrade their package deps from Required to Recommended.
* / meson: add min version for libfdiskAnita Zhang2020-08-191-0/+1
|/ | | | | | | | Was trying to run src/partition/test-repart.sh on CentOS 8 and the first resize call kept failing with ERANGE. Turned out that CentOS 8 comes with libfdisk-devel-2.32.1 which is missing https://github.com/karelzak/util-linux/commit/2f35c1ead621f42f32f7777232568cb03185b473 (in libfdisk 2.33 and up).
* meson: move systemd-dissect to /usr/binLennart Poettering2020-08-111-2/+1
|
* Merge pull request #16260 from poettering/pcre2-dlopenZbigniew Jędrzejewski-Szmek2020-08-041-2/+2
|\ | | | | turn pcre2 dependency into dlopen() dependency
| * journalctl: make pcre2 a dlopen() dependencyLennart Poettering2020-07-211-2/+2
| | | | | | | | | | Let's make use of the library if it is installed, but otherwise just generate a nice error and provide all other functionality.
* | Merge pull request #16145 from poettering/qrcode-dlopenZbigniew Jędrzejewski-Szmek2020-08-041-1/+1
|\ \ | | | | | | journalctl: make libqrencode a weak (dlopen() style) dependency
| * | journalctl: make libqrencode a weak dependencyLennart Poettering2020-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way journalctl can make use of libqrencode if it's there, but will quietly not use it if it isn't. This means libqrencode remains a build-time dep, but not a strict runtime dependency. I figure we should do something similar for a bunch of other "leaf" libraries we only use few symbols of. Specifically the following are probably good candidates: * pcre2 * libpwquality * p11kit * elfutils and possibly: * libcryptsetup (only in some parts. i.e. building systemd-cryptsetup without it makes no sense. However building the dissect option with libcryptsetup as optional dep does make sense) * possibly the compression libraries (at least the ones we never use for compression, but only as alternative ones for decompression) Already covered like this is: * libxkcommon
* | | repart: adjust --help and test output widthZbigniew Jędrzejewski-Szmek2020-07-301-0/+1
| | |
* | | meson: do not choke on time epoch when there are no git tagsZbigniew Jędrzejewski-Szmek2020-07-231-7/+7
| | | | | | | | | | | | | | | | | | github ci was failing with: meson.build:685:16: ERROR: String '' cannot be converted to int
* | | Get SOURCE_EPOCH from the latest git tag instead of NEWSDaan De Meyer2020-07-231-0/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | Currently, each change to NEWS triggers a meson reconfigure that changes SOURCE_EPOCH which causes a full rebuild. Since NEWS changes relatively often, we have a full rebuild each time we pull from master even if we pull semi-regularly. This is further compounded when using branches since NEWS has a relatively high chance to differ between branches which causes git to update the modification time, leading to a full rebuild when switching between branches. We fix this by using the creation time of the latest git tag instead.
* | build: skip installation of 2 files if feature is disabledNorbert Lange2020-07-181-1/+1
| | | | | | | | | | dont install systemd-update-utmp if utmp is disabled. dont install systemd-initctl.service if sysv is disabled.
* | meson: bump version numbers for v246Zbigniew Jędrzejewski-Szmek2020-07-081-3/+3
| |
* | homed: add support for authenticating with fido2 hmac-secret tokensLennart Poettering2020-07-011-1/+2
| |
* | homectl: add support for enrolling FIDO2 HMAC-SECRET tokensLennart Poettering2020-07-011-0/+1
| |
* | build-sys: add libfido2 as optional dependencyLennart Poettering2020-07-011-0/+12
| |
* | tree-wide: add new HAVE_COMPRESSION compile time flagLennart Poettering2020-06-251-9/+11
| | | | | | | | | | | | | | | | let's simplify the checks for ZSTD/LZ4/XZ As suggested: https://github.com/systemd/systemd/pull/16096#discussion_r440705585
* | dissect/nspawn: add support for dm-verity root hash signatureLuca Boccassi2020-06-251-0/+2
|/ | | | | | Since cryptsetup 2.3.0 a new API to verify dm-verity volumes by a pkcs7 signature, with the public key in the kernel keyring, is available. Use it if libcryptsetup supports it.
* Merge pull request #16112 from poettering/nss-systemd-block-fixLennart Poettering2020-06-241-1/+1
|\ | | | | rework nss-systemd recursion lock
| * userdb: replace recursion lockLennart Poettering2020-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we'd used the existance of a specific AF_UNIX socket in the abstract namespace as lock for disabling lookup recursions. (for breaking out of the loop: userdb synthesized from nss → nss synthesized from userdb → userdb synthesized from nss → …) I did it like that because it promised to work the same both in static and in dynmically linked environments and is accessible easily from any programming language. However, it has a weakness regarding reuse attacks: the socket is securely hashed (siphash) from the thread ID in combination with the AT_RANDOM secret. Thus it should not be guessable from an attacker in advance. That's only true if a thread takes the lock only once and keeps it forever. However, if a thread takes and releases it multiple times an attacker might monitor that and quickly take the lock after the first iteration for follow-up iterations. It's not a big issue given that userdb (as the primary user for this) never released the lock and we never made the concept a public interface, and it was only included in one release so far, but it's something that deserves fixing. (moreover it's a local DoS only, only permitting to disable native userdb lookups) With this rework the libnss_systemd.so.2 module will now export two additional symbols. These symbols are not used by glibc, but can be used by arbitrary programs: one can be used to disable nss-systemd, the other to check if it is currently disabled. The lock is per-thread. It's slightly less pretty, since it requires people to manually link against C code via dlopen()/dlsym(), but it should work safely without the aforementioned weakness.
* | meson: build standalone version of systemd-tmpfilesFilipe Brandenburger2020-06-101-3/+17
| | | | | | | | | | | | | | Use -Dstandalone-binaries=yes to enable building and installing this standalone version of the binary without a dependency on the systemd-shared solib. Also move the list of sources for systemd-tmpfiles to its own meson.build file.
* | meson: add a new -Dstandalone-binaries=true optionFilipe Brandenburger2020-06-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an option to build standalone binaries that do not depend on the systemd-shared library. This option can be handy to build binaries that can be useful on a non-systemd system, binaries such as systemd-sysusers and systemd-tmpfiles have been previously requested, but installing them with all the required dependencies pulls in too much code that isn't really relevant for those use cases. The standalone use case is also relevant in containers, where minimizing the size of the container image is quite relevant. For now, only `systemd-sysusers` is also built as a standalone binary. The standalone binaries are installed as `/usr/bin/%{name}.standalone`, the packaging system is reponsible for renaming those into the correct names during the packaging step. RPM is able to do so with RemovePathPostfixes: The default behavior is to build shared binaries only, since this option is mainly intended for building distribution packages. Tested that a proper separate binary is built when using this option and that having it disabled (or using the default Meson configuration) does not produce a binary for this option.
* | AppArmor: Support for loading a set of pre-compiled profiles at startup timeYmrDtnJu2020-06-091-0/+1
|/ | | | | | | | | | | | | | | Let systemd load a set of pre-compiled AppArmor profile files from a policy cache at /etc/apparmor/earlypolicy. Maintenance of that policy cache must be done outside of systemd. After successfully loading the profiles systemd will attempt to change to a profile named systemd. If systemd is already confined in a profile, it will not load any profile files and will not attempt to change it's profile. If anything goes wrong, systemd will only log failures. It will not fail to start.
* udev: single binary replacing udevd and udevadmNorbert Lange2020-06-011-18/+4
| | | | | | | | | | | | | | | Since the separate binaries contain mostly the same code, this almost halves the size of the installation. before: 398K /bin/udevadm 391K /lib/systemd/systemd-udevd after: 431K /bin/udevadm 0 /lib/systemd/systemd-udevd -> ../../bin/udevadm Fixes: #14200
* xdg-autostart-generator: Add a generator for XDG autostart filesBenjamin Berg2020-05-271-0/+24
| | | | | | | | | | | | | | This generator can be used by desktop environments to launch autostart applications and services. The feature is an opt-in, triggered by xdg-desktop-autostart.target being activated. Also included is the new binary xdg-autostart-condition. This binary is used as an ExecCondition to test the OnlyShowIn and NotShowIn XDG desktop file keys. These need to be evaluated against the XDG_CURRENT_DESKTOP environment variable which may not be known at generation time. Co-authored-by: Henri Chain <henri.chain@enioka.com>
* dont install systemd-initctl, runlevel, telinit if no SYSV compatNorbert Lange2020-05-261-2/+3
| | | | systemd-initctl executable is still built.
* meson: add fuzz-tests= optionFrantisek Sumsal2020-05-211-3/+4
| | | | | | | | | The slow-tests= option already enables fuzzers as well, however, this option can't be used in the "fully sanitized" runs, as certain slow tests are affected by the performance quite significantly. This option allows us to enable only fuzzers without the slow tests to meet the needs of such runs.
* build-system: build the fuzz targets with both ASan and UBSanEvgeny Vereshchagin2020-05-201-0/+2
| | | | Just a follow-up to https://github.com/systemd/systemd/pull/15860
* cryptsetup: split out key loading from pkcs11 code and teach search path logicLennart Poettering2020-05-191-1/+3
| | | | | Let's do some rearrangements, so that we can later on use this to automatically search for a key file.
* allow removal of initrd servicesNorbert Lange2020-05-191-1/+7
|
* meson: initialize time-epoch to reproducible builds compatible valueDimitri John Ledkov2020-05-181-2/+7
| | | | | | | | | | | | | | | | | | | Debian Policy encourages to preserve timestamps whenever possible in the tarballs, thus stable release updates of systemd usually do not bump NEWS file timestamp. And thus time-epoch remains the same for the lifetime of a release. It would be better, if each new stable release rebuild of systemd would bump the time epoch a bit. But at the same time remain reproducible. SOURCE_DATE_EPOCH is an environmnet variable defined for this purpose. Thus if available, prefer that, instead of the NEWS file modification time. For example, on Debian/Ubuntu under the reproducible builds the SOURCE_DATE_EPOCH is set to the timestamp from the packaging metadata, thus it is incremented on every new stable release update, whilst preserving reproducible builds capability. Reference: https://reproducible-builds.org/docs/timestamps/
* shared/ethtool-util: hush gcc warnings about array boundsZbigniew Jędrzejewski-Szmek2020-05-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [127/1355] Compiling C object 'src/shared/5afaae1@@systemd-shared-245@sta/ethtool-util.c.o' ../src/shared/ethtool-util.c: In function ‘ethtool_get_permanent_macaddr’: ../src/shared/ethtool-util.c:260:60: warning: array subscript 5 is outside the bounds of an interior zero-length array ‘__u8[0]’ {aka ‘unsigned char[]’} [-Wzero-length-bounds] 260 | ret->ether_addr_octet[i] = epaddr.addr.data[i]; | ~~~~~~~~~~~~~~~~^~~ In file included from ../src/shared/ethtool-util.c:5: ../src/shared/linux/ethtool.h:704:7: note: while referencing ‘data’ 704 | __u8 data[0]; | ^~~~ ../src/shared/ethtool-util.c: In function ‘ethtool_set_features’: ../src/shared/ethtool-util.c:488:31: warning: array subscript 0 is outside the bounds of an interior zero-length array ‘__u32[0]’ {aka ‘unsigned int[]’} [-Wzero-length-bounds] 488 | len = buffer.info.data[0]; | ~~~~~~~~~~~~~~~~^~~ In file included from ../src/shared/ethtool-util.c:5: ../src/shared/linux/ethtool.h:631:8: note: while referencing ‘data’ 631 | __u32 data[0]; | ^~~~ The kernel should not define the length of the array, but it does. We can't fix that, so let's use a cast to avoid the warning. For https://github.com/systemd/systemd/issues/6119#issuecomment-626073743. v2: - use #pragma instead of a cast. It seems the cast only works in some cases, and gcc is "smart" enough to see beyond the cast. Unfortunately clang does not support this warning, so we need to do a config check whether to try to suppress.
* Merge pull request #15703 from poettering/homed-tweak-default-storageZbigniew Jędrzejewski-Szmek2020-05-081-0/+1
|\ | | | | homed: avoid double encryption
| * homed: make default storage/file system type configurable in homed.confLennart Poettering2020-05-071-0/+1
| |
* | Merge pull request #15718 from poettering/tmpfiles-offlineZbigniew Jędrzejewski-Szmek2020-05-081-0/+2
|\ \ | |/ |/| tmpfiles: read /etc/passwd + /etc/group with fgetpwent()/fgetgrent() if --root= is specified
| * tmpfiles: optionally, read /etc/passwd + /etc/group without NSSLennart Poettering2020-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | There are two libc APIs for accessing the user database: NSS/getpwuid(), and fgetpwent(). if we run in --root= mode (i.e. "offline" mode), let's use the latter. Otherwise the former. This means tmpfiles can use the database included in the root environment for chowning, which is a lot more appropriate. Fixes: #14806
* | Add a basic test that the configured fallback hostname is OKZbigniew Jędrzejewski-Szmek2020-05-071-1/+8
| | | | | | | | | | | | | | | | Ideally, assert_cc() would be used for this, so that it is not possible to even compile systemd with something like '-Dfallback-hostname=.foo'. But to do a proper check we need to call hostname_is_valid(), and we cannot depend on being able to run code (e.g. during cross-compilation). So let's do a very superficial check in meson, and a proper on in test-util.
* | meson: drop "meson-" prefix from various helper script filenamesZbigniew Jędrzejewski-Szmek2020-05-071-9/+9
|/ | | | | | | | | | | In a few cases, the prefix was originally necessary because a different helper script was used for automake, and a different one for meson. But now we use meson exclusively, and the prefix isn't useful. This also synchronizes the target name, file name, and variable name in meson.build. The targets exposed by meson didn't have the prefix, so the user interface is unchanged. (The prefix is retained in the few tools that are used for meson itself, e.g. meosn-vcs-tag.sh, meson-make-symlink.sh, etc.)
* meson: Do not drop warnings (unused variable) when NDEBUG is definedBenjamin Robin2020-05-061-9/+0
| | | | | This is no longer needed, since there is now no warning with NDEBUG defined
* Merge pull request #15473 from keszybz/bus-introspectionZbigniew Jędrzejewski-Szmek2020-05-061-3/+4
|\