summaryrefslogtreecommitdiffstats
path: root/mkosi.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mkosi: initialize /usr/lib/os-release' IMAGE_ID + IMAGE_VERSION fields from ↵Lennart Poettering2021-07-031-0/+22
| | | | | | | build If it's passed into the build, use it, so that the mkosi build version is propagated into the image itself.
* mkosi: work-around to make systemd build in Fedora images that lack ↵Lennart Poettering2021-04-071-0/+12
| | | | | | | | | | | | populated /etc On Fedora /usr/bin/ld is a symlink managed via the "alternatives" system. This unfortunately means the binary is not usable in environments where /var or /etc are unpopulated. Let's address this by redirecting "ld" to "ld.bfd" manually if such an environment is detected, via $PATH. This is useful for building systemd in mkosi with UsrOnly=1 set.
* meson: Fix update-man-rules when the build dir is not a subdir of the ↵Daan De Meyer2021-01-241-1/+1
| | | | | | | | | | | | | project dir Until now, update-man-rules assumed that the build directory was a subdirectory of the project directory. When using mkosi, this is not the case. We use find instead of git ls-files because git ls-files does not seem to support outputting absolute paths. Also, this makes update-man-rules a bit more user-friendly as new manpages don't have to be added to the git staging area before they are processed by update-man-rules.py.
* mkosi: Pass build script arguments to ninjaDaan De Meyer2021-01-241-1/+1
| | | | | | mkosi recently gained support to pass arguments to the build script. Let's take advantage of this in systemd's build script to allow passing which target to build to ninja in the build script.
* mkosi: Allow setting version-tag option via VERSION_TAG env variableDaan De Meyer2021-01-151-1/+2
| | | | | | | | With https://github.com/systemd/mkosi/pull/630, we can set environment variables for the build script in mkosi. Let's modify the build script so we can set the version-tag option via an environment variable of the same name. The default is the empty string which causes meson to fall back to the default behavior (git version).
* mkosi: Only reset file permissions when $SRCDIR is not a mountpointDaan De Meyer2021-01-141-2/+4
| | | | | | If $SRCDIR is mounted into the build image (via mkosi overrides), let's not reset the permissions fo the source tree so as to not modify the original files on the host.
* mkosi: Disable translationsDaan De Meyer2021-01-101-1/+7
| | | | | Speeds up incremental builds by half a second. Let's assume translations won't be necessary in the resulting test images.
* mkosi.build: Only create groups if they don't exist yetDaan De Meyer2021-01-091-1/+1
|
* mkosi.build: Silence "Entering directory" message from ninjaDaan De Meyer2021-01-091-2/+4
| | | | | | When using `ninja -C "$BUILDDIR"`, ninja prints an annoying log message about entering the directory that cannot be silenced. Let's manually move in and out of the build directory instead.
* mkosi: Use --only-changed meson option when installingDaan De Meyer2020-12-191-2/+2
| | | | | | | | Recently, mkosi gained support for specifying an --install-directory option to save the contents of the install directory between bulids. By enabling the --only-changed meson install option, meson won't overwrite the contents of files that haven't changed since the last build when using --install-directory.
* mkosi: Silence locale checking in mkosi.buildDaan De Meyer2020-12-061-11/+11
| | | | | | Avoid warning and error logs from locale charmap and export LC_CTYPE by piping to dev/null and checking if locales are available before using them.
* mkosi: Remove explicit default_hierarchy=unified option from mkosi.buildDaan De Meyer2020-12-061-1/+1
| | | | | default_hierarchy is set to unified in meson_options already so we can remove it from mkosi.build.
* mkosi: Add --quiet and --no-rebuild options to meson install in mkosi.buildDaan De Meyer2020-12-061-1/+7
| | | | | | | | | | | | By default, meson install prints a line for every file it installs. This is verbose and doesn't provide much value. Let's silence the meson install step to remove this output from the mkosi build step. The --no-rebuild option removes some additional duplicate output by the meson install step. Ubuntu Focal still has meson 0.53.0 so we add a version check and only use the new feature if the meson version supports it.
* mkosi: Remove bash -x option from mkosi.buildDaan De Meyer2020-12-061-1/+1
| | | | | -x is for debugging purposes. During regular usage, using -x mostly prints useless output when building the mkosi image.
* mkosi: Use meson install instead of ninja install in build scriptDaan De Meyer2020-12-061-1/+1
| | | | Allows using extra options not available when using ninja.
* mkosi: Unify environment for unit testsMichal Koutný2020-04-221-1/+7
| | | | | | | | | | | Some testcases in test-execute rely on existence of user groups with certain gids. However, their existence is not universally granted [1]. Although the test could be skipped in their absence and give up testing some code paths, different approach was chosen -- create dummy groups in the testing image. [1] See how systemd-sysusers allocates gids (e.g. src/test/test-uid-range.c).
* mkosi: Use distro-invariant rootprefixMichal Koutný2020-04-221-1/+9
| | | | | | | Distributions may be build with various configs, e.g. customized rootprefix. It'd be unmaintanable to have specific mkosi.build for each supported distro. Hence, make the build script flexible yet distro oblivious.
* mkosi: let's update the boot loader also in /efiLennart Poettering2019-03-011-0/+4
| | | | This is after all where we preferable mount the ESP today.
* mkosi: update the boot loader from our freshly built oneLennart Poettering2018-10-161-0/+5
|
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* mkosi: drop dumping all test output to console againLennart Poettering2018-04-191-1/+1
| | | | | | As it appears meson's test cases nowadays (?) show useful logs for failing tests anyway, hence there's no need to show them unconditionally in full every time anymore. Let's hence simplify and drop this.
* 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.
* mkosi: set file permissions in copy of source tree (#8370)Filipe Brandenburger2018-03-201-0/+8
| | | | | | | | | | | | | | Meson keeps permissions around during the build, so details of how umask was set when cloning the original git tree will leak all the way to the installed files in the mkosi image. So reset the permissions of the files in the copy of the tree before starting the build. Also set the umask explicitly. Tested by creating a mkosi image and booting it on a tree that was cloned with a umask of 027, confirmed that the *.target files were not created as world-unreadable anymore.
* mkosi: use locale that supports UTF-8, detect one that is available (#8340)Filipe Brandenburger2018-03-051-1/+22
| | | | | | | | | | | | | | | | Using C.UTF-8 (as was done before #7244) breaks Arch Linux, but using en_US.UTF-8 (after #7244) breaks Debian in our .mkosi/mkosi.debian. So try to detect which one is available and works, first checking whether we're already running under a valid UTF-8 locale, then trying C.UTF-8 and finally en_US.UTF-8. If we fail to find a valid UTF-8 locale, then fail early, instead of letting the whole build complete only for Mesos to fail midway through the `ninja test` step. Tested on all of mkosi.fedora, mkosi.debian and mkosi.arch. Fixes: #7238
* mkosi: no need to determine meson parameters if we don't run mesonLennart Poettering2018-02-091-29/+32
| | | | Small optimization.
* separate flags from shebangbleep_blop2017-12-251-1/+2
|
* mkosi.build: add code to determine the right nobody user/group nameLennart Poettering2017-12-061-1/+35
|
* mkosi: do not build man pagesZbigniew Jędrzejewski-Szmek2017-11-291-1/+1
|
* mkosi: let's switch to the unified mode for mkosiLennart Poettering2017-11-251-1/+1
| | | | | This is a toolconfiguration for developers, and hence most likely should be the first thing to be switched over. Do so.
* mkosi: fix build script to use right sysvinit pathLennart Poettering2017-11-101-1/+3
| | | | | | | | On Fedora /etc/init.d is a symlink to /etc/rc.d/init.d. Our build scripts default to /etc/init.d since that is the LSB default. Let's make sure the build script thus follows the symlink correctly and configures to path explicitly, since otherwise our build artifacts in $DESTDIR are incompatible with the setup we actually need for Fedora.
* mkosi: set locale to be en_US.UTF-8 (#7244)John Lin2017-11-071-1/+1
| | | Fixes: #7238
* mkosi: when the build fails, show its log output, and propagate errorLennart Poettering2017-09-221-1/+1
|
* mkosi: use '[' rather than 'test' everywhereLennart Poettering2017-07-201-1/+2
|
* mkosi: support mkosi's --without-tests switchLennart Poettering2017-07-201-1/+1
| | | | | | | | | | This adds support for the mkosi switch --without-tests that is introduced by: https://github.com/systemd/mkosi/pull/122 With this in place doing "mkosi -ifT shell" is the fastest way from a git clone to a shell within a freshly compiled systemd system.
* mkosi: make use of BUILDDIR if it is setLennart Poettering2017-07-171-6/+10
| | | | | | | | This way, the new "mkosi.builddir" support proposed in PR: https://github.com/systemd/mkosi/pull/114 will be made use of automatically.
* mkosi.build: set encodingZbigniew Jędrzejewski-Szmek2017-05-061-0/+1
| | | | Otherwise python3 (via meson) complains.
* mkosi: switch build to mesonZbigniew Jędrzejewski-Szmek2017-05-061-5/+4
| | | | | For Fedora, the version is bumped to 26. In F25, ninja is still called ninja-build (while the package with the rename is going through QA).
* mkosi: change /etc/issue text a bit for mkosi images build from systemd treeLennart Poettering2016-12-141-0/+8
|
* mkosi: run tests when building mkosi imagesLennart Poettering2016-12-141-0/+2
|
* mkosi: drop git cleanZbigniew Jędrzejewski-Szmek2016-10-061-1/+0
| | | | This is required after systemd/mkosi#25.
* mkosi: make sure we fail on errorLennart Poettering2016-07-191-1/+1
|
* build-sys: add mkosi hookup (#3731)Lennart Poettering2016-07-161-0/+26
This adds a build script and a settings file for "mkosi", a tool for putting together full, bootable disk images for container managers of EFI systems and VMs. With these files it's enough to type "mkosi" in the project directory to generate a bootable Fedora 24 OS image with a version of systemd compiled fresh from the working tree. See https://github.com/systemd/mkosi