Commit Graph

576 Commits

Author SHA1 Message Date
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