1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

162 Commits

Author SHA1 Message Date
Alasdair Kergon
86ba564a9e Add missing pkg_config_init check with --enable-udev_sync. 2011-04-28 16:54:32 +00:00
Peter Rajnoha
71b29ddcc4 Require libudev >= 143 when compiling with udev support.
Old versions of libudev < 143 were experimental and unstable. Require recent
and stable versions only (version 143 is old enough anyway).
2011-04-22 11:56:41 +00:00
Zdenek Kabelac
d0df875d48 Add configure option --with-device-nodes-on
Make configurable default behaviour how to deal with device node creates.
With udev system natural options should be  'resume'.
For older systems where user expect there is node in /dev/mapper immediately
after  dmsetup create --notable  -  use 'create'

FIXME:
Code needs fixing passing this flag through udev cookie.
2011-02-04 22:17:54 +00:00
Zdenek Kabelac
349da06cfa Improve OCF dir support
Add --with-ocfdir configurable option.
Fix superfluous /usr in ocf_scriptdir instalation path.
2011-01-10 13:00:53 +00:00
Peter Rajnoha
7dfce0e467 Add new dm_prepare_selinux_context fn to libdevmapper and use it throughout.
Detect existence of new SELinux selabel interface during configure.
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.

We should set the SELinux context before the actual file system object creation.
The new dm_prepare_selinux_context function sets this using the selabel_lookup
fn in conjuction with the setfscreatecon fn. If selinux/label.h interface
(that should be a part of the selinux library) is not found during configure,
we fallback to the original matchpathcon function instead.
2010-12-13 10:43:56 +00:00
Zdenek Kabelac
e40d44be8d Add OCF support
Updated patch from Florian Haas from Linux-HA project.

User needs to 'configure --enable-ocf' to get file installed
by 'make install' target by default.
User can also use 'make install_ocf' to get only ocf files installed.
With disabled (default) ocf support - no ocf files are installed.

FIXME: ocf installation path needs to be kept in sync with pacemaker.
find better way and possible also better location.
2010-11-05 16:18:38 +00:00
Zdenek Kabelac
7c9fd3ea84 Don't use floor() in _bitset_with_random_bits
Use _even_rand() function instead of floor() in _bitset_with_random_bits().
floor() function is missing in dietlibc (on architectures other than x86).
Moreover using floor() to clip rand results does not assure even result
distribution. _even_rand() uses integer arithmetic only and is designed to
return evenly distributed results.

> Looks OK to me. It took a while to decipher what is the exact meaning of
> the loop in _even_rand (to a non-pseudorandomness-expert) but I am
> fairly comfortable with it now. If I understand this correctly, it
> rejects numbers that come from an "incomplete" slice of the RAND_MAX
> space (considering the number space [0, RAND_MAX] is divided into some
> "max"-sized slices and at most a single smaller slice, between [n*max,
> RAND_MAX] for suitable n -- numbers from this last slice are discarded
> because they could distort the distribution in favour of smaller
> numbers).

Signed-off-by: Przemyslaw Iskra <sparky <at> pld-linux.org>
Reviewed-by: Petr Rockai <prockai <at> redhat.com>
2010-10-13 12:18:53 +00:00
Fabio M. Di Nitto
34b6075d68 Based on auto-detection or user requested cluster managers for clvmd,
set appropriate Required-Start and Required-Stop at configure time.

Reorder the checks for user selected cluster managers to match auto
detected ones, to be consistent in the output.

Add special case for qdiskd that´s started after cman/lock_gulmd for
RHEL-4/RHEL-5.
2010-08-23 11:37:02 +00:00
Mike Snitzer
7063efe1bd Switch to using configure --with-default-data-alignment=<NUM> to
establish DEFAULT_DATA_ALIGNMENT.  Again, 0=64KiB, 1=1MiB, 2=2MiB

Default is 1.
2010-08-20 22:24:58 +00:00
Alasdair Kergon
d1e8046f56 Various small cleanups and fixes related to monitoring. 2010-08-16 22:54:35 +00:00
Joe Thornber
52e1564fdd [MM] Make valgrind aware of the pool allocators
./configure with --enable-valgrind-pool to enable this.
2010-08-09 10:56:01 +00:00
Alasdair Kergon
b1f08e51cc Fix configure to supply DEFAULT_RUN_DIR to Makefiles. 2010-07-31 00:43:41 +00:00
Alasdair Kergon
8bae0a1ecf Change clvmd to communicate with lvm via a socket in /var/run/lvm. (mbroz)
https://bugzilla.redhat.com/show_bug.cgi?id=614248 [CVE-2010-2526]
2010-07-28 13:55:42 +00:00
Joe Thornber
66392e6660 Add a unit test for the recent changes to dm_bit_get_next() 2010-07-20 15:25:39 +00:00
Joe Thornber
15106c5064 Wire the regex tests up to the reports 2010-07-20 15:21:32 +00:00
Joe Thornber
1033d12040 Report generators for unit tests and memory checks. Configure with
--enable-testing.
2010-07-20 14:38:44 +00:00
Fabio M. Di Nitto
8c4e8a185a Add dm_create_lockfile to libdm to handle pidfiles for all daemons.
Switch dmeventd to use dm_create_lockfile and drop duplicate code.
Allow clvmd pidfile to be configurable.
Switch cmirrord and clvmd to use dm_create_lockfile.
2010-07-13 13:51:01 +00:00
Zdenek Kabelac
71082be43a Cleanups for configure:
Indent updates.
 Use AC_HELP_STRING for help string.
 Start help string with lower letter.
 Add [] around some default values i.e. [TYPE=internal].
 Skip some "" around shell assigment when not needed.
 Fix typo --with-device-gid=UID string.
2010-07-08 12:02:48 +00:00
Alasdair Kergon
d911ec67a9 Randomly select which mdas to use or ignore.
Add some missing standard configure.in checks.
2010-07-05 22:23:15 +00:00
Zdenek Kabelac
a9b601e2be Fix wrong usage of exec_prefix from previous patch introducing LVM_PATH define
Introduce lvm_exec_prefix with resolved exec_prefix.
(using same ac_default_prefix as for CLVMD_PATH)
Use lvm_exec_prefix instead of dmeventd_prefix (fixes missing ac_default_prefix)

Note: This patch is rather hot-fix as currently generate code
does not create correct code for make exec_prefix=
2010-06-07 14:31:59 +00:00
Zdenek Kabelac
b5c2529bf8 Use absolute paths in commands
clvmd restart does not work at all if clvmd binary is not in current
dir.
2010-06-03 13:50:26 +00:00
Zdenek Kabelac
8fea97b7e7 Replicator: base lvm2 support
Adding configure.in support for Replicators.
Adding basic lib lvm support for Replicators.
Adding flags REPLICATOR and REPLICATOR_LOG.
Adding segments SEG_REPLICATOR and SEG_REPLICATOR_DEV.
Adding basic methods for handling replicator metadata.
2010-05-21 12:36:30 +00:00
Alasdair Kergon
21c56e377b backup->cache 2010-05-20 22:32:44 +00:00
Alasdair Kergon
3399ae320a Add install_system_dirs makefile target.
Add configure options for system and locking directories.
2010-05-20 13:47:21 +00:00
Alasdair Kergon
da05c479a9 Generate example.conf so default lvm.conf contents can be configured. 2010-05-20 11:45:56 +00:00
Zdenek Kabelac
f7f0854eca Add UDEV_PC and SELINUX_PC substituted variables 2010-05-11 08:48:43 +00:00
Alasdair Kergon
aaa2e0468f change awk path 2010-04-30 13:58:08 +00:00
Zdenek Kabelac
23b059e7b7 INSTALL rules updates
Patch is inspired by Debian's extra patch.

- removes OWNER & GROUP make vars they are parts of INSTALL command.
- adds INSTALL_PROGRAM for executable, uses $(INSTALL)
- adds INSTALL_DATA for non-executable data, uses ($INSTALL)
- adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL)
- adds configure option --enable-write_install - to support
  installatin of writable files used by distribution
- replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX)
- installs .a files from static builds without executable flag
- installs .a files to $(usrlibdir) instead of $(libdir)
- installs all static binaries to $(staticdir)
- create .so links for devel package in $(usrlibdir) instead of
  $(libdir)
- makes .so and .so.LIB_VERSION files within builddir
- removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly
- install LIB_SHARED via install_lib_shared target
- install plugins via install_lib_shared_plugin target
- prints whole 'install' command during installation instead of less
  informative "Installing  $(something) $(somewhere)"
- install multiple man pages with one INSTALL command
- use DISTCLEAN_TARGETS instead of creating multiple distclean targets
2010-04-09 21:42:48 +00:00
Zdenek Kabelac
fd4728e194 As lcov module is not installed with GD.pm dependency we need
to check for presence of this module and avoid using --frames
option for genhtml in this case.

Fix arg list for AC_PATH_PROG for lcov and genhtml.
(detecting empty LCOV and GENHTML string in Makefiles).
2010-04-06 11:53:53 +00:00
Peter Rajnoha
91345610f8 Strictly require libudev if udev_sync is used.
This prevents some confusion when libudev was not found so udev_sync was disabled
automatically. Configure was successful though giving only a tiny warning.

Also, if "dmsetup udevcreatecookie" is used, never return 0x000000 as a result if
udev is not running and keep the output blank.
2010-03-23 14:43:18 +00:00
Petr Rockai
649c45078f Add infrastructure for running the functional testsuite with locking_type set
to 3, using a local (singlenode) clvmd.
2010-03-18 09:19:30 +00:00
Zdenek Kabelac
db724a449b Use UDEV_LIBS, and link -ludev only when needed. 2010-03-04 12:12:34 +00:00
Zdenek Kabelac
19a2c6e0a7 Use DL_LIBS, remove -ldl from global LIBS and link -ldl only when needed. 2010-03-04 12:10:40 +00:00
Zdenek Kabelac
f8f6ec92b1 This patch add SELINUX_LIBS and STATIC_LIBS variables.
For static builds dependency for SELinux libs is not handled by 'ar'.
Till better solution is found, for static builds STATIC_LIBS is used.

Patch updates SELinux detection to use 3rd & 4th parameter for Success/Fail.
Also removes detection of pthread from this check as we know which
version of libdevmapper we are going to link with lvm after merge.

SELinux header check moved to the SELinux test code.
2010-03-04 12:08:26 +00:00
Zdenek Kabelac
f30875dbc6 Pthread linking change
Create new substituted variable PTHREAD_LIBS and link this library
only with tools/libs which really needs it - i.e. dmeventd.

Check for libpthread only for builds with clvmd or dmeventd.

Remove variable LIB_PTHREAD
2010-03-04 11:21:05 +00:00
Zdenek Kabelac
539f4a7728 Readline linking update
Modify linking of readline library. Create new  substituted varible
READLINE_LIBS - readline library is linked ONLY with tools that really use
it - i.e. lvm. (Static lvm does not use readlin).
Previous behaviour put this library into the variable LIBS and thus
linked it with all created object files of lvm project (i.e. plugins...).

READLINE detection is simplified.

Termcap library is linked in only if readline library doesn't have its own
dependency (i.e. old distributions).
2010-03-04 11:19:15 +00:00
Zdenek Kabelac
c927452439 As fsadm is installed by default - it's a common practice to rather
print help text in '--disable' form for such case.
2010-03-04 11:09:08 +00:00
Zdenek Kabelac
e24fb506a5 Usage of AC_PROG_SED and AC_PROG_MKDIR_P requires autoconf version 2.61. 2010-03-04 09:46:38 +00:00
Alasdair Kergon
d3d98fdc1e Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use. 2010-01-21 22:15:45 +00:00
Alasdair Kergon
81410c8f09 And more fixes for cmirror build. 2010-01-19 02:04:33 +00:00
Peter Rajnoha
55313cb6bf Show a warning message when libudev not found and we're using --enable-udev_sync.
Just to emphasize what one can expect - we won't be able to get udev state
and we will consider that udev is not running at all.
2010-01-11 15:51:44 +00:00
Peter Rajnoha
4df024c40c Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests.
We need to disable udev checking for our tests since they use their own
location for device nodes and symlinks.
2010-01-11 15:48:49 +00:00
Fabio M. Di Nitto
39dabc84cf configure.in: don't set default file owner and group
Per discussion on lvm-devel mailing list and part of debian patch set,
don't set defaults for owner and group, since nobody seems to use them, and
still allow override.
2009-10-14 04:10:41 +00:00
Fabio M. Di Nitto
89044bc0fe Disable realtime support by default.
This code is used only in a under development feature and it's not used
anywhere in the tree.

Allow to build it conditionally.
2009-10-12 16:59:20 +00:00
Alasdair Kergon
e1b8a236b7 Only include selinux libs in libdevmapper.pc when selinux build enabled. 2009-10-05 12:11:30 +00:00
Alasdair Kergon
db8b5af9d9 Allow for a build directory separate from the source. 2009-10-02 19:10:31 +00:00
Alasdair Kergon
a0f9708e49 Provide alternative implementation of obsolete siginterrupt(). 2009-09-28 21:23:02 +00:00
Alasdair Kergon
95eaa68309 Add global/si_unit_consistency to enable cleaned-up use of units in output.
Add configure --enable-units-compat to set si_unit_consistency off by default.

Use standard output units for 'PE Size' and 'Stripe size' in pv/lvdisplay.
2009-09-28 16:23:44 +00:00
Alasdair Kergon
595eaf925c Update lvm2_monitoring script. 2009-09-16 23:22:40 +00:00
Alasdair Kergon
90c8088760 More cmirror makefile fixes from Fabio. 2009-09-14 22:57:46 +00:00