Systemd/src/import
Zbigniew Jędrzejewski-Szmek 681bd2c524 meson: generate version tag from git
$ 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.
2018-12-21 13:43:20 +01:00
..
curl-util.c meson: generate version tag from git 2018-12-21 13:43:20 +01:00
curl-util.h import: use structured initializers 2018-11-24 03:53:18 +09:00
export-raw.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
export-raw.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
export-tar.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
export-tar.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
export.c import: prefer fd_get_path() over readlink_malloc() where applicable 2018-11-26 18:09:01 +01:00
import-common.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
import-common.h import: rerrange tarball/fs imports that have a single top-level directory containing the OS tree 2018-11-26 18:09:01 +01:00
import-compress.c Make bzip2 an optional dependency for systemd-importd 2018-09-25 10:58:09 +02:00
import-compress.h Make bzip2 an optional dependency for systemd-importd 2018-09-25 10:58:09 +02:00
import-fs.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
import-pubring.gpg import: add image verification using gpg 2015-01-21 04:03:54 +01:00
import-raw.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
import-raw.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
import-tar.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
import-tar.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
import.c import: prefer fd_get_path() over readlink_malloc() where applicable 2018-11-26 18:09:01 +01:00
importd.c importd: immediately validate whether fd is of right type when receiving it 2018-11-26 18:09:01 +01:00
meson.build machine: add support for importing containers from plain directories 2018-11-26 18:09:01 +01:00
org.freedesktop.import1.conf machine: add support for importing containers from plain directories 2018-11-26 18:09:01 +01:00
org.freedesktop.import1.policy meson: drop unnecessary "transformation" of policy files 2018-02-16 13:01:12 +01:00
org.freedesktop.import1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
pull-common.c tree-wide: invoke rlimit_nofile_safe() before various exec{v,ve,l}() invocations 2018-12-01 12:50:45 +01:00
pull-common.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
pull-job.c import: drop logic of setting up /var/lib/machines as btrfs loopback mount 2018-11-26 18:09:01 +01:00
pull-job.h import: drop logic of setting up /var/lib/machines as btrfs loopback mount 2018-11-26 18:09:01 +01:00
pull-raw.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
pull-raw.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
pull-tar.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
pull-tar.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
pull.c coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
qcow2-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
qcow2-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-qcow2.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00