]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
3 years agopo: update cs.po (from translationproject.org)
Petr Písař [Mon, 31 May 2021 16:20:33 +0000 (18:20 +0200)] 
po: update cs.po (from translationproject.org)

3 years agolibblkid: fix docs
Karel Zak [Mon, 31 May 2021 16:16:57 +0000 (18:16 +0200)] 
libblkid: fix docs

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs: update copyright years
Karel Zak [Mon, 31 May 2021 16:12:07 +0000 (18:12 +0200)] 
docs: update copyright years

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: remove with-cryptsetup from tools/config-gen.d/all.conf
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).

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: fix NVIDIA ARM hw implementer spelling case
Ville Skyttä [Sun, 30 May 2021 12:14:38 +0000 (15:14 +0300)] 
lscpu: fix NVIDIA ARM hw implementer spelling case

Ref respective vendor sites.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: recognize more ARM implementers
Ville Skyttä [Sun, 30 May 2021 12:13:39 +0000 (15:13 +0300)] 
lscpu: recognize more ARM implementers

Add just the implementer string, no parts yet.

Refs https://developer.arm.com/documentation/ddi0595/2021-03/AArch64-Registers/MIDR-EL1--Main-ID-Register
Refs https://github.com/torvalds/linux/blob/b90e90f40b4ff23c753126008bf4713a42353af6/arch/arm64/include/asm/cputype.h#L54

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
3 years agopo: add xgettext hint for non-c-format string
Karel Zak [Thu, 27 May 2021 08:39:58 +0000 (10:39 +0200)] 
po: add xgettext hint for non-c-format string

Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: cleanup tab vs. space
Karel Zak [Wed, 26 May 2021 09:54:47 +0000 (11:54 +0200)] 
lscpu: cleanup tab vs. space

Do not mix tab and space in structs initializations.

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: Replace space with tabs
Bader Zaidan [Fri, 21 May 2021 22:55:17 +0000 (00:55 +0200)] 
lscpu: Replace space with tabs

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: add MHZ to the -e output
Karel Zak [Sun, 23 May 2021 21:52:00 +0000 (23:52 +0200)] 
lscpu: add MHZ to the -e output

Addresses: https://github.com/karelzak/util-linux/issues/1314
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofstrim: do not start the timer in initrd
Zbigniew Jędrzejewski-Szmek [Fri, 21 May 2021 08:45:35 +0000 (10:45 +0200)] 
fstrim: do not start the timer in initrd

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.

3 years agoMerge branch 'more-floating-point' of https://github.com/kerolasa/util-linux
Karel Zak [Thu, 20 May 2021 07:32:53 +0000 (09:32 +0200)] 
Merge branch 'more-floating-point' of https://github.com/kerolasa/util-linux

* 'more-floating-point' of https://github.com/kerolasa/util-linux:
  more: fix floating point exception core dump

3 years agofstrim: fix paths comparison
Karel Zak [Thu, 20 May 2021 07:25:46 +0000 (09:25 +0200)] 
fstrim: fix paths comparison

Fix: https://github.com/karelzak/util-linux/issues/1312
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomore: fix floating point exception core dump
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)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
3 years agobuild-sys: fix po-man/ make check
Karel Zak [Thu, 13 May 2021 10:21:56 +0000 (12:21 +0200)] 
build-sys: fix po-man/ make check

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoblkdiscard: do not probe for signatures on --force
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>
3 years agoMerge branch 'whitespace' of https://github.com/eworm-de/util-linux
Karel Zak [Thu, 13 May 2021 08:24:25 +0000 (10:24 +0200)] 
Merge branch 'whitespace' of https://github.com/eworm-de/util-linux

3 years agobuild-sys: update util-linux-man.pot on 'make dist'
Karel Zak [Thu, 13 May 2021 08:23:34 +0000 (10:23 +0200)] 
build-sys: update util-linux-man.pot on 'make dist'

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofix whitespace issue in ducumentation
Christian Hesse [Mon, 10 May 2021 13:53:50 +0000 (15:53 +0200)] 
fix whitespace issue in ducumentation

This removes trailing whitespaces and fixes minor issues.

3 years agobuild-sys: release++ (v2.37-rc2) v2.37-rc2
Karel Zak [Mon, 10 May 2021 11:12:02 +0000 (13:12 +0200)] 
build-sys: release++ (v2.37-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs: update v2.37-ReleaseNotes
Karel Zak [Mon, 10 May 2021 11:10:21 +0000 (13:10 +0200)] 
docs: update v2.37-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs: update AUTHORS file
Karel Zak [Mon, 10 May 2021 11:09:13 +0000 (13:09 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agopo: merge changes
Karel Zak [Mon, 10 May 2021 10:21:25 +0000 (12:21 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agopo: update sv.po (from translationproject.org)
Sebastian Rasmussen [Mon, 10 May 2021 10:15:03 +0000 (12:15 +0200)] 
po: update sv.po (from translationproject.org)

3 years agotests: update build tests
Karel Zak [Mon, 10 May 2021 10:13:09 +0000 (12:13 +0200)] 
tests: update build tests

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: fix libblkid dependence
Karel Zak [Mon, 10 May 2021 09:24:24 +0000 (11:24 +0200)] 
build-sys: fix libblkid dependence

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agocolumn: add placeholder '0' to specify all columns
Karel Zak [Mon, 10 May 2021 08:46:51 +0000 (10:46 +0200)] 
column: add placeholder '0' to specify all columns

Fixes: https://github.com/karelzak/util-linux/issues/1306
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoblkdiscard: fix compilation without libblkid
Karel Zak [Fri, 7 May 2021 18:38:26 +0000 (20:38 +0200)] 
blkdiscard: fix compilation without libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomkswap: remove unused variable when compile without libblkid
Karel Zak [Fri, 7 May 2021 18:37:51 +0000 (20:37 +0200)] 
mkswap: remove unused variable when compile without libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs: add #1266 to TODO file
Karel Zak [Fri, 7 May 2021 09:26:33 +0000 (11:26 +0200)] 
docs: add #1266 to TODO file

References: https://github.com/karelzak/util-linux/issues/1266
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agounshare: Fix error message when setting proc mount propagation
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.

3 years agorfkill: make RFKILL_EVENT_SIZE_V1 use more portable
Karel Zak [Thu, 6 May 2021 15:10:46 +0000 (17:10 +0200)] 
rfkill: make RFKILL_EVENT_SIZE_V1 use more portable

The old linux/rfkill.h uses "int", new versions use sizeof() for the
macro ...

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: update libfdisk JSON outputs
Karel Zak [Thu, 6 May 2021 15:02:40 +0000 (17:02 +0200)] 
tests: update libfdisk JSON outputs

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibfdisk: (script) print bootable flag only when set
Karel Zak [Thu, 6 May 2021 15:01:48 +0000 (17:01 +0200)] 
libfdisk: (script) print bootable flag only when set

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agorfkill: fix compiler warning [-Wsign-compare]
Karel Zak [Thu, 6 May 2021 14:44:20 +0000 (16:44 +0200)] 
rfkill: fix compiler warning [-Wsign-compare]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/jsonwrt: don't use ctype.h for ASCII chars
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.

Anyway, for more details:

$ cat a.c
#include <ctype.h>
#include <stdio.h>
#include <locale.h>

int main(void)
{
int in, out;

setlocale(LC_ALL, "");

in ='I';
out = tolower(in);

printf("%1$c [%1$d] --> %2$c [%2$d]\n", in, out);
return 0;
}

$ make a
cc     a.c   -o a

$ LANG=en_US.utf8 ./a
I [73] --> i [105]

$ LANG=tr_TR.UTF-8 ./a
I [73] --> I [73]

Fixes: https://github.com/karelzak/util-linux/issues/1302
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/jsonwrt: remove fputs_quoted_json_* functions from include/carefulputc.h
Karel Zak [Thu, 6 May 2021 14:05:56 +0000 (16:05 +0200)] 
lib/jsonwrt: remove fputs_quoted_json_* functions from include/carefulputc.h

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/jsonwrt: remove 'islast' from API
Karel Zak [Thu, 6 May 2021 13:58:02 +0000 (15:58 +0200)] 
lib/jsonwrt: remove 'islast' from API

The code should be able to keep track about previous content and print
JSON objects separator automatically.

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibfdisk: use lib/jsonwrt.s for JSON formatting
Karel Zak [Thu, 6 May 2021 13:02:14 +0000 (15:02 +0200)] 
libfdisk: use lib/jsonwrt.s for JSON formatting

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agorfkill: fix compiler warning [-Wformat=]
Karel Zak [Thu, 6 May 2021 10:24:41 +0000 (12:24 +0200)] 
rfkill: fix compiler warning [-Wformat=]

* `RFKILL_EVENT_SIZE_V1` is defined as sizeof(struct rfkill_event), so let's use %zu

* cast `len` to size_t to make it usable with %zu

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/fileutils: close fd if fdopen is failed
Masatake YAMATO [Thu, 6 May 2021 04:39:30 +0000 (13:39 +0900)] 
lib/fileutils: close fd if fdopen is failed

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
3 years agohwclock: follow timespec and use long int for nsec
Karel Zak [Thu, 6 May 2021 09:56:14 +0000 (11:56 +0200)] 
hwclock: follow timespec and use long int for nsec

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoscript: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
script: fix time_t=long assumptions

References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agortcwake: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
rtcwake: fix time_t=long assumptions

References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/strutils: assume 64-bit time_t
Karel Zak [Thu, 6 May 2021 09:06:45 +0000 (11:06 +0200)] 
lib/strutils: assume 64-bit time_t

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agohardlink: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
hardlink: fix time_t=long assumptions

References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotest_uuid_parser: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
test_uuid_parser: fix time_t=long assumptions

References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofsck: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
fsck: fix time_t=long assumptions

References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoscriptplay: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
scriptplay: fix time_t=long assumptions

Fixes: https://github.com/karelzak/util-linux/issues/1069
References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/pty-session: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
lib/pty-session: fix time_t=long assumptions

Fixes: https://github.com/karelzak/util-linux/issues/1069
References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoflock: fix time_t=long assumptions
Karel Zak [Thu, 6 May 2021 08:13:27 +0000 (10:13 +0200)] 
flock: fix time_t=long assumptions

This also fixes flock for archs (e.g. sparc64) where suseconds_t is not long.

Fixes: https://github.com/karelzak/util-linux/issues/1069
References: http://github.com/karelzak/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: keep adoc files in dist_noinst_DATA
Karel Zak [Wed, 5 May 2021 11:35:30 +0000 (13:35 +0200)] 
build-sys: keep adoc files in dist_noinst_DATA

* rename MANPAGES_EXTRA= to ADOCFILES_COMMON=

* keep track about individual adoc files by dist_noinst_DATA=
  This variable is not effected by automake conditions, so the files
  are always distributed.

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: update sparc lscpu tests
Karel Zak [Mon, 3 May 2021 18:30:42 +0000 (20:30 +0200)] 
tests: update sparc lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: assume L1d, L1i, L2, L3 for sparc
Karel Zak [Mon, 3 May 2021 18:28:30 +0000 (20:28 +0200)] 
lscpu: assume L1d, L1i, L2, L3 for sparc

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: read Sparc caches files
Karel Zak [Mon, 3 May 2021 14:27:35 +0000 (16:27 +0200)] 
lscpu: read Sparc caches files

Fixes: https://github.com/karelzak/util-linux/issues/1296
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomeson: fix systemd dependence
Karel Zak [Mon, 3 May 2021 09:10:10 +0000 (11:10 +0200)] 
meson: fix systemd dependence

Fixes: https://github.com/karelzak/util-linux/issues/1301
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'master' of https://github.com/arbego/util-linux
Karel Zak [Fri, 30 Apr 2021 11:12:26 +0000 (13:12 +0200)] 
Merge branch 'master' of https://github.com/arbego/util-linux

* 'master' of https://github.com/arbego/util-linux:
  Fixed wrongful time_t=long assumptions in hwclock.c and timeutils.c
  Changed int64_t casts to long long int casts
  Fixed format strings and type casts in hwclock to work with 64-bit time_t on 32-bit linux

3 years agoFixed wrongful time_t=long assumptions in hwclock.c and timeutils.c
Armin Begovic [Thu, 29 Apr 2021 11:55:52 +0000 (11:55 +0000)] 
Fixed wrongful time_t=long assumptions in hwclock.c and timeutils.c

3 years agobuild-sys: add configure options to disable individual utils
heitbaum [Thu, 29 Apr 2021 08:19:50 +0000 (08:19 +0000)] 
build-sys: add configure options to disable individual utils

3 years agolscpu: fix "caches" header
Karel Zak [Wed, 28 Apr 2021 08:51:07 +0000 (10:51 +0200)] 
lscpu: fix "caches" header

It's possible that lscpu does not print any caches if full caches size
is zero. In this case we do not need the header.

Addresses: https://github.com/karelzak/util-linux/issues/1207
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs/TODO: Minor update and fix typo
Mario Blättermann [Sat, 24 Apr 2021 10:20:08 +0000 (12:20 +0200)] 
docs/TODO: Minor update and fix typo

3 years agoChanged int64_t casts to long long int casts
Armin Begovic [Fri, 23 Apr 2021 21:28:37 +0000 (23:28 +0200)] 
Changed int64_t casts to long long int casts

3 years agoFixed format strings and type casts in hwclock to work with 64-bit time_t on 32-bit...
Armin Begovic [Fri, 23 Apr 2021 20:48:13 +0000 (22:48 +0200)] 
Fixed format strings and type casts in hwclock to work with 64-bit time_t on 32-bit linux

3 years agozramctl: (man) fix streams default number
Karel Zak [Fri, 23 Apr 2021 11:01:57 +0000 (13:01 +0200)] 
zramctl: (man) fix streams default number

References: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html#set-max-number-of-compression-streams
References: https://github.com/torvalds/linux/commit/da9556a2367cf2261ab4d3e100693c82fb1ddb26
Fixes: https://github.com/karelzak/util-linux/issues/1283
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoscriptlive: (man) add missing parenthesis
Karel Zak [Fri, 23 Apr 2021 09:35:20 +0000 (11:35 +0200)] 
scriptlive: (man) add missing parenthesis

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'fix-misspellings' of https://github.com/rffontenelle/util-linux
Karel Zak [Fri, 23 Apr 2021 08:49:10 +0000 (10:49 +0200)] 
Merge branch 'fix-misspellings' of https://github.com/rffontenelle/util-linux

3 years agoMerge branch 'master' of https://github.com/mariobl/util-linux
Karel Zak [Fri, 23 Apr 2021 08:44:46 +0000 (10:44 +0200)] 
Merge branch 'master' of https://github.com/mariobl/util-linux

* 'master' of https://github.com/mariobl/util-linux:
  po-man: Fix typos in de.po and po4a.cfg
  hardlink: fix typo

3 years agodocs: update TODO
Karel Zak [Fri, 23 Apr 2021 08:43:06 +0000 (10:43 +0200)] 
docs: update TODO

Addresses: https://github.com/karelzak/util-linux/issues/1291
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: add .stamp to gitignore
Karel Zak [Fri, 23 Apr 2021 08:39:35 +0000 (10:39 +0200)] 
build-sys: add .stamp to gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: fix typo
Karel Zak [Thu, 22 Apr 2021 14:11:51 +0000 (16:11 +0200)] 
build-sys: fix typo

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoFix misspellings
Rafael Fontenelle [Thu, 22 Apr 2021 23:31:05 +0000 (20:31 -0300)] 
Fix misspellings

3 years agopo-man: Fix typos in de.po and po4a.cfg
Mario Blättermann [Thu, 22 Apr 2021 16:50:46 +0000 (18:50 +0200)] 
po-man: Fix typos in de.po and po4a.cfg

3 years agoMerge remote-tracking branch 'upstream/master'
Mario Blättermann [Thu, 22 Apr 2021 16:41:50 +0000 (18:41 +0200)] 
Merge remote-tracking branch 'upstream/master'

3 years agobuild-sys: disable po-man by default, cleanup summary
Karel Zak [Thu, 22 Apr 2021 13:59:54 +0000 (15:59 +0200)] 
build-sys: disable po-man by default, cleanup summary

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: add uninstall to po-man
Karel Zak [Thu, 22 Apr 2021 08:19:50 +0000 (10:19 +0200)] 
build-sys: add uninstall to po-man

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: add targets to generated translated man pages
Karel Zak [Wed, 21 Apr 2021 17:55:27 +0000 (19:55 +0200)] 
build-sys: add targets to generated translated man pages

* add --enable-poman (disabled by default)
* add po-man/Makefile.am for "make all" and "make install"
* install man pages to $mandir/$lang/man{1,3,5,8}

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'topic/po4a' of https://github.com/mariobl/util-linux
Karel Zak [Thu, 22 Apr 2021 13:23:27 +0000 (15:23 +0200)] 
Merge branch 'topic/po4a' of https://github.com/mariobl/util-linux

* 'topic/po4a' of https://github.com/mariobl/util-linux:
  mount.a.adoc: Fix markup
  Asciidoc: Add missing macro definition in uclampset.1
  Asciidoc: Fix markup in example man page
  Asciidoc: Fix markup
  Asciidoc: Remove artifact from merge conflict
  Asciidoc: Convert man-common/README to Markdown
  po-man: Fix the example man page
  po-man: Fix typos in po-man/README.md
  po-man: Update the example man page
  po-man: Add po-man/README.md
  po-man: Add (incomplete) de.po for testing purposes
  po-man: Add (incomplete) de.po for testing purposes
  po-man: Adjust paths in po4a.cfg and update .pot file
  po-man: Move Po4a config file and translation template to po-man

3 years agobuild-sys: cleanup Makefiles
Karel Zak [Tue, 20 Apr 2021 12:39:32 +0000 (14:39 +0200)] 
build-sys: cleanup Makefiles

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: fix test_loopdev build
Karel Zak [Tue, 20 Apr 2021 12:22:34 +0000 (14:22 +0200)] 
build-sys: fix test_loopdev build

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/loopdev: fix is_loopdev() to be usable with partitions
Karel Zak [Tue, 20 Apr 2021 11:20:12 +0000 (13:20 +0200)] 
lib/loopdev: fix is_loopdev() to be usable with partitions

The current implementation of the function does not care if the device
is whole-disk device or partition, all is loopdev. This is regression
as the original is_loopdev() version was based on whole-disk devices
major numbers only.

Fixes: https://github.com/karelzak/util-linux/issues/1202
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agohardlink: fix typo again
Karel Zak [Mon, 19 Apr 2021 13:30:57 +0000 (15:30 +0200)] 
hardlink: fix typo again

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibfdisk: do not reset default if undefined by script
Karel Zak [Mon, 19 Apr 2021 11:19:23 +0000 (13:19 +0200)] 
libfdisk: do not reset default if undefined by script

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agohardlink: fix typo
Karel Zak [Mon, 19 Apr 2021 08:09:08 +0000 (10:09 +0200)] 
hardlink: fix typo

Reported-by: Mario Blättermann <mario.blaettermann@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'fix-swapon-summary-heading-alignment' of https://github.com/sebras...
Karel Zak [Mon, 19 Apr 2021 08:05:05 +0000 (10:05 +0200)] 
Merge branch 'fix-swapon-summary-heading-alignment' of https://github.com/sebras/util-linux

* 'fix-swapon-summary-heading-alignment' of https://github.com/sebras/util-linux:
  swapon: Keep headings and fields aligned in summary output.

3 years agoMerge branch 'fix-typo' of https://github.com/sebras/util-linux
Karel Zak [Mon, 19 Apr 2021 08:00:42 +0000 (10:00 +0200)] 
Merge branch 'fix-typo' of https://github.com/sebras/util-linux

* 'fix-typo' of https://github.com/sebras/util-linux:
  Fix typo in help message.

3 years agoMerge branch 'fix-first-lba' of https://github.com/samueldr/util-linux
Karel Zak [Mon, 19 Apr 2021 07:59:42 +0000 (09:59 +0200)] 
Merge branch 'fix-first-lba' of https://github.com/samueldr/util-linux

* 'fix-first-lba' of https://github.com/samueldr/util-linux:
  libfdisk: Include table-length in first-lba checks

3 years agoMerge branch 'lsblk-E-completion' of https://github.com/scop/util-linux
Karel Zak [Mon, 19 Apr 2021 07:33:28 +0000 (09:33 +0200)] 
Merge branch 'lsblk-E-completion' of https://github.com/scop/util-linux

* 'lsblk-E-completion' of https://github.com/scop/util-linux:
  bash-completion: (lsblk) fix -E/-M arg (non-)completion

3 years agoMerge branch 'update-lsns-man-page' of https://github.com/masatake/util-linux
Karel Zak [Mon, 19 Apr 2021 07:32:12 +0000 (09:32 +0200)] 
Merge branch 'update-lsns-man-page' of https://github.com/masatake/util-linux

* 'update-lsns-man-page' of https://github.com/masatake/util-linux:
  man: add ioctl_ns(2) to SEE ALSO of lsns(2)

3 years agomount.a.adoc: Fix markup
Mario Blättermann [Sun, 18 Apr 2021 10:16:37 +0000 (12:16 +0200)] 
mount.a.adoc: Fix markup

3 years agohardlink: fix typo
Mario Blättermann [Sun, 18 Apr 2021 07:17:31 +0000 (09:17 +0200)] 
hardlink: fix typo

3 years agoswapon: Keep headings and fields aligned in summary output.
Sebastian Rasmussen [Sun, 18 Apr 2021 01:41:50 +0000 (03:41 +0200)] 
swapon: Keep headings and fields aligned in summary output.

Because the headings are aligned with tabs the fields must
always be a multiple of 8 characters. Moreover if the field
values are shorter than 8 characters, extra tabs must be
inserted before the succeding field to keep alignment.

swapon parses /proc/swaps, generated by the Linux kernel in
mm/swapfile.c. Its function swap_show() and its recent fix in
commit 6f7939405f61de7d0da7f6c90182e96c4f5ff6c1 were used as
inspiration for this commit.

Additionally inform the translators about the requirements of
formatting and relationship between the heading and entry strings.

3 years agolibfdisk: Include table-length in first-lba checks
Samuel Dionne-Riel [Sat, 17 Apr 2021 06:17:53 +0000 (02:17 -0400)] 
libfdisk: Include table-length in first-lba checks

Otherwise, sfdisk would error out on its own dump, as first-lba would be
earlier than "plausible" assuming the default table size.

This is because it did not look for `table-length` when using an sfdisk
script. This means that using `--dump` on a valid image, could not be
unserialized back into a valid image.

This is helpful in exotic situations, where a partition has to be
created earlier than the conventional "first-lba" (2048). For example,
on Allwinner A64 boards, where a firmware is stored at LBA16. With this
it is possible to ask for `first-lba` at or earlier than 16, by reducing
the number of entries to e.g. 48.

3 years agoFix typo in help message.
Sebastian Rasmussen [Sat, 17 Apr 2021 12:40:13 +0000 (14:40 +0200)] 
Fix typo in help message.

3 years agobash-completion: (lsblk) fix -E/-M arg (non-)completion
Ville Skyttä [Fri, 16 Apr 2021 19:08:48 +0000 (22:08 +0300)] 
bash-completion: (lsblk) fix -E/-M arg (non-)completion

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
3 years agoman: add ioctl_ns(2) to SEE ALSO of lsns(2)
Masatake YAMATO [Thu, 15 Apr 2021 22:51:45 +0000 (07:51 +0900)] 
man: add ioctl_ns(2) to SEE ALSO of lsns(2)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
3 years agolibfdisk: use open(O_EXCL) to detect if device is used
Karel Zak [Thu, 15 Apr 2021 13:11:44 +0000 (15:11 +0200)] 
libfdisk: use open(O_EXCL) to detect if device is used

It's seems detection by BLKRRPART is broken in recent kernels
(probably regression), and it's also overkill to force kernel re-read
all and generate all the events. It seems more elegant to use O_EXCL.

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofdisk: warn if disk in use
Karel Zak [Thu, 15 Apr 2021 12:43:15 +0000 (14:43 +0200)] 
fdisk: warn if disk in use

Fixes: https://github.com/karelzak/util-linux/issues/1278
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agocfdisk: warn if disk on use
Karel Zak [Thu, 15 Apr 2021 12:39:11 +0000 (14:39 +0200)] 
cfdisk: warn if disk on use

Fixes: https://github.com/karelzak/util-linux/issues/1278
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs: add kernel version and commit to info about mountinfo workaround
Karel Zak [Thu, 15 Apr 2021 10:29:27 +0000 (12:29 +0200)] 
docs: add kernel version and commit to info about mountinfo workaround

Fixes: https://github.com/karelzak/util-linux/issues/1280
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibsmartcols: make buffers append function more robust
Karel Zak [Wed, 14 Apr 2021 14:25:30 +0000 (16:25 +0200)] 
libsmartcols: make buffers append function more robust

Fixes: https://github.com/karelzak/util-linux/issues/1279
Signed-off-by: Karel Zak <kzak@redhat.com>