]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agodocs: add fdisk mac support to TODO file
Karel Zak [Wed, 25 Jun 2014 09:39:30 +0000 (11:39 +0200)] 
docs: add fdisk mac support to TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: correct the return values in squashfs probe
David Shea [Mon, 23 Jun 2014 17:41:48 +0000 (13:41 -0400)] 
libblkid: correct the return values in squashfs probe

Returning -1 can cause squashfs v3 detection to make v4 detection fail.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) count fisrt usable LBA to total number of used sectors
Karel Zak [Tue, 24 Jun 2014 08:32:25 +0000 (10:32 +0200)] 
libfdisk: (dos) count fisrt usable LBA to total number of used sectors

The check() function counts number of used sectors, but it counts only
partitions. This is mistake, the area before the first partition is
also "used" place (boot loaders or we have to align the first partition
to disk I/O limits, etc).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) use check() for dos-comaptible mode only
Karel Zak [Tue, 24 Jun 2014 07:40:56 +0000 (09:40 +0200)] 
libfdisk: (dos) use check() for dos-comaptible mode only

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) calculation of total size based on CHS in check function
Thorsten Wilmer [Tue, 24 Jun 2014 07:38:30 +0000 (09:38 +0200)] 
libfdisk: (dos) calculation of total size based on CHS in check function

Many people report a problem with the message if (cylinders <= 1024 &&
start != total) fprintf(stderr, _("Partition %d: previous sectors %d
disagrees with " "total %d\n"), n, start, total);

This message comes from the fact that the previous code caluclates the
total number of sectors in the wrong way.

The formula should be total = (real_c * heads + h) * sectors + real_s;

As a Cylinder consists of some heads * sectors A Head consists of some
sectors and finally sectors are the smallest unit

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: special treatment for auto in fstype pattern
Karel Zak [Mon, 23 Jun 2014 10:42:33 +0000 (12:42 +0200)] 
libmount: special treatment for auto in fstype pattern

Let's support

  mount -t ext2,auto /dev/sde /media/stick

Reported-by: Andreas Henriksson <andreas@fatal.se>
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506695
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohwclock: sometimes one day lasts 23 hours.
peppe [Sun, 22 Jun 2014 12:23:25 +0000 (14:23 +0200)] 
hwclock: sometimes one day lasts 23 hours.

If less than 23 hours have passed since the last calibration, hwclock
says "Not adjusting drift factor because it has been less than a day since
the last calibration.", but in fact compares to 23 hours, not 24.

This was originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689534

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoscript: clean up code to genenrate Star/Done messages
Karel Zak [Mon, 23 Jun 2014 09:41:31 +0000 (11:41 +0200)] 
script: clean up code to genenrate Star/Done messages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoscript: silence the done message on --quiet as well
Andreas Henriksson [Sun, 22 Jun 2014 01:12:44 +0000 (03:12 +0200)] 
script: silence the done message on --quiet as well

Apparently James Hunts patch (which he provided a long time
ago) is no longer covering it all.

This followup patch also silences the "Script done ..." message
when --quiet is used.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoscript: --quiet option is not quiet.
James Hunt [Sat, 21 Jun 2014 23:03:04 +0000 (01:03 +0200)] 
script: --quiet option is not quiet.

Specifying 'script --quiet ...' still produces the 'Script started'
message in the typescript file. The --quiet option implies that the
script program should not log any of its output to the typescript file.

Originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693966

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agocfdisk: add --zero command line option
Karel Zak [Fri, 20 Jun 2014 10:17:53 +0000 (12:17 +0200)] 
cfdisk: add --zero command line option

The option has been supported by previous versions, we can easily
support it too.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agocfdisk: don't offer BSD
Karel Zak [Fri, 20 Jun 2014 10:07:30 +0000 (12:07 +0200)] 
cfdisk: don't offer BSD

BSD is nested within DOS partition, so for disk without any partition
table it does not make any sense to offer BSD label.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'master' of https://github.com/nazarov-yuriy/util-linux
Karel Zak [Thu, 19 Jun 2014 09:52:27 +0000 (11:52 +0200)] 
Merge branch 'master' of https://github.com/nazarov-yuriy/util-linux

11 years agobuild-sys: fixes for non-Linux systems
Samuel Thibault [Thu, 19 Jun 2014 08:35:23 +0000 (10:35 +0200)] 
build-sys: fixes for non-Linux systems

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: support ./configure ADJTIME_PATH=
Karel Zak [Thu, 19 Jun 2014 08:18:46 +0000 (10:18 +0200)] 
build-sys: support ./configure ADJTIME_PATH=

.. to override the default /etc/adjtime path.

Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/loopdev.c: reset errno before strtol() call
Yuriy Nazarov [Wed, 18 Jun 2014 23:12:22 +0000 (03:12 +0400)] 
lib/loopdev.c: reset errno before strtol() call

Fixed unsuccessful attempt to find unused loop devices if 0-7
devices already used and /dev/loop directory exists.

11 years agobuild-sys: add libsmartcols to ko-release-gen script
Karel Zak [Wed, 18 Jun 2014 13:42:09 +0000 (15:42 +0200)] 
build-sys: add libsmartcols to ko-release-gen script

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: release++ (v2.25-rc1) v2.25-rc1
Karel Zak [Wed, 18 Jun 2014 12:40:28 +0000 (14:40 +0200)] 
build-sys: release++ (v2.25-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: add v2.25-ReleaseNotes
Karel Zak [Wed, 18 Jun 2014 12:38:55 +0000 (14:38 +0200)] 
docs: add v2.25-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update AUTHORS file
Karel Zak [Wed, 18 Jun 2014 11:16:03 +0000 (13:16 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopo: merge changes
Karel Zak [Wed, 18 Jun 2014 11:11:17 +0000 (13:11 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopo: update zh_CN.po (from translationproject.org)
Wylmer Wang [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update zh_CN.po (from translationproject.org)

11 years agopo: update pt_BR.po (from translationproject.org)
Rafael Ferreira [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update pt_BR.po (from translationproject.org)

11 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update ja.po (from translationproject.org)

11 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update de.po (from translationproject.org)

11 years agopo: update da.po (from translationproject.org)
Joe Hansen [Wed, 18 Jun 2014 11:02:36 +0000 (13:02 +0200)] 
po: update da.po (from translationproject.org)

11 years agopo: update cs.po (from translationproject.org)
Petr Písař [Wed, 18 Jun 2014 11:02:36 +0000 (13:02 +0200)] 
po: update cs.po (from translationproject.org)

11 years agomount: fix man page [checkmans]
Karel Zak [Wed, 18 Jun 2014 10:58:49 +0000 (12:58 +0200)] 
mount: fix man page [checkmans]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/fileutils: xalloc stuff in library-like code
Karel Zak [Wed, 18 Jun 2014 10:57:42 +0000 (12:57 +0200)] 
lib/fileutils: xalloc stuff in library-like code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: fix ifdef HAVE_sys_io_h [checkconfig]
Karel Zak [Wed, 18 Jun 2014 10:51:25 +0000 (12:51 +0200)] 
lscpu: fix ifdef HAVE_sys_io_h [checkconfig]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update build tests
Karel Zak [Wed, 18 Jun 2014 10:46:04 +0000 (12:46 +0200)] 
tests: update build tests

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add non-libsmartcols.conf
Karel Zak [Wed, 18 Jun 2014 10:44:37 +0000 (12:44 +0200)] 
build-sys: add non-libsmartcols.conf

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix compiler warning [-Wimplicit-function-declaration]
Karel Zak [Wed, 18 Jun 2014 09:27:39 +0000 (11:27 +0200)] 
libblkid: fix compiler warning [-Wimplicit-function-declaration]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/sysfs: fix compiler warning [-Wunused-variable]
Karel Zak [Wed, 18 Jun 2014 09:25:47 +0000 (11:25 +0200)] 
lib/sysfs: fix compiler warning [-Wunused-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: don't touch mtab when mount -n specified
Karel Zak [Tue, 17 Jun 2014 13:38:14 +0000 (15:38 +0200)] 
libmount: don't touch mtab when mount -n specified

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1109367
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: remove test_wholedisk
Karel Zak [Tue, 17 Jun 2014 10:45:28 +0000 (12:45 +0200)] 
tests: remove test_wholedisk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: remove obsolete wholedisk.c
Karel Zak [Tue, 17 Jun 2014 10:16:29 +0000 (12:16 +0200)] 
build-sys: remove obsolete wholedisk.c

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosfdisk: use sysfs_devno_is_wholedisk()
Karel Zak [Tue, 17 Jun 2014 10:16:05 +0000 (12:16 +0200)] 
sfdisk: use sysfs_devno_is_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use sysfs_devno_is_wholedisk()
Karel Zak [Tue, 17 Jun 2014 10:15:59 +0000 (12:15 +0200)] 
fdisk: use sysfs_devno_is_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/sysfs: add sysfs_devno_is_wholedisk()
Karel Zak [Tue, 17 Jun 2014 10:15:01 +0000 (12:15 +0200)] 
lib/sysfs: add sysfs_devno_is_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/sysfs: add sysfs_devno_is_lvm_private() from libblkid
Karel Zak [Tue, 17 Jun 2014 09:20:32 +0000 (11:20 +0200)] 
lib/sysfs: add sysfs_devno_is_lvm_private() from libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: add --nocanonicalize to avoid realpath()
Karel Zak [Mon, 16 Jun 2014 13:47:50 +0000 (15:47 +0200)] 
findmnt: add --nocanonicalize to avoid realpath()

 * in some cases is realpath() overkill
 * sometimes you want to search for explicitly specified paths (e.g.
   "findmnt --fstab /mnt/symlink") rather than for real paths
 * you want to avoid readlink() and stat() on NFS

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: fix smartcols.pc
Karel Zak [Mon, 16 Jun 2014 13:18:20 +0000 (15:18 +0200)] 
build-sys: fix smartcols.pc

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: move libsmartcols.so to /lib if they exists
Karel Zak [Mon, 16 Jun 2014 13:00:33 +0000 (15:00 +0200)] 
build-sys: move libsmartcols.so to /lib if they exists

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoOnly move shared libraries to /lib if they exists
Thomas Petazzoni [Thu, 12 Jun 2014 20:10:27 +0000 (22:10 +0200)] 
Only move shared libraries to /lib if they exists

In several Makemodule.am, there is a install-exec-hook-<library>
target whose role is to move the shared library from /usr/lib to /lib,
while keeping a symbolic link /usr/lib/libuuid.so ->
../../lib/<library>.so.<version>.

However, when util-linux is built with --enable-static
--disable-shared (as is needed on noMMU platforms that don't support
shared libraries), no <library>.so is built, but the
install-exec-hook-libuuid creates an invalid /usr/lib/<library>.so
symbolic link, pointing to ../../lib (yes, the directory). This causes
troubles later one when other libraries/programs are compiled with
-l<library>, as gcc thinks a shared library is available because
there's a file named /usr/lib/<library>.so.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 years agoMerge branch 'tests-utmp' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 16 Jun 2014 12:37:39 +0000 (14:37 +0200)] 
Merge branch 'tests-utmp' of https://github.com/rudimeier/util-linux

* 'tests-utmp' of https://github.com/rudimeier/util-linux:
  tests: skip some last tests if no dns support
  tests: split last into dns and nodns subtests
  tests: add utmpdump-circle test (arch independent)
  tests: provide missing test data for "last" on exotic archs
  tests: skip utmpdump tests for exotic archs
  tests: merge last/ and utmpdump/ into new utmp/ dir
  utmpdump: fix localtime() error handling

11 years agoMerge branch 'gettext-version' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 16 Jun 2014 12:33:32 +0000 (14:33 +0200)] 
Merge branch 'gettext-version' of https://github.com/rudimeier/util-linux

* 'gettext-version' of https://github.com/rudimeier/util-linux:
  build-sys: fix autopoint gettext version fun

11 years agomount: more hints about default mount options to man page
Karel Zak [Thu, 12 Jun 2014 09:15:00 +0000 (11:15 +0200)] 
mount: more hints about default mount options to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agorename: remove reference to mmv gtom man page
Karel Zak [Thu, 12 Jun 2014 08:28:10 +0000 (10:28 +0200)] 
rename: remove reference to mmv gtom man page

It seems better to not have a reference to the program that is not
available in many cases on usual Linux installation.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: skip some last tests if no dns support
Ruediger Meier [Wed, 11 Jun 2014 17:28:20 +0000 (19:28 +0200)] 
tests: skip some last tests if no dns support

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: split last into dns and nodns subtests
Ruediger Meier [Wed, 11 Jun 2014 17:22:41 +0000 (19:22 +0200)] 
tests: split last into dns and nodns subtests

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: add utmpdump-circle test (arch independent)
Ruediger Meier [Wed, 11 Jun 2014 14:08:29 +0000 (16:08 +0200)] 
tests: add utmpdump-circle test (arch independent)

This one is a completely arch independent conversion round:
  text -> bin -> text -> bin

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: provide missing test data for "last" on exotic archs
Ruediger Meier [Wed, 11 Jun 2014 18:26:04 +0000 (20:26 +0200)] 
tests: provide missing test data for "last" on exotic archs

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: skip utmpdump tests for exotic archs
Ruediger Meier [Wed, 11 Jun 2014 13:36:42 +0000 (15:36 +0200)] 
tests: skip utmpdump tests for exotic archs

We introduce utmp_functions.sh and skip tests if size of utmp struct
does not match our wtmp test data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: merge last/ and utmpdump/ into new utmp/ dir
Ruediger Meier [Wed, 11 Jun 2014 15:47:34 +0000 (17:47 +0200)] 
tests: merge last/ and utmpdump/ into new utmp/ dir

We want to prepare and simplify utmp sepcific fixes. Beside all this
renaming we also update/add some text data to have it more consistent.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoutmpdump: fix localtime() error handling
Ruediger Meier [Wed, 11 Jun 2014 15:31:56 +0000 (17:31 +0200)] 
utmpdump: fix localtime() error handling

If current TZ has no representation of a given time_t then localtime()
would return NULL and break the next strftime().

In practice this happens very likely on systems with 64bit time_t when
parsing broken binary data. Seen on aarch64 (and probably s390) using
our (incompatible) test wtmp data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: fix autopoint gettext version fun
Ruediger Meier [Tue, 10 Jun 2014 16:44:08 +0000 (18:44 +0200)] 
build-sys: fix autopoint gettext version fun

We avoid or fix many portability issues.

The first more generic "sort --version-sort" solution was almost
useless anyway because autopoint itself can also only deal with
a few hardcoded versions.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: use gettext 0.18.3 if possible
Ruediger Meier [Tue, 10 Jun 2014 10:08:51 +0000 (12:08 +0200)] 
build-sys: use gettext 0.18.3 if possible

We add a little hack for backward compatibility on systems with
older gettext installed

See 0576dbd3 and 81ed13ed.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolibblkid: cleanup internal return codes
Karel Zak [Tue, 10 Jun 2014 11:32:02 +0000 (13:32 +0200)] 
libblkid: cleanup internal return codes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: ignore private LVM devices
Karel Zak [Tue, 10 Jun 2014 10:16:59 +0000 (12:16 +0200)] 
libblkid: ignore private LVM devices

The virtual private LVM devices do not contain any blkid relevant data
and it does not make any sense to scan for superblocks or partitions
on the devices, because we can interpret data from the devices in bad
way.

Unfortunately, for LVM has "private" very special meaning. The private
LVM devices are accessible and readable (according to LVM guys it's
feature, because debugging etc.).

The problem is pretty visible with LVM thin provisioning where a virtual
pool device contains segments from the top-level thin devices.

Mountable top-level LVM-thin device:

# blkid -o udev -p /dev/mapper/vg-thin1
ID_FS_UUID=57ed6490-903b-416c-91d2-6d06804ec60c
ID_FS_TYPE=ext4

Virtual private LVM-pool device (contains data from all thin devices):

# blkid -o udev -p /dev/mapper/vg-pool0
ID_FS_UUID=57ed6490-903b-416c-91d2-6d06804ec60c
ID_FS_TYPE=ext4

... this is incorrect, vg-pool0 is unmountable.

LVM uses special UUID suffixes for private devices. All devices with
uuid in format "LVM-<uuid>-<type>" are private.

This patch modifies libblkid to not scan such devices. The high-level
API ignores such devices at all now.

The low-level API allows to assign the device to blkid_prober, but all
scan functions always return nothing and library does not read
anything from the device. The another functionality (get parental
device, topology, sector sizes, etc.) still works as expected. The
change affects only probing code.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1101345
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix fdisk/bsd for big endian systems
Ruediger Meier [Thu, 29 May 2014 17:52:52 +0000 (19:52 +0200)] 
tests: fix fdisk/bsd for big endian systems

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoMerge branch 'travis-functions' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 9 Jun 2014 10:18:47 +0000 (12:18 +0200)] 
Merge branch 'travis-functions' of https://github.com/rudimeier/util-linux

11 years agoMerge branch 'tests-hwclock' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 9 Jun 2014 10:13:18 +0000 (12:13 +0200)] 
Merge branch 'tests-hwclock' of https://github.com/rudimeier/util-linux

* 'tests-hwclock' of https://github.com/rudimeier/util-linux:
  tests: rewrite hwclock test

11 years agolibfdisk: fix fdisk_context_assign_device() comment
Karel Zak [Mon, 9 Jun 2014 10:09:18 +0000 (12:09 +0200)] 
libfdisk: fix fdisk_context_assign_device() comment

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofsck: use private lock file rather than whole-disk directly
Karel Zak [Mon, 9 Jun 2014 09:59:44 +0000 (11:59 +0200)] 
fsck: use private lock file rather than whole-disk directly

It seems overkill to lock directly whole-disk device (for -l) when we use the
lock only to synchronize fsck instances.

It's fsck private business, so don't use system files, but let's use private
/run/fsck/<diskname>.lock file.

Addresses: https://bugs.freedesktop.org/show_bug.cgi?id=79576
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/fileutils: add stripoff_last_component() from libmount
Karel Zak [Mon, 9 Jun 2014 09:54:32 +0000 (11:54 +0200)] 
lib/fileutils: add stripoff_last_component() from libmount

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/fileutils: add mkdir_p() from libmount
Karel Zak [Mon, 9 Jun 2014 08:59:18 +0000 (10:59 +0200)] 
lib/fileutils: add mkdir_p() from libmount

11 years agoflock: document exit status of flock in man page
Phillip Susi [Tue, 3 Jun 2014 13:55:52 +0000 (09:55 -0400)] 
flock: document exit status of flock in man page

The man page did not indicate that the exit status of flock
is actually that of the child command, when one is run.

11 years agolibfdisk: fix bsd_translate_fstype() for alpha
Ruediger Meier [Sun, 8 Jun 2014 13:32:48 +0000 (15:32 +0200)] 
libfdisk: fix bsd_translate_fstype() for alpha

Reported-by: Tobias Klausmann <klausman@schwarzvogel.de>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: rewrite hwclock test
Ruediger Meier [Fri, 6 Jun 2014 11:40:48 +0000 (13:40 +0200)] 
tests: rewrite hwclock test

Major changes:
 - don't use deprecated ntpdate but sntp client
 - don't update sys time from ntp, just compare offsets
 - now hwclock is the only command which needs root permissions
 - resolve ntp server to one fixed IP to get comparable offsets
   always from the same remote machine
 - don't enter the systohc/hctosys loop if not even --show works
 - verbose but not too ugly debug output

Note, maybe later the resolve_host function could be moved to functions.sh
because other tests (e.g. last) should check whether dns is available.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoumount: Make sure exit code does not overflow
Nicolas Boichat [Sat, 7 Jun 2014 13:38:00 +0000 (21:38 +0800)] 
umount: Make sure exit code does not overflow

POSIX exit code is only 8-bit, and since umount sums up error
codes, it can sometimes report success (exit code 0) even though
a number of operations failed.

For example, running, in an empty directory:
 umount `seq 1 7`
returns 224 (7*32), since none of the 7 mount point exists but
 umount `seq 1 8`
returns 0 (8*32=256)

This patch clips the return value to 255.

Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
11 years agotravis-ci: refactor and add .travis-functions.sh
Ruediger Meier [Sun, 1 Jun 2014 22:58:01 +0000 (00:58 +0200)] 
travis-ci: refactor and add .travis-functions.sh

Travis yaml syntax, where we can only use shell one-liners, is awful
and ugly. We add a real shell script and source it from .travis.yml.

This commit squashes a lot changes because we don't want to pollute
history with this meta CI stuff.

Highlights of this commit:
  - enable make distcheck
  - cleanup configure options (enable all progs, with python and docs)
  - shorter config.log dump
  - out-of-tree build supported
  - workaround broken libtool on travis host
  - now it's easy to add temporary debugging stuff
  - testing locally is possible now

What are we testing now:
  - gcc and clang compiler
  - configure mostly with --enable-all-programs, --with-python and
    --enable-gtk-doc
  - make check with and without root permissions
  - make distcheck
  - make install (with and without --prefix as well as DESTDIR=...)
  - usually we always build in-tree but distcheck does out-of-tree

What do we want/expect at all:
  - This travis setup is intended to always work without fixing or
    updating this build script all the time. Thats why we only use a
    few configure flags.
  - We want to avoid predictable failures on travis host to not make
    developers tired of this machinery. Any tested feature which is
    known to be (sometimes) broken should be fixed or skipped as soon
    as possible.
  - If this works like wanted then in future almost any point in master
    commit history should at least survive the build and common tests
    on this reference host/arch. Moreover we will have a comparable,
    deterministic build log history. This could make bisecting real
    bugs easier.
  - It's not our goal to test any kind of config flags, host setup and
    arch combination. This would be done better by external build
    scripts which do not live within the project itself.
  - Of course this machinery can be also used to reproduce bugs with
    more exotic config and host setup by pushing a debug branch with
    modified travis script to github.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolibsmartcols: add debug messages
Karel Zak [Fri, 6 Jun 2014 11:47:06 +0000 (13:47 +0200)] 
libsmartcols: add debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agomount: add btrfs to mount.8
Gui Hecheng [Thu, 5 Jun 2014 02:05:19 +0000 (10:05 +0800)] 
mount: add btrfs to mount.8

Based on Documentation/filesystems/btrfs.txt

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
11 years agodocs: fix "behaviour" vs. "behavior"
Karel Zak [Fri, 6 Jun 2014 07:49:35 +0000 (09:49 +0200)] 
docs: fix "behaviour" vs. "behavior"

Sometimes we use "behaviour" and "behavior" in the same text, let's
use "behavior" only everywhere.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agocfdisk: resize UI on SIGWINCH
Karel Zak [Thu, 5 Jun 2014 12:32:51 +0000 (14:32 +0200)] 
cfdisk: resize UI on SIGWINCH

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agocfdisk: add [Sort] operation
Karel Zak [Thu, 5 Jun 2014 10:13:41 +0000 (12:13 +0200)] 
cfdisk: add [Sort] operation

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'misc-build-sys' of https://github.com/rudimeier/util-linux
Karel Zak [Wed, 4 Jun 2014 12:16:22 +0000 (14:16 +0200)] 
Merge branch 'misc-build-sys' of https://github.com/rudimeier/util-linux

* 'misc-build-sys' of https://github.com/rudimeier/util-linux:
  tests: fix python tests for dist and out-of-tree builds
  build-sys: fix update-potfiles script
  build-sys: restore make distcheck's configure flags
  build-sys: use automake's PYTHON primary for __init__.py
  tests: ignore deprecated last
  tests: remove deprecated mount tests

Conflicts:
Makefile.am

11 years agobuild-sys: fix with_python usage, improve logic
Karel Zak [Wed, 4 Jun 2014 11:43:15 +0000 (13:43 +0200)] 
build-sys: fix with_python usage, improve logic

We have to set the default withval= on the default with_python=check
otherwise uninitialized value is used.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --enable-pylibmount
Karel Zak [Wed, 4 Jun 2014 09:16:48 +0000 (11:16 +0200)] 
build-sys: add --enable-pylibmount

 * globally disable all Python bindings by --without-python
 * use --with-python=<version> to specify Python version
 * --enable-pylibmount to override --disable-all-programs

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix python tests for dist and out-of-tree builds
Ruediger Meier [Tue, 3 Jun 2014 22:17:58 +0000 (00:17 +0200)] 
tests: fix python tests for dist and out-of-tree builds

- add python helper scripts to the dist
- helper scripts are always in srcdir
- python libs are in builddir
- abort tests if helpers are missing

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: fix update-potfiles script
Ruediger Meier [Tue, 3 Jun 2014 17:07:37 +0000 (19:07 +0200)] 
build-sys: fix update-potfiles script

Now are using "git ls-files" to avoid finding non-project
files or autoheaders which could break the dist tarball.

For non-git source dirs we assume that any existing POTFILES.in is
up-todate (build from tarball) or we provide at least an empty list
to not be a show-stopper for builds from poor "git archive".

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: restore make distcheck's configure flags
Ruediger Meier [Mon, 2 Jun 2014 21:59:07 +0000 (23:59 +0200)] 
build-sys: restore make distcheck's configure flags

They got lost with --enable-most-builds in 08b1c219.

Note additionally we add --enable-gtk-doc but don't add
--with-systemd because there are still many systems where systemd
is not available.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: use automake's PYTHON primary for __init__.py
Ruediger Meier [Mon, 2 Jun 2014 14:34:47 +0000 (16:34 +0200)] 
build-sys: use automake's PYTHON primary for __init__.py

Actually the initial reason for this commit was to remove execute
permission from installed __init__.py.

Now after discovering automake's _PYTHON suffix we slightly cleanup
Makemodule.am and we will install byte compiled .pyc and .pyo files.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: ignore deprecated last
Ruediger Meier [Mon, 2 Jun 2014 20:59:27 +0000 (22:59 +0200)] 
tests: ignore deprecated last

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: remove deprecated mount tests
Ruediger Meier [Sun, 1 Jun 2014 19:43:34 +0000 (21:43 +0200)] 
tests: remove deprecated mount tests

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: fix ENABLE_ALL
Karel Zak [Tue, 3 Jun 2014 10:52:33 +0000 (12:52 +0200)] 
build-sys: fix ENABLE_ALL

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: fix docs
Karel Zak [Tue, 3 Jun 2014 10:41:58 +0000 (12:41 +0200)] 
libsmartcols: fix docs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: rename libs xml/version.xml to xml/version-utils.xml
Karel Zak [Tue, 3 Jun 2014 10:37:33 +0000 (12:37 +0200)] 
docs: rename libs xml/version.xml to xml/version-utils.xml

It seems that gtk-docs stuff is confused when we use version.xml
(package version) and xml/version.xml (library version functions).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuil-sys: disable in UL_BUILD_INIT() on --disable-all-programs
Karel Zak [Mon, 2 Jun 2014 09:34:21 +0000 (11:34 +0200)] 
buil-sys: disable in UL_BUILD_INIT() on --disable-all-programs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: don't compile deprecated last(1) on --enable-all-programs
Karel Zak [Mon, 2 Jun 2014 09:21:35 +0000 (11:21 +0200)] 
build-sys: don't compile deprecated last(1) on --enable-all-programs

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoscript: fix spurious exit from input read loop on EINTR.
Csaba Kos [Fri, 30 May 2014 09:40:15 +0000 (18:40 +0900)] 
script: fix spurious exit from input read loop on EINTR.

11 years agoscript: fix a rare deadlock after child termination
Csaba Kos [Fri, 30 May 2014 05:33:32 +0000 (14:33 +0900)] 
script: fix a rare deadlock after child termination

11 years agolibsmartcols: clean up test.c example
Karel Zak [Fri, 30 May 2014 12:17:29 +0000 (14:17 +0200)] 
libsmartcols: clean up test.c example

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update TODO
Karel Zak [Fri, 30 May 2014 11:50:10 +0000 (13:50 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 30 May 2014 10:01:27 +0000 (12:01 +0200)] 
Merge branch 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux

* 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux:
  lscpu: improve vmware detection
  tests: add lscpu IBM pSeries test data
  lscpu: detect OS/400 and pHyp hypervisors
  tests: add vbox lscpu dump
  lscpu: minor cleanup and improve hypervisor detection

11 years agolibblkid: (zfs) let's keep compiler happy
Karel Zak [Fri, 30 May 2014 09:27:41 +0000 (11:27 +0200)] 
libblkid: (zfs) let's keep compiler happy

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'warnings-squashed' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 30 May 2014 09:26:43 +0000 (11:26 +0200)] 
Merge branch 'warnings-squashed' of https://github.com/rudimeier/util-linux

* 'warnings-squashed' of https://github.com/rudimeier/util-linux:
  build: fix some compiler warnings

11 years agolibfdisk: (gpt) fix last LBA code for S_ISREG
Karel Zak [Fri, 30 May 2014 08:51:53 +0000 (10:51 +0200)] 
libfdisk: (gpt) fix last LBA code for S_ISREG

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild: fix some compiler warnings
Ruediger Meier [Thu, 29 May 2014 23:18:09 +0000 (01:18 +0200)] 
build: fix some compiler warnings

Most of them catched on 32bit gcc and icc.

disk-utils/fsck.cramfs.c:     printf format type
lib/boottime.c:               unused variables
misc-utils/cal.c:             set but never used
sys-utils/losetup.c:          set but never used
sys-utils/lscpu-dmi.c:        defined but not used
sys-utils/switch_root.c:      comparison between signed and unsigned
tests/helpers/test_sysinfo.c: printf format type