summaryrefslogtreecommitdiffstats
path: root/units/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add license headers and SPDX identifiers to meson.build filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+17
| | | | | | | So far I avoided adding license headers to meson files, but they are pretty big and important and should carry license headers like everything else. I added my own copyright, even though other people modified those files too. But this is mostly symbolic, so I hope that's OK.
* meson: do not create systemd-user-sessions.service if PAM is disabledYu Watanabe2017-10-311-1/+1
| | | | Fixes #7227.
* units: replace remote-cryptsetup-pre.target with remote-fs-pre.targetZbigniew Jędrzejewski-Szmek2017-10-171-1/+0
| | | | | | | | | | | | | | | | | remote-cryptsetup-pre.target was designed as an active unit (that pulls in network-online.target), the opposite of remote-fs-pre.target (a passive unit, with individual provider services ordering itself before it and pulling it in, for example iscsi.service and nfs-client.target). To make remote-cryptsetup-pre.target really work, those services should be ordered before it too. But this would require updates to all those services, not just changes from systemd side. But the requirements for remote-fs-pre.target and remote-cryptset-pre.target are fairly similar (e.g. iscsi devices can certainly be used for both), so let's reuse remote-fs-pre.target also for remote cryptsetup units. This loses a bit of flexibility, but does away with the requirement for various provider services to know about remote-cryptsetup-pre.target.
* build-sys: s/ENABLE_RESOLVED/ENABLE_RESOLVE/Zbigniew Jędrzejewski-Szmek2017-10-041-1/+1
| | | | | | The configuration option was called -Dresolve, but the internal define was …RESOLVED. This options governs more than just resolved itself, so let's settle on the version without "d".
* build-sys: s/HAVE_UTMP/ENABLE_UTMP/Zbigniew Jędrzejewski-Szmek2017-10-041-2/+2
| | | | | "Have" should be about the external environment and dependencies. Anything which is a pure yes/no choice should be "enable".
* build-sys: use #if Y instead of #ifdef Y everywhereZbigniew Jędrzejewski-Szmek2017-10-041-7/+7
| | | | | | | | | | | | | | | The advantage is that is the name is mispellt, cpp will warn us. $ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/" $ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;' $ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g' $ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g' + manual changes to meson.build squash! build-sys: use #if Y instead of #ifdef Y everywhere v2: - fix incorrect setting of HAVE_LIBIDN2
* units: add remote-cryptsetup.target and remote-cryptsetup-pre.targetZbigniew Jędrzejewski-Szmek2017-09-051-0/+3
| | | | | | The pair is similar to remote-fs.target and remote-fs-pre.target. Any cryptsetup devices which require network shall be ordered after remote-cryptsetup-pre.target and before remote-cryptsetup.target.
* units: introduce getty-pre.target (#6667)Michal Sekletar2017-08-311-0/+1
| | | | | | | | This new target is a passive unit, hence it is supposed to be pulled in to the transaction by the service that wants to block login on the console (e.g. text version of initial-setup). Now both getty and serial-getty are ordered after this target. https://lists.freedesktop.org/archives/systemd-devel/2015-July/033754.html
* networkd: do not install the socket when networkd is not enabledFelipe Sateler2017-08-271-1/+1
|
* units: do not perform m4 if not necessary (#6575)Yu Watanabe2017-08-091-9/+9
|
* nspawn: hook var-lib-machines.mount to machines.target and remote-fs.targetFelipe Sateler2017-06-211-2/+2
| | | | | | | | | | /var can be on a remote filesystem, thus hooking it to local-fs.target is not correct. Also, only install the mount unit when machined is enabled, because machined is the one managing the underlying device, and thus makes no sense without machined. Fixes #1175
* meson: use booleans for conf.set and drop unecessary conditionalsZbigniew Jędrzejewski-Szmek2017-05-021-7/+7
| | | | | | | | | Using conf.set() with a boolean argument does the right thing: either #ifdef or #undef. This means that conf.set can be used unconditionally. Previously I used '1' as the placeholder value, and that needs to be changed to 'true' for consistency (under meson 1 cannot be used in boolean context). All checks need to be adjusted.
* meson: do not install files from disabled features (#5811)userwithuid2017-04-271-2/+2
| | | | Mirror conditions from Makefile.am.
* meson: install the dbus aliases for resolve1 and network1 in /etcZbigniew Jędrzejewski-Szmek2017-04-241-2/+2
| | | | | | | This way when the units are disabled, their dbus activation is also disabled. v2: - fix the symlink location
* meson: reindent all files with 8 spacesZbigniew Jędrzejewski-Szmek2017-04-241-282/+282
| | | | | | | The indentation for emacs'es meson-mode is added .dir-locals. All files are reindented automatically, using the lasest meson-mode from git. Indentation should now be fairly consistent.
* meson: fix condition for installation of .in units, 99-default.linkZbigniew Jędrzejewski-Szmek2017-04-241-1/+1
| | | | | | The condition to install in_units was calculated, but not used. 99-default.link should be installed uncoditionally.
* meson: use join_paths consistentlyMichael Biebl2017-04-241-13/+13
| | | | | 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.
* meson: rework processing of unit filesZbigniew Jędrzejewski-Szmek2017-04-241-58/+59
| | | | | | | | | | 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.
* meson: support (the removal of) lines with ##Zbigniew Jędrzejewski-Szmek2017-04-241-12/+16
|
* meson: create various symlinksZbigniew Jędrzejewski-Szmek2017-04-241-0/+6
| | | | | v2: - remove bashisms
* meson: create dirs and touch /usrZbigniew Jędrzejewski-Szmek2017-04-241-0/+8
| | | | | | | | | 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
* meson: add unit installation symlinksZbigniew Jędrzejewski-Szmek2017-04-241-73/+162
| | | | | | | | | | | | | | | 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
* meson: build systemd using mesonZbigniew Jędrzejewski-Szmek2017-04-241-0/+221
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