summaryrefslogtreecommitdiffstats
path: root/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* systemctl: split out some SysV compat stuff into its own C fileLennart Poettering2019-03-251-1/+4
| | | | | systemctl.c is way to large already. Let's split out some stuff out that is easy to split out.
* meson: add libseccomp as a nspawn dep (#12067)Franck Bui2019-03-221-1/+2
| | | | | | | | | Due to this specific change: d0b6a10#diff-0203416587516c224c8fcfe8129e7caeR8, systemd-nspawn uses libseccomp now if it is available. We we need to pass -I/usr/include /libseccomp (or wherever seccomp.h is located) when compiling systemd-nspawn because nspawn-settings.h does #include <seccomp.h>. Fixes: #12060
* Re-add uaccess tag for /dev/dri/renderD*Michael Biebl2019-03-141-1/+3
| | | | | | | | | | | Setting an access mode != 0666 is explicitly supported via -Dgroup-render-mode In such a case, re-add the uaccess tag. This is basically the same change that was done for /dev/kvm in commit fa53e24130af3a389573acb9585eadbf7192955f and ace5e3111c0b8d8bfd84b32f2c689b0a4d92c061 and partially reverts the changes from 4e15a7343cb389e97f3eb4f49699161862d8b8b2
* meson: scope more git invocations with current_source_dir()Davide Cavalca2019-03-121-15/+19
|
* build-sys: disable -Wstring-plus-intZbigniew Jędrzejewski-Szmek2019-03-071-1/+2
| | | | | clang-8 warns about constructs like "foobar"+3 (to get "bar"). We like to use patterns like this, so let's just disable the warning.
* Merge pull request #11898 from keszybz/meson-conv-libLennart Poettering2019-03-061-18/+10
|\ | | | | Use a convenience library for the sources shared between core/ and shutdown/
| * meson: use a convenience library for the sources shared between core/ and ↵Zbigniew Jędrzejewski-Szmek2019-03-051-18/+10
| | | | | | | | | | | | | | | | | | | | | | the outside This avoids double compilation. Those files are tiny, so it doesn't save time, but we avoid repeated warnings and errors, and it's generally cleaner to it this way. The number of commands in 'ninja -C build clean && ninja -C build' drops from 1462 to 1455 for me.
* | pkgconfig: avoid double slash with split-usr configurationZbigniew Jędrzejewski-Szmek2019-03-051-1/+3
|/ | | | | | | | | | | | | | | By defining rootprefix= we avoid a double slash in $systemdsystemunitdir and other variables. This fixes a regression introduced in 1c2c7c6cb3d92315624f3711114e86b0acfbce63 where the variables using rootprefix=/ would start with a double slash. This should be interpreted the same, but is certainly ugly. The rootprefix variable was added to systemd.pc in 1c2c7c6cb3d92315624f3711114e86b0acfbce63, so there is no question of backwards compatiblity. If people try to "override" the prefix and specify --define-variable=rootprefix=/, they will get a double slash, which should be OK, and is the same as --define-variable=rootprefix=/something/, which also results in a double slash somewhere in the strings.
* shutdown: rearrange shutdown sources in source treeLennart Poettering2019-03-051-0/+6
| | | | | | | | | | Let's move the shutdown binary into its own subdirectory in src/shutdown, after all it is relatively isolated from the normal PID 1 sources, being a different binary and all. Unfortunately it's not possible to move some of the code, since it is shared with PID 1, that I wished we could move, but I still think it's worth it.
* Merge pull request #11827 from keszybz/pkgconfig-variablesLennart Poettering2019-02-261-1/+2
|\ | | | | Allow overriding pkgconfig prefixes
| * pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir}Zbigniew Jędrzejewski-Szmek2018-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #4549. People want to be able to redefine the prefixes relative to which the other variables are defined. Something like pkgconf --define-variable=prefix=/home/user/installpath --variable=systemdsystemunitdir systemd I'm not convinced that this entirely useful, because the installed systemd will not look at those paths, but maybe it's OK as an alternative type of $DESTDIR. This has been requested a few times over the years, so let's just provide this. I thought this would be more complicated, since we allow all kinds of directories to be overrides in the compilation configuration. But it turns out that all the directories defined in systemd.pc are relative to three prefixes: $prefix, $rootprefix, and $sysconfdir. So this patch adds $rootprefix and $sysconfdir to the .pc file and then changes the subsequent definitions in the .pc file to use them. In the end we define each path twice using the same rules: once in meson.build and once in the .pc file. Without overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /usr/lib/systemd/catalog modulesloaddir = /usr/lib/modules-load.d binfmtdir = /usr/lib/binfmt.d sysctldir = /usr/lib/sysctl.d sysusersdir = /usr/lib/sysusers.d tmpfilesdir = /usr/lib/tmpfiles.d systemdshutdowndir = /usr/lib/systemd/system-shutdown systemdsleepdir = /usr/lib/systemd/system-sleep systemdusergeneratordir = /usr/lib/systemd/user-generators systemdsystemgeneratordir = /usr/lib/systemd/system-generators systemduserunitpath = /etc/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/usr/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /etc/systemd/user systemdsystemconfdir = /etc/systemd/system systemduserpresetdir = /usr/lib/systemd/user-preset systemduserunitdir = /usr/lib/systemd/user systemdsystempresetdir = /usr/lib/systemd/system-preset systemdsystemunitdir = /usr/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /etc rootprefix = /usr prefix = /usr pcfiledir = /usr/share/pkgconfig With overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core \ --define-variable=prefix=/PREFIX \ --define-variable=rootprefix=/ROOTPREFIX \ --define-variable=sysconfdir=/SYSCONF --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /PREFIX/lib/systemd/catalog modulesloaddir = /PREFIX/lib/modules-load.d binfmtdir = /PREFIX/lib/binfmt.d sysctldir = /PREFIX/lib/sysctl.d sysusersdir = /PREFIX/lib/sysusers.d tmpfilesdir = /PREFIX/lib/tmpfiles.d systemdshutdowndir = /ROOTPREFIX/lib/systemd/system-shutdown systemdsleepdir = /ROOTPREFIX/lib/systemd/system-sleep systemdusergeneratordir = /PREFIX/lib/systemd/user-generators systemdsystemgeneratordir = /ROOTPREFIX/lib/systemd/system-generators systemduserunitpath = /SYSCONF/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/PREFIX/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /SYSCONF/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/ROOTPREFIX/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /SYSCONF/systemd/user systemdsystemconfdir = /SYSCONF/systemd/system systemduserpresetdir = /PREFIX/lib/systemd/user-preset systemduserunitdir = /PREFIX/lib/systemd/user systemdsystempresetdir = /ROOTPREFIX/lib/systemd/system-preset systemdsystemunitdir = /ROOTPREFIX/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /SYSCONF rootprefix = /ROOTPREFIX prefix = /PREFIX pcfiledir = /usr/share/pkgconfig (pkgconf doesn't provide a way to print all variables together with their definitions, according to the man page. Disappointing.)
* | meson: declare version.h as dependency for systemdMichael Olbrich2019-02-251-1/+2
| | | | | | | | | | This is a followup to #11815 and adds the last missing dependency. With this #11565 is hopefully really fixed.
* | Merge pull request #11798 from keszybz/mem-sanitizer-fixLennart Poettering2019-02-251-0/+1
|\ \ | | | | | | meson: make sure preprocesor warnings are not treated as errors
| * | meson: make sure preprocesor warnings are not treated as errorsZbigniew Jędrzejewski-Szmek2019-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Clang includes -W#warning in -Werror, so the #warning used for msan would be an error. v2: - use -Wno-error=... so that the warning is still emitted, but not as an error.
* | | meson: declare version.h as dep for various targets that include build.hZbigniew Jędrzejewski-Szmek2019-02-251-6/+13
|/ / | | | | | | Should fix #11565.
* | Merge pull request #10408 from keszybz/analyze-cat-presetsLennart Poettering2019-02-181-1/+0
|\ \ | | | | | | systemd-analyze cat-presets
| * | meson: drop unused "udevhomedir"Zbigniew Jędrzejewski-Szmek2019-02-181-1/+0
| | |
* | | meson: drop unused HAVE_STRUCT_FIB_RULE_{UID,PORT}_RANGEYu Watanabe2019-02-181-4/+0
|/ /
* | build-sys: bump package/library versionsv241-rc1Zbigniew Jędrzejewski-Szmek2019-01-261-3/+3
| | | | | | | | We added sd_bus_close_unref().
* | meson: make version a dependency and use it in libbasicLouis Taylor2019-01-221-0/+7
| | | | | | | | | | | | | | This should hopefully ensure it gets generated before basic build happens. Fixes #11483.
* | missing_if_link.h: add IFLA_BOND_MODEFabrice Fontaine2019-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | systemd fails to build on kernel without IFLA_BOND_MODE (< 3.13) since https://github.com/systemd/systemd/commit/9714c020fc4cda1823c2a77e3fd08aefa7d78b25 So put back IFLA_BOND_MODE definition Fixes: - http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* | meson: stop setting -fPIE globallyMichael Biebl2019-01-101-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting -fPIE globally can lead to miscompilations on certain architectures. This is caused by both -fPIE and -fPIC options being added to various compilation commands. Only -fPIC is being recorded in the LTO options section of the object. The gcc-8 LTO plugin merges -fPIC + -fPIE to nothing. So, the compilations done by the plugin are not position-independent and fail to link with -pie. The simplest solution is to stop setting -fPIE globally and instead using meson's b_pie=true option. This requires meson 0.49 or later. Since we don't set this option in meson.build but leave it up to the distro maintainer to set this option, do not bump the meson version requirement. Fixes: #10548
* | Merge pull request #11337 from keszybz/build-version-hLennart Poettering2019-01-061-3/+2
|\ \ | | | | | | meson: declare version.h as dep for libbasic
| * | Revert "meson: declare version.h as dep for fuzzers"Zbigniew Jędrzejewski-Szmek2019-01-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0c2e93b863f8ec164e7e9e119ab127a752cb1331. This should not be necessary anymore after previous commit. I don't quite remember what sequence of steps was failing, but right now "meson build -Dslow-tests=true && ninja -C build fuzzers" work fine.
* | | Disable tools/choose-default-locale.sh when cross compilingJames Hilliard2019-01-061-2/+6
|/ /
* | Merge pull request #11317 from filbranden/docs1Zbigniew Jędrzejewski-Szmek2019-01-031-4/+0
|\ \ | | | | | | Improvements to systemd.io generation
| * | docs: generate index.md in JekyllFilipe Brandenburger2019-01-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses a {% for %} loop in Jekyll to render the page, from the "title" information in the Front Matter of the actual page files. This also makes `make-index-md` build rule unnecessary, since generation is done by the template engine itself. Tested this by running Jekyll locally.
* | | sleep: install default sleep.confYu Watanabe2019-01-031-0/+3
| | | | | | | | | | | | Closes #11310.
* | | Merge pull request #11230 from keszybz/version-string-altYu Watanabe2019-01-031-6/+11
|\ \ \ | |/ / |/| | Generate version string from git describe (alternative approach)
| * | meson: declare version.h as dep for fuzzersZbigniew Jędrzejewski-Szmek2018-12-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is supposed an error when building fuzzers for sanitization (that is a nested build with the sanitization options): In file included from ../../../../src/basic/util.c:21:0: ../../../../src/basic/build.h:4:21: fatal error: version.h: No such file or directory #include "version.h" ^ compilation terminated. Internally we do 'ninja -C test/fuzz/sanitize-address-fuzzers fuzzers'. I'm not quite sure why version.h is not built in this case. But declaring version_h as the dependency forces it to be built and solves the issue. It would be better to define the dependency on individual exe's, but this doesn't work: meson.build:2884:8: ERROR: Argument is of an unacceptable type 'CustomTarget'. Must be either an external dependency (returned by find_library() or dependency()) or an internal dependency (returned by declare_dependency()). Let's treat this a hack for another hack, which the nested build is.
| * | meson: allow setting the version string during configurationZbigniew Jędrzejewski-Szmek2018-12-211-0/+1
| | | | | | | | | | | | | | | | | | This will be useful when building distro packages, because we can set the version string to the rpm/dpkg/whatever version string, and getter reports from end users.
| * | meson-vcs-tag: add work-around for git bugZbigniew Jędrzejewski-Szmek2018-12-211-1/+1
| | |
| * | meson: generate version tag from gitZbigniew Jędrzejewski-Szmek2018-12-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ build/systemctl --version systemd 239-3555-g6178cbb5b5 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid $ git tag v240 -m 'v240' $ ninja -C build ninja: Entering directory `build' [76/76] Linking target fuzz-unit-file. $ build/systemctl --version systemd 240 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid This is very useful during development, because a precise version string is embedded in the build product and displayed during boot, so we don't have to guess answers for questions like "did I just boot the latest version or the one from before?". This change creates an overhead for "noop" builds. On my laptop, 'ninja -C build' that does nothing goes from 0.1 to 0.5 s. It would be nice to avoid this, but I think that <1 s is still acceptable. Fixes #7183. PACKAGE_VERSION is renamed to GIT_VERSION, to make it obvious that this is the more dynamically changing version string. Why save to a file? It would be easy to generate the version tag using run_command(), but we want to go through a file so that stuff gets rebuilt when this file changes. If we just defined an variable in meson, ninja wouldn't know it needs to rebuild things.
| * | meson: define PROJECT_VERSION as the "bare" project versionZbigniew Jędrzejewski-Szmek2018-12-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's not use atoi() if we can simply provide the project version as a number. In C code, this is the numerical project version. In substitutions in other files, this is just the bare substitution. The "PACKAGE_" prefix is from autotools, and is strange. We call systemd a "project", and "package" is something that distros build. Let's rename. PACKAGE_URL is renamed to PROJECT_URL for the same reasons and for consistency. (This leave PACKAGE_VERSION as the stringified define for C code.)
| * | Remove use of PACKAGE_STRINGZbigniew Jędrzejewski-Szmek2018-12-191-1/+0
| | | | | | | | | | | | | | | | | | | | | PACKAGE_VERSION is more explicit, and also, we don't pretend that changing the project name in meson.build has any real effect. "systemd" is embedded in a thousand different places, so let's just use the hardcoded string consistently. This is mostly in preparation for future changes.
* | | meson: check whether C.UTF-8 exists or not and use it if existsYu Watanabe2019-01-011-0/+4
| | | | | | | | | | | | If C.UTF-8 does not exist, then fallback to en_US.UTF-8 or C.
* | | Make default locale a compile time optionDave Reisner2018-12-291-1/+5
| | | | | | | | | | | | | | | | | | | | | Default to a locale that's guaranteed to exist everywhere, but let distros override this with something more exotic if they choose to. Closes #11259.
* | | meson: use cross compilation compatible c++ checkJames Hilliard2018-12-281-3/+1
| | |
* | | build-sys: bump package/library versionsLennart Poettering2018-12-211-3/+3
|/ /
* | Merge pull request #11197 from keszybz/various-fixupsLennart Poettering2018-12-181-1/+1
|\ \ | | | | | | Various fixups
| * | meson: print EFI CC configuration nicelyZbigniew Jędrzejewski-Szmek2018-12-181-1/+1
| | | | | | | | | | | | | | | In 595343fb4c99c2679d347ef7c19debfbfed6342e it was converted to an array. This doesn't look good in the output. Let's convert it back to a string.
* | | sd-resolve: add sd_resolve_get{addr,info}_with_destroy_callback() and ↵Yu Watanabe2018-12-171-0/+1
|/ / | | | | | | typesafe macros
* | meson: make net.naming-scheme= default configurableZbigniew Jędrzejewski-Szmek2018-12-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for distributions, where the stability of interface names should be preseved after an upgrade of systemd. So when some specific release of the distro is made available, systemd defaults to the latest & greatest naming scheme, and subsequent updates set the same default. This default may still be overriden through the kernel and env var options. A special value "latest" is also allowed. Without a specific name, it is harder to verride from meson. In case of 'combo' options, meson reads the default during the initial configuration, and "remembers" this choice. When systemd is updated, old build/ directories could keep the old default, which would be annoying. Hence, "latest" is introduced to make it explicit, yet follow the upstream. This is actually useful for the user too, because it may be used as an override, without having to actually specify a version.
* | missing: move btrfs related entries to missing_btrfs.h and missing_btrfs_tree.hYu Watanabe2018-12-041-1/+1
| |
* | missing: re-add mistakenly dropped entriesYu Watanabe2018-12-041-0/+2
| | | | | | | | | | | | These entries are mistakenly dropped by 9714c020fc4cda1823c2a77e3fd08aefa7d78b25. Fixes #11036.
* | missing: split network related entriesYu Watanabe2018-12-031-22/+70
| | | | | | | | | | | | Also adds comments which kernel version added the entries. Closes #10553.
* | meson.build: fix detection of -Werror=shadowFabrice Fontaine2018-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Pass -Werror=shadow in args of cc.compiles otherwise test will always succeed This fix a build failure with gcc 4.7.3 Fixes: - http://autobuild.buildroot.org/results/ffd71c473d3b29618c18cd2e04705370266696f2 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* | Merge pull request #10357 from poettering/import-fsZbigniew Jędrzejewski-Szmek2018-11-291-1/+11
|\ \ | | | | | | machinectl import-fs command and other fixes
| * | machine: add support for importing containers from plain directoriesLennart Poettering2018-11-261-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #2728 This is also supposed to be preparation for doing #10234 eventually, where a very similar operation is requested: instead of importing a tree to /var/lib/machines it would need to be imported into /var/lib/portables/.
* | | Merge pull request #10797 from poettering/run-generatorZbigniew Jędrzejewski-Szmek2018-11-281-0/+8
|\ \ \ | | | | | | | | add new "systemd-run-generator" for running arbitrary commands from the kernel command line as system services using the "systemd.run=" kernel command line switch