]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
2 years agoAdd `--user-parent` option to nsenter
igo95862 [Sun, 26 Mar 2023 15:04:11 +0000 (21:04 +0600)] 
Add `--user-parent` option to nsenter

When this option is used nsenter will fetch the parent user
namespace from any namespace file descriptors available.

It can be combined with existing `--user` option in which case
the parent user namespace will be fetched from the user namespace
and replace it.

The usecase of this option is when a user namespace that owns
the other type namespaces we want to switch to is not actually
bound to any process. Without using ioctl it is impossible to
acquire namespace file descriptor. For example, bubblewrap
`bwrap` command creates unbinded user namespace when `--dev`
option is used.

2 years agoMerge pull request #2317 from eworm-de/meson-langinfo
Karel Zak [Sat, 17 Jun 2023 09:56:48 +0000 (11:56 +0200)] 
Merge pull request #2317 from eworm-de/meson-langinfo

meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h

2 years agoMerge pull request #2318 from mariobl/patch-11
Karel Zak [Sat, 17 Jun 2023 09:52:11 +0000 (11:52 +0200)] 
Merge pull request #2318 from mariobl/patch-11

[man] Fix typo in irqtop.1.adoc

2 years ago[man] Fix typo in irqtop.1.adoc
Mario Blättermann [Fri, 16 Jun 2023 14:31:47 +0000 (16:31 +0200)] 
[man] Fix typo in irqtop.1.adoc

2 years agomeson: check for _NL_TIME_WEEK_1STDAY in langinfo.h
Christian Hesse [Fri, 16 Jun 2023 09:52:10 +0000 (11:52 +0200)] 
meson: check for _NL_TIME_WEEK_1STDAY in langinfo.h

... which is required for `cal`.

Fixes GH-2316

2 years agoMerge branch 'ci/gcc-13' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 14 Jun 2023 07:54:25 +0000 (09:54 +0200)] 
Merge branch 'ci/gcc-13' of https://github.com/t-8ch/util-linux

* 'ci/gcc-13' of https://github.com/t-8ch/util-linux:
  ci: use clang 16
  ci: build with GCC 13/11

2 years agoMerge branch 'lsfd--inotify' of https://github.com/masatake/util-linux
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

2 years agoMerge branch 'meson-more-conditions' of https://github.com/keszybz/util-linux
Karel Zak [Wed, 14 Jun 2023 07:51:12 +0000 (09:51 +0200)] 
Merge branch 'meson-more-conditions' of https://github.com/keszybz/util-linux

* 'meson-more-conditions' of https://github.com/keszybz/util-linux:
  meson: conditionalize waitpid
  meson: add conditionalization for test progs
  meson: implement HAVE_PTY

2 years agomeson: conditionalize waitpid
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jun 2023 08:15:39 +0000 (10:15 +0200)] 
meson: conditionalize waitpid

I *think* this mirros what configure.ac does, except that the configuration
option is not implemented.

2 years agomeson: add conditionalization for test progs
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jun 2023 08:01:52 +0000 (10:01 +0200)] 
meson: add conditionalization for test progs

This just mirrors what the autotools setup is doing.

2 years agomeson: implement HAVE_PTY
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jun 2023 07:55:22 +0000 (09:55 +0200)] 
meson: implement HAVE_PTY

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.

2 years agolsfd: use xstrdup instead of xasprintf(...\"%s\"
Masatake YAMATO [Tue, 13 Jun 2023 10:21:33 +0000 (19:21 +0900)] 
lsfd: use xstrdup instead of xasprintf(...\"%s\"

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: (lsfd) add a case for testing INOTIFY.INODES.RAW column
Masatake YAMATO [Fri, 9 Jun 2023 10:03:48 +0000 (19:03 +0900)] 
tests: (lsfd) add a case for testing INOTIFY.INODES.RAW column

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: (mkfds) add / and /etc/fstab as the monitoring targets to inotify
Masatake YAMATO [Fri, 9 Jun 2023 10:02:25 +0000 (19:02 +0900)] 
tests: (mkfds) add / and /etc/fstab as the monitoring targets to inotify

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: fill NAME column of inotify files with the information about their monitoring...
Masatake YAMATO [Fri, 9 Jun 2023 05:55:05 +0000 (14:55 +0900)] 
lsfd: fill NAME column of inotify files with the information about their monitoring targets

    # ./lsfd  -p 1  -Q '(TYPE == "inotify") and (FD > 7)'
    COMMAND PID USER ASSOC MODE    TYPE       SOURCE MNTID INODE NAME
    systemd   1 root    11  r-- inotify anon_inodefs    15  1060 inodes=116@dm-0
    systemd   1 root    13  r-- inotify anon_inodefs    15  1060 inodes=299@tmpfs
    systemd   1 root    19  r-- inotify anon_inodefs    15  1060 inodes=41@tmpfs,2@tmpfs,1@tmpfs,96@dm-0
    systemd   1 root    21  r-- inotify anon_inodefs    15  1060 inodes=41@tmpfs,2@tmpfs,1@tmpfs,96@dm-0

In addition, INOTIFY.INODES and INOTIFY.INODES.RAW column are added.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsdf: make the code for filling SOURCE, PARTITION, and MAJMIN reusable
Masatake YAMATO [Fri, 9 Jun 2023 05:52:18 +0000 (14:52 +0900)] 
lsdf: make the code for filling SOURCE, PARTITION, and MAJMIN reusable

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolibmount: (tests) add helper for option list splitting
Thomas Weißschuh [Tue, 13 Jun 2023 06:27:48 +0000 (08:27 +0200)] 
libmount: (tests) add helper for option list splitting

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agomeson: build test_mount_optlist
Thomas Weißschuh [Tue, 13 Jun 2023 06:19:55 +0000 (08:19 +0200)] 
meson: build test_mount_optlist

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agobuild-sys: add enosys and syscalls.h to gitignore
Enze Li [Fri, 9 Jun 2023 01:37:04 +0000 (09:37 +0800)] 
build-sys: add enosys and syscalls.h to gitignore

After compiling enosys, the syscalls.h file and the executable enosys are
generated, let's add these two files to the .gitignore file.

Signed-off-by: Enze Li <lienze@kylinos.cn>
2 years agobuild-sys: rearrange gitignore in alphabetical order
Enze Li [Fri, 9 Jun 2023 01:37:03 +0000 (09:37 +0800)] 
build-sys: rearrange gitignore in alphabetical order

Signed-off-by: Enze Li <lienze@kylinos.cn>
2 years agocfdisk: add hint about labels for bootable flag
Karel Zak [Mon, 12 Jun 2023 10:33:01 +0000 (12:33 +0200)] 
cfdisk: add hint about labels for bootable flag

Addresses: https://github.com/util-linux/util-linux/discussions/2220
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'libmount/loop-rw' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 12 Jun 2023 10:22:02 +0000 (12:22 +0200)] 
Merge branch 'libmount/loop-rw' of https://github.com/t-8ch/util-linux

* 'libmount/loop-rw' of https://github.com/t-8ch/util-linux:
  libmount: (optlist) correctly detect ro status

2 years agoMerge branch 'lsfd--refactor' of https://github.com/masatake/util-linux
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

2 years agoMerge branch 'setuid' of https://github.com/eworm-de/util-linux
Karel Zak [Mon, 12 Jun 2023 10:16:27 +0000 (12:16 +0200)] 
Merge branch 'setuid' of https://github.com/eworm-de/util-linux

* 'setuid' of https://github.com/eworm-de/util-linux:
  meson: install write setgid
  meson: install wall setgid
  meson: install umount setuid
  meson: install mount setuid
  meson: install newgrp setuid
  meson: install su setuid
  meson: install chsh setuid
  meson: install chfn setuid

2 years agoMerge branch 'lsfd--signalfd' of https://github.com/masatake/util-linux
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

2 years agolibmount: (optlist) correctly detect ro status
Thomas Weißschuh [Sun, 11 Jun 2023 09:49:54 +0000 (11:49 +0200)] 
libmount: (optlist) correctly detect ro status

Fixes #2305

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotimeutils: add an inline funciton, is_timespecset()
Masatake YAMATO [Sat, 10 Jun 2023 15:31:46 +0000 (00:31 +0900)] 
timeutils: add an inline funciton, is_timespecset()

Close #2300.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: use scols_table_get_column_by_name
Masatake YAMATO [Fri, 9 Jun 2023 16:47:16 +0000 (01:47 +0900)] 
lsfd: use scols_table_get_column_by_name

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agomeson: install write setgid
Christian Hesse [Fri, 9 Jun 2023 13:04:00 +0000 (15:04 +0200)] 
meson: install write setgid

... as this requires elevated privileges.

2 years agomeson: install wall setgid
Christian Hesse [Fri, 9 Jun 2023 13:02:57 +0000 (15:02 +0200)] 
meson: install wall setgid

... as this requires elevated privileges.

2 years agomeson: install umount setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install umount setuid

... as this requires elevated privileges.

2 years agomeson: install mount setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install mount setuid

... as this requires elevated privileges.

2 years agomeson: install newgrp setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install newgrp setuid

... as this requires elevated privileges.

2 years agomeson: install su setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install su setuid

... as this requires elevated privileges.

2 years agomeson: install chsh setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install chsh setuid

... as this requires elevated privileges.

2 years agomeson: install chfn setuid
Christian Hesse [Fri, 9 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
meson: install chfn setuid

... as this requires elevated privileges.

2 years agoMerge branch 'PR/libmount-force-mount2' of github.com:karelzak/util-linux-work
Karel Zak [Fri, 9 Jun 2023 09:50:23 +0000 (11:50 +0200)] 
Merge branch 'PR/libmount-force-mount2' of github.com:karelzak/util-linux-work

* 'PR/libmount-force-mount2' of github.com:karelzak/util-linux-work:
  libmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto}

2 years agotests: (lsfd) add a case for testing signalfd related columns
Masatake YAMATO [Tue, 6 Jun 2023 23:01:40 +0000 (08:01 +0900)] 
tests: (lsfd) add a case for testing signalfd related columns

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: (mkfds) add a factory to make a signalfd
Masatake YAMATO [Tue, 6 Jun 2023 22:55:09 +0000 (07:55 +0900)] 
tests: (mkfds) add a factory to make a signalfd

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd.1.adoc: update for signalfds
Masatake YAMATO [Tue, 6 Jun 2023 22:40:45 +0000 (07:40 +0900)] 
lsfd.1.adoc: update for signalfds

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: print the masks specified in signalfds
Masatake YAMATO [Tue, 6 Jun 2023 22:30:06 +0000 (07:30 +0900)] 
lsfd: print the masks specified in signalfds

An example output:

    # ./lsfd -p "$(pidof systemd-journald)" -Q '(TYPE == "signalfd")'

    COMMAND             PID USER ASSOC MODE     TYPE       SOURCE MNTID INODE NAME
    systemd-journal 2382709 root   238  rw- signalfd anon_inodefs    15  1060 mask=USR1,USR2
    systemd-journal 2382709 root   239  rw- signalfd anon_inodefs    15  1060 mask=INT,TERM
    systemd-journal 2382709 root   240  rw- signalfd anon_inodefs    15  1060 mask=35

Using signum_to_signame is suggested by Karel Zak <kzak@redhat.com>.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolibmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto}
Karel Zak [Mon, 5 Jun 2023 11:21:11 +0000 (13:21 +0200)] 
libmount: introduce LIBMOUNT_FORCE_MOUNT2={always,never,auto}

Let's introduce a stable workaround for use cases where new kernel API
is not ready to use.

The patch does not use "goto enosys" to exit as nothing in the hookset
is initialized yet.

Addresses: https://github.com/util-linux/util-linux/issues/1992
Addresses: https://github.com/util-linux/util-linux/issues/2283
Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoMerge branch 'pr/libmount-5.12.0' of github.com:karelzak/util-linux-work
Karel Zak [Tue, 6 Jun 2023 08:47:35 +0000 (10:47 +0200)] 
Merge branch 'pr/libmount-5.12.0' of github.com:karelzak/util-linux-work

* 'pr/libmount-5.12.0' of github.com:karelzak/util-linux-work:
  libmount: use mount(2) for remount on Linux < 5.14

2 years agoMerge branch 'lsfd--misc-fix' of https://github.com/masatake/util-linux
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()

2 years agoMerge branch 'lsfd--timerfd' of https://github.com/masatake/util-linux
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

2 years agolibmount: use mount(2) for remount on Linux < 5.14
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>
2 years agoMerge branch 'fix-jfs' of https://github.com/mbroz/util-linux
Karel Zak [Mon, 5 Jun 2023 09:46:11 +0000 (11:46 +0200)] 
Merge branch 'fix-jfs' of https://github.com/mbroz/util-linux

* 'fix-jfs' of https://github.com/mbroz/util-linux:
  libblkid: jfs - avoid undefined shift

2 years agoMerge branch 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 5 Jun 2023 09:45:37 +0000 (11:45 +0200)] 
Merge branch 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux

* 'libblkid/bcache-csum' of https://github.com/t-8ch/util-linux:
  libblkid: (bcache) report block size
  libblkid: (bcache) report version
  libblkid: (bcache) report label
  libblkid: (bcache) also calculate checksum over journal buckets
  libblkid: (bcache) extend superblock definition

2 years agoMerge branch 'fixes' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 5 Jun 2023 09:44:30 +0000 (11:44 +0200)] 
Merge branch 'fixes' of https://github.com/t-8ch/util-linux

* 'fixes' of https://github.com/t-8ch/util-linux:
  libmount (python) : simplify struct initialization
  lsfd-filter: constify filter logic
  misc: constify some fields

2 years agolsfd: assign a class to the file in new_file()
Masatake YAMATO [Sun, 4 Jun 2023 21:39:26 +0000 (06:39 +0900)] 
lsfd: assign a class to the file in new_file()

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: don't check the value returned from new_file()
Masatake YAMATO [Sun, 4 Jun 2023 21:31:30 +0000 (06:31 +0900)] 
lsfd: don't check the value returned from new_file()

The funciton newver returns NULL.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolibblkid: jfs - avoid undefined shift
Milan Broz [Sun, 4 Jun 2023 17:15:55 +0000 (19:15 +0200)] 
libblkid: jfs - avoid undefined shift

Fix previous commit 04a0717b0b0faa1a8078dc6fad05183b8bada395
to avoid undefined shift if value is exactly 32.

  libblkid/src/superblocks/jfs.c:46:39: runtime error:
  shift exponent 32 is too large for 32-bit type 'unsigned int'

Reproducer found with OSS-Fuzz (issue 59284) running over
cryptsetup project (blkid is used in header init).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
2 years agotests: (lsfd/filter) add a case for comparing floating point numbers
Masatake YAMATO [Sun, 4 Jun 2023 03:00:39 +0000 (12:00 +0900)] 
tests: (lsfd/filter) add a case for comparing floating point numbers

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: (lsfd) add a case for testing timerfd related columns
Masatake YAMATO [Sat, 3 Jun 2023 04:11:00 +0000 (13:11 +0900)] 
tests: (lsfd) add a case for testing timerfd related columns

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: add ts_skip_capability
Masatake YAMATO [Sun, 4 Jun 2023 07:55:00 +0000 (16:55 +0900)] 
tests: add ts_skip_capability

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agotests: (mkfds) add a factory to make a timerfd
Masatake YAMATO [Fri, 2 Jun 2023 23:40:18 +0000 (08:40 +0900)] 
tests: (mkfds) add a factory to make a timerfd

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd.1.adoc: write about timerfd
Masatake YAMATO [Sat, 3 Jun 2023 00:36:57 +0000 (09:36 +0900)] 
lsfd.1.adoc: write about timerfd

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: print the detail of the timer associated with a timerfd
Masatake YAMATO [Fri, 2 Jun 2023 23:42:27 +0000 (08:42 +0900)] 
lsfd: print the detail of the timer associated with a timerfd

An example output:

    # ./lsfd -p 1  -Q '(TYPE == "timerfd")' -oCOMMAND,PID,ASSOC,TYPE,INODE,NAME
    COMMAND PID ASSOC    TYPE INODE NAME
    systemd   1    22 timerfd  1060 clockid=monotonic remaining=4625.661834645
    systemd   1    25 timerfd  1060 clockid=realtime remaining=398.164618943
    systemd   1   112 timerfd  1060 clockid=realtime remaining=7537606384.202715161

Added three new columns, TIMERFD.{CLOCKID,TIMERFD.REMAINING,INTERVAL}.
The filter engine works well with them.

An example listing timerfd files expiring within 1.2 seconds.

    # ./lsfd -Q '(TIMERFD.REMAINING > 0.0) && (TIMERFD.REMAINING < 1.2)'
    COMMAND          PID        USER ASSOC MODE    TYPE       SOURCE MNTID INODE NAME
    Xorg           17069         jet    26  rw- timerfd anon_inodefs    15  1060 clockid=monotonic remaining=0.061075544
    systemd-oomd 2382701 systemd-oom     8  rw- timerfd anon_inodefs    15  1060 clockid=monotonic remaining=0.178126915

Using SCOLS_JSON_NUMBER as the data type for TIMERFD.REMAINING and
TIMERFD.INTERVAL columns is suggested by Thomas Weißschuh
<thomas@t-8ch.de>.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: (filter) accept floating point numbers in expressions
Masatake YAMATO [Sat, 3 Jun 2023 21:18:45 +0000 (06:18 +0900)] 
lsfd: (filter) accept floating point numbers in expressions

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: (filter) support floating point number used in columns
Masatake YAMATO [Sat, 3 Jun 2023 09:42:40 +0000 (18:42 +0900)] 
lsfd: (filter) support floating point number used in columns

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: (filter) reduce duplicated code in macro definitions
Masatake YAMATO [Sat, 3 Jun 2023 09:34:53 +0000 (18:34 +0900)] 
lsfd: (filter) reduce duplicated code in macro definitions

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: (filter) improve error message
Masatake YAMATO [Sat, 3 Jun 2023 20:44:38 +0000 (05:44 +0900)] 
lsfd: (filter) improve error message

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd.1.adoc: revise type names for columns
Masatake YAMATO [Sat, 3 Jun 2023 22:39:32 +0000 (07:39 +0900)] 
lsfd.1.adoc: revise type names for columns

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd.1.adoc: fix typos
Masatake YAMATO [Fri, 2 Jun 2023 23:27:05 +0000 (08:27 +0900)] 
lsfd.1.adoc: fix typos

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: adjust coding style
Masatake YAMATO [Mon, 29 May 2023 12:59:04 +0000 (21:59 +0900)] 
lsfd: adjust coding style

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolsfd: fix a sentence in comment
Masatake YAMATO [Sat, 3 Jun 2023 18:42:38 +0000 (03:42 +0900)] 
lsfd: fix a sentence in comment

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 years agolibblkid: (bcache) report block size
Thomas Weißschuh [Sat, 3 Jun 2023 11:49:18 +0000 (13:49 +0200)] 
libblkid: (bcache) report block size

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: (bcache) report version
Thomas Weißschuh [Sat, 3 Jun 2023 09:15:13 +0000 (11:15 +0200)] 
libblkid: (bcache) report version

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: (bcache) report label
Thomas Weißschuh [Sat, 3 Jun 2023 08:50:26 +0000 (10:50 +0200)] 
libblkid: (bcache) report label

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: (bcache) also calculate checksum over journal buckets
Thomas Weißschuh [Sat, 3 Jun 2023 11:13:52 +0000 (13:13 +0200)] 
libblkid: (bcache) also calculate checksum over journal buckets

Fixes #2291

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibblkid: (bcache) extend superblock definition
Thomas Weißschuh [Sat, 3 Jun 2023 11:13:37 +0000 (13:13 +0200)] 
libblkid: (bcache) extend superblock definition

We will need it for the correct checksum calculation.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolibmount (python) : simplify struct initialization
Thomas Weißschuh [Mon, 29 May 2023 07:23:37 +0000 (09:23 +0200)] 
libmount (python) : simplify struct initialization

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolsfd-filter: constify filter logic
Thomas Weißschuh [Sat, 3 Jun 2023 08:22:46 +0000 (10:22 +0200)] 
lsfd-filter: constify filter logic

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agomisc: constify some fields
Thomas Weißschuh [Mon, 29 May 2023 07:23:53 +0000 (09:23 +0200)] 
misc: constify some fields

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: use clang 16
Thomas Weißschuh [Thu, 1 Jun 2023 13:10:38 +0000 (15:10 +0200)] 
ci: use clang 16

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotests: fix subtests containing spaces in their name
Thomas Weißschuh [Fri, 2 Jun 2023 20:53:40 +0000 (22:53 +0200)] 
tests: fix subtests containing spaces in their name

Previously these tests would silently fail to compare
$TS_OUTPUT / $TS_ERRLOG.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: build with GCC 13/11
Thomas Weißschuh [Mon, 29 May 2023 09:23:47 +0000 (11:23 +0200)] 
ci: build with GCC 13/11

Newer releases of GCC 13 have reigned in the false positives, so use it
for CI now.
The sanitizer builds are sticking to GCC 11 for now.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: build on old distro
Thomas Weißschuh [Wed, 31 May 2023 06:09:39 +0000 (08:09 +0200)] 
ci: build on old distro

This should help to catch build breaks

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: mark source directory as safe
Thomas Weißschuh [Wed, 31 May 2023 08:26:50 +0000 (10:26 +0200)] 
ci: mark source directory as safe

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoci: prevent prompts during installation
Thomas Weißschuh [Wed, 31 May 2023 08:15:11 +0000 (10:15 +0200)] 
ci: prevent prompts during installation

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotests: skip broken tests on docker
Thomas Weißschuh [Wed, 31 May 2023 15:31:01 +0000 (17:31 +0200)] 
tests: skip broken tests on docker

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotests: add ts_skip_docker
Thomas Weißschuh [Wed, 31 May 2023 15:27:38 +0000 (17:27 +0200)] 
tests: add ts_skip_docker

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agotools: (asciidoctor) explicitly require extensions module
Thomas Weißschuh [Wed, 31 May 2023 15:12:12 +0000 (17:12 +0200)] 
tools: (asciidoctor) explicitly require extensions module

This is needed for older versions of asciidoctor.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agobuild-sys: only pass --failure-level if supported
Thomas Weißschuh [Wed, 31 May 2023 14:56:31 +0000 (16:56 +0200)] 
build-sys: only pass --failure-level if supported

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agobuild-sys: fix typo in waitpid check
Thomas Weißschuh [Wed, 31 May 2023 14:11:09 +0000 (16:11 +0200)] 
build-sys: fix typo in waitpid check

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agolsfd: (tests) fix typo
Thomas Weißschuh [Wed, 31 May 2023 15:25:22 +0000 (17:25 +0200)] 
lsfd: (tests) fix typo

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoblockdev: properly check for BLKGETZONESZ ioctl
Thomas Weißschuh [Wed, 31 May 2023 10:54:57 +0000 (12:54 +0200)] 
blockdev: properly check for BLKGETZONESZ ioctl

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoblkzone: don't take address of struct blk_zone
Thomas Weißschuh [Wed, 31 May 2023 10:47:03 +0000 (12:47 +0200)] 
blkzone: don't take address of struct blk_zone

Older versions of GCC do not know the warning so they warn about the
unknown ignored warning.

As struct blk_zone is only 64 bytes anyway just copy it.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agoMerge branch 'pr/termtype'
Karel Zak [Wed, 31 May 2023 09:03:07 +0000 (11:03 +0200)] 
Merge branch 'pr/termtype'

2 years agoMerge branch 'patch-1' of https://github.com/theHenMan/util-linux
Karel Zak [Wed, 31 May 2023 07:35:05 +0000 (09:35 +0200)] 
Merge branch 'patch-1' of https://github.com/theHenMan/util-linux

* 'patch-1' of https://github.com/theHenMan/util-linux:
  Update fsck.8.adoc

2 years agoMerge branch 'enosys/compat' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 31 May 2023 07:30:31 +0000 (09:30 +0200)] 
Merge branch 'enosys/compat' of https://github.com/t-8ch/util-linux

* 'enosys/compat' of https://github.com/t-8ch/util-linux:
  test_enosys: fix build on old kernels

2 years agoMerge branch 'patch-1' of https://github.com/nt8r/util-linux
Karel Zak [Wed, 31 May 2023 07:28:33 +0000 (09:28 +0200)] 
Merge branch 'patch-1' of https://github.com/nt8r/util-linux

* 'patch-1' of https://github.com/nt8r/util-linux:
  dmesg: make kmsg read() buffer big enough for kernel

2 years agoMerge branch 'patch-2' of https://github.com/ThomasKaiser/util-linux
Karel Zak [Wed, 31 May 2023 07:21:11 +0000 (09:21 +0200)] 
Merge branch 'patch-2' of https://github.com/ThomasKaiser/util-linux

* 'patch-2' of https://github.com/ThomasKaiser/util-linux:
  Fix Blizzard-M2-Max
  Add recent Apple ARM cores

2 years agottyutils: improve get_terminal_default_type() code
Karel Zak [Wed, 31 May 2023 07:18:06 +0000 (09:18 +0200)] 
ttyutils: improve get_terminal_default_type() code

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoUpdate fsck.8.adoc
Hennie Botha [Wed, 31 May 2023 06:45:25 +0000 (08:45 +0200)] 
Update fsck.8.adoc

Typo

2 years agotest_enosys: fix build on old kernels
Thomas Weißschuh [Tue, 30 May 2023 18:01:49 +0000 (20:01 +0200)] 
test_enosys: fix build on old kernels

Fixes #2277

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 years agodmesg: make kmsg read() buffer big enough for kernel
anteater [Mon, 29 May 2023 20:59:11 +0000 (20:59 +0000)] 
dmesg: make kmsg read() buffer big enough for kernel

otherwise, if the kernel log has an item longer than 1024B, our read() gives EINVAL and we stop reading kmsg

2 years agosulogin: use get_terminal_default_type()
Karel Zak [Mon, 29 May 2023 13:11:48 +0000 (15:11 +0200)] 
sulogin: use get_terminal_default_type()

Let's reuse the way how agetty initializes $TERM.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agoagetty: use get_terminal_default_type()
Karel Zak [Mon, 29 May 2023 13:11:13 +0000 (15:11 +0200)] 
agetty: use get_terminal_default_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
2 years agolib/ttyutils: add get_terminal_default_type()
Karel Zak [Mon, 29 May 2023 13:10:24 +0000 (15:10 +0200)] 
lib/ttyutils: add get_terminal_default_type()

Based on code from agetty.

Signed-off-by: Karel Zak <kzak@redhat.com>