1
0
mirror of https://github.com/systemd/systemd synced 2026-02-26 17:24:47 +01:00

Compare commits

...

9 Commits

Author SHA1 Message Date
Ryan Zeigler
774e805959 Add BNCF NewBook 11 ACCEL_MOUNT_MATRIX to 60-sensor.hwdb
Corrects DE autorotation

Device description: https://www.bncfai.com/product/773/
2026-02-20 19:59:47 +00:00
Yu Watanabe
e17ef43f9d man/report: fix typo
Follow-up for e83cbc9372e66abacd9a8ecf45e1095010242127.
2026-02-21 03:00:51 +09:00
Michael Vogt
8471eca549 machine: switch CleanPool to SD_VARLINK_REQUIRES_MORE
The CleanPool requires --more to be set and checks that in
`vl_method_clean_pool`. By switching to SD_VARLINK_REQUIRES_MORE
this will automatically be handled and is more clear to
the varlink users.

Based on the comment from Lennart in
https://github.com/systemd/systemd/pull/40650#discussion_r2832378002
and the work done by Mike in 09388a6b9e4 (thanks!).
2026-02-20 18:01:08 +01:00
Luca Boccassi
699007a44f
repart: Report correct current disk size and error (#39813) 2026-02-20 17:00:28 +00:00
Antonio Alvarez Feijoo
16e7869cf3 mstack: parse --mkdir option
```
systemd-mstack: unrecognized option '--mkdir'
```

Follow-up for 8187cd18d61c9459f2fdb7591c9eb7c73afea24d
2026-02-20 16:56:16 +01:00
Jim Spentzos
e35b3494e1 po: Translated using Weblate (Greek)
Currently translated at 36.7% (97 of 264 strings)

Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main
2026-02-20 13:46:43 +00:00
Julian Sparber
f94d3180b0 repart-varlink: Consider only managed parititions for size errors
Report DiskTooSmall only if partitions managed by repart don't fit the
disk. Because if the disk is already full with forigin partitions we
would always report DiskTooSmall instead of InsufficentFreeSpace.
2026-02-20 11:36:35 +01:00
Julian Sparber
9ee029c8f6 repart-varlink: Calculate the size of foreign partitions
To decide whether the disk is to small or has insufficient free space we
need to know how much of the disk is filled with foreign partitions.
The calculated size is used in a future commit.
2026-02-20 11:23:09 +01:00
Julian Sparber
5036c9f596 repart: Sum partitions size to get current disk size instead of using total size
When working on disks the disk may have a total size bigger then the
actual allocated size, therefore sum up the current partitions to
calculate the current disk size instead of asuming that the entire disk
is currently allocated.
2026-02-20 11:19:10 +01:00
7 changed files with 71 additions and 46 deletions

View File

@ -216,6 +216,13 @@ sensor:modalias:acpi:KIOX010A:*:dmi:*:svnAMI:*:skuH8Y6:* # MaxBook Y14
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
ACCEL_LOCATION=display
#########################################
# BNCF
#########################################
sensor:modalias:acpi:NSA2513:NSA2513*:dmi:*svnBNCF:pnNewBook11* # NewBook 11 2-in-1
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, -1
#########################################
# BUSH
#########################################

View File

@ -50,7 +50,7 @@
them to standard output. Optionally takes one or more match expressions for filtering the metrics to
show. The expression either may be a literal metric family name to search for, or a prefix of one
(which will be matched only at dot boundaries). If multiple matches are specified as multiple
paramaters, any metric matching <emphasis>any</emphasis> of the specified matches are shown.</para>
parameters, any metric matching <emphasis>any</emphasis> of the specified matches are shown.</para>
<xi:include href="version-info.xml" xpointer="v260"/></listitem>
</varlistentry>

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-26 01:17+0000\n"
"PO-Revision-Date: 2026-02-01 15:58+0000\n"
"PO-Revision-Date: 2026-02-20 12:58+0000\n"
"Last-Translator: Jim Spentzos <jimspentzos2000@gmail.com>\n"
"Language-Team: Greek <https://translate.fedoraproject.org/projects/systemd/"
"main/el/>\n"
@ -18,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"
"X-Generator: Weblate 5.16\n"
#: src/core/org.freedesktop.systemd1.policy.in:22
msgid "Send passphrase back to system"
@ -163,11 +163,10 @@ msgid "Manage Home Directory Signing Keys"
msgstr ""
#: src/home/org.freedesktop.home1.policy:94
#, fuzzy
msgid "Authentication is required to manage signing keys for home directories."
msgstr ""
"Απαιτείται ταυτοποίηση για τη διαχείριση υπηρεσιών συστήματος ή άλλων "
"μονάδων."
"Απαιτείται ταυτοποίηση για τη διαχείριση της υπογραφής κλειδιών για "
"προσωπικούς καταλόγους."
#: src/home/pam_systemd_home.c:333
#, c-format
@ -372,9 +371,8 @@ msgid "Get system description"
msgstr "Λήψη περιγραφής συστήματος"
#: src/hostname/org.freedesktop.hostname1.policy:72
#, fuzzy
msgid "Authentication is required to get system description."
msgstr "Απαιτείται πιστοποίηση για να ορίσετε την ώρα ζώνης του συστήματος."
msgstr "Απαιτείται ταυτοποίηση για τη λήψη της περιγραφής συστήματος."
#: src/import/org.freedesktop.import1.policy:22
msgid "Import a disk image"

View File

@ -392,6 +392,7 @@ int vl_method_clean_pool(sd_varlink *link, sd_json_variant *parameters, sd_varli
assert(link);
assert(parameters);
assert(FLAGS_SET(flags, SD_VARLINK_METHOD_MORE));
if (manager->n_operations >= OPERATIONS_MAX)
return sd_varlink_error(link, "io.systemd.MachineImage.TooManyOperations", NULL);
@ -400,9 +401,6 @@ int vl_method_clean_pool(sd_varlink *link, sd_json_variant *parameters, sd_varli
if (r != 0)
return r;
if (!FLAGS_SET(flags, SD_VARLINK_METHOD_MORE))
return sd_varlink_error(link, SD_VARLINK_ERROR_EXPECTED_MORE, NULL);
if (manager->runtime_scope != RUNTIME_SCOPE_USER) {
r = varlink_verify_polkit_async(
link,

View File

@ -101,6 +101,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "umount", no_argument, NULL, 'u' },
{ "json", required_argument, NULL, ARG_JSON },
{ "read-only", no_argument, NULL, 'r' },
{ "mkdir", no_argument, NULL, ARG_MKDIR },
{ "rmdir", no_argument, NULL, ARG_RMDIR },
{ "image-policy", required_argument, NULL, ARG_IMAGE_POLICY },
{ "image-filter", required_argument, NULL, ARG_IMAGE_FILTER },

View File

@ -10208,44 +10208,60 @@ done:
static int determine_auto_size(
Context *c,
int level,
bool ignore_allocated, /* If true, determines unallocated space needed */
uint64_t *ret) {
uint64_t *ret_current_size,
uint64_t *ret_foreign_size,
uint64_t *ret_minimal_size) {
uint64_t sum;
uint64_t current_size, foreign_size, minimal_size;
assert(c);
sum = round_up_size(GPT_METADATA_SIZE, 4096);
minimal_size = round_up_size(GPT_METADATA_SIZE, 4096);
if (c->from_scratch)
current_size = 0;
else
current_size = round_up_size(GPT_METADATA_SIZE, 4096);
foreign_size = 0;
LIST_FOREACH(partitions, p, c->partitions) {
uint64_t m;
if (PARTITION_IS_FOREIGN(p))
foreign_size += p->current_size;
if (PARTITION_EXISTS(p))
current_size += p->current_size;
if (p->dropped || PARTITION_SUPPRESSED(p))
continue;
m = partition_min_size_with_padding(c, p);
if (m > UINT64_MAX - sum)
if (m > UINT64_MAX - minimal_size)
return log_error_errno(SYNTHETIC_ERRNO(EOVERFLOW), "Image would grow too large, refusing.");
if (ignore_allocated && PARTITION_EXISTS(p))
m = LESS_BY(m, p->current_size + p->current_padding);
sum += m;
minimal_size += m;
}
if (c->total != UINT64_MAX)
if (current_size != 0)
/* Image already allocated? Then show its size. */
log_full(level,
"Automatically determined minimal disk image size as %s, current block device/image size is %s.",
FORMAT_BYTES(sum), FORMAT_BYTES(c->total));
FORMAT_BYTES(minimal_size), FORMAT_BYTES(current_size));
else
/* If the image is being created right now, then it has no previous size, suppress any comment about it hence. */
log_full(level,
"Automatically determined minimal disk image size as %s.",
FORMAT_BYTES(sum));
FORMAT_BYTES(minimal_size));
if (ret_current_size)
*ret_current_size = current_size;
if (ret_foreign_size)
*ret_foreign_size = foreign_size;
if (ret_minimal_size)
*ret_minimal_size = minimal_size;
if (ret)
*ret = sum;
return 0;
}
@ -10472,53 +10488,58 @@ static int vl_method_run(
/* If we have no node, just sum up how much space we need */
if (!context->node) {
/* Check if space issue is caused by the whole disk being too small */
uint64_t size;
r = determine_auto_size(context, LOG_DEBUG, /* ignore_allocated= */ false, &size);
uint64_t minimal_size;
r = determine_auto_size(context, LOG_DEBUG, /* ret_current_size= */ NULL, /* ret_foreign_size= */ NULL, &minimal_size);
if (r < 0)
return r;
return sd_varlink_replybo(
link,
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", size));
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", minimal_size));
}
r = context_ponder(context);
if (r == -ENOSPC) {
uint64_t current_size, foreign_size, minimal_size;
r = determine_auto_size(context, LOG_DEBUG, &current_size, &foreign_size, &minimal_size);
if (r < 0)
return r;
uint64_t needed_size = LESS_BY(minimal_size, foreign_size);
/* Check if space issue is caused by the whole disk being too small */
uint64_t size = UINT64_MAX;
(void) determine_auto_size(context, LOG_DEBUG, /* ignore_allocated= */ false, &size);
if (size != UINT64_MAX && context->total != UINT64_MAX && size > context->total)
if (needed_size > context->total)
return sd_varlink_errorbo(
link,
"io.systemd.Repart.DiskTooSmall",
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", size),
SD_JSON_BUILD_PAIR_UNSIGNED("currentSizeBytes", context->total));
SD_JSON_BUILD_PAIR_UNSIGNED("currentSizeBytes", current_size),
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", minimal_size));
/* Or if the disk would fit, but theres's not enough unallocated space */
uint64_t need_free = UINT64_MAX;
(void) determine_auto_size(context, LOG_DEBUG, /* ignore_allocated= */ true, &need_free);
uint64_t need_free = LESS_BY(minimal_size, current_size);
return sd_varlink_errorbo(
link,
"io.systemd.Repart.InsufficientFreeSpace",
JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL("minimalSizeBytes", size, UINT64_MAX),
JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL("needFreeBytes", need_free, UINT64_MAX),
JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL("currentSizeBytes", context->total, UINT64_MAX));
SD_JSON_BUILD_PAIR_UNSIGNED("currentSizeBytes", current_size),
JSON_BUILD_PAIR_UNSIGNED_NON_ZERO("needFreeBytes", need_free),
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", minimal_size));
}
if (r < 0)
return r;
if (p.dry_run) {
uint64_t size;
uint64_t current_size, minimal_size;
/* If we are doing a dry-run, report the minimal size. */
r = determine_auto_size(context, LOG_DEBUG, /* ignore_allocated= */ false, &size);
r = determine_auto_size(context, LOG_DEBUG, &current_size, /* ret_foreign_size= */ NULL, &minimal_size);
if (r < 0)
return r;
return sd_varlink_replybo(
link,
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", size),
JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL("currentSizeBytes", context->total, UINT64_MAX));
SD_JSON_BUILD_PAIR_UNSIGNED("minimalSizeBytes", minimal_size),
SD_JSON_BUILD_PAIR_UNSIGNED("currentSizeBytes", current_size));
}
r = context_write_partition_table(context);
@ -10764,12 +10785,12 @@ static int run(int argc, char *argv[]) {
return r;
if (arg_node_none) {
(void) determine_auto_size(context, LOG_INFO, /* ignore_allocated= */ false, /* ret= */ NULL);
(void) determine_auto_size(context, LOG_INFO, /* ret_current_size= */ NULL, /* ret_foreign_size= */ NULL, /* ret_minimal_size= */ NULL);
return 0;
}
if (arg_size_auto) {
r = determine_auto_size(context, LOG_INFO, /* ignore_allocated= */ false, &arg_size);
r = determine_auto_size(context, LOG_INFO, /* ret_current_size= */ NULL, /* ret_foreign_size= */ NULL, &arg_size);
if (r < 0)
return r;
@ -10794,7 +10815,7 @@ static int run(int argc, char *argv[]) {
r = context_ponder(context);
if (r == -ENOSPC) {
/* When we hit space issues, tell the user the minimal size. */
(void) determine_auto_size(context, LOG_INFO, /* ignore_allocated= */ false, /* ret= */ NULL);
(void) determine_auto_size(context, LOG_INFO, /* ret_current_size= */ NULL, /* ret_foreign_size= */ NULL, /* ret_minimal_size= */ NULL);
return r;
}
if (r < 0)

View File

@ -95,7 +95,7 @@ static SD_VARLINK_DEFINE_ENUM_TYPE(
static SD_VARLINK_DEFINE_METHOD_FULL(
CleanPool,
SD_VARLINK_SUPPORTS_MORE,
SD_VARLINK_REQUIRES_MORE,
VARLINK_DEFINE_POLKIT_INPUT,
SD_VARLINK_FIELD_COMMENT("Allows removing all or only hidden images"),
SD_VARLINK_DEFINE_INPUT_BY_TYPE(mode, CleanPoolMode, 0),