summaryrefslogtreecommitdiff
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\
| * meson: add man/update-dbus-docs targetZbigniew Jędrzejewski-Szmek2020-05-051-3/+4
| |
* | build-system: bring back 'nonnull'Evgeny Vereshchagin2020-05-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having taken a look at https://github.com/systemd/systemd/runs/645252074?check_suite_focus=true where fuzz-journal-remote failed with ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==16==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f864f98948e bp 0x7ffde5c6b7c0 sp 0x7ffde5c6b560 T0) ==16==The signal is caused by a READ memory access. ==16==Hint: address points to the zero page. SCARINESS: 10 (null-deref) #0 0x7f864f98948e in output_short /work/build/../../src/systemd/src/shared/logs-show.c #1 0x7f864f984624 in show_journal_entry /work/build/../../src/systemd/src/shared/logs-show.c:1154:15 #2 0x7f864f984b63 in show_journal /work/build/../../src/systemd/src/shared/logs-show.c:1239:21 #3 0x4cabab in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-journal-remote.c:67:21 #4 0x51fd16 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:556:15 #5 0x51c330 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:470:3 #6 0x523700 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__1::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/libfuzzer/FuzzerLoop.cpp:765:7 #7 0x5246cd in fuzzer::Fuzzer::Loop(std::__1::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) /src/libfuzzer/FuzzerLoop.cpp:792:3 #8 0x4de3d1 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:824:6 #9 0x4cfb47 in main /src/libfuzzer/FuzzerMain.cpp:19:10 #10 0x7f864e69782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #11 0x41f2a8 in _start (out/fuzz-journal-remote+0x41f2a8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /work/build/../../src/systemd/src/shared/logs-show.c in output_short ==16==ABORTING MS: 0 ; base unit: 0000000000000000000000000000000000000000 0x44,0x3d,0xa,0x5f,0x5f,0x52,0x45,0x41,0x4c,0x54,0x49,0x4d,0x45,0x5f,0x54,0x49,0x4d,0x45,0x53,0x54,0x41,0x4d,0x50,0x3d,0x31,0xa,0xa, D=\x0a__REALTIME_TIMESTAMP=1\x0a\x0a artifact_prefix='./'; Test unit written to ./crash-d635b9dd31cceff3c912fd45e1a58d7e90f0ad73 Base64: RD0KX19SRUFMVElNRV9USU1FU1RBTVA9MQoK ``` I was wondering why it hadn't been caught by the compiler even though clang should have failed to compile it with ``` ../src/shared/logs-show.c:624:25: warning: null passed to a callee that requires a non-null argument [-Wnonnull] print_multiline(f, 4 + fieldlen + 1, 0, OUTPUT_FULL_WIDTH, 0, false, ^ ../src/shared/logs-show.c:161:24: note: callee declares array parameter as static here size_t highlight[static 2]) { ^ ~~~~~~~~~~ ../src/shared/logs-show.c:1239:21: warning: null passed to a callee that requires a non-null argument [-Wnonnull] r = show_journal_entry(f, j, mode, n_columns, flags, NULL, NULL, ellipsized); ^ ~~~~ ../src/shared/logs-show.c:1133:30: note: callee declares array parameter as static here const size_t highlight[static 2], ^ ~~~~~~~~~~ 2 warnings generated. ``` Given that judging by https://github.com/systemd/systemd/issues/13039 it doesn't seem to be the first time issues like that have been missed I think it would be better to turn nonnull on and get around false positives on a case-by-case basis with DISABLE_WARNING_NONNULL .. REENABLE_WARNING Reopens https://github.com/systemd/systemd/issues/6119
* | coredump: add zstandard support for coredumpsNorbert Lange2020-05-041-11/+37
|/ | | | | this will hook libzstd into coredump, using this format as default.
* meson: test userdbctl and homectl --helpZbigniew Jędrzejewski-Szmek2020-04-281-2/+2
|
* meson: modernize indentationZbigniew Jędrzejewski-Szmek2020-04-281-1078/+1151
| | | | | | By using a newline after executable( and run_target(, we get less indentation and the indentation level does not change when the returned object is saved to a variable.
* Include new configure options in features listJakov Smolic2020-04-161-0/+2
| | | | | Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
* Add new meson configure option for controlling systemd-analyze supportJakov Smolic2020-04-151-1/+1
| | | | | | | | Enables building systemd without systemd-analyze, which in return saves approx. 4 MB of space upon installing systemd. Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
* meson,resolved: make default LLMNR= and MulticastDNS= values configurableZbigniew Jędrzejewski-Szmek2020-04-151-0/+12
| | | | For https://fedoraproject.org/wiki/Changes/systemd-resolved.
* Merge pull request #14338 from keszybz/functional-test-reworkFrantisek Sumsal2020-03-301-5/+22
|\ | | | | Functional test rework
| * meson: use find_program() for add-git-hook.shZbigniew Jędrzejewski-Szmek2020-03-281-3/+6
| | | | | | | | | | | | | | | | On azure systemd.systemd ci, the build would fail with: meson.build:53:0: ERROR: Program or command '/home/appuser/fuzzer/tools/add-git-hook.sh' not found or not executable We use find_program() for all helpers, so let's do it for this one too. This should solve the issue, whatever it exactly is.
| * test: convert TEST-45 to a normal meson testZbigniew Jędrzejewski-Szmek2020-03-281-1/+7
| | | | | | | | | | On my laptop, it now takes 0.23 s. We don't need the overhead of creating an image and spawning a machine to mangle a file in /tmp.
| * test: convert TEST-35-NETWORK-GENERATOR into a unit testZbigniew Jędrzejewski-Szmek2020-03-281-1/+8
| |
| * meson: report -Dinstall-tests in summaryZbigniew Jędrzejewski-Szmek2020-03-221-0/+1
| |
* | ci: turn off FuzzBuzzEvgeny Vereshchagin2020-03-301-11/+4
| | | | | | | | I don't think anyone uses it.
* | Rename _PATH variables to _DIR when they refer to a directoryZbigniew Jędrzejewski-Szmek2020-03-271-7/+7
|/ | | | | We were very inconsistent in this, but in general _PATH signifies a search path (separated with :), and _DIR signifies a single directory.
* meson.build: drop unused SYSTEMD_SLEEP_BINARY_PATHFlorian Klink2020-03-091-1/+0
| | | | seems usage was dropped in ddcbc8737873ca1904562d7d3ca3de9946e2f889.
* timesync, meson: allow statically linked buildRobert Scheck2020-03-041-2/+12
| | | | | | | | | | Build option "link-timesyncd-shared" to build a statically linked systemd-timesyncd by using -Dlink-udev-shared=false -Dlink-timesyncd-shared=false on systems with full systemd stack except systemd-timesyncd, such as RHEL/CentOS 8.
* meson: explain GIT_VERSION and PROJECT_VERSIONZbigniew Jędrzejewski-Szmek2020-02-281-2/+4
| | | | Fixes #11415.
* meson: bump version numbers for v245v245-rc1Zbigniew Jędrzejewski-Szmek2020-02-051-3/+3
|
* meson: update efi path detection to gnu-efi-3.0.11Zbigniew Jędrzejewski-Szmek2020-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes systemd build in Fedora rawhide. The old ldsdir option is not useful, because both the directory and the file name changed. Let's remove the option and try to autodetect the file name. If this turns out to be not enough, a new option to simply specify the full path to the file can be added. F31: efi arch: x86_64 EFI machine type: x64 EFI CC ccache cc EFI lds: /usr/lib64/gnuefi/elf_x64_efi.lds EFI crt0: /usr/lib64/gnuefi/crt0-efi-x64.o EFI include directory: /usr/include/efi F32: efi arch: x86_64 EFI machine type: x64 EFI CC ccache cc EFI lds: /usr/lib/gnuefi/x64/efi.lds EFI crt0: /usr/lib/gnuefi/x64/crt0.o EFI include directory: /usr/include/efi
* util: uid_t, gid_t, and pid_t must be 32bitYu Watanabe2020-02-021-3/+0
| | | | | We already have assert_cc(sizeof(uid_t) == sizeof(uint32_t)) or friends at various places.
* meson: fix feature listYu Watanabe2020-02-021-1/+1
|
* meson, man: do not install pam_systemd_home(8) when pam or homed is disabledYu Watanabe2020-02-011-0/+3
| | | | Fixes #14725.
* home: add pam_systemd_home.so PAM hookupLennart Poettering2020-01-281-0/+20
| | | | In a way fixes: https://bugs.freedesktop.org/show_bug.cgi?id=67474
* home: add homectl client toolLennart Poettering2020-01-281-0/+13
|
* home: add new systemd-homed service that can manage LUKS homesLennart Poettering2020-01-281-0/+60
| | | | Fixes more or less: https://bugs.freedesktop.org/show_bug.cgi?id=67474
* repart: add new systemd-repart toolLennart Poettering2020-01-201-0/+40
| | | | Fixes: #14052
* units: drop full paths for utilities in $PATHZbigniew Jędrzejewski-Szmek2020-01-201-1/+0
| | | | | | | This makes things a bit simpler and the build a bit faster, because we don't have to rewrite files to do the trivial substitution. @rootbindir@ is always in our internal $PATH that we use for non-absolute paths, so there should be no functional change.
* nss: hook up nss-systemd with userdb varlink bitsLennart Poettering2020-01-151-2/+7
| | | | | | | | | | | This changes nss-systemd to use the new varlink user/group APIs for looking up everything. (This also changes the factory /etc/nsswitch.conf line to use for hooking up nss-system to use glibc's [SUCCESS=merge] feature so that we can properly merge group membership lists). Fixes: #12492
* userdbd: add userdbctl tool as client for userdbdLennart Poettering2020-01-151-0/+9
|
* userdbd: add new service that can merge userdb queries from multiple clientsLennart Poettering2020-01-151-0/+24
|
* Revert "docs: rename HACKING → Hacking"Zbigniew Jędrzejewski-Szmek2020-01-151-1/+1
| | | | This reverts commit 8c5cd27dd155fbe71a6bf82096b8775c5ff453b8.
* docs: rename HACKING → HackingZbigniew Jędrzejewski-Szmek2020-01-151-1/+1
| | | | Let's see if this works at all.