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

181 Commits

Author SHA1 Message Date
Zdenek Kabelac
f3c7bd4004 makefiles: use bash subshell
Avoid using  make's $(shell invocation since the eval order is
then somewhat different and use $$(  subshell.

This also fixes a problem when more then one symbol is found,
since target shell has been given separate word list
so the 'R' assignment would need "" around it.
2015-05-20 09:33:51 +02:00
Zdenek Kabelac
dc49e1cde0 configure: update localedir
Previous patch incorrectly skipped replace of @LOCALEDIR@.

The standard option is --localedir  so use --with-localedir
as backward compatible option and set localedir if it's not
yet been set (if the could ever happen).

Use double-eval to translate $datarootdir to $prefix to real dir.
2015-05-18 18:48:18 +02:00
Zdenek Kabelac
30c3bbcd9e makefiles: better clean
More exact clean of library exported symbols files.

Also use $(firstword) test to check for empty string
so 'make clean' has now cleaner condensed look.

Clean also created include links.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
bf2b1986c2 makefiles: use single target
Possibly  easier to follow - to have just a single dependency line
and use  if() within rule.

Also replace $(words) with $(firstword) which is more commonly used.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
fe00b163d6 configure: move DEFS to configure.h 2015-05-18 12:43:25 +02:00
Zdenek Kabelac
797c18d543 libdm: new dm_task_get_info with internal_suspend
Introduce new implmentation of dm_task_get_info() function
with support for reading internal_suspend.
.
This time it is done in a 'versioned' way.

We keep the old fashion dm_task_get_info(Base) to implement
the old behavior of 1.02.95 libdm code.

libdm version 1.02.96 introduced 'macro' wrapper
dm_task_get_info_with_deferred_remove with new implementation
of dm_task_get_info() - we cannot do anything else then to
provide compatible version of this symbol.

Now in version 1.02.97 we add new versioned implementation of
dm_task_get_info(DM_1_02_97) symbol.

This has the effect that i.e. rpm build will finaly resolve proper
dependency on a new symbol - so it will be no longer possible,
to build a new binary and use old library
(rpm -q --provides will show libdevmapper.so.1.02(DM_1_02_97)(64bit))

Also the history is now tracked. If a new function is added (or
reimplemented), it needs to be placed in proper file,
so it could be exported with right versioning symbol.
File .exported_symbols.Base should and any existing older DM
should be treated as read-only after a release.

Also - only libdm has been currently enhanced with versioned .Base
file, as soon as other libs (liblvm, libdevmapper-event) needs changes
they should also get their exported symbol files - meanwhile
make.tmpl handles both cases.
2015-05-15 16:48:22 +02:00
Zdenek Kabelac
a929606f2b makefiles: use srcdir
Use -I$(srcdir) as that's what we really want here.
For %.pot use all includes.
2015-05-14 14:19:22 +02:00
Zdenek Kabelac
6fb2552ef4 makefiles: protect CFLAGS
When CFLAGS and LDFLAGS are passed into - protect them,
and avoid even recursive subdir 'extension' of them.
2015-05-14 00:19:33 +02:00
Zdenek Kabelac
a8fc483ca4 makefiles: use fullpath when in assign
We need to put full path right in the assign moment,
otherwise command:

make rpm rpmbuild=/my/tmp/dir

cannot work as one would have expected.
2015-05-14 00:19:32 +02:00
Zdenek Kabelac
ea846f1ca2 makefiles: drop way too generic deps 2015-05-14 00:19:32 +02:00
Zdenek Kabelac
9c2a6de68f makefiles: runtime spec.inc
Support  CLEAN_DIRS
Var for rpmbuilddir
Use LN_S
Generate spec.inc at runtime for 'make rpm'.
2015-05-12 12:40:37 +02:00
Ondrej Kozina
e587b0677b lvmpolld: Add standalone polldaemon.
See doc/lvmpolld_overview.txt
2015-05-09 00:59:18 +01:00
Zdenek Kabelac
7f8d942268 makefiles: avoid // in datadir usage
DESTDIR already comes with '/'
2015-04-22 10:59:03 +02:00
David Teigland
47ed4cdc35 config: remove duplication of settings
The specific config settings have been removed
from the lvm.conf(5) man page, and replaced with
a description of how to use lvm dumpconfig to
view the settings.

The sample lvm.conf and lvmlocal.conf files are now generated:

example.conf.base  - initial ungenerated part of the file
example.conf.gen   - generated portion from dumpconfig
example.conf.in    - combination of .base and .gen files
example.conf       - result of configure processing .in file

lvmlocal.conf.base - initial ungenerated part of the file
lvmlocal.conf.gen  - generated portion from dumpconfig
lvmlocal.conf.in   - combination of .base and .gen files
lvmlocal.conf      - result of configure processing .in file

Do not edit the .in files, but edit config_settings.h
or the .base files, and then use 'make generate' to create
the new .in files.

- configure
  with options

- make
  creates tools/lvm

- make generate
  uses tools/lvm to create example.conf.in and lvmlocal.conf.in
  by combining .base files with dumpconfig output.

- configure
  with same options as above
  creates example.conf and lvmlocal.conf from .in files
2015-04-21 14:55:03 -05:00
Zdenek Kabelac
c6d96efc38 tests: few more warnings for gcc only
g++ doesn't like them.
2015-03-12 00:12:15 +01:00
Zdenek Kabelac
e7e499e80f makefiles: split gcc -W options
Avoid using gcc only Warnings for compilation of g++ object files.
2015-03-11 21:17:23 +01:00
Zdenek Kabelac
0982c5c79f configure: check for sync-nand
Check whether gcc support this flag.
Some older compilers (gcc version 4.3.2) miss it.
2015-03-10 14:10:18 +01:00
Zdenek Kabelac
b1002e98e0 makefiles: more _CFLAGS for -MM
Move of valgrind flags to _CFLAGS make the -MM generation
not compilable (d571eab3b2)

Add these _CFLAGS right into .c->.d rules
(as well as  UDEV)
2015-02-12 15:38:50 +01:00
Petr Rockai
d571eab3b2 configure: Look for valgrind.h independently of VALGRIND_POOLS. 2015-02-05 13:50:34 +01:00
Petr Rockai
9d6a92b4d0 configure: Add libexecdir/datadir to make.tmpl.in. 2015-02-05 13:47:16 +01:00
Petr Rockai
bf1f22cc99 configure: Allow C++ components. 2015-02-03 08:49:35 +01:00
Zdenek Kabelac
b72e9d3a93 makefiles: fix linking of PIE code
PIE documentation:
:
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html
http://lfs.osuosl.org/hlfs/view/unstable/glibc/chapter02/pie.html

suggest to suply -fPIE (or -fpie) with -pie
during executable compilation.

When -fPIC and -fPIE are used together - -fPIE wins

Drop usage of -DPIE - we are not using this flag anywhere

TODO: cleanup linking flags
2014-09-18 18:14:21 +02:00
Zdenek Kabelac
6d21438d0c debug: catch mmap with -DDEBUG_MEMLOCK 2014-09-18 00:48:06 +02:00
Peter Rajnoha
c774d9a3f3 so: make sure shared libs are built with RELRO option
In addition to using RELRO for daemons, use this option for shared
libraries. See also commit a65ab773b4.
2014-09-04 10:52:41 +02:00
Zdenek Kabelac
db77041d93 makefiles: include path missing
For deps calcs path for blkid.h needs to be known.
2014-08-29 13:10:20 +02:00
Alasdair G Kergon
c77197c688 make: Fix pofile and .d file generation.
Use builddir not srcdir with make pofile.

Append 'incfile:' lines to %.d files to handle newly-missing dependencies
without 'make clean' after a file is moved or deleted.
2014-07-02 00:48:50 +01:00
Zdenek Kabelac
93c2614e56 man: document DM_DEFAULT_NAME_MANGLING_MODE
Document DM_DEFAULT_NAME_MANGLING_MODE environmental variable.
(its default setting is build time configurable)
2014-06-05 17:47:21 +02:00
Marian Csontos
a31ab7c171 man: Fix man page containing BUILDROOT
This breaks brew/koji as DESTDIR should not be contained in any file and
results in message like:

    + /usr/lib/rpm/check-buildroot
    /builddir/build/BUILDROOT/lvm2-2.02.106-0.311.el7.x86_64/usr/share/man/man8/lvm2-activation-generator.8:.B /builddir/build/BUILDROOT/lvm2-2.02.106-0.311.el7.x86_64/usr/lib/systemd/system-generators/lvm2-activation-generator
    Found '/builddir/build/BUILDROOT/lvm2-2.02.106-0.311.el7.x86_64' in installed files; aborting
    error: Bad exit status from /var/tmp/rpm-tmp.UfX2SX (%install)
2014-03-14 00:36:19 +01:00
Zdenek Kabelac
7a595d7388 makefiles: use BLKID/UDEV_CFLAGS properly
blkid.h needs BLKID_CFLAGS
Do not add UDEV_CFLAGS everywhere and use it only when needed.
2014-03-06 17:30:06 +01:00
Ondrej Kozina
fd41dd8f9c Add systemd native service for clvmd and cluster activation
The commit splits original clvmd service in two new native services
for systemd enabled systems while original init scripts remain unaltered.

New systemd native services:

  1) clvmd daemon itself (lvm2_clvmd_red_hat.service.in)
  2) (de)activation of clustered VGs (lvm2_cluster_activation_red_hat.service.in)

There're several reasons to split it. First, there's no support for conditional
stop in systemd and AFAIK they don't plan to support it. In other words:
if the deactivation fails for some reason, systemd doesn't care and will simply
kill all remaining processes in original cgroup (by default). Killing the
remaining procs can be suppressed however it doesn't solve the following problem:

You can't repeat the stop command of a failed service. The repeated stop command
is simply not propagated to the service in a failed state. You would have to start
and then try to stop the service again. Unfortunately, this can't be done while
the daemon is still running (and we need the daemon to stay active until all
clustered VGs are deactivated properly).

In a separated setup we need only to restart the failed activation service and
that's fine.
2014-02-10 17:13:49 +01:00
Peter Rajnoha
481edce41f compile/link: use RELRO/PIE compiler/linker options for executables 2013-12-05 14:03:10 +01:00
Peter Rajnoha
a65ab773b4 daemons: use PIE and RELRO compiler/linker options
The PIE and RELRO compiler/linker options can be used to produce a code
some techniques applied that makes the code more immune to some attacks:

  - PIE (Position Independent Executable). It can make use of the ASLR
    (Address Space Layout Randomization) provided by kernel to avoid
    static locations for .text regions of executables (this is the 'pie'
    compiler and linker option)

  - RELRO (Relocation Read-Only). This prevents overwrite attacks of
    the GOT (Global Offset Table) and PLT (Procedure Lookup Table)
    used for relocations by making it read-only after all relocations
    are resolved (these are the 'relro' and 'now' linker options) -
    hence all symbols are resolved at the very start so there's no
    need for those tables to be writeable later.

These compiler/linker options are now used by default for daemons
if the compiler/linker supports it.
2013-12-04 13:30:08 +01:00
Zdenek Kabelac
fc37d4fb0d make: support per-object defines
In the case we have a dir with multiple objects and for
an individual object file we need special define -
allow to define it without adding extra rules.

To ensure dmeventd.o compilation will use EXTRA_FLAGS:
CFLAGS_dmeventd.o += $(EXTRA_FLAGS)

Then it's better to use:
dmeventd.o: CFLAGS += $(EXTRA_FLAGS)
2013-12-04 13:30:08 +01:00
Peter Rajnoha
9bfc0be493 configure: add --enable-blkid_wiping 2013-11-27 15:48:16 +01:00
Zdenek Kabelac
7943a13141 configure: check more compile flags
Check for clobbered (and put few others into same league)
2013-10-25 01:00:10 +02:00
Zdenek Kabelac
d95751cb0b configure: detect compiler flag
Use m4 macro AC_TRY_CCFLAG to detect presence of some compiler
option.
Use it to detect -Wjump-misses-init.
2013-10-25 00:41:36 +02:00
Alasdair G Kergon
c9c23d4148 build: Use additional gcc warning flags. 2013-10-24 17:10:24 +01:00
Alasdair G Kergon
36c5bb40a2 Makefiles: Fix CC variable override.
The CC override in commit f42b2d4bbf
caused the built-in value to be used instead of the configured value
when it wasn't being overridden.

The behaviour is explained here:
	http://stackoverflow.com/questions/18007326/how-to-change-default-values-of-variables-like-cc-in-makefile
2013-09-16 19:57:14 +01:00
Alasdair G Kergon
d13e87b9ef cleanup: comments and a message 2013-07-24 22:10:37 +01:00
Alasdair G Kergon
97df05ce10 python: Introduce pyexecdir
Use pyexecdir for $DESTDIR + $prefix
2013-07-24 22:07:10 +01:00
Peter Rajnoha
21554ab5fe profile: add default.profile and install it
The default.profile contains all settings that are customizable
by a profile. This default profile can be copied across to create
new profiles.
2013-07-02 15:22:11 +02:00
Alasdair G Kergon
2e4a66a761 make: fix exported symbols regex for non-GNU sed
Remove a couple of incorrect backslashes from expressions used to
generate lists of exported symbols so it works with busybox sed.
[John Spencer]
2013-05-14 19:29:26 +01:00
Petr Rockai
6a995bac43 configure: Respect pkg-config --cflags for udev. 2013-02-22 14:49:31 +01:00
Alasdair G Kergon
ee3cfa4184 python: Add bindings for liblvm2app.
Use configure --enable-python_bindings to generate them.

Note that the Makefiles do not yet control the owner or permissions of
the two new files on installation.
2012-10-12 02:08:47 +01:00
Petr Rockai
0a87fed794 Makefiles: Build libdaemonclient unconditionally. 2012-09-26 17:26:23 +02:00
Peter Rajnoha
fa68466e90 systemd: integrate lvm2 activation generator with conf+make 2012-07-31 16:46:24 +02:00
Alasdair G Kergon
05fb515863 veritysetup: Remove code as now in cryptsetup.
The veritysetup code has moved to the cryptsetup package.
  http://code.google.com/p/cryptsetup/
2012-06-11 16:12:20 +01:00
Zdenek Kabelac
a59c3731c3 Improve test suite
Add make help target.
Add LVM_TEST_PARALLEL to support parallel runs of tests
Work around the problem the dmsetup table/info may return error
by using dmtable and dminfo function that will use 'should'.
(Error happens when some concurently running process removes table
entry while dmsetup command resolves table entries inside the loop.)
2012-03-28 11:10:08 +00:00
Alasdair Kergon
6bbbcf42f8 Rename verity dir 2012-03-26 23:09:37 +00:00
Alasdair Kergon
7126d8c21b Reflect new file locations, include file updates etc. 2012-02-28 18:35:04 +00:00