Commit Graph

188 Commits

Author SHA1 Message Date
Stepan Kasal b34258064d 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>
2007-05-16 11:43:30 +02:00
Stepan Kasal cf002530f8 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>
2007-05-16 11:43:30 +02:00
Stepan Kasal 7fa4f11209 build-sys: s/AC_HELP_STRING/AS_HELP_STRING/
The macro has been renamed.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:30 +02:00
Stepan Kasal fd67be311d 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>
2007-05-16 11:43:30 +02:00
Stepan Kasal bf962c0ab5 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>
2007-05-16 11:43:30 +02:00
Stepan Kasal 1f31768671 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>
2007-05-16 11:43:30 +02:00
Stepan Kasal 271d98e05d 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>
2007-05-16 11:43:30 +02:00
Stepan Kasal 67c4ade809 swapon: simplify an #if
Replace two immerced #ifdef's by an #if with a compound conditional.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:30 +02:00
Stepan Kasal d7b7454654 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal caec351d67 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 39a2c1480f build-sys: use dist_example_DATA
"dist_" prefix is more elegant than EXTRA_DIST.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 7caf9897a8 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 2984313a46 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 787fc0be21 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 232a8ec45a build-sys: remove AC_PROG_RANLIB
libtoolize (1.5.16) says it's now obsolete.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:29 +02:00
Stepan Kasal 1f10890f51 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 2c4bdb7fca 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 3f3c9c909a 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 30564097bf 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 8671065ce5 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal 8c453685a6 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>
2007-05-16 11:43:29 +02:00
Stepan Kasal f0b8b878c3 build-sys: update po/POTFILES.in
Remove mount/nfsmount* files from po/POTFILES.in .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16 11:43:28 +02:00
Karel Zak 52a2b29d9b mount: remove nfsmount() from sundries.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-11 15:28:21 +02:00
Karel Zak 11d6b04773 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>
2007-05-09 13:25:16 +02:00
Stepan Kasal e1bc6da937 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>
2007-05-08 00:39:13 +02:00
Stepan Kasal 5a2300248f 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>
2007-05-08 00:38:36 +02:00
Stepan Kasal 040dc88f70 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>
2007-05-08 00:38:24 +02:00
Karel Zak 3a620ba4bf mount: add support for context, fscontext and defcontext selinux mount options
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-04 11:05:51 +02:00
Karel Zak 6573c985a4 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>
2007-05-04 09:14:04 +02:00
Karel Zak 9e28151e70 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>
2007-05-04 00:15:45 +02:00
Karel Zak bb369b1404 mount: avoid duplicate entries in mtab when mount -f
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-02 13:05:14 +02:00
Karel Zak 8d5807b942 tests: add mount -o remount test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 22:25:13 +02:00
Karel Zak e4a89b95ad tests: add mount --move test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 15:10:00 +02:00
Karel Zak 3d91eb781d mount: doesn't rpc_pipefs and nfsd on umount -a
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-26 11:06:44 +02:00
Karel Zak b2b7b73d5e 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>
2007-04-26 01:49:28 +02:00
Mike Frysinger 1510285d49 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>
2007-04-26 00:31:39 +02:00
Mike Frysinger 3cccadb2f7 mount: do not treat arm/sparc specially.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:59:03 +02:00
Mike Frysinger 6b4d210d04 mount: don't umount sysfs when running umount -a
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:58:41 +02:00
Mike Frysinger 409af84fba po: typo in french translation of mount error.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:57:50 +02:00
Mike Frysinger 5f24e30701 mount: fix -fv so that it doesn't incorrectly spit out an error that nothing was done.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
2007-04-25 23:57:27 +02:00
Karel Zak 2a4b572500 sys-utils: move some man pages from category 8 to 1
The dmesg, ipcrm, ipcs, renice and setsid are user-accessible commands
and belong in man1 more than to man8.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 23:50:52 +02:00
Karel Zak 96f92b00b4 docs: fix info about devel/master branchs
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 15:23:21 +02:00
Karel Zak 9ec6a6b4ad docs: remove deprecated section from README
The deprecated stuff is already described in the DEPRECATED file.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:40:28 +02:00
Karel Zak 06bcee19a2 build-sys: add SUID_CFLAGS
The patch allows to define special CFLAGS for typical suid programs
(like mount, umount, chfn, ...). Some distributions use for example
"-fpic" for suid binaries.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:20:46 +02:00
Karel Zak dd9f213ab6 mount: add support for mtab "uhelper" option
The helper is an external /sbin/umount.<suffix> program where the
suffix is a value from the uhelper= option from /etc/mtab.

The uhelper (unprivileged umount helper) is possible to used when
non-root user wants to umount a mountpoint which is not defined in the
/etc/fstab file (e.g devices mounted by HAL).

This option is already supported by HAL upstream.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:20:40 +02:00
Karel Zak 0b44c6155b mount: update mtab correctly when mount --move
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-25 00:08:43 +02:00
Karel Zak 09dd84cac7 schedutils: define SCHED_BATCH when compile with old glibc
This is temporary workaround and it will be removed in 2.14 when
minimal number of people will use old systems where is not defined
SCHED_BATCH in (bits/)sched.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-11 23:18:08 +02:00
Mike Frysinger f2c166ffdb check exit status of autotools
Make sure each autotool run in autogen.sh worked and if not, abort.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-04-11 10:58:12 +02:00
Karel Zak c67f99d754 todo: add request for cal highlight control option
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-06 12:31:40 +02:00
Karel Zak 31cc369d60 todo: add entry about replay
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-06 12:17:43 +02:00