Commit Graph

548 Commits

Author SHA1 Message Date
Karel Zak cd150a429d build-sys: release++ (v2.27)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-09-07 09:55:19 +02:00
Chen Qi 37edac9a0c build-sys: include errno.h instead of argp.h
configure should include errno.h instead of argp.h when
checking for presence of program_invocation_short_name
uclibc defines this to be const char* unlike util-linux-ng
which defines this to be char* so this error goes unnoticed
on glibc/eglibc systems.

here is the error it fixes

in file included from mountP.h:14:0,
                 from cache.c:29:
/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname'
../../../include/c.h:118:14: note: previous declaration of '__progname' was here
make[3]: *** [cache.lo] Error 1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
2015-08-31 11:27:45 +02:00
Karel Zak 0e58e16936 build-sys: release++ (v2.27-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-08-24 12:38:48 +02:00
Karel Zak 2c6567799d build-sys: add --disable-assert
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-08-04 13:40:44 +02:00
Karel Zak d3a1e3bfaa build-sys: mark script(1) as Linux only due to signalfd()
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-07-31 15:27:10 +02:00
Karel Zak 55ebd014b0 build-sys: release++ (v2.27-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-07-31 12:08:18 +02:00
Karel Zak 328eb4455b build-sys: add --disable-cal
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-07-27 11:49:29 +02:00
Karel Zak 9d20ffda79 lsipc: new command to list IPC facilities
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2015-07-20 11:48:09 +02:00
Sami Kerola 0688911ad4 last-deprecated: remove from source tree
The last/lastb(1) from sysvinit has been around for about two years,
and the better implementation is already part of releases 2.24 to 2.26.
It should be safe to remove the unused last code from the source tree.

Reference: ce60272039
Signed-off-by: Sami Kerola <sami.kerola@lastminute.com>
2015-06-29 12:05:39 +02:00
Karel Zak 17d710346a build-sys: add --without-* for all libs
It's necessary for people who want to compile util-linux in very
unusual environment and disable as much as possible dependencies.
For example distro bootstrap.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1223894
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-05-22 12:43:33 +02:00
Georg Schiesser fddfd4e08b build-sys: support unshare.static
This patch adds support for building a static version of unshare.
We need to add unshare to the list of possible static programs, and
provide build flags for the compiler and linker, which are equivalent to
the flags of the non-static program, except additional static linking.
See also: commit 2fa60c5 build-sys: support nsenter.static

Signed-off-by: Georg Schiesser <georg.schiesser@opentech.at>
2015-05-18 11:46:05 +02:00
Karel Zak 0fc7a4fbf4 Merge branch 'fix-tinfo-typo' of https://github.com/rudimeier/util-linux
* 'fix-tinfo-typo' of https://github.com/rudimeier/util-linux:
  build-sys: typo -ltinfo
2015-04-07 12:31:55 +02:00
Karel Zak f9c4d13891 build-sys: define cfdisk dependence on open_memstream
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-30 13:54:08 +02:00
Ruediger Meier 587652b4f8 build-sys: typo -ltinfo
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-03-28 17:12:27 +01:00
Karel Zak 30c34afbdc build-sys: add HAVE_LIBMOUNT
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-27 13:46:15 +01:00
Karel Zak 0b28c2ec37 build-sys: add TINFO_LIBS_STATIC
and use this variable for $READLINE_LIBS_STATIC.

Note the patch also moves READLINE checks after TINFO check.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-27 10:34:25 +01:00
Karel Zak b2ae8c571b build-sys: python is optional, don't fail when missing
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-26 12:09:50 +01:00
Karel Zak 43cc76e263 build-sys: ncurses is optional, don't fail when missing
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-26 11:50:15 +01:00
Karel Zak 15eba21796 build-sys: support static build with readline
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 17:55:22 +01:00
Ondrej Oprala 0273afda3c build-sys: add --with-readline
[kzak@redhat.com: - define READLINE_LIBS]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-25 10:26:40 +01:00
Karel Zak 4230d576fd build-sys: add new compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-17 10:15:50 +01:00
Karel Zak 7d3a07d87f logger: check for ntp_gettime() rather than for timex.h
It seems that musl libc and uClibc without UCLIBC_NTP_LEGACY
does not provide ntp_gettime and compile will fail.

References: https://github.com/karelzak/util-linux/issues/174
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-10 11:37:45 +01:00
Karel Zak 254743e4a6 build-sys: cleanup realtime lib usage
* check for timer_create()
* define dependence on timer_create() for flock
* rename CLOCKGETTIME_LIBS to REALTIME_LIBS

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-06 14:20:19 +01:00
Sami Kerola 378543e13f flock: improve timeout handling
Signal ALRM raised by the timer, and the timer only, will be considered
as a timeout criteria.

Secondly time interval is made to use monotonic clock.  Documentation of
ITIMER_REAL is unclear whether that time is affected various sources of
clock skew, or does it even tick when system is suspended.

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-05 10:31:01 +01:00
Karel Zak f71d1104df build-sys: add --enable-usrdir-path
The directories /{sbin,bin} are symliks to /usr/{sbin,bin} on many
systems. This patch add new ./configure option to remove the non-usr
paths from the default $PATH environment variable.

The default $PATH is hardcoded in login(1) and can be overwritten
by /etc/login.defs.

default:

./test_pathnames | grep DEFPATH
       _PATH_DEFPATH /usr/local/bin:/bin:/usr/bin
  _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

--enable-usrdir-path:

./test_pathnames | grep DEFPATH
       _PATH_DEFPATH /usr/local/bin:/usr/bin
  _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

This patch does not modify install paths, you still have to care about
--{bin,lib}dir configure options.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-03 11:43:01 +01:00
Karel Zak 4310faf950 lib/colors: use libtinfo to check terminal capability
The current implementation assumes that all terminals supports colors
and users are forcet to use terminal-colors.d/ to disable colors for
some terminals.

This patch checks for maximal supported colors for the current
terminal and colors are automatically disabled for terminals like
vt100.

The patch moves lib/colors.c from libcommon.la to libtcolors.la to
avoid collisions with another utils.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-27 13:57:34 +01:00
Karel Zak 81f55ab904 build-sys: add --disable-colors-default
The current util-linux is to have enabled colorized outputs by
default, this default behavior is possible to change by new configure
option --disable-colors-default.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-25 10:06:40 +01:00
Karel Zak 3c0a983ec9 build-sys: release++ (v2.26)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-19 13:11:24 +01:00
Karel Zak e3f72275ca libmount: add --enable-libmount-force-mountinfo
The default libmount mtab management depends on mtan symlink. If the
symlink exists than libmount parses /proc/self/mountinfo, otherwise it
parses regular classic /etc/mtab. This is backwardly compatible and
transparent solution.

Unfortunately, this is not robust enough because some broken init
scripts or 3-party mount helpers may remove the symlink and create
regular mtab file. This is pretty bad if initd (systemd) depends on
libmount.

Fortunately we known that mtab is absolutely unwanted on some distros,
so it's fine too ignore mtab at all and don't care about the symlink.

Reported-by: Martin Pitt <martin.pitt@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-16 12:49:49 +01:00
Karel Zak 035e4c0a44 build-sys: release++ (v2.26-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-04 11:50:19 +01:00
Karel Zak c580b554c9 Merge branch 'timex' of https://github.com/kerolasa/lelux-utiliteetit
* 'timex' of https://github.com/kerolasa/lelux-utiliteetit:
  logger: check availability of ntp_gettime()
2015-01-26 11:59:10 +01:00
Samuel Thibault 87ee265835 logger: check availability of ntp_gettime()
Make compilation to work in systems which don't have sys/timex.h and its
ntp_gettime().

Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Samuel Thibault <sthibault@debian.org>
2015-01-23 19:57:22 +00:00
Ruediger Meier c8494d88d9 build-sys: fix UL_SCANF_TYPE_MODIFIER for icc
icc needs -Werror to let %m fail and to avoid this:
../libmount/src/tab_parse.c(61): warning #269: invalid format string conversion

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-01-20 15:38:06 +01:00
Ruediger Meier 3eeb5808d7 build-sys: free() needs stdlib.h
followup 4f310fae

CC: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-01-20 15:38:03 +01:00
Karel Zak f0b24d019e docs: fix typos
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-01-14 20:39:52 +01:00
Karel Zak 32511bfbab build-sys: release++ (v2.26-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-01-14 12:51:33 +01:00
Karel Zak 791da22d0e libfdisk: add version.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-01-13 13:46:31 +01:00
Sami Kerola 9385a11d8d libblkid: assume strtoull() is available
The strtoull() is part of ISO/IEC 9899:1999 (aka C99) and the function
has been happily used in prlimit(1) since 2011-10-19 without anyone
complaining compatibility issues.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strtoul.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-01-07 22:05:43 +00:00
Sami Kerola 4ebac79f01 build-sys: fix make checkincludes warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-01-07 21:57:53 +00:00
Karel Zak 2fa60c5ec2 build-sys: support nsenter.static
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-01-07 10:59:16 +01:00
Will Johansson fe2c9909cd login-utils: Enable building util-linux against OpenPAM
OpenPAM is compatible with util-linux, with a few changes, namely
using OpenPAM's conversation function, openpam_ttyconv.

We check for Linux-PAM by querying for security/pam_misc.h, and OpenPAM
by querying for security/openpam.h.

Signed-off-by: Will Johansson <will.johansson@gmail.com>
2014-12-15 10:16:03 +01:00
Karel Zak 705854f307 libfdisk: add API docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-26 19:13:57 +01:00
Karel Zak ed79557e1d build-sys: add fdisk.pc
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-26 13:20:16 +01:00
Karel Zak 0bb4c979c6 build-sys: create a regular shared libfdisk.so
- symbols versioning
- SONAME from configure.ac
- library version to header file
- modify build-sys to compile and install shared lib

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-26 12:45:24 +01:00
Karel Zak 90d5285d8c agetty: use futimens, check for all in configure.ac
It seems better to warn about --reload in ./configure if futimens or
inotify_init1 are missing.

The patch also replaces futimes() with futimens() to make the code
compatible with Uclibc.

Addresses: https://github.com/karelzak/util-linux/issues/133
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-21 11:38:11 +01:00
Karel Zak 8596f63914 ldattach: GSM0710 support, add intro modem command
Patch add:
 --intro-command string  : send command to modem
 --pause value           : define delay between intro command and ldattach

Based on patch from Martin Schmid <scm@aps-systems.ch>

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-18 13:49:42 +01:00
Sami Kerola 4f310faee0 build-sys: make scanf_cv_alloc_modifier to work [LeakSanitizer]
The tests failed with following message in config.log

ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2 byte(s) in 1 object(s) allocated from:
    #0 0x49a40e in realloc (/home/src/util-linux/conftest+0x49a40e)
    #1 0x7fbe48633e69 in __GI__IO_vfscanf (/usr/lib/libc.so.6+0x56e69)
    #2 0x7fbe48649786 in _IO_vsscanf (/usr/lib/libc.so.6+0x6c786)

which knocked out libmount from build, and commands depending on it.

The reason this change makes sense is that AddressSanitizer seems like a
good addition to set of tools that util-linux package can use, when and
if needed.

Reference: https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
Reviewed-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-11-18 12:55:41 +01:00
Karel Zak 8fc4a88630 build-sys: properly check for -lrt
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-27 11:05:14 +01:00
Søren Holm 10e1d2e5f7 libmount: provide version as int for better compiletime test
Signed-off-by: Søren Holm <sgh@sgh.dk>
2014-10-14 12:03:54 +02:00
Karel Zak b4b8438901 build-sys: add hint about 'make'
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-07 14:55:32 +02:00