Sami Kerola [Wed, 20 Aug 2014 19:06:58 +0000 (22:06 +0300)]
tests: apply travis clang PATH workaround
As seen in Travis build log the clang is not found, causing one of the
tests to fail. This change adds a workaround from Travis issue 2607 to
util-linux.
Reference: https://travis-ci.org/karelzak/util-linux/jobs/33056101#L3630
Reference: https://github.com/travis-ci/travis-ci/issues/2607 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Aurelien Jarno [Thu, 14 Aug 2014 22:26:24 +0000 (00:26 +0200)]
tests: fix fdisk/bsd for the two possible sectors/offsets
BSD disklabels depend on the endianess, but also on the architecture as
one can see in include/pt-bsd.h with the BSD_LABELSECTOR and
BSD_LABELOFFSET #define. This cause the testsuite to fail on the
affected architectures as the disk image is not the same as the expected
result.
Commit 180b3a7e tried to fix the endianess, but the special PowerPC case
has been chosen as a reference, so it still fails for example on MIPS BE
or S/390.
This patch fixes the testsuite by converting the md5sums to the expected
values, still depending on the endianess, but also for the two possible
sectors/offsets. This has been tested on Alpha, MIPS, PowerPC and x86-64,
so this should cover all 4 cases.
Cc: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Sami Kerola [Sat, 9 Aug 2014 08:09:16 +0000 (09:09 +0100)]
docs: mentintion default udp and tcp ports logger is using
The fact that 'syslog tcp/514' does not exist in RFS's, which has lead
to 'syslog-conn 601/tcp' be used in place could be a suprice and should
be told in manual.
Sami Kerola [Fri, 8 Aug 2014 23:49:46 +0000 (00:49 +0100)]
logger: allow use of --id=ppid when logging locally
There is no obvious way to make syslog(3) to print both pid or ppid, so
duplicate the libc syslog() to logger. Making the ppid printing work
using unix socket has side effect of local becoming capable to use both
rfc format output, which is hopefully seen as good thing. The
syslog_local() is format wise one-to-one copy with glibc syslog(3)
format.
Use of --algorithm or --streams is not expected to work without
reseting device, that happens when --size is specified, so ensure the
former options to be combined with the later.
[kzak@redhat.com: - make it more generic]
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 31 Jul 2014 08:55:38 +0000 (10:55 +0200)]
Merge branch 'travis' of git://github.com/kerolasa/lelux-utiliteetit
* 'travis' of git://github.com/kerolasa/lelux-utiliteetit:
tests: fix rename subdir check that was failing in travis
build-sys: remove swap-common.h from sys-utils/Makemodule.am
Sami Kerola [Wed, 30 Jul 2014 21:21:08 +0000 (22:21 +0100)]
tests: fix rename subdir check that was failing in travis
Apparently some or all travis build servers has a bit older coreutils
version. The coreutils v8.13 added a feature to readlink that allows
user to specify multiple arguments. Earlier versions gave exactly the
type of error travis_script log has.
+readlink: extra operand `rename_aa/sublink.2'
+Try `readlink --help' for more information.
Reference: https://travis-ci.org/karelzak/util-linux/builds Reviewed-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fdformat: Add new switches -f/--from, -t/--to, -r/--repair
This commit introduces a support for user configurable
from/to track and a basic repair mode for broken floppies.
It also fixes a recently introduced bug that causes
a line breakage when printing the track number.
Karel Zak [Tue, 29 Jul 2014 11:07:44 +0000 (13:07 +0200)]
nsenter: allow to use --set{uid,gid} for all namespaces
Now it's possible to set UID and GID for user namespaces only. This
patch removes this restriction and allow to use --set{uid,gid} in all
cases. The default for user namespaces is still GID=0, UID=0.
Reported-by: Tomas Doran <bobtfish@bobtfish.net> Signed-off-by: Karel Zak <kzak@redhat.com>
When tailf is not using inotify, it seems to sleep for 0.25s between
checks. Just giving a 0.1s time window between update and removal of the
input file thus gives little chance for tailf to succeed.
Similar between startup and append to file, make sure initial
content is read before appending additional data by bumping the time.
This should possibly be bumped much larger to make sure that
the tailf process actually gets a chance to run at all in the
given time window. Otherwise it might fail on really slow/overloaded
machines.
The drawback would then ofcourse be to increase the time it takes
to run the testsuite.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Karel Zak [Tue, 29 Jul 2014 08:22:21 +0000 (10:22 +0200)]
Merge branch 'logger' of git://github.com/kerolasa/lelux-utiliteetit
* 'logger' of git://github.com/kerolasa/lelux-utiliteetit:
wall: wrap message header when it exceeds 79 characters
logger: add hostname to rfc3164 message
logger: warn when --file and command line message are combined
logger: improve readablity of pencode() function
logger: make --stderr print remote server messages
logger: add process --id=parent optional argument
docs: add logger protocol notes to manual page
logger: add rfc5424 support
logger: tidy up main() by adding small functions and ctl data
logger: add function pointer to choose how logging is done
docs: make logger.1 facilities and levels easier to read
logger: refactor long if clause
logger: do not rely only getlogin(3) telling who ran the command
logger: fix indentation issues
logger: ensure program writes everything to syslog file descriptor
Sami Kerola [Sun, 27 Jul 2014 17:33:22 +0000 (18:33 +0100)]
logger: add hostname to rfc3164 message
This makes the obsolete protocol a little bit more compliant with the
internet standard, but few should care now when we have rfc5424 support,
and rfc3164 feels broken. For example it requires hostname to be not
fully qualified, which is hard to understand, and should make users to
prefer the new protocol.
Reported-by: Frank Thilo <thilo@unix-ag.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705217 CC: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Sun, 27 Jul 2014 17:01:09 +0000 (18:01 +0100)]
logger: warn when --file and command line message are combined
When --file is combined with command line arguments the later has
silently been ignored. This commit makes user to be aware the logger
will not use command line arguments when --file is specified.
Reported-by: "Daniel 'DaB.' Baur" <debian@daniel.baur4.info>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467244 CC: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Sat, 28 Jun 2014 14:37:39 +0000 (15:37 +0100)]
docs: add logger protocol notes to manual page
Inform about rfc5424 support, how to control what it includes to
submission, and that it is the new default when sending syslog messages
to remote server without specifying protocol.