summaryrefslogtreecommitdiffstats
path: root/src/kernel-install/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kernel-install: add uki.conf examplecvlc122024-09-201-0/+3
|
* meson: use install_emptydir() and drop meson-make-symlink.shYu Watanabe2023-08-081-2/+1
| | | | | | The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'. Let's replace it with install_emptydir() builtin function and inline meson call.
* meson: move declarations of kernel-install and sulogin-shellYu Watanabe2023-08-011-6/+14
|
* meson: shorten code a bitYu Watanabe2023-06-221-0/+2
|
* kernel-install: rewrite in CYu Watanabe2023-06-051-2/+0
| | | | | | | | | | | | | | | This is mostly a one-to-one translation of kernel-install.sh, except for the followings: - BOOT_ROOT is searched with find_{esp,xbootldr}_and_warn(). - entry token is searched with boot_entry_token_ensure(). - inspect command verboses more information, e.g. found plugins, environment variables explicitly passed to plugins, arguments passed to plugins. - paths specified in $KERNEL_INSTALL_PLUGINS must be absolute. - LC_COLLATE is set to C.UTF-8 (or any specified on build time). By writing kernel-install C, we can share the code used by bootctl or so, and can introduce --root and/or --image options later.
* test-kernel-install: test 60-ukify.install and 90-uki-copy.installZbigniew Jędrzejewski-Szmek2023-05-051-4/+6
| | | | | | We install a kernel with layout=uki and uki_generator=ukify, and test that a UKI gets installed in the expected place. The two plugins cooperate, so it's easiest to test them together.
* 60-ukify: kernel-install plugin that calls ukify to create a UKIZbigniew Jędrzejewski-Szmek2023-05-051-2/+10
| | | | | | | | | | | | | 60-ukify.install calls ukify with a config file, so singing and policies and splash will be done through the ukify config file, without 60-ukify.install knowing anything directly. In meson.py, the variable for loaderentry.install.in is used just once, let's drop it. (I guess this approach was copied from kernel_install_in, which is used in another file.) The general idea is based on cvlc12's #27119, but now in Python instead of bash.
* meson: Properly install 90-uki-copy.installJan Janssen2023-01-271-2/+5
|
* kernel-install: Add uki layoutJoerg Behrmann2022-11-291-0/+2
| | | | | | | | | | | | | | Currently the kernel-install man page only documents the bls layout for use with the boot loader spec type #1. 90-loaderentry.install uses this layout to generate loader entries and copy the kernel image and initrd to $BOOT. This commit documents a second layout "uki" and adds 90-uki-copy.install, which copies a UKI "uki.efi" from the staging area or any file with the .efi extension given on the command line to $BOOT/EFI/Linux/$ENTRY_TOKEN-$KERNEl_VERSION(+$TRIES).efi This allows for both locally generated and distro-provided UKIs to be handled by kernel-install.
* kernel-install: make 90-loadentry.install templatedZbigniew Jędrzejewski-Szmek2022-11-221-2/+10
| | | | | It's a bit annoying that this causes so much churn, but I don't see a different way to do this.
* test-kernel-install: add a simple test that kernel-install copies the filesZbigniew Jędrzejewski-Szmek2022-07-121-1/+3
| | | | | | | | | | I opted to tweaking kernel-install to allow overriding config (with $KERNEL_INSTALL_CONF_ROOT, $KERNEL_INSTALL_PLUGINS). An alternative would be to build a test environment in test/. We can still do that, but I think it's nice to have a simple test that is very quick and easy to debug. Invocation as installkernel is for #23681.
* meson: make kernel-install a template file, add --version, add to testsZbigniew Jędrzejewski-Szmek2022-04-051-4/+2
| | | | | | | In --help output, change "$0" → "kernel-install". We generally don't include the full path in --help output, and let's not do this here either. kernel-install is now in build/ directly, not in the subdirectory.
* meson: build kernel-install man page when necessaryFranck Bui2022-03-311-2/+0
|
* kernel-install: replace 00-entry-directory with K_I_LAYOUT in k-iнаб2021-12-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 341890de866f2ee34919a47ce3fc6c8cd3c1924c made "bootctl install" create ESP\MID, in preparation of cf73f650890b56a59bfb713c4c82b4e29daa7316 that followed it and created 00-entry-directory.install to make ESP\MID\KVER if ESP\MID existed ‒ this meant that "bootctl install" followed by "kernel-install $(uname -r) /boot/vml*$(uname -r) /boot/ini*$(uname -r)" actually installed the kernel correctly. Later, 31e57550b552e113bd3d44355b237c41e42beb58 reverted the first commit, meaning, that now running those two commands first installs sd-boot, but then does nothing. Everything appears to work right, nothing errors out, but no changes are actually done. To the untrained eye (all of them), even running with -v appears to work: all the hooks are run, as is depmod, but, again, nothing happens. This is horrible. Nothing in either manpage suggests what to do (nor should it, really), but the user is left with a bootloader that appears fully funxional, since nothing suggests a failure in the output, but with an unbootable machine, /no way to boot it/, even if they drop to an EFI shell, since the boot bundle isn't present on the ESP, and no real recourse even if they boot into a recovery system, apart from installing like GRUB or whatever. 00- is purely instrumentation for 90-, and separating one from the other has led to downstream dissatisfaxion (indeed, the last mentioned commit cited cited exactly that as the reversion reason), while creating $ENTRY_DIR_ABS is only required for bootloaders using the BLS, and shouldn't itself toggle anything. To that end, introduce an /{e,l}/k/install.conf file that allows overriding the detected layout, and detect it as "bls" if $BOOT_ROOT/$MACHINE_ID ($ENTRY_DIR_ABS/..) exists, otherwise "other" ‒ if a user wishes to select a different bootloader, like GRUB, they (or, indeed, the postinst script) can specify layout=grub. This disables 90- and $ENTRY_DIR_ABS manipulation.
* meson: use a/b instead of join_paths(a,b)Zbigniew Jędrzejewski-Szmek2021-07-271-1/+1
| | | | It is nicer and shorter.
* Revert "meson: remove one more instance of install_dir:bindir"Yu Watanabe2021-02-231-1/+2
| | | | | | | | | | | | | This reverts commit 5ffa2eaa541b718122a3422e911ef95f4c9981d7. It seems that if install_dir is not specified, meson decides install path based on file type, and non-executable binary files are installed under /usr/share. kernel-install is a script. So, we need to set install_dir argument explicitly. Fixes #18754.
* meson: remove one more instance of install_dir:bindirZbigniew Jędrzejewski-Szmek2021-02-021-2/+1
| | | | bindir is the default, c.f. a1fd722b5df83e526cb5feb3fb271ffe1d903472.
* meson: add option to skip installing to $sysconfdirJörg Thalheim2020-11-121-10/+13
| | | | | | | | | | | | | | | | | | | | | This is useful for development where overwriting files out side the configured prefix will affect the host as well as stateless systems such as NixOS that don't let packages install to /etc but handle configuration on their own. Alternative to https://github.com/systemd/systemd/pull/17501 tested with: $ mkdir inst build && cd build $ meson \ -Dcreate-log-dirs=false \ -Dsysvrcnd-path=$(realpath ../inst)/etc/rc.d \ -Dsysvinit-path=$(realpath ../inst)/etc/init.d \ -Drootprefix=$(realpath ../inst) \ -Dinstall-sysconfdir=false \ --prefix=$(realpath ../inst) .. $ ninja install
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* Add meson build option to prevent building kernel-installJakov Smolic2020-04-141-12/+16
| | | | | | | This commit introduces new meson build option "kernel-install" to prevent kernel-install from building if the user sets the added option as "false". Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
* kernel-install: create the entry directory only if $BOOT/$MACHINE_ID existsZbigniew Jędrzejewski-Szmek2019-03-121-1/+2
| | | | | | | | | | | | | Things are currently fairly ugly in Fedora: we create $BOOT/$MACHINE_ID/$KERNEL_VERSION/, and then 20-grub.install that is installed by grub2-common.rpm wants to remove that directory before 50-dracut.install get a chance to run. 50-dracut.install checks for the presence of that directory to decide where to install the kernel. So let's make the creation of the directory conditional. Previous commit changes bootctl install to create $BOOT/$MACHINE_ID, and this commit makes kernel-install not create it. In effect, the entry directory will only be created if 'bootctl install' or something else created the parent directory. https://bugzilla.redhat.com/show_bug.cgi?id=1648907
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* 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: reindent all files with 8 spacesZbigniew Jędrzejewski-Szmek2017-04-241-2/+0
| | | | | | | 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: use join_paths consistentlyMichael Biebl2017-04-241-1/+1
| | | | | 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: create dirs and touch /usrZbigniew Jędrzejewski-Szmek2017-04-241-0/+3
| | | | | | | | | 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: build systemd using mesonZbigniew Jędrzejewski-Szmek2017-04-241-0/+10
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