summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-23meson: eliminate libsystemd_journal_internal and use libsystemd_internal lessZbigniew Jędrzejewski-Szmek
This simplifies things and leads to a smaller installation footprint. libsystemd_internal and libsystemd_journal_internal are linked into libystemd-shared and available to all programs linked to libsystemd-shared. libsystemd_journal_internal is not needed anymore, and libsystemd-shared is used everwhere. The few exceptions are: libsystemd.so, test-engine, test-bus-error, and various loadable modules.
2017-04-23meson: add rootprefix option (for Gentoo)Zbigniew Jędrzejewski-Szmek
2017-04-23meson: install test dataZbigniew Jędrzejewski-Szmek
v2: - do not install test-data if instal-tests=no
2017-04-23meson: replace yes/no/auto with true/false/autoZbigniew Jędrzejewski-Szmek
This doesn't feel as natural, but is more consistent with the boolean options which require true/false, and allows setting of options without knowing of which type the option is.
2017-04-23meson: fix condition for installation of .in units, 99-default.linkZbigniew Jędrzejewski-Szmek
The condition to install in_units was calculated, but not used. 99-default.link should be installed uncoditionally.
2017-04-23meson: skip index generation when lxml is not availableZbigniew Jędrzejewski-Szmek
2017-04-23meson: ima supportZbigniew Jędrzejewski-Szmek
2017-04-23meson: libxkbcommon supportZbigniew Jędrzejewski-Szmek
2017-04-23meson: recreate dist-check-helpZbigniew Jędrzejewski-Szmek
2017-04-23meson: use join_paths consistentlyMichael Biebl
With -Dsplit-usr=true, we set rootprefix to /. This leads to //lib/systemd or //lib/udev for various dir variables. Using join_paths() avoids this.
2017-04-23meson: rework processing of unit filesZbigniew Jędrzejewski-Szmek
Ideally, we would chain the m4 processing, .in substitutions, and file installation so that the commands don't have to be repeated. Unfortunately this does not seem currently possible, because custom_target() output cannot be fed into install_data(), so it's necessary to use the 'install', 'install_dir' arguments to control installation. Nevertheless, rework the rules to repeat less stuff and unify handling of conditions between the different file types.
2017-04-23meson: support (the removal of) lines with ##Zbigniew Jędrzejewski-Szmek
2017-04-23meson: fix a bunch of substitutionsZbigniew Jędrzejewski-Szmek
This makes the diff -r output on autotools and meson installations empty, except for binary files and ## comments.
2017-04-23meson: properly conditionalize polkit installationZbigniew Jędrzejewski-Szmek
... including pkla installation on Debian. v2: - fix polkit-gobject-1 pkgconfig name
2017-04-23meson: add support for building efi modulesZbigniew Jędrzejewski-Szmek
This is a very straightforward conversion of the rules in Makefile.am. Generated objects (on arm64) are identical. The only difference in executed commands is that automake uses ld -m elf_x86_64, without us specifying the -m option anywhere. I suspect that using the default for the given linker should be OK, so it's fine to just skip it.
2017-04-23meson: specify a timeout of 90 s for tests which take a bit longerZbigniew Jędrzejewski-Szmek
Both test-hashmap and test-benchmark need 10-11 s here, but might time out under load with the default meson timeout of 30 s.
2017-04-23meson: disable bootctl without libblkidZbigniew Jędrzejewski-Szmek
bootctl uses blkid probe functions to find the ESP, hence it's useless without it. Don't even try to build it if libblkid is unavailable.
2017-04-23meson: fix compilation with -Dnetworkd=false, -Dkmod=no, -Dlibgcrypt=noZbigniew Jędrzejewski-Szmek
The tests are included under the conditional too, instead of specifying 'ENABLE_NETWORKD' in the test definition array, because libnetworkd_core dependency is undefined if networkd is disabled.
2017-04-23meson: replace $ORIGIN with rootlibdir everywhereZbigniew Jędrzejewski-Szmek
$ORIGIN does not work when /proc is not mounted. So the systemd binary cannot use $ORIGIN. Use the full path everywhere for consistency.
2017-04-23meson: make cpp invocations cross-compilation friendlyZbigniew Jędrzejewski-Szmek
This implementation assumes that the arguments in compiler.cmd_array() don't contain any spaces. Since we are only interested in compilation on Linux, I think this is a safe assumption. Solution suggested by Nirbheek Chauhan.
2017-04-23meson: add a few forgotten substitutionsZbigniew Jędrzejewski-Szmek
v2: - a few more
2017-04-23meson: specify rpath on all executables linking to libsharedZbigniew Jędrzejewski-Szmek
(i.e. pretty much all of them). libtools does this automatically for us. It would be great if meson did too. Otherwise, it would be nice to simply attach the information about necessary rpath to the library object, and have it used automatically for all users. Dunno, maybe there's already a way to do this. I used '$ORIGIN' for stuff installed into libexecdir, since that's where libshared ends up, and a full path for everything else. The advantage of using $ORIGIN is that those binaries can be started from $DESTDIR, which can sometimes be useful.
2017-04-23meson: link test-lib{systemd,udev}-sym in the usual wayZbigniew Jędrzejewski-Szmek
I tried to link to the right library by hand, because without mesonbuid/meson#1545, libbasic.a is added to the link arguments. We want to link the test with nothing but the library being tested. Doing the linking by hand did achieve that, but it caused a bigger issue: meson didn't know about the dependency on the library. And the dependency cannot be added using link_depends, because "link_depends arguments must be strings...", and this does not work with a compilation target. So just link in the usual way and accept the overlinking (for now).
2017-04-23meson: fix compilation of libsystemdZbigniew Jędrzejewski-Szmek
It uses libsystemd_journal_internal_sources, so we need to make sure that audit_type-to-name.h is generated early enough.
2017-04-23meson: update linking for fixed meson linkingZbigniew Jędrzejewski-Szmek
With mesonbuid/meson#1545, meson does not propagate deps of a library when linking with that library. That's of course the right thing to do, but it exposes a bunch of missing deps. This compiles with both meson-0.39.1 and meson-git + pr/1545.
2017-04-23meson: add test-libudev-symZbigniew Jędrzejewski-Szmek
This is slightly complicated by the fact that files('libudev.h') cannot be used as an argument in custom_target command (string is required). This restriction should be lifted in future versions of mesons, so this could be simplified.
2017-04-23meson: add test-libsystemd-sym, fix linking of libsystemdZbigniew Jędrzejewski-Szmek
This is quite messy. I think libtool might have been using something like -Wl,--whole-archive, but I don't think meson has support for that. For now, just recompile all the sources for linking into libsystemd directly. This should not matter much for efficiency, since it's a few small files.
2017-04-23meson: install systemd-sulogin-shell tooZbigniew Jędrzejewski-Szmek
2017-04-23meson: remove libnss_*.so symlinks after installZbigniew Jędrzejewski-Szmek
2017-04-23meson: create /var/log/journal/remoteZbigniew Jędrzejewski-Szmek
C.f. https://github.com/mesonbuild/meson/issues/1604.
2017-04-23meson: create various symlinksZbigniew Jędrzejewski-Szmek
v2: - remove bashisms
2017-04-23meson: create dirs and touch /usrZbigniew Jędrzejewski-Szmek
This is the equivalent of $(INSTALL_DIRS) and install-touch-usr-hook. I did not bother to create the directories into which we install files, since they will be created anyway. v2: - remove bashism
2017-04-23meson: add unit installation symlinksZbigniew Jędrzejewski-Szmek
This is the equivalent of $(SYSTEM_UNIT_ALIASES) and $(GENERAL_ALIASES) in Makefile.am. ninja-build uninstall does not remove the symlinks, see https://github.com/mesonbuild/meson/issues/1602. I don't consider this a blocker: after all either one installs into $DESTDIR, where uninstallation doesn't make much sense, or into a real system, where a successfull uninstallation would likely destroy the system. v2: - remove bashisms - add various forgotten symlinks and fix service/timer/target confusions
2017-04-23meson: create a static version of libshared and link libcore and some tests ↵Zbigniew Jędrzejewski-Szmek
to it This is what autoconf-based build does, and it makes test-bus-error and test-engine able to access the bus error mapping table. OTOH, this is a heavy price to pay: it would be excellent to link libcore.a to libsystemd-shared-NNN.so. Otherwise we duplicate the same code in 'systemd' and 'libsystemd-shared-NNN.so'. -rwxrwxr-x. 1 4075544 Apr 6 20:30 systemd* <-- libcore linked against libsystemd-shared.so -rwxrwxr-x. 1 5596504 Apr 9 14:07 systemd* <-- libcore linked against libsystemd-shared.a v2: - update for 6b5cf3ea621a5bfd218cd2249e066a52c0e73657
2017-04-23meson: include the library symbol version list in link_dependsZbigniew Jędrzejewski-Szmek
This is pretty ugly, because I don't know how to use a single definition for two purposes: - --version-script needs a path relative to the build root - link_depends needs a path relative to source root Also, link_depends does not accept files() output [https://github.com/mesonbuild/meson/issues/1172], and I don't see a way to go from files() output to a string path that can be used to craft the -Wl arg. Ideally, a single files() result could be used in both places. I'm leaving this as a separate commit for now.
2017-04-23meson: add option to install testsZbigniew Jędrzejewski-Szmek
Instead of a separate target as with make, it is decided at configure time whether to install tests as part of the install target. The effect should be the same.
2017-04-23meson: define testsZbigniew Jędrzejewski-Szmek
Tests can be run with 'ninja-build test' or using 'mesontest'. '-Dtests=unsafe' can be used to include the "unsafe" tests in the test suite, same as with autotools. v2: - use more conf.get guards are optional components - declare deps on generated headers for test-{af,arphrd,cap}-list v3: - define environment for tests Most test don't need this, but to be consistent with autotools-based build, and to avoid questions which tests need it and which don't, set the same environment for all tests. v4: - rework test generation Use a list of lists to define each test. This way we can reduce the boilerplate somewhat, although the test listings are still pretty verbose. We can also move the definitions of the tests to the subdirs. Unfortunately some subdirs are included earlier than some of the libraries that test binaries are linked to. So just dump all definitions of all tests that cannot be defined earlier into src/test. The `executable` definitions are still at the top level, so the binaries are compiled into the build root. v5: - tag test-dnssec-complex as manual v6: - fix HAVE_LIBZ typo - add missing libgobject/libgio defs - mark test-qcow2 as manual
2017-04-23meson: add TAGS targetZbigniew Jędrzejewski-Szmek
Quite necessary for all the emacs users out there ;) v2: - fix error with etags or git are not found v3: - move the definition of git and etags up so it's available for man/
2017-04-23meson: add custom targets man/man and man/htmlZbigniew Jędrzejewski-Szmek
This provides functionality similar to the ./configure --disable-manpages switch. Man pages are built by default (if xsltproc is found), html pages are not. Those default can be changed with -Dman=no, -Dhtml=yes/auto. It is still possible to build one or the either, even if not configured, with ninja-build man/man and ninja-build man/html. v2: - obey conditionals in index/directives list
2017-04-23meson: add rule to generate custom-entities.entZbigniew Jędrzejewski-Szmek
This is a bit bare-bones, but should work for now. Maybe in the future we'll have a way to make meson generate it for us, without specifying all the names by hand.
2017-04-23meson: avoid detecting m4 dir as a programZbigniew Jędrzejewski-Szmek
This is a bug in meson, already fixed upstream. For now, just specify the full path.
2017-04-23make-man-rules: add support for generating the list in meson.build formatZbigniew Jędrzejewski-Szmek
v2: - sort the alias array too, otherwise the output is not stable
2017-04-23meson: build systemd using mesonZbigniew Jędrzejewski-Szmek
It's crucial that we can build systemd using VS2010! ... er, wait, no, that's not the official reason. We need to shed old systems by requring python 3! Oh, no, it's something else. Maybe we need to throw out 345 years of knowlege accumulated in autotools? Whatever, this new thing is cool and shiny, let's use it. This is not complete, I'm throwing it out here for your amusement and critique. - rules for sd-boot are missing. Those might be quite complicated. - rules for tests are missing too. Those are probably quite simple and repetitive, but there's lots of them. - it's likely that I didn't get all the conditions right, I only tested "full" compilation where most deps are provided and nothing is disabled. - busname.target and all .busname units are skipped on purpose. Otherwise, installation into $DESTDIR has the same list of files and the autoconf install, except for .la files. It'd be great if people had a careful look at all the library linking options. I added stuff until things compiled, and in the end there's much less linking then in the old system. But it seems that there's still a lot of unnecessary deps. meson has a `shared_module` statement, which sounds like something appropriate for our nss and pam modules. Unfortunately, I couldn't get it to work. For the nss modules, we need an .so version of '2', but `shared_module` disallows the version argument. For the pam module, it also didn't work, I forgot the reason. The handling of .m4 and .in and .m4.in files is rather awkward. It's likely that this could be simplified. If make support is ever dropped, I think it'd make sense to switch to a different templating system so that two different languages and not required, which would make everything simpler yet. v2: - use get_pkgconfig_variable - use sh not bash - use add_project_arguments v3: - drop required:true and fix progs/prog typo v4: - use find_library('bz2') - add TTY_GID definition - define __SANE_USERSPACE_TYPES__ - use join_paths(prefix, ...) is used on all paths to make them all absolute v5: - replace all declare_dependency's with [] - add more conf.get guards around optional components v6: - drop -pipe, -Wall which are the default in meson - use compiler.has_function() and compiler.has_header_symbol instead of the hand-rolled checks. - fix duplication in 'liblibsystemd' library name - use the right .sym file for pam_systemd - rename 'compiler' to 'cc': shorter, and more idiomatic. v7: - use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D - rename prefix to prefixdir, rootprefix to rootprefixdir ("prefix" is too common of a name and too easy to overwrite by mistake) - wrap more stuff with conf.get('ENABLE...') == 1 - use rootprefix=='/' and rootbindir as install_dir, to fix paths under split-usr==true. v8: - use .split() also for src/coredump. Now everything is consistent ;) - add rootlibdir option and use it on the libraries that require it v9: - indentation v10: - fix check for qrencode and libaudit v11: - unify handling of executable paths, provide options for all progs This makes the meson build behave slightly differently than the autoconf-based one, because we always first try to find the executable in the filesystem, and fall back to the default. I think different handling of loadkeys, setfont, and telinit was just a historical accident. In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs. In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin), but in Debian, those directories are not included in the path. C.f. https://github.com/mesonbuild/meson/issues/1576. - call all the options 'xxx-path' for clarity. - sort man/rules/meson.build properly so it's stable
2017-04-23journal/fsprg: set -Wno-pointer-arithm only for that fileZbigniew Jędrzejewski-Szmek
Both gcc and clang issue a host of warnings about void pointers used in arithmetic. The warning must be ignored in that file to avoid multiple warnings. Makefile.am used to set this for all libsystemd-journal-internal.a sources, because there's no finer granularity for warnings. Let's just set it for this one file.
2017-04-23gitignore: ignore all build* subdirs in main directoryZbigniew Jędrzejewski-Szmek
Now that meson builds require a separate build dir, everybody's bound to have at least one. So let's accept the convention that build*/ is for builds, and apply a blanket ignore rule, we shouldn't have any important files named build* in the main directory.
2017-04-23Merge pull request #5774 from keszybz/printf-annotationsDjalal Harouni
Printf annotation improvements
2017-04-21Merge pull request #5756 from keszybz/make-cleanupsMartin Pitt
Various meson-independent cleanups from the meson patchset
2017-04-21kernel-install: remove unneeded modules.* files created by depmod (#5766)Yu Watanabe
Fixes #5765.
2017-04-21coredump: fix non-literal string used in printfZbigniew Jędrzejewski-Szmek
This was exposed by the previous commit. This could be potentially unpleasant, but we are saved by the fact that this code path was only taken for journald crashes, where we control COMM and know that it doesn't contain any special characters. Use log_dispatch which does not do any format processing to push the message out.
2017-04-21basic/log: expose log_dispatchZbigniew Jędrzejewski-Szmek
This is useful when we want to avoid printf formatting on the message. It's nicer than using log_struct with "%s" as the format, because printf is slow and with a large message (like from a backtrace) this would require extra unnecessary memory. I'm not exposing all the fields in the wrapper: only level and errno. Those are the most likely to be useful.