Karel Zak [Thu, 22 Jun 2023 12:26:09 +0000 (14:26 +0200)]
Merge branch 'lsfd--fix-separators-for-json-output' of https://github.com/masatake/util-linux
* 'lsfd--fix-separators-for-json-output' of https://github.com/masatake/util-linux:
lsfd.1.adoc: fix a typo
lsfd: use ARRAY_STRING and ARRAY_NUMBER json types in some columns
lsfd: use \n as the separator in INOTIFY.INODES and INOTIFY.INODES.RAW columns
lsfd: use \n as the separator in EVENTPOLL.TFDS column
lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types
Frantisek Sumsal [Thu, 22 Jun 2023 10:33:12 +0000 (12:33 +0200)]
ci: cancel running jobs on push
Let's cancel already running GH Actions jobs when a PR is (force) pushed
to conserve resources and make the CI runs faster thanks to the freed up
queue.
Frantisek Sumsal [Tue, 20 Jun 2023 21:01:35 +0000 (23:01 +0200)]
ci: collect coverage on _exit() as well
_exit() skips the gcov hooks, so we lose all coverage collected up to
that point. Let's work around this by intercepting _exit() with our
wrapper that calls __gcov_dump() just before _exit().
Rasmus Villemoes [Tue, 13 Jun 2023 10:14:28 +0000 (12:14 +0200)]
hwclock: add support for RTC_VL_READ/RTC_VL_CLR ioctls
Implement a way for userspace to query the status of the backup
battery, if supported by the hardware and driver.
The RTC_VL_* bits are a somewhat recent addition (3431ca4837bf, but
really only from b0efe0281234) to the uapi header,
so provide our own definition if the build host's header doesn't.
Masatake YAMATO [Thu, 22 Jun 2023 02:28:47 +0000 (11:28 +0900)]
lsfd: (filter) weakly support ARRAY_STRING and ARRAY_NUMBER json types
We will have operators for array types in the future. Till having
them, we treat the types as STRING. So we can use string operators for
the column having types.
Karel Zak [Tue, 20 Jun 2023 11:15:45 +0000 (13:15 +0200)]
lib: remove pager.c from libcommon
The libcommon is a binary archive to keep compilation and maintenance
simple. The library is not linked as shared or so. The unused symbols
are removed from binaries (for example, by "make install-strip").
But it isn't evident for license analyzers (and some humans) that the
library uses GPL and non-GPL stuff simultaneously. Let's avoid doubts
and keep pager.c (with GPL license) out of the archive
Todd Zullinger [Sun, 18 Jun 2023 21:29:11 +0000 (17:29 -0400)]
sys-utils: fix SELinux context example in mount.8
In the description of the context option, the example which shows how to
properly quote is displayed incorrectly on terminals > 80 columns. This
leaves a seemingly needless '\' in the command, e.g.:
mount -t tmpfs none /mnt -o \ 'context="system_u:...'
The intent is to display the command properly on terminals <= 80
columns. Use a literal block to ensure the code is displayed
consistently, regardless of the terminal width.
Connect the blockquote to the previous indented items in the context
option description to ensure it is properly indented.
Karel Zak [Mon, 19 Jun 2023 11:29:42 +0000 (13:29 +0200)]
libmount: always ignore user=<name>
The library (on mount) cares about "user", but has to ignore
"user=name". It works as expected, but only for non-root users. We
need to ignore it also root to be compatible with /sbin/mount.cifs
where some people still use "user=" (rather than "username=").
Karel Zak [Wed, 14 Jun 2023 07:53:04 +0000 (09:53 +0200)]
Merge branch 'lsfd--inotify' of https://github.com/masatake/util-linux
* 'lsfd--inotify' of https://github.com/masatake/util-linux:
lsfd: use xstrdup instead of xasprintf(...\"%s\"
tests: (lsfd) add a case for testing INOTIFY.INODES.RAW column
tests: (mkfds) add / and /etc/fstab as the monitoring targets to inotify
lsfd: fill NAME column of inotify files with the information about their monitoring targets
lsdf: make the code for filling SOURCE, PARTITION, and MAJMIN reusable
This conditional was never implemented in the meson config. Under
autotools, it is guarded by availability of headers and an option. I
didn't implement the option here.
Fixes #2310.
'!= false' is used because 'x == 1' is rejected by meson if 'x' is
false. OTOH, 'x != false' seems to work if 'x' is 1.
Karel Zak [Mon, 12 Jun 2023 10:18:50 +0000 (12:18 +0200)]
Merge branch 'lsfd--refactor' of https://github.com/masatake/util-linux
* 'lsfd--refactor' of https://github.com/masatake/util-linux:
timeutils: add an inline funciton, is_timespecset()
lsfd: use scols_table_get_column_by_name
Karel Zak [Mon, 12 Jun 2023 10:15:41 +0000 (12:15 +0200)]
Merge branch 'lsfd--signalfd' of https://github.com/masatake/util-linux
* 'lsfd--signalfd' of https://github.com/masatake/util-linux:
tests: (lsfd) add a case for testing signalfd related columns
tests: (mkfds) add a factory to make a signalfd
lsfd.1.adoc: update for signalfds
lsfd: print the masks specified in signalfds
Karel Zak [Tue, 6 Jun 2023 08:46:19 +0000 (10:46 +0200)]
Merge branch 'lsfd--misc-fix' of https://github.com/masatake/util-linux
* 'lsfd--misc-fix' of https://github.com/masatake/util-linux:
lsfd: assign a class to the file in new_file()
lsfd: don't check the value returned from new_file()
Karel Zak [Tue, 6 Jun 2023 08:45:17 +0000 (10:45 +0200)]
Merge branch 'lsfd--timerfd' of https://github.com/masatake/util-linux
* 'lsfd--timerfd' of https://github.com/masatake/util-linux:
tests: (lsfd/filter) add a case for comparing floating point numbers
tests: (lsfd) add a case for testing timerfd related columns
tests: add ts_skip_capability
tests: (mkfds) add a factory to make a timerfd
lsfd.1.adoc: write about timerfd
lsfd: print the detail of the timer associated with a timerfd
lsfd: (filter) accept floating point numbers in expressions
lsfd: (filter) support floating point number used in columns
lsfd: (filter) reduce duplicated code in macro definitions
lsfd: (filter) improve error message
lsfd.1.adoc: revise type names for columns
lsfd.1.adoc: fix typos
lsfd: adjust coding style
lsfd: fix a sentence in comment
Karel Zak [Mon, 5 Jun 2023 10:59:41 +0000 (12:59 +0200)]
libmount: use mount(2) for remount on Linux < 5.14
It seems mount_setattr() is supported on Linux < 5.14, but it's without
MOUNT_ATTR_NOSYMFOLLOW. That's problem for remount where we reset all
VFS flags.
The most simple (but not elegant) is to check for kernel version and
fallback to mount(2) on remount.
Addresses: https://github.com/util-linux/util-linux/issues/2283 Signed-off-by: Karel Zak <kzak@redhat.com>