1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
Commit Graph

57861 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
bc012a3e91 analyze: add compare-versions
The interface, output, and exit status convention are all taken directly from
rpmdev-vercmp and dpkg --compare-versions. The implementation is different
though. See test-string-util for a list of known cases where we compare
strings incompatibly.

The idea is that this string comparison function will be declared as "the"
method to use for boot entry ordering in the specification and similar
uses. Thus it's nice to allow users to compare strings.
2022-05-19 09:07:34 +02:00
Zbigniew Jędrzejewski-Szmek
fddad5f4a6 analyze: allow verbs to return positive failure
No functional change is intended. The verbs where it wasn't immediately
clear if the success exit status is 0 or >= 0 are changed to explicitly
return 0. (I think it's better to be explicit than to rely on some call
stack always returning 0 on success.)

Some other functions are cleaned up to be more idiomatic.
2022-05-19 08:02:29 +02:00
Zbigniew Jędrzejewski-Szmek
d5dcd00ba2 analyze: use automatic cleanup in one more place 2022-05-19 08:02:29 +02:00
Zbigniew Jędrzejewski-Szmek
e2d999345e analyze: sort/fix header includes in one place 2022-05-19 08:02:29 +02:00
Zbigniew Jędrzejewski-Szmek
d970092fa5 test-string-util: include a copy of rpm's version comparison tests
We said that strverscmp_improved() is similar to rpm, so it's nice to include
their tests too so we can pin down the differences.

Our test is changed to print older<newer instead of newer>older.
(I know the computer doesn't care, but I find it much harder to think about
when newer is on the left…)

The rpm test strings are copied from
https://github.com/rpm-software-management/rpm/blob/master/tests/rpmvercmp.at.
rpmio is licensed GPL OR LGPL, so we can do that without any issue.
(I think it could be argued as "fair use" anyway, but that's not necessary
in this case.)
I kept the original form as much as possible so it'll be easy to copy things
back and forth in the future.
2022-05-17 17:15:16 +02:00
Zbigniew Jędrzejewski-Szmek
dbf43adce2 fundamental: make strverscmp_improved() return -1/0/+1 in all cases
We would return the result of strcmp(), i.e. some positive/negative value.
Now that we want to make this a documented interface for other people
to implement, let's make the implementation more contstrained, even if
we ourselves don't care about whether the specific values.
2022-05-17 16:33:43 +02:00
Zbigniew Jędrzejewski-Szmek
e77a55c599 fundamental/string-util-fundamental: include appropriate headers
We were using CMP() without pulling the definition in directly.
2022-05-17 16:33:43 +02:00
Zbigniew Jędrzejewski-Szmek
c3e4cbe0c5 basic: make macro-fundamental.h self-contained
When !SD_BOOT, it used size_t without including the appropriate header.
2022-05-17 16:33:43 +02:00
Zbigniew Jędrzejewski-Szmek
68df2df668 Clean up the text in description of strverscmp_improved() 2022-05-17 16:33:43 +02:00
Yu Watanabe
9b7c8253f9
Merge pull request #23403 from keszybz/docs-update
Say that we support recent version of major distros and other doc updates
2022-05-17 06:02:08 +09:00
Zbigniew Jędrzejewski-Szmek
2fd7ecd2da rpm: remove check if systemd is running in a few cases
rpms can be installed in two different modes: into a chroot, where the system
is not running, and onto a live system. In the first mode, where should create
all changes that are "permanent", and in the second mode, all changes which are
"permanent" but also those which only affect the running system. Thus, changes
like new modprobe rules, tmpfiles rules, binfmt rules, udev rules, etc., are
guarded by 'test -d "/run/systemd/system"' which is the official way to check
if systemd is running, so that they are *not* executed when installed into a
chroot. But the same logic does not apply to sysusers, hwdb, and the journal
catalog: all those files can and should result in changes being performed
immediately to the system. This makes the creation of immutable images possible
(because there are no permanent changes to executed after a reboot), and allows
other packages to depend on the the effect of those changes.

Thus, the guard to check if we're not in a chroot is dropped from triggers for
sysusers, hwdb, and the journal catalog. This means that those triggers will
execute, and no subsequent work is needed. systemd-sysusers.service,
systemd-journal-catalog-update.service, and systemd-hwdb-update.service.in all
have ConditionNeedsUpdate= so they they generally won't be invoked after a
reboot. (systemd.rpm does not touch /usr to trigger the condition, because the
%transfiletriggers make that unnecessary.)

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2085481
2022-05-16 21:27:34 +01:00
Pablo Ceballos
2d25154321 hwdb: Add Google Hangouts Meet speakermic
This device implements the phone mute HID usage as a toggle switch,
where 1 indicates muted, and 0 indicates unmuted. However, for a key
event 1 indicates that the key has been pressed and 0 indicates it has
been released. This mismatch causes issues, so prevent key events from
being generated for this HID usage.
2022-05-16 21:16:58 +01:00
Zbigniew Jędrzejewski-Szmek
5810c2042a README: say that recent releases are supported
Prompted by the discussion in
https://github.com/systemd/systemd/pull/23391.
2022-05-16 22:05:40 +02:00
Zbigniew Jędrzejewski-Szmek
ead7e86d20 README: recommend --no-rebuild for sudo meson install
sudo and rebuilding don't mix well.
C.f. fe2b7631ad.
2022-05-16 19:50:26 +02:00
Zbigniew Jędrzejewski-Szmek
12801295d1 README: add missing colons and wrap to ~80 columns
Some paragraphs were narrow for no good reason. Let's make things
a bit more uniform.
2022-05-16 19:50:26 +02:00
Zbigniew Jędrzejewski-Szmek
8458ca26c1 networkd: reword debug messages
"left from <something>" is not correct. "left <something>" would be the
usual form, but "left master interface" is not clear at all. So reword
those messages totally.

Follow-up for 3881fd406b.
2022-05-16 19:50:26 +02:00
Mike Gilbert
48139c7c57 meson: add 'pam' install_tag to pam modules 2022-05-16 17:58:27 +01:00
Nikolai Kostrigin
e4bb1a07ef hwdb: fix accelerometer mount matrix for Aquarius NS483
Signed-off-by: Nikolai Kostrigin <nickel@altlinux.org>
2022-05-16 17:57:52 +01:00
Luca Boccassi
9d9310e5f0
Merge pull request #23383 from yuwata/meson-suppress-warning
meson: suppress warning
2022-05-16 17:57:13 +01:00
Zbigniew Jędrzejewski-Szmek
f2f40edcb9 man: fix typo 2022-05-16 14:54:43 +02:00
Yu Watanabe
27408ef878
Merge pull request #23377 from nabijaczleweli/shopt
Fix shopt in 90-loaderentry, don't not lint kernel-install, respect `$TMPDIR`
2022-05-16 18:17:14 +09:00
Yu Watanabe
72db29beb5 fuzz: drop too large input
The original issue oss-fuzz#10734 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10734)
is that just the file size is too large, and not a issue in functions
tested by the fuzzer. It is not necessary to include the testcase.

Follow-up for c4f883b78e.

Fixes #23390.
2022-05-16 00:25:18 +01:00
Yu Watanabe
08a7e5459f core: fix comment 2022-05-16 05:18:30 +09:00
Yu Watanabe
8fe37dbdcf meson: always get libbpf include directory from pkgconfig 2022-05-16 04:27:36 +09:00
Yu Watanabe
4645074e6f meson: use fs.name() and fs.parent()
Follow-up for 1bd0cc452c.
2022-05-16 04:27:27 +09:00
Yu Watanabe
4a5bdeac7d meson: always use ExternalProgram.path()
Even if we use meson >= 0.55, using path() does not produce any error or
warning if the required version is below 0.55.

Let's convert path() with full_path() when we requires meson >= 0.55.
2022-05-16 03:39:38 +09:00
Yu Watanabe
3d954ef147 meson: disable bpf if skip-deps is enabled 2022-05-16 03:37:21 +09:00
Yu Watanabe
cf2dc69062 meson: use boolean for configuration_data.set10()
Setting with number is deprecated:
```
meson.build:1008: DEPRECATION: configuration_data.set10 with number. the `set10` method should only be used with booleans
```
2022-05-16 03:37:21 +09:00
Eli Schwartz
ac3eda3489 meson: use better shellscript argument passing
Passing potentially arbitrary data into a shellscript is potentially
very broken if you do not correctly quote it for use. This quoting must
be done as part of the interpretation of the data itself, e.g. python's
shlex.quote; simply formatting it into a string with double quotes is
NOT sufficient.

An alternative is to communicate the data reliably via argv to the shell
process, and allow the shell to internally handle it via `"$1"`, which
is quote-safe and will expand the data from argv as a single tokenized
word.
2022-05-16 03:04:16 +09:00
Piotr Drąg
63d08a8571 catalog,po: update Polish translation 2022-05-15 17:42:36 +01:00
Yu Watanabe
a9164757b7 po: update Japanese translation 2022-05-15 17:41:56 +01:00
Yu Watanabe
3dad6e6b86 git: ignore manifest 2022-05-15 15:35:46 +01:00
Luca Boccassi
943fadde48
Merge pull request #23378 from floppym/install-tags
Add install tags for nss modules and pkgconfig files
2022-05-15 14:52:19 +01:00
Luca Boccassi
488b8acaea
Merge pull request #23382 from yuwata/resolve-fix-dnssd-assertion
resolve: fix dnssd assertion
2022-05-15 14:49:24 +01:00
Yu Watanabe
4f6ebd43b2 resolve: merge variable declaration with same type 2022-05-15 10:26:24 +09:00
Yu Watanabe
a3f87e32b9 resolve/dnssd: make dnssd_render_instance_name() take Manager
As DnssdService object passed to dnssd_render_instance_name() may
not owned by Manager.

Fixes #23381.
2022-05-15 10:23:33 +09:00
Martin
c4c336e0cd hwdb: Add accel orientation for the I15-TG
Add accel orientation for the Cube iWork 10 I15-TG
2022-05-15 10:03:57 +09:00
Yu Watanabe
cee6833943 network: do not update interface group by default
This fixes a minor bug introduced by 10af8bb24b.
Before the commit, the interface group was set only when Group= is explicitly
specified, otherwise the interface group was kept. However, after the commit,
we need to specify Group= with an empty string to keep the current interface
group.
2022-05-15 08:24:13 +09:00
Nikolai Grigoriev
5a6bcbb001
hwdb: add touchpad parameters for Lenovo T15g Gen1 (#23373) 2022-05-15 06:39:02 +09:00
Mike Gilbert
260c0a80ac meson: add 'devel' install_tag to libsystemd.pc and libudev.pc 2022-05-14 11:59:13 -04:00
Mike Gilbert
35d17e15dc meson: add 'nss' install_tag to nss modules 2022-05-14 11:59:13 -04:00
наб
b32217e8d0
Don't not lint kernel-install 2022-05-14 15:21:34 +02:00
наб
b0bf2a802f
kernel-install: respect $TMPDIR 2022-05-14 15:14:33 +02:00
наб
003c81b26c
kernel-install: 90-loaderentry: remove shopt
Fixes: #23374
Fixes: 367165a406
2022-05-14 15:14:32 +02:00
Yu Watanabe
6530ca0d2b resolve: fix memleak
Fixes a bug introduced by 71aee23dba.

Fixes CID#1488763.
2022-05-14 10:52:29 +01:00
Yu Watanabe
618b3642e1 tree-wide: replace AF_LOCAL with AF_UNIX 2022-05-14 10:51:05 +01:00
Yu Watanabe
bf7a24e50f
Merge pull request #23370 from bluca/hwdb
Update hwdb and contrib list for rc3
2022-05-14 05:00:18 +09:00
Yu Watanabe
bdaf5c3df6
Merge pull request #23369 from yuwata/error-handling-fixlets
Several fixlets
2022-05-14 04:59:56 +09:00
Yu Watanabe
3881fd406b tree-wide: fix typo 2022-05-14 04:58:47 +09:00
Luca Boccassi
caddab0f04 hwdb: run 'update-hwdb' for v251-rc3 2022-05-13 17:17:33 +01:00