]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
6 years agosetpriv: add example section
Sam Morris [Thu, 8 Mar 2018 15:47:40 +0000 (15:47 +0000)] 
setpriv: add example section

6 years agosetpriv: include --init-groups in the list of options that can be specified with...
Sam Morris [Thu, 8 Mar 2018 15:46:19 +0000 (15:46 +0000)] 
setpriv: include --init-groups in the list of options that can be specified with --[re]gid

6 years agosetpriv: improve description in man page
Sam Morris [Thu, 8 Mar 2018 15:43:54 +0000 (15:43 +0000)] 
setpriv: improve description in man page

6 years agotests: re-introduce bash 3 compatibility (OSX)
Ruediger Meier [Thu, 8 Mar 2018 10:45:30 +0000 (11:45 +0100)] 
tests: re-introduce bash 3 compatibility (OSX)

Bash 4 is now almost 10 years old and it seemed to be fine in 613a337e
to use associative arrays. Unfortunately OSX will probably never update
to 4 because of GPLv3. We don't want to lose our travis OSX build and
use plain arrays again.

BTW remove that "informative warnings" about unlocked resources. They
were only silent so far because of a bug. Any system where scsi_debug
is broken would print a lot of these warnings. This also tells us that
we could even stop calling ts_unlock() explicitly. Just exiting the
tests would be good enough.

Note that currently flock(1) is not available on our OSX build anyways.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agodocs: add remount-all idea to TODO
Karel Zak [Thu, 8 Mar 2018 10:30:29 +0000 (11:30 +0100)] 
docs: add remount-all idea to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotravis: use parallel root checks
Ruediger Meier [Wed, 7 Mar 2018 19:12:02 +0000 (20:12 +0100)] 
travis: use parallel root checks

Also improve CPU count detection for tests.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agotests: dont't timeout flock
Ruediger Meier [Wed, 7 Mar 2018 16:58:23 +0000 (17:58 +0100)] 
tests: dont't timeout flock

The only situation where we would block endless is if another parallel test
has the lock and hangs for another reason. This means that the other test
would still keep hanging even if we timeout here. The user would have to
interrupt the other test or the whole test-suite anyways.

Note that we would certainly run into any timeout when using --parallel=200,
so that all scsi tests start the same time.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agotests: don't use unlocked resources
Ruediger Meier [Wed, 7 Mar 2018 16:51:35 +0000 (17:51 +0100)] 
tests: don't use unlocked resources

The test-suite did not survive when flock timeouts after 30s because
then ts_cleanup_on_exit() may use resources (e.g. rmmod scsi_debug)
while not having the lock.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agotests: don't lock fd 1 (stdout), don't use /proc/$$/fd
Ruediger Meier [Tue, 6 Mar 2018 23:29:59 +0000 (00:29 +0100)] 
tests: don't lock fd 1 (stdout), don't use /proc/$$/fd

On debian-kfreebsd we've locked stdout which messed up our test logs. Using
/proc/*/fd/ is not portable. Even ts_init's test for "/proc/self/fd"
does not help because /proc/*/fd behaves strange here:

  $ ls -l  /proc/$$/fd
  lr--r--r-- 1 rudi user 0 Mar  6 23:11 /proc/2194/fd -> unknown
  $ file /proc/$$/fd
  /proc/2194/fd: broken symbolic link to `unknown'
  ## wtf?
  $ test -d /proc/$$/fd; echo $?
  0
  $ ls -l  /proc/$$/fd/
  ls: cannot access /proc/2194/fd/: No such file or directory
  ## but
  $ ls -l  /proc/self/fd/
  total 0
  cr-xr-xr-x 1 root root 0, 3 Mar  6 19:39 0
  cr-xr-xr-x 1 root root 0, 4 Mar  6 19:39 1
  cr-xr-xr-x 1 root root 0, 5 Mar  6 19:39 2
  cr-xr-xr-x 1 root root 0, 6 Mar  6 19:39 3

This is how this patch changes the test output:

[...]
         blkid: partitions probing: [06] sgi                  ... OK
         blkid: partitions probing: [07] sun                  ... OK
         blkid: partitions probing                            ... OK (all 7 sub-tests PASSED)
-ls: cannot access /proc/66215/fd/: No such file or directory
+        blkid: mbr-wholedisk                                 ... SKIPPED (missing scsi_debug module (dry-run))
         blkid: MD raid0 (whole-disks)                        ... SKIPPED (losetup not found)
         blkid: MD raid1 (last partition)                     ... SKIPPED (missing in PATH: mdadm)
         blkid: MD raid1 (whole-disks)                        ... SKIPPED (losetup not found)
@@ -343,11 +343,11 @@
         dmesg: facilities                                    ... SKIPPED (test_dmesg not found)
         dmesg: indentation                                   ... SKIPPED (test_dmesg not found)
         eject: umount                                        ... SKIPPED (eject not found)
-ls: cannot access /proc/69561/fd/: No such file or directory
-ls: cannot access /proc/69609/fd/: No such file or directory
+        fdisk: align 512/4K                                  ... SKIPPED (missing scsi_debug module (dry-run))
+        fdisk: align 512/4K +alignment_offset                ... SKIPPED (missing scsi_debug module (dry-run))
         fdisk: align 512/4K +MD                              ... SKIPPED (missing in PATH: mdadm)
         fdisk: align 512/512                                 ... SKIPPED (losetup not found)
[...]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agotests: add wierd sleep for libmount/context
Ruediger Meier [Tue, 23 Jan 2018 23:20:15 +0000 (00:20 +0100)] 
tests: add wierd sleep for libmount/context

I still don't understand why this helps to fix these tests on my system.
udevadm settle had no positive effect. Adding the sleeps before
"is_mounted" also didn't fixed that, that's amazing!?

Below the test log, very often seen on my system since a long time:

-------------------- util-linux regression tests --------------------

                    For development purpose only.
                 Don't execute on production system!

       kernel: 4.4.104-39-default

     libmount: context: [01] mount-by-devname                ... OK
     libmount: context: [02] umount-by-devname               ... OK
     libmount: context: [03] mount-by-label                  ... OK
     libmount: context: [04] umount-by-mountpoint            ... OK
     libmount: context: [05] mount-by-uuid                   ... FAILED (libmount/context-mount-by-uuid)
     libmount: context: [06] mount-flags                     ... FAILED (libmount/context-mount-flags)
     libmount: context: [07] mount-loopdev                   ... OK
     libmount: context: [08] x-mount.mkdir                   ... OK
     libmount: context: [09] X-mount.mkdir                   ... OK
     libmount: context                                       ... FAILED (2 from 9 sub-tests)

---------------------------------------------------------------------
  1 tests of 17 FAILED
---------------------------------------------------------------------

rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-by-uuid
--- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-by-uuid   2017-07-03 12:20:24.144845538 +0200
+++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-by-uuid       2018-01-24 00:42:18.549444408 +0100
@@ -1,2 +1,3 @@
 successfully mounted
-successfully umounted
+failed to umount
+FAILED [rc=16]/dev/sdb1 still mounted

rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-flags
--- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-flags     2017-07-03 12:20:24.148845497 +0200
+++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-flags 2018-01-24 00:42:18.725442931 +0100
@@ -1,5 +1,5 @@
+test_mount_context: failed to mount: Device or resource busy
+FAILED [rc=16]rw,relatime
 successfully mounted
-ro,nosuid,noexec
-successfully mounted
-rw,nosuid,noexec
+rw,relatime
 successfully umounted

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agotests: add some more udevadm settle
Ruediger Meier [Wed, 7 Mar 2018 16:16:28 +0000 (17:16 +0100)] 
tests: add some more udevadm settle

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agotravis: enable osx root checks
Ruediger Meier [Tue, 6 Mar 2018 22:58:41 +0000 (23:58 +0100)] 
travis: enable osx root checks

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agoMerge branch 'setpriv-caps' of https://github.com/yrro/util-linux
Karel Zak [Wed, 7 Mar 2018 11:41:13 +0000 (12:41 +0100)] 
Merge branch 'setpriv-caps' of https://github.com/yrro/util-linux

6 years agouuidd: cosmetic coding style change
Karel Zak [Wed, 7 Mar 2018 10:53:15 +0000 (11:53 +0100)] 
uuidd: cosmetic coding style change

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agouuidd: don't truncate long socket paths
Ruediger Meier [Wed, 7 Mar 2018 09:40:23 +0000 (10:40 +0100)] 
uuidd: don't truncate long socket paths

This was the error
  uuidd: couldn't bind unix socket /var/tmp/portage/sys-apps/util-linux-2.31.1/work/util-linux-2.31.1-abi_x86_64.amd64/tests/output/uuid/uuiddkOcTUuoZ7kaP3: Address already in use

because the socket path was truncated to 108 chars which was luckily
an existing directory.

Now we abort early with "uuidd: socket name too long: ... "

Reported-by: Thomas Deutschmann <whissi@gentoo.org>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agosetpriv: fix manpage typo
Sam Morris [Tue, 6 Mar 2018 17:05:38 +0000 (17:05 +0000)] 
setpriv: fix manpage typo

The example given in the man page didn't work. Judging by commit
db663995bd93e170a43b1a7050c7a738782dabfb, --inh-caps= used to be called
--caps= but the man page was not updated after the change was made.

6 years agolibmount: fix fs pattern usage in mount --all
Karel Zak [Tue, 6 Mar 2018 13:44:23 +0000 (14:44 +0100)] 
libmount: fix fs pattern usage in mount --all

The command "mount -a -t <pattern>" uses the -t as pattern to filter
fstab entries. And "mount -t <type>" is used to specify FS type.

Unfortunately libmount does not care about this difference when it
calls standard mount functionality. The original pattern is still in
the library control struct and mnt_do_mount() tries to use it as FS
type.

This patch is just bugfix. Maybe the long term solution would be to
differentiate between the pattern and type in the library API. Now the
library follows mount(8) command line and it's little bit messy.

Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add script(1) events idea to TODO
Karel Zak [Mon, 5 Mar 2018 12:40:55 +0000 (13:40 +0100)] 
docs: add script(1) events idea to TODO

Addresses: https://github.com/karelzak/util-linux/issues/583
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add note about JSON
Karel Zak [Mon, 5 Mar 2018 11:23:55 +0000 (12:23 +0100)] 
docs: add note about JSON

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoMerge branch 'master' of https://github.com/yurchor/util-linux
Karel Zak [Fri, 2 Mar 2018 13:04:20 +0000 (14:04 +0100)] 
Merge branch 'master' of https://github.com/yurchor/util-linux

* 'master' of https://github.com/yurchor/util-linux:
  Fix minor typos on man pages

6 years agobash-completion: update zramctl algorithms list
Sami Kerola [Sun, 18 Feb 2018 20:22:01 +0000 (20:22 +0000)] 
bash-completion: update zramctl algorithms list

Reference: a3612b81fe0c172bc4fe7e2cf468f195bd785222.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
6 years agoFix minor typos on man pages
Yuri Chornoivan [Thu, 1 Mar 2018 14:42:34 +0000 (16:42 +0200)] 
Fix minor typos on man pages

6 years agobuild-sys: release++ (v2.32-rc2) v2.32-rc2
Karel Zak [Thu, 1 Mar 2018 13:15:49 +0000 (14:15 +0100)] 
build-sys: release++ (v2.32-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update v2.32-ReleaseNotes
Karel Zak [Thu, 1 Mar 2018 13:14:15 +0000 (14:14 +0100)] 
docs: update v2.32-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update AUTHORS file
Karel Zak [Thu, 1 Mar 2018 13:11:16 +0000 (14:11 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: merge changes
Karel Zak [Thu, 1 Mar 2018 13:08:43 +0000 (14:08 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotools: improve checkmans
Karel Zak [Thu, 1 Mar 2018 12:52:07 +0000 (13:52 +0100)] 
tools: improve checkmans

* ignore .git/
* don't print error messages when error counters are zero
* add new KNOWN_REPEATS[]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add note about NVMe-multipath to TODO
Karel Zak [Thu, 1 Mar 2018 11:35:59 +0000 (12:35 +0100)] 
docs: add note about NVMe-multipath to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agomount: (man) update mount options for UDF
Steve Kenton [Tue, 27 Feb 2018 18:44:07 +0000 (12:44 -0600)] 
mount: (man) update mount options for UDF

Signed-off-by: Steve Kenton <skenton@ou.edu>
Acked-by: Jan Kara <jack@suse.cz>
6 years agolibblkid:(dos) make subtypes probing more robust
Karel Zak [Tue, 27 Feb 2018 09:36:40 +0000 (10:36 +0100)] 
libblkid:(dos)  make subtypes probing more robust

The current code mix partitions as defined on disk with partitions
from partlist (as recognized by libblkid). It seems better to follow
partlist only.

Reported-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibblkid: (mpool) checksum is LE
Karel Zak [Mon, 26 Feb 2018 22:48:45 +0000 (23:48 +0100)] 
libblkid: (mpool) checksum is LE

Reported-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoblkzone: Fix a typo in blkzone.8
Masanari Iida [Mon, 26 Feb 2018 12:15:33 +0000 (21:15 +0900)] 
blkzone: Fix a typo in blkzone.8

This patch fixes a spelling typo in blkzone.8

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
6 years agofincore: Handle large files on 32 bit without LFS
Tobias Stoeckmann [Sun, 25 Feb 2018 19:27:59 +0000 (20:27 +0100)] 
fincore: Handle large files on 32 bit without LFS

If util-linux is installed on a system without large file support,
an out of memory issue can occur while processing a file which is
2 GB in size:

$ ./configure --disable-largefile && make

$ dd if=/dev/zero of=2gb-file seek=2147483646 count=1 bs=1
$ fincore 2gb-file
(endless loop)
fincore: failed to do mmap: 2gb-file: Cannot allocate memory

Even though iterating with "len" seems counter-intuitive, it fixes
this issue. The variable len is only in the last iteration not a
multiplication of pagesize -- which is the requirement for mmap.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
6 years agofincore: Handle large files correctly on 32 bit
Tobias Stoeckmann [Sun, 25 Feb 2018 19:27:18 +0000 (20:27 +0100)] 
fincore: Handle large files correctly on 32 bit

If a file is larger than 4 GB on a 32 bit system with large file
support (default), it can happen that not all pages are properly
processed. This happens due to an int truncation (off_t vs size_t).

You can reproduce this on 32 bit with these commands:

$ dd if=/dev/zero of=4gb-file seek=4294967295 count=1 bs=1
$ fincore 4gb-file
fincore: failed to do mmap: 4gb-file: Invalid argument

If a file is larger than 4 GB, the first few pages of a file won't
be properly processed. "len" will be smaller than window_size,
but the for-loop iterates "window_size" bytes, skipping some pages.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
6 years agobuild-sys: forgot update NEWS for v2.32-rc1
Karel Zak [Thu, 22 Feb 2018 12:04:46 +0000 (13:04 +0100)] 
build-sys: forgot update NEWS for v2.32-rc1

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agomount: add note about cached kernel table for --all
Karel Zak [Thu, 22 Feb 2018 11:45:56 +0000 (12:45 +0100)] 
mount: add note about cached kernel table for --all

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibsmartcols: fix docs warnings
Karel Zak [Wed, 21 Feb 2018 12:23:19 +0000 (13:23 +0100)] 
libsmartcols: fix docs warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibfdisk: fix docs warnings
Karel Zak [Wed, 21 Feb 2018 12:23:08 +0000 (13:23 +0100)] 
libfdisk: fix docs warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibfdisk: (docs) add missing docs blocks
Karel Zak [Wed, 21 Feb 2018 12:12:12 +0000 (13:12 +0100)] 
libfdisk: (docs) add missing docs blocks

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibfdisk: (docs) improve enums documentation
Karel Zak [Wed, 21 Feb 2018 11:48:20 +0000 (12:48 +0100)] 
libfdisk: (docs) improve enums documentation

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibmount: add missing macro to docs
Karel Zak [Wed, 21 Feb 2018 10:43:21 +0000 (11:43 +0100)] 
libmount: add missing macro to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibblkid: (mpool) don't use gtkdocs-like comment block
Karel Zak [Wed, 21 Feb 2018 10:40:39 +0000 (11:40 +0100)] 
libblkid: (mpool) don't use gtkdocs-like comment block

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolsmem: fix memory leak [coverity scan]
Karel Zak [Tue, 20 Feb 2018 14:04:51 +0000 (15:04 +0100)] 
lsmem: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolsns: remove if-after-xcalloc
Karel Zak [Tue, 20 Feb 2018 13:59:40 +0000 (14:59 +0100)] 
lsns: remove if-after-xcalloc

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agocolumn: fix memory leak [coverity scan]
Karel Zak [Tue, 20 Feb 2018 13:48:26 +0000 (14:48 +0100)] 
column: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agochrt: fix compiler warning [-Wmaybe-uninitialized]
Karel Zak [Tue, 20 Feb 2018 09:40:22 +0000 (10:40 +0100)] 
chrt: fix compiler warning [-Wmaybe-uninitialized]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agofsck: cleanup find_fsck()
Karel Zak [Mon, 19 Feb 2018 12:05:45 +0000 (13:05 +0100)] 
fsck: cleanup find_fsck()

* remove static variable
* return 0 or 1
* optionally return allocated path to the program

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolsblk: document LSBLK_DEBUG=
Karel Zak [Fri, 16 Feb 2018 18:10:35 +0000 (19:10 +0100)] 
lsblk: document LSBLK_DEBUG=

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoMerge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 16 Feb 2018 10:38:18 +0000 (11:38 +0100)] 
Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux

6 years agotests: use pgrep instead of ps --ppid ...
Ruediger Meier [Mon, 17 Apr 2017 21:45:30 +0000 (23:45 +0200)] 
tests: use pgrep instead of ps --ppid ...

The usage looks a bit cleaner, and I guess that pgrep(1) is available
on the same machines where "ps --ppid" would work (procps-ng).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agoMerge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 16 Feb 2018 10:25:22 +0000 (11:25 +0100)] 
Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux

* 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux:
  tests: use pgrep instead of ps --ppid ...
  misc: fix typos using codespell
  lsns: fix clang compiler warning
  tests: add udevadm settle to sfdisk/resize
  build-sys: disable bz2 tarball and fix some am warnings

6 years agotests: use pgrep instead of ps --ppid ...
Ruediger Meier [Mon, 17 Apr 2017 21:45:30 +0000 (23:45 +0200)] 
tests: use pgrep instead of ps --ppid ...

The usage looks a bit cleaner, and I guess that pgrep(1) is available
on the same machines where "ps --ppid" would work (procps-ng).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agomisc: fix typos using codespell
Ruediger Meier [Thu, 15 Feb 2018 21:02:18 +0000 (22:02 +0100)] 
misc: fix typos using codespell

Some more funny typos, please review carefully.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agolsns: fix clang compiler warning
Ruediger Meier [Sun, 21 Jan 2018 23:04:38 +0000 (00:04 +0100)] 
lsns: fix clang compiler warning

../sys-utils/lsns.c:360:8: warning: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'int' [-Wsign-compare]
        if (!(NLMSG_OK(nlh, reslen)
              ^~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/netlink.h:90:24: note: expanded from macro 'NLMSG_OK'
                           (nlh)->nlmsg_len <= (len))
                           ~~~~~~~~~~~~~~~~ ^   ~~~

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agofsck: coding style cleanup
Karel Zak [Fri, 16 Feb 2018 09:49:24 +0000 (10:49 +0100)] 
fsck: coding style cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agofsck: use xasprintf to avoid buffer overruns with an insane fs type
Theodore Ts'o [Thu, 15 Feb 2018 20:05:08 +0000 (15:05 -0500)] 
fsck: use xasprintf to avoid buffer overruns with an insane fs type

This prevents a crash when running the command:

fsck -t AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA /dev/sda

Reported-by: Hornseth_Brenan@bah.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
6 years agotests: add udevadm settle to sfdisk/resize
Ruediger Meier [Tue, 23 Jan 2018 18:03:22 +0000 (19:03 +0100)] 
tests: add udevadm settle to sfdisk/resize

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agobuild-sys: disable bz2 tarball and fix some am warnings
Ruediger Meier [Thu, 15 Feb 2018 20:18:27 +0000 (21:18 +0100)] 
build-sys: disable bz2 tarball and fix some am warnings

Nobody needs the .bz2 tarball. We dont't even upload it to
kernel.org.

BTW we fix dozens of these automake warnings:

    automake-1.13/am/ltlibrary.am: warning: 'libblkid.la': linking libtool libraries using a non-POSIX
    automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'

So we can remove -Wno-portability. The only warning left is this
last GNU-make'ism which somebody may fix when reading it:

   sys-utils/Makemodule.am:191: warning: addprefix sys-utils/,$(SETARCH_LINKS: non-POSIX variable name
   sys-utils/Makemodule.am:191: (probably a GNU make extension)
   Makefile.am:90:   'sys-utils/Makemodule.am' included from here

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
6 years agolibsmartcols: fixes issue with 0 width columns
taiyu [Thu, 15 Feb 2018 06:50:36 +0000 (22:50 -0800)] 
libsmartcols: fixes issue with 0 width columns

[kzak@redhat.com: - it's possible that column has zero width when
 minimal width is reduced due to very small terminal. In this case
 make sure that we do not use such column at all.]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibsmartcols: set minimal column width to 1
Karel Zak [Thu, 15 Feb 2018 10:58:41 +0000 (11:58 +0100)] 
libsmartcols: set minimal column width to 1

The default is to use header width or relative width setting as the
minimal column width. The problem are columns where is no header or
relative width. Let's set minimal width to 1 in this case.

Addresses: https://github.com/karelzak/util-linux/pull/577
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibsmartcols: interpret zero width for pending data as error
Karel Zak [Thu, 15 Feb 2018 10:58:41 +0000 (11:58 +0100)] 
libsmartcols: interpret zero width for pending data as error

The command

 $ column -t -W2 -c11 <<< "cat dog bird"

causes finite loop, because there is no minimal column width (missing
header). The print functions should be robust enough to return -EINVAL
when nonsense is requested.

Addresses: https://github.com/karelzak/util-linux/pull/577
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolscpu-arm: add Faraday And Brahma cores
Riku Voipio [Tue, 13 Feb 2018 13:22:54 +0000 (15:22 +0200)] 
lscpu-arm: add Faraday And Brahma cores

Add a handful of more rare cores. Broadcom Brahma cores are
used in Access Points and Faraday was used on some Network
Storage Devices.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
6 years agodocs: update v2.32-ReleaseNotes v2.32-rc1
Karel Zak [Tue, 13 Feb 2018 11:22:15 +0000 (12:22 +0100)] 
docs: update v2.32-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update AUTHORS file
Karel Zak [Tue, 13 Feb 2018 10:16:02 +0000 (11:16 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: merge changes
Karel Zak [Tue, 13 Feb 2018 10:02:07 +0000 (11:02 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update uk.po (from translationproject.org)

6 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update pt_BR.po (from translationproject.org)

6 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update pl.po (from translationproject.org)

6 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update ja.po (from translationproject.org)

6 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update fi.po (from translationproject.org)

6 years agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update es.po (from translationproject.org)

6 years agopo: update cs.po (from translationproject.org)
Petr Písař [Tue, 13 Feb 2018 09:56:08 +0000 (10:56 +0100)] 
po: update cs.po (from translationproject.org)

6 years agodmesg: use xstrdup() in xalloc.h based util
Karel Zak [Tue, 13 Feb 2018 09:52:57 +0000 (10:52 +0100)] 
dmesg: use xstrdup() in xalloc.h based util

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotests: update build-sys tests
Karel Zak [Tue, 13 Feb 2018 09:42:44 +0000 (10:42 +0100)] 
tests: update build-sys tests

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibblkid: make mpool independent on libuuid
Karel Zak [Tue, 13 Feb 2018 09:30:39 +0000 (10:30 +0100)] 
libblkid: make mpool independent on libuuid

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotests: column(1) test for space-char separator
Karel Zak [Mon, 12 Feb 2018 13:19:47 +0000 (14:19 +0100)] 
tests: column(1) test for space-char separator

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotests: column(1) test non-space separator at begin of line
Karel Zak [Mon, 12 Feb 2018 13:14:50 +0000 (14:14 +0100)] 
tests: column(1) test non-space separator at begin of line

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agocolumn: don't ignore space-char separators at begin of the line
Karel Zak [Mon, 12 Feb 2018 13:06:02 +0000 (14:06 +0100)] 
column: don't ignore space-char separators at begin of the line

Non-space separator:

$ echo -e ",col1,col2\nrow,1,2" | column -t -s ","  --table-columns A,B,C
A    B     C
     col1  col2
row  1     2

Space-char (\t) separator:

$ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')"  --table-columns A,B,C
A     B     C
col1  col2
row   1     2

Fixed version:

$ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')"  --table-columns A,B,C
A    B     C
     col1  col2
row  1     2

Addresses: https://github.com/karelzak/util-linux/issues/575
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: build fix for the case where USE_PTY is not defined
Samuel Thibault [Mon, 12 Feb 2018 11:09:40 +0000 (12:09 +0100)] 
su: build fix for the case where USE_PTY is not defined

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolsblk: try device/dev to read devno
Karel Zak [Fri, 9 Feb 2018 13:18:18 +0000 (14:18 +0100)] 
lsblk: try device/dev to read devno

Now sysfs_devname_to_devno() reads devno from /dev or
/sys/block/<name>/dev, but it seems that NVME uses
/sys/block/<name>/device/dev.

Reported-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update TODO
Karel Zak [Wed, 7 Feb 2018 10:37:32 +0000 (11:37 +0100)] 
docs: update TODO

Let's think about "mount --onlyonce".

Addresses: https://github.com/karelzak/util-linux/issues/448
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agocal: clean up man page synopsis syntax
Karel Zak [Wed, 7 Feb 2018 10:06:58 +0000 (11:06 +0100)] 
cal: clean up man page synopsis syntax

Let's use '[ ]' rather than '< >' to be compatible with our another
man pages. Note that all time addressing on cal(1) command line is
optional.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1542883
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update TODO
Karel Zak [Wed, 7 Feb 2018 09:36:28 +0000 (10:36 +0100)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agomount: add note about "already mounted" behavior
Karel Zak [Mon, 5 Feb 2018 11:18:49 +0000 (12:18 +0100)] 
mount: add note about "already mounted" behavior

Addresses: https://github.com/karelzak/util-linux/issues/448
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotests: add mpool blkid test image
Karel Zak [Mon, 5 Feb 2018 10:58:09 +0000 (11:58 +0100)] 
tests: add mpool blkid test image

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agofindmnt.8: remove spurious spaces before "--tree" and "--verbose"
Jakub Wilk [Sun, 4 Feb 2018 18:31:17 +0000 (19:31 +0100)] 
findmnt.8: remove spurious spaces before "--tree" and "--verbose"

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
6 years agotests: rewrite cal(1) bigyear test
Karel Zak [Fri, 2 Feb 2018 09:31:24 +0000 (10:31 +0100)] 
tests: rewrite cal(1) bigyear test

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotests: use TS_HELPER_CAL
Karel Zak [Fri, 2 Feb 2018 09:16:27 +0000 (10:16 +0100)] 
tests: use TS_HELPER_CAL

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agocal: add ifdef TEST_CAL
Karel Zak [Fri, 2 Feb 2018 09:05:15 +0000 (10:05 +0100)] 
cal: add ifdef TEST_CAL

The test program follows CAL_TEST_TIME=<sec> rather than libc time().
It allows to use cal(1) in regression tests in cases where output
depends on the current time.

(We already use the same for example for logger.)

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotests: update setarch test
Karel Zak [Thu, 1 Feb 2018 15:53:45 +0000 (16:53 +0100)] 
tests: update setarch test

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibmount: fix debug message
Karel Zak [Thu, 1 Feb 2018 15:52:14 +0000 (16:52 +0100)] 
libmount: fix debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosys-utils: use errexec()
Karel Zak [Thu, 1 Feb 2018 14:44:25 +0000 (15:44 +0100)] 
sys-utils: use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agovipw: use errexec()
Karel Zak [Thu, 1 Feb 2018 14:41:42 +0000 (15:41 +0100)] 
vipw: use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agonewgrp: use errexec()
Karel Zak [Thu, 1 Feb 2018 14:41:23 +0000 (15:41 +0100)] 
newgrp: use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoschedutils: use errexec()
Karel Zak [Thu, 1 Feb 2018 14:40:59 +0000 (15:40 +0100)] 
schedutils: use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agotext-utils: use errexec()
Karel Zak [Thu, 1 Feb 2018 14:40:43 +0000 (15:40 +0100)] 
text-utils: use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolib/exec_shell: (and pager) use errexec()
Karel Zak [Thu, 1 Feb 2018 14:38:24 +0000 (15:38 +0100)] 
lib/exec_shell: (and pager) use errexec()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: use errexec()
Karel Zak [Thu, 1 Feb 2018 14:37:22 +0000 (15:37 +0100)] 
su: use errexec()

The new macro is fully compatible with original (coreutils) code.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoinclude/c: add errexec()
Karel Zak [Thu, 1 Feb 2018 13:58:52 +0000 (14:58 +0100)] 
include/c: add errexec()

The new errexec() macro consolidate and unify the way how util-linux
tools react to failed exec()-like functions:

 * exit code 126 when program located, but not usable
 * exit code 127 when could not find program to exec

The exit codes are compatible with coreutils.

Note that all the change is located in c.h; the file exitcodes.h
contains API specific (mkfs, fsck, ...) codes only.

Addresses: https://github.com/karelzak/util-linux/pull/311
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agofindfs: don't include exitcodes.h
Karel Zak [Thu, 1 Feb 2018 13:49:49 +0000 (14:49 +0100)] 
findfs: don't include exitcodes.h

The code uses findfs return codes only.

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