Tj [Thu, 17 Jun 2021 12:13:22 +0000 (13:13 +0100)]
mount: man-page; add all overlayfs options
The section in man (8) mount for overlay is missing nine options which
aren't documented elsewhere either and are useful features to be aware
of and use.
Alex Xu [Wed, 16 Jun 2021 13:58:25 +0000 (13:58 +0000)]
build-sys: Update configure.ac
1. the test incorrectly used AC_COMPILE_IFELSE instead of
AC_LINK_IFELSE, defeating the purpose of checking -lcrypt.
2. the test did not properly restore LIBS, causing later checks to all
fail if libcrypt wasn't found.
3. HAVE_LIBCRYPT only controls whether to use -lcrypt, it is not
needed or used in any source files.
[kzak@redhat.com: - improve commit message
- use UL_{SET,RESTORE}_FLAGS() rather than directly
modify $LIBS]
Karel Zak [Thu, 17 Jun 2021 11:28:32 +0000 (13:28 +0200)]
lib/path: improve ul_path_readlink() to be more robust
According to POSIX, readlink() makes no effort to null-terminate buffer
with the result. It seems better to hide this disadvantage in the
ul_path_...() API rather than assume buf[sz] = '\0' everywhere.
Reported-by: Reported-by: Jan Pazdziora <jpazdziora@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Reported-by: Brian Lane <bcl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877
Fix: https://github.com/karelzak/util-linux/issues/1348 Signed-off-by: Karel Zak <kzak@redhat.com>
Platon Pronko [Fri, 11 Jun 2021 18:20:58 +0000 (21:20 +0300)]
dmesg: fix indentation in man page
Double-semicolon at the end of the option line results in description
being indented extra tab to the right. Replacing them with double-colons
allows all options to be displayed at the same indent level.
Qais Yousef [Mon, 7 Jun 2021 16:11:11 +0000 (17:11 +0100)]
uclampset: Fix left over optind++
The code was changed to use ':' in getopt_long() but these were left
over by mistake causing weird random errors when using these options
depending on the order they were fed.
Karel Zak [Mon, 7 Jun 2021 08:32:20 +0000 (10:32 +0200)]
libsmartcols: fix bare array on JSON output
The bare array ({[...]}) for top level list of entries is invalid. It
seems better to print empty string than nothing. This is workaround
for broken utils, better is to define a table name.
Addresses: https://github.com/karelzak/util-linux/issues/1339 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 2 Jun 2021 09:55:44 +0000 (11:55 +0200)]
build-sys: fix {release-version} man pages
* define {release-version} as $VERSION
* do not use {docdir} in adoc; it's built-in ascidoctor variable
https://docs.asciidoctor.org/asciidoc/latest/attributes/document-attributes-reference/#intrinsic-attributes
Addresses: https://github.com/karelzak/util-linux/issues/1327 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 31 May 2021 15:44:10 +0000 (17:44 +0200)]
build-sys: remove with-cryptsetup from tools/config-gen.d/all.conf
Unfortunately libtools is not smart enough to link libblkid
dynamically if we link in-tree static libmount.a for libmount tests.
In this case libtools always uses also libblkid.a, but it's problem
for libcryptsetup which requires versioned symbols from libblkid.so
This is no problem for normal binaries, but for libmount tests only
(where we need static library to by-pass public library API).
I'm working on building initramfs images directly from normal
packages, which means that the pristine system rpms should behave
correctly as much as possible also in the initrd. There usually isn't
enough time for the timer to actually fire, but starting it gives a
line on the console and generally looks confusing and sloppy. So let's
skip the timer if it ever ends up being enabled in the initrd.
Checking for /etc/initrd-release is the standard condition that
systemd's initrd units use.
Sami Kerola [Wed, 19 May 2021 19:23:48 +0000 (20:23 +0100)]
more: fix floating point exception core dump
Make the code avoid divided by zero. This can happen when file has content
but is zero in size. Such files can be found from procfs, possibly some
other pseudo-filesystems. To reproduce the issue run the following.
$ more /proc/crypto
...
Floating point exception (core dumped)
Karel Zak [Thu, 13 May 2021 08:34:14 +0000 (10:34 +0200)]
blkdiscard: do not probe for signatures on --force
The command-line option --force is defined as "disable all checks",
but the current code does not follow this idea. We need a way how to
disable read from the device (for example for dm-integrity devices).
Fixes: https://github.com/karelzak/util-linux/issues/1308 Signed-off-by: Karel Zak <kzak@redhat.com>
Johan Herland [Thu, 6 May 2021 22:53:29 +0000 (00:53 +0200)]
unshare: Fix error message when setting proc mount propagation
The mount() command associated with this error message is not about
unmounting the proc fs, but rather about changing the propagation
of mount events for the proc fs. Rewrite the error message to
reflect this.
Karel Zak [Thu, 6 May 2021 14:35:50 +0000 (16:35 +0200)]
lib/jsonwrt: don't use ctype.h for ASCII chars
tolower() does not work "as expected" for tr_TR.UTF-8 (Turkish).
Fortunately, we need to convert only objects and variables names in
JSON output, and this is always old good ASCII.