Commit Graph

548 Commits

Author SHA1 Message Date
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
Karel Zak 31de047692 build-sys: release++ (v2.22-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-27 00:09:42 +02:00
Karel Zak 9dc72d0bc2 build-sys: add -Wall to warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 10:13:08 +02:00
Karel Zak 4e80697552 build-sys: add -Werror to UL_WARN_ADD test
... so revert previous patches with extra options for clang.

Sometimes is simple solution so obvious that it's invisible :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:42:09 +02:00
Karel Zak bec5c9db87 build-sys: exclude some CC warnings for clang
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:16:15 +02:00
Karel Zak bdf5f542e2 build-sys: add UL_PROG_CLANG function, rename warnings.m4 -> compiler.m4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 15:48:43 +02:00
Sami Kerola 11935cd3fc uuidd: use configured run state directory in manual etc
[kzak@redhat.com: - minor clean up in configure.in]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:04:02 +02:00
Sami Kerola 07a16b9d1e build-sys: change --localstatedir to /run
Enable user to define where run state files are wrote.  Default for
these files is /run.  See reference for rationale why /var/run is no
longer the default.

Reference: http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 12:56:46 +02:00
Dave Reisner fbd2620d4e build-sys: ensure BUILD_CFDISK is always defined
This avoids an error when configuring without ncurses:

configure: error: conditional "BUILD_CFDISK" was never defined.
Usually this means the macro was only invoked conditionally.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-07-09 17:08:44 +02:00
Karel Zak ac11086af2 build-sys: add -Wredundant-decls
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 16:53:13 +02:00
Karel Zak 78d5ceacb1 utmpdump: new command, merge from sysvinit
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:34:46 +02:00
Karel Zak 31a938ac38 build-sys: enable libmount and libblkid docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak fb55280aa6 build-sys: remove include-Makefile.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak 50ea679509 build-sys: rename fdisk -> fdisks/, convert to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak ac73480a34 build-sys: convert tests/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak 957bab4e91 build-sys: move partx to disk-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:18 +02:00
Karel Zak 54dbc8cf69 build-sys: convert disk-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak f9a20f0b58 build-sys: move getopt to misc-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 37b88bfcd7 build-sys: convert misc-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak c7f753901f build-sys: move hwclock to sys-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 8772f8d7ee build-sys: convert sys-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak bafe1a75a3 build-sys: cleanup mount stuff in configure.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak 14a0cafb92 mount: (old) remove hybrid libmount code
The hybrid version with old mount and new mtab management from
libmount is not more supported.

Only two versions are supported:

  1/ old mount in mount-deprecated/, --enable-deprecated-mount

  2/ new sys-utils/mount.c, enabled by default

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak 434b07a090 build-sys: default to new sys-utils/mount.c, add --enable-deprecated-mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak d2feb47fb1 build-sys: convert mount/ to module, rename to mount-deprecated/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak ffeb280566 build-sys: convert login-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:46:17 +02:00
Karel Zak 22d2322eb1 build-sys: convert term-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:53:09 +02:00
Karel Zak bc94024d08 build-sys: convert libmount/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:49:37 +02:00
Karel Zak f77a4d1087 build-sys: convert libblkid/ to module
- create module
 - remove unused libblkid/src/tst_types.c test

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:44:15 +02:00
Karel Zak 3632ce21b7 build-sys: convert libuuid/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:37:37 +02:00
Karel Zak 5ed5df5d6e build-sys: convert schedutils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:25:24 +02:00
Karel Zak e0ef609e89 build-sys: convert lib/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:13:08 +02:00
Karel Zak 8365ed42ac build-sys: convert include/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:08:57 +02:00
Karel Zak 333034f6bc build-system: enable automake subdir-objects
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:07:56 +02:00
Sami Kerola 0e9b73d3fb build: fix redundant redeclaration warnings
env.c:24:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls]
su.c:81:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls]

fstab.c:581:14: warning: redundant redeclaration of 'strsignal' [-Wredundant-decls]

kill.h:1:13: note: previous declaration of 'get_pids' was here
kill.c:152:13: warning: redundant redeclaration of 'get_pids' [-Wredundant-decls]

kill.c:142:5: warning: redundant redeclaration of 'main' [-Wredundant-decls]
getopt.c:89:5: warning: redundant redeclaration of 'main' [-Wredundant-decls]

agetty.c:536:15: warning: redundant redeclaration of 'optarg' [-Wredundant-decls]
agetty.c:537:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
script.c:161:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
wall.c:96:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]

libmount.h:362:26: note: previous declaration of 'mnt_update_get_fs' was here
libmount.h:454:26: note: previous declaration of 'mnt_context_get_fs' was here
mountP.h:383:26: warning: redundant redeclaration of 'mnt_context_get_fs' [-Wredundant-decls]
mountP.h:398:26: warning: redundant redeclaration of 'mnt_update_get_fs' [-Wredundant-decls]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 19:51:35 +02:00
Karel Zak 0e60bc9b15 build-sys: add compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-06 12:10:41 +02:00
Karel Zak 71681ee5ec build-sys: move configure login options to one place
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-29 15:24:04 +02:00
Karel Zak cc76731e7d build-sys: add --enable-vipw
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-29 15:20:44 +02:00
Karel Zak aec9ecbd6c build-sys: add --enable-newgrp
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-29 15:15:38 +02:00
Karel Zak ff4c5555d0 build-sys: add --disable-su
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-29 14:54:06 +02:00
Karel Zak 2c8a3e168a build-sys: add --enable-chfn-chsh
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-29 14:41:01 +02:00
Karel Zak e7614a0780 build-sys: add --disable-login
... to implement fine-grained control on what is built from
login-utils.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-29 14:17:05 +02:00
Thomas Schwinge 5779004658 arch, eject, elvtune: Gracefully disable on non-Linux platforms.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
2012-05-29 09:33:09 +02:00
Thomas Schwinge c4ecde8144 kill, raw, rename: Don't explicitly enable for --enable-most-builds.
They're already dealt with in the default configuration.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
2012-05-29 09:33:05 +02:00
Thomas Schwinge 626e877354 kill: Check the correct variable when configuring.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
2012-05-29 09:32:33 +02:00
Petr Uzel 1b68c37927 uuidd: add systemd unit files
Add systemd unit files which use the socket activation mechanism
of systemd. The uuidd deamon is started upon first request on the
socket and quits after 1 minute of inactivity.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-05-04 15:14:16 +02:00
Petr Uzel bbe289c489 uuidd: implement --socket-activation option
Implement --socket-activation option, which is supposed to be used
with systemd (or equivalent init system) socket activation mechanism.
With this option, the UUID daemon does not create the socket on its own,
but instead expect the connection fd to be provided by the calling
process.

This option is only available if util-linux is configured with
--enable-socket-activation option. With this configure
option, the uuidd is compiled with sd-daemon.c.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-05-04 15:14:04 +02:00
Karel Zak 5b0289b9cf build-sys: add BUILD_WDCTL, check for linux/watchdog.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-04 11:45:35 +02:00
Sami Kerola 78288764e4 build-sys: determine availability of __fpending()
Needed to for making Cygwin more possible.

Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/5656
Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-23 14:26:23 +02:00
Bernhard Voelker 455fe9a075 Fix typos found by misspellings
The tool misspellings (https://github.com/lyda/misspell-check)
detected several typos. Command used:

  $ git ls-files | grep -v ^po/ | misspellings -f -

* isosize: Fix typo in usage string.
* configure.ac: Fix typo in help string of --enable-most-builds option.
* fdisk: Fix typo in man page.
* libblkid, blkid, mount: Likewise.
* Fix various typos in docs and in source code comments.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-04-23 13:16:35 +02:00
Karel Zak 4f469e588d Merge branch 'eject'
* eject: (47 commits)
  tests: use eject --force
  eject: use BUILD_EJECT, move to sys-utils
  eject: clean up usage()
  eject: clean up man page
  eject: add --force option
  eject: check for hotplug/removable attribute
  eject: remove obsolete code, use EXIT_* macros
  tests: add umount-by-eject tests
  eject: improve work with partitioned devices
  lib/sysfs: improve sysfs_is_partition_dirent()
  eject: call umount <mountpoint> rather than <device>
  eject: use libmount to detect if cdrom is mounted
  eject: make the code robust
  eject: use SG_IO ioctl for scsi
  eject: support CDIOCEJECT ioctl
  eject: new close_tray code from Fedora
  eject: new auto_eject code from Fedora
  eject: add -X from Fedora
  eject: add --manualeject from fedora
  eject: clean up devname usage
  ...
2012-04-05 15:58:28 +02:00