IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Even when a mount namespace is created, previously host's sysfs is used,
especially with RootDirectory= or RootImage=, thus service processes can
still access the properties of the network interfaces in the main network
namespace through sysfs.
This makes, sysfs is remounted with the new network namespace tag, except
when PrivateMounts= is explicitly disabled. Hence, the properties of the
network interfaces in the main network namespace cannot be accessed by
service processes through sysfs.
Fixes#26422.
This is useful when creating a new network namespace. Unlike procfs,
we need to remount sysfs, otherwise properties of the network interfaces
in the main network namespace are still accessible through the old sysfs,
e.g. /sys/class/net/eth0. All sub-mounts previously mounted on the sysfs
are moved onto the new sysfs mount.
The function will be used in later commits.
If the boot ID cannot be obtained, let's first fallback to the machine
ID, and if still cannot, then let's use 0.
Otherwise, no timer event source cannot be triggered.
Fixes#26549.
We would print:
NEXT LEFT LAST PASSED UNIT >
Wed 2023-02-22 23:55:00 CET 20min left Wed 2023-02-22 23:25:00 CET 9min ago pmlogger_check.timer >
Wed 2023-02-22 23:55:10 CET 21min left Wed 2023-02-22 23:25:16 CET 8min ago pmlogger_farm_check.timer >
Wed 2023-02-22 23:58:00 CET 23min left Wed 2023-02-22 23:28:02 CET 6min ago pmie_check.timer >
Wed 2023-02-22 23:58:10 CET 24min left Wed 2023-02-22 23:28:11 CET 5min ago pmie_farm_check.timer >
Thu 2023-02-23 00:00:00 CET 25min left Wed 2023-02-22 00:00:10 CET 23h ago logrotate.timer >
Thu 2023-02-23 00:00:00 CET 25min left Wed 2023-02-22 00:00:10 CET 23h ago unbound-anchor.timer >
Thu 2023-02-23 00:08:00 CET 33min left Wed 2023-02-22 00:08:05 CET 23h ago pmie_daily.timer >
Thu 2023-02-23 00:10:00 CET 35min left Wed 2023-02-22 00:10:03 CET 23h ago pmlogger_daily.timer >
Thu 2023-02-23 00:14:14 CET 40min left Wed 2023-02-22 22:35:09 CET 58min ago dnf-makecache.timer >
Thu 2023-02-23 05:05:04 CET 5h 30min left Wed 2023-02-22 03:29:00 CET 20h ago plocate-updatedb.timer >
Thu 2023-02-23 11:34:34 CET 12h left Wed 2023-02-22 11:34:33 CET 11h ago systemd-tmpfiles-clean.timer >
Sun 2023-02-26 01:00:00 CET 3 days left Mon 2023-02-20 07:51:59 CET 2 days ago raid-check.timer >
Mon 2023-02-27 00:19:48 CET 4 days left Mon 2023-02-20 07:51:59 CET 2 days ago fstrim.timer >
Mon 2023-02-27 12:34:36 CET 4 days left Tue 2023-02-21 08:22:14 CET 1 day 15h ago archlinux-keyring-wkd-sync.time>
The "left" part uses precious screen estate and is pretty much implied
by the column name. Drop it.
This just adds the base functionality and some unit tests.
With TABLE_TIMESTAMP_RELATIVE we print "5s ago" and "5s left",
with the new TABLE_TIMESTAMP_LEFT, we print "5s ago" but "5s".
This is more useful for cases where we generally only want to
print timestamps in the future.
In older glibc (like 2.28 on CentOS Stream 8) there is no wrapper
for the gettid() syscall, so we need to provide our own.
../src/libsystemd/sd-journal/journal-send.c: In function ‘close_journal_fd’:
../src/libsystemd/sd-journal/journal-send.c:88:25: error: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Werror=implicit-function-declaration]
if (getpid() != gettid())
^~~~~~
getgid
../src/libsystemd/sd-journal/journal-send.c:88:25: warning: nested extern declaration of ‘gettid’ [-Wnested-externs]
cc1: some warnings being treated as errors
Follow-up to 50b35193ec.
Now that device path types are marked as packed we can safely cast and
access them. If we ever take the address of a member, we would get a
compiler warning.
In gnu-efi/EDK2 device paths are not marked as packed and instead the
Length field is split into 2 bytes. Accessing those requires these
helper macros as device paths may be unaligned.
Since our own efi headers define device path structs as packed, we can
access these directly, making code much more readable.
usec_t is also a uint64_t internally, hence this doesn't actually change
anything. However, on the conceptual level, sd-bus expects a uint64_t
hence give it one.
Timespans are probably best right-aligned, in particular if they
systematically end in either " ago" or " left" because they are used as
"relative timestamps".
Only service and scope units have RuntimeMaxUSec bus property.
To suppress the "Until:" field for other unit types, the entry must be
initialized with USEC_INFINITY.
Fixes#26473.
Typically, in reasonably complex programs we want to realease various
caches (such as glibc allocation caches) in case of memory pressure.
Let's add explicit infrastructure for that to sd-event, that can hook
Linux' Pressure Stall Information (PSI) logic with our event loop.
This adds sd_event_add_memory_pressure() as easy, one-step API to
install an even source that is called under memory pressure.
The parameters which file to watch (the per-cgroup PSI file, or the
system-wide file /proc/pressure/memory) can be configured via env vars.
The idea is that the service manager sooner or later gains controls for
setting this up correctly.
Alternatively to the PSI a similar logic is supported but instead of
waiting for POLLPRI on a procfs/cgroupfs fd we'll wait for POLLIN on
FIFO or AF_UNIX sockets. This is useful for testing, and possibly in
other environments, for example to hook up this protocol directly with
GNOME's low memory monitor.
By default this watches on the cgroup-local PSI so that we aren't
affected by pressure on cgroups we are not related to.