master - nix: add more packages
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4f375d03dd2fba...
Commit: 4f375d03dd2fba5b32eb8547fdb0f95f30e0bc8c
Parent: f3a19fbe134086d46b29f9299074cc2a6c639fd7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 11:42:33 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 11:42:33 2015 +0200
nix: add more packages
---
nix/default.nix | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/nix/default.nix b/nix/default.nix
index 3879fc1..8a5521a 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -354,6 +354,8 @@ let
"valgrind" "valgrind-devel" "gdb" "strace"
"redhat-rpm-config" # needed for rpmbuild of lvm
"which" "e2fsprogs" # needed for fsadm
+ "e2fsprogs-libs" "e2fsprogs-devel"
+ "util-linux"
"perl-GD" # for lcov
"mdadm" # for tests with lvm2 and mdadm
"device-mapper-persistent-data" # thin and cache
@@ -370,7 +372,7 @@ let
fedora17 = fedora18 ++ [ "libudev-devel" ];
- fedora18 = [ "dlm-devel" "corosynclib-devel" "nc"
+ fedora18 = [ "dlm-devel" "corosynclib-devel" "nc" "libblkid" "libblkid-devel"
"dlm" "systemd-devel" "perl-Digest-MD5" "kernel-modules-extra" ];
fedora18u = fedora18;
9 years
master - spec: package old sysv initscript for lvmpolld
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f3a19fbe134086...
Commit: f3a19fbe134086d46b29f9299074cc2a6c639fd7
Parent: 64b40c5554599c48138820eca414c79ca3468a68
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 11:27:52 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 11:27:52 2015 +0200
spec: package old sysv initscript for lvmpolld
---
spec/packages.inc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index 0aaae1d..f315524 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -187,6 +187,9 @@ fi
%if %{have_service lvmetad}
%{_sysconfdir}/rc.d/init.d/lvm2-lvmetad
%endif
+ %if %{have_service lvmpolld}
+ %{_sysconfdir}/rc.d/init.d/lvm2-lvmpolld
+ %endif
%endif
##############################################################################
9 years
master - nix: add pkgconfig
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=64b40c5554599c...
Commit: 64b40c5554599c48138820eca414c79ca3468a68
Parent: a42c1c5728d28b8903725694afb3735dac62f11a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 11:15:20 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 11:15:56 2015 +0200
nix: add pkgconfig
Install for better config
---
nix/default.nix | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/nix/default.nix b/nix/default.nix
index 5c2e3d3..3879fc1 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -357,6 +357,7 @@ let
"perl-GD" # for lcov
"mdadm" # for tests with lvm2 and mdadm
"device-mapper-persistent-data" # thin and cache
+ "pkgconfig" # better support for config
"kernel"
];
centos63 = [ "clusterlib-devel" "openaislib-devel" "cman" "libudev-devel" "procps" "nc" ];
9 years
master - tests: respect @CONFDIR@/machine-id
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a42c1c5728d28b...
Commit: a42c1c5728d28b8903725694afb3735dac62f11a
Parent: 57a16abe2ce75f65306b70a4dd8e1cd45cbe385d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 10:51:34 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 10:52:55 2015 +0200
tests: respect @CONFDIR@/machine-id
Obtain location of machine-id.
NOTE: lvmconfig cannot dump 'life' value - should be fixed.
---
test/shell/system_id.sh | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/shell/system_id.sh b/test/shell/system_id.sh
index 3e3fa94..5bb5c3a 100644
--- a/test/shell/system_id.sh
+++ b/test/shell/system_id.sh
@@ -47,10 +47,12 @@ vgcreate $vg1 "$dev1"
check vg_field $vg1 systemid $SID
vgremove $vg1
-## machineid
+# FIXME - print 'life' config data
+eval $(lvmconfig global/etc 2>/dev/null || lvmconfig --type default global/etc)
-if [ -e /etc/machine-id ]; then
-SID=$(cat /etc/machine-id)
+## machineid
+if [ -e $etc/machine-id ]; then
+SID=$(cat $etc/machine-id)
aux lvmconf "global/system_id_source = machineid"
vgcreate $vg1 "$dev1"
vgs -o+systemid $vg1
@@ -608,8 +610,8 @@ rm -f $SIDFILE
# The commands should proceed without a system_id.
# Look at the warning/error messages.
-# vgcreate with source machineid, where no /etc/machine-id file exists
-if [ ! -e /etc/machine-id ]; then
+# vgcreate with source machineid, where no $etc/machine-id file exists
+if [ ! -e $etc/machine-id ]; then
SID=""
aux lvmconf "global/system_id_source = machineid"
vgcreate $vg1 "$dev1" 2>&1 | tee err
9 years
master - tests: do not use |&
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=57a16abe2ce75f...
Commit: 57a16abe2ce75f65306b70a4dd8e1cd45cbe385d
Parent: 1406aba8da1a74cc038ae0a8e71e940341b4b7ba
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 10:20:24 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 10:52:55 2015 +0200
tests: do not use |&
Bash 3.2 doesn't understand this syntax (i.e. RHEL5).
And it's even better - reports syntax error and return success.
---
test/shell/lvconvert-thin.sh | 8 ++++----
test/shell/lvcreate-cache.sh | 2 +-
test/shell/lvcreate-usage.sh | 4 ++--
test/shell/pv-duplicate-uuid.sh | 2 +-
test/shell/snapshot-usage.sh | 2 +-
test/shell/system_id.sh | 12 ++++++------
test/shell/vgchange-usage.sh | 6 +++---
test/shell/vgextend-restoremissing.sh | 2 +-
8 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh
index b510589..b833362 100644
--- a/test/shell/lvconvert-thin.sh
+++ b/test/shell/lvconvert-thin.sh
@@ -72,7 +72,7 @@ lvremove -f $vg
# Swaping of metadata volume
lvcreate -L1T -n $lv1 $vg
lvcreate -L32 -n $lv2 $vg
-lvconvert --yes -c 8M --type thin-pool $vg/$lv1 |& tee err
+lvconvert --yes -c 8M --type thin-pool $vg/$lv1 2>&1 | tee err
# Check tther is warning for large chunk size and zeroing enabled
grep "Pool zeroing and large" err
UUID=$(get lv_field $vg/$lv2 uuid)
@@ -109,7 +109,7 @@ invalid lvconvert -c 88 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
invalid lvconvert --yes --thinpool $vg/$lv3 -T $vg/$lv3
# Warning about smaller then suggested
-lvconvert --yes -c 256 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2 |& tee err
+lvconvert --yes -c 256 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2 2>&1 | tee err
grep "WARNING: Chunk size is smaller" err
lvremove -f $vg
@@ -117,7 +117,7 @@ lvremove -f $vg
lvcreate -L1T -n $lv1 $vg
lvcreate -L32G -n $lv2 $vg
# Warning about bigger then needed
-lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2 |& tee err
+lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2 2>&1 | tee err
grep "WARNING: Maximum" err
lvremove -f $vg
@@ -125,7 +125,7 @@ lvremove -f $vg
if test "$TSIZE" = 64T; then
lvcreate -L24T -n $lv1 $vg
# Warning about bigger then needed (24T data and 16G -> 128K chunk)
-lvconvert --yes -c 64 --thinpool $vg/$lv1 |& tee err
+lvconvert --yes -c 64 --thinpool $vg/$lv1 2>&1 | tee err
grep "WARNING: Chunk size is too small" err
lvremove -f $vg
fi
diff --git a/test/shell/lvcreate-cache.sh b/test/shell/lvcreate-cache.sh
index 9e245c6..aa0ab53 100644
--- a/test/shell/lvcreate-cache.sh
+++ b/test/shell/lvcreate-cache.sh
@@ -51,7 +51,7 @@ fail lvcreate -l 1 -H --name $vg/$lv4 --cachepool pool7
fail lvcreate -l 1 --cachepool pool8 $vg
# no size specified
-invalid lvcreate --cachepool pool $vg |& tee err
+invalid lvcreate --cachepool pool $vg 2>&1 | tee err
grep "specify either size or extents" err
# Check nothing has been created yet
diff --git a/test/shell/lvcreate-usage.sh b/test/shell/lvcreate-usage.sh
index 45fa850..d935503 100644
--- a/test/shell/lvcreate-usage.sh
+++ b/test/shell/lvcreate-usage.sh
@@ -125,7 +125,7 @@ lvcreate -aey -L 32m -n $lv --regionsize 4m --type mirror -m 1 $vg
check lv_field $vg/$lv regionsize "4.00m"
# -m0 is creating non-mirrored segment and give info about redundant option
-lvcreate -m 0 -l1 -n $lv1 $vg |& tee err
+lvcreate -m 0 -l1 -n $lv1 $vg 2>&1 | tee err
grep "Redundant" err
check lv_field $vg/$lv1 segtype "linear"
lvremove -ff $vg
@@ -177,7 +177,7 @@ fail lvcreate --persistent n --minor 234 -l1 $vg
fail lvcreate --minor 9999999 -l1 $vg
if aux kernel_at_least 2 4 0; then
# On >2.4 we ignore --major
-lvcreate --major 234 -l1 $vg |& tee err;
+lvcreate --major 234 -l1 $vg 2>&1 | tee err;
grep "Ignoring" err
# Try some bigger possibly unused minor
if test ! -d /sys/block/dm-2345; then
diff --git a/test/shell/pv-duplicate-uuid.sh b/test/shell/pv-duplicate-uuid.sh
index cc98384..7b8b42e 100644
--- a/test/shell/pv-duplicate-uuid.sh
+++ b/test/shell/pv-duplicate-uuid.sh
@@ -21,7 +21,7 @@ UUID1=$(get pv_field "$dev1" uuid)
pvcreate --config "devices{filter=[\"a|$dev2|\",\"r|.*|\"]}" -u "$UUID1" --norestorefile "$dev2"
pvcreate --config "devices{filter=[\"a|$dev3|\",\"r|.*|\"]}" -u "$UUID1" --norestorefile "$dev3"
-pvs -o+uuid |& tee out
+pvs -o+uuid 2>&1 | tee out
COUNT=$(should grep --count "Found duplicate" out)
# FIXME lvmetad is not able to serve properly this case
diff --git a/test/shell/snapshot-usage.sh b/test/shell/snapshot-usage.sh
index 68396aa..ed9d8cb 100644
--- a/test/shell/snapshot-usage.sh
+++ b/test/shell/snapshot-usage.sh
@@ -70,7 +70,7 @@ vgcreate -s 4M $vg $(cat DEVICES)
# Play with 1 extent
lvcreate -aey -l1 -n $lv $vg
# 100%LV is not supported for snapshot
-fail lvcreate -s -l 100%LV -n snap $vg/$lv |& tee out
+fail lvcreate -s -l 100%LV -n snap $vg/$lv 2>&1 | tee out
grep 'Please express size as %FREE, %ORIGIN, %PVS or %VG' out
# 100%ORIGIN needs to have enough space for all data and needs to round-up
lvcreate -s -l 100%ORIGIN -n $lv1 $vg/$lv
diff --git a/test/shell/system_id.sh b/test/shell/system_id.sh
index 78067e9..3e3fa94 100644
--- a/test/shell/system_id.sh
+++ b/test/shell/system_id.sh
@@ -612,7 +612,7 @@ rm -f $SIDFILE
if [ ! -e /etc/machine-id ]; then
SID=""
aux lvmconf "global/system_id_source = machineid"
-vgcreate $vg1 "$dev1" |& tee err
+vgcreate $vg1 "$dev1" 2>&1 | tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
grep "No system ID found from system_id_source" err
@@ -626,7 +626,7 @@ fi
SID=""
rm -f $LVMLOCAL
aux lvmconf "global/system_id_source = lvmlocal"
-vgcreate $vg1 "$dev1" |& tee err
+vgcreate $vg1 "$dev1" 2>&1 | tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
grep "No system ID found from system_id_source" err
@@ -641,7 +641,7 @@ echo "local {" > $LVMLOCAL
# echo " system_id = $SID" >> $LVMLOCAL
echo "}" >> $LVMLOCAL
aux lvmconf "global/system_id_source = lvmlocal"
-vgcreate $vg1 "$dev1" |& tee err
+vgcreate $vg1 "$dev1" 2>&1 | tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
grep "No system ID found from system_id_source" err
@@ -656,7 +656,7 @@ echo "local {" > $LVMLOCAL
echo " system_id = \"\"" >> $LVMLOCAL
echo "}" >> $LVMLOCAL
aux lvmconf "global/system_id_source = lvmlocal"
-vgcreate $vg1 "$dev1" |& tee err
+vgcreate $vg1 "$dev1" 2>&1 | tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
grep "No system ID found from system_id_source" err
@@ -668,7 +668,7 @@ SID=""
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
aux lvmconf "global/system_id_source = file"
-vgcreate $vg1 "$dev1" |& tee err
+vgcreate $vg1 "$dev1" 2>&1 | tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
grep "No system ID found from system_id_source" err
@@ -681,7 +681,7 @@ SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
-vgcreate $vg1 "$dev1" |& tee err
+vgcreate $vg1 "$dev1" 2>&1 | tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
grep "No system ID found from system_id_source" err
diff --git a/test/shell/vgchange-usage.sh b/test/shell/vgchange-usage.sh
index 7ee42a9..077b447 100644
--- a/test/shell/vgchange-usage.sh
+++ b/test/shell/vgchange-usage.sh
@@ -87,7 +87,7 @@ vgremove -ff $vg
# set cluster bit
vgcreate -cn $vg "$dev1" "$dev2" "$dev3"
# check prompt to change cluster bit without giving explicit vg name
-fail vgchange -cy |& tee out
+fail vgchange -cy 2>&1 | tee out
grep "y/n" out
check vg_attr_bit cluster $vg "-"
@@ -115,9 +115,9 @@ else
# can't switch with active LV
vgchange --yes -cy $vg
fail vgchange --yes -cy $vg
- fail vgs $vg |& tee out
+ fail vgs $vg 2>&1 | tee out
grep "Skipping clustered volume group" out
- vgs --ignoreskippedcluster $vg |& tee out
+ vgs --ignoreskippedcluster $vg 2>&1 | tee out
not grep "Skipping clustered volume group" out
# reset back to non-clustered VG with disabled locking
vgchange -cn $vg --config 'global{locking_type=0}' $vg
diff --git a/test/shell/vgextend-restoremissing.sh b/test/shell/vgextend-restoremissing.sh
index 5af5520..d8de96d 100644
--- a/test/shell/vgextend-restoremissing.sh
+++ b/test/shell/vgextend-restoremissing.sh
@@ -21,7 +21,7 @@ lvcreate -l 1 -n lv1 $vg "$dev1"
# vgextend require vgname
invalid vgextend
# --metadatacopies => use --pvmetadatacopies
-invalid vgextend --metadatacopies 3 $vg "$dev1" |& tee out
+invalid vgextend --metadatacopies 3 $vg "$dev1" 2>&1 | tee out
grep -- "use --pvmetadatacopies" out
# VG name should exist
9 years
master - nix: socat is quite new package
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1406aba8da1a74...
Commit: 1406aba8da1a74cc038ae0a8e71e940341b4b7ba
Parent: b7d80806b68a97cde6dfdf64ef7bc31e9c42a6b8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 09:49:54 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 10:52:55 2015 +0200
nix: socat is quite new package
Install 'nc' on older systems.
Test suite handles both.
---
nix/default.nix | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/nix/default.nix b/nix/default.nix
index b3acc0e..5c2e3d3 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -357,19 +357,19 @@ let
"perl-GD" # for lcov
"mdadm" # for tests with lvm2 and mdadm
"device-mapper-persistent-data" # thin and cache
- "socat" # used by test suite lvmpolld
"kernel"
];
- centos63 = [ "clusterlib-devel" "openaislib-devel" "cman" "libudev-devel" "procps" ];
+ centos63 = [ "clusterlib-devel" "openaislib-devel" "cman" "libudev-devel" "procps" "nc" ];
centos64 = centos63 ++ [ "corosynclib-devel" ];
centos65 = centos64;
centos66 = centos65;
centos70 = [ "dlm-devel" "dlm" "corosynclib-devel" "perl-Digest-MD5" "systemd-devel"
+ "socat" # used by test suite lvmpolld
"procps-ng" ];
fedora17 = fedora18 ++ [ "libudev-devel" ];
- fedora18 = [ "dlm-devel" "corosynclib-devel"
+ fedora18 = [ "dlm-devel" "corosynclib-devel" "nc"
"dlm" "systemd-devel" "perl-Digest-MD5" "kernel-modules-extra" ];
fedora18u = fedora18;
9 years
master - conf: system_id_source is referencing CONFDIR
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b7d80806b68a97...
Commit: b7d80806b68a97cde6dfdf64ef7bc31e9c42a6b8
Parent: 6fb2552ef47200af1e9b1a987cb3edfdc8f3ee66
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu May 14 10:50:21 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 10:52:55 2015 +0200
conf: system_id_source is referencing CONFDIR
Since we allow to configure /etc in configure and compile-in
dir for /etc we need to properly advertise this location later.
---
conf/example.conf.in | 2 +-
lib/config/config_settings.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index fc27a98..cc02e98 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -925,7 +925,7 @@ global {
# 'local' section of an lvm configuration file, e.g. lvmlocal.conf.
# uname - Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
- # machineid - Use the contents of the file /etc/machine-id to set the
+ # machineid - Use the contents of the file @CONFDIR@/machine-id to set the
# system ID. Some systems create this file at installation time.
# See 'man machine-id'.
# file - Use the contents of another file (system_id_file) to set
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 4fd886d..d1d35b1 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -903,7 +903,7 @@ cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_
"'local' section of an lvm configuration file, e.g. lvmlocal.conf.\n"
"uname - Set the system ID from the hostname (uname) of the system.\n"
"System IDs beginning localhost are not permitted.\n"
- "machineid - Use the contents of the file /etc/machine-id to set the\n"
+ "machineid - Use the contents of the file " DEFAULT_ETC_DIR "/machine-id to set the\n"
"system ID. Some systems create this file at installation time.\n"
"See 'man machine-id'.\n"
"file - Use the contents of another file (system_id_file) to set\n"
9 years
master - makefiles: protect CFLAGS
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6fb2552ef47200...
Commit: 6fb2552ef47200af1e9b1a987cb3edfdc8f3ee66
Parent: a2c9ede6b38f2a454e1a18fc4cac9dd06af04972
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 13 23:43:50 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 00:19:33 2015 +0200
makefiles: protect CFLAGS
When CFLAGS and LDFLAGS are passed into - protect them,
and avoid even recursive subdir 'extension' of them.
---
make.tmpl.in | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/make.tmpl.in b/make.tmpl.in
index 1aae6a2..7ff61fd 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -46,11 +46,11 @@ LIBS = @LIBS@
STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
-CFLAGS += @CFLAGS@
+CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@
CLDFLAGS += @CLDFLAGS@
ELDFLAGS += @ELDFLAGS@
LDDEPS += @LDDEPS@
-LDFLAGS += @LDFLAGS@
LIB_SUFFIX = @LIB_SUFFIX@
LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS)
DL_LIBS = @DL_LIBS@
@@ -204,8 +204,13 @@ endif
#WFLAGS += -pedantic -std=gnu99
#DEFS += -DDEBUG_CRC32
-CFLAGS += -fPIC @COPTIMISE_FLAG@
-LDFLAGS += @COPTIMISE_FLAG@
+#
+# Avoid recursive extension of CFLAGS
+# by checking whether CFLAGS already has fPIC string
+#
+ifeq (,$(findstring fPIC,$(CFLAGS)))
+
+CFLAGS += -fPIC
ifeq ("@DEBUG@", "yes")
CFLAGS += -g -fno-omit-frame-pointer
@@ -216,6 +221,10 @@ ifeq ("@DEBUG@", "yes")
endif
endif
+# end of fPIC protection
+endif
+
+
ifeq ("@INTL@", "yes")
DEFS += -DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\"
endif
9 years
master - makefiles: assign vars before include
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a2c9ede6b38f2a...
Commit: a2c9ede6b38f2a454e1a18fc4cac9dd06af04972
Parent: b184d7a2ca03d0ad82cc37007578e8c9d4fa0497
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 13 23:42:17 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 00:19:33 2015 +0200
makefiles: assign vars before include
Before we include, set INCLUDE and TARGETS.
Extend CFLAGS after include.
---
libdm/Makefile.in | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libdm/Makefile.in b/libdm/Makefile.in
index 8e057c3..852cab0 100644
--- a/libdm/Makefile.in
+++ b/libdm/Makefile.in
@@ -33,8 +33,7 @@ SOURCES =\
regex/ttree.c \
$(interface)/libdm-iface.c
-INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir)
-CFLAGS += $(UDEV_CFLAGS) $(VALGRIND_CFLAGS)
+INCLUDES = -I$(srcdir)/$(interface)
ifeq ("@STATIC_LINK@", "yes")
LIB_STATIC = $(interface)/libdevmapper.a
@@ -42,7 +41,7 @@ endif
LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
LIB_VERSION = $(LIB_VERSION_DM)
-TARGETS += libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION)
+TARGETS = libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION)
CFLOW_LIST = $(SOURCES)
CFLOW_LIST_TARGET = libdevmapper.cflow
@@ -52,6 +51,8 @@ EXPORTED_FN_PREFIX = dm
include $(top_builddir)/make.tmpl
+CFLAGS += $(UDEV_CFLAGS) $(VALGRIND_CFLAGS)
+
DEFS += -DDM_DEVICE_UID=@DM_DEVICE_UID@ -DDM_DEVICE_GID=@DM_DEVICE_GID@ \
-DDM_DEVICE_MODE=@DM_DEVICE_MODE@
9 years
master - makefiles: drop DEBUG mangling
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b184d7a2ca03d0...
Commit: b184d7a2ca03d0ad82cc37007578e8c9d4fa0497
Parent: 3fa66d103652df217059e2629da816adb9599e7c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 13 21:33:17 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 14 00:19:33 2015 +0200
makefiles: drop DEBUG mangling
DEBUG is already set through make.tmpl.
---
daemons/clvmd/Makefile.in | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/daemons/clvmd/Makefile.in b/daemons/clvmd/Makefile.in
index d51ea3d..38ff1c7 100644
--- a/daemons/clvmd/Makefile.in
+++ b/daemons/clvmd/Makefile.in
@@ -36,10 +36,6 @@ SOURCES = \
lvm-functions.c \
refresh_clvmd.c
-ifeq ("@DEBUG@", "yes")
- DEFS += -DDEBUG
-endif
-
ifneq (,$(findstring cman,, "@CLVMD@,"))
SOURCES += clvmd-cman.c
LMLIBS += $(CMAN_LIBS) $(CONFDB_LIBS) $(DLM_LIBS)
9 years