Commit Graph

209 Commits

Author SHA1 Message Date
Sami Kerola fd0f41321b build-sys: print helpful error when pkg.m4 is missing
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-03-08 13:37:25 +01:00
Sami Kerola 9c3c99e9bb build-sys: Enable automake's -Wno-portability option.
The util-linux depends on GNU make.

shlibs/blkid/src/Makefile.am:58: warning: `%'-style pattern rules are a GNU make extension
shlibs/mount/src/Makefile.am:62: warning: `%'-style pattern rules are a GNU make extension

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-03-08 13:37:20 +01:00
Sami Kerola 31c9c1c4c0 build-sys: introduce AM_PROG_CC_C_O macro
Fix to warning which will appear when using fairly new automake
(automake commit id fd22dca).

disk-utils/Makefile.am:31: warning: compiling `mkswap.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'

Reference documentation
http://www.gnu.org/software/hello/manual/automake/Public-Macros.html#index-AM_005fPROG_005fCC_005fC_005fO-296

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-03-08 13:37:18 +01:00
Karel Zak c0f20acb7a build-sys: add term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 13:54:05 +01:00
Karel Zak a1504d8bf5 kill: add -q sigval to use sigqueue(2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-28 17:15:40 +01:00
Fabian Groffen eb76ca98b0 build-sys: provide alternatives for err, errx, warn and warnx
Solaris lacks err, errx, warn and warnx.  This also means the err.h header
doesn't exist.  Removed err.h include from all files, and included err.h from
c.h instead if it exists, otherwise alternatives are provided.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-02-14 17:45:24 +01:00
Karel Zak 7f7126d749 build-sys: don't build lsblk on Linux without openat()
Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-11 09:42:49 +01:00
Karel Zak 69df550fe1 build-sys: release++ (v2.19)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-10 09:37:47 +01:00
Fabian Groffen a804f444eb provide a workaround if program_invocation_short_name is missing
Try some replacements, such as getexecname() on Solaris and __progname
on BSDs and Darwin.  When not found, base program_invocation_short_name
on the source filename it is used in, as not to require argv[0] to be
passed along.  This latter approach is not dynamic, but doesn't require
code changes for all places where program_invocation_short_name is used
now.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-31 15:51:06 +01:00
Karel Zak a2b3d04095 build-sys: enable lsblk and libmount for Linux only
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-31 14:18:46 +01:00
Karel Zak 539d14ec60 build-sys: release++ (v2.19-rc3)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-25 17:21:53 +01:00
Karel Zak e4764e8bb5 build-sys: release++ (v2.19-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-25 13:10:23 +01:00
Fabian Groffen d58c47d9a4 include: emulate dirfd when necessary
dirfd is not available on Solaris 10, it is available on latest
OpenSolaris releases though.  Do some autoconf trickery to determine if
providing an alternative dirfd function is necessary and possible.

shlibs/blkid/src/read.c: Do not define _XOPEN_SOURCE to 600, or DIR will
lose it's dd_fd member again.  Rearrange defines and includes to make
sense per comments, and not conflict on Solaris.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-23 22:17:14 +01:00
Karel Zak 2a1f429ad0 libmount: rename mount.h to libmount.h
The mount.h file name is too generic.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-22 00:27:26 +01:00
Fabian Groffen 0bf9d41da2 build-sys: check for paths.h
paths.h doesn't exist on Solaris

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-20 23:47:52 +01:00
Fabian Groffen 3edaa2019b make _IO macros available on Solaris
The _IO macro is defined in sys/ioccom.h on various platforms.  However,
on Solaris it isn't included by ioctl.h, so include it explicitly if
available.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-20 23:31:14 +01:00
Fabian Groffen 60cc9f9404 build-sys: link with socketlibs when necessary
To link an object which references socket functions, you need to link
with -lsocket -lnsl on Solaris.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-20 23:03:01 +01:00
Fabian Groffen 5be1c0330b build-sys: check for loff_t, it may not exist
On some systems, loff_t does not exist.  Define it as int64_t in that
case.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-20 22:40:58 +01:00
Fabian Groffen 0aeb57aca3 build-sys: improve check for crypt
Check for crypt.h existence, and use it if available over using unistd.h
for which a certain feature level has to be set to export a definition
for crypt.  On Solaris this set causes a standards conflict in the
headers, because at the time of this check C99 mode is already enabled,
which implies certain standards non-compatible with _XOPEN_SOURCE.

 92  #define _XOPEN_SOURCE
 93  #include <unistd.h>

configure:16259: gcc -std=gnu99 -c -g -O2  conftest.c >&5
In file included from /usr/include/unistd.h:18,
                 from conftest.c:93:
/prefix/gentoo/usr/lib/gcc/i386-pc-solaris2.10/4.4.5/include-fixed/sys/feature_tests.h:341:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"

configure.ac: improve crypt check
login-utils/my_crypt.h: replace old GNU_LIBRARY check with autoconf
define for crypt.h

[kzak@redhat.com: - remove my_crypt.h]

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-17 16:32:39 +01:00
Karel Zak 97073441e6 libmount: add mount(8) sample
This code is going to be used as mount(8) replacement in the next
major release (2.20). For now this mount(8) implementation does not
support loopdevs initialization.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-10 14:35:25 +01:00
Karel Zak 1d9aaca90c build-sys: release++ (v2.19-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-05 13:41:44 +01:00
Karel Zak 37ef0439da build-sys: add --enable-libmount-mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:47 +01:00
Karel Zak 5502d92b28 simpleinit: move old init stuff to separate directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-10 17:28:32 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak dc61d398ba lib: add fallback for nl_langinfo()
The fallback ignores locales and returns hardcoded static strings. It
should be enough to include "nls.h" to work with nl_langinfo() on all
systems.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 16:42:45 +01:00
Karel Zak f331598afc man: add russian translation of ddate.1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-21 15:00:47 +02:00
Diego Elio 'Flameeyes' Pettenò ebc83db1a1 build-sys: drop shlibs/Makefile.am that only adds SUBDIRS
The same effect is gotten by changing SUBDIRS in the top-level
Makefile.am.
2010-07-29 17:48:01 +02:00
Diego Elio 'Flameeyes' Pettenò 97ce707bce build-sys: require automake 1.10 as gtk-doc requires it anyway
There's no point into requiring 1.9 if the gtk-doc makefiles only work
with 1.10.

Signed-off-by: Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
2010-07-29 17:46:36 +02:00
Mike Frysinger 30c97bb8c9 cfdisk: search for ncursesw/ncurses.h
Some distros install the wide version of ncurses side by side with the
non-wide version and place the wide headers in an ncursesw/ subdir.  So
detect that behavior and include the right header with cfdisk.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-07 09:56:16 +02:00
Karel Zak 965b4900b9 build-sys: explicitly check for slang.h
The slang/slcurses.h contains

  #includes <slang.h>

but we don't use -I/usr/include/slang (and this is also missing in
slang.pc), it means that we have manually include the slang.h file
in our configure script.

Note this is Fedora-12, maybe some others distros have more usable
slang headers...

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-01 10:43:06 +02:00
Karel Zak 9c1442c1ff build-sys: release++ (v2.18)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-30 15:08:21 +02:00
Karel Zak 5f0b4c37a0 build-sys: release++ (v2.18-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-18 12:25:55 +02:00
Karel Zak eae4075f0f build-sys: release++ (v2.18-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-08 11:52:42 +02:00
Karel Zak 8e36876187 build-sys: cleanup lib{mount,blkid} building
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-08 10:55:24 +02:00
Karel Zak 3d73558960 libmount: add docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03 15:20:12 +02:00
Karel Zak 69b7e41e99 libmount: add basic utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03 15:20:10 +02:00
Karel Zak f4ab4ae8eb libmount: add version.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03 15:20:10 +02:00
Karel Zak f1cde479a3 libmount: add basic dirs
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-03 15:20:10 +02:00
Karel Zak ee32c514b5 lib: add fallback for libc (uClibc) without CPU_ALLOC
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-01 11:09:23 +02:00
Karel Zak a3e40c1465 rdev: remove this deprecated command
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-18 16:14:44 +02:00
Karel Zak f0bc3fa0cf script: optionally compile with libutempter to update utmp
Use --with-utempter to enable utempter support. The libutempter calls
/usr/libexec/utempter/utempter suid helper to update utmp and wtmp
files.

Old version:
	$ script
	Script started, file is typescript

	$ who i am

	$ exit
	Script done, file is typescript

New version:
	$ script
	Script started, file is typescript

	$ who i am
	kzak     pts/6        2010-04-29 12:30

	$ exit
	Script done, file is typescript

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=477753
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-04-29 12:25:06 +02:00
M.S.Colclough 55113b15af libblkid: avoid probing CDs for RAID
RAID probing of CD/DVD can yield errors because of well-known problem
in reading the end of the disk with some disk/drive combinations.
Borrow CD detection method from udev and skip the RAID tests for
these devices.

[kzak@redhat.com: - check for linux/cdrom.h in ./configure
                  - add #ifdef around the ioctl call
                  - call the ioctl for block devices only]

Signed-off-by: Mark Colclough <m.s.colclough@bham.ac.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-31 18:12:47 +02:00
Yann Droneaud b832c2fe34 build-sys: improved check for fallocate()
With glibc 2.10 on a 32bits system, fallocate64() function is not
exported. This a problem, since _FILE_OFFSET_BITS is set to 64 and
fallocate() is redirected to fallocate64().
Sadly, AC_CHECK_FUNC() doesn't catch such problem, since it's overriding
the function prototype.

See this for references:
http://sources.redhat.com/ml/libc-hacker/2009-05/msg00003.html

Signed-off-by: Yann Droneaud <yann@droneaud.fr>
2010-03-31 17:04:37 +02:00
Karel Zak 6c2f2b9d62 libblkid: add microsecond resolution for cache entries
The libblkid library uses stat.st_mtine to detect changes on the
device. The last update time of of the device in the cache is stored
as TIME= tag in the /etc/blkid.tab file.

Linux since 2.5.48 supports nanosecond resolution and more precise
time is available in the stat.st_mtim timespec struct.

This patch add microsecond precision to TIME= tag in the cache file,
old format:

	TIME="<sec>"

the new format:

	TIME="<sec>.<usec>"

This change is backwardly compatible.

Now, the blkid_verify() function checks stat.st_mtime and
stat.st_mtim.tv_nsec/1000.

Test:

 # e2label /dev/sdb1 AAAA

old version:

 # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1
 /dev/sdb1: LABEL="AAAA"
 /dev/sdb1: LABEL="AAAA"

new version:

 # blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1
 /dev/sdb1: LABEL="AAAA"
 /dev/sdb1: LABEL="BBBB"

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-17 14:49:14 +01:00
Karel Zak 2a7c1f70a6 build-sys: add missing tests for libuuid and libblkid
$ make checkconfig
misc-utils/blkid.c : HAVE_TERMIO_H
misc-utils/blkid.c : HAVE_TERMIOS_H
shlibs/blkid/src/getsize.c : HAVE_FSTAT64
shlibs/blkid/src/llseek.c : HAVE_LLSEEK_PROTOTYPE
shlibs/blkid/src/llseek.c : HAVE_LSEEK64_PROTOTYPE
shlibs/uuid/src/gen_uuid.c : HAVE_SA_LEN*/
shlibs/uuid/src/gen_uuid.c : HAVE_SYS_SOCKET_H
shlibs/uuid/src/gen_uuid.c : HAVE_SYS_SYSCALL_H

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-12 12:43:07 +01:00
Mike Frysinger bb4cb69df2 fsck/mkfs/mount: unify default search paths for helpers
Rather than each fs util having its own search policy, unify the paths in
configure and allow them to be tweaked by downstream.  In the process,
drop the /etc paths as no one has ever really used these.

[kzak@redhat.com: - backport to autoconf < 2.64
                    (remove AS_{SET,IF,CASE,APPEND} macros)]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-02 14:37:32 +01:00
Linus Torvalds a67bb3bff5 libblkid: disable read-ahead when probing device files
Read-ahead doesn't work very well on device probing, and can hurt a lot
when we do essentially random accesses on very slow devices. So disable it
if possible.

[kzak@redhat.com: - add posix_fadvise() configure test]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-19 00:13:16 +01:00
Karel Zak 2c4b9254e9 fdisk: don't include scsi.h
The fdisksunlabel.c header file is unnecessary for fdisk/fdisksunlabel.h.

Reported-by: Thomas Stalder <thomas@netsolux.ch>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-13 10:59:43 +01:00
Karel Zak 36b00d61a7 build-sys: release++ (v2.17)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-07 22:41:05 +01:00
Karel Zak e05dc07770 build-sys: release++ (v2.17-rc3)
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-10 22:05:07 +01:00