Compare commits

...

16 Commits

Author SHA1 Message Date
Lennart Poettering cf33b70765 docs: some coding style updates
Primarily:

1. Mention that we prefer if return parameters carry "ret_" as prefix in
   their name

2. Clarify that debug-level logging is always OK, and irrelevant to when
   deciding whether a function is logging or non-logging.
2020-10-19 15:30:11 +02:00
Zmicer Turok e9f4a596a2 Translated using Weblate (Belarusian)
Currently translated at 100.0% (187 of 187 strings)

Co-authored-by: Zmicer Turok <nashtlumach@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/be/
Translation: systemd/master
2020-10-19 09:36:20 +02:00
Zbigniew Jędrzejewski-Szmek dc38447c3f
Merge pull request #17369 from poettering/kill-log
log about processed killed due to "systemctl kill"
2020-10-19 09:31:02 +02:00
Lennart Poettering bb63863304 man: document that for Type=dbus services dropping bus name has consequences
Fixes: #17150
2020-10-19 09:22:13 +02:00
Lennart Poettering af4b8f8048 man: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers
Fixes: #16941
2020-10-19 09:20:20 +02:00
Zbigniew Jędrzejewski-Szmek f081b47f81
Merge pull request #17367 from bluca/fix_test_50_ubuntu
test: fix TEST-50-DISSECT build on Ubuntu CI
2020-10-19 09:17:28 +02:00
Pedro Ruiz cc61860ab8 hwdb: Add accel orientation for AsusTek TP300LAB 2020-10-19 09:14:42 +02:00
Piotr Drąg f857a84b7e po: update Polish translation 2020-10-19 09:11:40 +02:00
Luca Boccassi 9198752738 test: account for non-x86-64 archs in TEST-50-DISSECT 2020-10-18 15:41:34 +01:00
Luca Boccassi 7580a64766 test: increase size of verity partition in TEST-50-DISSECT GPT image
On Ubuntu it seems there's some padding added
2020-10-18 11:44:18 +01:00
Luca Boccassi 964523e6c2 test/README: notes about Ubuntu CI logs and dependencies
Add a note about where to find the full journal, and how to add
packages/dependencies for the Ubuntu CI.
2020-10-17 17:58:40 +01:00
Luca Boccassi d888cd4cfc test: fix TEST-50-DISSECT build on Ubuntu CI
Ubuntu CI's just got the dependencies require dto run this test added,
and it seems the build is different enough from other platforms
that it fails to create the required directories:

cp: cannot create regular file '/var/tmp/systemd-test.JJMOBY/minimal/usr/lib/os-release': No such file or directory
2020-10-17 17:58:40 +01:00
Luca Boccassi 1bac565641 Revert "Block TEST-50-DISSECT on Ubuntu CI temporarily"
This reverts commit 329315b29f.
2020-10-17 17:58:40 +01:00
Lennart Poettering d991100291 core: log about "systemctl kill" requests
let's add informational logging about each client requested signal
sending. While we are at, let's beef up error handling/log messages in
this case quite a bit: let's log errors both to syslog and report errors
back to client.

Fixes: #17254
2020-10-16 17:21:51 +02:00
Lennart Poettering 2ae0508e6d core: correct handling of "systemctl kill --kill-who=main-fail"
--kill-who=main-fail never worked correctly, due to a copy and paste
mistake in ac5e3a505e, where the same item
was listed twice. The mistake was
later noticed, but fixed incorrectly, in
201f0c916d.

Let's list all *-fail types correctly, finally.

And while we are at it, add a nice comment and generate a prettier D-Bus
error about this.
2020-10-16 17:19:20 +02:00
Lennart Poettering 8aff7ac4a7 core: add comment explaining unit_kill_context() vs. unit_kill_common() a bit 2020-10-16 17:16:02 +02:00
11 changed files with 469 additions and 417 deletions

View File

@ -36,6 +36,8 @@ layout: default
int a, b, c; int a, b, c;
``` ```
(i.e. use double indentation — 16 spaces — for the parameter list.)
- Try to write this: - Try to write this:
```c ```c
@ -84,7 +86,27 @@ layout: default
- Do not write functions that clobber call-by-reference variables on - Do not write functions that clobber call-by-reference variables on
failure. Use temporary variables for these cases and change the passed in failure. Use temporary variables for these cases and change the passed in
variables only on success. variables only on success. The rule is: never clobber return parameters on
failure, always initialize return parameters on success.
- Typically, function parameters fit into three categories: input parameters,
mutable objects, and call-by-reference return parameters. Input parameters
should always carry suitable "const" declarators if they are pointers, to
indicate they are input-only and not changed by the function. Return
parameters are best prefixed with "ret_", to clarify they are return
parameters. (Conversely, please do not prefix parameters that aren't
output-only with "ret_", in particular not mutable parameters that are both
input as well as output). Example:
```c
static int foobar_frobnicate(
Foobar* object, /* the associated mutable object */
const char *input, /* immutable input parameter */
char **ret_frobnicated) { /* return parameter */
return 0;
}
```
- The order in which header files are included doesn't matter too - The order in which header files are included doesn't matter too
much. systemd-internal headers must not rely on an include order, so it is much. systemd-internal headers must not rely on an include order, so it is
@ -307,13 +329,16 @@ layout: default
## Logging ## Logging
- For every function you add, think about whether it is a "logging" function or - For every function you add, think about whether it is a "logging" function or
a "non-logging" function. "Logging" functions do logging on their own, a "non-logging" function. "Logging" functions do (non-debug) logging on their
"non-logging" function never log on their own and expect their callers to own, "non-logging" function never log on their own (except at debug level)
log. All functions in "library" code, i.e. in `src/shared/` and suchlike must and expect their callers to log. All functions in "library" code, i.e. in
be "non-logging". Every time a "logging" function calls a "non-logging" `src/shared/` and suchlike must be "non-logging". Every time a "logging"
function, it should log about the resulting errors. If a "logging" function function calls a "non-logging" function, it should log about the resulting
calls another "logging" function, then it should not generate log messages, errors. If a "logging" function calls another "logging" function, then it
so that log messages are not generated twice for the same errors. should not generate log messages, so that log messages are not generated
twice for the same errors. (Note that debug level logging — at syslog level
`LOG_DEBUG` — is not considered logging in this context, debug logging is
generally always fine and welcome.)
- If possible, do a combined log & return operation: - If possible, do a combined log & return operation:

View File

@ -142,6 +142,7 @@ sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LD:* sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LD:*
sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LAB:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
sensor:modalias:acpi:BOSC0200*:dmi:*svn*ASUSTeK*:*pn*TP412UA:* sensor:modalias:acpi:BOSC0200*:dmi:*svn*ASUSTeK*:*pn*TP412UA:*

View File

@ -203,12 +203,18 @@
has <varname>RemainAfterExit=</varname> not set) it will not show up as started afterwards, but has <varname>RemainAfterExit=</varname> not set) it will not show up as started afterwards, but
as dead.</para></listitem> as dead.</para></listitem>
<listitem><para>Behavior of <option>dbus</option> is similar to <option>simple</option>; however, it is <listitem><para>Behavior of <option>dbus</option> is similar to <option>simple</option>; however,
expected that the service acquires a name on the D-Bus bus, as configured by it is expected that the service acquires a name on the D-Bus bus, as configured by
<varname>BusName=</varname>. systemd will proceed with starting follow-up units after the D-Bus bus name <varname>BusName=</varname>. systemd will proceed with starting follow-up units after the D-Bus
has been acquired. Service units with this option configured implicitly gain dependencies on the bus name has been acquired. Service units with this option configured implicitly gain
<filename>dbus.socket</filename> unit. This type is the default if <varname>BusName=</varname> is dependencies on the <filename>dbus.socket</filename> unit. This type is the default if
specified.</para></listitem> <varname>BusName=</varname> is specified. A service unit of this type is considered to be in the
activating state until the specified bus name is acquired. It is considered activated while the
bus name is taken. Once the bus name is released the service is considered being no longer
functional which has the effect that the service manager attempts to terminate any remaining
processes belonging to the service. Services that drop their bus name as part of their shutdown
logic thus should be prepared to receive a <constant>SIGTERM</constant> (or whichever signal is
configured in <varname>KillSignal=</varname>) as result.</para></listitem>
<listitem><para>Behavior of <option>notify</option> is similar to <option>exec</option>; however, it is <listitem><para>Behavior of <option>notify</option> is similar to <option>exec</option>; however, it is
expected that the service sends a notification message via expected that the service sends a notification message via

View File

@ -1207,7 +1207,10 @@
argument must either be a single word, or an assignment (i.e. two words, separated by argument must either be a single word, or an assignment (i.e. two words, separated by
<literal>=</literal>). In the former case the kernel command line is searched for the word <literal>=</literal>). In the former case the kernel command line is searched for the word
appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is
looked for with right and left hand side matching.</para> looked for with right and left hand side matching. This operates on the kernel command line
communicated to userspace via <filename>/proc/cmdline</filename>, except when the service manager
is invoked as payload of a container manager, in which case the command line of <filename>PID
1</filename> is used instead (i.e. <filename>/proc/1/cmdline</filename>).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

560
po/be.po

File diff suppressed because it is too large Load Diff

142
po/pl.po
View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: systemd\n" "Project-Id-Version: systemd\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-19 18:02+0200\n" "POT-Creation-Date: 2020-09-10 03:33+0000\n"
"PO-Revision-Date: 2020-05-03 13:50+0200\n" "PO-Revision-Date: 2020-10-18 13:10+0200\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n" "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <trans-pl@lists.fedoraproject.org>\n" "Language-Team: Polish <trans-pl@lists.fedoraproject.org>\n"
"Language: pl\n" "Language: pl\n"
@ -309,57 +309,71 @@ msgstr ""
"przez system." "przez system."
#: src/login/org.freedesktop.login1.policy:117 #: src/login/org.freedesktop.login1.policy:117
msgid "Allow applications to inhibit system handling of the reboot key"
msgstr ""
"Zezwolenie programom na wstrzymanie obsługi klawisza ponownego uruchomienia "
"przez system"
#: src/login/org.freedesktop.login1.policy:118
msgid ""
"Authentication is required for an application to inhibit system handling of "
"the reboot key."
msgstr ""
"Program wymaga uwierzytelnienia, aby wstrzymać obsługę klawisza ponownego "
"uruchomienia przez system."
#: src/login/org.freedesktop.login1.policy:128
msgid "Allow non-logged-in user to run programs" msgid "Allow non-logged-in user to run programs"
msgstr "Zezwolenie niezalogowanemu użytkownikowi na uruchamianie programów" msgstr "Zezwolenie niezalogowanemu użytkownikowi na uruchamianie programów"
#: src/login/org.freedesktop.login1.policy:118 #: src/login/org.freedesktop.login1.policy:129
msgid "Explicit request is required to run programs as a non-logged-in user." msgid "Explicit request is required to run programs as a non-logged-in user."
msgstr "" msgstr ""
"Wymagane jest bezpośrednie żądanie, aby uruchamiać programy jako " "Wymagane jest bezpośrednie żądanie, aby uruchamiać programy jako "
"niezalogowany użytkownik." "niezalogowany użytkownik."
#: src/login/org.freedesktop.login1.policy:127 #: src/login/org.freedesktop.login1.policy:138
msgid "Allow non-logged-in users to run programs" msgid "Allow non-logged-in users to run programs"
msgstr "Zezwolenie niezalogowanym użytkownikom na uruchamianie programów" msgstr "Zezwolenie niezalogowanym użytkownikom na uruchamianie programów"
#: src/login/org.freedesktop.login1.policy:128 #: src/login/org.freedesktop.login1.policy:139
msgid "Authentication is required to run programs as a non-logged-in user." msgid "Authentication is required to run programs as a non-logged-in user."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby uruchamiać programy jako niezalogowany " "Wymagane jest uwierzytelnienie, aby uruchamiać programy jako niezalogowany "
"użytkownik." "użytkownik."
#: src/login/org.freedesktop.login1.policy:137 #: src/login/org.freedesktop.login1.policy:148
msgid "Allow attaching devices to seats" msgid "Allow attaching devices to seats"
msgstr "Zezwolenie na podłączanie urządzeń do stanowisk" msgstr "Zezwolenie na podłączanie urządzeń do stanowisk"
#: src/login/org.freedesktop.login1.policy:138 #: src/login/org.freedesktop.login1.policy:149
msgid "Authentication is required to attach a device to a seat." msgid "Authentication is required to attach a device to a seat."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby podłączyć urządzenie do stanowiska." "Wymagane jest uwierzytelnienie, aby podłączyć urządzenie do stanowiska."
#: src/login/org.freedesktop.login1.policy:148 #: src/login/org.freedesktop.login1.policy:159
msgid "Flush device to seat attachments" msgid "Flush device to seat attachments"
msgstr "Usunięcie podłączenia urządzeń do stanowisk" msgstr "Usunięcie podłączenia urządzeń do stanowisk"
#: src/login/org.freedesktop.login1.policy:149 #: src/login/org.freedesktop.login1.policy:160
msgid "Authentication is required to reset how devices are attached to seats." msgid "Authentication is required to reset how devices are attached to seats."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby ponownie ustawić sposób podłączenia " "Wymagane jest uwierzytelnienie, aby ponownie ustawić sposób podłączenia "
"urządzeń do stanowisk." "urządzeń do stanowisk."
#: src/login/org.freedesktop.login1.policy:158 #: src/login/org.freedesktop.login1.policy:169
msgid "Power off the system" msgid "Power off the system"
msgstr "Wyłączenie systemu" msgstr "Wyłączenie systemu"
#: src/login/org.freedesktop.login1.policy:159 #: src/login/org.freedesktop.login1.policy:170
msgid "Authentication is required to power off the system." msgid "Authentication is required to power off the system."
msgstr "Wymagane jest uwierzytelnienie, aby wyłączyć system." msgstr "Wymagane jest uwierzytelnienie, aby wyłączyć system."
#: src/login/org.freedesktop.login1.policy:169 #: src/login/org.freedesktop.login1.policy:180
msgid "Power off the system while other users are logged in" msgid "Power off the system while other users are logged in"
msgstr "Wyłączenie systemu, kiedy są zalogowani inni użytkownicy" msgstr "Wyłączenie systemu, kiedy są zalogowani inni użytkownicy"
#: src/login/org.freedesktop.login1.policy:170 #: src/login/org.freedesktop.login1.policy:181
msgid "" msgid ""
"Authentication is required to power off the system while other users are " "Authentication is required to power off the system while other users are "
"logged in." "logged in."
@ -367,11 +381,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy są zalogowani " "Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy są zalogowani "
"inni użytkownicy." "inni użytkownicy."
#: src/login/org.freedesktop.login1.policy:180 #: src/login/org.freedesktop.login1.policy:191
msgid "Power off the system while an application is inhibiting this" msgid "Power off the system while an application is inhibiting this"
msgstr "Wyłączenie systemu, kiedy program je wstrzymuje" msgstr "Wyłączenie systemu, kiedy program je wstrzymuje"
#: src/login/org.freedesktop.login1.policy:181 #: src/login/org.freedesktop.login1.policy:192
msgid "" msgid ""
"Authentication is required to power off the system while an application is " "Authentication is required to power off the system while an application is "
"inhibiting this." "inhibiting this."
@ -379,19 +393,19 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy program to " "Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy program to "
"wstrzymuje." "wstrzymuje."
#: src/login/org.freedesktop.login1.policy:191 #: src/login/org.freedesktop.login1.policy:202
msgid "Reboot the system" msgid "Reboot the system"
msgstr "Ponowne uruchomienie systemu" msgstr "Ponowne uruchomienie systemu"
#: src/login/org.freedesktop.login1.policy:192 #: src/login/org.freedesktop.login1.policy:203
msgid "Authentication is required to reboot the system." msgid "Authentication is required to reboot the system."
msgstr "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system." msgstr "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system."
#: src/login/org.freedesktop.login1.policy:202 #: src/login/org.freedesktop.login1.policy:213
msgid "Reboot the system while other users are logged in" msgid "Reboot the system while other users are logged in"
msgstr "Ponowne uruchomienie systemu, kiedy są zalogowani inni użytkownicy" msgstr "Ponowne uruchomienie systemu, kiedy są zalogowani inni użytkownicy"
#: src/login/org.freedesktop.login1.policy:203 #: src/login/org.freedesktop.login1.policy:214
msgid "" msgid ""
"Authentication is required to reboot the system while other users are logged " "Authentication is required to reboot the system while other users are logged "
"in." "in."
@ -399,11 +413,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy są " "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy są "
"zalogowani inni użytkownicy." "zalogowani inni użytkownicy."
#: src/login/org.freedesktop.login1.policy:213 #: src/login/org.freedesktop.login1.policy:224
msgid "Reboot the system while an application is inhibiting this" msgid "Reboot the system while an application is inhibiting this"
msgstr "Ponowne uruchomienie systemu, kiedy program je wstrzymuje" msgstr "Ponowne uruchomienie systemu, kiedy program je wstrzymuje"
#: src/login/org.freedesktop.login1.policy:214 #: src/login/org.freedesktop.login1.policy:225
msgid "" msgid ""
"Authentication is required to reboot the system while an application is " "Authentication is required to reboot the system while an application is "
"inhibiting this." "inhibiting this."
@ -411,19 +425,19 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy program " "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy program "
"to wstrzymuje." "to wstrzymuje."
#: src/login/org.freedesktop.login1.policy:224 #: src/login/org.freedesktop.login1.policy:235
msgid "Halt the system" msgid "Halt the system"
msgstr "Zatrzymanie systemu" msgstr "Zatrzymanie systemu"
#: src/login/org.freedesktop.login1.policy:225 #: src/login/org.freedesktop.login1.policy:236
msgid "Authentication is required to halt the system." msgid "Authentication is required to halt the system."
msgstr "Wymagane jest uwierzytelnienie, aby zatrzymać system." msgstr "Wymagane jest uwierzytelnienie, aby zatrzymać system."
#: src/login/org.freedesktop.login1.policy:235 #: src/login/org.freedesktop.login1.policy:246
msgid "Halt the system while other users are logged in" msgid "Halt the system while other users are logged in"
msgstr "Zatrzymanie systemu, kiedy są zalogowani inni użytkownicy" msgstr "Zatrzymanie systemu, kiedy są zalogowani inni użytkownicy"
#: src/login/org.freedesktop.login1.policy:236 #: src/login/org.freedesktop.login1.policy:247
msgid "" msgid ""
"Authentication is required to halt the system while other users are logged " "Authentication is required to halt the system while other users are logged "
"in." "in."
@ -431,11 +445,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby zatrzymać system, kiedy są zalogowani " "Wymagane jest uwierzytelnienie, aby zatrzymać system, kiedy są zalogowani "
"inni użytkownicy." "inni użytkownicy."
#: src/login/org.freedesktop.login1.policy:246 #: src/login/org.freedesktop.login1.policy:257
msgid "Halt the system while an application is inhibiting this" msgid "Halt the system while an application is inhibiting this"
msgstr "Zatrzymanie systemu, kiedy program je wstrzymuje" msgstr "Zatrzymanie systemu, kiedy program je wstrzymuje"
#: src/login/org.freedesktop.login1.policy:247 #: src/login/org.freedesktop.login1.policy:258
msgid "" msgid ""
"Authentication is required to halt the system while an application is " "Authentication is required to halt the system while an application is "
"inhibiting this." "inhibiting this."
@ -443,19 +457,19 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby zatrzymać system, kiedy program to " "Wymagane jest uwierzytelnienie, aby zatrzymać system, kiedy program to "
"wstrzymuje." "wstrzymuje."
#: src/login/org.freedesktop.login1.policy:257 #: src/login/org.freedesktop.login1.policy:268
msgid "Suspend the system" msgid "Suspend the system"
msgstr "Uśpienie systemu" msgstr "Uśpienie systemu"
#: src/login/org.freedesktop.login1.policy:258 #: src/login/org.freedesktop.login1.policy:269
msgid "Authentication is required to suspend the system." msgid "Authentication is required to suspend the system."
msgstr "Wymagane jest uwierzytelnienie, aby uśpić system." msgstr "Wymagane jest uwierzytelnienie, aby uśpić system."
#: src/login/org.freedesktop.login1.policy:267 #: src/login/org.freedesktop.login1.policy:278
msgid "Suspend the system while other users are logged in" msgid "Suspend the system while other users are logged in"
msgstr "Uśpienie systemu, kiedy są zalogowani inni użytkownicy" msgstr "Uśpienie systemu, kiedy są zalogowani inni użytkownicy"
#: src/login/org.freedesktop.login1.policy:268 #: src/login/org.freedesktop.login1.policy:279
msgid "" msgid ""
"Authentication is required to suspend the system while other users are " "Authentication is required to suspend the system while other users are "
"logged in." "logged in."
@ -463,11 +477,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby uśpić system, kiedy są zalogowani inni " "Wymagane jest uwierzytelnienie, aby uśpić system, kiedy są zalogowani inni "
"użytkownicy." "użytkownicy."
#: src/login/org.freedesktop.login1.policy:278 #: src/login/org.freedesktop.login1.policy:289
msgid "Suspend the system while an application is inhibiting this" msgid "Suspend the system while an application is inhibiting this"
msgstr "Uśpienie systemu, kiedy program je wstrzymuje" msgstr "Uśpienie systemu, kiedy program je wstrzymuje"
#: src/login/org.freedesktop.login1.policy:279 #: src/login/org.freedesktop.login1.policy:290
msgid "" msgid ""
"Authentication is required to suspend the system while an application is " "Authentication is required to suspend the system while an application is "
"inhibiting this." "inhibiting this."
@ -475,19 +489,19 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby uśpić system, kiedy program to " "Wymagane jest uwierzytelnienie, aby uśpić system, kiedy program to "
"wstrzymuje." "wstrzymuje."
#: src/login/org.freedesktop.login1.policy:289 #: src/login/org.freedesktop.login1.policy:300
msgid "Hibernate the system" msgid "Hibernate the system"
msgstr "Hibernacja systemu" msgstr "Hibernacja systemu"
#: src/login/org.freedesktop.login1.policy:290 #: src/login/org.freedesktop.login1.policy:301
msgid "Authentication is required to hibernate the system." msgid "Authentication is required to hibernate the system."
msgstr "Wymagane jest uwierzytelnienie, aby zahibernować system." msgstr "Wymagane jest uwierzytelnienie, aby zahibernować system."
#: src/login/org.freedesktop.login1.policy:299 #: src/login/org.freedesktop.login1.policy:310
msgid "Hibernate the system while other users are logged in" msgid "Hibernate the system while other users are logged in"
msgstr "Hibernacja systemu, kiedy są zalogowani inni użytkownicy" msgstr "Hibernacja systemu, kiedy są zalogowani inni użytkownicy"
#: src/login/org.freedesktop.login1.policy:300 #: src/login/org.freedesktop.login1.policy:311
msgid "" msgid ""
"Authentication is required to hibernate the system while other users are " "Authentication is required to hibernate the system while other users are "
"logged in." "logged in."
@ -495,11 +509,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy są zalogowani " "Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy są zalogowani "
"inni użytkownicy." "inni użytkownicy."
#: src/login/org.freedesktop.login1.policy:310 #: src/login/org.freedesktop.login1.policy:321
msgid "Hibernate the system while an application is inhibiting this" msgid "Hibernate the system while an application is inhibiting this"
msgstr "Hibernacja systemu, kiedy program ją wstrzymuje" msgstr "Hibernacja systemu, kiedy program ją wstrzymuje"
#: src/login/org.freedesktop.login1.policy:311 #: src/login/org.freedesktop.login1.policy:322
msgid "" msgid ""
"Authentication is required to hibernate the system while an application is " "Authentication is required to hibernate the system while an application is "
"inhibiting this." "inhibiting this."
@ -507,40 +521,40 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy program to " "Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy program to "
"wstrzymuje." "wstrzymuje."
#: src/login/org.freedesktop.login1.policy:321 #: src/login/org.freedesktop.login1.policy:332
msgid "Manage active sessions, users and seats" msgid "Manage active sessions, users and seats"
msgstr "Zarządzanie aktywnymi sesjami, użytkownikami i stanowiskami" msgstr "Zarządzanie aktywnymi sesjami, użytkownikami i stanowiskami"
#: src/login/org.freedesktop.login1.policy:322 #: src/login/org.freedesktop.login1.policy:333
msgid "Authentication is required to manage active sessions, users and seats." msgid "Authentication is required to manage active sessions, users and seats."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby zarządzać aktywnymi sesjami, " "Wymagane jest uwierzytelnienie, aby zarządzać aktywnymi sesjami, "
"użytkownikami i stanowiskami." "użytkownikami i stanowiskami."
#: src/login/org.freedesktop.login1.policy:331 #: src/login/org.freedesktop.login1.policy:342
msgid "Lock or unlock active sessions" msgid "Lock or unlock active sessions"
msgstr "Zablokowanie lub odblokowanie aktywnych sesji" msgstr "Zablokowanie lub odblokowanie aktywnych sesji"
#: src/login/org.freedesktop.login1.policy:332 #: src/login/org.freedesktop.login1.policy:343
msgid "Authentication is required to lock or unlock active sessions." msgid "Authentication is required to lock or unlock active sessions."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby zablokować lub odblokować aktywne sesje." "Wymagane jest uwierzytelnienie, aby zablokować lub odblokować aktywne sesje."
#: src/login/org.freedesktop.login1.policy:341 #: src/login/org.freedesktop.login1.policy:352
msgid "Set the reboot \"reason\" in the kernel" msgid "Set the reboot \"reason\" in the kernel"
msgstr "Ustawienie przyczyny ponownego uruchomienia w jądrze" msgstr "Ustawienie przyczyny ponownego uruchomienia w jądrze"
#: src/login/org.freedesktop.login1.policy:342 #: src/login/org.freedesktop.login1.policy:353
msgid "Authentication is required to set the reboot \"reason\" in the kernel." msgid "Authentication is required to set the reboot \"reason\" in the kernel."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby ustawić przyczynę ponownego uruchomienia " "Wymagane jest uwierzytelnienie, aby ustawić przyczynę ponownego uruchomienia "
"w jądrze." "w jądrze."
#: src/login/org.freedesktop.login1.policy:352 #: src/login/org.freedesktop.login1.policy:363
msgid "Indicate to the firmware to boot to setup interface" msgid "Indicate to the firmware to boot to setup interface"
msgstr "Wskazanie oprogramowaniu sprzętowemu, aby uruchomić interfejs ustawień" msgstr "Wskazanie oprogramowaniu sprzętowemu, aby uruchomić interfejs ustawień"
#: src/login/org.freedesktop.login1.policy:353 #: src/login/org.freedesktop.login1.policy:364
msgid "" msgid ""
"Authentication is required to indicate to the firmware to boot to setup " "Authentication is required to indicate to the firmware to boot to setup "
"interface." "interface."
@ -548,11 +562,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby wskazać oprogramowaniu sprzętowemu, że " "Wymagane jest uwierzytelnienie, aby wskazać oprogramowaniu sprzętowemu, że "
"należy uruchomić interfejs ustawień." "należy uruchomić interfejs ustawień."
#: src/login/org.freedesktop.login1.policy:363 #: src/login/org.freedesktop.login1.policy:374
msgid "Indicate to the boot loader to boot to the boot loader menu" msgid "Indicate to the boot loader to boot to the boot loader menu"
msgstr "Wskazanie programowi startowemu, aby uruchomić jego menu" msgstr "Wskazanie programowi startowemu, aby uruchomić jego menu"
#: src/login/org.freedesktop.login1.policy:364 #: src/login/org.freedesktop.login1.policy:375
msgid "" msgid ""
"Authentication is required to indicate to the boot loader to boot to the " "Authentication is required to indicate to the boot loader to boot to the "
"boot loader menu." "boot loader menu."
@ -560,11 +574,11 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby wskazać programowi startowemu, że należy " "Wymagane jest uwierzytelnienie, aby wskazać programowi startowemu, że należy "
"uruchomić jego menu." "uruchomić jego menu."
#: src/login/org.freedesktop.login1.policy:374 #: src/login/org.freedesktop.login1.policy:385
msgid "Indicate to the boot loader to boot a specific entry" msgid "Indicate to the boot loader to boot a specific entry"
msgstr "Wskazanie programowi startowemu, aby uruchomić podany wpis" msgstr "Wskazanie programowi startowemu, aby uruchomić podany wpis"
#: src/login/org.freedesktop.login1.policy:375 #: src/login/org.freedesktop.login1.policy:386
msgid "" msgid ""
"Authentication is required to indicate to the boot loader to boot into a " "Authentication is required to indicate to the boot loader to boot into a "
"specific boot loader entry." "specific boot loader entry."
@ -572,19 +586,19 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby wskazać programowi startowemu, że należy " "Wymagane jest uwierzytelnienie, aby wskazać programowi startowemu, że należy "
"uruchomić podany wpis." "uruchomić podany wpis."
#: src/login/org.freedesktop.login1.policy:385 #: src/login/org.freedesktop.login1.policy:396
msgid "Set a wall message" msgid "Set a wall message"
msgstr "Ustawienie komunikatu wall" msgstr "Ustawienie komunikatu wall"
#: src/login/org.freedesktop.login1.policy:386 #: src/login/org.freedesktop.login1.policy:397
msgid "Authentication is required to set a wall message" msgid "Authentication is required to set a wall message"
msgstr "Wymagane jest uwierzytelnienie, aby ustawić komunikat wall" msgstr "Wymagane jest uwierzytelnienie, aby ustawić komunikat wall"
#: src/login/org.freedesktop.login1.policy:395 #: src/login/org.freedesktop.login1.policy:406
msgid "Change Session" msgid "Change Session"
msgstr "Zmiana sesji" msgstr "Zmiana sesji"
#: src/login/org.freedesktop.login1.policy:396 #: src/login/org.freedesktop.login1.policy:407
msgid "Authentication is required to change the virtual terminal." msgid "Authentication is required to change the virtual terminal."
msgstr "Wymagane jest uwierzytelnienie, aby zmienić terminal wirtualny." msgstr "Wymagane jest uwierzytelnienie, aby zmienić terminal wirtualny."
@ -905,25 +919,25 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby kontrolować, czy włączyć synchronizację " "Wymagane jest uwierzytelnienie, aby kontrolować, czy włączyć synchronizację "
"czasu przez sieć." "czasu przez sieć."
#: src/core/dbus-unit.c:362 #: src/core/dbus-unit.c:359
msgid "Authentication is required to start '$(unit)'." msgid "Authentication is required to start '$(unit)'."
msgstr "Wymagane jest uwierzytelnienie, aby uruchomić jednostkę „$(unit)”." msgstr "Wymagane jest uwierzytelnienie, aby uruchomić jednostkę „$(unit)”."
#: src/core/dbus-unit.c:363 #: src/core/dbus-unit.c:360
msgid "Authentication is required to stop '$(unit)'." msgid "Authentication is required to stop '$(unit)'."
msgstr "Wymagane jest uwierzytelnienie, aby zatrzymać jednostkę „$(unit)”." msgstr "Wymagane jest uwierzytelnienie, aby zatrzymać jednostkę „$(unit)”."
#: src/core/dbus-unit.c:364 #: src/core/dbus-unit.c:361
msgid "Authentication is required to reload '$(unit)'." msgid "Authentication is required to reload '$(unit)'."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby ponownie wczytać jednostkę „$(unit)”." "Wymagane jest uwierzytelnienie, aby ponownie wczytać jednostkę „$(unit)”."
#: src/core/dbus-unit.c:365 src/core/dbus-unit.c:366 #: src/core/dbus-unit.c:362 src/core/dbus-unit.c:363
msgid "Authentication is required to restart '$(unit)'." msgid "Authentication is required to restart '$(unit)'."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby ponownie uruchomić jednostkę „$(unit)”." "Wymagane jest uwierzytelnienie, aby ponownie uruchomić jednostkę „$(unit)”."
#: src/core/dbus-unit.c:538 #: src/core/dbus-unit.c:535
msgid "" msgid ""
"Authentication is required to send a UNIX signal to the processes of " "Authentication is required to send a UNIX signal to the processes of "
"'$(unit)'." "'$(unit)'."
@ -931,18 +945,18 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby wysłać sygnał uniksowy do procesów " "Wymagane jest uwierzytelnienie, aby wysłać sygnał uniksowy do procesów "
"jednostki „$(unit)”." "jednostki „$(unit)”."
#: src/core/dbus-unit.c:569 #: src/core/dbus-unit.c:566
msgid "Authentication is required to reset the \"failed\" state of '$(unit)'." msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby przywrócić stan „failed” (niepowodzenia) " "Wymagane jest uwierzytelnienie, aby przywrócić stan „failed” (niepowodzenia) "
"jednostki „$(unit)”." "jednostki „$(unit)”."
#: src/core/dbus-unit.c:602 #: src/core/dbus-unit.c:599
msgid "Authentication is required to set properties on '$(unit)'." msgid "Authentication is required to set properties on '$(unit)'."
msgstr "" msgstr ""
"Wymagane jest uwierzytelnienie, aby ustawić właściwości jednostki „$(unit)”." "Wymagane jest uwierzytelnienie, aby ustawić właściwości jednostki „$(unit)”."
#: src/core/dbus-unit.c:711 #: src/core/dbus-unit.c:708
msgid "" msgid ""
"Authentication is required to delete files and directories associated with " "Authentication is required to delete files and directories associated with "
"'$(unit)'." "'$(unit)'."
@ -950,7 +964,7 @@ msgstr ""
"Wymagane jest uwierzytelnienie, aby usunąć pliki i katalogi powiązane " "Wymagane jest uwierzytelnienie, aby usunąć pliki i katalogi powiązane "
"z jednostką „$(unit)”." "z jednostką „$(unit)”."
#: src/core/dbus-unit.c:760 #: src/core/dbus-unit.c:757
msgid "" msgid ""
"Authentication is required to freeze or thaw the processes of '$(unit)' unit." "Authentication is required to freeze or thaw the processes of '$(unit)' unit."
msgstr "" msgstr ""

View File

@ -4320,6 +4320,19 @@ static Set *unit_pid_set(pid_t main_pid, pid_t control_pid) {
return TAKE_PTR(pid_set); return TAKE_PTR(pid_set);
} }
static int kill_common_log(pid_t pid, int signo, void *userdata) {
_cleanup_free_ char *comm = NULL;
Unit *u = userdata;
assert(u);
(void) get_process_comm(pid, &comm);
log_unit_info(u, "Sending signal SIG%s to process " PID_FMT " (%s) on client request.",
signal_to_string(signo), pid, strna(comm));
return 1;
}
int unit_kill_common( int unit_kill_common(
Unit *u, Unit *u,
KillWho who, KillWho who,
@ -4331,34 +4344,67 @@ int unit_kill_common(
int r = 0; int r = 0;
bool killed = false; bool killed = false;
/* This is the common implementation for explicit user-requested killing of unit processes, shared by
* various unit types. Do not confuse with unit_kill_context(), which is what we use when we want to
* stop a service ourselves. */
if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL)) { if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL)) {
if (main_pid < 0) if (main_pid < 0)
return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_PROCESS, "%s units have no main processes", unit_type_to_string(u->type)); return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_PROCESS, "%s units have no main processes", unit_type_to_string(u->type));
else if (main_pid == 0) if (main_pid == 0)
return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No main process to kill"); return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No main process to kill");
} }
if (IN_SET(who, KILL_CONTROL, KILL_CONTROL_FAIL)) { if (IN_SET(who, KILL_CONTROL, KILL_CONTROL_FAIL)) {
if (control_pid < 0) if (control_pid < 0)
return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_PROCESS, "%s units have no control processes", unit_type_to_string(u->type)); return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_PROCESS, "%s units have no control processes", unit_type_to_string(u->type));
else if (control_pid == 0) if (control_pid == 0)
return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill"); return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill");
} }
if (IN_SET(who, KILL_CONTROL, KILL_CONTROL_FAIL, KILL_ALL, KILL_ALL_FAIL)) if (IN_SET(who, KILL_CONTROL, KILL_CONTROL_FAIL, KILL_ALL, KILL_ALL_FAIL))
if (control_pid > 0) { if (control_pid > 0) {
if (kill(control_pid, signo) < 0) _cleanup_free_ char *comm = NULL;
r = -errno; (void) get_process_comm(control_pid, &comm);
else
if (kill(control_pid, signo) < 0) {
/* Report this failure both to the logs and to the client */
sd_bus_error_set_errnof(
error, errno,
"Failed to send signal SIG%s to control process " PID_FMT " (%s): %m",
signal_to_string(signo), control_pid, strna(comm));
r = log_unit_warning_errno(
u, errno,
"Failed to send signal SIG%s to control process " PID_FMT " (%s) on client request: %m",
signal_to_string(signo), control_pid, strna(comm));
} else {
log_unit_info(u, "Sent signal SIG%s to control process " PID_FMT " (%s) on client request.",
signal_to_string(signo), control_pid, strna(comm));
killed = true; killed = true;
}
} }
if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL, KILL_ALL, KILL_ALL_FAIL)) if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL, KILL_ALL, KILL_ALL_FAIL))
if (main_pid > 0) { if (main_pid > 0) {
if (kill(main_pid, signo) < 0) _cleanup_free_ char *comm = NULL;
r = -errno; (void) get_process_comm(main_pid, &comm);
else
if (kill(main_pid, signo) < 0) {
if (r == 0)
sd_bus_error_set_errnof(
error, errno,
"Failed to send signal SIG%s to main process " PID_FMT " (%s): %m",
signal_to_string(signo), main_pid, strna(comm));
r = log_unit_warning_errno(
u, errno,
"Failed to send signal SIG%s to main process " PID_FMT " (%s) on client request: %m",
signal_to_string(signo), main_pid, strna(comm));
} else {
log_unit_info(u, "Sent signal SIG%s to main process " PID_FMT " (%s) on client request.",
signal_to_string(signo), main_pid, strna(comm));
killed = true; killed = true;
}
} }
if (IN_SET(who, KILL_ALL, KILL_ALL_FAIL) && u->cgroup_path) { if (IN_SET(who, KILL_ALL, KILL_ALL_FAIL) && u->cgroup_path) {
@ -4368,17 +4414,29 @@ int unit_kill_common(
/* Exclude the main/control pids from being killed via the cgroup */ /* Exclude the main/control pids from being killed via the cgroup */
pid_set = unit_pid_set(main_pid, control_pid); pid_set = unit_pid_set(main_pid, control_pid);
if (!pid_set) if (!pid_set)
return -ENOMEM; return log_oom();
q = cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, signo, 0, pid_set, NULL, NULL); q = cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, signo, 0, pid_set, kill_common_log, u);
if (q < 0 && !IN_SET(q, -EAGAIN, -ESRCH, -ENOENT)) if (q < 0) {
r = q; if (!IN_SET(q, -ESRCH, -ENOENT)) {
else if (r == 0)
sd_bus_error_set_errnof(
error, q,
"Failed to send signal SIG%s to auxiliary processes: %m",
signal_to_string(signo));
r = log_unit_warning_errno(
u, q,
"Failed to send signal SIG%s to auxiliary processes on client request: %m",
signal_to_string(signo));
}
} else
killed = true; killed = true;
} }
if (r == 0 && !killed && IN_SET(who, KILL_ALL_FAIL, KILL_CONTROL_FAIL)) /* If the "fail" versions of the operation are requested, then complain if the set of processes we killed is empty */
return -ESRCH; if (r == 0 && !killed && IN_SET(who, KILL_ALL_FAIL, KILL_CONTROL_FAIL, KILL_MAIN_FAIL))
return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No matching processes to kill");
return r; return r;
} }
@ -4964,8 +5022,9 @@ int unit_kill_context(
assert(u); assert(u);
assert(c); assert(c);
/* Kill the processes belonging to this unit, in preparation for shutting the unit down. /* Kill the processes belonging to this unit, in preparation for shutting the unit down. Returns > 0
* Returns > 0 if we killed something worth waiting for, 0 otherwise. */ * if we killed something worth waiting for, 0 otherwise. Do not confuse with unit_kill_common()
* which is used for user-requested killing of unit processes. */
if (c->kill_mode == KILL_NONE) if (c->kill_mode == KILL_NONE)
return 0; return 0;

View File

@ -120,3 +120,12 @@ https://wiki.debian.org/ArchitectureSpecificsMemo
For PRs that fix a currently deny-listed test, the PR should include removal For PRs that fix a currently deny-listed test, the PR should include removal
of the deny-list file. of the deny-list file.
In case a test fails, the full set of artifacts, including the journal of the
failed run, can be downloaded from the artifacts.tar.gz archive which will be
reachable in the same URL parent directory as the logs.gz that gets linked on
the Github CI status.
To add new dependencies or new binaries to the packages used during the tests,
a merge request can be sent to: https://salsa.debian.org/systemd-team/systemd
targeting the 'upstream-ci' branch.

View File

@ -37,7 +37,7 @@ test_create_image() {
) )
oldinitdir=$initdir oldinitdir=$initdir
export initdir=$TESTDIR/minimal export initdir=$TESTDIR/minimal
mkdir -p $initdir mkdir -p $initdir/usr/lib $initdir/etc
setup_basic_dirs setup_basic_dirs
install_basic_tools install_basic_tools
cp $os_release $initdir/usr/lib/os-release cp $os_release $initdir/usr/lib/os-release

View File

@ -74,18 +74,27 @@ machine="$(uname -m)"
if [ "${machine}" = "x86_64" ]; then if [ "${machine}" = "x86_64" ]; then
root_guid=4f68bce3-e8cd-4db1-96e7-fbcaf984b709 root_guid=4f68bce3-e8cd-4db1-96e7-fbcaf984b709
verity_guid=2c7357ed-ebd2-46d9-aec1-23d437ec2bf5 verity_guid=2c7357ed-ebd2-46d9-aec1-23d437ec2bf5
architecture="x86-64"
elif [ "${machine}" = "i386" ] || [ "${machine}" = "i686" ] || [ "${machine}" = "x86" ]; then elif [ "${machine}" = "i386" ] || [ "${machine}" = "i686" ] || [ "${machine}" = "x86" ]; then
root_guid=44479540-f297-41b2-9af7-d131d5f0458a root_guid=44479540-f297-41b2-9af7-d131d5f0458a
verity_guid=d13c5d3b-b5d1-422a-b29f-9454fdc89d76 verity_guid=d13c5d3b-b5d1-422a-b29f-9454fdc89d76
architecture="x86"
elif [ "${machine}" = "aarch64" ] || [ "${machine}" = "aarch64_be" ] || [ "${machine}" = "armv8b" ] || [ "${machine}" = "armv8l" ]; then elif [ "${machine}" = "aarch64" ] || [ "${machine}" = "aarch64_be" ] || [ "${machine}" = "armv8b" ] || [ "${machine}" = "armv8l" ]; then
root_guid=b921b045-1df0-41c3-af44-4c6f280d3fae root_guid=b921b045-1df0-41c3-af44-4c6f280d3fae
verity_guid=df3300ce-d69f-4c92-978c-9bfb0f38d820 verity_guid=df3300ce-d69f-4c92-978c-9bfb0f38d820
architecture="arm64"
elif [ "${machine}" = "arm" ]; then elif [ "${machine}" = "arm" ]; then
root_guid=69dad710-2ce4-4e3c-b16c-21a1d49abed3 root_guid=69dad710-2ce4-4e3c-b16c-21a1d49abed3
verity_guid=7386cdf2-203c-47a9-a498-f2ecce45a2d6 verity_guid=7386cdf2-203c-47a9-a498-f2ecce45a2d6
architecture="arm"
elif [ "${machine}" = "ia64" ]; then elif [ "${machine}" = "ia64" ]; then
root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97 root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97
verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571 verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571
architecture="ia64"
elif [ "${machine}" = "ppc64le" ]; then
# There's no support of PPC in the discoverable partitions specification yet, so skip the rest for now
echo OK >/testok
exit 0
else else
echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me" echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me"
exit 1 exit 1
@ -102,7 +111,7 @@ if [ ${root_size} -ge 1024 ]; then
else else
root_size="${root_size}KiB" root_size="${root_size}KiB"
fi fi
verity_size="${verity_size}KiB" verity_size="$((${verity_size} * 2))KiB"
uuid="$(head -c 32 ${image}.roothash | cut -c -8)-$(head -c 32 ${image}.roothash | cut -c 9-12)-$(head -c 32 ${image}.roothash | cut -c 13-16)-$(head -c 32 ${image}.roothash | cut -c 17-20)-$(head -c 32 ${image}.roothash | cut -c 21-)" uuid="$(head -c 32 ${image}.roothash | cut -c -8)-$(head -c 32 ${image}.roothash | cut -c 9-12)-$(head -c 32 ${image}.roothash | cut -c 13-16)-$(head -c 32 ${image}.roothash | cut -c 17-20)-$(head -c 32 ${image}.roothash | cut -c 21-)"
echo -e "label: gpt\nsize=${root_size}, type=${root_guid}, uuid=${uuid}" | sfdisk ${image}.gpt echo -e "label: gpt\nsize=${root_size}, type=${root_guid}, uuid=${uuid}" | sfdisk ${image}.gpt
uuid="$(tail -c 32 ${image}.roothash | cut -c -8)-$(tail -c 32 ${image}.roothash | cut -c 9-12)-$(tail -c 32 ${image}.roothash | cut -c 13-16)-$(tail -c 32 ${image}.roothash | cut -c 17-20)-$(tail -c 32 ${image}.roothash | cut -c 21-)" uuid="$(tail -c 32 ${image}.roothash | cut -c -8)-$(tail -c 32 ${image}.roothash | cut -c 9-12)-$(tail -c 32 ${image}.roothash | cut -c 13-16)-$(tail -c 32 ${image}.roothash | cut -c 17-20)-$(tail -c 32 ${image}.roothash | cut -c 21-)"
@ -118,8 +127,8 @@ losetup -d ${loop}
ROOT_UUID=$(systemd-id128 -u show $(head -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-) ROOT_UUID=$(systemd-id128 -u show $(head -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-)
VERITY_UUID=$(systemd-id128 -u show $(tail -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-) VERITY_UUID=$(systemd-id128 -u show $(tail -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-)
systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root","partition_uuid":"'$ROOT_UUID'","fstype":"squashfs","architecture":"x86-64","verity":"yes","node":' systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root","partition_uuid":"'$ROOT_UUID'","fstype":"squashfs","architecture":"'$architecture'","verity":"yes","node":'
systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root-verity","partition_uuid":"'$VERITY_UUID'","fstype":"DM_verity_hash","architecture":"x86-64","verity":null,"node":' systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root-verity","partition_uuid":"'$VERITY_UUID'","fstype":"DM_verity_hash","architecture":"'$architecture'","verity":null,"node":'
systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F "MARKER=1" systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F "MARKER=1"
systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F -f $os_release systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F -f $os_release