]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
5 years agobash-completion: release preparations
Sami Kerola [Fri, 12 Jun 2020 19:29:54 +0000 (20:29 +0100)] 
bash-completion: release preparations

6e103c7690fe blkzone: Add --force option
9cd88771ef45 fdisk: add --lock and LOCK_BLOCK_DEVICE
921ceaca31bd wipefs: add --lock and LOCK_BLOCK_DEVICE
c3ef1268a0b4 sfdisk: add --lock and LOCK_BLOCK_DEVICE
b8671fe76370 mkswap: add --lock and LOCK_BLOCK_DEVICE
ec8f712157fe cfdisk: add --lock and LOCK_BLOCK_DEVICE
f2229320a9f7 fdisk: add --noauto-pt
7f1f0584c24a nsenter: add support for the time namespace
dd52c4fa011d lsirq: add -n option
ee5a16025046 sfdisk: add --relocate command
99d78b2fefe3 fdisk: add --list-details
65e27d545cb5 sfdisk: add --disk-id to change disk UUID/ID
34fed3ff1740 blkdiscard: use O_EXCL, add --force

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agoManual pages: setpriv.1: warn users of restrictions on capability changes
Michael Kerrisk (man-pages) [Fri, 12 Jun 2020 11:19:33 +0000 (13:19 +0200)] 
Manual pages: setpriv.1: warn users of restrictions on capability changes

The kernel imposes various restrictions on the changes that can be
made to the inheritable, ambient, and bounding sets. Warn the user
about that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: setpriv.1: Various minor wording and formatting fixes
Michael Kerrisk (man-pages) [Fri, 12 Jun 2020 11:19:32 +0000 (13:19 +0200)] 
Manual pages: setpriv.1: Various minor wording and formatting fixes

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: runuser.1: Various wording and formatting fixes
Michael Kerrisk (man-pages) [Fri, 12 Jun 2020 11:19:31 +0000 (13:19 +0200)] 
Manual pages: runuser.1: Various wording and formatting fixes

Most of this is pretty straightforward English language fix-ups
and formatting fix-ups, so I've rolled it into one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agodoc: text-utils/*: fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 02:18:20 +0000 (02:18 +0000)] 
doc: text-utils/*: fix some warnings from "mandoc -T lint"

mandoc: ./text-utils/column.1:58:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/column.1:63:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/column.1:119:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/column.1:171:1: WARNING: skipping paragraph macro: sp after PP
mandoc: ./text-utils/column.1:170:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./text-utils/hexdump.1:206:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/hexdump.1:356:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:359:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:362:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:366:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:369:2: STYLE: fill mode already disabled, skipping: nf

####

  There are no changes in the output from "nroff" and "groff", except
for a reformat of a paragraph caused by "fill-mode".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: term-utils/*: fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 01:26:37 +0000 (01:26 +0000)] 
doc: term-utils/*: fix some warnings from "mandoc -T lint"

mandoc: ./term-utils/agetty.8:224:36: WARNING: undefined escape, printing literally: \\
mandoc: ./term-utils/agetty.8:12:2: STYLE: fill mode already enabled, skipping: fi
mandoc: ./term-utils/agetty.8:307:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./term-utils/agetty.8:489:2: STYLE: fill mode already enabled, skipping: fi
mandoc: ./term-utils/agetty.8:503:2: STYLE: fill mode already enabled, skipping: fi

mandoc: ./term-utils/script.1:198:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./term-utils/script.1:244:2: WARNING: empty block: RS
mandoc: ./term-utils/script.1:261:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./term-utils/scriptlive.1:77:2: STYLE: fill mode already disabled, skipping: nf

mandoc: ./term-utils/scriptreplay.1:122:2: STYLE: fill mode already disabled, skipping: nf

###

  Additional change:

1)  Changed '  ' once to ' ' in "agetty.8"

2)  Change in the output from "groff":

'-' changed to '\-' in "agetty.8".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: sys-utils/*: fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 00:50:33 +0000 (00:50 +0000)] 
doc: sys-utils/*: fix some warnings from "mandoc -T lint"

mandoc: ./sys-utils/adjtime_config.5:26:1: WARNING: skipping paragraph macro: sp after PP

mandoc: ./sys-utils/chcpu.8:98:2: WARNING: skipping paragraph macro: br at the end of SH

mandoc: ./sys-utils/choom.1:26:22: STYLE: unterminated quoted argument

mandoc: ./sys-utils/dmesg.1:90:5: STYLE: unterminated quoted argument
mandoc: ./sys-utils/dmesg.1:147:5: STYLE: unterminated quoted argument
mandoc: ./sys-utils/dmesg.1:33:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./sys-utils/dmesg.1:255:2: WARNING: skipping paragraph macro: br after sp

mandoc: ./sys-utils/flock.1:183:2: WARNING: line scope broken: TQ breaks TP
mandoc: ./sys-utils/flock.1:43:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/fsfreeze.8:79:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/fsfreeze.8:83:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/ipcmk.1:43:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./sys-utils/lsirq.1:16:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/lsirq.1:31:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/lsirq.1:34:11: STYLE: unterminated quoted argument

mandoc: ./sys-utils/mount.8:901:4: STYLE: unterminated quoted argument
mandoc: ./sys-utils/mount.8:2239:38: STYLE: unterminated quoted argument
mandoc: ./sys-utils/mount.8:88:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./sys-utils/mount.8:90:2: WARNING: skipping paragraph macro: br before sp

mandoc: ./sys-utils/mountpoint.1:50:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/mountpoint.1:57:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/readprofile.8:10:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/readprofile.8:100:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/renice.1:65:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:68:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:72:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:55:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./sys-utils/swapon.8:227:2: WARNING: skipping paragraph macro: br after SH

mandoc: ./sys-utils/unshare.1:350:32: STYLE: unterminated quoted argument
mandoc: ./sys-utils/unshare.1:253:2: WARNING: skipping paragraph macro: PP after SH

####

  The ouput from "nroff" and "groff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: schedutils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 00:18:44 +0000 (00:18 +0000)] 
doc: schedutils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./schedutils/chrt.1:37:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./schedutils/ionice.1:120:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./schedutils/taskset.1:36:2: WARNING: skipping paragraph macro: PP after SH

####

  There is no change in the ouput from "nroff" and "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: misc-utils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 23:57:22 +0000 (23:57 +0000)] 
doc: misc-utils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./misc-utils/cal.1:214:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./misc-utils/cal.1:216:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/cal.1:225:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./misc-utils/findfs.8:36:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./misc-utils/findfs.8:38:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:41:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:44:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:48:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./misc-utils/logger.1:118:15: STYLE: unterminated quoted argument
mandoc: ./misc-utils/logger.1:231:2: WARNING: skipping paragraph macro: IP empty

mandoc: ./misc-utils/look.1:116:2: STYLE: fill mode already disabled, skipping: nf

mandoc: ./misc-utils/hardlink.1:1:5: STYLE: lower case character in document title: TH hardlink
mandoc: ./misc-utils/hardlink.1:1:2: WARNING: missing date, using today's date: TH
mandoc: ./misc-utils/hardlink.1:9:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./misc-utils/hardlink.1:52:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./misc-utils/hardlink.1:65:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./misc-utils/rename.1:65:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:65:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:97:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:107:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:116:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./misc-utils/whereis.1:82:2: WARNING: line scope broken: IP breaks TP
mandoc: ./misc-utils/whereis.1:152:2: WARNING: skipping paragraph macro: PP empty

####

  There is no change in the ouput of "nroff" or "groff", except for

1) a very long line in "logger.1".

2) '-' changed to '\-' for a option in "logger.1".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: login-utils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 22:49:59 +0000 (22:49 +0000)] 
doc: login-utils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./login-utils/chfn.1:96:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/lslogins.1:14:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./login-utils/newgrp.1:18:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/nologin.8:19:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/sulogin.8:57:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/utmpdump.1:61:2: WARNING: skipping paragraph macro: PP after SS

mandoc: ./login-utils/vipw.8:65:2: WARNING: line scope broken: TP breaks I

####

  There is no change in output from "nroff" or "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: libuuid/man/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 22:27:39 +0000 (22:27 +0000)] 
doc: libuuid/man/*: Fix some warnings from "mandoc -T lint"

mandoc: ./libuuid/man/uuid_generate.3:44:101: STYLE: unterminated quoted argument

mandoc: ./libuuid/man/uuid_generate.3:45:102: STYLE: unterminated quoted argument

####

  There is no change in the output of "nroff" or "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: disk-utils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 21:49:10 +0000 (21:49 +0000)] 
doc: disk-utils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./disk-utils/fsck.minix.8:123:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./disk-utils/isosize.8:8:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./disk-utils/sfdisk.8:262:4: STYLE: unterminated quoted argument

mandoc: ./disk-utils/swaplabel.8:57:2: WARNING: skipping paragraph macro: PP empty

####

  No change in the output from "nroff" or "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
####

5 years agotests: explain why MD tests with metadata v0.90 are KNOWN-FAIL
Karel Zak [Thu, 11 Jun 2020 09:05:30 +0000 (11:05 +0200)] 
tests: explain why MD tests with metadata v0.90 are KNOWN-FAIL

metadata v0.90 is deprecated thing and unsupported to create by some new
mdadm versions. It's possible to assemble this array (with
default_layout=1 on modprobe raid0), but impossible to create a new
one.

References: 4ae96cf77b36660255d5870a4209480bbec47902
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1826251
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoMerge branch 'fix_typo' of https://github.com/s-morishima/util-linux
Karel Zak [Wed, 10 Jun 2020 08:26:39 +0000 (10:26 +0200)] 
Merge branch 'fix_typo' of https://github.com/s-morishima/util-linux

5 years agodoc: Fix some warnings from "test-groff" for manuals
Bjarni Ingi Gislason [Wed, 10 Jun 2020 02:17:50 +0000 (02:17 +0000)] 
doc: Fix some warnings from "test-groff" for manuals

Source is current git content.

Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]

Input file is ././disk-utils/sfdisk.8

troff: backtrace: file '<./disk-utils/sfdisk.8>':67
troff: <./disk-utils/sfdisk.8>:67: warning: trailing space

Input file is ././misc-utils/kill.1

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':133: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: macro 'mF' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'mE' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: bad font number
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':135: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'sP' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':170
troff: <./misc-utils/kill.1>:170: warning: bad font number

Input file is ././sys-utils/ipcs.1

<./sys-utils/ipcs.1>:103 (macro BR): only 1 argument, but more are expected

Input file is ././sys-utils/mount.8

<./sys-utils/mount.8>:68 (macro RB): only 1 argument, but more are expected
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-old.tmac':467: macro 'RB'
troff: backtrace: file '<./sys-utils/mount.8>':68
troff: <./sys-utils/mount.8>:68: warning [p 1, 3.5i]: can't break line
an-old.tmac: <./sys-utils/mount.8>:201 (.RE): warning: extra .RE or .RS is missing before it; "an-RS-open" is 0.
<./sys-utils/mount.8>:453 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:500 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:1050 (macro BR): only 1 argument, but more are expected

Input file is ././sys-utils/setpriv.1

<./sys-utils/setpriv.1>:17 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:154 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:166 (macro BR): only 1 argument, but more are expected

Input file is ././sys-utils/umount.8

<./sys-utils/umount.8>:145 (macro IR): only 1 argument, but more are expected

Input file is ././sys-utils/unshare.1

<./sys-utils/unshare.1>:266 (macro BR): only 1 argument, but more are expected

[kzak@redhat.com: - add .RS to fix extra .RE in mount.8]

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual page: fdisk.8: fix typo
Shigeki Morishima [Wed, 3 Jun 2020 19:23:30 +0000 (04:23 +0900)] 
Manual page: fdisk.8: fix typo

It seems that "--wipe-partitions" is correct, not "--wipe-partition".

Signed-off-by: Shigeki Morishima <s.morishima@jp.fujitsu.com>
5 years agobuild-sys: release++ (v2.36-rc1) v2.36-rc1
Karel Zak [Tue, 9 Jun 2020 12:55:55 +0000 (14:55 +0200)] 
build-sys: release++ (v2.36-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: fix release notes file name
Karel Zak [Tue, 9 Jun 2020 13:11:58 +0000 (15:11 +0200)] 
docs: fix release notes file name

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: add v2.36-ReleaseNotes
Karel Zak [Tue, 9 Jun 2020 12:28:23 +0000 (14:28 +0200)] 
docs: add v2.36-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update AUTHORS file
Karel Zak [Tue, 9 Jun 2020 09:51:51 +0000 (11:51 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: merge changes
Karel Zak [Tue, 9 Jun 2020 09:49:28 +0000 (11:49 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/strutils: use directly err()
Karel Zak [Tue, 9 Jun 2020 09:45:55 +0000 (11:45 +0200)] 
lib/strutils: use directly err()

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: update hr.po (from translationproject.org)
Božidar Putanec [Tue, 9 Jun 2020 09:35:01 +0000 (11:35 +0200)] 
po: update hr.po (from translationproject.org)

5 years agologindefs: use xalloc.h, code cleanup
Karel Zak [Tue, 9 Jun 2020 09:31:42 +0000 (11:31 +0200)] 
logindefs: use xalloc.h, code cleanup

- remove else-after-return
- use else-if
- use xalloc stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/strutils: remove unnecessary include
Karel Zak [Tue, 9 Jun 2020 08:56:28 +0000 (10:56 +0200)] 
lib/strutils: remove unnecessary include

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: add STATIC binaries to build-sys tests
Karel Zak [Tue, 9 Jun 2020 08:55:20 +0000 (10:55 +0200)] 
tests: add STATIC binaries to build-sys tests

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: remove redundard includes
Karel Zak [Tue, 9 Jun 2020 08:53:14 +0000 (10:53 +0200)] 
build-sys: remove redundard includes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibblkid: (docs) document new function
Karel Zak [Tue, 9 Jun 2020 08:51:37 +0000 (10:51 +0200)] 
libblkid: (docs) document new function

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibfdisk: (docs) document new functions
Karel Zak [Tue, 9 Jun 2020 08:50:42 +0000 (10:50 +0200)] 
libfdisk: (docs) document new functions

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomount: Update man page Synopsis
Marcel Waldvogel [Mon, 8 Jun 2020 12:30:03 +0000 (14:30 +0200)] 
mount: Update man page Synopsis

Document
- `-t` when listing mounts
- `--bind`, `--rbind`, and `--move`
- `--make-*`
- Mountpoints need not only be directories

[kzak@redhat.com: - cleanup syntax,
  - use all complete --make-* list]

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: update build-sys tests
Karel Zak [Mon, 8 Jun 2020 11:29:33 +0000 (13:29 +0200)] 
tests: update build-sys tests

- remove libasan from results
- link libcryptsetup (due to verity support in libmount)
- add lsiqr
- add irqtop

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: fix irqtop compilation with -lslang
Karel Zak [Mon, 8 Jun 2020 11:18:20 +0000 (13:18 +0200)] 
build-sys: fix irqtop compilation with -lslang

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: don't use ASAN in build tests
Karel Zak [Mon, 8 Jun 2020 09:45:09 +0000 (11:45 +0200)] 
tests: don't use ASAN in build tests

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: make lsirq and irqtop optional
Karel Zak [Mon, 8 Jun 2020 09:33:00 +0000 (11:33 +0200)] 
build-sys: make lsirq and irqtop optional

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolscpu: cleanup caches code
Karel Zak [Mon, 8 Jun 2020 08:05:14 +0000 (10:05 +0200)] 
lscpu: cleanup caches code

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolscpu: Add shared cached info for s390 lscpu -C
Sumanth Korikkar [Fri, 5 Jun 2020 16:15:10 +0000 (18:15 +0200)] 
lscpu: Add shared cached info for s390 lscpu -C

The shared cache info for s390 can be found in /proc/cpuinfo.
lscpu without any options already processes this info. Fix this
in lscpu -C and provide detailed stat.

Test for s390:
./lscpu -C
NAME ONE-SIZE ALL-SIZE WAYS TYPE        LEVEL  SETS PHY-LINE COHERENCY-SIZE
L1d      128K     256K    8 Data            1    64                     256
L1i      128K     256K    8 Instruction     1    64                     256
L2d        4M       8M    8 Data            2  2048                     256
L2i        2M       4M    8 Instruction     2  1024                     256
L3       128M            32 Unified         3 16384                     256
L4       672M            42 Unified         4 65536                     256

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
5 years agoblockdev: Don't fail on missing start sector
Stanislav Brabec [Fri, 5 Jun 2020 08:04:21 +0000 (10:04 +0200)] 
blockdev: Don't fail on missing start sector

It causes
 # blockdev --report" error:
 blockdev: /dev/dm-9: failed to read partition start from sysfs: No such file or directory

There is no reliable way to detect a geometry in this case. Report N/A
instead.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Martin Wilck <martin.wilck@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoblkzone: remove unnecessary initializations
Karel Zak [Fri, 5 Jun 2020 07:18:08 +0000 (09:18 +0200)] 
blkzone: remove unnecessary initializations

C compiler is smart enough to follow C standards

 C11: 6.7.8 Initialization

 All subobjects that are not initialized explicitly shall be
 initialized implicitly the same as objects that have static storage
 duration.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoblkzone: Add --force option
Shin'ichiro Kawasaki [Fri, 5 Jun 2020 05:06:18 +0000 (14:06 +0900)] 
blkzone: Add --force option

Commit 7a2602f629fe ("blkzone: deny destructive ioctls on busy blockdev")
introduced exclusive mode to open block devices to submit zone management
ioctls. This avoids unintended status change of block devices used by the
system. However, it makes blkzone less usable for testing. For example,
the test case zbd/007 of blktests utilizes blkzone to reset zones of
block devices mapped to dm-linear devices. After the commit, the test
case fails with EBUSY error at blkzone reset, since the system uses the
reset target block device to map to the dm-linear device.

To allow blkzone to change status of zoned block devices used by the
system with intention, introduce --force option. With this option, block
devices are opened without exclusive mode.

Also fix too many periods in man page of --verbose option.

[kzak@redhat.com: - tiny cosmetic changes]

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodmesg: adjust timestamps according to suspended time
Konstantin Khlebnikov [Mon, 1 Jun 2020 19:21:34 +0000 (22:21 +0300)] 
dmesg: adjust timestamps according to suspended time

Timestamps in kernel log comes from monotonic clocksource which does not
tick when system suspended. Suspended time easily sums into hours and days
rendering human readable timestamps in dmesg useless.

Adjusting timestamps accouring to current delta between boottime and
monotonic clocksources produces accurate timestamps for messages printed
since last resume. Which are supposed to be most interesting.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
5 years agoManual pages: unshare.1: clarify that --pid=<file> requires --fork
Michael Kerrisk (man-pages) [Wed, 3 Jun 2020 07:40:57 +0000 (09:40 +0200)] 
Manual pages: unshare.1: clarify that --pid=<file> requires --fork

Attempting to create a persistent PID namespace with --pid=<file>
will result in an error if --fork is not also specified. Let's
warn people about that, so they don't get puzzled.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: unshare.1: clarify description and example for --mount=<path>
Michael Kerrisk (man-pages) [Wed, 3 Jun 2020 07:40:56 +0000 (09:40 +0200)] 
Manual pages: unshare.1: clarify description and example for --mount=<path>

The existing text is not quite accurate, and I recently injected an
error into the EXAMPLES. This patch fixes both issues.

The text in DESCRIPTION incorrectly states that the propagation type of
the parent mount must be "private". This is not accurate.  Rather, the
propagation type must be something *other than "shared"* (i.e.,
"private", "slave", or "unbindable").

In the EXAMPLES section, I added text that implies that if the
propagation type of the parent mount is "shared", then the child mount
created by --mount=<path> might propagate to another namespace.
Rather, in this situation, an error would result. Clarify that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agolibmount: add support for ID=
Karel Zak [Wed, 3 Jun 2020 14:53:00 +0000 (16:53 +0200)] 
libmount: add support for ID=

This patch add support for a new tag. The tag is based on udev block
device ID (see /dev/disk/by-id). The usual use-case is to use
WWN for this purpose, for example

  # mount ID=wwn-0x50026b724b09a1ff /mnt

Note that ID is not strictly defined and udevd generates various IDs
also for HW where WWN is undefined. This is reason why introduce ID=
seems better and more generic than more restrictive WWN=.

Addresses: https://github.com/karelzak/util-linux/issues/1008
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomount: (man) cleanup devices identifiers section
Karel Zak [Mon, 1 Jun 2020 12:53:47 +0000 (14:53 +0200)] 
mount: (man) cleanup devices identifiers section

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agologin: cleanup -f in usage() and comments
Karel Zak [Mon, 1 Jun 2020 08:33:29 +0000 (10:33 +0200)] 
login: cleanup -f in usage() and comments

Let's remove unnecessary comment and "second authentication" from
usage().

Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodmesg: add --follow-new
Konstantin Khlebnikov [Sat, 30 May 2020 14:07:53 +0000 (17:07 +0300)] 
dmesg: add --follow-new

Option --follow-new (-W) works the same as --follow (-w) but initially
seeks to the end of kernel ring buffer, so it prints only new messages.
Useful for capturing kernel messages during actions without past log.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
5 years agologin: fix -f description in the man-page
Karel Zak [Fri, 29 May 2020 12:50:36 +0000 (14:50 +0200)] 
login: fix -f description in the man-page

Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: mount.8: Miscellaneous wording, grammar, and formatting fixes
Michael Kerrisk (man-pages) [Fri, 29 May 2020 12:20:48 +0000 (14:20 +0200)] 
Manual pages: mount.8: Miscellaneous wording, grammar, and formatting fixes

Most of these are "obviously correct":
- formatting fixes
- improved English wordings
- add missing articles ("a", "the")
- a few spelling fixes
- a few "obvious" corrections to the text

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: wording fix: "another" ==> "other"
Michael Kerrisk (man-pages) [Fri, 29 May 2020 12:20:47 +0000 (14:20 +0200)] 
Manual pages: wording fix: "another" ==> "other"

In several pages, there is a consistent wording problem: "another"
where "other" should be used. This wording problem can be
surprisingly confusing for native speakers, especially those
unaware that in some other languages, "another" and "other" can be
expressed with the same word.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agobuild-sys: add missing LDADD to blkid test
Karel Zak [Fri, 29 May 2020 07:54:48 +0000 (09:54 +0200)] 
build-sys: add missing LDADD to blkid test

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: umount.8: use "filesystem" consistently
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:23 +0000 (16:58 +0200)] 
Manual pages: umount.8: use "filesystem" consistently

Currently, this page has a mix of "filesystem" and file system",
with the former being predominant.  Let's settle on one.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:22 +0000 (16:58 +0200)] 
Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro

Add a table listing other manual pages that describe mount options
of some widely used filesystems. Additionally, rewrite the remaining
text to be a bit easier to read.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8: Typo fix (remove an accidental paragraph break)
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:21 +0000 (16:58 +0200)] 
Manual pages: mount.8: Typo fix (remove an accidental paragraph break)

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8: SEE ALSO: add some obvious references
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:20 +0000 (16:58 +0200)] 
Manual pages: mount.8: SEE ALSO: add some obvious references

And correct sort order for "umount(8)" entry.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8, umount.8: Consistently format pathnames with italic
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:19 +0000 (16:58 +0200)] 
Manual pages: mount.8, umount.8: Consistently format pathnames with italic

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace"
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:18 +0000 (16:58 +0200)] 
Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace"

There are various references to "namespaces" when it would be
clearer to say "mount namespaces". Also, add references to the
mount_namespaces(7) manual page.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: setpriv.1: Minor formatting and typo fixes
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:17 +0000 (16:58 +0200)] 
Manual pages: setpriv.1: Minor formatting and typo fixes

These seem all "obviously correct", so I'm rolling them up
into one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: typo fix
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:16 +0000 (16:58 +0200)] 
Manual pages: unshare.1: typo fix

(Introduced in one of my earlier commits)

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:15 +0000 (16:58 +0200)] 
Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example

The text describing the persistent mount namespace example
is rather confused. Explain more clearly the purpose of making
the parent directory a bind mount with private propagation.
Also make a few other wording improvements.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agosetarch: fix stderr handling in uname26 tests
Helge Deller [Wed, 27 May 2020 23:20:58 +0000 (23:20 +0000)] 
setarch: fix stderr handling in uname26 tests

A while ago stdout and stderr have been split in these testcases, but
"FATAL: kernel too old" is actually treated as an "okay" output. However
this FATAL ends up on stderr, so when it happens, it is not seen in
the captured stdout.

Fix this by merging stdout/stderr in these cases once again.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961639
Fixes: cbf858aa085e25aa5afd1d06decaea6e14a8963f
5 years agoManual pages: rename EXAMPLE section to EXAMPLES
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:12 +0000 (14:59 +0200)] 
Manual pages: rename EXAMPLE section to EXAMPLES

Earlier, I patched various pages to consistently use EXAMPLE as a
section heading, rather than EXAMPLES.  (At that time, both headings
occurred in util-linux, with roughly equal frequency.)

Since then, I've observed that EXAMPLES is the more common usage
across a large corpus of manual pages. So, in Linux the man-pages
project, I switched to using EXAMPLES also. This patch makes the same
change for util-linux.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoMan pages: ipcmk.1, ipcs.1, lsipc.1: explicitly mention "System V"
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:11 +0000 (14:59 +0200)] 
Man pages: ipcmk.1, ipcs.1, lsipc.1: explicitly mention "System V"

Explicitly mention "System V" in the description, so that readers do not
get confused with the POSIX IPC mechanisms.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: ipcmk.1, ipcrm.1, ipcs.1, lsipc.1: SEE ALSO: add sysvipc(7)
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:10 +0000 (14:59 +0200)] 
Manual pages: ipcmk.1, ipcrm.1, ipcs.1, lsipc.1: SEE ALSO: add sysvipc(7)

These commands all relate to System V IPC, so point the reader
at the relevant Section 7 page provided by the Linux man-pages
project.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: kill.1: improve the description of the --timout option
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:09 +0000 (14:59 +0200)] 
Manual pages: kill.1: improve the description of the --timout option

The text describing this option is a little hard to understand.
Improve it.

Cc: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: kill.1: various language, spelling, and formatting fixes
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:08 +0000 (14:59 +0200)] 
Manual pages: kill.1: various language, spelling, and formatting fixes

These seem all "obviously correct", so I'm rolling them up into
one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoswapoff: do not use 1 exist status at all
Karel Zak [Thu, 28 May 2020 10:51:26 +0000 (12:51 +0200)] 
swapoff: do not use 1 exist status at all

The make sure we are not in collision with old versions.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoswapoff: cleanup EXIT STATUS
Karel Zak [Wed, 27 May 2020 16:58:30 +0000 (18:58 +0200)] 
swapoff: cleanup EXIT STATUS

The current code hides details about reason why swapoff(8) and swapoff(2) failed. For example
ENOMEM from swapoff(2) is important as it indicates OOM.

The patch also clean ups --all return codes to be more compatible for
example with [u]mount --all, etc.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibfdisk: (dos) be more explicit in fdisk_verify_disklabel() output
Karel Zak [Wed, 27 May 2020 15:46:49 +0000 (17:46 +0200)] 
libfdisk: (dos) be more explicit in fdisk_verify_disklabel() output

Let's print number of detected errors or "No errors detected." for
MBR. We already use the same for GPT.

The patch also modifies fdisk_verify_disklabel() return code to inform
caller about number of issues.

Addresses: https://github.com/karelzak/util-linux/issues/1051
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agofdisk: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
fdisk: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agowipefs: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
wipefs: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agosfdisk: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
sfdisk: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomkswap: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
mkswap: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agocfdisk: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
cfdisk: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/blkdev: add support for --lock and LOCK_BLOCK_DEVICE
Karel Zak [Tue, 26 May 2020 15:21:04 +0000 (17:21 +0200)] 
lib/blkdev: add support for --lock and LOCK_BLOCK_DEVICE

All simple function to parse --lock <mode> and $LOCK_BLOCK_DEVICE,
and to flock the fd.

The supported <mode> is:

"1" or "yes" - LOCK_EX
"0" or "no" - do nothing
"nonblock" - LOCK_EX | LOCK_NB

The function tries LOCK_NB before the solo LOCK_EX and prints
inform user that it will wait, for example:

session A:
# sfdisk --lock /dev/sdc

session B:
# sfdisk --lock /dev/sdc
sfdisk: /dev/sdc: device already locked, waiting to get lock ...
^C

# sfdisk --lock=nonblock /dev/sdc
sfdisk: /dev/sdc: device already locked

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: add $LDADD and libcommon to test_logindefs_LDADD
Karel Zak [Tue, 26 May 2020 09:43:07 +0000 (11:43 +0200)] 
build-sys: add $LDADD and libcommon to test_logindefs_LDADD

Addresses: https://travis-ci.org/github/karelzak/util-linux/jobs/690915120
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomore: avoid libmagic telling an empty file is binary
Sami Kerola [Mon, 25 May 2020 07:30:24 +0000 (08:30 +0100)] 
more: avoid libmagic telling an empty file is binary

My earlier change that took libmagic in use to identify mime-type of an input
file caused empty files to be marked binary.  Before the change empty files
were simply displayed as empty.  This change will restore that behavior.

Addresses: 09070e1a658e70ec203150e4fa5f486b32771858
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agoManual pages: unshare.1: fix examples, part 3
Michael Kerrisk [Sat, 23 May 2020 06:43:25 +0000 (08:43 +0200)] 
Manual pages: unshare.1: fix examples, part 3

The time namespaces example had no explanatory text!  Add some.
Also, use the "uptime -p" option for output that is more compact
(and perhaps more readable).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: fix examples, part 2
Michael Kerrisk [Sat, 23 May 2020 06:43:24 +0000 (08:43 +0200)] 
Manual pages: unshare.1: fix examples, part 2

The explanation of the --kill-child example was quite confused and
also the example shell demo was broken because of quoting issues.

It is not the case that the *children* of 'program' would adopted by
init, but rather that 'program' itself (which would be running as PID
1 inside the namespace and is a child of 'unshare') would be adopted
by init.

Rework the --kill-child example. Add a lot more explanation, and
expand the example shell session to give the reader a much better
picture of what is going on.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: fix examples, part 1
Michael Kerrisk [Sat, 23 May 2020 06:43:23 +0000 (08:43 +0200)] 
Manual pages: unshare.1: fix examples, part 1

The examples section of this manual page is rather hard to grok.
First, the arrangement of the text as follows makes life harder
than needed for the reader:

    shell demo
        explanatory text

It helps the reader if an example *begins* with an explanation of
what is being demonstrated. Therefore, rearrange these examples as:

    explanatory text
        shell demo

In addition, let's provide a bit more explanation for the first three
examples and expand the second example (user namespaces) a little.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: nsenter.1: note that 'file' can be a bind mount
Michael Kerrisk [Sat, 23 May 2020 06:43:22 +0000 (08:43 +0200)] 
Manual pages: nsenter.1: note that 'file' can be a bind mount

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: nsenter.1: clarify the intro discussion
Michael Kerrisk [Sat, 23 May 2020 06:43:21 +0000 (08:43 +0200)] 
Manual pages: nsenter.1: clarify the intro discussion

The intro paragraph talks about entering the namespace of other
processes. That's not quite accurate, since nsenter can be used (via
a bind mount) to enter a namespace that has no member processes.  So
rework NAME and the intro paragraph in DESCRIPTION to remove mention
of "processes".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: improve intro paragraphs
Michael Kerrisk [Sat, 23 May 2020 06:43:20 +0000 (08:43 +0200)] 
Manual pages: unshare.1: improve intro paragraphs

The intro paragraphs of this page are rather hard for a newcomer to
grok. The name of the underlying system call (and consequently the
name of the command) are "strange", but let's help the reader by
naming more clearly what unshare(1) does: creating new namespaces. In
addition, clarify and expand the details on making a namespace
persistent using bind mounts.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: nsenter.1, unshare.1: remove repeated references to clone(2)
Michael Kerrisk [Sat, 23 May 2020 06:43:19 +0000 (08:43 +0200)] 
Manual pages: nsenter.1, unshare.1: remove repeated references to clone(2)

Back in commits f85b9777c2965671cd and 894efece9eb894, in the
description of each namespace type, I added repeated cross references
to clone(2). Drop these references. The Section 7 namespaces pages,
which are already noted in the nsenter(1) and unshare(1) manual pages,
provide much more relevant information. Furthermore, pointing the
reader at clone(2) is perhaps a little misleading, since the system
call underlying nsenter(1) is setns(2) and the system call underlying
unshare(1) is unshare(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: nsenter.1, unshare.1: add a reference to time_namespaces(7)
Michael Kerrisk [Sat, 23 May 2020 06:43:18 +0000 (08:43 +0200)] 
Manual pages: nsenter.1, unshare.1: add a reference to time_namespaces(7)

Linux man-pages now has a page describing time namespaces.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: nsenter.1, unshare.1: update references to *_namespaces(7) pages
Michael Kerrisk [Sat, 23 May 2020 06:43:17 +0000 (08:43 +0200)] 
Manual pages: nsenter.1, unshare.1: update references to *_namespaces(7) pages

Nowadays, the Linux man-pages project provides separate Section 7
manual pages for each type of namespace. Update the cross references
in nsenter.1 and unshare.1 to reflect this.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agobuild-sys: cleanup $vendordir use
Karel Zak [Mon, 25 May 2020 11:44:22 +0000 (13:44 +0200)] 
build-sys: cleanup $vendordir use

- use --with-vendordir= (rather than --enable) to be compatible with
  another package stuuf

- add USE_VENDORDIR automake condition

- add vendordir to global AM_CPPFLAGS to avoid binary specific cflags
  modifications

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoMerge branch 'libeconf' of https://github.com/thkukuk/util-linux
Karel Zak [Mon, 25 May 2020 10:23:13 +0000 (12:23 +0200)] 
Merge branch 'libeconf' of https://github.com/thkukuk/util-linux

* 'libeconf' of https://github.com/thkukuk/util-linux:
  Adjust test output to pass test suite
  Add support for libeconf

5 years agofstrim: add --listed-in <file[:file ..]>
Karel Zak [Fri, 22 May 2020 12:39:31 +0000 (14:39 +0200)] 
fstrim: add --listed-in <file[:file ..]>

This new option works like --all but it allows to specify multiple
files with filesystems to make fstrim configuration more portable
between distributions. For example:

 fstrim --listed-in /etc/fstab:/proc/self/mountinfo

forces fstrim to try fstab and if unsuccessful than try mountinfo.

Addresses: https://github.com/karelzak/util-linux/issues/1019
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobash-completion: chmod -x
Karel Zak [Fri, 22 May 2020 10:02:25 +0000 (12:02 +0200)] 
bash-completion: chmod -x

Addresses: https://github.com/karelzak/util-linux/issues/1042
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agohwclock: improve use of settimeofday() portability
Karel Zak [Mon, 11 May 2020 11:35:21 +0000 (13:35 +0200)] 
hwclock: improve use of settimeofday() portability

The different libc implements TZ deprecation in settimeofday() library
function in the different way. Let's hide these portability issues and
use directly Linux syscall to set timezone.

Addresses: https://github.com/karelzak/util-linux/issues/995
Signed-off-by: Karel Zak <kzak@redhat.com>
CC: J William Piggott <elseifthen@gmx.com>
5 years agotests: sfdisk fill correctly gaps if default start requested
Karel Zak [Fri, 22 May 2020 09:30:27 +0000 (11:30 +0200)] 
tests: sfdisk fill correctly gaps if default start requested

References: 83fdb880b953164fec7cc603c4ece11cb78762db
Addresses: https://github.com/karelzak/util-linux/issues/1044
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoMerge branch 'patch-umount-autocomp' of https://github.com/emollier/util-linux
Karel Zak [Fri, 22 May 2020 09:06:27 +0000 (11:06 +0200)] 
Merge branch 'patch-umount-autocomp' of https://github.com/emollier/util-linux

* 'patch-umount-autocomp' of https://github.com/emollier/util-linux:
  bash-completion/umount: shell charaters escape

5 years agobuild-sys: Fix autogenerated URL in ChangeLog
Chris Hofstaedtler [Thu, 21 May 2020 15:42:30 +0000 (15:42 +0000)] 
build-sys: Fix autogenerated URL in ChangeLog

Fixes: b3a3b7eb1a15c5633ae890bec00fe5691b784d99
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
5 years agoManual pages: rename RETURN VALUES to RETURN VALUE
Michael Kerrisk (man-pages) [Thu, 21 May 2020 07:33:15 +0000 (09:33 +0200)] 
Manual pages: rename RETURN VALUES to RETURN VALUE

One page, libuuid/man/uuid_time.3, uses this section name
that differs from the norm.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: order ENVIRONMENT / FILES / CONFORMING TO consistently
Michael Kerrisk (man-pages) [Thu, 21 May 2020 07:28:49 +0000 (09:28 +0200)] 
Manual pages: order ENVIRONMENT / FILES / CONFORMING TO consistently

There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the ENVIRONMENT, FILES, and CONFORMING TO
sections are always placed toward the end of the page, just above NOTES.

One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: order NOTES / HISTORY / BUGS / EXAMPLE consistently
Michael Kerrisk (man-pages) [Thu, 21 May 2020 07:28:32 +0000 (09:28 +0200)] 
Manual pages: order NOTES / HISTORY / BUGS / EXAMPLE consistently

There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the NOTES, HISTORY, BUGS, and EXAMPLE
sections are always placed near the end of the page, just above
AUTHORS, COPYRIGHT, SEE ALSO, and AVAILABILITY.

One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoManual pages: order AUTHORS / COPYRIGHT / SEE ALSO / AVAILABILITY consistently
Michael Kerrisk (man-pages) [Thu, 21 May 2020 07:28:21 +0000 (09:28 +0200)] 
Manual pages: order AUTHORS / COPYRIGHT / SEE ALSO / AVAILABILITY consistently

There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the AUTHORS, COPYRIGHT, SEE ALSO, and
AVAILABILITY sections are always placed at the end of the page.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
5 years agoagetty: ignore ^C
Karel Zak [Fri, 22 May 2020 08:22:12 +0000 (10:22 +0200)] 
agetty: ignore ^C

Danc86 wrote:
 With agetty 2.32.1 and earlier, ^C at the login prompt is ignored. I
 noticed when upgrading to agetty 2.34, typing ^C now causes agetty to
 stop responding for 10 seconds and then it dies (and gets restarted by
 system and a new login prompt is printed).

 It logs this message:

   agetty[46048]: ttyS0: invalid character 0x3 in login name

 Previously the !isprint(ascval) condition would have caused control
 characters like ^C (\x03) to be discarded, whereas now it falls
 through to trying to decode it as part of a UTF-8 sequence, and then
 fails.

Fixes: http://github.com/karelzak/util-linux/commit/5de9751997cf490088f62f41fd92be57cf7ceea4
Addresses: https://github.com/karelzak/util-linux/issues/1046
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobash-completion/umount: shell charaters escape
Etienne Mollier [Thu, 21 May 2020 15:20:18 +0000 (17:20 +0200)] 
bash-completion/umount: shell charaters escape

This patch brings support for automatic dangerous shell characters
escape in umount autocompletion.  Due to the very peculiar way for
bash to handle autocompletion routines, proper escaping of the shell
sequences only worked properly inside a function: _umount_point_list,
which will add to the user's namespace at the next umount attempt of
autocompleting mount point.

It also translates calls of gensub to the portable alternatives sub
and gsub, in order to allow the use of various awk implementations
(mawk, Gnu, Busybox, etc), and as such kind of undoes a recent change
to enforce the use of Gnu awk. The whole story landed into the Debian
BTS initially:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933934

PS: It's been a few months since the patch is available, sorry for the
    delay; I only got myself a Github account quite recently...

Signed-off-by: Étienne Mollier <etienne.mollier@mailoo.org>
5 years agolibfdisk: (dos) fix default partition start
Karel Zak [Thu, 21 May 2020 13:37:59 +0000 (15:37 +0200)] 
libfdisk: (dos) fix default partition start

The current code implements the default start as first free space, but
it does not check if the space is large enough.

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