]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
21 months agoMerge pull request #24538 from mrc0mmand/TEST-13-tweaks
Luca Boccassi [Fri, 2 Sep 2022 23:16:36 +0000 (00:16 +0100)] 
Merge pull request #24538 from mrc0mmand/TEST-13-tweaks

test: forward nspawn logs to journal

21 months agoMerge pull request #24546 from mrc0mmand/test-exec-deserialization-tweaks
Luca Boccassi [Fri, 2 Sep 2022 23:15:45 +0000 (00:15 +0100)] 
Merge pull request #24546 from mrc0mmand/test-exec-deserialization-tweaks

A couple of tweaks for test-exec-deserialization

21 months agotest: suppress not-found errors for `selinuxenabled` 24538/head
Frantisek Sumsal [Fri, 2 Sep 2022 17:39:30 +0000 (19:39 +0200)] 
test: suppress not-found errors for `selinuxenabled`

if the binary is not available.

21 months agotest: forward nspawn logs to journal
Frantisek Sumsal [Fri, 2 Sep 2022 10:43:02 +0000 (12:43 +0200)] 
test: forward nspawn logs to journal

Dumping everything to console slows the test quite considerably on
slower machines, so let's forward nspawn logs to the journal to still
have them available in case something goes south.

This should, hopefully, help with TEST-13 timeouts in Ubuntu CI and
maybe with CPU soft lockups in CentOS CI.

21 months agoMerge pull request #24541 from poettering/bootspec-tweaks
Lennart Poettering [Fri, 2 Sep 2022 19:29:31 +0000 (21:29 +0200)] 
Merge pull request #24541 from poettering/bootspec-tweaks

bootspec: slightly stricter validation + process tries-left/tries-done counters in filenames

21 months agomkosi: update to latest commit
Luca Boccassi [Fri, 2 Sep 2022 18:15:46 +0000 (19:15 +0100)] 
mkosi: update to latest commit

Required to fix Debian testing/unstable builds, as resolved is
now in its own package

21 months agotest: make pylint happy 24546/head
Frantisek Sumsal [Fri, 2 Sep 2022 18:14:53 +0000 (20:14 +0200)] 
test: make pylint happy

21 months agolog: don't attempt to duplicate closed fd
Lennart Poettering [Fri, 2 Sep 2022 16:35:03 +0000 (18:35 +0200)] 
log: don't attempt to duplicate closed fd

if the console fd is not open we shouldn#t try to move it out of the 0…2
range.

Fixes: #24535
Alternative-for: #24537

21 months agotest: check for the output file in a loop
Frantisek Sumsal [Fri, 2 Sep 2022 18:06:12 +0000 (20:06 +0200)] 
test: check for the output file in a loop

This should make the test faster on fast machines and more reliable on
slower/under-load machines, where the 4 sec sleep wasn't sometimes enough.

Spotted on C8S machines under load:

```
test_added_after (__main__.ExecutionResumeTest) ... FAIL
test_added_before (__main__.ExecutionResumeTest) ... ok
test_interleaved (__main__.ExecutionResumeTest) ... ok
test_issue_6533 (__main__.ExecutionResumeTest) ... ok
test_no_change (__main__.ExecutionResumeTest) ... ok
test_removal (__main__.ExecutionResumeTest) ... ok
test_swapped (__main__.ExecutionResumeTest) ... ok

======================================================================
FAIL: test_added_after (__main__.ExecutionResumeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test/test-exec-deserialization.py", line 101, in check_output
    with open(self.output_file, 'r') as log:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpjnec1dj4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test/test-exec-deserialization.py", line 150, in test_added_after
    self.check_output(expected_output)
  File "./test/test-exec-deserialization.py", line 104, in check_output
    self.fail()
AssertionError: None

----------------------------------------------------------------------
Ran 7 tests in 44.270s
```

21 months agoMerge pull request #24536 from yuwata/dissect-take-loop-device
Yu Watanabe [Fri, 2 Sep 2022 18:05:57 +0000 (03:05 +0900)] 
Merge pull request #24536 from yuwata/dissect-take-loop-device

dissect-image: introduce dissect_loop_device() which takes LoopDevice object

21 months agodissect-image: introduce dissect_loop_device() which takes LoopDevice object 24536/head
Yu Watanabe [Fri, 2 Sep 2022 10:09:51 +0000 (19:09 +0900)] 
dissect-image: introduce dissect_loop_device() which takes LoopDevice object

21 months agofind-esp: call the right function
Lennart Poettering [Fri, 2 Sep 2022 09:08:50 +0000 (11:08 +0200)] 
find-esp: call the right function

We want the parent dir here, let's fix that.

21 months agoupdate TODO 24541/head
Lennart Poettering [Fri, 2 Sep 2022 11:48:32 +0000 (13:48 +0200)] 
update TODO

21 months agobootspec: clarify we knowingly ignore all errors but ENOMEM
Lennart Poettering [Fri, 2 Sep 2022 11:41:59 +0000 (13:41 +0200)] 
bootspec: clarify we knowingly ignore all errors but ENOMEM

21 months agobootspec: properly parse tries done/tries left from bootspec file names
Lennart Poettering [Fri, 2 Sep 2022 11:41:09 +0000 (13:41 +0200)] 
bootspec: properly parse tries done/tries left from bootspec file names

This has been a long-time omission in the userspace parser of bootspec
files. Correct that.

Fixes: #16457
21 months agoloop-util: always set LoopDevice.node
Yu Watanabe [Fri, 2 Sep 2022 15:40:23 +0000 (00:40 +0900)] 
loop-util: always set LoopDevice.node

21 months agoloop-util: rename loopdev -> node
Yu Watanabe [Fri, 2 Sep 2022 15:39:07 +0000 (00:39 +0900)] 
loop-util: rename loopdev -> node

Preparation for the next commit. No functional change.

21 months agocore/swap: use devname_from_stat_rdev()
Yu Watanabe [Fri, 2 Sep 2022 15:35:50 +0000 (00:35 +0900)] 
core/swap: use devname_from_stat_rdev()

21 months agosd-device: introduce devname_from_stat_rdev()
Yu Watanabe [Fri, 2 Sep 2022 15:35:34 +0000 (00:35 +0900)] 
sd-device: introduce devname_from_stat_rdev()

21 months agosd-device: rename devpath_from_devnum() -> devname_from_devnum()
Yu Watanabe [Fri, 2 Sep 2022 15:28:03 +0000 (00:28 +0900)] 
sd-device: rename devpath_from_devnum() -> devname_from_devnum()

In sd-device, `devpath` is a kind of syspath without '/sys' prefix, e.g.
/devices/pci0000:00/0000:00:1c.4/0000:3c:00.0/nvme/nvme0/nvme0n1,
and `devname` is a path to the device node, e.g. /dev/nvme0n1.

Let's use the consistent name for the helper function.

21 months agobootspec: rename "id" function parameters to "fname"
Lennart Poettering [Fri, 2 Sep 2022 09:40:26 +0000 (11:40 +0200)] 
bootspec: rename "id" function parameters to "fname"

It's really the file name, so name it like that. Just some renaming.

(This is preparation for later work, to extract tries-done/tries-left
info from filenames)

21 months agobootspec: complain about loader.conf lines without parameter
Lennart Poettering [Fri, 2 Sep 2022 09:33:48 +0000 (11:33 +0200)] 
bootspec: complain about loader.conf lines without parameter

21 months agobootspec: port type1 parser to log_syntax()
Lennart Poettering [Fri, 2 Sep 2022 09:04:44 +0000 (11:04 +0200)] 
bootspec: port type1 parser to log_syntax()

21 months agobootspec: let's actually use the result of strstrip() for further parsing
Lennart Poettering [Fri, 2 Sep 2022 09:07:22 +0000 (11:07 +0200)] 
bootspec: let's actually use the result of strstrip() for further parsing

Also, given we are looking for whitespace as separators, just pass NULL
as separators, extract_first_word() defaults to whitespace after all.

21 months agobootspec: simplify paths + insist they are normalized
Lennart Poettering [Fri, 2 Sep 2022 09:04:51 +0000 (11:04 +0200)] 
bootspec: simplify paths + insist they are normalized

Inspired by #23913, let's complain if people use paths with ".."
in Type #1 bootspec entries.

Let's prefix all paths with "/" if it is missing.

Let's simplify all paths.

let's refuse paths/warn with "..".

Fixes: #23913
21 months agoMerge pull request #24491 from poettering/compare-order
Lennart Poettering [Fri, 2 Sep 2022 05:18:10 +0000 (07:18 +0200)] 
Merge pull request #24491 from poettering/compare-order

condition: unify operator parsing handling

21 months agosysusers: make sp_lstchg shadow field reproducible
Johannes Schauer Marin Rodrigues [Thu, 1 Sep 2022 09:49:19 +0000 (11:49 +0200)] 
sysusers: make sp_lstchg shadow field reproducible

If the environment variable SOURCE_DATE_EPOCH is set, use its value
instead of the current time.

21 months agoMerge pull request #24530 from poettering/loop-with-more-lock
Luca Boccassi [Thu, 1 Sep 2022 23:04:32 +0000 (00:04 +0100)] 
Merge pull request #24530 from poettering/loop-with-more-lock

a variety of loopback block device fixes

21 months agomention ConditionKernelVersion= compat break in NEWS 24491/head
Lennart Poettering [Thu, 1 Sep 2022 21:20:11 +0000 (23:20 +0200)] 
mention ConditionKernelVersion= compat break in NEWS

21 months agocondition: change operator logic to use $= instead of =$ for glob comparisons
Lennart Poettering [Mon, 29 Aug 2022 11:42:44 +0000 (13:42 +0200)] 
condition: change operator logic to use $= instead of =$ for glob comparisons

So this is a bit of a bikeshedding thing. But I think we should do this
nonetheless, before this is released.

Playing around with the glob matches I realized that "=$" is really hard
to grep for, since in shell code it's an often seen construct. Also,
when reading code I often found myself thinking first that the "$"
belongs to the rvalue instead of the operator, in a variable expansion
scheme.

If we move the $ character to the left hand, I think we are on the safer
side, since usually lvalues are much more restricted in character sets
than rvalues (at least most programming languages do enforce limits on
the character set for identifiers).

It makes it much easier to grep for the new operator, and easier to read
too. Example:

before:
    ConditionOSRelease=ID=$fedora-*
after:
    ConditionOSRelease=ID$=fedora-*

21 months agocondition: change ConditionKernelVersion= so that =/!= mean literal string comparison...
Lennart Poettering [Mon, 29 Aug 2022 11:27:11 +0000 (13:27 +0200)] 
condition: change ConditionKernelVersion= so that =/!= mean literal string comparison, and ==/<> version comparison

The only reason to do this is to ensure uniformity with the other
options, that work like this, i.e. ConditionOSRelease= or
ConditionSecurity=.

This is a compatibility break, but a minor one, given that string
comparison and version comparison is mostly the same for equality and
inequality.

21 months agocondition: allow literal string compares in SMBIOS condition
Lennart Poettering [Mon, 29 Aug 2022 09:10:38 +0000 (11:10 +0200)] 
condition: allow literal string compares in SMBIOS condition

This ensures that "=" and "!=" are now interpreted as literal string
compares, and "==" and "<>" are for version compares.

This is not a compat break, since the SMBIOS stuff has not been included
in any release yet.

Main reason to do this, is to be systematic with the other conditions
that check for text stuff.

21 months agocondition: allow fnmatch() matches in ConditionKernelVersion=
Lennart Poettering [Mon, 29 Aug 2022 09:10:18 +0000 (11:10 +0200)] 
condition: allow fnmatch() matches in ConditionKernelVersion=

This is mostly to make things systematic, and brings no new
functionality, as not specifying any operator is identical to prefixing
with =$ anyway.

21 months agocompare: add macro for operator charset
Lennart Poettering [Mon, 29 Aug 2022 09:09:48 +0000 (11:09 +0200)] 
compare: add macro for operator charset

21 months agocompare: propagate errors of fnmatch() as errors
Lennart Poettering [Mon, 29 Aug 2022 09:08:18 +0000 (11:08 +0200)] 
compare: propagate errors of fnmatch() as errors

21 months agocompare: support textual operators, and port analyze over to it
Lennart Poettering [Fri, 26 Aug 2022 15:31:34 +0000 (17:31 +0200)] 
compare: support textual operators, and port analyze over to it

21 months agocompare: add two new operators "==" and "<>"
Lennart Poettering [Fri, 26 Aug 2022 15:20:56 +0000 (17:20 +0200)] 
compare: add two new operators "==" and "<>"

These two operators always indicate ordering comparisons, as opposed to
"=" and "!=" which depending on context mean literal string compares.

This is useful for ConditionOSRelease= for example, as this means
there's now always a way to do version compares.

21 months agocompare: rework table in parse_compare_operator() to be array of structs
Lennart Poettering [Fri, 26 Aug 2022 15:08:37 +0000 (17:08 +0200)] 
compare: rework table in parse_compare_operator() to be array of structs

Let's change the lookup table to contain pairs of operator/strings,
instead of being indexed by operator.

The table isn't dense anymore, and this allows us to add alias strings
sooner or later.

21 months agocondition: allow fnmatch compares for ConditionOSRelease=
Lennart Poettering [Fri, 26 Aug 2022 14:59:47 +0000 (16:59 +0200)] 
condition: allow fnmatch compares for ConditionOSRelease=

We support this for smbios matches, hence do so for /etc/os-release
matches too.

21 months agocompare: add flag for parse_compare_operator() to do equality/inequality comparison...
Lennart Poettering [Fri, 26 Aug 2022 14:56:04 +0000 (16:56 +0200)] 
compare: add flag for parse_compare_operator() to do equality/inequality comparison via simple string compares

This allows us to switch condition_test_osrelease() to use generic
version_or_fnmatch_compare() for executing the comparison.

21 months agocompare: add a proper flags field for parse_compare_operator()
Lennart Poettering [Fri, 26 Aug 2022 14:51:12 +0000 (16:51 +0200)] 
compare: add a proper flags field for parse_compare_operator()

21 months agocompare: drop use of FNM_EXTMATCH for now
Lennart Poettering [Fri, 26 Aug 2022 14:31:30 +0000 (16:31 +0200)] 
compare: drop use of FNM_EXTMATCH for now

None of our other fnmatch() calls make use of this, and the concept was
new to me at least. Given that this is only used for the recently added
SMBIOS field matches (and is not included in any release) let's disable
"extended" matches for now. We can certainly revisit this, and enable it
later if there is real demand, but if we do, we should probably add that
all over the place, not just for smbios matches.

21 months agocomapre: add generic implementation for comapring with verscmp+fnmatch
Lennart Poettering [Fri, 26 Aug 2022 14:28:06 +0000 (16:28 +0200)] 
comapre: add generic implementation for comapring with verscmp+fnmatch

21 months agocompare: move test_order() → compare-operator.[ch]
Lennart Poettering [Fri, 26 Aug 2022 14:27:55 +0000 (16:27 +0200)] 
compare: move test_order() → compare-operator.[ch]

21 months agocondition: split out order operator enum
Lennart Poettering [Fri, 26 Aug 2022 14:10:40 +0000 (16:10 +0200)] 
condition: split out order operator enum

Let's move the operator enum into its own .c/.h file, so that we can
reuse it elsewhere, in particular systemd-analyze's compare-versions
logic.

Let's rename the concept CompareOperator, since it is nowadays
genericlaly about both order *and* fnmatch comparisons, hence just
naming it "order" is misleading.

21 months agoloop-util: make clearer how LoopDevice objects that do not encapsulate an actual... 24530/head
Lennart Poettering [Thu, 1 Sep 2022 19:34:58 +0000 (21:34 +0200)] 
loop-util: make clearer how LoopDevice objects that do not encapsulate an actual loopback device are set up

21 months agoloop-util: lock the control device around clearing the loopback device and deleting it
Lennart Poettering [Thu, 1 Sep 2022 13:57:10 +0000 (15:57 +0200)] 
loop-util: lock the control device around clearing the loopback device and deleting it

This mirrors what we already do during allocation. We lock the control
device first, and then release the block device and then delete it.

This makes things substantially more robust as long all participants do
such locking: we won't attempt to delete a block device somebody else
already is using.

21 months agoloop-util: close lock fd before trying LOOP_CLR_FD in failure path
Lennart Poettering [Thu, 1 Sep 2022 13:42:32 +0000 (15:42 +0200)] 
loop-util: close lock fd before trying LOOP_CLR_FD in failure path

If the loopback device is open more than once LOOP_CLR_FD will fail,
hence close the lock fd first explicitly, so there's definitely only one
fd left.

21 months agoloop-util: drop code to attach empty file
Lennart Poettering [Thu, 1 Sep 2022 13:17:01 +0000 (15:17 +0200)] 
loop-util: drop code to attach empty file

Back when I wrote this code I wasn't aware of BLKPG and what it can do.
Hence I came up with this hack to attach an empty file to delete all
partitions. But today we can do better with BLKPG: let's just explicitly
remove all partitions, and then try again.

21 months agoloop-util: rework how we lock loopback block devices
Lennart Poettering [Thu, 1 Sep 2022 13:00:30 +0000 (15:00 +0200)] 
loop-util: rework how we lock loopback block devices

Let's rework how we lock loopback block devices in two ways:

1. Lock a separate fd, instead of the main block device fd. We already
   did that for our internal locking when allocating loopback block
   devices, but do so for the exposed locking (i.e.
   loop_device_flock()), too, so that the lock is independent of the
   main fd we actually use of IO.

2. Instead of locking the device during allocation of the loopback
   device, then unlocking it (which will make udev run), and then
   re-locking things if we need, let's instead just keep the lock the
   whole time, to make things a bit safer and faster, and not have to
   wait for udev at all. This is done by adding a "lock_op" parameter to
   loop device allocation functions that declares the initial state of
   the lock, and is one of LOCK_UN/LOCK_SH/LOCK_EX. This change also
   shortens a lot of code, since we allocate + immediately lock loopback
   devices pretty much everywhere.

21 months agodissect: drop partition removal code
Lennart Poettering [Thu, 1 Sep 2022 10:38:53 +0000 (12:38 +0200)] 
dissect: drop partition removal code

This reverts a major chunk of 75d7e04eb4662a814c26010d447eed8a862f5ec1

Now that the loopback device code already destroys the partitions we
don't have to do this here anymore.

I am sure the right place to delete the partitions is in the loopback
code, since we really only should do that for loopback devices, see
bug #24431, and not on "real" block devices.

I am also not convinced dropping partitions the dissection logic doesn't
care about is a good idea, after all. The dissection stuff should
probably not consider itself the "owner" of the block devices it
analyzes, but take a more passive role: figure out what is what, but not
modify it.

Fixes: #24431
21 months agodissect: don't remove partitions explicitly on umount anymore
Lennart Poettering [Thu, 1 Sep 2022 12:59:56 +0000 (14:59 +0200)] 
dissect: don't remove partitions explicitly on umount anymore

We do that now automatically when releasing the loopback device, hence
we can drop the redundant try entirely.

21 months agoloop-util: when clearing a loopback device delete partitions first, and take BSD...
Lennart Poettering [Thu, 1 Sep 2022 10:32:48 +0000 (12:32 +0200)] 
loop-util: when clearing a loopback device delete partitions first, and take BSD lock

Whenever we release a loopback device, let's first synchronously delete
all partitions, so that we know that's complete and not done
asynchronously in the background. Take a BSD lock on the device while
doing so, so that udev won't make the devices busy while we do this.

21 months agoloop: convert impossibe EBADF cases into asserts
Lennart Poettering [Thu, 1 Sep 2022 17:08:10 +0000 (19:08 +0200)] 
loop: convert impossibe EBADF cases into asserts

21 months agogithub: update differential shellcheck to v3.0.1
Yu Watanabe [Thu, 1 Sep 2022 17:05:04 +0000 (02:05 +0900)] 
github: update differential shellcheck to v3.0.1

v3 supports external sources. Yey!

21 months agoMerge pull request #24531 from poettering/loop-resize-part-modernizations
Yu Watanabe [Thu, 1 Sep 2022 15:53:38 +0000 (00:53 +0900)] 
Merge pull request #24531 from poettering/loop-resize-part-modernizations

loopback block device resize partition modernizations

21 months agoloop-util: use DEVNUM_FORMAT_STR more 24531/head
Lennart Poettering [Thu, 1 Sep 2022 10:14:15 +0000 (12:14 +0200)] 
loop-util: use DEVNUM_FORMAT_STR more

21 months agoloop-util: move resize partition ioctl call to blockdev-util.[ch]
Lennart Poettering [Thu, 1 Sep 2022 10:10:30 +0000 (12:10 +0200)] 
loop-util: move resize partition ioctl call to blockdev-util.[ch]

The other BLKPG calls have wrappers in blockdev-util.[ch], let's place
them all there.

No change in behaviour.

21 months agoman: remove reference to mkinitrd
Antonio Alvarez Feijoo [Thu, 1 Sep 2022 08:27:19 +0000 (10:27 +0200)] 
man: remove reference to mkinitrd

21 months agobuild(deps): bump meson from 0.63.0 to 0.63.1 in /.github/workflows
dependabot[bot] [Thu, 1 Sep 2022 09:04:24 +0000 (09:04 +0000)] 
build(deps): bump meson from 0.63.0 to 0.63.1 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 0.63.0 to 0.63.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.63.0...0.63.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
21 months agobuild(deps): bump github/super-linter from 4.9.5 to 4.9.6
dependabot[bot] [Thu, 1 Sep 2022 09:04:00 +0000 (09:04 +0000)] 
build(deps): bump github/super-linter from 4.9.5 to 4.9.6

Bumps [github/super-linter](https://github.com/github/super-linter) from 4.9.5 to 4.9.6.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/2d64ac1c067c34beaf7d24cc12733cd46236f76e...01d3218744765b55c3b5ffbb27e50961e50c33c5)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
21 months agobuild(deps): bump redhat-plumbers-in-action/advanced-issue-labeler
dependabot[bot] [Thu, 1 Sep 2022 09:04:01 +0000 (09:04 +0000)] 
build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler

Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/compare/b89eb39b97529bb7596cb4e716485a6d6f7dd74a...d12b782ff92bc9ac535fb09c925aaa5be9e40f69)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
21 months agoupdate TODO
Lennart Poettering [Thu, 1 Sep 2022 07:48:28 +0000 (09:48 +0200)] 
update TODO

21 months agotree-wide: Use "unmet" for condition checks, not "failed"
Colin Walters [Wed, 31 Aug 2022 20:39:03 +0000 (16:39 -0400)] 
tree-wide: Use "unmet" for condition checks, not "failed"

Often I end up debugging a problem on a system, and I
do e.g. `journalctl --grep=failed|error`.  The use of the term
"failed" for condition checks adds a *lot* of unnecessary noise into
this.

Now, I know this regexp search isn't precise, but it has proven
to be useful to me.

I think "failed" is too strong of a term as a baseline, and also
just stands out to e.g. humans watching their servers boot or
whatever.

The term "met condition" is fairly widely used, e.g.
https://stackoverflow.com/questions/63751794/what-does-the-condition-is-met-exactly-mean-in-programming-languages

Use that instead.

21 months agoudevadm-settle: improve logs when we cannot access /run/udev/control
Yu Watanabe [Wed, 31 Aug 2022 15:09:28 +0000 (00:09 +0900)] 
udevadm-settle: improve logs when we cannot access /run/udev/control

Addresses https://github.com/systemd/systemd/pull/24474#discussion_r959696663.

21 months agoMerge pull request #24515 from yuwata/dissect-timeout
Frantisek Sumsal [Wed, 31 Aug 2022 18:03:00 +0000 (18:03 +0000)] 
Merge pull request #24515 from yuwata/dissect-timeout

dissect-image: extend timeout for waiting devlink

21 months agoupdate TODO
Lennart Poettering [Wed, 31 Aug 2022 16:29:18 +0000 (18:29 +0200)] 
update TODO

21 months agotree-wide: Use devnum helpers in a few more places
Jan Janssen [Wed, 31 Aug 2022 11:18:53 +0000 (13:18 +0200)] 
tree-wide: Use devnum helpers in a few more places

21 months agotest: don't mistake error for success
Lennart Poettering [Mon, 29 Aug 2022 09:40:39 +0000 (11:40 +0200)] 
test: don't mistake error for success

Follow-up for acd3c8662465c1f36c0c0fc974584694928d9234

21 months agoshellcheck/labeler: disable on systemd-security
Luca Boccassi [Wed, 31 Aug 2022 13:57:12 +0000 (14:57 +0100)] 
shellcheck/labeler: disable on systemd-security

21 months agocondition: properly handle fnmatch() errors in ConditionHost
Lennart Poettering [Mon, 29 Aug 2022 09:11:10 +0000 (11:11 +0200)] 
condition: properly handle fnmatch() errors in ConditionHost

21 months agopath-util: return error if fnmatch() fails
Lennart Poettering [Mon, 29 Aug 2022 09:07:11 +0000 (11:07 +0200)] 
path-util: return error if fnmatch() fails

21 months agotest-29-portable: enable debugging logs of udevd 24515/head
Yu Watanabe [Wed, 31 Aug 2022 14:12:26 +0000 (23:12 +0900)] 
test-29-portable: enable debugging logs of udevd

21 months agotest-29-portable: extend timeout for slower environment
Yu Watanabe [Wed, 31 Aug 2022 14:10:43 +0000 (23:10 +0900)] 
test-29-portable: extend timeout for slower environment

21 months agodissect-image: add environment variable to control timeout for waiting devlink to...
Yu Watanabe [Wed, 31 Aug 2022 13:43:50 +0000 (22:43 +0900)] 
dissect-image: add environment variable to control timeout for waiting devlink to be configured

21 months agoudev-util: make device_wait_for_initialization() take relative timeout
Yu Watanabe [Wed, 31 Aug 2022 13:17:12 +0000 (22:17 +0900)] 
udev-util: make device_wait_for_initialization() take relative timeout

Also make the timer event source floating.

21 months agoudev-util: replace device_new_from_dev_path() with sd_device_new_from_devname()
Yu Watanabe [Wed, 31 Aug 2022 13:30:17 +0000 (22:30 +0900)] 
udev-util: replace device_new_from_dev_path() with sd_device_new_from_devname()

21 months agohashmap: add comment explaining that set_fnmatch() handles fnmatch() errors as non...
Lennart Poettering [Mon, 29 Aug 2022 09:07:43 +0000 (11:07 +0200)] 
hashmap: add comment explaining that set_fnmatch() handles fnmatch() errors as non-matches

21 months agoMerge pull request #24499 from medhefgo/format-signedness
Yu Watanabe [Wed, 31 Aug 2022 09:46:27 +0000 (18:46 +0900)] 
Merge pull request #24499 from medhefgo/format-signedness

meson: Compile with -Werror=format-signedness

21 months agohwdb: fix Dell Professional Sound Bar AE515 scancode (#24497)
Swapnil Devesh [Tue, 30 Aug 2022 19:31:50 +0000 (01:01 +0530)] 
hwdb: fix Dell Professional Sound Bar AE515 scancode (#24497)

21 months agomeson: Compile with -Werror=format-signedness 24499/head
Jan Janssen [Tue, 30 Aug 2022 07:57:53 +0000 (09:57 +0200)] 
meson: Compile with -Werror=format-signedness

21 months agotree-wide: Fix field width specifier warnings
Jan Janssen [Tue, 30 Aug 2022 07:52:03 +0000 (09:52 +0200)] 
tree-wide: Fix field width specifier warnings

The casting here isn't pretty, but at least it makes it obvious what is
happening instead of implicit and it allows enabling -Wformat-signedness.

21 months agotree-wide: Fix format specifier warnings for %x
Jan Janssen [Tue, 30 Aug 2022 07:28:56 +0000 (09:28 +0200)] 
tree-wide: Fix format specifier warnings for %x

Unfortunately, hex output can only be produced with unsigned types. Some
cases can be fixed by producing the correct type, but a few simply have
to be cast. At least casting makes it explicit.

21 months agotree-wide: Fix a some remaining format warnings by casting
Jan Janssen [Mon, 29 Aug 2022 11:43:29 +0000 (13:43 +0200)] 
tree-wide: Fix a some remaining format warnings by casting

21 months agotree-wide: Mark some constants as unsigned
Jan Janssen [Mon, 29 Aug 2022 11:36:19 +0000 (13:36 +0200)] 
tree-wide: Mark some constants as unsigned

All these are really unsigned and used as such. This silences some
-Wformat-signedness warnings with gcc.

21 months agojournal: Show grcrypt error message instead of a raw code
Jan Janssen [Mon, 29 Aug 2022 11:19:08 +0000 (13:19 +0200)] 
journal: Show grcrypt error message instead of a raw code

21 months agoefivars: Parse into unsigned
Jan Janssen [Mon, 29 Aug 2022 11:08:31 +0000 (13:08 +0200)] 
efivars: Parse into unsigned

The format specifiers for UUID parsing use %x, which expects unsigned.

21 months agotree-wide: Use correct format specifiers
Jan Janssen [Mon, 29 Aug 2022 11:07:11 +0000 (13:07 +0200)] 
tree-wide: Use correct format specifiers

gcc will complain about all these with -Wformat-signedness.

21 months agoMerge pull request #24474 from yuwata/udevadm-settle-cleanups
Yu Watanabe [Mon, 29 Aug 2022 22:31:20 +0000 (07:31 +0900)] 
Merge pull request #24474 from yuwata/udevadm-settle-cleanups

udevadm-settle: several cleanups

21 months agoMerge pull request #24471 from yuwata/udevadm-wait-periodic-timer
Yu Watanabe [Mon, 29 Aug 2022 22:31:05 +0000 (07:31 +0900)] 
Merge pull request #24471 from yuwata/udevadm-wait-periodic-timer

udevadm-wait: introduce periodic timer for checking devices

21 months agoMerge pull request #23888 from topimiettinen/networkd-netlabel-v2
Yu Watanabe [Mon, 29 Aug 2022 22:30:49 +0000 (07:30 +0900)] 
Merge pull request #23888 from topimiettinen/networkd-netlabel-v2

network: NetLabel integration

21 months agohwdb: Force release calculator key on all HP Victus laptops
LockBlock-dev [Mon, 29 Aug 2022 15:40:04 +0000 (15:40 +0000)] 
hwdb: Force release calculator key on all HP Victus laptops

The key doesn't create a release event. This is a fix to make it work properly. I made sure the product is generic to work on all Victus laptops.

This fix #23006.

21 months agohomed: don't use stat() data from an unrelated inode
Lennart Poettering [Mon, 29 Aug 2022 13:11:15 +0000 (15:11 +0200)] 
homed: don't use stat() data from an unrelated inode

This doesn't really change anything, since we know the stat data used
here also contains S_IFBLK, but it's frickin' confusing.

21 months agoMerge pull request #24495 from poettering/loopback-block-msg
Yu Watanabe [Mon, 29 Aug 2022 16:10:43 +0000 (01:10 +0900)] 
Merge pull request #24495 from poettering/loopback-block-msg

improve loopback warning message

21 months agostrv: modernize strv_fnmatch() a bit
Lennart Poettering [Mon, 29 Aug 2022 09:06:39 +0000 (11:06 +0200)] 
strv: modernize strv_fnmatch() a bit

21 months agoMerge pull request #24466 from mrc0mmand/TEST-75-tweaks
Frantisek Sumsal [Mon, 29 Aug 2022 15:35:07 +0000 (15:35 +0000)] 
Merge pull request #24466 from mrc0mmand/TEST-75-tweaks

test: fix delv trust anchors location on Ubuntu

21 months agoloopback: use ERRNO_IS_PRIVILEGE() where appropriate 24495/head
Lennart Poettering [Mon, 29 Aug 2022 13:11:09 +0000 (15:11 +0200)] 
loopback: use ERRNO_IS_PRIVILEGE() where appropriate

21 months agoloop: make 'Failed to configure loopback device' log message clearer
Lennart Poettering [Mon, 29 Aug 2022 13:10:16 +0000 (15:10 +0200)] 
loop: make 'Failed to configure loopback device' log message clearer

We print the very same log message for loopback block devices and for
loopback network devices. Let's better be clear what kind it is.

21 months agodocs: use Title Case for section titles
Lennart Poettering [Fri, 26 Aug 2022 13:59:07 +0000 (15:59 +0200)] 
docs: use Title Case for section titles

as per:

https://titlecase.com/

21 months agotest: testing for networkd NetLabel feature 23888/head
Topi Miettinen [Sat, 20 Aug 2022 17:57:06 +0000 (20:57 +0300)] 
test: testing for networkd NetLabel feature