Commit Graph

10385 Commits

Author SHA1 Message Date
Karel Zak fb637d6d09 build-sys: release++ (v2.28-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-29 10:47:40 +02:00
Karel Zak a78bd24d03 docs: update v2.28-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-29 10:44:50 +02:00
Karel Zak 5b6b6e8c88 docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-29 10:42:14 +02:00
Karel Zak 784c8a40fa po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-29 10:38:01 +02:00
Takeshi Hamasaki 4bf2e02ceb po: update ja.po (from translationproject.org) 2016-03-29 10:34:55 +02:00
Karel Zak 64eca31f71 Merge branch 'tests-setarch' of https://github.com/rudimeier/util-linux
* 'tests-setarch' of https://github.com/rudimeier/util-linux:
  tests: improve setarch tests, regarding --uname-2.6 issues
  setarch: add "exec" message to --verbose
  build-sys: ignore vim .swp files
2016-03-24 09:54:54 +01:00
Ruediger Meier 33bed90a7f tests: improve setarch tests, regarding --uname-2.6 issues
Add some more tests:
  * error handling "unknown arch" and "unknown command"
  * "noop" test with host arch and no other options
  * all options except --uname-2.6
  * --uname-2.6 whithout any other options but handle fatal
    glibc error "kernel too old" (with debug output)
  * add a "real" --uname-2.6 test which validates uname(1)
    output

Note the "kernel too old" cases are systems where glibc was
configured to support only kernels > 3.0. On some archs
(e.g. x86) --uname-2.6 still works with such glibc because
2.6.39 had all needed features on board (e.g. vdso).
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806911

Some people reported segfaults (after execvp) but I can only
reproduce it on arm* and aarch64 qemu-user-space builds. We
don't need to fix our tests for such broken systems where
also many other tests fail currently.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-24 08:14:34 +01:00
Romain Naour 90a9b9910c lsipc: don't free shm data if no shm id is found
There is a segfault in do_shm_global() when ipc_shm_get_info() return 0 and
ipc_shm_free_info() is called.

When no shm id is found, the memory allocated in shmds by ipc_shm_get_info() is
already free when ipc_shm_free_info() is called.

Move ipc_shm_free_info(shmds) inside the if statement where at least one shm id
is found.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-03-23 10:52:41 +01:00
Kent Overstreet 7ce27dc517 libblkid: Update for newer bcache superblocks
Later version of bcache add different checksum types, and allow for superblocks
greater than 4k - skipping the checksum check (as in most other probes) is the
easiest solution.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-03-23 10:52:38 +01:00
Karel Zak 2d47fa3921 partx: fix --nr usage
Reported-by: Serge van den Boom <serge+util-linux@vdboom.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-22 15:49:00 +01:00
Ruediger Meier 9508e2972b setarch: add "exec" message to --verbose
Also we don't need fflush() in non-verbose case.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-22 14:13:33 +01:00
Ruediger Meier 8eefcbb8f5 build-sys: ignore vim .swp files
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-22 14:12:25 +01:00
Werner Fink 6988998b66 sulogin: Always make echo work after performing getpasswd even if root account is locked
If the root account is locked and no password was provided then the terminal
line is not set back to do echo of the input. This correct a small overlook
in commit 7ff1162e67

Signed-off-by: Werner Fink <werner@suse.de>
2016-03-22 10:50:39 +01:00
Karel Zak b4d1fbda1e lscpu: revert unnecessary path_exist()
The features file is there from 2.6.31 when Xen has been added to
kernel. Sorry.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-22 10:31:16 +01:00
Karel Zak 3421709a58 docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-22 10:26:35 +01:00
Dongli Zhang 0ebbe9f104 lscpu: correct the Virtualization type on Xen DomU PV guest
Nowadays, most Intel CPUs have "cpuid faulting" available which could trap
the execution of "cpuid" instruction when CPL>0  with GP fault. Thus,
"cpuid" instruction could trap to Xen hypervisor on the paravirtualized PV
guest on most servers today, except on old CPUs prior to 2011. On CPU after
2011, Xen will put "XenVMMXenVMM" on both HVM and PV guests, which could
have lscpu command erroneously classify the guest as type "full".  The
current lscpu command, which is based on "cpuid" instruction, still assumes
that it will not cause the trap to Xen hypervisor on Xen PV guest and uses
/proc/xen to identify whether it's running on PV DomU or not.  To identify
this kind of information under the help of
/sys/hypervisor/properties/features would be more accurate for the CPU
nowadays. The bit 5 (XENFEAT_mmu_pt_update_preserve_ad) of the features
will be set only when it's running on Xen PV domain. The combo of bit 3 and
8 (XENFEAT_supervisor_mode_kernel and XENFEAT_hvm_callback_vector) will be
set simultaneously only when it's running on Xen PVH domain.

[kzak@redhat.com: - add path_exist()]

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-22 10:13:03 +01:00
Karel Zak 9e24b917f2 docs: add note about CLONE_NEWCGROUP support
The patch has been planned for weeks and now the kernel part is
already in Linus' tree. It's a new feature, but it's probably better
to merge the userspace stuff now (v2.28 rc1) than wait next 6 months
for the next util-linux release.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-21 21:13:25 +01:00
Karel Zak ca8c69a9f2 Merge branch '2016-03-02/cgns' of https://github.com/hallyn/util-linux
* '2016-03-02/cgns' of https://github.com/hallyn/util-linux:
  Implement support for cgroup namespaces
2016-03-21 21:08:05 +01:00
Ruediger Meier fcae406394 ipcs: consolidate output header printing
Print a warning (instead of header) if --limits fails, like we did
it in past (2.20.1) and like we are still doing for --summary. Note
in past we were printing the same message like for --summary
"kernel not configured for ...", but actually this message is not
really correct.

This patch simply consolidates the current behavior. Probably we
should refactor it regarding warnings (stderr) and exit codes.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-21 21:03:42 +01:00
Ruediger Meier 4321c0f732 tests: skip ipcs test which require /proc
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-21 21:03:42 +01:00
Ruediger Meier 36f1200851 sulogin: ignore missing WEXITED, add warning
This happens on Debian kFreeBSD and probably on Hurd too since
cde7699c. One should review this issue to fix it properly.

CC: Werner Fink <werner@suse.de>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-21 21:03:41 +01:00
Ruediger Meier a5b3be92c6 build-sys: pylibmount, mount context is Linux only
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-21 21:03:41 +01:00
Ruediger Meier 2eb6a7486e build-sys: some libmount test progs are Linux only
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-21 21:03:40 +01:00
Ruediger Meier 73f4f3d925 ipcs: --shmems, upward/backward compatibility
Re-add backward compatibility which got lost in 058e8154.
Initializing unknown struct members to 0xdead is similar to
the fallback.

For upward compatibility ignore columns > 16 but not the whole
line (in case the kernel would add more columns in future).

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-18 15:38:06 +01:00
Ruediger Meier 97fab80eaf ipcs: make sure to parse whole lines for shm_data
We want to parse 16 columns _per_row_ without mixing them up. The
existing code is unsafe for more or less columns and could even
run into endless loops. This patch assures that we parse row-wise
and really skip lines with columns != 16.

Probably somehow we could have also done this with fscanf() only.
Using fgets() additionally makes the code more easy to read and
to improve later.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-18 15:38:05 +01:00
Karel Zak 6c44094af6 swapon: rewrite control struct usage
The old version has been pretty broken... the most important is to
keep swap options specified on command line as read-only template.
For example if we call "swapon --all" then we cannot modify the global
options for each fstab swap entry.

The another story has been control struct modification due to device
reinitialization etc.

This patch splits all to:

* struct swapon_control; top-level struct with command line options

* struct swap_device; this is device specific and never globally
  maintained by swapon_control.

* struct swap_prop; used as global read-only template swap options
  and per device swap options (when parse fstab).

Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-18 14:28:29 +01:00
Karel Zak 54a0d5861f tests: check for TS_HELPER_SYSINFO in swap tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-18 14:24:44 +01:00
Karel Zak 00dbc49826 docs: add to TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-18 12:05:51 +01:00
Karel Zak 5ae7ae8adb tools: add missing checkcompletion.sh
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-17 14:34:29 +01:00
Karel Zak bf4cca706a tests: ignore setarch on sparc
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-17 14:32:07 +01:00
Karel Zak 64a3c227e2 tools: add checkcompletion.sh
The command "make checkcompletion" prints missing completion scripts.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-17 14:05:27 +01:00
Karel Zak dcc3b1fc2e umount: add man page note that --force is not perfect
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-17 12:19:31 +01:00
Ruediger Meier 073487aa74 build-sys: no need to un-ignore tracked files
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-17 12:19:12 +01:00
Ruediger Meier d77202afe0 build-sys: install missing bash completions
We haven't installed these files since three years. Hopefully
they will work.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-17 12:18:56 +01:00
Benno Schulenberg 49b7f95e43 docs: miscellaneous tiny tweaks of man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:54 +01:00
Benno Schulenberg 718b6f0cda fdisk: fix the grammar of an option description
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:54 +01:00
Benno Schulenberg afaf31035d unshare: describe the setgroups restriction more explicitly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:53 +01:00
Benno Schulenberg c8a550a178 script: tweak spacing and wording, and restore filling in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:53 +01:00
Benno Schulenberg e71040ce58 lscpu: improve spacing and spelling in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:52 +01:00
Benno Schulenberg 8722fc38b1 chrt: remove duplicate words and tweak some phrasings in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:52 +01:00
Ruediger Meier e5fc6d6fb5 lscpu: fix memleak because of ambiguous tags
Now the first one of certain ambiguous tags wins. Alternatively to
this patch we could have called free() before xstrdup().

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 14:17:34 +01:00
Ruediger Meier c95e388972 lscpu: use cpu and revision tag if available
Avoid ifdef which does not work with --sysroot. Our existing test
dumps produce even better output now for ppc and sparc.

The logic moved to the printing section.

CC: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 14:17:33 +01:00
Ruediger Meier 86c4817e0e Revert "lscpu: keep lscpu usable on snapshots"
This reverts commit 641350fe82.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 14:17:33 +01:00
Karel Zak 8a2d738aa1 tests: add new fdisk bsd test
New BDS test based on hexdump, this commit provides:

	bsd_0_64.BE	- generated on ppc64
	bsd_0_64.LE	- generated on ppc64le
	bsd_1_0.LE	- generated on x86_64
	bsd_1_0.BE	- generated on s390

the last missing is Alpha where all is different :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-16 14:01:23 +01:00
Karel Zak 4c48db0b8c tests: mark old bsd fdisk test as deprecated
It seems better to use hexdump rather than md5sum, but it means that
we have to gather hexdumps of the all possible BSD variants. For this
purpose will be introduced a new bsd fdisk test and to verify the
new hexdumps we can use this old test as both tests are exactly the
same.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-16 13:01:10 +01:00
Benno Schulenberg 0825fe1621 dmesg: improve grammar and consistency of usage text
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:39 +01:00
Benno Schulenberg 9e708d01f3 uuidd: correct the wording of an error message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:38 +01:00
Benno Schulenberg b779c1aecb mount, umount, swapon, fsck, lsblk, findmnt: harmonize six error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:38 +01:00
Benno Schulenberg 426cdc0ac0 logger: correct the grammar of an error message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:37 +01:00
Benno Schulenberg 614ddddfc1 libfdisk: (gpt) reword two error messages with a sense of direction
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:37 +01:00