]> err.no Git - util-linux/log
util-linux
17 years agomount: clean up info about NFS in mount.8
Karel Zak [Wed, 30 May 2007 10:10:07 +0000 (12:10 +0200)]
mount: clean up info about NFS in mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add note about fcntl/ioctl unreliability on NFS to mount.8
Karel Zak [Wed, 30 May 2007 09:44:50 +0000 (11:44 +0200)]
mount: add note about fcntl/ioctl unreliability on NFS to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add note about /etc/mtab unreliability to mount.8
Karel Zak [Wed, 30 May 2007 09:42:55 +0000 (11:42 +0200)]
mount: add note about /etc/mtab unreliability to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by uuid with label in fstab
Karel Zak [Mon, 28 May 2007 23:30:50 +0000 (01:30 +0200)]
tests: add mount by uuid with label in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by uuid with devname in fstab
Karel Zak [Mon, 28 May 2007 23:29:25 +0000 (01:29 +0200)]
tests: add mount by uuid with devname in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by label with uuid in fstab
Karel Zak [Mon, 28 May 2007 23:28:06 +0000 (01:28 +0200)]
tests: add mount by label with uuid in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by label with devname in fstab
Karel Zak [Mon, 28 May 2007 23:26:17 +0000 (01:26 +0200)]
tests: add mount by label with devname in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname with uuid in fstab
Karel Zak [Mon, 28 May 2007 23:08:04 +0000 (01:08 +0200)]
tests: add mount by devname with uuid in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname with label in fstab
Karel Zak [Mon, 28 May 2007 23:07:28 +0000 (01:07 +0200)]
tests: add mount by devname with label in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add more variants to {mount,fstab}-by-{label,uuid,devname}
Karel Zak [Mon, 28 May 2007 13:15:55 +0000 (15:15 +0200)]
tests: add more variants to {mount,fstab}-by-{label,uuid,devname}

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add support for mixed usage of SPECes
Karel Zak [Mon, 28 May 2007 12:48:23 +0000 (14:48 +0200)]
mount: add support for mixed usage of SPECes

This patch improves a way how the mount works with SPECes (devname,
LABEL or UUID) and nodes (mountpoints) from command line.

The patch adds support for mixed usage of SPECes -- it means on
command line is different SPEC than in the /etc/fstab file. For
example:

command line:
   mount LABEL=foo
fstab:
   UID=915b048a-998d-4ee5-9e6b-7fcaaf34d3c5 /mnt/foo auto default

The mount command doesn't strictly require same SPEC on command line
and in fstab anymore. You can be more creative and mix UUID, LABEL
or device name.

This implementation is more effective that convert *all* entries from
/etc/fstab to a real devnames.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: getfs_* (fstab) interface has to work with canonicalize()
Karel Zak [Mon, 28 May 2007 11:20:27 +0000 (13:20 +0200)]
mount: getfs_* (fstab) interface has to work with canonicalize()

The getfs_by_dir() and getfs_by_devname() have to be able to work
with canonicalized and also with non-canonicalized paths.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: cleanup blkid cache after test device deinitialization
Karel Zak [Fri, 25 May 2007 12:53:22 +0000 (14:53 +0200)]
tests: cleanup blkid cache after test device deinitialization

The libblkid reuses cached information when a cache entry is younger
than 2 secs. That's wrong, because util-linux tests use devices
more quickly.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: use verbose mode instead debug mode
Karel Zak [Fri, 25 May 2007 11:33:22 +0000 (13:33 +0200)]
mount: use verbose mode instead debug mode

The patch:

  commit 61d9d2ff1cb0e28e2b88099bbc5b919fa5004fce
  Date:   Wed Dec 27 23:35:56 2006 +0100

added debug mode to the mount command. It was mistake. It's better to
use old verbose mode instead a new debug mode. This patch transform
all staff from debug mode to to verbose mode.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: parse SPEC before search in fstab
Karel Zak [Fri, 25 May 2007 10:28:49 +0000 (12:28 +0200)]
mount: parse SPEC before search in fstab

The mount blindly uses a SPEC from command line and tries to found the
SPEC in /etc/fstab. It's better to parse the SPEC and search by UUID,
LABEL or devname only.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: clean up getfs* (fstab.c) interface
Karel Zak [Fri, 25 May 2007 09:09:44 +0000 (11:09 +0200)]
mount: clean up getfs* (fstab.c) interface

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: minor fixes in configure.in
Karel Zak [Tue, 22 May 2007 22:04:24 +0000 (00:04 +0200)]
build-sys: minor fixes in configure.in

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: factor out common parts from mount/Makefile.am
Stepan Kasal [Tue, 22 May 2007 11:00:23 +0000 (13:00 +0200)]
build-sys: factor out common parts from mount/Makefile.am

Signed-off-by: Stepan Kasal <skasal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname from fstab
Karel Zak [Tue, 22 May 2007 20:00:01 +0000 (22:00 +0200)]
tests: add mount by devname from fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by UUID from fstab test
Karel Zak [Tue, 22 May 2007 19:44:14 +0000 (21:44 +0200)]
tests: add mount by UUID from fstab test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by label from fstab test
Karel Zak [Tue, 22 May 2007 14:06:24 +0000 (16:06 +0200)]
tests: add mount by label from fstab test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add support for fstab modification
Karel Zak [Tue, 22 May 2007 14:01:55 +0000 (16:01 +0200)]
tests: add support for fstab modification

The patch adds ts_fstab_add and ts_fstab_clean routines.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname test
Karel Zak [Tue, 22 May 2007 09:46:32 +0000 (11:46 +0200)]
tests: add mount by devname test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by LABEL test
Karel Zak [Mon, 21 May 2007 13:00:54 +0000 (15:00 +0200)]
tests: add mount by LABEL test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix Makefile.am (add missing tests)
Karel Zak [Mon, 21 May 2007 12:31:51 +0000 (14:31 +0200)]
tests: fix Makefile.am (add missing tests)

The patch adds missing tests to Makefile.am.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by UUID test
Karel Zak [Mon, 21 May 2007 12:28:01 +0000 (14:28 +0200)]
tests: add mount by UUID test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add ts_log and --verbose support
Karel Zak [Fri, 18 May 2007 13:34:28 +0000 (15:34 +0200)]
tests: add ts_log and --verbose support

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: "if [...]" clean up
Karel Zak [Fri, 18 May 2007 13:00:22 +0000 (15:00 +0200)]
tests: "if [...]" clean up

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add swapon by devname test
Karel Zak [Fri, 18 May 2007 12:00:21 +0000 (14:00 +0200)]
tests: add swapon by devname test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add swapon by UUID test
Karel Zak [Fri, 18 May 2007 11:54:43 +0000 (13:54 +0200)]
tests: add swapon by UUID test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: simplify devices usage
Karel Zak [Fri, 18 May 2007 11:49:15 +0000 (13:49 +0200)]
tests: simplify devices usage

The patch simplifies devices usage in the tests. The patch also improves
errors checking and reporting.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add functions for label, uuid and fstype detection
Karel Zak [Thu, 17 May 2007 18:16:25 +0000 (20:16 +0200)]
tests: add functions for label, uuid and fstype detection

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: code refactoring -- new ts_udev_loop_support function
Karel Zak [Wed, 16 May 2007 00:07:07 +0000 (02:07 +0200)]
tests: code refactoring -- new ts_udev_loop_support function

The patch moves generic and duplicated code to a new
ts_udev_loop_support function.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: code refactoring -- new ts_device_init function
Karel Zak [Tue, 15 May 2007 23:38:13 +0000 (01:38 +0200)]
tests: code refactoring -- new ts_device_init function

The patch moves generic loop device (de)initialization code to
ts_device_init and ts_device_deinit functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: code refactoring -- new ts_skip_nonroot function
Karel Zak [Tue, 15 May 2007 22:41:14 +0000 (00:41 +0200)]
tests: code refactoring -- new ts_skip_nonroot function

The patch moves "if $UID != 0" test to a new function. That's better
than duplicate the code on many places.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix dependence on blkid
Karel Zak [Tue, 15 May 2007 10:34:39 +0000 (12:34 +0200)]
tests: fix dependence on blkid

The util-linux-ng tests have to be useful with blkid and also with
volume_id.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: add libvolume_id support
Karel Zak [Mon, 14 May 2007 22:52:07 +0000 (00:52 +0200)]
mount: fsprobe: add libvolume_id support

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: add libvolume_id support to configure.ac
Karel Zak [Wed, 9 May 2007 15:35:27 +0000 (17:35 +0200)]
mount: fsprobe: add libvolume_id support to configure.ac

The patch add new option --with-fsprobe=<name> (where the <name> is
blkid or volume_id). The blkid is default. The mount cannot be
compiled without a filesystem detection library.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix has_* functions (CVE-2007-0822)
Karel Zak [Mon, 14 May 2007 22:22:56 +0000 (00:22 +0200)]
mount: fix has_* functions (CVE-2007-0822)

The functions have to check for NULL pointer.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: use blkid cache only when really necessary
Karel Zak [Thu, 10 May 2007 10:10:57 +0000 (12:10 +0200)]
mount: fsprobe: use blkid cache only when really necessary

The blkid_get_cache() parses /etc/blkid.tab, it's better do it only
when we really need to resolve a spec (label or uuid).

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: make fsprobe_get_devname functions more generic
Karel Zak [Mon, 14 May 2007 12:31:28 +0000 (14:31 +0200)]
mount: fsprobe: make fsprobe_get_devname functions more generic

The blkid supports NAME=value parsing, but use the library for
this simple task is overkill. (The libblkid requires initialized
blkid cache all time, for all calls.)

This patch makes the fsprobe_get_devname_for_mounting() and
fsprobe_get_devname() generic for all fsprobe implementations.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: rename the rest of API routines to fsprobe_*
Karel Zak [Thu, 10 May 2007 09:21:35 +0000 (11:21 +0200)]
mount: fsprobe: rename the rest of API routines to fsprobe_*

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: remove mount_guess_fstype.{c,h}
Karel Zak [Wed, 9 May 2007 23:47:28 +0000 (01:47 +0200)]
mount: fsprobe: remove mount_guess_fstype.{c,h}

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: remove non-blkid code
Karel Zak [Wed, 9 May 2007 14:29:27 +0000 (16:29 +0200)]
mount: fsprobe: remove non-blkid code

This patch removes old FS detection code and enables
blkid code only when HAVE_BLKID is defined.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: rename files to fsprobe_*
Karel Zak [Wed, 9 May 2007 13:38:16 +0000 (15:38 +0200)]
mount: fsprobe: rename files to fsprobe_*

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodisk-utils: fix libuuid usage in mkswap
Matthias Koenig [Mon, 7 May 2007 08:56:50 +0000 (10:56 +0200)]
disk-utils: fix libuuid usage in mkswap

Fix libuuid usage in mkswap.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
17 years agosys-utils: fix man page headers
Karel Zak [Wed, 16 May 2007 11:55:02 +0000 (13:55 +0200)]
sys-utils: fix man page headers

The man pages have been moved from man8 to man1, but the
headers still refer to man1.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: refresh AUTHORS file
Karel Zak [Wed, 16 May 2007 11:42:07 +0000 (13:42 +0200)]
docs: refresh AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: kill mount_guess_rootdev
Stepan Kasal [Tue, 15 May 2007 19:57:10 +0000 (21:57 +0200)]
mount: kill mount_guess_rootdev

It's not used.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: add AC_GNU_SOURCE
Karel Zak [Wed, 16 May 2007 10:56:28 +0000 (12:56 +0200)]
build-sys: add AC_GNU_SOURCE

The widechar code doesn't compile correctly without _GNU_SOURCE (at
least according to reports from testers. I don't see the problem on
FC6.)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: remove -fomit-frame-pointer
Karel Zak [Wed, 16 May 2007 09:58:22 +0000 (11:58 +0200)]
build-sys: remove -fomit-frame-pointer

The -fomit-frame-pointer option makes debugging impossible on some
machines. It is automatically enabled by -O<n> optimizations.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: add Automake option dist-bzip2
Stepan Kasal [Tue, 15 May 2007 18:46:34 +0000 (20:46 +0200)]
build-sys: add Automake option dist-bzip2

We distribute .tar.bz2 along with .tar.gz .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: in configure.ac, change "po" -> "$srcdir/po"
Stepan Kasal [Tue, 15 May 2007 18:46:33 +0000 (20:46 +0200)]
build-sys: in configure.ac, change "po" -> "$srcdir/po"

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_noinst_HEADERS in include/Makefile.am
Stepan Kasal [Tue, 15 May 2007 18:46:31 +0000 (20:46 +0200)]
build-sys: use dist_noinst_HEADERS in include/Makefile.am

It is slightly more appropriate.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: in the clean targets use "find ... | xargs rm -f"
Stepan Kasal [Tue, 15 May 2007 18:46:30 +0000 (20:46 +0200)]
build-sys: in the clean targets use "find ... | xargs rm -f"

"find ... -exec rm {}" is unnecessarily slow.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove po/Makevars.template from EXTRA_DIST
Stepan Kasal [Tue, 15 May 2007 18:46:29 +0000 (20:46 +0200)]
build-sys: remove po/Makevars.template from EXTRA_DIST

The is no point in distributing it.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove config/include-Makefile.am from EXTRA_DIST
Stepan Kasal [Tue, 15 May 2007 18:46:28 +0000 (20:46 +0200)]
build-sys: remove config/include-Makefile.am from EXTRA_DIST

It gets distributed automaticaly.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not use wildcards in EXTRA_DIST
Stepan Kasal [Tue, 15 May 2007 18:46:27 +0000 (20:46 +0200)]
build-sys: do not use wildcards in EXTRA_DIST

Wildcards in EXTRA_DIST break "make dist" for vpath build.
But plain directory names are ok.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_usrbinexec_SCRIPTS in misc-utils/Makefile.am
Stepan Kasal [Tue, 15 May 2007 18:46:26 +0000 (20:46 +0200)]
build-sys: use dist_usrbinexec_SCRIPTS in misc-utils/Makefile.am

A slightly more concise way to distribute the script "reset".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: let configure instantiate the misc-utils/*.pl scripts
Stepan Kasal [Tue, 15 May 2007 18:46:25 +0000 (20:46 +0200)]
build-sys: let configure instantiate the misc-utils/*.pl scripts

The substitution of @PERL@ is most done with AC_CONFIG_FILES.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: --prefix defaults to /usr
Stepan Kasal [Tue, 15 May 2007 18:46:24 +0000 (20:46 +0200)]
build-sys: --prefix defaults to /usr

Use prefix=/usr as the default setting.  If prefix is /usr, make
bindir and sbindir default to /bin and /sbin, respectively.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: set DISTCHECK_CONFIGURE_FLAGS in top-level makefile
Stepan Kasal [Tue, 15 May 2007 18:46:23 +0000 (20:46 +0200)]
build-sys: set DISTCHECK_CONFIGURE_FLAGS in top-level makefile

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: make the getopt example directory relative to datadir
Stepan Kasal [Tue, 15 May 2007 18:46:22 +0000 (20:46 +0200)]
build-sys: make the getopt example directory relative to datadir

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: amend .gitignore
Stepan Kasal [Tue, 15 May 2007 18:46:21 +0000 (20:46 +0200)]
build-sys: amend .gitignore

Add several built files to .gitignore files.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove swapargs.h, move the tests to main configure.ac
Stepan Kasal [Tue, 15 May 2007 18:46:20 +0000 (20:46 +0200)]
build-sys: remove swapargs.h, move the tests to main configure.ac

Do not use header swapargs.h, generated by script swap.configure;
use the standard AC_DEFINE method in configure.ac.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: replace AC_TRY_* by AC_*_IFELSE
Stepan Kasal [Tue, 15 May 2007 18:46:19 +0000 (20:46 +0200)]
build-sys: replace AC_TRY_* by AC_*_IFELSE

The AC_TRY_* macros are deprecated.  Following the suggestion from
autoupdate, I have replaced them by AC_*_IFELSE.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: s/AC_HELP_STRING/AS_HELP_STRING/
Stepan Kasal [Tue, 15 May 2007 18:46:18 +0000 (20:46 +0200)]
build-sys: s/AC_HELP_STRING/AS_HELP_STRING/

The macro has been renamed.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not use internal Autoconf variables
Stepan Kasal [Tue, 15 May 2007 18:46:17 +0000 (20:46 +0200)]
build-sys: do not use internal Autoconf variables

This is a cleanup of configure.ac removing the internal ac_cv_*
variables.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: merge adjacent AC_CONFIG_HEADERS and AC_CONFIG_FUNCS calls
Stepan Kasal [Tue, 15 May 2007 18:46:16 +0000 (20:46 +0200)]
build-sys: merge adjacent AC_CONFIG_HEADERS and AC_CONFIG_FUNCS calls

Merge adjacent calls to AC_CONFIG_HEADERS--the generated configure is
then smaller.  Likewise for AC_CONFIG_FUNCS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: move -D flags to *_CPPFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:15 +0000 (20:46 +0200)]
build-sys: move -D flags to *_CPPFLAGS

Preprocessor options belong to *_CPPFLAGS; add $(AM_CPPFLAGS) as we
want to amend it, not override.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not set with_foo twice
Stepan Kasal [Tue, 15 May 2007 18:46:14 +0000 (20:46 +0200)]
build-sys: do not set with_foo twice

It's redundant to set with_slang=$withval, and similar.
(Inspect the generated configure; it contains
  withval=$with_slang; with_slang=$withval
:-)

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agoswapon: simplify an #if
Stepan Kasal [Tue, 15 May 2007 18:46:13 +0000 (20:46 +0200)]
swapon: simplify an #if

Replace two immerced #ifdef's by an #if with a compound conditional.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_noinst_DATA to work around the bug with dist_man_MANS
Stepan Kasal [Tue, 15 May 2007 18:46:12 +0000 (20:46 +0200)]
build-sys: use dist_noinst_DATA to work around the bug with dist_man_MANS

Automake mishandles dist_man_MANS.  Using dist_noinst_DATA to work
around this is more elegant than using dist-hook.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: simplify "clean" in tests/Makefile.am
Stepan Kasal [Tue, 15 May 2007 18:46:11 +0000 (20:46 +0200)]
build-sys: simplify "clean" in tests/Makefile.am

The construction with "distclean-local" does not seem necessary.
Moreover, Automake complains when "clean" is redefined.

Simply put the rm to "clean-local".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_example_DATA
Stepan Kasal [Tue, 15 May 2007 18:46:10 +0000 (20:46 +0200)]
build-sys: use dist_example_DATA

"dist_" prefix is more elegant than EXTRA_DIST.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: mount/Makefile.am tiny cleanup II
Stepan Kasal [Tue, 15 May 2007 18:46:09 +0000 (20:46 +0200)]
build-sys: mount/Makefile.am tiny cleanup II

Style change: init the *_LDADD vars, then amend them with +=.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not build convenience libraries in lib/
Stepan Kasal [Tue, 15 May 2007 18:46:08 +0000 (20:46 +0200)]
build-sys: do not build convenience libraries in lib/

Build lib/*.c individually for each project which uses it, so that the
right set of flags is applied each time.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: mount/Makefile.am tiny cleanup
Stepan Kasal [Tue, 15 May 2007 18:46:07 +0000 (20:46 +0200)]
build-sys: mount/Makefile.am tiny cleanup

Major part of mount_SOURCES and umount_SOURCES is the same; factor it
out to a new make variable.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove AC_PROG_RANLIB
Stepan Kasal [Tue, 15 May 2007 18:46:06 +0000 (20:46 +0200)]
build-sys: remove AC_PROG_RANLIB

libtoolize (1.5.16) says it's now obsolete.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: declare SUID_CFLAGS and SUID_LDFLAGS as precious
Stepan Kasal [Tue, 15 May 2007 18:46:05 +0000 (20:46 +0200)]
build-sys: declare SUID_CFLAGS and SUID_LDFLAGS as precious

Use AC_ARG_VAR to declare the variables SUID_CFLAGS and SUID_LDFLAGS as
precious.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: fix the example configure call in README
Stepan Kasal [Tue, 15 May 2007 18:46:04 +0000 (20:46 +0200)]
build-sys: fix the example configure call in README

Adapt the example to pass the variables as arguments to the configure
script, as this is the prefered way.  And a few cosmetic changes to the
paragraph.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: add SUID_LDFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:03 +0000 (20:46 +0200)]
build-sys: add SUID_LDFLAGS

Programs which are usually installed with the setuid bit do need their own
CFLAGS and LDFLAGS.  SUID_LDFLAGS is analogic to SUID_CFLAGS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not play with DEFS, use AM_CPPFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:02 +0000 (20:46 +0200)]
build-sys: do not play with DEFS, use AM_CPPFLAGS

If a -D flag is needed, it belongs to AM_CPPFLAGS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: move the optimization flags to AM_CFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:01 +0000 (20:46 +0200)]
build-sys: move the optimization flags to AM_CFLAGS

The optimization flags are not preprocessor flags.
Moreover, CPPFLAGS and CFLAGS shall be overridable at make time, the
configure script shall not touch them.
Setting AM_CFLAGS in config/include-Makefile.am seems to be TRW.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not kick off AM_CFLAGS by SUID_CFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:00 +0000 (20:46 +0200)]
build-sys: do not kick off AM_CFLAGS by SUID_CFLAGS

SUID_CFLAGS are not meant to override the makefile-wide AM_CFLAGS.
(We do not use AM_CFLAGS currently, but we will.)

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: update po/POTFILES.in
Stepan Kasal [Tue, 15 May 2007 18:45:59 +0000 (20:45 +0200)]
build-sys: update po/POTFILES.in

Remove mount/nfsmount* files from po/POTFILES.in .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agomount: remove nfsmount() from sundries.h
Karel Zak [Thu, 10 May 2007 13:18:01 +0000 (15:18 +0200)]
mount: remove nfsmount() from sundries.h

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: remove all NFS code
Karel Zak [Wed, 9 May 2007 11:25:16 +0000 (13:25 +0200)]
mount: remove all NFS code

Use /sbin/{u,}mount.nfs{,4} from nfs-utils! The mount command
will use these to mount nfs filesystems instead of internal code.

The /sbin/{u,}mount.nfs{,4} is supported from nfs-utils-1.1.0
(currently -rc1).

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: fix the final message of autogen.sh
Stepan Kasal [Mon, 7 May 2007 18:06:39 +0000 (20:06 +0200)]
build-sys: fix the final message of autogen.sh

The message shall not recommend calling ./configure when srcdir != "." .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: call automake after autoconf
Stepan Kasal [Mon, 7 May 2007 18:06:06 +0000 (20:06 +0200)]
build-sys: call automake after autoconf

"automake" calls "autoconf" internally, to trace the expansion of
configure.ac.  So it is more natural to call "autoconf" before
"automake".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove config.h.in from VCS
Stepan Kasal [Mon, 7 May 2007 17:30:57 +0000 (19:30 +0200)]
build-sys: remove config.h.in from VCS

config.h.in is generated, no need to keep it.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agomount: add support for context, fscontext and defcontext selinux mount options
Karel Zak [Fri, 4 May 2007 09:05:51 +0000 (11:05 +0200)]
mount: add support for context, fscontext and defcontext selinux mount options

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: use realloc for xstrconcat functions
Karel Zak [Fri, 4 May 2007 07:14:04 +0000 (09:14 +0200)]
mount: use realloc for xstrconcat functions

Everywhere in code is

s = xstrconcat3(s, t, u);

that's nonsense use malloc(new_s); free(s); return new_s;

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: use growable string for options
Karel Zak [Thu, 3 May 2007 12:16:24 +0000 (14:16 +0200)]
mount: use growable string for options

The parse_opt() routine uses fixed size of string for mount options.
This is useless for future selinux options where is not well defined
size of selinux context name.

The patch also makes code more readable and all option-string
operations share same code.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: avoid duplicate entries in mtab when mount -f
Karel Zak [Mon, 30 Apr 2007 22:28:08 +0000 (00:28 +0200)]
mount: avoid duplicate entries in mtab when mount -f

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount -o remount test
Karel Zak [Thu, 26 Apr 2007 20:25:13 +0000 (22:25 +0200)]
tests: add mount -o remount test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount --move test
Karel Zak [Thu, 26 Apr 2007 13:10:00 +0000 (15:10 +0200)]
tests: add mount --move test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: doesn't rpc_pipefs and nfsd on umount -a
Karel Zak [Thu, 26 Apr 2007 09:06:44 +0000 (11:06 +0200)]
mount: doesn't rpc_pipefs and nfsd on umount -a

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix list logic in update_mtab
Karel Zak [Wed, 25 Apr 2007 23:49:28 +0000 (01:49 +0200)]
mount: fix list logic in update_mtab

If mtab does not contain the new entry, then only mc0->prev is updated
to point to absent, but not the old mc0->prev's nxt pointer.  Because
we then use the nxt pointers to write the new mtab, absent is not
added to the new mtab.

(Note: fortunately, the mount doesn't use the update_mtab() for new
mounts, but for remount, move and umount only -- kzak)

If mtab is empty, absent->prev should be set to mc0, and not
mc0->prev, as it will be NULL.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix memory usage in update_mtab
Mike Frysinger [Fri, 13 Apr 2007 11:54:38 +0000 (07:54 -0400)]
mount: fix memory usage in update_mtab

The update_mtab deallocates memory which was allocated by caller. It's nice
opportunity for double-free errors.

The patch fix a memory leak if we have to abort before mc0 are freed.  The
patch also fix a memory leak when we deallocate old (umounted) entry.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>