mirror of
https://github.com/systemd/systemd
synced 2026-04-12 18:14:51 +02:00
Compare commits
34 Commits
647082cf7f
...
6d0aef1dd1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d0aef1dd1 | ||
|
|
ffb8c82715 | ||
|
|
78afbb67d2 | ||
|
|
717e92ceb9 | ||
|
|
d9044a43f6 | ||
|
|
5e3ab38e70 | ||
|
|
d6e2c1ab71 | ||
|
|
931bc1957b | ||
|
|
2777a4a3bf | ||
|
|
a794a4d872 | ||
|
|
b85c1905e0 | ||
|
|
9bd4181ef5 | ||
|
|
418e1f2892 | ||
|
|
ac172d7063 | ||
|
|
0a1f0bf405 | ||
|
|
174eab0066 | ||
|
|
edc6390e29 | ||
|
|
e80b51dad2 | ||
|
|
d5ff7bdbb7 | ||
|
|
d338b1713a | ||
|
|
ae527ed688 | ||
|
|
794aa5f57f | ||
|
|
3a469802f4 | ||
|
|
68a06b3cdf | ||
|
|
bbec46c817 | ||
|
|
e1eeebbb11 | ||
|
|
bec17e801a | ||
|
|
d2bd0bfa36 | ||
|
|
d43ffcac84 | ||
|
|
661615a0af | ||
|
|
a87e9cd79f | ||
|
|
aac470326e | ||
|
|
b144177240 | ||
|
|
8ce08c8e97 |
@ -48,6 +48,7 @@ The following exceptions apply:
|
|||||||
- src/systemctl/systemd-sysv-install.SKELETON
|
- src/systemctl/systemd-sysv-install.SKELETON
|
||||||
- tools/check-includes.pl
|
- tools/check-includes.pl
|
||||||
- all examples under man/
|
- all examples under man/
|
||||||
|
- config files and examples under /network
|
||||||
* the following sources are under **Public Domain** (LicenseRef-murmurhash2-public-domain):
|
* the following sources are under **Public Domain** (LicenseRef-murmurhash2-public-domain):
|
||||||
- src/basic/MurmurHash2.c
|
- src/basic/MurmurHash2.c
|
||||||
- src/basic/MurmurHash2.h
|
- src/basic/MurmurHash2.h
|
||||||
|
|||||||
12
NEWS
12
NEWS
@ -10699,7 +10699,7 @@ CHANGES WITH 211:
|
|||||||
also supports LUKS-encrypted partitions now. With this in
|
also supports LUKS-encrypted partitions now. With this in
|
||||||
place, automatic discovery of partitions to mount following
|
place, automatic discovery of partitions to mount following
|
||||||
the Discoverable Partitions Specification
|
the Discoverable Partitions Specification
|
||||||
(https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec)
|
(https://systemd.io/DISCOVERABLE_PARTITIONS/)
|
||||||
is now a lot more complete. This allows booting without
|
is now a lot more complete. This allows booting without
|
||||||
/etc/fstab and without root= on the kernel command line on
|
/etc/fstab and without root= on the kernel command line on
|
||||||
systems prepared appropriately.
|
systems prepared appropriately.
|
||||||
@ -12204,7 +12204,7 @@ CHANGES WITH 198:
|
|||||||
only in conjunction with Gummiboot, but could be supported
|
only in conjunction with Gummiboot, but could be supported
|
||||||
by other boot loaders too. For details see:
|
by other boot loaders too. For details see:
|
||||||
|
|
||||||
https://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface
|
https://systemd.io/BOOT_LOADER_INTERFACE
|
||||||
|
|
||||||
* A new generator has been added that automatically mounts the
|
* A new generator has been added that automatically mounts the
|
||||||
EFI System Partition (ESP) to /boot, if that directory
|
EFI System Partition (ESP) to /boot, if that directory
|
||||||
@ -12280,7 +12280,7 @@ CHANGES WITH 198:
|
|||||||
* A new tool kernel-install has been added that can install
|
* A new tool kernel-install has been added that can install
|
||||||
kernel images according to the Boot Loader Specification:
|
kernel images according to the Boot Loader Specification:
|
||||||
|
|
||||||
https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec
|
https://systemd.io/BOOT_LOADER_SPECIFICATION
|
||||||
|
|
||||||
* Boot time console output has been improved to provide
|
* Boot time console output has been improved to provide
|
||||||
animated boot time output for hanging jobs.
|
animated boot time output for hanging jobs.
|
||||||
@ -12370,7 +12370,7 @@ CHANGES WITH 197:
|
|||||||
of these policies is now the default. Please see this wiki
|
of these policies is now the default. Please see this wiki
|
||||||
document for details:
|
document for details:
|
||||||
|
|
||||||
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
|
https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html
|
||||||
|
|
||||||
* Auke Kok's bootchart implementation has been added to the
|
* Auke Kok's bootchart implementation has been added to the
|
||||||
systemd tree. It is an optional component that can graph the
|
systemd tree. It is an optional component that can graph the
|
||||||
@ -13369,7 +13369,7 @@ CHANGES WITH 183:
|
|||||||
|
|
||||||
* A framework for implementing offline system updates is now
|
* A framework for implementing offline system updates is now
|
||||||
integrated, for details see:
|
integrated, for details see:
|
||||||
https://www.freedesktop.org/wiki/Software/systemd/SystemUpdates
|
https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html
|
||||||
|
|
||||||
* A new service type Type=idle is available now which helps us
|
* A new service type Type=idle is available now which helps us
|
||||||
avoiding ugly interleaving of getty output and boot status
|
avoiding ugly interleaving of getty output and boot status
|
||||||
@ -13737,7 +13737,7 @@ CHANGES WITH 38:
|
|||||||
* Processes with '@' in argv[0][0] are now excluded from the
|
* Processes with '@' in argv[0][0] are now excluded from the
|
||||||
final shut-down killing spree, following the logic explained
|
final shut-down killing spree, following the logic explained
|
||||||
in:
|
in:
|
||||||
https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons
|
https://systemd.io/ROOT_STORAGE_DAEMONS/
|
||||||
|
|
||||||
* All processes remaining in a service cgroup when we enter
|
* All processes remaining in a service cgroup when we enter
|
||||||
the START or START_PRE states are now killed with
|
the START or START_PRE states are now killed with
|
||||||
|
|||||||
10
README
10
README
@ -1,10 +1,7 @@
|
|||||||
systemd System and Service Manager
|
systemd System and Service Manager
|
||||||
|
|
||||||
DETAILS:
|
|
||||||
http://0pointer.de/blog/projects/systemd.html
|
|
||||||
|
|
||||||
WEB SITE:
|
WEB SITE:
|
||||||
https://www.freedesktop.org/wiki/Software/systemd
|
https://systemd.io
|
||||||
|
|
||||||
GIT:
|
GIT:
|
||||||
git@github.com:systemd/systemd.git
|
git@github.com:systemd/systemd.git
|
||||||
@ -19,6 +16,11 @@ IRC:
|
|||||||
BUG REPORTS:
|
BUG REPORTS:
|
||||||
https://github.com/systemd/systemd/issues
|
https://github.com/systemd/systemd/issues
|
||||||
|
|
||||||
|
OLDER DOCUMENTATION:
|
||||||
|
|
||||||
|
http://0pointer.de/blog/projects/systemd.html
|
||||||
|
https://www.freedesktop.org/wiki/Software/systemd
|
||||||
|
|
||||||
AUTHOR:
|
AUTHOR:
|
||||||
Lennart Poettering
|
Lennart Poettering
|
||||||
Kay Sievers
|
Kay Sievers
|
||||||
|
|||||||
2
TODO
2
TODO
@ -813,7 +813,7 @@ Features:
|
|||||||
Note that we start initrd-fs.target and initrd-cleanup.target there, so a straightforward
|
Note that we start initrd-fs.target and initrd-cleanup.target there, so a straightforward
|
||||||
ConditionPathExists= is not enough.
|
ConditionPathExists= is not enough.
|
||||||
|
|
||||||
* docs: bring http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime up to date
|
* docs: bring https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime up to date
|
||||||
|
|
||||||
* add a job mode that will fail if a transaction would mean stopping
|
* add a job mode that will fail if a transaction would mean stopping
|
||||||
running units. Use this in timedated to manage the NTP service
|
running units. Use this in timedated to manage the NTP service
|
||||||
|
|||||||
@ -8,7 +8,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
|||||||
# The Container Interface
|
# The Container Interface
|
||||||
|
|
||||||
Also consult [Writing Virtual Machine or Container
|
Also consult [Writing Virtual Machine or Container
|
||||||
Managers](http://www.freedesktop.org/wiki/Software/systemd/writing-vm-managers).
|
Managers](https://www.freedesktop.org/wiki/Software/systemd/writing-vm-managers).
|
||||||
|
|
||||||
systemd has a number of interfaces for interacting with container managers,
|
systemd has a number of interfaces for interacting with container managers,
|
||||||
when systemd is used inside of an OS container. If you work on a container
|
when systemd is used inside of an OS container. If you work on a container
|
||||||
|
|||||||
@ -31,8 +31,8 @@ for specific uses. This has many benefits:
|
|||||||
descriptive information about partitions tables.
|
descriptive information about partitions tables.
|
||||||
|
|
||||||
Note that the OS side of this specification is currently implemented in
|
Note that the OS side of this specification is currently implemented in
|
||||||
[systemd](http://systemd.io/) 211 and newer in the
|
[systemd](https://systemd.io/) 211 and newer in the
|
||||||
[systemd-gpt-auto-generator(8)](http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html)
|
[systemd-gpt-auto-generator(8)](https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html)
|
||||||
generator tool. Note that automatic discovery of the root only works if the
|
generator tool. Note that automatic discovery of the root only works if the
|
||||||
boot loader communicates this information to the OS, by implementing the [Boot
|
boot loader communicates this information to the OS, by implementing the [Boot
|
||||||
Loader
|
Loader
|
||||||
@ -164,7 +164,7 @@ Other GPT type IDs might be used on Linux, for example to mark software RAID or
|
|||||||
LVM partitions. The definitions of those GPT types is outside of the scope of
|
LVM partitions. The definitions of those GPT types is outside of the scope of
|
||||||
this specification.
|
this specification.
|
||||||
|
|
||||||
[systemd-id128(1)](http://www.freedesktop.org/software/systemd/man/systemd-id128.html)'s
|
[systemd-id128(1)](https://www.freedesktop.org/software/systemd/man/systemd-id128.html)'s
|
||||||
`show` command may be used to list those GPT partition type UUIDs.
|
`show` command may be used to list those GPT partition type UUIDs.
|
||||||
|
|
||||||
## Partition Names
|
## Partition Names
|
||||||
|
|||||||
156
docs/JOURNAL_EXPORT_FORMATS.md
Normal file
156
docs/JOURNAL_EXPORT_FORMATS.md
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
---
|
||||||
|
title: Journal Export Format
|
||||||
|
category: Interfaces
|
||||||
|
layout: default
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
---
|
||||||
|
|
||||||
|
# Journal Export Format
|
||||||
|
|
||||||
|
_Note that this document describes the binary serialization format of journals only, as used for transfer across the network.
|
||||||
|
For interfacing with web technologies there's the Journal JSON Format, described below.
|
||||||
|
The binary format on disk is documented as the [Journal File Format](https://systemd.io/JOURNAL_FILE_FORMAT/)._
|
||||||
|
|
||||||
|
_Before reading on, please make sure you are aware of the [basic properties of journal entries](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html), in particular realize that they may include binary non-text data (though usually don't), and the same field might have multiple values assigned within the same entry (though usually hasn't)._
|
||||||
|
|
||||||
|
When exporting journal data for other uses or transferring it via the network/local IPC the _journal export format_ is used. It's a simple serialization of journal entries, that is easy to read without any special tools, but still binary safe where necessary. The format is like this:
|
||||||
|
|
||||||
|
* Two journal entries that follow each other are separated by a double newline.
|
||||||
|
* Journal fields consisting only of valid non-control UTF-8 codepoints are serialized as they are (i.e. the field name, followed by '=', followed by field data), followed by a newline as separator to the next field. Note that fields containing newlines cannot be formatted like this. Non-control UTF-8 codepoints are the codepoints with value at or above 32 (' '), or equal to 9 (TAB).
|
||||||
|
* Other journal fields are serialized in a special binary safe way: field name, followed by newline, followed by a binary 64bit little endian size value, followed by the binary field data, followed by a newline as separator to the next field.
|
||||||
|
* Entry metadata that is not actually a field is serialized like it was a field, but beginning with two underscores. More specifically, `__CURSOR=`, `__REALTIME_TIMESTAMP=`, `__MONOTONIC_TIMESTAMP=` are introduced this way. Note that these meta-fields are only generated when actual journal files are serialized. They are omitted for entries that do not originate from a journal file (for example because they are transferred for the first time to be stored in one). Or in other words: if you are generating this format you shouldn't care about these special double-underscore fields. But you might find them usable when you deserialize the format generated by us. Additional fields prefixed with two underscores might be added later on, your parser should skip over the fields it does not know.
|
||||||
|
* The order in which fields appear in an entry is undefined and might be different for each entry that is serialized.
|
||||||
|
And that's already it.
|
||||||
|
|
||||||
|
This format can be generated via `journalctl -o export`.
|
||||||
|
|
||||||
|
Here's an example for two serialized entries which consist only of text data:
|
||||||
|
|
||||||
|
```
|
||||||
|
__CURSOR=s=739ad463348b4ceca5a9e69c95a3c93f;i=4ece7;b=6c7c6013a26343b29e964691ff25d04c;m=4fc72436e;t=4c508a72423d9;x=d3e5610681098c10;p=system.journal
|
||||||
|
__REALTIME_TIMESTAMP=1342540861416409
|
||||||
|
__MONOTONIC_TIMESTAMP=21415215982
|
||||||
|
_BOOT_ID=6c7c6013a26343b29e964691ff25d04c
|
||||||
|
_TRANSPORT=syslog
|
||||||
|
PRIORITY=4
|
||||||
|
SYSLOG_FACILITY=3
|
||||||
|
SYSLOG_IDENTIFIER=gdm-password]
|
||||||
|
SYSLOG_PID=587
|
||||||
|
MESSAGE=AccountsService-DEBUG(+): ActUserManager: ignoring unspecified session '8' since it's not graphical: Success
|
||||||
|
_PID=587
|
||||||
|
_UID=0
|
||||||
|
_GID=500
|
||||||
|
_COMM=gdm-session-wor
|
||||||
|
_EXE=/usr/libexec/gdm-session-worker
|
||||||
|
_CMDLINE=gdm-session-worker [pam/gdm-password]
|
||||||
|
_AUDIT_SESSION=2
|
||||||
|
_AUDIT_LOGINUID=500
|
||||||
|
_SYSTEMD_CGROUP=/user/lennart/2
|
||||||
|
_SYSTEMD_SESSION=2
|
||||||
|
_SELINUX_CONTEXT=system_u:system_r:xdm_t:s0-s0:c0.c1023
|
||||||
|
_SOURCE_REALTIME_TIMESTAMP=1342540861413961
|
||||||
|
_MACHINE_ID=a91663387a90b89f185d4e860000001a
|
||||||
|
_HOSTNAME=epsilon
|
||||||
|
|
||||||
|
__CURSOR=s=739ad463348b4ceca5a9e69c95a3c93f;i=4ece8;b=6c7c6013a26343b29e964691ff25d04c;m=4fc72572f;t=4c508a7243799;x=68597058a89b7246;p=system.journal
|
||||||
|
__REALTIME_TIMESTAMP=1342540861421465
|
||||||
|
__MONOTONIC_TIMESTAMP=21415221039
|
||||||
|
_BOOT_ID=6c7c6013a26343b29e964691ff25d04c
|
||||||
|
_TRANSPORT=syslog
|
||||||
|
PRIORITY=6
|
||||||
|
SYSLOG_FACILITY=9
|
||||||
|
SYSLOG_IDENTIFIER=/USR/SBIN/CROND
|
||||||
|
SYSLOG_PID=8278
|
||||||
|
MESSAGE=(root) CMD (run-parts /etc/cron.hourly)
|
||||||
|
_PID=8278
|
||||||
|
_UID=0
|
||||||
|
_GID=0
|
||||||
|
_COMM=run-parts
|
||||||
|
_EXE=/usr/bin/bash
|
||||||
|
_CMDLINE=/bin/bash /bin/run-parts /etc/cron.hourly
|
||||||
|
_AUDIT_SESSION=8
|
||||||
|
_AUDIT_LOGINUID=0
|
||||||
|
_SYSTEMD_CGROUP=/user/root/8
|
||||||
|
_SYSTEMD_SESSION=8
|
||||||
|
_SELINUX_CONTEXT=system_u:system_r:crond_t:s0-s0:c0.c1023
|
||||||
|
_SOURCE_REALTIME_TIMESTAMP=1342540861416351
|
||||||
|
_MACHINE_ID=a91663387a90b89f185d4e860000001a
|
||||||
|
_HOSTNAME=epsilon
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
A message with a binary field produced by
|
||||||
|
```bash
|
||||||
|
python3 -c 'from systemd import journal; journal.send("foo\nbar")'
|
||||||
|
journalctl -n1 -o export
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
__CURSOR=s=bcce4fb8ffcb40e9a6e05eee8b7831bf;i=5ef603;b=ec25d6795f0645619ddac9afdef453ee;m=545242e7049;t=50f1202
|
||||||
|
__REALTIME_TIMESTAMP=1423944916375353
|
||||||
|
__MONOTONIC_TIMESTAMP=5794517905481
|
||||||
|
_BOOT_ID=ec25d6795f0645619ddac9afdef453ee
|
||||||
|
_TRANSPORT=journal
|
||||||
|
_UID=1001
|
||||||
|
_GID=1001
|
||||||
|
_CAP_EFFECTIVE=0
|
||||||
|
_SYSTEMD_OWNER_UID=1001
|
||||||
|
_SYSTEMD_SLICE=user-1001.slice
|
||||||
|
_MACHINE_ID=5833158886a8445e801d437313d25eff
|
||||||
|
_HOSTNAME=bupkis
|
||||||
|
_AUDIT_LOGINUID=1001
|
||||||
|
_SELINUX_CONTEXT=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
|
||||||
|
CODE_LINE=1
|
||||||
|
CODE_FUNC=<module>
|
||||||
|
SYSLOG_IDENTIFIER=python3
|
||||||
|
_COMM=python3
|
||||||
|
_EXE=/usr/bin/python3.4
|
||||||
|
_AUDIT_SESSION=35898
|
||||||
|
_SYSTEMD_CGROUP=/user.slice/user-1001.slice/session-35898.scope
|
||||||
|
_SYSTEMD_SESSION=35898
|
||||||
|
_SYSTEMD_UNIT=session-35898.scope
|
||||||
|
MESSAGE
|
||||||
|
^G^@^@^@^@^@^@^@foo
|
||||||
|
bar
|
||||||
|
CODE_FILE=<string>
|
||||||
|
_PID=16853
|
||||||
|
_CMDLINE=python3 -c from systemd import journal; journal.send("foo\nbar")
|
||||||
|
_SOURCE_REALTIME_TIMESTAMP=1423944916372858
|
||||||
|
```
|
||||||
|
|
||||||
|
# Journal JSON Format
|
||||||
|
|
||||||
|
_Note that this section describes the JSON serialization format of the journal only, as used for interfacing with web technologies.
|
||||||
|
For binary transfer of journal data across the network there's the Journal Export Format described above.
|
||||||
|
The binary format on disk is documented as [Journal File Format](https://systemd.io/JOURNAL_FILE_FORMAT)._
|
||||||
|
|
||||||
|
_Before reading on, please make sure you are aware of the [basic properties of journal entries](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html), in particular realize that they may include binary non-text data (though usually don't), and the same field might have multiple values assigned within the same entry (though usually hasn't)._
|
||||||
|
|
||||||
|
In most cases the Journal JSON serialization is the obvious mapping of the entry field names (as JSON strings) to the entry field values (also as JSON strings) encapsulated in one JSON object. However, there are a few special cases to handle:
|
||||||
|
|
||||||
|
* A field that contains non-printable or non-UTF8 is serialized as a number array instead. This is necessary to handle binary data in a safe way without losing data, since JSON cannot embed binary data natively. Each byte of the binary field will be mapped to its numeric value in the range 0…255.
|
||||||
|
* The JSON serializer can optionally skip huge (as in larger than a specific threshold) data fields from the JSON object. If that is enabled and a data field is too large, the field name is still included in the JSON object but assigned _null_.
|
||||||
|
* Within the same entry, Journal fields may have multiple values assigned. This is not allowed in JSON. The serializer will hence create a single JSON field only for these cases, and assign it an array of values (which the can be strings, _null_ or number arrays, see above).
|
||||||
|
* If the JSON data originates from a journal file it may include the special addressing fields `__CURSOR`, `__REALTIME_TIMESTAMP`, `__MONOTONIC_TIMESTAMP`, which contain the cursor string of this entry as string, and the realtime/monotonic timestamps of this entry as formatted numeric string of usec since the respective epoch.
|
||||||
|
|
||||||
|
Here's an example, illustrating all cases mentioned above. Consider this entry:
|
||||||
|
|
||||||
|
```
|
||||||
|
MESSAGE=Hello World
|
||||||
|
_UDEV_DEVNODE=/dev/waldo
|
||||||
|
_UDEV_DEVLINK=/dev/alias1
|
||||||
|
_UDEV_DEVLINK=/dev/alias2
|
||||||
|
BINARY=this is a binary value \a
|
||||||
|
LARGE=this is a super large value (let's pretend at least, for the sake of this example)
|
||||||
|
```
|
||||||
|
|
||||||
|
This translates into the following JSON Object:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"MESSAGE" : "Hello World",
|
||||||
|
"_UDEV_DEVNODE" : "/dev/waldo",
|
||||||
|
"_UDEV_DEVLINK" : [ "/dev/alias1", "/dev/alias2" ],
|
||||||
|
"BINARY" : [ 116, 104, 105, 115, 32, 105, 115, 32, 97, 32, 98, 105, 110, 97, 114, 121, 32, 118, 97, 108, 117, 101, 32, 7 ],
|
||||||
|
"LARGE" : null
|
||||||
|
}
|
||||||
|
```
|
||||||
@ -7,11 +7,9 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
|||||||
|
|
||||||
# Journal File Format
|
# Journal File Format
|
||||||
|
|
||||||
_Note that this document describes the binary on-disk format of journals
|
_Note that this document describes the binary on-disk format of journals only.
|
||||||
only. For interfacing with web technologies there's the [Journal JSON
|
For interfacing with web technologies there's the [Journal JSON Format](https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format).
|
||||||
Format](http://www.freedesktop.org/wiki/Software/systemd/json). For transfer
|
For transfer of journal data across the network there's the [Journal Export Format](https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format)._
|
||||||
of journal data across the network there's the [Journal Export
|
|
||||||
Format](http://www.freedesktop.org/wiki/Software/systemd/export)._
|
|
||||||
|
|
||||||
The systemd journal stores log data in a binary format with several features:
|
The systemd journal stores log data in a binary format with several features:
|
||||||
|
|
||||||
@ -32,30 +30,30 @@ keep this document up-to-date and accurate.
|
|||||||
|
|
||||||
Instead of implementing your own reader or writer for journal files we ask you
|
Instead of implementing your own reader or writer for journal files we ask you
|
||||||
to use the [Journal's native C
|
to use the [Journal's native C
|
||||||
API](http://www.freedesktop.org/software/systemd/man/sd-journal.html) to access
|
API](https://www.freedesktop.org/software/systemd/man/sd-journal.html) to access
|
||||||
these files. It provides you with full access to the files, and will not
|
these files. It provides you with full access to the files, and will not
|
||||||
withhold any data. If you find a limitation, please ping us and we might add
|
withhold any data. If you find a limitation, please ping us and we might add
|
||||||
some additional interfaces for you.
|
some additional interfaces for you.
|
||||||
|
|
||||||
If you need access to the raw journal data in serialized stream form without C
|
If you need access to the raw journal data in serialized stream form without C
|
||||||
API our recommendation is to make use of the [Journal Export
|
API our recommendation is to make use of the [Journal Export
|
||||||
Format](http://www.freedesktop.org/wiki/Software/systemd/export), which you can
|
Format](https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format), which you can
|
||||||
get via "journalctl -o export" or via systemd-journal-gatewayd. The export
|
get via `journalctl -o export` or via `systemd-journal-gatewayd`. The export
|
||||||
format is much simpler to parse, but complete and accurate. Due to its
|
format is much simpler to parse, but complete and accurate. Due to its
|
||||||
stream-based nature it is not indexed.
|
stream-based nature it is not indexed.
|
||||||
|
|
||||||
_Or, to put this in other words: this low-level document is probably not what
|
_Or, to put this in other words: this low-level document is probably not what
|
||||||
you want to use as base of your project. You want our [C
|
you want to use as base of your project. You want our [C
|
||||||
API](http://www.freedesktop.org/software/systemd/man/sd-journal.html) instead!
|
API](https://www.freedesktop.org/software/systemd/man/sd-journal.html) instead!
|
||||||
And if you really don't want the C API, then you want the [Journal Export
|
And if you really don't want the C API, then you want the [Journal Export
|
||||||
Format](http://www.freedesktop.org/wiki/Software/systemd/export) instead! This
|
Format or Journal JSON Format](https://systemd.io/JOURNAL_EXPORT_FORMATS) instead!
|
||||||
document is primarily for your entertainment and education. Thank you!_
|
This document is primarily for your entertainment and education. Thank you!_
|
||||||
|
|
||||||
This document assumes you have a basic understanding of the journal concepts,
|
This document assumes you have a basic understanding of the journal concepts,
|
||||||
the properties of a journal entry and so on. If not, please go and read up,
|
the properties of a journal entry and so on. If not, please go and read up,
|
||||||
then come back! This is a good opportunity to read about the [basic properties
|
then come back! This is a good opportunity to read about the [basic properties
|
||||||
of journal
|
of journal
|
||||||
entries](http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html),
|
entries](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html),
|
||||||
in particular realize that they may include binary non-text data (though
|
in particular realize that they may include binary non-text data (though
|
||||||
usually don't), and the same field might have multiple values assigned within
|
usually don't), and the same field might have multiple values assigned within
|
||||||
the same entry.
|
the same entry.
|
||||||
|
|||||||
@ -100,7 +100,8 @@ And now, here's the list of (hopefully) all APIs that we have introduced with sy
|
|||||||
| [Network](https://www.freedesktop.org/software/systemd/man/systemd.network.html) & [Netdev file format](https://www.freedesktop.org/software/systemd/man/systemd.netdev.html) | File format | yes | yes | no | no | - | no |
|
| [Network](https://www.freedesktop.org/software/systemd/man/systemd.network.html) & [Netdev file format](https://www.freedesktop.org/software/systemd/man/systemd.netdev.html) | File format | yes | yes | no | no | - | no |
|
||||||
| [Link file format](https://www.freedesktop.org/software/systemd/man/systemd.link.html) | File format | yes | yes | no | no | - | no |
|
| [Link file format](https://www.freedesktop.org/software/systemd/man/systemd.link.html) | File format | yes | yes | no | no | - | no |
|
||||||
| [Journal File Format](https://systemd.io/JOURNAL_FILE_FORMAT) | File format | yes | yes | - | maybe | - | no |
|
| [Journal File Format](https://systemd.io/JOURNAL_FILE_FORMAT) | File format | yes | yes | - | maybe | - | no |
|
||||||
| [Journal Export Format](https://www.freedesktop.org/wiki/Software/systemd/export) | File format | yes | yes | - | yes | - | no |
|
| [Journal Export Format](https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format) | File format | yes | yes | - | yes | - | no |
|
||||||
|
| [Journal JSON Format](https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format) | File format | yes | yes | - | yes | - | no |
|
||||||
| [Cooperation in cgroup tree](https://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups) | Treaty | yes | yes | libvirt | yes | libvirt | no |
|
| [Cooperation in cgroup tree](https://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups) | Treaty | yes | yes | libvirt | yes | libvirt | no |
|
||||||
| [Password Agents](https://systemd.io/PASSWORD_AGENTS) | Socket+Files | yes | yes | - | yes | - | no |
|
| [Password Agents](https://systemd.io/PASSWORD_AGENTS) | Socket+Files | yes | yes | - | yes | - | no |
|
||||||
| [udev multi-seat properties](https://www.freedesktop.org/software/systemd/man/sd-login.html) | udev Property | yes | yes | X11, gdm | no | - | no |
|
| [udev multi-seat properties](https://www.freedesktop.org/software/systemd/man/sd-login.html) | udev Property | yes | yes | X11, gdm | no | - | no |
|
||||||
|
|||||||
@ -62,7 +62,7 @@ Does this have any drawbacks? Yes, it does. Previously it was practically guaran
|
|||||||
You basically have three options:
|
You basically have three options:
|
||||||
|
|
||||||
1. You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's .link file for the default policy: `ln -s /dev/null /etc/systemd/network/99-default.link`
|
1. You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's .link file for the default policy: `ln -s /dev/null /etc/systemd/network/99-default.link`
|
||||||
1. You create your own manual naming scheme, for example by naming your interfaces `internet0`, `dmz0` or `lan0`. For that create your own `.link` files in `/etc/systemd/network/`, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See [systemd.link(5)](http://www.freedesktop.org/software/systemd/man/systemd.link.html) for more information.
|
1. You create your own manual naming scheme, for example by naming your interfaces `internet0`, `dmz0` or `lan0`. For that create your own `.link` files in `/etc/systemd/network/`, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See [systemd.link(5)](https://www.freedesktop.org/software/systemd/man/systemd.link.html) for more information.
|
||||||
1. You pass the `net.ifnames=0` on the kernel command line
|
1. You pass the `net.ifnames=0` on the kernel command line
|
||||||
|
|
||||||
## How does the new naming scheme look like, precisely?
|
## How does the new naming scheme look like, precisely?
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
title: systemd
|
title: systemd
|
||||||
baseurl: "" # the subpath of your site, e.g. /blog/
|
baseurl: "" # the subpath of your site, e.g. /blog/
|
||||||
url: "http://systemd.io" # the base hostname & protocol for your site
|
url: "https://systemd.io" # the base hostname & protocol for your site
|
||||||
|
|
||||||
permalink: /:title/
|
permalink: /:title/
|
||||||
|
|
||||||
|
|||||||
@ -301,7 +301,7 @@
|
|||||||
<para>serializes the journal into a binary (but mostly
|
<para>serializes the journal into a binary (but mostly
|
||||||
text-based) stream suitable for backups and network
|
text-based) stream suitable for backups and network
|
||||||
transfer (see
|
transfer (see
|
||||||
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format</ulink>
|
<ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>
|
||||||
for more information). To import the binary stream back
|
for more information). To import the binary stream back
|
||||||
into native journald format use
|
into native journald format use
|
||||||
<citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
@ -314,7 +314,7 @@
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>formats entries as JSON objects, separated by newline characters (see <ulink
|
<para>formats entries as JSON objects, separated by newline characters (see <ulink
|
||||||
url="https://www.freedesktop.org/wiki/Software/systemd/json">Journal JSON Format</ulink> for more
|
url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format">Journal JSON Format</ulink> for more
|
||||||
information). Field values are generally encoded as JSON strings, with three exceptions:
|
information). Field values are generally encoded as JSON strings, with three exceptions:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Fields larger than 4096 bytes are encoded as <constant>null</constant> values. (This
|
<listitem><para>Fields larger than 4096 bytes are encoded as <constant>null</constant> values. (This
|
||||||
|
|||||||
@ -196,6 +196,28 @@
|
|||||||
by using the <keycap>f</keycap> key.</para></listitem>
|
by using the <keycap>f</keycap> key.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>reboot-for-bitlocker</term>
|
||||||
|
|
||||||
|
<listitem><para>Work around BitLocker requiring a recovery key when the boot loader was
|
||||||
|
updated (enabled by default).</para>
|
||||||
|
|
||||||
|
<para>Try to detect BitLocker encrypted drives along with an active TPM. If both are found
|
||||||
|
and Windows Boot Manager is selected in the boot menu, set the <literal>BootNext</literal>
|
||||||
|
EFI variable and restart the system. The firmware will then start Windows Boot Manager
|
||||||
|
directly, leaving the TPM PCRs in expected states so that Windows can unseal the encryption
|
||||||
|
key. This allows systemd-boot to be updated without having to provide the recovery key for
|
||||||
|
BitLocker drive unlocking.</para>
|
||||||
|
|
||||||
|
<para>Note that the PCRs that Windows uses can be configured with the
|
||||||
|
<literal>Configure TPM platform validation profile for native UEFI firmware configurations</literal>
|
||||||
|
group policy under <literal>Computer Configuration\Administrative Templates\Windows Components\BitLocker Drive Encryption</literal>.
|
||||||
|
When secure boot is enabled, changing this to PCRs <literal>0,2,7,11</literal> should be safe.
|
||||||
|
The TPM key protector needs to be removed and then added back for the PCRs on an already
|
||||||
|
encrypted drive to change. If PCR 4 is not measured, this setting can be disabled to speed
|
||||||
|
up booting into Windows.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>random-seed-mode</term>
|
<term>random-seed-mode</term>
|
||||||
|
|
||||||
|
|||||||
@ -105,7 +105,7 @@ endforeach
|
|||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
have_lxml = run_command(xml_helper_py).returncode() == 0
|
have_lxml = run_command(xml_helper_py, check: false).returncode() == 0
|
||||||
if not have_lxml
|
if not have_lxml
|
||||||
message('python-lxml not available, not making man page indices')
|
message('python-lxml not available, not making man page indices')
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -621,7 +621,7 @@ node /org/freedesktop/login1 {
|
|||||||
whether the inhibit shall be consider mandatory or whether it should just delay the operation to a
|
whether the inhibit shall be consider mandatory or whether it should just delay the operation to a
|
||||||
certain maximum time. The method returns a file descriptor. The lock is released the moment this file
|
certain maximum time. The method returns a file descriptor. The lock is released the moment this file
|
||||||
descriptor and all its duplicates are closed. For more information on the inhibition logic see
|
descriptor and all its duplicates are closed. For more information on the inhibition logic see
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
|
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
@ -644,7 +644,7 @@ node /org/freedesktop/login1 {
|
|||||||
that should be done shortly before shutdown/sleep, in conjunction with delay inhibitor locks. After
|
that should be done shortly before shutdown/sleep, in conjunction with delay inhibitor locks. After
|
||||||
completion of this work they should release their inhibition locks in order to not delay the operation
|
completion of this work they should release their inhibition locks in order to not delay the operation
|
||||||
any further. For more information see
|
any further. For more information see
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
|
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
|
|||||||
@ -1427,7 +1427,7 @@ node /org/freedesktop/systemd1 {
|
|||||||
<varname>properties</varname> contains properties of the unit, specified like in
|
<varname>properties</varname> contains properties of the unit, specified like in
|
||||||
<function>SetUnitProperties()</function>. <varname>aux</varname> is currently unused and should be
|
<function>SetUnitProperties()</function>. <varname>aux</varname> is currently unused and should be
|
||||||
passed as an empty array. See the
|
passed as an empty array. See the
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New Control Group
|
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New Control Group
|
||||||
Interface</ulink> for more information how to make use of this functionality for resource control
|
Interface</ulink> for more information how to make use of this functionality for resource control
|
||||||
purposes.</para>
|
purposes.</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|||||||
@ -141,7 +141,7 @@
|
|||||||
specification, informing the receiving side that the caller is prepared to wait for interactive
|
specification, informing the receiving side that the caller is prepared to wait for interactive
|
||||||
authorization, which might take a considerable time to complete. If this flag is set, the user
|
authorization, which might take a considerable time to complete. If this flag is set, the user
|
||||||
may be queried for passwords or confirmation via
|
may be queried for passwords or confirmation via
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/polkit">polkit</ulink> or a similar
|
<ulink url="https://www.freedesktop.org/wiki/Software/polkit">polkit</ulink> or a similar
|
||||||
framework.</para>
|
framework.</para>
|
||||||
|
|
||||||
<para><function>sd_bus_get_allow_interactive_authorization()</function> returns true if
|
<para><function>sd_bus_get_allow_interactive_authorization()</function> returns true if
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
<para>It is also possible to invoke <command>systemd-coredump</command> with
|
<para>It is also possible to invoke <command>systemd-coredump</command> with
|
||||||
<option>--backtrace</option> option. In this case, <command>systemd-coredump</command> expects a
|
<option>--backtrace</option> option. In this case, <command>systemd-coredump</command> expects a
|
||||||
journal entry in the journal
|
journal entry in the journal
|
||||||
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format</ulink>
|
<ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>
|
||||||
on standard input. The entry should contain a <varname>MESSAGE=</varname> field and any additional
|
on standard input. The entry should contain a <varname>MESSAGE=</varname> field and any additional
|
||||||
metadata fields the caller deems reasonable. <command>systemd-coredump</command> will append additional
|
metadata fields the caller deems reasonable. <command>systemd-coredump</command> will append additional
|
||||||
metadata fields in the same way it does for core dumps received from the kernel. In this mode, no core
|
metadata fields in the same way it does for core dumps received from the kernel. In this mode, no core
|
||||||
|
|||||||
@ -212,9 +212,8 @@
|
|||||||
<listitem><para>Entries are formatted as JSON data structures,
|
<listitem><para>Entries are formatted as JSON data structures,
|
||||||
one per line
|
one per line
|
||||||
(like <command>journalctl --output json</command>).
|
(like <command>journalctl --output json</command>).
|
||||||
See <ulink
|
See <ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format">Journal JSON Format</ulink>
|
||||||
url="https://www.freedesktop.org/wiki/Software/systemd/json">Journal
|
for more information.</para>
|
||||||
JSON Format</ulink> for more information.</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -233,13 +232,10 @@
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>application/vnd.fdo.journal</constant></term>
|
<term><constant>application/vnd.fdo.journal</constant></term>
|
||||||
|
|
||||||
<listitem><para>Entries are serialized into a binary (but
|
<listitem><para>Entries are serialized into a binary (but mostly text-based) stream suitable for
|
||||||
mostly text-based) stream suitable for backups and network
|
backups and network transfer (like <command>journalctl --output export</command>). See <ulink
|
||||||
transfer
|
url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>
|
||||||
(like <command>journalctl --output export</command>).
|
for more information.</para>
|
||||||
See <ulink
|
|
||||||
url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal
|
|
||||||
Export Format</ulink> for more information.</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
@ -303,10 +299,8 @@
|
|||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
<para>Retrieve events from this boot from local journal
|
<para>Retrieve events from this boot from local journal in
|
||||||
in <ulink
|
<ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>:
|
||||||
url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal
|
|
||||||
Export Format</ulink>:
|
|
||||||
<programlisting>curl --silent -H'Accept: application/vnd.fdo.journal' \
|
<programlisting>curl --silent -H'Accept: application/vnd.fdo.journal' \
|
||||||
'http://localhost:19531/entries?boot'</programlisting>
|
'http://localhost:19531/entries?boot'</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<para><command>systemd-journal-remote</command> is a command to receive serialized journal
|
<para><command>systemd-journal-remote</command> is a command to receive serialized journal
|
||||||
events and store them to journal files. Input streams are in the
|
events and store them to journal files. Input streams are in the
|
||||||
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format</ulink>,
|
<ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>,
|
||||||
i.e. like the output from <command>journalctl --output=export</command>. For transport over the
|
i.e. like the output from <command>journalctl --output=export</command>. For transport over the
|
||||||
network, this serialized stream is usually carried over an HTTPS connection.</para>
|
network, this serialized stream is usually carried over an HTTPS connection.</para>
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
used.</para></listitem>
|
used.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Providing <ulink
|
<listitem><para>Providing <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/polkit">polkit</ulink>-based
|
url="https://www.freedesktop.org/wiki/Software/polkit">polkit</ulink>-based
|
||||||
access for users for operations such as system shutdown or sleep</para>
|
access for users for operations such as system shutdown or sleep</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -92,7 +92,7 @@
|
|||||||
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers">Writing Display
|
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers">Writing Display
|
||||||
Managers</ulink>.
|
Managers</ulink>.
|
||||||
If you are interested in writing a desktop environment that makes use of logind, please have look at
|
If you are interested in writing a desktop environment that makes use of logind, please have look at
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/writing-desktop-environments">Writing
|
<ulink url="https://www.freedesktop.org/wiki/Software/systemd/writing-desktop-environments">Writing
|
||||||
Desktop Environments</ulink>.</para>
|
Desktop Environments</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|||||||
@ -515,11 +515,10 @@
|
|||||||
<title>Address Fields</title>
|
<title>Address Fields</title>
|
||||||
|
|
||||||
<para>During serialization into external formats, such as the
|
<para>During serialization into external formats, such as the
|
||||||
<ulink
|
<ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>
|
||||||
url="https://www.freedesktop.org/wiki/Software/systemd/export">Journal
|
or the
|
||||||
Export Format</ulink> or the <ulink
|
<ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format">Journal JSON Format</ulink>,
|
||||||
url="https://www.freedesktop.org/wiki/Software/systemd/json">Journal
|
the addresses of journal entries are
|
||||||
JSON Format</ulink>, the addresses of journal entries are
|
|
||||||
serialized into fields prefixed with double underscores. Note that
|
serialized into fields prefixed with double underscores. Note that
|
||||||
these are not proper fields when stored in the journal but for
|
these are not proper fields when stored in the journal but for
|
||||||
addressing metadata of entries. They cannot be written as part of
|
addressing metadata of entries. They cannot be written as part of
|
||||||
|
|||||||
@ -3588,7 +3588,8 @@ foreach tuple : tests
|
|||||||
parallel = tuple.length() > 7 ? tuple[7] : true
|
parallel = tuple.length() > 7 ? tuple[7] : true
|
||||||
timeout = 30
|
timeout = 30
|
||||||
|
|
||||||
name = sources[0].split('/')[-1].split('.')[0]
|
# FIXME: Use fs.stem() with meson >= 0.54.0
|
||||||
|
name = '@0@'.format(sources[0]).split('/')[-1].split('.')[0]
|
||||||
if type.startswith('timeout=')
|
if type.startswith('timeout=')
|
||||||
timeout = type.split('=')[1].to_int()
|
timeout = type.split('=')[1].to_int()
|
||||||
type = ''
|
type = ''
|
||||||
@ -3698,7 +3699,8 @@ foreach tuple : fuzzers
|
|||||||
sources += 'src/fuzz/fuzz-main.c'
|
sources += 'src/fuzz/fuzz-main.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
name = sources[0].split('/')[-1].split('.')[0]
|
# FIXME: Use fs.stem() with meson >= 0.54.0
|
||||||
|
name = '@0@'.format(sources[0]).split('/')[-1].split('.')[0]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
name,
|
name,
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-6rd-tunnel.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
# This network file matches 6rd-* SIT devices which is automatically created by
|
# This network file matches 6rd-* SIT devices which is automatically created by
|
||||||
# systemd-networkd when DHCPv4 6RD option is received.
|
# systemd-networkd when DHCPv4 6RD option is received.
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-container-host0.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
# This network file matches the container-side of the virtual Ethernet link
|
# This network file matches the container-side of the virtual Ethernet link
|
||||||
# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
|
# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-container-vb.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
# This network file matches the host-side of the virtual Ethernet link
|
# This network file matches the host-side of the virtual Ethernet link
|
||||||
# created by systemd-nspawn's --network-veth switch with --network-bridge or
|
# created by systemd-nspawn's --network-veth switch with --network-bridge or
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-container-ve.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
# This network file matches the host-side of the virtual Ethernet link
|
# This network file matches the host-side of the virtual Ethernet link
|
||||||
# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
|
# created by systemd-nspawn's --network-veth switch. See systemd-nspawn(1) for
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-container-vz.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
# This network file matches the bridge interface created by systemd-nspawn's
|
# This network file matches the bridge interface created by systemd-nspawn's
|
||||||
# --network-zone= switch. See systemd-nspawn(1) for details.
|
# --network-zone= switch. See systemd-nspawn(1) for details.
|
||||||
|
|||||||
17
network/80-ethernet.network.example
Normal file
17
network/80-ethernet.network.example
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
#
|
||||||
|
# This example config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
|
#
|
||||||
|
# To use the file, one of the following methods may be used:
|
||||||
|
# 1. add a symlink from /etc/systemd/network to the current location of this file,
|
||||||
|
# 2. copy the file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
|
# Enable DHCPv4 and DHCPv6 on all ethernet links
|
||||||
|
[Match]
|
||||||
|
Type=ether
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
DHCP=yes
|
||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-vm-vt.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
# This network file matches vt-* TUN/TAP devices and applies a similar
|
# This network file matches vt-* TUN/TAP devices and applies a similar
|
||||||
# configuration as ve-* to provide NAT/DHCP to VMs.
|
# configuration as ve-* to provide NAT/DHCP to VMs.
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/80-wifi-adhoc.network.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Type=wlan
|
Type=wlan
|
||||||
|
|||||||
@ -1,3 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
#
|
||||||
|
# This example config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
|
#
|
||||||
|
# To use the file, one of the following methods may be used:
|
||||||
|
# 1. add a symlink from /etc/systemd/network to the current location of this file,
|
||||||
|
# 2. copy the file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Type=wlan
|
Type=wlan
|
||||||
WLANInterfaceType=ap
|
WLANInterfaceType=ap
|
||||||
|
|||||||
@ -1,3 +1,14 @@
|
|||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
#
|
||||||
|
# This example config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
|
#
|
||||||
|
# To use the file, one of the following methods may be used:
|
||||||
|
# 1. add a symlink from /etc/systemd/network to the current location of this file,
|
||||||
|
# 2. copy the file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-networkd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
Type=wlan
|
Type=wlan
|
||||||
WLANInterfaceType=station
|
WLANInterfaceType=station
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
#
|
#
|
||||||
# This file is part of systemd.
|
# This config file is installed as part of systemd.
|
||||||
|
# It may be freely copied and edited (following the Creative Commons Zero v1.0 Universal License).
|
||||||
#
|
#
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
# To make local modifications, one of the following methods may be used:
|
||||||
# under the terms of the GNU Lesser General Public License as published by
|
# 1. add a drop-in file that extends this file by creating the
|
||||||
# the Free Software Foundation; either version 2.1 of the License, or
|
# /etc/systemd/network/99-default.link.d/ directory and creating a
|
||||||
# (at your option) any later version.
|
# new .conf file there.
|
||||||
|
# 2. copy this file into /etc/systemd/network or one of the other paths checked
|
||||||
|
# by systemd-udevd and edit it there.
|
||||||
|
# This file should not be edited in place, because it'll be overwritten on upgrades.
|
||||||
|
|
||||||
[Match]
|
[Match]
|
||||||
OriginalName=*
|
OriginalName=*
|
||||||
|
|||||||
@ -5,6 +5,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
|||||||
'80-container-host0.network',
|
'80-container-host0.network',
|
||||||
'80-container-ve.network',
|
'80-container-ve.network',
|
||||||
'80-container-vz.network',
|
'80-container-vz.network',
|
||||||
|
'80-ethernet.network.example',
|
||||||
'80-vm-vt.network',
|
'80-vm-vt.network',
|
||||||
'80-wifi-adhoc.network',
|
'80-wifi-adhoc.network',
|
||||||
'80-wifi-ap.network.example',
|
'80-wifi-ap.network.example',
|
||||||
|
|||||||
@ -13,9 +13,9 @@ systemd_analyze_sources = files('''
|
|||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/analyze/test-verify.c',
|
[files('test-verify.c',
|
||||||
'src/analyze/analyze-verify.c',
|
'analyze-verify.c',
|
||||||
'src/analyze/analyze-verify.h'],
|
'analyze-verify.h'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
|
|||||||
@ -127,6 +127,20 @@ static inline bool CGROUP_CPU_SHARES_IS_OK(uint64_t x) {
|
|||||||
(x >= CGROUP_CPU_SHARES_MIN && x <= CGROUP_CPU_SHARES_MAX);
|
(x >= CGROUP_CPU_SHARES_MIN && x <= CGROUP_CPU_SHARES_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Special values for the special {blkio,io}.bfq.weight attribute */
|
||||||
|
#define CGROUP_BFQ_WEIGHT_INVALID UINT64_MAX
|
||||||
|
#define CGROUP_BFQ_WEIGHT_MIN UINT64_C(1)
|
||||||
|
#define CGROUP_BFQ_WEIGHT_MAX UINT64_C(1000)
|
||||||
|
#define CGROUP_BFQ_WEIGHT_DEFAULT UINT64_C(100)
|
||||||
|
|
||||||
|
/* Convert the normal io.weight value to io.bfq.weight */
|
||||||
|
static inline uint64_t BFQ_WEIGHT(uint64_t io_weight) {
|
||||||
|
return
|
||||||
|
io_weight <= CGROUP_WEIGHT_DEFAULT ?
|
||||||
|
CGROUP_BFQ_WEIGHT_DEFAULT - (CGROUP_WEIGHT_DEFAULT - io_weight) * (CGROUP_BFQ_WEIGHT_DEFAULT - CGROUP_BFQ_WEIGHT_MIN) / (CGROUP_WEIGHT_DEFAULT - CGROUP_WEIGHT_MIN) :
|
||||||
|
CGROUP_BFQ_WEIGHT_DEFAULT + (io_weight - CGROUP_WEIGHT_DEFAULT) * (CGROUP_BFQ_WEIGHT_MAX - CGROUP_BFQ_WEIGHT_DEFAULT) / (CGROUP_WEIGHT_MAX - CGROUP_WEIGHT_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
/* Special values for the blkio.weight attribute */
|
/* Special values for the blkio.weight attribute */
|
||||||
#define CGROUP_BLKIO_WEIGHT_INVALID UINT64_MAX
|
#define CGROUP_BLKIO_WEIGHT_INVALID UINT64_MAX
|
||||||
#define CGROUP_BLKIO_WEIGHT_MIN UINT64_C(10)
|
#define CGROUP_BLKIO_WEIGHT_MIN UINT64_C(10)
|
||||||
|
|||||||
@ -384,7 +384,7 @@ filesystem_includes = ['linux/magic.h',
|
|||||||
'linux/gfs2_ondisk.h']
|
'linux/gfs2_ondisk.h']
|
||||||
|
|
||||||
check_filesystems = find_program('check-filesystems.sh')
|
check_filesystems = find_program('check-filesystems.sh')
|
||||||
r = run_command([check_filesystems, cpp, 'filesystems-gperf.gperf'] + filesystem_includes)
|
r = run_command([check_filesystems, cpp, 'filesystems-gperf.gperf'] + filesystem_includes, check: false)
|
||||||
if r.returncode() != 0
|
if r.returncode() != 0
|
||||||
error('found unknown filesystem(s) defined in kernel headers:\n\n' + r.stdout())
|
error('found unknown filesystem(s) defined in kernel headers:\n\n' + r.stdout())
|
||||||
r.stdout()
|
r.stdout()
|
||||||
|
|||||||
@ -85,6 +85,7 @@ typedef struct {
|
|||||||
BOOLEAN editor;
|
BOOLEAN editor;
|
||||||
BOOLEAN auto_entries;
|
BOOLEAN auto_entries;
|
||||||
BOOLEAN auto_firmware;
|
BOOLEAN auto_firmware;
|
||||||
|
BOOLEAN reboot_for_bitlocker;
|
||||||
BOOLEAN force_menu;
|
BOOLEAN force_menu;
|
||||||
BOOLEAN use_saved_entry;
|
BOOLEAN use_saved_entry;
|
||||||
BOOLEAN use_saved_entry_efivar;
|
BOOLEAN use_saved_entry_efivar;
|
||||||
@ -461,6 +462,7 @@ static void print_status(Config *config, CHAR16 *loaded_image_path) {
|
|||||||
Print(L" OS indications: %lu\n", get_os_indications_supported());
|
Print(L" OS indications: %lu\n", get_os_indications_supported());
|
||||||
Print(L" secure boot: %s (%s)\n", yes_no(IN_SET(secure, SECURE_BOOT_USER, SECURE_BOOT_DEPLOYED)), secure_boot_mode_to_string(secure));
|
Print(L" secure boot: %s (%s)\n", yes_no(IN_SET(secure, SECURE_BOOT_USER, SECURE_BOOT_DEPLOYED)), secure_boot_mode_to_string(secure));
|
||||||
ps_bool(L" shim: %s\n", shim_loaded());
|
ps_bool(L" shim: %s\n", shim_loaded());
|
||||||
|
ps_bool(L" TPM: %s\n", tpm_present());
|
||||||
Print(L" console mode: %d/%d (%lu x %lu)\n", ST->ConOut->Mode->Mode, ST->ConOut->Mode->MaxMode - 1LL, x_max, y_max);
|
Print(L" console mode: %d/%d (%lu x %lu)\n", ST->ConOut->Mode->Mode, ST->ConOut->Mode->MaxMode - 1LL, x_max, y_max);
|
||||||
|
|
||||||
Print(L"\n--- Press any key to continue. ---\n\n");
|
Print(L"\n--- Press any key to continue. ---\n\n");
|
||||||
@ -495,6 +497,7 @@ static void print_status(Config *config, CHAR16 *loaded_image_path) {
|
|||||||
ps_bool(L" editor: %s\n", config->editor);
|
ps_bool(L" editor: %s\n", config->editor);
|
||||||
ps_bool(L" auto-entries: %s\n", config->auto_entries);
|
ps_bool(L" auto-entries: %s\n", config->auto_entries);
|
||||||
ps_bool(L" auto-firmware: %s\n", config->auto_firmware);
|
ps_bool(L" auto-firmware: %s\n", config->auto_firmware);
|
||||||
|
ps_bool(L" reboot-for-bitlocker: %s\n", config->reboot_for_bitlocker);
|
||||||
ps_string(L" random-seed-mode: %s\n", random_seed_modes_table[config->random_seed_mode]);
|
ps_string(L" random-seed-mode: %s\n", random_seed_modes_table[config->random_seed_mode]);
|
||||||
|
|
||||||
switch (config->console_mode) {
|
switch (config->console_mode) {
|
||||||
@ -1141,6 +1144,13 @@ static void config_defaults_load_from_file(Config *config, CHAR8 *content) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmpa((CHAR8 *)"reboot-for-bitlocker", key) == 0) {
|
||||||
|
err = parse_boolean(value, &config->reboot_for_bitlocker);
|
||||||
|
if (EFI_ERROR(err))
|
||||||
|
log_error_stall(L"Error parsing 'reboot-for-bitlocker' config option: %a", value);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmpa((CHAR8 *)"console-mode", key) == 0) {
|
if (strcmpa((CHAR8 *)"console-mode", key) == 0) {
|
||||||
if (strcmpa((CHAR8 *)"auto", value) == 0)
|
if (strcmpa((CHAR8 *)"auto", value) == 0)
|
||||||
config->console_mode = CONSOLE_MODE_AUTO;
|
config->console_mode = CONSOLE_MODE_AUTO;
|
||||||
@ -1510,6 +1520,7 @@ static void config_load_defaults(Config *config, EFI_FILE *root_dir) {
|
|||||||
.editor = TRUE,
|
.editor = TRUE,
|
||||||
.auto_entries = TRUE,
|
.auto_entries = TRUE,
|
||||||
.auto_firmware = TRUE,
|
.auto_firmware = TRUE,
|
||||||
|
.reboot_for_bitlocker = TRUE,
|
||||||
.random_seed_mode = RANDOM_SEED_WITH_SYSTEM_TOKEN,
|
.random_seed_mode = RANDOM_SEED_WITH_SYSTEM_TOKEN,
|
||||||
.idx_default_efivar = IDX_INVALID,
|
.idx_default_efivar = IDX_INVALID,
|
||||||
.console_mode = CONSOLE_MODE_KEEP,
|
.console_mode = CONSOLE_MODE_KEEP,
|
||||||
@ -1867,7 +1878,7 @@ static BOOLEAN is_sd_boot(EFI_FILE *root_dir, const CHAR16 *loader_path) {
|
|||||||
return CompareMem(content, magic, sizeof(magic)) == 0;
|
return CompareMem(content, magic, sizeof(magic)) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN config_entry_add_loader_auto(
|
static ConfigEntry *config_entry_add_loader_auto(
|
||||||
Config *config,
|
Config *config,
|
||||||
EFI_HANDLE *device,
|
EFI_HANDLE *device,
|
||||||
EFI_FILE *root_dir,
|
EFI_FILE *root_dir,
|
||||||
@ -1878,7 +1889,6 @@ static BOOLEAN config_entry_add_loader_auto(
|
|||||||
const CHAR16 *loader) {
|
const CHAR16 *loader) {
|
||||||
|
|
||||||
EFI_FILE_HANDLE handle;
|
EFI_FILE_HANDLE handle;
|
||||||
ConfigEntry *entry;
|
|
||||||
EFI_STATUS err;
|
EFI_STATUS err;
|
||||||
|
|
||||||
assert(config);
|
assert(config);
|
||||||
@ -1889,7 +1899,7 @@ static BOOLEAN config_entry_add_loader_auto(
|
|||||||
assert(loader || loaded_image_path);
|
assert(loader || loaded_image_path);
|
||||||
|
|
||||||
if (!config->auto_entries)
|
if (!config->auto_entries)
|
||||||
return FALSE;
|
return NULL;
|
||||||
|
|
||||||
if (loaded_image_path) {
|
if (loaded_image_path) {
|
||||||
loader = L"\\EFI\\BOOT\\BOOT" EFI_MACHINE_TYPE_NAME ".efi";
|
loader = L"\\EFI\\BOOT\\BOOT" EFI_MACHINE_TYPE_NAME ".efi";
|
||||||
@ -1902,20 +1912,16 @@ static BOOLEAN config_entry_add_loader_auto(
|
|||||||
if (StriCmp(loader, loaded_image_path) == 0 ||
|
if (StriCmp(loader, loaded_image_path) == 0 ||
|
||||||
is_sd_boot(root_dir, loader) ||
|
is_sd_boot(root_dir, loader) ||
|
||||||
is_sd_boot(root_dir, L"\\EFI\\BOOT\\GRUB" EFI_MACHINE_TYPE_NAME L".EFI"))
|
is_sd_boot(root_dir, L"\\EFI\\BOOT\\GRUB" EFI_MACHINE_TYPE_NAME L".EFI"))
|
||||||
return FALSE;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check existence */
|
/* check existence */
|
||||||
err = root_dir->Open(root_dir, &handle, (CHAR16*) loader, EFI_FILE_MODE_READ, 0ULL);
|
err = root_dir->Open(root_dir, &handle, (CHAR16*) loader, EFI_FILE_MODE_READ, 0ULL);
|
||||||
if (EFI_ERROR(err))
|
if (EFI_ERROR(err))
|
||||||
return FALSE;
|
return NULL;
|
||||||
handle->Close(handle);
|
handle->Close(handle);
|
||||||
|
|
||||||
entry = config_entry_add_loader(config, device, LOADER_AUTO, id, key, title, loader, NULL);
|
return config_entry_add_loader(config, device, LOADER_AUTO, id, key, title, loader, NULL);
|
||||||
if (!entry)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void config_entry_add_osx(Config *config) {
|
static void config_entry_add_osx(Config *config) {
|
||||||
@ -1950,6 +1956,83 @@ static void config_entry_add_osx(Config *config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static EFI_STATUS boot_windows_bitlocker(void) {
|
||||||
|
_cleanup_freepool_ EFI_HANDLE *handles = NULL;
|
||||||
|
UINTN n_handles;
|
||||||
|
EFI_STATUS err;
|
||||||
|
|
||||||
|
/* BitLocker key cannot be sealed without a TPM present. */
|
||||||
|
if (!tpm_present())
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
|
||||||
|
err = BS->LocateHandleBuffer(ByProtocol, &BlockIoProtocol, NULL, &n_handles, &handles);
|
||||||
|
if (EFI_ERROR(err))
|
||||||
|
return err;
|
||||||
|
|
||||||
|
/* Look for BitLocker magic string on all block drives. */
|
||||||
|
BOOLEAN found = FALSE;
|
||||||
|
for (UINTN i = 0; i < n_handles; i++) {
|
||||||
|
EFI_BLOCK_IO *block_io;
|
||||||
|
err = BS->HandleProtocol(handles[i], &BlockIoProtocol, (void **) &block_io);
|
||||||
|
if (EFI_ERROR(err) || block_io->Media->BlockSize < 512)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CHAR8 buf[block_io->Media->BlockSize];
|
||||||
|
block_io->ReadBlocks(block_io, block_io->Media->MediaId, 0, sizeof(buf), buf);
|
||||||
|
if (EFI_ERROR(err))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (CompareMem(buf + 3, "-FVE-FS-", STRLEN("-FVE-FS-")) == 0) {
|
||||||
|
found = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If no BitLocker drive was found, we can just chainload bootmgfw.efi directly. */
|
||||||
|
if (!found)
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
|
||||||
|
_cleanup_freepool_ UINT16 *boot_order = NULL;
|
||||||
|
UINTN boot_order_size;
|
||||||
|
|
||||||
|
/* There can be gaps in Boot#### entries. Instead of iterating over the full
|
||||||
|
* EFI var list or UINT16 namespace, just look for "Windows Boot Manager" in BootOrder. */
|
||||||
|
err = efivar_get_raw(EFI_GLOBAL_GUID, L"BootOrder", (CHAR8 **) &boot_order, &boot_order_size);
|
||||||
|
if (EFI_ERROR(err) || boot_order_size % sizeof(UINT16) != 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
for (UINTN i = 0; i < boot_order_size / sizeof(UINT16); i++) {
|
||||||
|
_cleanup_freepool_ CHAR8 *buf = NULL;
|
||||||
|
CHAR16 name[sizeof(L"Boot0000")];
|
||||||
|
UINTN buf_size;
|
||||||
|
|
||||||
|
SPrint(name, sizeof(name), L"Boot%04x", boot_order[i]);
|
||||||
|
err = efivar_get_raw(EFI_GLOBAL_GUID, name, &buf, &buf_size);
|
||||||
|
if (EFI_ERROR(err))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Boot#### are EFI_LOAD_OPTION. But we really are only interested
|
||||||
|
* for the description, which is at this offset. */
|
||||||
|
UINTN offset = sizeof(UINT32) + sizeof(UINT16);
|
||||||
|
if (buf_size < offset + sizeof(CHAR16))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (streq((CHAR16 *) (buf + offset), L"Windows Boot Manager")) {
|
||||||
|
err = efivar_set_raw(
|
||||||
|
EFI_GLOBAL_GUID,
|
||||||
|
L"BootNext",
|
||||||
|
boot_order + i,
|
||||||
|
sizeof(boot_order[i]),
|
||||||
|
EFI_VARIABLE_NON_VOLATILE);
|
||||||
|
if (EFI_ERROR(err))
|
||||||
|
return err;
|
||||||
|
return RT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
static void config_entry_add_windows(Config *config, EFI_HANDLE *device, EFI_FILE *root_dir) {
|
static void config_entry_add_windows(Config *config, EFI_HANDLE *device, EFI_FILE *root_dir) {
|
||||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
|
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
|
||||||
_cleanup_freepool_ CHAR8 *bcd = NULL;
|
_cleanup_freepool_ CHAR8 *bcd = NULL;
|
||||||
@ -1969,9 +2052,12 @@ static void config_entry_add_windows(Config *config, EFI_HANDLE *device, EFI_FIL
|
|||||||
if (!EFI_ERROR(err))
|
if (!EFI_ERROR(err))
|
||||||
title = get_bcd_title((UINT8 *) bcd, len);
|
title = get_bcd_title((UINT8 *) bcd, len);
|
||||||
|
|
||||||
config_entry_add_loader_auto(config, device, root_dir, NULL,
|
ConfigEntry *e = config_entry_add_loader_auto(config, device, root_dir, NULL,
|
||||||
L"auto-windows", 'w', title ?: L"Windows Boot Manager",
|
L"auto-windows", 'w', title ?: L"Windows Boot Manager",
|
||||||
L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi");
|
L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi");
|
||||||
|
|
||||||
|
if (config->reboot_for_bitlocker)
|
||||||
|
e->call = boot_windows_bitlocker;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2168,6 +2254,10 @@ static EFI_STATUS image_start(
|
|||||||
assert(config);
|
assert(config);
|
||||||
assert(entry);
|
assert(entry);
|
||||||
|
|
||||||
|
/* If this loader entry has a special way to boot, try that first. */
|
||||||
|
if (entry->call)
|
||||||
|
(void) entry->call();
|
||||||
|
|
||||||
path = FileDevicePath(entry->device, entry->loader);
|
path = FileDevicePath(entry->device, entry->loader);
|
||||||
if (!path)
|
if (!path)
|
||||||
return log_error_status_stall(EFI_INVALID_PARAMETER, L"Error getting device path.");
|
return log_error_status_stall(EFI_INVALID_PARAMETER, L"Error getting device path.");
|
||||||
@ -2251,7 +2341,7 @@ static void config_write_entries_to_variable(Config *config) {
|
|||||||
static void save_selected_entry(const Config *config, const ConfigEntry *entry) {
|
static void save_selected_entry(const Config *config, const ConfigEntry *entry) {
|
||||||
assert(config);
|
assert(config);
|
||||||
assert(entry);
|
assert(entry);
|
||||||
assert(!entry->call);
|
assert(entry->loader || !entry->call);
|
||||||
|
|
||||||
/* Always export the selected boot entry to the system in a volatile var. */
|
/* Always export the selected boot entry to the system in a volatile var. */
|
||||||
(void) efivar_set(LOADER_GUID, L"LoaderEntrySelected", entry->id, 0);
|
(void) efivar_set(LOADER_GUID, L"LoaderEntrySelected", entry->id, 0);
|
||||||
@ -2441,8 +2531,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* run special entry like "reboot" */
|
/* Run special entry like "reboot" now. Those that have a loader
|
||||||
if (entry->call) {
|
* will be handled by image_start() instead. */
|
||||||
|
if (entry->call && !entry->loader) {
|
||||||
entry->call();
|
entry->call();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,6 +135,10 @@ static EFI_TCG2 * tcg2_interface_check(void) {
|
|||||||
return tcg;
|
return tcg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOLEAN tpm_present(void) {
|
||||||
|
return tcg2_interface_check() || tcg1_interface_check();
|
||||||
|
}
|
||||||
|
|
||||||
EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description) {
|
EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description) {
|
||||||
EFI_TCG *tpm1;
|
EFI_TCG *tpm1;
|
||||||
EFI_TCG2 *tpm2;
|
EFI_TCG2 *tpm2;
|
||||||
|
|||||||
@ -5,11 +5,15 @@
|
|||||||
|
|
||||||
#if ENABLE_TPM
|
#if ENABLE_TPM
|
||||||
|
|
||||||
|
BOOLEAN tpm_present(void);
|
||||||
EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description);
|
EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description);
|
||||||
EFI_STATUS tpm_log_load_options(const CHAR16 *cmdline);
|
EFI_STATUS tpm_log_load_options(const CHAR16 *cmdline);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
static inline BOOLEAN tpm_present(void) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
static inline EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description) {
|
static inline EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,8 +57,11 @@ endif
|
|||||||
efi_libdir = ''
|
efi_libdir = ''
|
||||||
foreach dir : [get_option('efi-libdir'),
|
foreach dir : [get_option('efi-libdir'),
|
||||||
'/usr/lib/gnuefi' / efi_arch[0],
|
'/usr/lib/gnuefi' / efi_arch[0],
|
||||||
run_command('realpath', '-e',
|
run_command(
|
||||||
'/usr/lib' / run_command(cc.cmd_array(), '-print-multi-os-directory').stdout().strip()).stdout().strip()]
|
'realpath', '-e',
|
||||||
|
'/usr/lib' / run_command(cc.cmd_array(), '-print-multi-os-directory', check: false).stdout().strip(),
|
||||||
|
check: false
|
||||||
|
).stdout().strip()]
|
||||||
if dir != '' and fs.is_dir(dir)
|
if dir != '' and fs.is_dir(dir)
|
||||||
efi_libdir = dir
|
efi_libdir = dir
|
||||||
break
|
break
|
||||||
@ -125,7 +128,7 @@ elif get_option('sbat-distro') != ''
|
|||||||
value = get_option(sbatvar[0])
|
value = get_option(sbatvar[0])
|
||||||
if (value == '' or value == 'auto') and not meson.is_cross_build()
|
if (value == '' or value == 'auto') and not meson.is_cross_build()
|
||||||
cmd = 'if [ -e /etc/os-release ]; then . /etc/os-release; else . /usr/lib/os-release; fi; echo $@0@'.format(sbatvar[1])
|
cmd = 'if [ -e /etc/os-release ]; then . /etc/os-release; else . /usr/lib/os-release; fi; echo $@0@'.format(sbatvar[1])
|
||||||
value = run_command(sh, '-c', cmd).stdout().strip()
|
value = run_command(sh, '-c', cmd, check: true).stdout().strip()
|
||||||
endif
|
endif
|
||||||
if value == ''
|
if value == ''
|
||||||
error('Required @0@ option not set and autodetection failed'.format(sbatvar[0]))
|
error('Required @0@ option not set and autodetection failed'.format(sbatvar[0]))
|
||||||
@ -254,7 +257,7 @@ if efi_arch[1] == 'arm'
|
|||||||
efi_ldflags += ['-Wl,--no-warn-mismatch']
|
efi_ldflags += ['-Wl,--no-warn-mismatch']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if run_command('grep', '-q', '__CTOR_LIST__', efi_lds).returncode() == 0
|
if run_command('grep', '-q', '__CTOR_LIST__', efi_lds, check: false).returncode() == 0
|
||||||
# fedora has a patched gnu-efi that adds support for ELF constructors.
|
# fedora has a patched gnu-efi that adds support for ELF constructors.
|
||||||
# If ld is called by gcc something about these symbols breaks, resulting
|
# If ld is called by gcc something about these symbols breaks, resulting
|
||||||
# in sd-boot freezing when gnu-efi runs the constructors. Force defining
|
# in sd-boot freezing when gnu-efi runs the constructors. Force defining
|
||||||
@ -352,14 +355,14 @@ endif
|
|||||||
if efi_arch[1] in ['ia32', 'x86_64', 'arm', 'aarch64']
|
if efi_arch[1] in ['ia32', 'x86_64', 'arm', 'aarch64']
|
||||||
systemd_boot_sources += files('bcd.c')
|
systemd_boot_sources += files('bcd.c')
|
||||||
tests += [
|
tests += [
|
||||||
[['src/boot/efi/test-bcd.c'],
|
[files('test-bcd.c'),
|
||||||
[],
|
[],
|
||||||
[libzstd],
|
[libzstd],
|
||||||
[],
|
[],
|
||||||
'HAVE_ZSTD'],
|
'HAVE_ZSTD'],
|
||||||
]
|
]
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/boot/efi/fuzz-bcd.c']],
|
[files('fuzz-bcd.c')],
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ busctl_sources = files(
|
|||||||
'busctl.c')
|
'busctl.c')
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/busctl/test-busctl-introspect.c',
|
[files('test-busctl-introspect.c',
|
||||||
'src/busctl/busctl-introspect.c',
|
'busctl-introspect.c',
|
||||||
'src/busctl/busctl-introspect.h']],
|
'busctl-introspect.h')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -45,12 +45,6 @@
|
|||||||
|
|
||||||
#define CGROUP_CPU_QUOTA_DEFAULT_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
|
#define CGROUP_CPU_QUOTA_DEFAULT_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
|
||||||
|
|
||||||
/* Special values for the bfq.weight attribute */
|
|
||||||
#define CGROUP_BFQ_WEIGHT_INVALID UINT64_MAX
|
|
||||||
#define CGROUP_BFQ_WEIGHT_MIN UINT64_C(1)
|
|
||||||
#define CGROUP_BFQ_WEIGHT_MAX UINT64_C(1000)
|
|
||||||
#define CGROUP_BFQ_WEIGHT_DEFAULT UINT64_C(100)
|
|
||||||
|
|
||||||
/* Returns the log level to use when cgroup attribute writes fail. When an attribute is missing or we have access
|
/* Returns the log level to use when cgroup attribute writes fail. When an attribute is missing or we have access
|
||||||
* problems we downgrade to LOG_DEBUG. This is supposed to be nice to container managers and kernels which want to mask
|
* problems we downgrade to LOG_DEBUG. This is supposed to be nice to container managers and kernels which want to mask
|
||||||
* out specific attributes from us. */
|
* out specific attributes from us. */
|
||||||
@ -1053,6 +1047,26 @@ static uint64_t cgroup_weight_io_to_blkio(uint64_t io_weight) {
|
|||||||
CGROUP_BLKIO_WEIGHT_MIN, CGROUP_BLKIO_WEIGHT_MAX);
|
CGROUP_BLKIO_WEIGHT_MIN, CGROUP_BLKIO_WEIGHT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_bfq_weight(Unit *u, const char *controller, uint64_t io_weight) {
|
||||||
|
char buf[DECIMAL_STR_MAX(uint64_t)+STRLEN("\n")];
|
||||||
|
const char *p;
|
||||||
|
uint64_t bfq_weight;
|
||||||
|
|
||||||
|
/* FIXME: drop this function when distro kernels properly support BFQ through "io.weight"
|
||||||
|
* See also: https://github.com/systemd/systemd/pull/13335 and
|
||||||
|
* https://github.com/torvalds/linux/commit/65752aef0a407e1ef17ec78a7fc31ba4e0b360f9. */
|
||||||
|
p = strjoina(controller, ".bfq.weight");
|
||||||
|
/* Adjust to kernel range is 1..1000, the default is 100. */
|
||||||
|
bfq_weight = BFQ_WEIGHT(io_weight);
|
||||||
|
|
||||||
|
xsprintf(buf, "%" PRIu64 "\n", bfq_weight);
|
||||||
|
|
||||||
|
if (set_attribute_and_warn(u, controller, p, buf) >= 0 && io_weight != bfq_weight)
|
||||||
|
log_unit_debug(u, "%sIOWeight=%" PRIu64 " scaled to %s=%" PRIu64,
|
||||||
|
streq(controller, "blkio") ? "Block" : "",
|
||||||
|
io_weight, p, bfq_weight);
|
||||||
|
}
|
||||||
|
|
||||||
static void cgroup_apply_io_device_weight(Unit *u, const char *dev_path, uint64_t io_weight) {
|
static void cgroup_apply_io_device_weight(Unit *u, const char *dev_path, uint64_t io_weight) {
|
||||||
char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1];
|
char buf[DECIMAL_STR_MAX(dev_t)*2+2+DECIMAL_STR_MAX(uint64_t)+1];
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
@ -1264,30 +1278,12 @@ static int cgroup_apply_devices(Unit *u) {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert the normal io.weight value to io.bfq.weight */
|
|
||||||
#define BFQ_WEIGHT(weight) \
|
|
||||||
(weight <= CGROUP_WEIGHT_DEFAULT ? \
|
|
||||||
CGROUP_BFQ_WEIGHT_DEFAULT - (CGROUP_WEIGHT_DEFAULT - weight) * (CGROUP_BFQ_WEIGHT_DEFAULT - CGROUP_BFQ_WEIGHT_MIN) / (CGROUP_WEIGHT_DEFAULT - CGROUP_WEIGHT_MIN) : \
|
|
||||||
CGROUP_BFQ_WEIGHT_DEFAULT + (weight - CGROUP_WEIGHT_DEFAULT) * (CGROUP_BFQ_WEIGHT_MAX - CGROUP_BFQ_WEIGHT_DEFAULT) / (CGROUP_WEIGHT_MAX - CGROUP_WEIGHT_DEFAULT))
|
|
||||||
|
|
||||||
assert_cc(BFQ_WEIGHT(1) == 1);
|
|
||||||
assert_cc(BFQ_WEIGHT(50) == 50);
|
|
||||||
assert_cc(BFQ_WEIGHT(100) == 100);
|
|
||||||
assert_cc(BFQ_WEIGHT(500) == 136);
|
|
||||||
assert_cc(BFQ_WEIGHT(5000) == 545);
|
|
||||||
assert_cc(BFQ_WEIGHT(10000) == 1000);
|
|
||||||
|
|
||||||
static void set_io_weight(Unit *u, uint64_t weight) {
|
static void set_io_weight(Unit *u, uint64_t weight) {
|
||||||
char buf[STRLEN("default \n")+DECIMAL_STR_MAX(uint64_t)];
|
char buf[STRLEN("default \n")+DECIMAL_STR_MAX(uint64_t)];
|
||||||
|
|
||||||
assert(u);
|
assert(u);
|
||||||
|
|
||||||
/* FIXME: drop this when distro kernels properly support BFQ through "io.weight"
|
set_bfq_weight(u, "io", weight);
|
||||||
* See also: https://github.com/systemd/systemd/pull/13335 and
|
|
||||||
* https://github.com/torvalds/linux/commit/65752aef0a407e1ef17ec78a7fc31ba4e0b360f9.
|
|
||||||
* The range is 1..1000 apparently, and the default is 100. */
|
|
||||||
xsprintf(buf, "%" PRIu64 "\n", BFQ_WEIGHT(weight));
|
|
||||||
(void) set_attribute_and_warn(u, "io", "io.bfq.weight", buf);
|
|
||||||
|
|
||||||
xsprintf(buf, "default %" PRIu64 "\n", weight);
|
xsprintf(buf, "default %" PRIu64 "\n", weight);
|
||||||
(void) set_attribute_and_warn(u, "io", "io.weight", buf);
|
(void) set_attribute_and_warn(u, "io", "io.weight", buf);
|
||||||
@ -1298,9 +1294,7 @@ static void set_blkio_weight(Unit *u, uint64_t weight) {
|
|||||||
|
|
||||||
assert(u);
|
assert(u);
|
||||||
|
|
||||||
/* FIXME: see comment in set_io_weight(). */
|
set_bfq_weight(u, "blkio", weight);
|
||||||
xsprintf(buf, "%" PRIu64 "\n", BFQ_WEIGHT(weight));
|
|
||||||
(void) set_attribute_and_warn(u, "blkio", "blkio.bfq.weight", buf);
|
|
||||||
|
|
||||||
xsprintf(buf, "%" PRIu64 "\n", weight);
|
xsprintf(buf, "%" PRIu64 "\n", weight);
|
||||||
(void) set_attribute_and_warn(u, "blkio", "blkio.weight", buf);
|
(void) set_attribute_and_warn(u, "blkio", "blkio.weight", buf);
|
||||||
|
|||||||
@ -314,7 +314,8 @@ static int property_set_watchdog(Manager *m, WatchdogType type, sd_bus_message *
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
return manager_override_watchdog(m, type, timeout);
|
manager_override_watchdog(m, type, timeout);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int property_set_runtime_watchdog(
|
static int property_set_runtime_watchdog(
|
||||||
|
|||||||
@ -3239,15 +3239,15 @@ void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
|
|||||||
m->watchdog[t] = timeout;
|
m->watchdog[t] = timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
|
void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
|
||||||
|
|
||||||
assert(m);
|
assert(m);
|
||||||
|
|
||||||
if (MANAGER_IS_USER(m))
|
if (MANAGER_IS_USER(m))
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
if (m->watchdog_overridden[t] == timeout)
|
if (m->watchdog_overridden[t] == timeout)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
if (t == WATCHDOG_RUNTIME) {
|
if (t == WATCHDOG_RUNTIME) {
|
||||||
usec_t usec = timestamp_is_set(timeout) ? timeout : m->watchdog[t];
|
usec_t usec = timestamp_is_set(timeout) ? timeout : m->watchdog[t];
|
||||||
@ -3256,7 +3256,6 @@ int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
m->watchdog_overridden[t] = timeout;
|
m->watchdog_overridden[t] = timeout;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int manager_reload(Manager *m) {
|
int manager_reload(Manager *m) {
|
||||||
|
|||||||
@ -573,7 +573,7 @@ ManagerTimestamp manager_timestamp_initrd_mangle(ManagerTimestamp s);
|
|||||||
|
|
||||||
usec_t manager_get_watchdog(Manager *m, WatchdogType t);
|
usec_t manager_get_watchdog(Manager *m, WatchdogType t);
|
||||||
void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout);
|
void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout);
|
||||||
int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout);
|
void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout);
|
||||||
|
|
||||||
const char* oom_policy_to_string(OOMPolicy i) _const_;
|
const char* oom_policy_to_string(OOMPolicy i) _const_;
|
||||||
OOMPolicy oom_policy_from_string(const char *s) _pure_;
|
OOMPolicy oom_policy_from_string(const char *s) _pure_;
|
||||||
|
|||||||
@ -236,7 +236,7 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/core/fuzz-unit-file.c'],
|
[files('fuzz-unit-file.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[libmount]],
|
[libmount]],
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.systemd1.reply-password">
|
<action id="org.freedesktop.systemd1.reply-password">
|
||||||
<description gettext-domain="systemd">Send passphrase back to system</description>
|
<description gettext-domain="systemd">Send passphrase back to system</description>
|
||||||
|
|||||||
@ -14,8 +14,8 @@ if conf.get('ENABLE_COREDUMP') == 1 and install_sysconfdir_samples
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/coredump/test-coredump-vacuum.c',
|
[files('test-coredump-vacuum.c',
|
||||||
'src/coredump/coredump-vacuum.c',
|
'coredump-vacuum.c',
|
||||||
'src/coredump/coredump-vacuum.h'],
|
'coredump-vacuum.h'),
|
||||||
[], [], [], '', 'manual'],
|
[], [], [], '', 'manual'],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,23 +1,23 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/fuzz/fuzz-catalog.c']],
|
[files('fuzz-catalog.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-json.c']],
|
[files('fuzz-json.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-varlink.c']],
|
[files('fuzz-varlink.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-udev-database.c']],
|
[files('fuzz-udev-database.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-compress.c']],
|
[files('fuzz-compress.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-bus-label.c']],
|
[files('fuzz-bus-label.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-env-file.c']],
|
[files('fuzz-env-file.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-hostname-setup.c']],
|
[files('fuzz-hostname-setup.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-calendarspec.c']],
|
[files('fuzz-calendarspec.c')],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-time-util.c']],
|
[files('fuzz-time-util.c')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.home1.create-home">
|
<action id="org.freedesktop.home1.create-home">
|
||||||
<description gettext-domain="systemd">Create a home area</description>
|
<description gettext-domain="systemd">Create a home area</description>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.hostname1.set-hostname">
|
<action id="org.freedesktop.hostname1.set-hostname">
|
||||||
<description gettext-domain="systemd">Set hostname</description>
|
<description gettext-domain="systemd">Set hostname</description>
|
||||||
|
|||||||
@ -61,9 +61,9 @@ if conf.get('ENABLE_IMPORTD') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/import/test-qcow2.c',
|
[files('test-qcow2.c',
|
||||||
'src/import/qcow2-util.c',
|
'qcow2-util.c',
|
||||||
'src/import/qcow2-util.h'],
|
'qcow2-util.h'),
|
||||||
[],
|
[],
|
||||||
[libz],
|
[libz],
|
||||||
[], 'HAVE_ZLIB', 'manual'],
|
[], 'HAVE_ZLIB', 'manual'],
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.import1.import">
|
<action id="org.freedesktop.import1.import">
|
||||||
<description gettext-domain="systemd">Import a VM or container image</description>
|
<description gettext-domain="systemd">Import a VM or container image</description>
|
||||||
|
|||||||
@ -76,7 +76,7 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/journal-remote/fuzz-journal-remote.c'],
|
[files('fuzz-journal-remote.c'),
|
||||||
[libsystemd_journal_remote,
|
[libsystemd_journal_remote,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
|
|||||||
@ -81,7 +81,7 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/journal/test-journal-syslog.c'],
|
[files('test-journal-syslog.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -89,67 +89,67 @@ tests += [
|
|||||||
liblz4,
|
liblz4,
|
||||||
libselinux]],
|
libselinux]],
|
||||||
|
|
||||||
[['src/journal/test-journal-config.c'],
|
[files('test-journal-config.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libxz,
|
[libxz,
|
||||||
liblz4,
|
liblz4,
|
||||||
libselinux]],
|
libselinux]],
|
||||||
|
|
||||||
[['src/journal/test-journal.c'],
|
[files('test-journal.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared]],
|
libshared]],
|
||||||
|
|
||||||
[['src/journal/test-journal-stream.c'],
|
[files('test-journal-stream.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared]],
|
libshared]],
|
||||||
|
|
||||||
[['src/journal/test-journal-flush.c'],
|
[files('test-journal-flush.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared]],
|
libshared]],
|
||||||
|
|
||||||
[['src/journal/test-journal-verify.c'],
|
[files('test-journal-verify.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared]],
|
libshared]],
|
||||||
|
|
||||||
[['src/journal/test-journal-interleaving.c'],
|
[files('test-journal-interleaving.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared]],
|
libshared]],
|
||||||
]
|
]
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/journal/fuzz-journald-audit.c',
|
[files('fuzz-journald-audit.c',
|
||||||
'src/journal/fuzz-journald.c'],
|
'fuzz-journald.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libselinux]],
|
[libselinux]],
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-kmsg.c',
|
[files('fuzz-journald-kmsg.c',
|
||||||
'src/journal/fuzz-journald.c'],
|
'fuzz-journald.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libselinux]],
|
[libselinux]],
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-native.c',
|
[files('fuzz-journald-native.c',
|
||||||
'src/journal/fuzz-journald.c'],
|
'fuzz-journald.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libselinux]],
|
[libselinux]],
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-native-fd.c',
|
[files('fuzz-journald-native-fd.c',
|
||||||
'src/journal/fuzz-journald.c'],
|
'fuzz-journald.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libselinux]],
|
[libselinux]],
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-stream.c',
|
[files('fuzz-journald-stream.c',
|
||||||
'src/journal/fuzz-journald.c'],
|
'fuzz-journald.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libselinux]],
|
[libselinux]],
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-syslog.c',
|
[files('fuzz-journald-syslog.c',
|
||||||
'src/journal/fuzz-journald.c'],
|
'fuzz-journald.c'),
|
||||||
[libjournal_core,
|
[libjournal_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libselinux]],
|
[libselinux]],
|
||||||
|
|||||||
@ -57,67 +57,67 @@ libsystemd_network_includes = [includes, include_directories('.')]
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libsystemd-network/test-dhcp-option.c'],
|
[files('test-dhcp-option.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-sd-dhcp-lease.c'],
|
[files('test-sd-dhcp-lease.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-dhcp-client.c'],
|
[files('test-dhcp-client.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-dhcp-server.c'],
|
[files('test-dhcp-server.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-ipv4ll.c'],
|
[files('test-ipv4ll.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-ipv4ll-manual.c'],
|
[files('test-ipv4ll-manual.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[], [], '', 'manual'],
|
[], [], '', 'manual'],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-acd.c'],
|
[files('test-acd.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[], [], '', 'manual'],
|
[], [], '', 'manual'],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-ndisc-rs.c'],
|
[files('test-ndisc-rs.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-ndisc-ra.c'],
|
[files('test-ndisc-ra.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-dhcp6-client.c'],
|
[files('test-dhcp6-client.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/test-lldp-rx.c'],
|
[files('test-lldp-rx.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
]
|
]
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/libsystemd-network/fuzz-dhcp6-client.c'],
|
[files('fuzz-dhcp6-client.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/fuzz-dhcp-server.c'],
|
[files('fuzz-dhcp-server.c'),
|
||||||
[libsystemd_network,
|
[libsystemd_network,
|
||||||
libshared]],
|
libshared]],
|
||||||
|
|
||||||
[['src/libsystemd-network/fuzz-lldp-rx.c'],
|
[files('fuzz-lldp-rx.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
|
|
||||||
[['src/libsystemd-network/fuzz-ndisc-rs.c'],
|
[files('fuzz-ndisc-rs.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_network]],
|
libsystemd_network]],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -190,43 +190,43 @@ custom_target(
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libsystemd/sd-journal/test-journal-send.c']],
|
[files('sd-journal/test-journal-send.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-journal-match.c']],
|
[files('sd-journal/test-journal-match.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-journal-enum.c'],
|
[files('sd-journal/test-journal-enum.c'),
|
||||||
[], [], [], '', 'timeout=360'],
|
[], [], [], '', 'timeout=360'],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-journal-init.c']],
|
[files('sd-journal/test-journal-init.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-mmap-cache.c']],
|
[files('sd-journal/test-mmap-cache.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-catalog.c']],
|
[files('sd-journal/test-catalog.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-compress.c'],
|
[files('sd-journal/test-compress.c'),
|
||||||
[],
|
[],
|
||||||
[liblz4,
|
[liblz4,
|
||||||
libzstd,
|
libzstd,
|
||||||
libxz]],
|
libxz]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-compress-benchmark.c'],
|
[files('sd-journal/test-compress-benchmark.c'),
|
||||||
[],
|
[],
|
||||||
[liblz4,
|
[liblz4,
|
||||||
libzstd,
|
libzstd,
|
||||||
libxz],
|
libxz],
|
||||||
[], '', 'timeout=90'],
|
[], '', 'timeout=90'],
|
||||||
|
|
||||||
[['src/libsystemd/sd-journal/test-audit-type.c']],
|
[files('sd-journal/test-audit-type.c')],
|
||||||
]
|
]
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libsystemd/sd-bus/test-bus-address.c'],
|
[files('sd-bus/test-bus-address.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-marshal.c'],
|
[files('sd-bus/test-bus-marshal.c'),
|
||||||
[],
|
[],
|
||||||
[threads,
|
[threads,
|
||||||
libglib,
|
libglib,
|
||||||
@ -234,89 +234,89 @@ tests += [
|
|||||||
libgio,
|
libgio,
|
||||||
libdbus]],
|
libdbus]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-signature.c'],
|
[files('sd-bus/test-bus-signature.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-queue-ref-cycle.c'],
|
[files('sd-bus/test-bus-queue-ref-cycle.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-watch-bind.c'],
|
[files('sd-bus/test-bus-watch-bind.c'),
|
||||||
[],
|
[],
|
||||||
[threads],
|
[threads],
|
||||||
[], '', 'timeout=120'],
|
[], '', 'timeout=120'],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-chat.c'],
|
[files('sd-bus/test-bus-chat.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-cleanup.c'],
|
[files('sd-bus/test-bus-cleanup.c'),
|
||||||
[],
|
[],
|
||||||
[threads,
|
[threads,
|
||||||
libseccomp]],
|
libseccomp]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-track.c'],
|
[files('sd-bus/test-bus-track.c'),
|
||||||
[],
|
[],
|
||||||
[libseccomp]],
|
[libseccomp]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-server.c'],
|
[files('sd-bus/test-bus-server.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-objects.c'],
|
[files('sd-bus/test-bus-objects.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-vtable.c',
|
[files('sd-bus/test-bus-vtable.c',
|
||||||
'src/libsystemd/sd-bus/test-vtable-data.h']],
|
'sd-bus/test-vtable-data.h')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-gvariant.c'],
|
[files('sd-bus/test-bus-gvariant.c'),
|
||||||
[],
|
[],
|
||||||
[libglib,
|
[libglib,
|
||||||
libgobject,
|
libgobject,
|
||||||
libgio]],
|
libgio]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-creds.c']],
|
[files('sd-bus/test-bus-creds.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-match.c']],
|
[files('sd-bus/test-bus-match.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-benchmark.c'],
|
[files('sd-bus/test-bus-benchmark.c'),
|
||||||
[],
|
[],
|
||||||
[threads],
|
[threads],
|
||||||
[], '', 'manual'],
|
[], '', 'manual'],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/test-bus-introspect.c',
|
[files('sd-bus/test-bus-introspect.c',
|
||||||
'src/libsystemd/sd-bus/test-vtable-data.h']],
|
'sd-bus/test-vtable-data.h')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-event/test-event.c']],
|
[files('sd-event/test-event.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-netlink/test-netlink.c']],
|
[files('sd-netlink/test-netlink.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-resolve/test-resolve.c'],
|
[files('sd-resolve/test-resolve.c'),
|
||||||
[],
|
[],
|
||||||
[threads],
|
[threads],
|
||||||
[], '', 'timeout=120'],
|
[], '', 'timeout=120'],
|
||||||
|
|
||||||
[['src/libsystemd/sd-login/test-login.c']],
|
[files('sd-login/test-login.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-device/test-sd-device.c']],
|
[files('sd-device/test-sd-device.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-device/test-device-util.c']],
|
[files('sd-device/test-device-util.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-device/test-sd-device-monitor.c']],
|
[files('sd-device/test-sd-device-monitor.c')],
|
||||||
]
|
]
|
||||||
|
|
||||||
if cxx_cmd != ''
|
if cxx_cmd != ''
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libsystemd/sd-bus/test-bus-vtable-cc.cc']],
|
[files('sd-bus/test-bus-vtable-cc.cc')],
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/libsystemd/sd-bus/fuzz-bus-message.c']],
|
[files('sd-bus/fuzz-bus-message.c')],
|
||||||
|
|
||||||
[['src/libsystemd/sd-bus/fuzz-bus-match.c']],
|
[files('sd-bus/fuzz-bus-match.c')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -45,7 +45,7 @@ custom_target(
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libudev/test-libudev.c'],
|
[files('test-libudev.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libudev_basic]],
|
libudev_basic]],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -30,7 +30,7 @@ if conf.get('ENABLE_LOCALED') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/locale/test-keymap-util.c',
|
[files('test-keymap-util.c',
|
||||||
'src/locale/keymap-util.c',
|
'keymap-util.c',
|
||||||
'src/locale/keymap-util.h']],
|
'keymap-util.h')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.locale1.set-locale">
|
<action id="org.freedesktop.locale1.set-locale">
|
||||||
<description gettext-domain="systemd">Set system locale</description>
|
<description gettext-domain="systemd">Set system locale</description>
|
||||||
|
|||||||
@ -101,12 +101,12 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/login/test-login-shared.c']],
|
[files('test-login-shared.c')],
|
||||||
|
|
||||||
[['src/login/test-inhibit.c'],
|
[files('test-inhibit.c'),
|
||||||
[], [], [], '', 'manual'],
|
[], [], [], '', 'manual'],
|
||||||
|
|
||||||
[['src/login/test-login-tables.c'],
|
[files('test-login-tables.c'),
|
||||||
[liblogind_core,
|
[liblogind_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.login1.inhibit-block-shutdown">
|
<action id="org.freedesktop.login1.inhibit-block-shutdown">
|
||||||
<description gettext-domain="systemd">Allow applications to inhibit system shutdown</description>
|
<description gettext-domain="systemd">Allow applications to inhibit system shutdown</description>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if conf.get('ENABLE_MACHINED') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/machine/test-machine-tables.c'],
|
[files('test-machine-tables.c'),
|
||||||
[libmachine_core,
|
[libmachine_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.machine1.login">
|
<action id="org.freedesktop.machine1.login">
|
||||||
<description gettext-domain="systemd">Log into a local container</description>
|
<description gettext-domain="systemd">Log into a local container</description>
|
||||||
|
|||||||
@ -263,14 +263,14 @@ if conf.get('ENABLE_NETWORKD') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/network/fuzz-netdev-parser.c'],
|
[files('fuzz-netdev-parser.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network,
|
libsystemd_network,
|
||||||
networkd_link_with],
|
networkd_link_with],
|
||||||
[threads],
|
[threads],
|
||||||
network_includes],
|
network_includes],
|
||||||
|
|
||||||
[['src/network/fuzz-network-parser.c'],
|
[files('fuzz-network-parser.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network,
|
libsystemd_network,
|
||||||
networkd_link_with],
|
networkd_link_with],
|
||||||
@ -279,37 +279,37 @@ fuzzers += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/network/test-networkd-address.c'],
|
[files('test-networkd-address.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[],
|
[],
|
||||||
network_includes],
|
network_includes],
|
||||||
|
|
||||||
[['src/network/test-networkd-conf.c'],
|
[files('test-networkd-conf.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[],
|
[],
|
||||||
network_includes],
|
network_includes],
|
||||||
|
|
||||||
[['src/network/test-networkd-util.c'],
|
[files('test-networkd-util.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[],
|
[],
|
||||||
network_includes],
|
network_includes],
|
||||||
|
|
||||||
[['src/network/test-network.c'],
|
[files('test-network.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[threads],
|
[threads],
|
||||||
network_includes],
|
network_includes],
|
||||||
|
|
||||||
[['src/network/test-network-tables.c'],
|
[files('test-network-tables.c'),
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network],
|
libsystemd_network],
|
||||||
[threads],
|
[threads],
|
||||||
network_includes],
|
network_includes],
|
||||||
|
|
||||||
[['src/network/generator/test-network-generator.c',
|
[files('generator/test-network-generator.c',
|
||||||
'src/network/generator/network-generator.c',
|
'generator/network-generator.c',
|
||||||
'src/network/generator/network-generator.h']],
|
'generator/network-generator.h')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.network1.set-ntp-servers">
|
<action id="org.freedesktop.network1.set-ntp-servers">
|
||||||
<description gettext-domain="systemd">Set NTP servers</description>
|
<description gettext-domain="systemd">Set NTP servers</description>
|
||||||
|
|||||||
@ -53,12 +53,12 @@ systemd_nspawn_sources = files('nspawn.c')
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/nspawn/test-nspawn-tables.c'],
|
[files('test-nspawn-tables.c'),
|
||||||
[libnspawn_core,
|
[libnspawn_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libseccomp]],
|
[libseccomp]],
|
||||||
|
|
||||||
[['src/nspawn/test-patch-uid.c'],
|
[files('test-patch-uid.c'),
|
||||||
[libnspawn_core,
|
[libnspawn_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libacl],
|
[libacl],
|
||||||
@ -66,12 +66,12 @@ tests += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/nspawn/fuzz-nspawn-settings.c'],
|
[files('fuzz-nspawn-settings.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libnspawn_core],
|
libnspawn_core],
|
||||||
[libseccomp]],
|
[libseccomp]],
|
||||||
|
|
||||||
[['src/nspawn/fuzz-nspawn-oci.c'],
|
[files('fuzz-nspawn-oci.c'),
|
||||||
[libshared,
|
[libshared,
|
||||||
libnspawn_core],
|
libnspawn_core],
|
||||||
[libseccomp]],
|
[libseccomp]],
|
||||||
|
|||||||
@ -28,7 +28,7 @@ if conf.get('ENABLE_OOMD') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/oom/test-oomd-util.c',
|
[files('test-oomd-util.c',
|
||||||
'src/oom/oomd-util.c',
|
'oomd-util.c',
|
||||||
'src/oom/oomd-util.h']],
|
'oomd-util.h')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.portable1.inspect-images">
|
<action id="org.freedesktop.portable1.inspect-images">
|
||||||
<description gettext-domain="systemd">Inspect a portable service image</description>
|
<description gettext-domain="systemd">Inspect a portable service image</description>
|
||||||
|
|||||||
@ -174,40 +174,40 @@ custom_target(
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/resolve/test-resolve-tables.c'],
|
[files('test-resolve-tables.c'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
libm]],
|
libm]],
|
||||||
|
|
||||||
[['src/resolve/test-dns-packet.c'],
|
[files('test-dns-packet.c'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
libm]],
|
libm]],
|
||||||
|
|
||||||
[['src/resolve/test-resolved-etc-hosts.c',
|
[files('test-resolved-etc-hosts.c',
|
||||||
'src/resolve/resolved-etc-hosts.c',
|
'resolved-etc-hosts.c',
|
||||||
'src/resolve/resolved-etc-hosts.h'],
|
'resolved-etc-hosts.h'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
libm]],
|
libm]],
|
||||||
|
|
||||||
[['src/resolve/test-resolved-packet.c'],
|
[files('test-resolved-packet.c'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
libm]],
|
libm]],
|
||||||
|
|
||||||
[['src/resolve/test-dnssec.c'],
|
[files('test-dnssec.c'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
libm],
|
libm],
|
||||||
[], 'HAVE_OPENSSL_OR_GCRYPT'],
|
[], 'HAVE_OPENSSL_OR_GCRYPT'],
|
||||||
|
|
||||||
[['src/resolve/test-dnssec-complex.c'],
|
[files('test-dnssec-complex.c'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
@ -216,7 +216,7 @@ tests += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/resolve/fuzz-dns-packet.c'],
|
[files('fuzz-dns-packet.c'),
|
||||||
[libsystemd_resolve_core,
|
[libsystemd_resolve_core,
|
||||||
libshared],
|
libshared],
|
||||||
[lib_openssl_or_gcrypt,
|
[lib_openssl_or_gcrypt,
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.resolve1.register-service">
|
<action id="org.freedesktop.resolve1.register-service">
|
||||||
<description gettext-domain="systemd">Register a DNS-SD service</description>
|
<description gettext-domain="systemd">Register a DNS-SD service</description>
|
||||||
|
|||||||
@ -156,9 +156,6 @@ int watchdog_set_device(const char *path) {
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = free_and_strdup(&watchdog_device, path);
|
r = free_and_strdup(&watchdog_device, path);
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
if (r > 0) /* watchdog_device changed */
|
if (r > 0) /* watchdog_device changed */
|
||||||
watchdog_fd = safe_close(watchdog_fd);
|
watchdog_fd = safe_close(watchdog_fd);
|
||||||
|
|
||||||
@ -169,11 +166,9 @@ int watchdog_setup(usec_t timeout) {
|
|||||||
usec_t previous_timeout;
|
usec_t previous_timeout;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* timeout=0 closes the device whereas passing timeout=USEC_INFINITY
|
/* timeout=0 closes the device whereas passing timeout=USEC_INFINITY opens it (if needed)
|
||||||
* opens it (if needed) without configuring any particular timeout and
|
* without configuring any particular timeout and thus reuses the programmed value (therefore
|
||||||
* thus reuses the programmed value (therefore it's a nop if the device
|
* it's a nop if the device is already opened). */
|
||||||
* is already opened).
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
watchdog_close(true);
|
watchdog_close(true);
|
||||||
@ -184,9 +179,8 @@ int watchdog_setup(usec_t timeout) {
|
|||||||
if (watchdog_fd >= 0 && (timeout == watchdog_timeout || timeout == USEC_INFINITY))
|
if (watchdog_fd >= 0 && (timeout == watchdog_timeout || timeout == USEC_INFINITY))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Initialize the watchdog timeout with the caller value. This value is
|
/* Initialize the watchdog timeout with the caller value. This value is going to be updated by
|
||||||
* going to be updated by update_timeout() with the closest value
|
* update_timeout() with the closest value supported by the driver */
|
||||||
* supported by the driver */
|
|
||||||
previous_timeout = watchdog_timeout;
|
previous_timeout = watchdog_timeout;
|
||||||
watchdog_timeout = timeout;
|
watchdog_timeout = timeout;
|
||||||
|
|
||||||
|
|||||||
@ -7,9 +7,9 @@ systemd_shutdown_sources = files('''
|
|||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/shutdown/test-umount.c',
|
[files('test-umount.c',
|
||||||
'src/shutdown/umount.c',
|
'umount.c',
|
||||||
'src/shutdown/umount.h'],
|
'umount.h'),
|
||||||
[],
|
[],
|
||||||
[libmount]],
|
[libmount]],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -532,6 +532,7 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We're done with the watchdog. */
|
/* We're done with the watchdog. */
|
||||||
|
watchdog_close(true);
|
||||||
watchdog_free_device();
|
watchdog_free_device();
|
||||||
|
|
||||||
arguments[0] = NULL;
|
arguments[0] = NULL;
|
||||||
|
|||||||
@ -522,7 +522,7 @@ static int remount_with_timeout(MountPoint *m, int umount_log_level) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
log_info("Remounting '%s' read-only with options '%s'.", m->path, strna(m->remount_options));
|
log_info("Remounting '%s' read-only with options '%s'.", m->path, strempty(m->remount_options));
|
||||||
|
|
||||||
/* Start the mount operation here in the child */
|
/* Start the mount operation here in the child */
|
||||||
r = mount(NULL, m->path, NULL, m->remount_flags, m->remount_options);
|
r = mount(NULL, m->path, NULL, m->remount_flags, m->remount_options);
|
||||||
|
|||||||
@ -83,7 +83,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/systemctl/fuzz-systemctl-parse-argv.c',
|
[files('fuzz-systemctl-parse-argv.c') +
|
||||||
systemctl_sources],
|
systemctl_sources,
|
||||||
systemctl_link_with,
|
systemctl_link_with,
|
||||||
[], [], ['-DFUZZ_SYSTEMCTL_PARSE_ARGV']]]
|
[], [], ['-DFUZZ_SYSTEMCTL_PARSE_ARGV']]
|
||||||
|
]
|
||||||
|
|||||||
@ -11,7 +11,7 @@ test_hashmap_ordered_c = custom_target(
|
|||||||
|
|
||||||
test_include_dir = include_directories('.')
|
test_include_dir = include_directories('.')
|
||||||
|
|
||||||
path = run_command(sh, '-c', 'echo "$PATH"').stdout().strip()
|
path = run_command(sh, '-c', 'echo "$PATH"', check: true).stdout().strip()
|
||||||
test_env = environment()
|
test_env = environment()
|
||||||
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
|
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
|
||||||
test_env.set('PATH', project_build_root + ':' + path)
|
test_env.set('PATH', project_build_root + ':' + path)
|
||||||
@ -41,11 +41,11 @@ test_dlopen_c = files('test-dlopen.c')
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/test/test-device-nodes.c']],
|
[files('test-device-nodes.c')],
|
||||||
|
|
||||||
[['src/test/test-ether-addr-util.c']],
|
[files('test-ether-addr-util.c')],
|
||||||
|
|
||||||
[['src/test/test-engine.c'],
|
[files('test-engine.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -56,21 +56,21 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-emergency-action.c'],
|
[files('test-emergency-action.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-chown-rec.c'],
|
[files('test-chown-rec.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-dlopen-so.c']],
|
[files('test-dlopen-so.c')],
|
||||||
|
|
||||||
[['src/test/test-job-type.c'],
|
[files('test-job-type.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -81,7 +81,7 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-ns.c'],
|
[files('test-ns.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -92,7 +92,7 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes, '', 'manual'],
|
core_includes, '', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-loopback.c'],
|
[files('test-loopback.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -103,14 +103,14 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-dns-domain.c']],
|
[files('test-dns-domain.c')],
|
||||||
|
|
||||||
[['src/test/test-boot-timestamps.c'],
|
[files('test-boot-timestamps.c'),
|
||||||
[], [], [], 'ENABLE_EFI'],
|
[], [], [], 'ENABLE_EFI'],
|
||||||
|
|
||||||
[['src/test/test-unit-file.c']],
|
[files('test-unit-file.c')],
|
||||||
|
|
||||||
[['src/test/test-unit-name.c'],
|
[files('test-unit-name.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -121,7 +121,7 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-load-fragment.c'],
|
[files('test-load-fragment.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -132,9 +132,9 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-serialize.c']],
|
[files('test-serialize.c')],
|
||||||
|
|
||||||
[['src/test/test-unit-serialize.c'],
|
[files('test-unit-serialize.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -145,196 +145,196 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-utf8.c']],
|
[files('test-utf8.c')],
|
||||||
|
|
||||||
[['src/test/test-kbd-util.c']],
|
[files('test-kbd-util.c')],
|
||||||
|
|
||||||
[['src/test/test-blockdev-util.c']],
|
[files('test-blockdev-util.c')],
|
||||||
|
|
||||||
[['src/test/test-dev-setup.c']],
|
[files('test-dev-setup.c')],
|
||||||
|
|
||||||
[['src/test/test-capability.c'],
|
[files('test-capability.c'),
|
||||||
[],
|
[],
|
||||||
[libcap]],
|
[libcap]],
|
||||||
|
|
||||||
[['src/test/test-async.c'],
|
[files('test-async.c'),
|
||||||
[], [], [], '', 'timeout=120'],
|
[], [], [], '', 'timeout=120'],
|
||||||
|
|
||||||
[['src/test/test-locale-util.c']],
|
[files('test-locale-util.c')],
|
||||||
|
|
||||||
[['src/test/test-copy.c']],
|
[files('test-copy.c')],
|
||||||
|
|
||||||
[['src/test/test-recurse-dir.c']],
|
[files('test-recurse-dir.c')],
|
||||||
|
|
||||||
[['src/test/test-data-fd-util.c']],
|
[files('test-data-fd-util.c')],
|
||||||
|
|
||||||
[['src/test/test-static-destruct.c']],
|
[files('test-static-destruct.c')],
|
||||||
|
|
||||||
[['src/test/test-sigbus.c']],
|
[files('test-sigbus.c')],
|
||||||
|
|
||||||
[['src/test/test-condition.c']],
|
[files('test-condition.c')],
|
||||||
|
|
||||||
[['src/test/test-fdset.c']],
|
[files('test-fdset.c')],
|
||||||
|
|
||||||
[['src/test/test-fstab-util.c']],
|
[files('test-fstab-util.c')],
|
||||||
|
|
||||||
[['src/test/test-random-util.c'],
|
[files('test-random-util.c'),
|
||||||
[],
|
[],
|
||||||
[libm],
|
[libm],
|
||||||
[], '', 'timeout=120'],
|
[], '', 'timeout=120'],
|
||||||
|
|
||||||
[['src/test/test-format-table.c']],
|
[files('test-format-table.c')],
|
||||||
|
|
||||||
[['src/test/test-format-util.c']],
|
[files('test-format-util.c')],
|
||||||
|
|
||||||
[['src/test/test-ratelimit.c']],
|
[files('test-ratelimit.c')],
|
||||||
|
|
||||||
[['src/test/test-util.c']],
|
[files('test-util.c')],
|
||||||
|
|
||||||
[['src/test/test-macro.c']],
|
[files('test-macro.c')],
|
||||||
|
|
||||||
[['src/test/test-json.c']],
|
[files('test-json.c')],
|
||||||
|
|
||||||
[['src/test/test-modhex.c']],
|
[files('test-modhex.c')],
|
||||||
|
|
||||||
[['src/test/test-libmount.c'],
|
[files('test-libmount.c'),
|
||||||
[],
|
[],
|
||||||
[threads,
|
[threads,
|
||||||
libmount]],
|
libmount]],
|
||||||
|
|
||||||
[['src/test/test-mount-util.c']],
|
[files('test-mount-util.c')],
|
||||||
|
|
||||||
[['src/test/test-mountpoint-util.c']],
|
[files('test-mountpoint-util.c')],
|
||||||
|
|
||||||
[['src/test/test-exec-util.c']],
|
[files('test-exec-util.c')],
|
||||||
|
|
||||||
[['src/test/test-hexdecoct.c']],
|
[files('test-hexdecoct.c')],
|
||||||
|
|
||||||
[['src/test/test-alloc-util.c']],
|
[files('test-alloc-util.c')],
|
||||||
|
|
||||||
[['src/test/test-xattr-util.c']],
|
[files('test-xattr-util.c')],
|
||||||
|
|
||||||
[['src/test/test-io-util.c']],
|
[files('test-io-util.c')],
|
||||||
|
|
||||||
[['src/test/test-glob-util.c']],
|
[files('test-glob-util.c')],
|
||||||
|
|
||||||
[['src/test/test-fs-util.c']],
|
[files('test-fs-util.c')],
|
||||||
|
|
||||||
[['src/test/test-install-file.c']],
|
[files('test-install-file.c')],
|
||||||
|
|
||||||
[['src/test/test-umask-util.c']],
|
[files('test-umask-util.c')],
|
||||||
|
|
||||||
[['src/test/test-proc-cmdline.c']],
|
[files('test-proc-cmdline.c')],
|
||||||
|
|
||||||
[['src/test/test-fd-util.c'],
|
[files('test-fd-util.c'),
|
||||||
[],
|
[],
|
||||||
[libseccomp]],
|
[libseccomp]],
|
||||||
|
|
||||||
[['src/test/test-web-util.c']],
|
[files('test-web-util.c')],
|
||||||
|
|
||||||
[['src/test/test-cpu-set-util.c']],
|
[files('test-cpu-set-util.c')],
|
||||||
|
|
||||||
[['src/test/test-stat-util.c']],
|
[files('test-stat-util.c')],
|
||||||
|
|
||||||
[['src/test/test-os-util.c']],
|
[files('test-os-util.c')],
|
||||||
|
|
||||||
[['src/test/test-libcrypt-util.c'],
|
[files('test-libcrypt-util.c'),
|
||||||
[], [libcrypt], [], '', 'timeout=120'],
|
[], [libcrypt], [], '', 'timeout=120'],
|
||||||
|
|
||||||
[['src/test/test-escape.c']],
|
[files('test-escape.c')],
|
||||||
|
|
||||||
[['src/test/test-exit-status.c']],
|
[files('test-exit-status.c')],
|
||||||
|
|
||||||
[['src/test/test-specifier.c']],
|
[files('test-specifier.c')],
|
||||||
|
|
||||||
[['src/test/test-string-util.c']],
|
[files('test-string-util.c')],
|
||||||
|
|
||||||
[['src/test/test-extract-word.c']],
|
[files('test-extract-word.c')],
|
||||||
|
|
||||||
[['src/test/test-parse-argument.c']],
|
[files('test-parse-argument.c')],
|
||||||
|
|
||||||
[['src/test/test-parse-socket-bind-item.c']],
|
[files('test-parse-socket-bind-item.c')],
|
||||||
|
|
||||||
[['src/test/test-parse-util.c']],
|
[files('test-parse-util.c')],
|
||||||
|
|
||||||
[['src/test/test-sysctl-util.c']],
|
[files('test-sysctl-util.c')],
|
||||||
|
|
||||||
[['src/test/test-import-util.c']],
|
[files('test-import-util.c')],
|
||||||
|
|
||||||
[['src/test/test-uid-alloc-range.c']],
|
[files('test-uid-alloc-range.c')],
|
||||||
|
|
||||||
[['src/test/test-user-util.c']],
|
[files('test-user-util.c')],
|
||||||
|
|
||||||
[['src/test/test-hostname-setup.c']],
|
[files('test-hostname-setup.c')],
|
||||||
|
|
||||||
[['src/test/test-hostname-util.c']],
|
[files('test-hostname-util.c')],
|
||||||
|
|
||||||
[['src/test/test-process-util.c']],
|
[files('test-process-util.c')],
|
||||||
|
|
||||||
[['src/test/test-terminal-util.c']],
|
[files('test-terminal-util.c')],
|
||||||
|
|
||||||
[['src/test/test-path-lookup.c']],
|
[files('test-path-lookup.c')],
|
||||||
|
|
||||||
[['src/test/test-pretty-print.c']],
|
[files('test-pretty-print.c')],
|
||||||
|
|
||||||
[['src/test/test-uid-range.c']],
|
[files('test-uid-range.c')],
|
||||||
|
|
||||||
[['src/test/test-cap-list.c',
|
[files('test-cap-list.c') +
|
||||||
generated_gperf_headers],
|
generated_gperf_headers,
|
||||||
[],
|
[],
|
||||||
[libcap]],
|
[libcap]],
|
||||||
|
|
||||||
[['src/test/test-socket-util.c']],
|
[files('test-socket-util.c')],
|
||||||
|
|
||||||
[['src/test/test-socket-netlink.c']],
|
[files('test-socket-netlink.c')],
|
||||||
|
|
||||||
[['src/test/test-in-addr-util.c']],
|
[files('test-in-addr-util.c')],
|
||||||
|
|
||||||
[['src/test/test-in-addr-prefix-util.c']],
|
[files('test-in-addr-prefix-util.c')],
|
||||||
|
|
||||||
[['src/test/test-barrier.c']],
|
[files('test-barrier.c')],
|
||||||
|
|
||||||
[['src/test/test-tmpfiles.c']],
|
[files('test-tmpfiles.c')],
|
||||||
|
|
||||||
[['src/test/test-namespace.c'],
|
[files('test-namespace.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-verbs.c']],
|
[files('test-verbs.c')],
|
||||||
|
|
||||||
[['src/test/test-install-root.c']],
|
[files('test-install-root.c')],
|
||||||
|
|
||||||
[['src/test/test-acl-util.c'],
|
[files('test-acl-util.c'),
|
||||||
[], [], [], 'HAVE_ACL'],
|
[], [], [], 'HAVE_ACL'],
|
||||||
|
|
||||||
[['src/test/test-seccomp.c'],
|
[files('test-seccomp.c'),
|
||||||
[],
|
[],
|
||||||
[libseccomp],
|
[libseccomp],
|
||||||
[], 'HAVE_SECCOMP'],
|
[], 'HAVE_SECCOMP'],
|
||||||
|
|
||||||
[['src/test/test-rlimit-util.c']],
|
[files('test-rlimit-util.c')],
|
||||||
|
|
||||||
[['src/test/test-ask-password-api.c'],
|
[files('test-ask-password-api.c'),
|
||||||
[], [], [], '', 'manual'],
|
[], [], [], '', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-signal-util.c']],
|
[files('test-signal-util.c')],
|
||||||
|
|
||||||
[['src/test/test-loop-block.c'],
|
[files('test-loop-block.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libblkid],
|
libblkid],
|
||||||
core_includes, '', '', [], false],
|
core_includes, '', '', [], false],
|
||||||
|
|
||||||
[['src/test/test-selinux.c']],
|
[files('test-selinux.c')],
|
||||||
|
|
||||||
[['src/test/test-sizeof.c'],
|
[files('test-sizeof.c'),
|
||||||
[libbasic]],
|
[libbasic]],
|
||||||
|
|
||||||
[['src/test/test-bpf-devices.c'],
|
[files('test-bpf-devices.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[libmount,
|
[libmount,
|
||||||
@ -345,7 +345,7 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-bpf-firewall.c'],
|
[files('test-bpf-firewall.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[libmount,
|
[libmount,
|
||||||
@ -356,13 +356,13 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-bpf-foreign-programs.c'],
|
[files('test-bpf-foreign-programs.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-bpf-lsm.c'],
|
[files('test-bpf-lsm.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[libmount,
|
[libmount,
|
||||||
@ -373,7 +373,7 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-watch-pid.c'],
|
[files('test-watch-pid.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[libmount,
|
[libmount,
|
||||||
@ -384,32 +384,32 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-hashmap.c',
|
[files('test-hashmap.c',
|
||||||
'src/test/test-hashmap-plain.c',
|
'test-hashmap-plain.c') +
|
||||||
test_hashmap_ordered_c],
|
[test_hashmap_ordered_c],
|
||||||
[], [], [], '', 'timeout=180'],
|
[], [], [], '', 'timeout=180'],
|
||||||
|
|
||||||
[['src/test/test-set.c']],
|
[files('test-set.c')],
|
||||||
|
|
||||||
[['src/test/test-ordered-set.c']],
|
[files('test-ordered-set.c')],
|
||||||
|
|
||||||
[['src/test/test-set-disable-mempool.c'],
|
[files('test-set-disable-mempool.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/test/test-hash-funcs.c']],
|
[files('test-hash-funcs.c')],
|
||||||
|
|
||||||
[['src/test/test-bitmap.c']],
|
[files('test-bitmap.c')],
|
||||||
|
|
||||||
[['src/test/test-xml.c']],
|
[files('test-xml.c')],
|
||||||
|
|
||||||
[['src/test/test-list.c']],
|
[files('test-list.c')],
|
||||||
|
|
||||||
[['src/test/test-procfs-util.c']],
|
[files('test-procfs-util.c')],
|
||||||
|
|
||||||
[['src/test/test-unaligned.c']],
|
[files('test-unaligned.c')],
|
||||||
|
|
||||||
[['src/test/test-tables.c'],
|
[files('test-tables.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libjournal_core,
|
libjournal_core,
|
||||||
libudevd_core,
|
libudevd_core,
|
||||||
@ -423,70 +423,70 @@ tests += [
|
|||||||
libselinux],
|
libselinux],
|
||||||
[core_includes, journal_includes, udev_includes]],
|
[core_includes, journal_includes, udev_includes]],
|
||||||
|
|
||||||
[['src/test/test-prioq.c']],
|
[files('test-prioq.c')],
|
||||||
|
|
||||||
[['src/test/test-fileio.c']],
|
[files('test-fileio.c')],
|
||||||
|
|
||||||
[['src/test/test-time-util.c']],
|
[files('test-time-util.c')],
|
||||||
|
|
||||||
[['src/test/test-clock.c']],
|
[files('test-clock.c')],
|
||||||
|
|
||||||
[['src/test/test-tmpfile-util.c']],
|
[files('test-tmpfile-util.c')],
|
||||||
|
|
||||||
[['src/test/test-architecture.c']],
|
[files('test-architecture.c')],
|
||||||
|
|
||||||
[['src/test/test-gpt.c']],
|
[files('test-gpt.c')],
|
||||||
|
|
||||||
[['src/test/test-log.c']],
|
[files('test-log.c')],
|
||||||
|
|
||||||
[['src/test/test-ipcrm.c'],
|
[files('test-ipcrm.c'),
|
||||||
[], [], [], '', 'unsafe'],
|
[], [], [], '', 'unsafe'],
|
||||||
|
|
||||||
[['src/test/test-btrfs.c'],
|
[files('test-btrfs.c'),
|
||||||
[], [], [], '', 'manual'],
|
[], [], [], '', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-firewall-util.c']],
|
[files('test-firewall-util.c')],
|
||||||
|
|
||||||
[['src/test/test-net-naming-scheme.c']],
|
[files('test-net-naming-scheme.c')],
|
||||||
|
|
||||||
[['src/test/test-netlink-manual.c'],
|
[files('test-netlink-manual.c'),
|
||||||
[],
|
[],
|
||||||
[libkmod],
|
[libkmod],
|
||||||
[], 'HAVE_KMOD', 'manual'],
|
[], 'HAVE_KMOD', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-ellipsize.c']],
|
[files('test-ellipsize.c')],
|
||||||
|
|
||||||
[['src/test/test-date.c']],
|
[files('test-date.c')],
|
||||||
|
|
||||||
[['src/test/test-sleep.c']],
|
[files('test-sleep.c')],
|
||||||
|
|
||||||
[['src/test/test-tpm2.c']],
|
[files('test-tpm2.c')],
|
||||||
|
|
||||||
[['src/test/test-replace-var.c']],
|
[files('test-replace-var.c')],
|
||||||
|
|
||||||
[['src/test/test-calendarspec.c']],
|
[files('test-calendarspec.c')],
|
||||||
|
|
||||||
[['src/test/test-strip-tab-ansi.c']],
|
[files('test-strip-tab-ansi.c')],
|
||||||
|
|
||||||
[['src/test/test-coredump-util.c']],
|
[files('test-coredump-util.c')],
|
||||||
|
|
||||||
[['src/test/test-daemon.c']],
|
[files('test-daemon.c')],
|
||||||
|
|
||||||
[['src/test/test-cgroup.c']],
|
[files('test-cgroup.c')],
|
||||||
|
|
||||||
[['src/test/test-cgroup-cpu.c'],
|
[files('test-cgroup-cpu.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-cgroup-unit-default.c'],
|
[files('test-cgroup-unit-default.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-cgroup-mask.c'],
|
[files('test-cgroup-mask.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -497,30 +497,30 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-varlink.c'],
|
[files('test-varlink.c'),
|
||||||
[],
|
[],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/test/test-cgroup-util.c']],
|
[files('test-cgroup-util.c')],
|
||||||
|
|
||||||
[['src/test/test-cgroup-setup.c']],
|
[files('test-cgroup-setup.c')],
|
||||||
|
|
||||||
[['src/test/test-env-file.c']],
|
[files('test-env-file.c')],
|
||||||
|
|
||||||
[['src/test/test-env-util.c']],
|
[files('test-env-util.c')],
|
||||||
|
|
||||||
[['src/test/test-strbuf.c']],
|
[files('test-strbuf.c')],
|
||||||
|
|
||||||
[['src/test/test-strv.c']],
|
[files('test-strv.c')],
|
||||||
|
|
||||||
[['src/test/test-path-util.c']],
|
[files('test-path-util.c')],
|
||||||
|
|
||||||
[['src/test/test-rm-rf.c']],
|
[files('test-rm-rf.c')],
|
||||||
|
|
||||||
[['src/test/test-chase-symlinks.c'],
|
[files('test-chase-symlinks.c'),
|
||||||
[], [], [], '', 'manual'],
|
[], [], [], '', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-path.c'],
|
[files('test-path.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -531,7 +531,7 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes, '', 'timeout=120'],
|
core_includes, '', 'timeout=120'],
|
||||||
|
|
||||||
[['src/test/test-execute.c'],
|
[files('test-execute.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -542,20 +542,20 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes, '', 'timeout=360'],
|
core_includes, '', 'timeout=360'],
|
||||||
|
|
||||||
[['src/test/test-siphash24.c']],
|
[files('test-siphash24.c')],
|
||||||
|
|
||||||
[['src/test/test-strxcpyx.c']],
|
[files('test-strxcpyx.c')],
|
||||||
|
|
||||||
[['src/test/test-install.c'],
|
[files('test-install.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[],
|
[],
|
||||||
core_includes, '', 'manual'],
|
core_includes, '', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-watchdog.c'],
|
[files('test-watchdog.c'),
|
||||||
[], [], [], '', 'unsafe'],
|
[], [], [], '', 'unsafe'],
|
||||||
|
|
||||||
[['src/test/test-sched-prio.c'],
|
[files('test-sched-prio.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -566,25 +566,25 @@ tests += [
|
|||||||
libblkid],
|
libblkid],
|
||||||
core_includes],
|
core_includes],
|
||||||
|
|
||||||
[['src/test/test-conf-files.c']],
|
[files('test-conf-files.c')],
|
||||||
|
|
||||||
[['src/test/test-conf-parser.c']],
|
[files('test-conf-parser.c')],
|
||||||
|
|
||||||
[['src/test/test-af-list.c',
|
[files('test-af-list.c') +
|
||||||
generated_gperf_headers]],
|
generated_gperf_headers],
|
||||||
|
|
||||||
[['src/test/test-arphrd-util.c',
|
[files('test-arphrd-util.c') +
|
||||||
generated_gperf_headers]],
|
generated_gperf_headers],
|
||||||
|
|
||||||
[['src/test/test-errno-list.c',
|
[files('test-errno-list.c') +
|
||||||
generated_gperf_headers]],
|
generated_gperf_headers],
|
||||||
|
|
||||||
[['src/test/test-ip-protocol-list.c',
|
[files('test-ip-protocol-list.c') +
|
||||||
shared_generated_gperf_headers]],
|
shared_generated_gperf_headers],
|
||||||
|
|
||||||
[['src/test/test-journal-importer.c']],
|
[files('test-journal-importer.c')],
|
||||||
|
|
||||||
[['src/test/test-udev.c'],
|
[files('test-udev.c'),
|
||||||
[libudevd_core,
|
[libudevd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
@ -595,49 +595,49 @@ tests += [
|
|||||||
libselinux],
|
libselinux],
|
||||||
udev_includes, '', 'manual'],
|
udev_includes, '', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-udev-util.c']],
|
[files('test-udev-util.c')],
|
||||||
|
|
||||||
[['src/test/test-id128.c']],
|
[files('test-id128.c')],
|
||||||
|
|
||||||
[['src/test/test-cryptolib.c'],
|
[files('test-cryptolib.c'),
|
||||||
[libshared],
|
[libshared],
|
||||||
[lib_openssl_or_gcrypt],
|
[lib_openssl_or_gcrypt],
|
||||||
[], 'HAVE_OPENSSL_OR_GCRYPT'],
|
[], 'HAVE_OPENSSL_OR_GCRYPT'],
|
||||||
|
|
||||||
[['src/test/test-nss-hosts.c',
|
[files('test-nss-hosts.c',
|
||||||
'src/test/nss-test-util.c',
|
'nss-test-util.c',
|
||||||
'src/test/nss-test-util.h'],
|
'nss-test-util.h'),
|
||||||
[],
|
[],
|
||||||
[libdl],
|
[libdl],
|
||||||
[], 'ENABLE_NSS'],
|
[], 'ENABLE_NSS'],
|
||||||
|
|
||||||
[['src/test/test-nss-users.c',
|
[files('test-nss-users.c',
|
||||||
'src/test/nss-test-util.c',
|
'nss-test-util.c',
|
||||||
'src/test/nss-test-util.h'],
|
'nss-test-util.h'),
|
||||||
[],
|
[],
|
||||||
[libdl],
|
[libdl],
|
||||||
[], 'ENABLE_NSS'],
|
[], 'ENABLE_NSS'],
|
||||||
|
|
||||||
[['src/test/test-bus-util.c']],
|
[files('test-bus-util.c')],
|
||||||
|
|
||||||
[['src/test/test-percent-util.c']],
|
[files('test-percent-util.c')],
|
||||||
|
|
||||||
[['src/test/test-sd-hwdb.c']],
|
[files('test-sd-hwdb.c')],
|
||||||
|
|
||||||
[['src/test/test-sd-path.c']],
|
[files('test-sd-path.c')],
|
||||||
|
|
||||||
[['src/test/test-local-addresses.c']],
|
[files('test-local-addresses.c')],
|
||||||
|
|
||||||
[['src/test/test-psi-util.c']],
|
[files('test-psi-util.c')],
|
||||||
|
|
||||||
[['src/test/test-qrcode-util.c'],
|
[files('test-qrcode-util.c'),
|
||||||
[],
|
[],
|
||||||
[libdl]],
|
[libdl]],
|
||||||
|
|
||||||
[['src/test/test-nscd-flush.c'],
|
[files('test-nscd-flush.c'),
|
||||||
[], [], [], 'ENABLE_NSCD', 'manual'],
|
[], [], [], 'ENABLE_NSCD', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-hmac.c']],
|
[files('test-hmac.c')],
|
||||||
]
|
]
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
@ -645,21 +645,21 @@ tests += [
|
|||||||
# define some tests here, because the link_with deps were not defined earlier
|
# define some tests here, because the link_with deps were not defined earlier
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
[files('../libsystemd/sd-bus/test-bus-error.c'),
|
||||||
[libshared_static,
|
[libshared_static,
|
||||||
libsystemd_static]],
|
libsystemd_static]],
|
||||||
|
|
||||||
[['src/libsystemd/sd-device/test-sd-device-thread.c'],
|
[files('../libsystemd/sd-device/test-sd-device-thread.c'),
|
||||||
[libsystemd],
|
[libsystemd],
|
||||||
[threads]],
|
[threads]],
|
||||||
|
|
||||||
[['src/libudev/test-udev-device-thread.c'],
|
[files('../libudev/test-udev-device-thread.c'),
|
||||||
[libudev],
|
[libudev],
|
||||||
[threads]],
|
[threads]],
|
||||||
]
|
]
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/test/test-socket-bind.c'],
|
[files('test-socket-bind.c'),
|
||||||
[libcore,
|
[libcore,
|
||||||
libshared],
|
libshared],
|
||||||
[libdl],
|
[libdl],
|
||||||
|
|||||||
@ -426,4 +426,13 @@ TEST(cg_get_keyed_attribute) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(bfq_weight_conversion) {
|
||||||
|
assert_se(BFQ_WEIGHT(1) == 1);
|
||||||
|
assert_se(BFQ_WEIGHT(50) == 50);
|
||||||
|
assert_se(BFQ_WEIGHT(100) == 100);
|
||||||
|
assert_se(BFQ_WEIGHT(500) == 136);
|
||||||
|
assert_se(BFQ_WEIGHT(5000) == 545);
|
||||||
|
assert_se(BFQ_WEIGHT(10000) == 1000);
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_TEST_MAIN(LOG_DEBUG);
|
DEFINE_TEST_MAIN(LOG_DEBUG);
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
|
|
||||||
<vendor>The systemd Project</vendor>
|
<vendor>The systemd Project</vendor>
|
||||||
<vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
|
<vendor_url>https://systemd.io</vendor_url>
|
||||||
|
|
||||||
<action id="org.freedesktop.timedate1.set-time">
|
<action id="org.freedesktop.timedate1.set-time">
|
||||||
<description gettext-domain="systemd">Set system time</description>
|
<description gettext-domain="systemd">Set system time</description>
|
||||||
|
|||||||
@ -55,7 +55,7 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/timesync/test-timesync.c'],
|
[files('test-timesync.c'),
|
||||||
[libtimesyncd_core,
|
[libtimesyncd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[libm]],
|
[libm]],
|
||||||
|
|||||||
@ -6,7 +6,7 @@ systemd_tmpfiles_sources = files(
|
|||||||
'offline-passwd.h')
|
'offline-passwd.h')
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/tmpfiles/test-offline-passwd.c',
|
[files('test-offline-passwd.c',
|
||||||
'src/tmpfiles/offline-passwd.c',
|
'offline-passwd.c',
|
||||||
'src/tmpfiles/offline-passwd.h']],
|
'offline-passwd.h')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -174,49 +174,48 @@ if install_sysconfdir
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/udev/net/fuzz-link-parser.c',
|
[files('net/fuzz-link-parser.c'),
|
||||||
'src/fuzz/fuzz.h'],
|
|
||||||
[libudevd_core,
|
[libudevd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libacl],
|
libacl],
|
||||||
udev_includes],
|
udev_includes],
|
||||||
|
|
||||||
[['src/udev/fuzz-udev-rules.c'],
|
[files('fuzz-udev-rules.c'),
|
||||||
[libudevd_core,
|
[libudevd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libacl]],
|
libacl]],
|
||||||
|
|
||||||
[['src/udev/fuzz-udev-rule-parse-value.c']],
|
[files('fuzz-udev-rule-parse-value.c')],
|
||||||
|
|
||||||
[['src/udev/fido_id/fuzz-fido-id-desc.c',
|
[files('fido_id/fuzz-fido-id-desc.c',
|
||||||
'src/udev/fido_id/fido_id_desc.c']],
|
'fido_id/fido_id_desc.c')],
|
||||||
]
|
]
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/udev/test-udev-event.c'],
|
[files('test-udev-event.c'),
|
||||||
[libudevd_core,
|
[libudevd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libacl]],
|
libacl]],
|
||||||
|
|
||||||
[['src/udev/test-udev-node.c'],
|
[files('test-udev-node.c'),
|
||||||
[libudevd_core,
|
[libudevd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libacl]],
|
libacl]],
|
||||||
|
|
||||||
[['src/udev/test-udev-builtin.c'],
|
[files('test-udev-builtin.c'),
|
||||||
[libudevd_core,
|
[libudevd_core,
|
||||||
libshared],
|
libshared],
|
||||||
[threads,
|
[threads,
|
||||||
libacl]],
|
libacl]],
|
||||||
|
|
||||||
[['src/udev/test-udev-netlink.c',
|
[files('test-udev-netlink.c',
|
||||||
'src/udev/udev-netlink.c',
|
'udev-netlink.c',
|
||||||
'src/udev/udev-netlink.h']],
|
'udev-netlink.h')],
|
||||||
|
|
||||||
[['src/udev/fido_id/test-fido-id-desc.c',
|
[files('fido_id/test-fido-id-desc.c',
|
||||||
'src/udev/fido_id/fido_id_desc.c']],
|
'fido_id/fido_id_desc.c')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -6,13 +6,13 @@ systemd_xdg_autostart_generator_sources = files(
|
|||||||
'xdg-autostart-service.h')
|
'xdg-autostart-service.h')
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/xdg-autostart-generator/test-xdg-autostart.c',
|
[files('test-xdg-autostart.c',
|
||||||
'src/xdg-autostart-generator/xdg-autostart-service.c',
|
'xdg-autostart-service.c',
|
||||||
'src/xdg-autostart-generator/xdg-autostart-service.h']],
|
'xdg-autostart-service.h')],
|
||||||
]
|
]
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/xdg-autostart-generator/fuzz-xdg-desktop.c',
|
[files('fuzz-xdg-desktop.c',
|
||||||
'src/xdg-autostart-generator/xdg-autostart-service.c',
|
'xdg-autostart-service.c',
|
||||||
'src/xdg-autostart-generator/xdg-autostart-service.h']],
|
'xdg-autostart-service.h')],
|
||||||
]
|
]
|
||||||
|
|||||||
@ -487,7 +487,7 @@ static int xdg_autostart_generate_desktop_condition(
|
|||||||
"%s: ExecCondition executable %s not found, unit will not be started automatically: %m",
|
"%s: ExecCondition executable %s not found, unit will not be started automatically: %m",
|
||||||
service->path, test_binary);
|
service->path, test_binary);
|
||||||
fprintf(f, "# ExecCondition using %s skipped due to missing binary.\n", test_binary);
|
fprintf(f, "# ExecCondition using %s skipped due to missing binary.\n", test_binary);
|
||||||
return r;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
e_autostart_condition = cescape(condition);
|
e_autostart_condition = cescape(condition);
|
||||||
|
|||||||
@ -16,12 +16,13 @@ sanitize_address_undefined = custom_target(
|
|||||||
|
|
||||||
sanitizers = [['address,undefined', sanitize_address_undefined]]
|
sanitizers = [['address,undefined', sanitize_address_undefined]]
|
||||||
|
|
||||||
if git.found()
|
if git.found() and fs.exists(project_source_root / '.git')
|
||||||
out = run_command(env, '-u', 'GIT_WORK_TREE',
|
out = run_command(env, '-u', 'GIT_WORK_TREE',
|
||||||
git, '--git-dir=@0@/.git'.format(project_source_root),
|
git, '--git-dir=@0@/.git'.format(project_source_root),
|
||||||
'ls-files', ':/test/fuzz/*/*')
|
'ls-files', ':/test/fuzz/*/*',
|
||||||
|
check: true)
|
||||||
else
|
else
|
||||||
out = run_command(sh, '-c', 'ls @0@/test/fuzz/*/*'.format(project_source_root))
|
out = run_command(sh, '-c', 'cd "@0@"; echo test/fuzz/*/*'.format(project_source_root), check: true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fuzz_regression_tests = []
|
fuzz_regression_tests = []
|
||||||
|
|||||||
@ -166,14 +166,16 @@ endif
|
|||||||
if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
|
if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
|
||||||
udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh')
|
udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh')
|
||||||
|
|
||||||
if git.found()
|
if git.found() and fs.exists(project_source_root / '.git')
|
||||||
out = run_command(
|
out = run_command(
|
||||||
env, '-u', 'GIT_WORK_TREE',
|
env, '-u', 'GIT_WORK_TREE',
|
||||||
git, '--git-dir=@0@/.git'.format(project_source_root),
|
git, '--git-dir=@0@/.git'.format(project_source_root),
|
||||||
'ls-files', ':/test/dmidecode-dumps/*.bin')
|
'ls-files', ':/test/dmidecode-dumps/*.bin',
|
||||||
|
check: true)
|
||||||
else
|
else
|
||||||
out = run_command(
|
out = run_command(
|
||||||
sh, '-c', 'ls @0@/test/dmidecode-dumps/*.bin'.format(project_source_root))
|
sh, '-c', 'cd "@0@"; echo test/dmidecode-dumps/*.bin'.format(project_source_root),
|
||||||
|
check: true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach p : out.stdout().split()
|
foreach p : out.stdout().split()
|
||||||
|
|||||||
@ -35,6 +35,10 @@ echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" >/etc/systemd/system/sy
|
|||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
# enable the service to ensure dbus-org.freedesktop.oom1.service exists
|
||||||
|
# and D-Bus activation works
|
||||||
|
systemctl enable systemd-oomd.service
|
||||||
|
|
||||||
# if oomd is already running for some reasons, then restart it to make sure the above settings to be applied
|
# if oomd is already running for some reasons, then restart it to make sure the above settings to be applied
|
||||||
if systemctl is-active systemd-oomd.service; then
|
if systemctl is-active systemd-oomd.service; then
|
||||||
systemctl restart systemd-oomd.service
|
systemctl restart systemd-oomd.service
|
||||||
|
|||||||
@ -221,8 +221,7 @@ in_units = [
|
|||||||
['systemd-networkd.service', 'ENABLE_NETWORKD'],
|
['systemd-networkd.service', 'ENABLE_NETWORKD'],
|
||||||
['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD'],
|
['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD'],
|
||||||
['systemd-nspawn@.service', ''],
|
['systemd-nspawn@.service', ''],
|
||||||
['systemd-oomd.service', 'ENABLE_OOMD',
|
['systemd-oomd.service', 'ENABLE_OOMD'],
|
||||||
'dbus-org.freedesktop.oom1.service'],
|
|
||||||
['systemd-portabled.service', 'ENABLE_PORTABLED',
|
['systemd-portabled.service', 'ENABLE_PORTABLED',
|
||||||
'dbus-org.freedesktop.portable1.service'],
|
'dbus-org.freedesktop.portable1.service'],
|
||||||
['systemd-userdbd.service', 'ENABLE_USERDB'],
|
['systemd-userdbd.service', 'ENABLE_USERDB'],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user