| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Let's update the commentary a bit. Also, use a time-out of 100ms rather
than 50ms for this, simply to unify on the same value used in
vt_disallocate() in a similar case.
|
|
anymore
We only use them in terminal-util.c, hence make them static (and move
them before their first using function).
|
|
Let's put "terminal_" as prefix, like with the other reset calls, and
let's make clear that this only encapsulates the ioctl-based reset
logic, not the ANSI sequence based reset logic.
|
|
|
|
the screen
ESC c is a (vaguely defined) "reset to initial state" ANSI sequence.
Many terminals clear the screen in this case, but that's a bit drastic I
think for most resets.
ESC c was added to the reset logic in
00bc83a275fa3ca8d90579fe9597d8b651d47332 (i.e. very recently), and I
don't think the effect was clear at that time.
Let's keep the ESC c in place however when we actually want to clear the
screen. Hence move it from reset_terminal_fd() into vt_disallocate().
Fixes: #33689
|
|
reset-by-ioctl and reset-by-sequence reasonably
|
|
The helper checks if an fd references a pty
|
|
We have pretty much the same code at two places, let's make it one.
|
|
This appears to have been the intention of
00bc83a275fa3ca8d90579fe9597d8b651d47332, judging by the comments on
that.
|
|
make_console_stdio()
Let's hook this up.
|
|
acquired via ANSI sequences
|
|
When we are talking to a serial terminal quite commonly the dimensions
are not set properly, because the serial protocol has not handshake or
similar to transfer this information.
However, we can derive the dimensions via ANSI sequences too, which
should get us the right information, since ANSI sequences are
interpreted by the final terminal, rather than an intermediary local tty
driver (which is where TIOCGWINSZ is interpreted).
This adds a helper call that gets the dimensions this way.
|
|
terminal_set_cursor_position()
Let's prefix these functions with the subsystem name, and clean them up
a bit. Specifically, drop the error logging, it's entirely duplicative,
since every single caller does it anyway.
|
|
to same tty
Let's add an extra safety check: before issuing the ansi sequence to
query the bg color, let's make sure input and output fd actually
reference the same tty. because otherwise it's unlikely we'll be able to
read back the response from the tty driver.
This is mostly just paranoia.
|
|
|
|
This doesn't make much of a different IRL, but it feels more right that
an operation that happens in input is turned off via the input fd.
|
|
If we only read partial information from the tty we ended up parsing it
again and again, confusing the state machine. hence, return how much
data we actually processed and drop it from the buffer.
|
|
|
|
|
|
|
|
|
|
The tap network device should be called "vt-", so that that the
80-vm-vt.network file we ship by default actually matches against it.
Also, turn off any qemu callout stuff, networkd is smart enough to
handle all this on its own, without ugly callouts.
|
|
Make the warning for oneshot services (where RuntimeMaxSec= has no
effect) more actionable by pointing to the directive people can use
instead to effectively limit their runtime.
|
|
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
|
|
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
|
|
|
|
|
|
polkitd by default just waves through requests from a root process.
A new POLKIT_CHECK_AUTHORIZATION_FLAGS_ALWAYS_CHECK flag was added
to main (will be part of v125 when it ships) that forces it to go
through the policy checks for root too. Previous versions will just
ignore it.
Change the flags handling slightly so that we pass this or the
interactive flags through, as the values match what polkit expects.
|
|
When we patch in a bg color we must make sure that when certain "reset"
sequences are transferred we fix up the bg color again.
Do so for \033[!p ("soft terminal reset") and \033c ("reset to initial
state" aka "full reset").
|
|
Copied directly from a1d6dbb1c94685d7972f63ed2762fe4ba0251287.
|
|
On Fedora, with crypto policy TEST-FEDORA41, sha1 is not allowed:
$ SYSTEMD_LOG_LEVEL=debug build/systemd-measure sign
--linux=/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
--osrel=/tmp/tmp.osrelbl2sr77f
--cmdline=/tmp/tmp.cmdlineouc7hqtj
--uname=/tmp/tmp.unamecbjgesty
--pcrpkey=/tmp/tmpufiadu8l
--initrd=/boot/3a9d668b4db749398a4a5e78a03bffa5/6.9.7-200.fc40.x86_64/initrd
--sbat=/tmp/tmp.sbataz9arpy0
--private-key=/tmp/tmppyf0gx6w
--public-key=/tmp/tmpufiadu8l
--bank=sha1
Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready
Loaded 'libtss2-esys.so.0' via dlopen()
Loaded 'libtss2-rc.so.0' via dlopen()
Loaded 'libtss2-mu.so.0' via dlopen()
PolicyPCR calculated digest: cec1a2ccb188ddd171a2be7bfa6b31cb9148776647354eb1069e0f891ed2dbe7
Failed to initialize signature context: error:03000098:digital envelope routines::invalid digest
Failed to sign PCR policy: Input/output error
|
|
They might not be readable to the unprivileged user running the tests
and it shouldn't really matter what is used. OTOH, we need a real kernel
because we look at the header.
|
|
* 2d10c12bd5 Drop /etc/sysctl.d/99-sysctl.conf symlink
* fb73af0d22 update changelog
* 9d74923dd7 Move systemd-time-wait-sync to systemd-timesyncd package
* 8e0914aa0d Update changelog for 256.2-1 release
* 6dabf74a81 Install run0 zsh completion file
* a72e454b2b Update upstream source from tag 'upstream/256.2'
|\
| * cf928e099f New upstream version 256.2
* c473d940f7 d/e/checkout-upstream: switch packaging branch on upstream stable PRs
* 13586fc76f d/e/checkout-upstream: do not fail if rebase fails
* 19785960d1 d/e/checkout-upstream: fix shellcheck warnings
* 72b215c3f0 Install zsh completion for run0
* 51f87a981e initramfs-tools: copy network drop-ins too
|
|
|
|
Our config parsing is flexible enough that this kind of worked surprisingly
enough.
|
|
It's already included in the packages list in mkosi.conf.
|
|
It's pulled in via VolatilePackages=, no need to put it in Packages=.
|
|
All of our lists start on the next line, so let's make KernelCommandLine=
fit that as well.
|
|
CentOS Stream 10 has a newer util-linux which means the terminal
gets correctly resized to the size specified by mkosi. This is a
much nicer experience than CentOS Stream 9 where you're stuck on
80x24 so let's make CentOS Stream 10 the default release to build.
|
|
|
|
Let's document in detail how to build the integration test image and run
the integration tests without building systemd. To streamline the process,
we stop automatically using binaries from build/ when invoking mkosi directly
and don't automatically use a tools tree anymore if systemd on the host is too
old. Instead, we document these options in HACKING.md and change the mkosi meson
target to automatically use the current build directory as an extra binary search
path for mkosi.
|
|
If we're not doing a build, there's no point in syncing either so
lets skip it.
|
|
This is a common case, and nothing noteworthy at all. For example, if we
establish an enumerator for listing all devices tagged by some tag, then
the per-tag dir is not going to exist if there are currently no devices
tagged that way, but that's a really common case, and doesn't really
deserve any mention, not even at debug level.
|
|
It has bugged me for a while that we show the exact same welcome message
at boot twice: once in the initrd, and once after the initrd→host
transition. That's very confusing.
Let's change the text a bit, and tone down the initrd message a bit (by
removing the empty line before and after it), because it is the less
relevant one.
|
|
Apparently I forgot that in the initial PR. Fix that.
https://github.com/systemd/systemd/pull/33714#pullrequestreview-2177885475
|
|
In previous commits, we've changed the JSON name mangling logic. This,
of course, will cause breaking changes to occur on anything that relied
on the JSON mangling logic.
This commit fixes those breaking changes by manually forcing the JSON
name back to what it was before.
|
|
First, when displaying JSON we convert dashes into underscores. We want
to avoid using dashes in JSON field names in new code, because some
JSON parsers don't support dashes very well.
Second, we make the first character of every word lower-case. This
better matches our JSON field name style, and makes the automatic
JSON name mangling a lot more useful for vertical tables, where fields
are given a display name. For example, "Foo Bar" would be converted into
"foo_bar" instead of "Foo_Bar", which much better matches our style.
We don't make the whole string lowercase to support cases like:
"fooBar" should stay as "fooBar".
Some situations don't behave quite perfectly, such as "Foo BarBaz" gets
converted into "foo_barBaz", or all-caps headings get mangled
incorrectly. In these situations, the JSON field should be overridden
manually. In most cases, or at least more cases than before, this
heuristic does good enough.
|
|
Lets you conveniently set JSON field names in table_add_many. Especially
useful for vertical tables. For example:
table_add_many(t,
TABLE_FIELD, "Display Name",
TABLE_STRING, obj->display_name,
TABLE_SET_JSON_FIELD_NAME, "displayName",
TABLE_FIELD, "Timestamp",
TABLE_TIMESTAMP, obj->timestamp,
TABLE_SET_JSON_FIELD_NAME, "timestampUSec");
|
|
We already have selinux=0 in the default kernel command line so
enforcing=0 is redundant. Instead, pass in enforcing=0 when we
enable selinux in TEST-06-SELINUX.
|