Commit Graph

798 Commits

Author SHA1 Message Date
Karel Zak 169b4a8cd5 findmnt: (verify) add source verification
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-09-23 13:21:02 +02:00
Karel Zak f319e301a9 build-sys: add parisc to define ARCH_
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-08-16 13:39:07 +02:00
Sami Kerola 00971cca8a
pg: stop building the command by default
The pg command is marked deprecated in POSIX since 1997, and this project
has thought the same since Feb 2013.  Time has come to stop shipping this
binary by default.

Reference: 956e582874
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-08-14 13:30:36 +01:00
Karel Zak 3d7cad18e7 build-sys: remove global dependence between widechar and ncursesw
It seems that globally defined dependence between ncursesw and
wide-char support is overkill, because in some cases (e.g. cal(1)) we
can use ncurses independently on wide-char support.

It would be better to care about relation between wide-char and
ncurses individually (per util).

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-09 12:39:44 +02:00
Karel Zak db4e264574 build-sys: workaround for autoconf "present but cannot be compiled"
See also:
https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Present-But-Cannot-Be-Compiled.html

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-08 13:38:48 +02:00
Karel Zak dfe177dadb build-sys: add non-action for ncurses pkg-cong test
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-08 12:24:10 +02:00
Karel Zak 18dae5d879 build-sys: clean up relation between ncurses[w] and wide-char support
* error if wide-char enabled/supported, but (non-wide) ncurses
  explicitly requested

* disable ncurses at all if widechar enabled/supported, but ncursesw
  not found

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-08 12:03:15 +02:00
Karel Zak 4ffcc7a93e build-sys: cleanup --with-ncurses
* don't use UL_CHECK_LIB(), only use pkg-config to avoid complexity

 * split --with-ncursesw and --with-ncurses; ncurses (widechar) is the
   default, check for ncurses only if ncursesw disabled/unavailabled

 * don't use generic placeholders, just have_ncursesw and have_ncurses

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-08 11:31:31 +02:00
Waldemar Brodkorb bac7fbdb2d build-sys: fix uClibc-ng scanf check
uClibc-ng tries to be compatible with GNU libc and defines
__GLIBC__ and pretend to be version 2.2.
We once changed it to 2.10, but then some hard to fix problems
in different software packages (gcc) occured.
It would be better if we disable the special GNU libc checks
for uClibc-ng here. uClibc-ng implements the required scanf
functionality.

Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-06-06 10:04:25 +02:00
Karel Zak d67f61c06d build-sys: use UL_DEFAULT_ENABLE() only for programs
The UL_DEFAULT_ENABLE modifies $enable_<name> according to the global
--enable-all-programs. This makes sense only for programs, but not for
any built-in code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-03 13:42:40 +02:00
Karel Zak 4cb6fea5cc build-sys: add --disable-widechar
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-03 13:41:51 +02:00
Karel Zak 1eb16fd780 build-sys: add --disable-plymouth-support
The plymouth support depends on Linux specific SOCK_* flags and all
the feature is probably unnecessary in some cases (non-plymouth
distros, etc.)

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-05-26 15:08:53 +02:00
Sami Kerola cf582a2e86
build-sys: test functions does not return void
Found using scan-build.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-19 21:27:54 +01:00
Karel Zak e778642a9e libmount: don't support /etc/mtab by default
The file mtab is evil and already unused by mainstream distributions.

Now libmount is able to detect mtab->/proc/mounts and use
/proc/self/mountinfo if necessary. This heuristic seems overkill in
many cases. It's also dangerous on systems where mountinfo is strongly
required (systemd based distros).

This patch #ifdefs mtab code and forces libmount to always use
/proc/self/mountinfo.

The new configure option --enable-libmount-support-mtab is necessary
to enable old behavior to support mtab.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-04-14 14:26:54 +02:00
Ruediger Meier 3e584e8576 build-sys: add --enable-libuuid-force-uuidd
To build libuuid with uuidd support even though the daemon is
disabled (--disable-uuidd).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-04-14 12:56:12 +02:00
Karel Zak 44338f7fe6 build-sys: release++ (v2.28)
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-04-12 12:33:03 +02:00
Mike Frysinger 801afcb09b build-sys: fix cap-ng configure flag handling
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-12 11:33:15 +02:00
Ruediger Meier 50e6f15bb3 build-sys: add --disable-logger and --disable-lslogins
Now we are able to disable all programs which have systemd/journald
support. This feature is needed by openSUSE packagers who are building
util-linux in 2 stages to avoid build cycles.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-04-06 13:46:34 +02:00
Karel Zak 30fbf2f679 getopt: make sure setprogname provided by non-Linux system
based on suggestion from Ruediger Meier.

Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-04-04 10:41:37 +02:00
Karel Zak 50359e9794 build-sys: happy new year...
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-29 12:52:15 +02:00
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
Ruediger Meier 651b25cd7f build-sys: improve uuidd and script build conditions
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:16 +01:00
Ruediger Meier 18336d16d9 build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:09 +01:00
Ruediger Meier 9dd55a048e build-sys: add missing "not found" strings
Otherwise configure output looks like this:
  configure: WARNING:  not found; not building cfdisk

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:06 +01:00
Ruediger Meier 544d406921 build-sys: fix again UL_SCANF_TYPE_MODIFIER
This reverts commit c8494d88:
  "build-sys: fix UL_SCANF_TYPE_MODIFIER for icc"

plus fix the check prog, because it found "%as" to be valid on
systems where "%a" is used for float conversion.

icc warns about "%ms" but it works anyways. Our AC_RUN_IFELSE prog
should do it right now regardless of compiler warnings.

Note "%ms" is POSIX.1-2008 standard but still not available on
many systems. Maybe it's time to remove "%as" fallback for old
glibc which is even less portable.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:57 +01:00
Karel Zak 8c97556ecf build-sys: release++ (v2.28-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-11 11:41:05 +01:00
Ruediger Meier dc0495166f build-sys: add and use openat build conditionals
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-07 15:37:25 +01:00
Ruediger Meier 4d751c008e lib: provide fallback if mkostemp(3) missing
It's missing on OSX.

CC: Yuriy M. Kaminskiy <yumkam@gmail.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:05:18 +01:00
Ruediger Meier ee20c303ac build-sys: chrt requires a sched_set* function
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:05:15 +01:00
Ruediger Meier 42a4a15250 build-sys: add --disable-ipcrm --disable-ipcs
ipcs's source history looks like some people are using it on BSD
but it won't build on most non-Linux systems. That's why it's nice
let "./configure --disable-ipcrm --disable-ipcs" work.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:05:11 +01:00
Ruediger Meier d00c10edb8 build-sys: disable login-utils if shadow.h or utmp.h is missing
Actually we could have also used UL_REQUIRES_LINUX because our
utmp usage and the shadow.h header is unlikely to be portable.
However only requiring these headers may help others who are
curious what needs to be done to port something.

Note, we could easily make the utmp stuff more portable by using
utmpx which is POSIX standard and on LINUX (glibc) basically just
renaming work. See getutxent(3).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:05:08 +01:00
Ruediger Meier c12fc5e1cd build-sys: build_init should check for flock
To let a plain ./configure work on systems without create_timer().
see 254743e4

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:05:03 +01:00
Ruediger Meier eaac9f88f9 misc: fix some includes
features.h:  any glibc header includes this already
libgen.h:    was unused there
sys/uio.h:   for writev(3p)
sys/queue.h  seems like it was never used

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:04:56 +01:00
Ruediger Meier 2013b33f40 build-sys: disable unused parameter warnings for some test progs
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-23 03:20:22 +01:00
Romain Naour 7944a03cef build-sys: fix typo
When timer_create is available have_timer must be
set to "yes". But instead have_time is used.

Replace have_time by have_timer.

Fixes:
http://autobuild.buildroot.net/results/993/9935cd0522d4f978ba2e788a690f66790686b76b

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2016-02-22 09:50:22 +01:00
Ruediger Meier ac1c53e451 lib: fix ismounted includes for FreeBSD
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 16:54:32 +01:00
Ruediger Meier 66daee0765 include: check for sys/sysmacros.h
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 16:54:17 +01:00
Ruediger Meier 40733239a7 include: provide MAP_ANONYMOUS on OSX
Hope there are no side effect when defining _DARWIN_C_SOURCE
globally.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 16:54:05 +01:00
Ruediger Meier 3719bf8de9 build-sys: check linker support for version scripts
The macro AX_CHECK_VSCRIPT was taken from gnu autoconf archive.
http://www.gnu.org/software/autoconf-archive/

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 12:53:48 +01:00
Filipe Brandenburger 324330aca6 build-sys: Properly order install dependencies of pylibmount
Introduce a dependency so that libmount.so is installed before
pylibmount.so, so that when libtool tries to relink it, it can find
libmount.so in the destdir.

We introduce this additional make rule through an AC_SUBST variable, to
prevent automake from trying to interpret that.  This trick has been
suggested in http://stackoverflow.com/a/8643550.

This fixes a failure of `make install DESTDIR=...` when trying to relink
pylibmount against libmount.la.  libtool will look for libmount.so under
${DESTDIR}/${libdir} in that case, but if it is not yet present there,
libtool assumes it is a system installed library and use -lmount
instead, which causes the following failure if libmount is not installed
on the base system yet:

  libtool: install: warning: relinking `pylibmount.la'
  libtool: install: (... libtool --mode=relink gcc -o pylibmount.la \
        -rpath /usr/lib/python2.7/dist-packages/libmount \
        libmount/python/*.lo libmount.la ... -lpython2.7 \
        -inst-prefix-dir /path/to/destdir)
  /usr/bin/ld: cannot find -lmount
  collect2: error: ld returned 1 exit status
  libtool: install: error: relink `pylibmount.la' ...
  make[3]: *** [install-pylibmountexecLTLIBRARIES] Error 1

This seems to be a previously encountered issue, since automake includes
a hack to insert such a dependency rule to install all libLTLIBRARIES
before attempting to install binPROGRAMS, initially introduced in the
commit below:
http://git.savannah.gnu.org/cgit/automake.git/commit/?id=bd4a1d5ad1a72fa780a8b7fd6c365a5dad2e6220

Also related bug from Ubuntu tracker:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1442076

Tested that `make install` starts working again after this commit, even
when libmount-dev is not installed on the system.  Also confirmed that
`make distcheck` is now functional.

Confirmed that the all the files expected in the Python directory (both
__init__.py and pylibmount.so) are present after an install.

Tested that parallel install works, the dependency is always respected
since it's explicit.

Inspected the generated Makefile and confirmed that the definition of
install-pylibmountexecLTLIBRARIES (generated by automake) and the
explicit dependency we introduced are both present.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2016-02-05 11:03:09 -08:00
Lada Trimasova bf6be9f523 buildsys: fix static configuration and building
In case of uClibc librt depends on libpthread. In particular
timer_create() function uses pthread_XXX(). That means in case of static
builds it's required to link not librt alone but together with libpthread. So
if checking timer_create function in librt fails, it is necessary to check if
timer_create function successfully links with "-lpthread".

That issues was spotted in Buldroot autobuilder failures:
http://autobuild.buildroot.net/results/759/75960db671807091fe9155aee9e46a6245e32590/
http://autobuild.buildroot.org/results/112/112e8b85783f5aaba42a937a6eb064317615a21b/

Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
2016-01-26 18:34:50 +03:00
Karel Zak 5a9713293d libmount: consolidate btrfs stuff, make it more portable
- add --with-btrfs (enabled by default)
- check for linux/btrfs.h
- add "btrfs" to libmount features list (see mount -V)
- #ifdef HAVE_BTRFS_SUPPORT for all btrfs stuff in libmount

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 14:39:13 +01:00
Sami Kerola b4566a8a8d build-sys: remove libtermcap support
It is unlikely anyone is going to build this project on system where
libtermcap is available.  Fedora project obsoleted libtermcap 2007-12-12 in
favour of ncurses.  Debian made same move 2005.

Reference: https://fedoraproject.org/wiki/Deprecated_packages
Reference: https://www.debian.org/doc/manuals/debian-faq/ch-compat.en.html#s-termcap
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-01-26 11:45:14 +01:00
Karel Zak 2f09ae9d5d libsmartcols: add samples directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-25 13:17:43 +01:00
Karel Zak 15167589fb chrt: use sched_setattr() if available
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 12:44:27 +01:00
Karel Zak f07a82c9d8 build-sys: fix typo and more all RT to the same place
typo : s/timer_createx/timer_create/

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-08 11:52:13 +01:00
Sukadev Bhattiprolu bd9b94d12a lscpu: Print physical cpu information
lscpu currently prints information for CPUs configured in the system.
In case of KVM or other virtualized guest operating systems, this
refers to the virtual system, and bears no relation to the physical
topology of the system.

It would be useful if lscpu could also display the physical topology
info when available:

	$ ./lscpu
	Architecture:          ppc64le
	Byte Order:            Little Endian
	CPU(s):                16
	On-line CPU(s) list:   0-15
	Thread(s) per core:    1
	Core(s) per socket:    1
	Socket(s):             16
	NUMA node(s):          1
	Model:                 IBM pSeries (emulated by qemu)
	Hypervisor vendor:     KVM
	Virtualization type:   para
	L1d cache:             64K
	L1i cache:             32K
	NUMA node0 CPU(s):     0-15
	Physical sockets:      2		<<< New
	Physical chips:        4		<<< New
	Physical cores/chip:   4		<<< New

For now, physical topology information is available on platforms that
support the following RTAS (Real time abstraction service) call provided
by librtas:

	rtas_get_sysparm(PROCESSOR_MODULE_INFO).

Currently this call is available to the PowerVM (pHYP) guests on PowerPC.
With a patch propoosed to PowerKVM, this RTAS call would also be available
to PowerKVM guests.

Based on input from Nishanth Aravamudan and Karel Zak.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
2015-12-02 11:33:58 +01:00
Karel Zak 8a2045620e lsns: new command
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-26 14:09:45 +01:00
Casper Ti. Vector e52b58e627 ctrlaltdel: use reboot() provided by libc, assuming it is 1-adic. 2015-11-19 12:07:04 +01:00
Karel Zak b0e6b25e64 build-sys: bump also PACKAGE_VERSION_RELEASE number
Now we bump only PACKAGE_VERSION_MAJOR and PACKAGE_VERSION_MINOR
numbers. The PACKAGE_VERSION_RELEASE is always zero.

These numbers are used for LIBxxx_VERSION strings and Version: field
in the .pc files.

Unfortunately, if we keep PACKAGE_VERSION_RELEASE= always zero then
our bugfix releases are invisible for pkg-config.

(Although I don't think it's good idea to depend in code on any
 library bugfix release, code should be about APIs).

Addresses: https://github.com/systemd/systemd/pull/1754
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-04 17:19:41 +01:00
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
Karel Zak 9c1f9dd3a0 sfdisk: implement --list
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-07 14:55:30 +02:00
Karel Zak 473c5fb86c libmount: fix mnt_is_readonly() #ifdef
This issue affects util-linux portability to GNU/HURD

Reported-by: Pino Toscano (from Red Hat)
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-07 13:41:40 +02:00
Karel Zak 286f1e229b Merge branch 'misc' of git://github.com/kerolasa/lelux-utiliteetit
* 'misc' of git://github.com/kerolasa/lelux-utiliteetit:
  textual: share crypt() error message in sulogin and newgrp
  newgrp: avoid use of obsolete getpass() function
  newgrp: use libc function to read gshadow if it is available
  setarch: use personality() system call when it is available
  setarch: reindent code
  hwclock: remove referal to deprecated keyboard interface
  eject: make open_device() and select_speed() to use struct eject_control
  eject: add struct eject_control to remove global variables
  mountpoint: simplify if statement
  mkfs.minix: fix couple compiler warnings
  mountpoint: add struct mountpoint_control
  last: improve code readability by renaming variable names
  last: make is_phantom() when kernel config does not include audit support
  lib: remove xgetpass()
  include: simplify fputc_careful() in carefulputc.h
  libuuid: add extern qualifiers to uuid/uuid.h system header
2014-09-22 14:55:37 +02:00
Andreas Henriksson 53e8c16e14 build-sys: build libmount everywhere
This enables libmount to build on non-linux, which also
means we can build fsck on non-linux again.
(Since the context part of libmount still needs porting,
building the mount utility has instead been restricted
to only build on Linux.)

This has been build-tested on Debian GNU/kFreeBSD.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2014-09-22 12:54:10 +02:00
Sami Kerola c829aebc39 newgrp: use libc function to read gshadow if it is available
The glib versionf of getsgnam() is using /etc/nsswitch.conf, allowing the
group passwords to come from external database.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-09-19 19:31:02 +01:00
Karel Zak 8026fa9bc7 build-sys: use -lutil for BSD only
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-17 10:56:46 +02:00
Karel Zak d44115f3b5 libfdisk: remove dependence on libsmartcols
It's application business to convert libfdisk_table to string.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-13 10:10:11 +02:00
Christoph Junghans b2b61efcfa build-sys: fix double prefix with explict --libdir
* with configure --prefix=$HOME --libdir=$HOME usrlib_execdir
  ends up being ${exec_prefix}/${libbir}, which is double-prefixed

* fix: use explict given ${libbir} if is matches ${prefix}/*

Signed-off-by: Christoph Junghans <ottxor@gentoo.org>
2014-08-01 11:42:25 -06:00
Karel Zak 0624d8406b zrmactl: add new command to control /dev/zramN devices
Co-Author: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-01 12:09:55 +02:00
Stef Walter 6443dd43da agetty: Reprompt and reprint /etc/issue when asked
Add an 'agetty --reload' command which asks all running agetty
commands to display their prompts again.

Several of the /etc/issue escape codes such as \4 and \S depend on
variable data which can change after the agetty prompt is displayed.
This can cause stale data to be displayed when a user looks at a VT,
especially in cases of DHCP racing with system start up.

We never want this to occur once the user has started typing a
user name. So we detect when the user starts typing, after which
no further reprompting occurs after that point.

[kzak@redhat.com: - add #ifdefs to make it usable on non-inotify systems,
                  - use futimens() with NULL timespec
                  - add --reaload to usage()]

Signed-off-by: Stef Walter <stefw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-28 16:33:33 +02:00
Karel Zak d79654f43d build-sys: add -Wimplicit-function-declaration to compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-28 12:26:17 +02:00
Andreas Henriksson 5cbbdfbfe8 build-sys: fix switch_root/pivot_root cut-n-paste error in configure.ac
The "linux only" check for pivot_root seems to suffer from
a cut-n-paste problem from the earlier switch_root part.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2014-07-24 12:13:06 +02:00
Karel Zak 1687d0a028 build-sys: release++ (v2.25)
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-22 11:12:05 +02:00
Benno Schulenberg 5c0b406deb build-sys: harmonize some indentation
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-17 14:00:53 +02:00
Karel Zak 8b9d1474a4 build-sys: release++ (v2.25-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-07-02 11:40:19 +02:00
Samuel Thibault 88e0f3df66 build-sys: fixes for non-Linux systems
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-19 10:35:23 +02:00
Karel Zak 2ad2196349 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>
2014-06-19 10:30:56 +02:00
Karel Zak 4ee839dfe2 build-sys: release++ (v2.25-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-18 14:40:28 +02:00
Ruediger Meier f8d75a6647 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>
2014-06-10 20:20:35 +02:00
Ruediger Meier 91c520bc9b 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>
2014-06-10 13:41:11 +02:00
Karel Zak 7556c9443a cfdisk: resize UI on SIGWINCH
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-05 14:32:51 +02:00
Karel Zak 4c54effbf7 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>
2014-06-04 13:43:15 +02:00
Karel Zak da0ec90b48 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>
2014-06-04 11:16:48 +02:00
Karel Zak 569ff0d3b2 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>
2014-06-02 11:21:35 +02:00
Karel Zak 13985252bb build-sys: fix typo, set HAVE_LIBUUID
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-28 10:05:22 +02:00
Karel Zak 9a4e9c9d54 build-sys: enable chfn and chsh by default
The util-linux version (is the best:-) uses libuser,
so it usable for non-local users (LDAP, etc.).

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-28 09:57:55 +02:00
Karel Zak 7477f356cb build-sys: add missing dependencies to libsmartcols
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-27 14:58:34 +02:00
Karel Zak 08b1c21942 build-sys: add --disable-all-programs
This is necessary to build only explicitly specified program/library,
for example to build only libblkid.so

   ./configure --disable-all-programs --enable-libblkid

or to build only hwclock(8):

   ./configure --disable-all-programs --enable-hwclock

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-27 11:34:15 +02:00
Ruediger Meier 0f918ac197 build-sys: fix typo, sparc vs spark (62b2c024)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-23 15:17:01 +00:00
Ruediger Meier 4c838e6c0f build-sys: fix typo, look vs loop (1b15cbd1)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-05-23 11:10:53 +00:00
Karel Zak cb45354ec6 build-sys: add BUILD_{COL,COLCRT,COLRM,COLUMN,HEXDUMP,REV,TAILF}
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 14:09:43 +02:00
Karel Zak 3f91b9902b build-sys: add BUILD_{SCRIPT,SCRIPTREPLAY}
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 13:58:03 +02:00
Karel Zak 205dbb7a6c build-sys: add BUILD_ vars for all Linux-only utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 13:53:44 +02:00
Karel Zak d6ace0b8dd build-sys: add BUILD_CHRT
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 13:35:01 +02:00
Karel Zak 3adaaa154e build-sys: add BUILD_GETOPT
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 13:26:56 +02:00
Karel Zak 15a2c74163 build-sys: add BUILD_{BLKID,FINDFS,WIPEFS,FINDMNT}
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 13:24:21 +02:00
Karel Zak 1b15cbd149 build-sys: add BUILD_{UUIDGEN,CAL,LOGGER,LOOP,MCOOKIE,NAMEI,WHEREIS}
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 13:14:48 +02:00
Karel Zak 62b2c02421 build-sys: add UL_EXCLUDE_ARCH()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 12:57:13 +02:00
Karel Zak ecc6047ecd build-sys: add BUILD_{SFDISK,BLOCKDEV,MKSWAP,IOSIZE,MKFS}
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 12:34:34 +02:00
Karel Zak 3d9fdac5ea build-sys: add --disable-minix
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 12:13:12 +02:00
Ondrej Oprala ab1cfad5b7 lslogins(1): skeleton and argparsing for a new utility
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-05-15 13:55:59 +02:00
Sami Kerola 198556b76c cytune: remove from util-linux
Assumption is there are not many who need this tool.  Whom ever they
might be the recommendation is to use the command from old util-linux
release.  Second reason to removal is difficulty to test hardware
specific command when none of the active project members does not seem to
have such.  Basically the command has reached dead end what comes to
maintainability of it.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-05-12 13:06:59 +02:00
Karel Zak 81ed13edf8 Revert "build-sys: gettexts 0.18 -> 0.18.2 due to MKDIR_P"
This reverts commit 0576dbd3ea.

There is two possible ways:

 1/ autotools complains that gettext 0.18 uses deprecated macro
 2/ users complain that 0.18.2 is too new and they cannot rebuild

We care about users and project contributors, so let's live for the
next util-linux release with the old stupid gettext 0.18.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-09 14:27:26 +02:00
Karel Zak ebff016a19 build-sys: consolidate systemd support
* systemd (since v209) uses only one library (when compiled
   without --enable-compat-libs)

 * all systemd build-sys stuff is merged into HAVE_SYSTEMD
  (automake) and HAVE_LIBSYSTEMD (C macro) now

 * all is controlled by --with-systemd, default is to automatically
   check for systemd libs

 * no more --enable-socket-activation and --enable-journald

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-09 12:23:30 +02:00
Karel Zak 9c7955dabe libfdisk: make qsort_r() optional
The function is no critical for fdisk functionality. The SUN label
verification will check for less issues. All the verification code is
optional ('v' fdisk command).

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-04 16:02:35 +02:00
Karel Zak 2a49c0165d build-sys: small fixes to libsmartcols
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-04 11:25:08 +02:00
Ondrej Oprala baa3b270ec Use libsmartcols in libfdisk and cfdisk
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-04-03 12:29:18 +02:00
Ondrej Oprala 1d90bcb1a8 libsmartcols: documentation
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-04-03 12:29:18 +02:00
Karel Zak 2a965b804a libsmartcols: add function to convert table to string
Note that open_memstream() is POSIX-1.2008, so it's possible than not
all libc have already implemented this function.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:17 +02:00
Ondrej Oprala 1a4d989e22 libsmartcols: add basic files
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:15 +02:00
Karel Zak 0576dbd3ea build-sys: gettexts 0.18 -> 0.18.2 due to MKDIR_P
The autopoint is designed to not use the latest installed bug fix
release, if you specify

	AM_GNU_GETTEXT_VERSION([0.18])

in your configure.ac then it really uses 0.18, rather than also
installed 0.18.2 or 0.18.3. It means that bug fix update has no any
effect. Oh...

The AM_PROG_MKDIR_P is deprecated for years, unfortunately still used
in 0.18 gettext m4 stuff. This problem should be fixed in 0.18.2 where
is the correct AC_PROG_MKDIR_P macro.

If you do not have gettext 0.18.2 (or 0.18.3) then update.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 10:30:22 +01:00
Karel Zak f1512be8a5 cfdisk: fix slang usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 11:35:15 +01:00
Karel Zak 65acdc8734 build-sys: remove deprecated-mount/
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-05 13:19:19 +01:00
Sami Kerola 4b670c01df logger: allow user to send structured journald messages
This feature is hopefully mostly used to give MESSAGE_ID labels for
messages coming from scripts, making search of messages easy.  The
logger(1) manual page update should give enough information how to use
--journald option.

[kzak@redhat.com: - add missing #ifdefs
                  - use xalloc.h]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-04 13:44:21 +01:00
Karel Zak 7b040214b5 build-sys: fstrim depends on libmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-17 15:01:49 +01:00
Sami Kerola ea45d34c7c uuidd: use pkg-config to find systemd-deamon support
[kzak@redhat.com: - remove USE_SOCKET_ACTIVATION and use
                    HAVE_* as we use for another libs]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07 12:17:37 +01:00
Benno Schulenberg e3e16717ec po: add '--no-wrap' to msgmerge, to not wrap long message lines
This avoids unneeded churn during POT-file renewal and PO-file updates,
as the PO files at the TP are made with '--no-wrap'.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Acked-by: Sami Kerola <kerolasa@iki.fi>
2014-01-06 08:33:12 +01:00
Karel Zak b8095d25ba libmount: remove smackfs* option when SMACK not enabled
If there is no /sys/fs/smackfs then libmount removes smackfs*= mount
options when compiled --with-smack.

Note that we do the same for SELinux.

References: http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg13740.html
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-12 15:07:12 +01:00
Karel Zak bad3c52f0b build-sys: release++ (v2.24)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-21 14:46:27 +02:00
Karel Zak b88e6b027c build-sys: fix tinfo congitional
Reported-by: Andrej Ota <andrej@ota.si>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-14 10:18:46 +02:00
Karel Zak 1779474605 build-sys: fix {lib,sbin}dir paths
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-14 09:51:09 +02:00
Karel Zak e6ce04c74b build-sys: release++ (v2.24-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-11 13:11:45 +02:00
Karel Zak ccf92e6db7 build-sys: use tinfo *or* ncurses for more(1), ul(1) and setterm(1)
* it seems that we don't have to link the utils with ncurses, tinfo is enough.
   This change saves one unnecessary dependence.

 * libtinfo is also distributed with pkg-config files, so we can use
   PKG_CHECK_MODULES() as a primary source for LIBS and CFLAGS.

 * add TINFO_CFLAGS (although it's probably always empty)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-04 13:28:37 +02:00
Michael Forney b09bc5088b build-sys: Check for type sighandler_t and use if present
__sighandler_t is libc implementation specific and should not be relied
upon. Instead, we fall back upon void (*)(int), as specified by POSIX.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-04 11:51:34 +02:00
Michael Forney 00c505d9cf include: Add missing includes
sys/types.h: For u_char typedef
sys/params.h: For MAXNAMLEN
sys/ttydefaults.h: For various tty definitions (also add configure check)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-04 11:51:21 +02:00
Michael Forney 695e4e1a98 build-sys: Use _POSIX_VERSION to determine support for %m
%m is included in POSIX 2008, so we can check if the libc implements
that before failing.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-04 11:50:33 +02:00
Sami Kerola 0b567ae550 build-sys: simplify python detection
This allows './configure --enable-most-builds' and 'make distcheck' to
work when both python2 and python3 are installed, and user has set python
version preference using symlink and PATH order.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-09-30 13:41:09 +02:00
Mike Frysinger 2b8f22bd90 clean up term lib handling
The ncurses package has been providing pkg-config files for a while now.
So let's start using them to get the proper linker & compiler flags.  It
can make a difference when ncurses is configured in a way that requires
extra link time flags but util-linux doesn't provide them, or when the
headers live in a weird place and util-linux can't find them.

Since the NCURSES_LIBS is always defined for the Makefile, there's no need
to gate on the HAVE_NCURSES conditional.  When it's disabled, the var will
simply be empty.

With a minor tweak to how tinfo is handled, we can do the same thing -- we
just always use TINFO_LIBS in the Makefile's.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-30 13:41:07 +02:00
Karel Zak 88407b9321 nologin: add new command
Currently it's maintained as distro specific (or people use impolite
/bin/false way).

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-30 13:36:26 +02:00
Karel Zak 9ef14b45c3 build-sys: release++ (v2.24-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-27 14:34:41 +02:00
Karel Zak 6073251ca8 build-sys: one install dir for all pylibmount stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-27 14:23:38 +02:00
Karel Zak d924b10b94 build-sys: fix static builds
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-27 12:03:33 +02:00
Karel Zak 3745d4a94d build-sys: fix ${prefix} usage, be more verbose about py paths
- incorrect ${prefix} and ${exec_prefix} usage in AC_CASE
   (bug introduced by commit 9f57e6e8)

 - disable python by default (you have to use --with-python)

 - add python paths to the finale ./configure info message

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-26 13:15:10 +02:00
Karel Zak 808c876512 build-sys: install to the correct python dirs
It seems we have to call AM_PATH_PYTHON() monster to get
pyexec (shared libs) and python (scripts) directories.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-26 12:55:30 +02:00
Karel Zak 8e5c467500 build-sys: support --with-python[={2,3}]
* we use pkg-config to get CGLAGS and LIBS, use package specific
   config (e.g. python-config) is non-sense.

 * default is to follow distribution and use pkg-config module name
   "python". This is probably symlink to python2.pc or python3.pc.

 * --with-python=2 forces to pkg-module "python2 >= 2"

 * --with-python=3 forces to pkg-module "python3 >= 3"

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-20 12:42:45 +02:00
Sami Kerola 918785dd1f build-sys: pylibmount will not work when python3 is present
While compiling with up to date Archlinux I notice the recently added
pylibmount does not link correctly.  Failures inform fundamental types
such as PyFileObject and PyFile_Type being missing.

It seems automake AM_PATH_PYTHON will prefer the python in path, which
for this distribution right now is python3.  As some sort of go-around
one can install older python, and symlink it to earlier in PATH lookup.

$ ln -s /usr/bin/python2 $HOME/bin/python
$ export PATH=$HOME/bin:$PATH

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-29 18:14:06 +01:00
Karel Zak 03d00d495f build-sys: add CFLAGS and LDFLAGS for daemons and shared libs
This is necessary for paranoid security guys who believe that things
like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the
world a safer place...

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-27 11:49:01 +02:00
Karel Zak d78df0ac65 build-sys: add pylibmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 14:57:21 +02:00
Karel Zak 7f1fe74248 build-sys: remove deprecated elvtune command
The command is deprecated for years and useless with 2.6.x kernels.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-13 15:55:52 +02:00
Karel Zak 1cc62b3538 build-sys: enable mesg(1) by default
It seems that our mesg(1) implementation is compatible with sysvinit,
let's use it by default in mainstream distros.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-13 14:11:12 +02:00
Karel Zak 4d1d1233f4 last: clean up the begin of the file
.. and improve last(1) stuff in configure script.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-12 12:26:03 +02:00
Ondrej Oprala ce60272039 last: merge sysvinit last/lastb
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-12 12:07:52 +02:00
Sami Kerola c8498f2fad build-sys: use backticks rather than $() for commands in configure
The configure had both backticks and $() in use.  These command
susbstitutions are mutually interchangeable, so one should pick only one
form.  In this case backticks were favored because they are known with
greater range of shells, making the backticks to be more portable.

References: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Shell-Substitutions.html#index-g_t_0024_0028_0040var_007bcommands_007d_0029-1632
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-01 13:35:38 +02:00
Sami Kerola 3013eb9dc0 build-sys: prefer AS_IF rather than shell 'if'
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-01 13:35:36 +02:00
Sami Kerola 9f57e6e849 build-sys: prefer AS_CASE rather than shell 'case'
References: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Builtins.html#case
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-01 13:35:30 +02:00
Sami Kerola 034d378b23 build-sys: use m4 quoting consistently
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-01 13:35:28 +02:00
Sami Kerola f29a3d1868 setarch: prefer preprocessor rather than autotools check
It seems to be pointless to spend time in ./configure phase when
preprocessor has to perform #ifndef check anyway.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-01 13:35:26 +02:00
Gilles Espinasse 34228e6972 util-linux minor typo fixes
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2013-05-21 11:38:35 +02:00
Karel Zak bdd384d10d build-sys: always check for setns() and unshare() libs functions
$ ./configure --disable-unshare
 $ make nsenter

  CC       sys-utils/nsenter.o
In file included from sys-utils/nsenter.c:36:0:
./include/namespace.h:31:19: error: static declaration of ‘unshare’ follows non-static declaration
In file included from /usr/include/sched.h:42:0,
                 from sys-utils/nsenter.c:23:
/usr/include/bits/sched.h:86:12: note: previous declaration of ‘unshare’ was here
make: *** [sys-utils/nsenter.o] Error 1

We have to always check for the libc function independently on
--disable-{unshare,nsenter} to avoid collision between local and libc
declarations.

Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-21 11:32:29 +02:00
Karel Zak 7697771d8f build-sys: use -Wno-clobbered for some BSD crap
* extend UL_WARN_ADD() for accept non-default CFLAGS variable
 * add BSD_WARN_CFLAGS with -Wno-clobbered
 * use all this for pg(1) and more(1)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-07 09:50:22 +02:00
Karel Zak d78d040933 build-sys: add --disable-setterm
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-26 13:47:54 +02:00
Karel Zak d80aa81d6f build-sys: release++ (v2.23)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-25 11:53:41 +02:00
Karel Zak 0bcdf7e1a2 build-sys: use 'check' for all utils with dependencies
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-25 09:26:43 +02:00
Samuel Thibault 8867ac208a build-sys: fix non-linux build
Make enabling fdformat depend on being a linux build.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2013-04-25 09:23:40 +02:00
Karel Zak 6e93c52fbb build-sys: use pkg-config results for libuser
Our code depends on libuser >= 0.58, it's better to completely rely on
pkg-config results rather than also call UL_CHECK_LIB (that overwrites
previous pkg-config have_user= result independently on libuser
version).

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 10:50:30 +02:00
Karel Zak e1b8ba200b build-sys: fix UL_REQUIRES_HAVE
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 10:19:35 +02:00
Karel Zak 48469f9086 fdisks: fix compiler warning
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 17:35:47 +02:00
Karel Zak 6cd4beac3d build-sys: fix nsenter requirements
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 17:05:48 +02:00
Karel Zak e38f35d34e build-sys: release++ (v2.23-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 23:38:06 +02:00
Karel Zak 8d6f0baee9 build-sys: add --disable-fdformat
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 23:03:20 +02:00
Karel Zak 6acf31ac5c build-sys: add --disable-hwclock
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:57:27 +02:00
Karel Zak 834fc88cd4 build-sys: add --disable-bfs
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:38:54 +02:00
Karel Zak 78cdc25415 build-sys: add --disable-cytune
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:27:31 +02:00
Karel Zak ece777e9de build-sys: add --disable-bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 15:54:31 +02:00
Sami Kerola 9cc36e9fdf bash-completion: add bash completetion configure option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-03-30 10:17:49 +00:00
Karel Zak fb5a24e50a build-sys: release++ (v2.23-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-22 12:34:28 +01:00
Karel Zak 2771954b53 build-sys: keep libuser optional
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-22 12:33:27 +01:00
Karel Zak eb6a03f3bf build-sys: set dependence fdisk -> libfdisk -> libuuid
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 15:34:24 +01:00
Karel Zak ec1204dc61 build-sys: lslocks depends on libmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 13:13:23 +01:00
Karel Zak 1f6ec24ce5 build-sys: don't use libs from pkg-config from libuser
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 13:12:52 +01:00
Karel Zak 312f04f497 build-sys: check for security_get_initial_context()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-20 14:59:21 +01:00
Karel Zak 58a3cee647 chkdupexe: remove, deprecated for years
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-14 13:34:11 +01:00
Karel Zak 27abd80948 arch: remove the command, deprecated since 2.13, use coreutils version
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-14 12:22:11 +01:00
Karel Zak d48f6c5db8 Merge branch 'patch-1' of https://github.com/dtrebbien/util-linux
* 'patch-1' of https://github.com/dtrebbien/util-linux:
  Implement mempcpy() in terms of memcpy() if mempcpy() is unavailable
2013-02-20 13:07:07 +01:00
Sami Kerola 5564a8c77f build-sys: add package url to AC_INIT
See last line from './configure --help'.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-02-14 10:11:21 +01:00
Sami Kerola eaf701984d build-sys: use AC_USE_SYSTEM_EXTENSIONS
The AC_GNU_SOURCE is obsolete.

Addresses: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fGNU_005fSOURCE-2058
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-02-14 10:11:17 +01:00
Sami Kerola d6abf1685d build-sys: use AC_COMPILE_IFELSE
The AC_TRY_COMPILE is obsolete.

Addresses: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fTRY_005fCOMPILE-2203
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-02-14 10:11:13 +01:00
Karel Zak d86918b6eb chsh-chfn: fix bugs, improve compilation
* rename --disable-require-password to --disable-chsh-chfn-password

 * is_local() is really unnecessary when linked with libuser

 * fix set_value_libuser() returns codes

 * fix chfn.c, there is no 'pw', but oldf.pw

 * don't link with PAM when--disable-chsh-chfn-password

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-13 13:44:34 +01:00
Cody Maloney 7e4714f22b build-sys: Add flag for enabling/disabling libuser support.
Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
2013-02-13 09:17:34 +01:00
Cristian Rodríguez 075f4bfd34 build-sys: test for secure_getenv() too.
In current glibc versions, internal __secure_getenv
no longer exists and was replaced by secure_getenv()

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
2013-02-06 12:03:22 +01:00
Andy Lutomirski 5600c405d5 setpriv: run a program with different Linux privilege settings
This new command can set no_new_privs, uid, gid, groups, securebits,
inheritable caps, the cap bounding set, securebits, and selinux and
apparmor labels.

[kerolasa@iki.fi: a lot of small adjustment making the command to be good
fit to util-linux project]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
2013-02-05 10:35:33 +01:00
Daniel Trebbien 02887b73eb Implement mempcpy() in terms of memcpy() if mempcpy() is unavailable 2013-01-30 18:53:00 -05:00
Karel Zak 53b22add73 build-sys: add --disable-{more,ul,pg}
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-24 19:23:56 +01:00
Eric W. Biederman f8aa8e9495 nsenter: new command (light wrapper around setns)
Inspired by unshare, nsenter is a simple wrapper around setns that
allows running a new process in the context of an existing process.

Full paths may be specified to the namespace arguments so that
namespace file descriptors may be used wherever they reside in the
filesystem.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2013-01-17 13:17:13 +01:00
Sami Kerola 3a3dcbdc5a build-sys: cleanup --enable-most-builds list
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-10 11:28:13 +01:00
Dave Reisner 479d50bd65 build-sys: invert flag for sulogin emergency mount
This should be disabled by default.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2013-01-09 14:41:46 +01:00
Karel Zak 1a1eb4e188 include/bitopts: Use the operating system byteswapping functions
The swap macros are already in libc.

Co-Author: Cristian Rodríguez <crrodriguez@opensuse.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-08 14:07:48 +01:00
Sami Kerola 1342ffcbeb tunelp: deprecation: remove command from default build
It is difficult to think think tunelp command being in use a lot.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:48 +01:00
Werner Fink ab6478ef2d sulogin: mount temporary /dev and /proc if not found
This is very usefull if initrd can not loaded that is no /dev and no
/proc is found.  Also if the /etc/shadow and /etc/passwd is copied into
the initrd the sulogin can be used in initrd even before /dev and/or /proc
are mounted.

Signed-off-by: Werner Fink <werner@suse.de>
2012-12-18 15:45:33 +01:00
Karel Zak 2c6891154a build-sys: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-30 12:58:33 +01:00
Karel Zak 7e34c79f01 build-sys: use pkg-config for selinux
- we need libselinux 2.x (where is security_get_initial_context())
- the latest selinux versions are linked with -lpcre

Reported-by: Gregory Nietsky <gregory@distrotech.co.za>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-30 12:48:44 +01:00
Karel Zak e21e6d265d build-sys: cleanup cpu_set_t usage
- make taskset depend on cpu_set_t
 - make cpuset.c optional for libcommon and lib/path.c

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-02 12:07:36 +01:00
Sami Kerola dab8e8cfd4 build-sys: remove gethostbyname() check
Removed as unnecessary, there are no references to gethostbyname() in
code.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-22 10:15:29 +02:00
Sami Kerola 4cf02b6510 ddate: remove from util-linux
See RedHat bug for reasons why the ddate is cleaned up.  The reference is
where to get the command in future.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=823156
References: https://github.com/bo0ts/ddate
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 16:41:49 +02:00
Karel Zak df0bd828b1 build-sys: simplify usrlib_execdir initialization
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 18:09:28 +02:00
Karel Zak 10a42fb776 build-sys: fix --localstatedir heuristics
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-12 16:36:06 +02:00
Karel Zak 6cd3e35c77 Merge https://github.com/hramrach/util-linux 2012-09-10 11:17:53 +02:00
Karel Zak 7fcccbdfbe build-sys: add --disable-wdctl
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 14:19:17 +02:00
Michal Suchanek 3b4f1aeecc Fix configure to work with multiarch distributions. 2012-09-07 12:58:37 +02:00
Karel Zak 7ec6adb1cc runuser: new command (derived from su(1))
This command is based on su(1), the differences:

 - based on Fedora runuser su(1) patch
 - not installed with suid rights
 - allowed for root users only
 - don't ask for password
 - uses PAM session, for example:

$ cat /etc/pam.d/runuser
auth		sufficient	pam_rootok.so
session		optional	pam_keyinit.so revoke
session		required	pam_limits.so
session		required	pam_unix.so

$ cat /etc/pam.d/runuser-l
auth		include		runuser
session		optional	pam_keyinit.so force revoke
session		include		runuser

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 17:00:31 +02:00
Karel Zak 4e1073c23b build-sys: add configure summary
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
Karel Zak dcd33c3e15 build-sys: add another compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
Karel Zak 58e6e67ad5 build-sys: release++ (v2.22)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 14:57:28 +02:00
Karel Zak 123011de33 build-sys: release++ (v2.22-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-15 20:04:52 +02:00
Karel Zak b1b54edf95 build-sys: add -Wmissing-declarations, sort warning options
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-15 17:04:41 +02:00
Karel Zak d4baf92e50 build-sys: expand paths at make time
autoconf docs about *dir variables (e.g bindir):

 ... A corollary is that you should not use these variables except in
 makefiles...

 ...you should not rely on AC_CONFIG_FILES to replace bindir and friends
 in your shell scripts and other files; instead, let make manage their
 replacement.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-15 02:06:53 +02:00
Karel Zak 1b03e2cd33 tests: make compatible with autotools
The command 'make check' is called from 'make distcheck' (which is
used to generate official util-linux tarballs).

It means that tests/ stuff has to be compatible with autotools and
differentiate between source and build directories.

 * remove run-nonroot.sh (merged into run.sh
 * remove commands.sh.in
 * all tests and top level run.sh accept --builddir and --srcdir
   command line options
 * functions.sh modified to use $top_builddir/tests for output files

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-03 21:24:51 +02:00
Karel Zak 43ffdc82fa build-sys: don't compile lib{mount,blkid} tests when --disable-static specified
The tests often depend on private (non-API) library functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-02 20:19:14 +02:00
Petr Uzel c9b5346112 build-sys: fix description of utmpdump configure option
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-30 17:12:24 +02:00
Karel Zak 7770e7df15 build-sys: fix build without libs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-27 09:04:55 +02:00