Sign In
Sign Up
Search is temporarily disabled. See
ticket
for more info.
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
List overview
Download
lvm2-commits
August 2017
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
lvm2-commits@lists.fedorahosted.org
5 participants
50 discussions
Start a n
N
ew thread
master - configure: tune BUILD_DMEVENTD
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=95dd5bc7fb7dc818116ee…
Commit: 95dd5bc7fb7dc818116ee367aaa3079f410e2cf7 Parent: 92b53a80772a5a7f18c95ac4f3154a3cd4b1ce43 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Aug 1 18:17:06 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 18:17:06 2017 +0200 configure: tune BUILD_DMEVENTD Drop 'DMEVENT' make variable and use BUILD_DMEVENTD like with other daemons. NOTE: by default we do not build dmeventd - maybe time to change as lot of build targets basically do need dmeventd... Switch to use SYSTEMD_LIBS and avoid linking systemd library with every linked tool when dbus notification are enabled. (TODO add missing testing for lib presence) --- configure | 17 ++++++++--------- configure.in | 14 ++++++-------- make.tmpl.in | 5 +++-- man/Makefile.in | 2 +- scripts/Makefile.in | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 6c649cf..2afbe6e 100755 --- a/configure +++ b/configure @@ -704,7 +704,6 @@ FSADM ELDFLAGS DM_LIB_PATCHLEVEL DMEVENTD_PATH -DMEVENTD DL_LIBS DEVMAPPER DEFAULT_USE_LVMLOCKD @@ -12238,7 +12237,7 @@ if test "$NOTIFYDBUS_SUPPORT" = yes; then $as_echo "#define NOTIFYDBUS_SUPPORT 1" >>confdefs.h - LIBS="-lsystemd $LIBS" + SYSTEMD_LIBS="-lsystemd" fi ################################################################################ @@ -13917,15 +13916,15 @@ $as_echo "$BLKDEACTIVATE" >&6; } $as_echo_n "checking whether to use dmeventd... " >&6; } # Check whether --enable-dmeventd was given. if test "${enable_dmeventd+set}" = set; then : - enableval=$enable_dmeventd; DMEVENTD=$enableval + enableval=$enable_dmeventd; BUILD_DMEVENTD=$enableval +else + BUILD_DMEVENTD=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMEVENTD" >&5 -$as_echo "$DMEVENTD" >&6; } - -BUILD_DMEVENTD=$DMEVENTD +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DMEVENTD" >&5 +$as_echo "$BUILD_DMEVENTD" >&6; } -if test "$DMEVENTD" = yes; then +if test "$BUILD_DMEVENTD" = yes; then if test "$MIRRORS" != internal; then as_fn_error $? "--enable-dmeventd currently requires --with-mirrors=internal" "$LINENO" 5 fi @@ -15218,7 +15217,7 @@ done fi -if test "$DMEVENTD" = yes; then +if test "$BUILD_DMEVENTD" = yes; then for ac_header in arpa/inet.h do : ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" diff --git a/configure.in b/configure.in index a76f914..43e8652 100644 --- a/configure.in +++ b/configure.in @@ -1302,7 +1302,7 @@ AC_MSG_RESULT($NOTIFYDBUS_SUPPORT) if test "$NOTIFYDBUS_SUPPORT" = yes; then AC_DEFINE([NOTIFYDBUS_SUPPORT], 1, [Define to 1 to include code that uses dbus notification.]) - LIBS="-lsystemd $LIBS" + SYSTEMD_LIBS="-lsystemd" fi ################################################################################ @@ -1581,13 +1581,11 @@ dnl -- enable dmeventd handling AC_MSG_CHECKING(whether to use dmeventd) AC_ARG_ENABLE(dmeventd, AC_HELP_STRING([--enable-dmeventd], [enable the device-mapper event daemon]), - DMEVENTD=$enableval) -AC_MSG_RESULT($DMEVENTD) - -BUILD_DMEVENTD=$DMEVENTD + BUILD_DMEVENTD=$enableval, BUILD_DMEVENTD=no) +AC_MSG_RESULT($BUILD_DMEVENTD) dnl -- dmeventd currently requires internal mirror support -if test "$DMEVENTD" = yes; then +if test "$BUILD_DMEVENTD" = yes; then if test "$MIRRORS" != internal; then AC_MSG_ERROR([--enable-dmeventd currently requires --with-mirrors=internal]) fi @@ -1860,7 +1858,7 @@ if test "$CLUSTER" != none; then AC_CHECK_FUNCS(socket,,hard_bailout) fi -if test "$DMEVENTD" = yes; then +if test "$BUILD_DMEVENTD" = yes; then AC_CHECK_HEADERS(arpa/inet.h,,hard_bailout) fi @@ -2072,7 +2070,6 @@ AC_SUBST(DEVMAPPER) AC_SUBST(DLM_CFLAGS) AC_SUBST(DLM_LIBS) AC_SUBST(DL_LIBS) -AC_SUBST(DMEVENTD) AC_SUBST(DMEVENTD_PATH) AC_SUBST(DM_LIB_PATCHLEVEL) AC_SUBST(ELDFLAGS) @@ -2131,6 +2128,7 @@ AC_SUBST(SALCK_CFLAGS) AC_SUBST(SALCK_LIBS) AC_SUBST(SELINUX_LIBS) AC_SUBST(SELINUX_PC) +AC_SUBST(SYSTEMD_LIBS) AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) AC_SUBST(STATIC_LINK) diff --git a/make.tmpl.in b/make.tmpl.in index 20041f9..17276c3 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -62,7 +62,7 @@ CLDFLAGS += @CLDFLAGS@ ELDFLAGS += @ELDFLAGS@ LDDEPS += @LDDEPS@ LIB_SUFFIX = @LIB_SUFFIX@ -LVMINTERNAL_LIBS = -llvm-internal $(DMEVENT_LIBS) $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS) +LVMINTERNAL_LIBS = -llvm-internal $(DMEVENT_LIBS) $(DAEMON_LIBS) $(SYSTEMD_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS) DL_LIBS = @DL_LIBS@ RT_LIBS = @RT_LIBS@ M_LIBS = @M_LIBS@ @@ -73,6 +73,7 @@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ BLKID_CFLAGS = @BLKID_CFLAGS@ BLKID_LIBS = @BLKID_LIBS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ TESTING = @TESTING@ @@ -267,7 +268,7 @@ DAEMON_LIBS = -ldaemonclient LDFLAGS += -L$(top_builddir)/libdaemon/client CLDFLAGS += -L$(top_builddir)/libdaemon/client -ifeq ("@DMEVENTD@", "yes") +ifeq ("@BUILD_DMEVENTD@", "yes") DMEVENT_LIBS = -ldevmapper-event LDFLAGS += -L$(top_builddir)/daemons/dmeventd CLDFLAGS += -L$(top_builddir)/daemons/dmeventd diff --git a/man/Makefile.in b/man/Makefile.in index 219b2b9..b8f3aeb 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -85,7 +85,7 @@ else MAN8DM+=$(BLKDEACTIVATEMAN) endif - ifeq ("@DMEVENTD@", "yes") + ifeq ("@BUILD_DMEVENTD@", "yes") MAN8DM+=$(DMEVENTDMAN) endif diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 9c28956..b0d72c6 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -25,7 +25,7 @@ include $(top_builddir)/make.tmpl ifeq ("@APPLIB@", "yes") DEPLIBS += $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so LDFLAGS += -L$(top_builddir)/liblvm -ifeq ("@DMEVENTD@", "yes") +ifeq ("@BUILD_DMEVENTD@", "yes") LDFLAGS += -Wl,-rpath-link,$(top_builddir)/daemons/dmeventd endif LVMLIBS = @LVM2APP_LIB@ -ldevmapper
1
0
0
0
master - configure: improve test for realtime clock
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=92b53a80772a5a7f18c95…
Commit: 92b53a80772a5a7f18c95ac4f3154a3cd4b1ce43 Parent: a60fd5723645a56b677281007e6d5ed2493945cf Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Aug 1 12:41:45 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 14:03:54 2017 +0200 configure: improve test for realtime clock Check first if we need to even link -lrt - since clock functions are normally emebeded with recent glibc (>=2.17) Use standard RT_LIBS name. Avoid duplicate test for realtime clock with lvmlockd Show better error message when realtime clock support is missing or disabled. Link RT_LIBS explicitely with lvmlockd and lvmetad. --- configure | 38 +++++++++++++++++++++++++++----------- configure.in | 13 +++++++++---- daemons/lvmetad/Makefile.in | 2 +- daemons/lvmlockd/Makefile.in | 2 +- libdm/Makefile.in | 2 +- make.tmpl.in | 1 + 6 files changed, 40 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 8396e3e..6c649cf 100755 --- a/configure +++ b/configure @@ -660,7 +660,7 @@ SELINUX_PC SELINUX_LIBS REPLICATORS READLINE_LIBS -RT_LIB +RT_LIBS RAID PYTHON3DIR PYTHON2DIR @@ -14316,8 +14316,24 @@ fi fi ################################################################################ +RT_LIBS= +HAVE_REALTIME=no if test "$REALTIME" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 + for ac_func in clock_gettime +do : + ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_GETTIME 1 +_ACEOF + HAVE_REALTIME=yes +fi +done + + + if test "$HAVE_REALTIME" != yes; then : + # try again with -lrt + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 @@ -14354,17 +14370,15 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : - HAVE_REALTIME=yes -else - HAVE_REALTIME=no + RT_LIBS="-lrt"; HAVE_REALTIME=yes fi +fi if test "$HAVE_REALTIME" = yes; then $as_echo "#define HAVE_REALTIME 1" >>confdefs.h - RT_LIB="-lrt" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling realtime clock" >&5 $as_echo "$as_me: WARNING: Disabling realtime clock" >&2;} @@ -14876,13 +14890,15 @@ done fi if test "$BUILD_LVMLOCKD" = yes; then - for ac_func in clock_gettime strtoull + if test "$HAVE_REALTIME" != yes; then : + as_fn_error $? "Realtime clock support is mandatory for lvmlockd." "$LINENO" 5 +fi + for ac_func in strtoull do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_STRTOULL 1 _ACEOF else diff --git a/configure.in b/configure.in index 4e13679..a76f914 100644 --- a/configure.in +++ b/configure.in @@ -1671,12 +1671,16 @@ fi ################################################################################ dnl -- Check for realtime clock support +RT_LIBS= +HAVE_REALTIME=no if test "$REALTIME" = yes; then - AC_CHECK_LIB(rt, clock_gettime, HAVE_REALTIME=yes, HAVE_REALTIME=no) + AC_CHECK_FUNCS([clock_gettime], HAVE_REALTIME=yes) + + AS_IF([test "$HAVE_REALTIME" != yes], [ # try again with -lrt + AC_CHECK_LIB([rt], [clock_gettime], RT_LIBS="-lrt"; HAVE_REALTIME=yes)]) if test "$HAVE_REALTIME" = yes; then AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.]) - RT_LIB="-lrt" else AC_MSG_WARN(Disabling realtime clock) fi @@ -1835,7 +1839,8 @@ if test "$BUILD_CMIRRORD" = yes; then fi if test "$BUILD_LVMLOCKD" = yes; then - AC_CHECK_FUNCS(clock_gettime strtoull,,hard_bailout) + AS_IF([test "$HAVE_REALTIME" != yes], [AC_MSG_ERROR([Realtime clock support is mandatory for lvmlockd.])]) + AC_CHECK_FUNCS(strtoull,,hard_bailout) fi if test "$BUILD_LVMPOLLD" = yes; then @@ -2117,7 +2122,7 @@ AC_SUBST(PYTHON3DIR) AC_SUBST(QUORUM_CFLAGS) AC_SUBST(QUORUM_LIBS) AC_SUBST(RAID) -AC_SUBST(RT_LIB) +AC_SUBST(RT_LIBS) AC_SUBST(READLINE_LIBS) AC_SUBST(REPLICATORS) AC_SUBST(SACKPT_CFLAGS) diff --git a/daemons/lvmetad/Makefile.in b/daemons/lvmetad/Makefile.in index 44e10fa..1d901aa 100644 --- a/daemons/lvmetad/Makefile.in +++ b/daemons/lvmetad/Makefile.in @@ -32,7 +32,7 @@ CFLAGS_lvmetactl.o += $(EXTRA_EXEC_CFLAGS) CFLAGS_lvmetad-core.o += $(EXTRA_EXEC_CFLAGS) INCLUDES += -I$(top_srcdir)/libdaemon/server LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -LIBS += $(DAEMON_LIBS) -ldevmapper $(PTHREAD_LIBS) +LIBS += $(RT_LIBS) $(DAEMON_LIBS) -ldevmapper $(PTHREAD_LIBS) lvmetad: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a diff --git a/daemons/lvmlockd/Makefile.in b/daemons/lvmlockd/Makefile.in index 33038ec..8f16d06 100644 --- a/daemons/lvmlockd/Makefile.in +++ b/daemons/lvmlockd/Makefile.in @@ -36,7 +36,7 @@ include $(top_builddir)/make.tmpl CFLAGS += $(EXTRA_EXEC_CFLAGS) INCLUDES += -I$(top_srcdir)/libdaemon/server LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -LIBS += $(DAEMON_LIBS) -ldevmapper $(PTHREAD_LIBS) +LIBS += $(RT_LIBS) $(DAEMON_LIBS) -ldevmapper $(PTHREAD_LIBS) lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a diff --git a/libdm/Makefile.in b/libdm/Makefile.in index 7396cdc..66ec395 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -56,7 +56,7 @@ include $(top_builddir)/make.tmpl PROGS_CFLAGS = $(UDEV_CFLAGS) -LIBS += $(RT_LIB) $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) +LIBS += $(RT_LIBS) $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) device-mapper: all diff --git a/make.tmpl.in b/make.tmpl.in index 3a09a10..20041f9 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -64,6 +64,7 @@ LDDEPS += @LDDEPS@ LIB_SUFFIX = @LIB_SUFFIX@ LVMINTERNAL_LIBS = -llvm-internal $(DMEVENT_LIBS) $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS) DL_LIBS = @DL_LIBS@ +RT_LIBS = @RT_LIBS@ M_LIBS = @M_LIBS@ PTHREAD_LIBS = @PTHREAD_LIBS@ READLINE_LIBS = @READLINE_LIBS@
1
0
0
0
master - tests: update makefile
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a60fd5723645a56b67728…
Commit: a60fd5723645a56b677281007e6d5ed2493945cf Parent: 00fdf01d9d3885e7b1e2c3d92664423892811e25 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Aug 1 11:19:21 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:32 2017 +0200 tests: update makefile --- test/api/Makefile.in | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/test/api/Makefile.in b/test/api/Makefile.in index d474ddf..cc237df 100644 --- a/test/api/Makefile.in +++ b/test/api/Makefile.in @@ -42,21 +42,14 @@ include $(top_builddir)/make.tmpl DEFS += -D_REENTRANT DEPLIBS += $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so -LDFLAGS += -L$(top_builddir)/liblvm -LVMLIBS = @LVM2APP_LIB@ -ldevmapper - -ifeq ("@DMEVENTD@", "yes") - LVMLIBS += -ldevmapper-event - LDFLAGS += -L$(top_builddir)/daemons/dmeventd -endif - -LVMLIBS += $(LIBS) +LDFLAGS += -L$(top_builddir)/liblvm -L$(top_builddir)/daemons/dmeventd +LIBS += @LVM2APP_LIB@ $(DMEVENT_LIBS) -ldevmapper %.t: %.o $(DEPLIBS) - $(CC) -o $@ $(<) $(LDFLAGS) $(LVMLIBS) + $(CC) -o $@ $(<) $(LDFLAGS) $(LIBS) test: $(OBJECTS) $(DEPLIBS) - $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LVMLIBS) $(READLINE_LIBS) + $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) $(READLINE_LIBS) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status test/api/Makefile
1
0
0
0
master - makefiles: cleanups
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=00fdf01d9d3885e7b1e2c…
Commit: 00fdf01d9d3885e7b1e2c3d92664423892811e25 Parent: 2232e82d25382f499adf83cbc7525b281f4f8b92 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Mon Jul 31 23:58:51 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:32 2017 +0200 makefiles: cleanups --- daemons/clvmd/Makefile.in | 6 +++--- daemons/dmfilemapd/Makefile.in | 3 +-- daemons/lvmetad/Makefile.in | 2 +- lib/Makefile.in | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/daemons/clvmd/Makefile.in b/daemons/clvmd/Makefile.in index 170041f..7b1b49b 100644 --- a/daemons/clvmd/Makefile.in +++ b/daemons/clvmd/Makefile.in @@ -31,9 +31,9 @@ SALCK_LIBS = @SALCK_LIBS@ SALCK_CFLAGS = @SALCK_CFLAGS@ SOURCES = \ - clvmd-command.c \ - clvmd.c \ - lvm-functions.c \ + clvmd-command.c\ + clvmd.c\ + lvm-functions.c\ refresh_clvmd.c ifneq (,$(findstring cman,, "@CLVMD@,")) diff --git a/daemons/dmfilemapd/Makefile.in b/daemons/dmfilemapd/Makefile.in index f37ac1b..8a4938b 100644 --- a/daemons/dmfilemapd/Makefile.in +++ b/daemons/dmfilemapd/Makefile.in @@ -34,9 +34,8 @@ include $(top_builddir)/make.tmpl all: device-mapper device-mapper: $(TARGETS) -LIBS += -ldevmapper - CFLAGS_dmfilemapd.o += $(EXTRA_EXEC_CFLAGS) +LIBS += -ldevmapper dmfilemapd: $(LIB_SHARED) dmfilemapd.o $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ diff --git a/daemons/lvmetad/Makefile.in b/daemons/lvmetad/Makefile.in index 0473318..44e10fa 100644 --- a/daemons/lvmetad/Makefile.in +++ b/daemons/lvmetad/Makefile.in @@ -16,7 +16,7 @@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ SOURCES = lvmetad-core.c -SOURCES2 = testclient.c +SOURCES2 = lvmetactl.c TARGETS = lvmetad lvmetactl diff --git a/lib/Makefile.in b/lib/Makefile.in index 752f195..ddbd8de 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -48,6 +48,10 @@ ifeq ("@CACHE@", "shared") SUBDIRS += cache_segtype endif +ifeq ("@CLUSTER@", "shared") + SUBDIRS += locking +endif + SOURCES =\ activate/activate.c \ cache/lvmcache.c \ @@ -149,10 +153,6 @@ ifeq ("@CLUSTER@", "internal") SOURCES += locking/cluster_locking.c endif -ifeq ("@CLUSTER@", "shared") - SUBDIRS += locking -endif - ifeq ("@SNAPSHOTS@", "internal") SOURCES += snapshot/snapshot.c endif
1
0
0
0
master - makefiles: fixing linking
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2232e82d25382f499adf8…
Commit: 2232e82d25382f499adf83cbc7525b281f4f8b92 Parent: 918e867abe6a455a401346744820d9e54a977749 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Aug 1 00:01:07 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:30 2017 +0200 makefiles: fixing linking Avoid adding -g more then once for debug builds. Avoid enabling DEBUG_MEM when we build multithreaded tools. Link executables with -fPIE -pie and --export-dynamic LDFLAGS Introduce PROGS_FLAGS to add option to pass flags for external libs. Link lvm2 internally library only when really used. Link DAEMON_LIBS with daemons. Pass VALGRIND_CFLAGS internally Set shell failure mode on couple places. --- WHATS_NEW | 1 + daemons/clvmd/Makefile.in | 15 +++------------ daemons/cmirrord/Makefile.in | 2 +- daemons/dmeventd/Makefile.in | 12 +++++------- daemons/dmfilemapd/Makefile.in | 9 ++++----- daemons/lvmetad/Makefile.in | 15 ++++++--------- daemons/lvmlockd/Makefile.in | 26 ++++++++------------------ daemons/lvmpolld/Makefile.in | 12 ++++-------- lib/Makefile.in | 9 ++------- libdm/Makefile.in | 2 +- liblvm/Makefile.in | 5 +---- make.tmpl.in | 29 +++++++++++++++++++++-------- man/Makefile.in | 6 +++--- tools/Makefile.in | 13 +++---------- 14 files changed, 63 insertions(+), 93 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 515b0eb..46a944b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.174 - ================================= + Imporove makefiles' linking. Fix some paths in generated makefiles to respected configured settings. Add warning when creating thin-pool with zeroing and chunk size >= 512KiB. Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails. diff --git a/daemons/clvmd/Makefile.in b/daemons/clvmd/Makefile.in index 257afb2..170041f 100644 --- a/daemons/clvmd/Makefile.in +++ b/daemons/clvmd/Makefile.in @@ -72,26 +72,17 @@ endif TARGETS = \ clvmd -LVMLIBS = $(LVMINTERNAL_LIBS) - -ifeq ("@DMEVENTD@", "yes") - LVMLIBS += -ldevmapper-event -endif - include $(top_builddir)/make.tmpl -LVMLIBS += -ldevmapper -LIBS += $(PTHREAD_LIBS) - +LIBS += $(LVMINTERNAL_LIBS) -ldevmapper $(PTHREAD_LIBS) CFLAGS += -fno-strict-aliasing $(EXTRA_EXEC_CFLAGS) -LDFLAGS += $(EXTRA_EXEC_LDFLAGS) INSTALL_TARGETS = \ install_clvmd clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a - $(CC) $(CFLAGS) $(LDFLAGS) -o clvmd $(OBJECTS) \ - $(LVMLIBS) $(LMLIBS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ + -o clvmd $(OBJECTS) $(LMLIBS) $(LIBS) .PHONY: install_clvmd diff --git a/daemons/cmirrord/Makefile.in b/daemons/cmirrord/Makefile.in index 9d9dd7a..96e0db8 100644 --- a/daemons/cmirrord/Makefile.in +++ b/daemons/cmirrord/Makefile.in @@ -29,7 +29,7 @@ include $(top_builddir)/make.tmpl LIBS += -ldevmapper LMLIBS += $(CPG_LIBS) $(SACKPT_LIBS) CFLAGS += $(CPG_CFLAGS) $(SACKPT_CFLAGS) $(EXTRA_EXEC_CFLAGS) -LDFLAGS += $(EXTRA_EXEC_LDFLAGS) +LDFLAGS += $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) cmirrord: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \ diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in index 52ec938..d5241eb 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in @@ -56,18 +56,16 @@ include $(top_builddir)/make.tmpl all: device-mapper device-mapper: $(TARGETS) -LIBS += -ldevmapper -LVMLIBS += -ldevmapper-event $(PTHREAD_LIBS) - CFLAGS_dmeventd.o += $(EXTRA_EXEC_CFLAGS) +LIBS += -ldevmapper $(PTHREAD_LIBS) dmeventd: $(LIB_SHARED) dmeventd.o - $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -L. -o $@ dmeventd.o \ - $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic + $(CC) $(CFLAGS) -L. $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \ + -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a - $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ - dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ + -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) ifeq ("@PKGCONFIG@", "yes") INSTALL_LIB_TARGETS += install_pkgconfig diff --git a/daemons/dmfilemapd/Makefile.in b/daemons/dmfilemapd/Makefile.in index 53dc09b..f37ac1b 100644 --- a/daemons/dmfilemapd/Makefile.in +++ b/daemons/dmfilemapd/Makefile.in @@ -39,12 +39,12 @@ LIBS += -ldevmapper CFLAGS_dmfilemapd.o += $(EXTRA_EXEC_CFLAGS) dmfilemapd: $(LIB_SHARED) dmfilemapd.o - $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -L. -o $@ dmfilemapd.o \ - $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic + $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ + -o $@ dmfilemapd.o $(DL_LIBS) $(LIBS) dmfilemapd.static: $(LIB_STATIC) dmfilemapd.o $(interfacebuilddir)/libdevmapper.a - $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ - dmfilemapd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L$(interfacebuilddir) \ + -o $@ dmfilemapd.o $(DL_LIBS) $(LIBS) $(STATIC_LIBS) ifneq ("$(CFLOW_CMD)", "") CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES)) @@ -65,4 +65,3 @@ install_dmfilemapd: $(INSTALL_DMFILEMAPD_TARGETS) install: install_dmfilemapd install_device-mapper: install_dmfilemapd - diff --git a/daemons/lvmetad/Makefile.in b/daemons/lvmetad/Makefile.in index fa3bdf1..0473318 100644 --- a/daemons/lvmetad/Makefile.in +++ b/daemons/lvmetad/Makefile.in @@ -28,22 +28,19 @@ CFLOW_TARGET = lvmetad include $(top_builddir)/make.tmpl +CFLAGS_lvmetactl.o += $(EXTRA_EXEC_CFLAGS) +CFLAGS_lvmetad-core.o += $(EXTRA_EXEC_CFLAGS) INCLUDES += -I$(top_srcdir)/libdaemon/server -LVMLIBS = -ldaemonserver $(LVMINTERNAL_LIBS) -ldevmapper - -LIBS += $(PTHREAD_LIBS) - -LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) -CLDFLAGS += -L$(top_builddir)/libdaemon/server -CFLAGS += $(EXTRA_EXEC_CFLAGS) +LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) +LIBS += $(DAEMON_LIBS) -ldevmapper $(PTHREAD_LIBS) lvmetad: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LVMLIBS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) -ldaemonserver $(LIBS) lvmetactl: lvmetactl.o $(top_builddir)/libdaemon/client/libdaemonclient.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmetactl.o $(LVMLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmetactl.o $(LIBS) CLEAN_TARGETS += lvmetactl.o diff --git a/daemons/lvmlockd/Makefile.in b/daemons/lvmlockd/Makefile.in index 1b9d787..33038ec 100644 --- a/daemons/lvmlockd/Makefile.in +++ b/daemons/lvmlockd/Makefile.in @@ -19,10 +19,12 @@ SOURCES = lvmlockd-core.c ifeq ("@BUILD_LOCKDSANLOCK@", "yes") SOURCES += lvmlockd-sanlock.c + LOCK_LIBS += -lsanlock_client endif ifeq ("@BUILD_LOCKDDLM@", "yes") SOURCES += lvmlockd-dlm.c + LOCK_LIBS += -ldlm_lt endif TARGETS = lvmlockd lvmlockctl @@ -31,29 +33,17 @@ TARGETS = lvmlockd lvmlockctl include $(top_builddir)/make.tmpl +CFLAGS += $(EXTRA_EXEC_CFLAGS) INCLUDES += -I$(top_srcdir)/libdaemon/server -LVMLIBS = -ldaemonserver $(LVMINTERNAL_LIBS) -ldevmapper - -LIBS += $(PTHREAD_LIBS) - -ifeq ("@BUILD_LOCKDSANLOCK@", "yes") - LIBS += -lsanlock_client -endif - -ifeq ("@BUILD_LOCKDDLM@", "yes") - LIBS += -ldlm_lt -endif - -LDFLAGS += -L$(top_builddir)/libdaemon/server -CLDFLAGS += -L$(top_builddir)/libdaemon/server +LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) +LIBS += $(DAEMON_LIBS) -ldevmapper $(PTHREAD_LIBS) lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LVMLIBS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LOCK_LIBS) -ldaemonserver $(LIBS) -lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a \ - $(top_builddir)/libdaemon/server/libdaemonserver.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmlockctl.o $(LVMLIBS) +lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmlockctl.o $(LIBS) install_lvmlockd: lvmlockd $(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F) diff --git a/daemons/lvmpolld/Makefile.in b/daemons/lvmpolld/Makefile.in index 0bc2861..483758d 100644 --- a/daemons/lvmpolld/Makefile.in +++ b/daemons/lvmpolld/Makefile.in @@ -27,18 +27,14 @@ CFLOW_TARGET = lvmpolld include $(top_builddir)/make.tmpl +CFLAGS += $(EXTRA_EXEC_CFLAGS) INCLUDES += -I$(top_srcdir)/libdaemon/server -LVMLIBS = -ldaemonserver $(LVMINTERNAL_LIBS) -ldevmapper - -LIBS += $(PTHREAD_LIBS) - -LDFLAGS += -L$(top_builddir)/libdaemon/server $(DAEMON_LDFLAGS) -CLDFLAGS += -L$(top_builddir)/libdaemon/server -CFLAGS += $(DAEMON_CFLAGS) +LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) +LIBS += $(DAEMON_LIBS) -ldaemonserver -ldevmapper $(PTHREAD_LIBS) lvmpolld: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LVMLIBS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) install_lvmpolld: lvmpolld $(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F) diff --git a/lib/Makefile.in b/lib/Makefile.in index c75ffc2..752f195 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -204,11 +204,6 @@ ifeq ("@BUILD_LVMLOCKD@", "yes") locking/lvmlockd.c endif -ifeq ("@DMEVENTD@", "yes") - CLDFLAGS += -L$(top_builddir)/daemons/dmeventd - LIBS += -ldevmapper-event -endif - LIB_NAME = liblvm-internal LIB_STATIC = $(LIB_NAME).a @@ -229,9 +224,9 @@ endif CFLOW_LIST = $(SOURCES) CFLOW_LIST_TARGET = $(LIB_NAME).cflow -include $(top_builddir)/make.tmpl +PROGS_CFLAGS = $(BLKID_CFLAGS) $(UDEV_CFLAGS) -CFLAGS += $(BLKID_CFLAGS) $(UDEV_CFLAGS) $(VALGRIND_CFLAGS) +include $(top_builddir)/make.tmpl $(SUBDIRS): $(LIB_STATIC) diff --git a/libdm/Makefile.in b/libdm/Makefile.in index 5adf992..7396cdc 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -54,7 +54,7 @@ EXPORTED_FN_PREFIX = dm include $(top_builddir)/make.tmpl -CFLAGS += $(UDEV_CFLAGS) $(VALGRIND_CFLAGS) +PROGS_CFLAGS = $(UDEV_CFLAGS) LIBS += $(RT_LIB) $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) diff --git a/liblvm/Makefile.in b/liblvm/Makefile.in index 4a221ca..6d0325c 100644 --- a/liblvm/Makefile.in +++ b/liblvm/Makefile.in @@ -42,12 +42,9 @@ LDDEPS += $(top_builddir)/lib/liblvm-internal.a include $(top_builddir)/make.tmpl +LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -ifeq ("@DMEVENTD@", "yes") - LIBS += -ldevmapper-event -endif - .PHONY: install_dynamic install_static install_include install_pkgconfig INSTALL_TYPE = install_dynamic diff --git a/make.tmpl.in b/make.tmpl.in index 102079e..3a09a10 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -57,12 +57,12 @@ STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) DEFS += @DEFS@ # FIXME set this only where it's needed, not globally? CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ -LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@ +LDFLAGS ?= @LDFLAGS@ CLDFLAGS += @CLDFLAGS@ ELDFLAGS += @ELDFLAGS@ LDDEPS += @LDDEPS@ LIB_SUFFIX = @LIB_SUFFIX@ -LVMINTERNAL_LIBS = -llvm-internal $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS) +LVMINTERNAL_LIBS = -llvm-internal $(DMEVENT_LIBS) $(DAEMON_LIBS) $(UDEV_LIBS) $(DL_LIBS) $(BLKID_LIBS) DL_LIBS = @DL_LIBS@ M_LIBS = @M_LIBS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -235,12 +235,25 @@ ifeq (,$(findstring fPIC,$(CFLAGS))) CFLAGS += -fPIC ifeq ("@DEBUG@", "yes") - CFLAGS += -g -fno-omit-frame-pointer +ifeq (,$(findstring -g,$(CFLAGS))) + CFLAGS += -g +endif + CFLAGS += -fno-omit-frame-pointer DEFS += -DDEBUG # memory debugging is not thread-safe yet ifneq ("@DMEVENTD@", "yes") + ifneq ("@DMFILEMAPD@", "yes") + ifneq ("@LVMLOCKD@", "yes") + ifneq ("@LVMPOLLD@", "yes") + ifneq ("@LVMETAD@", "yes") + ifneq ("@CLVMD@", "yes") DEFS += -DDEBUG_MEM endif + endif + endif + endif + endif + endif endif # end of fPIC protection @@ -254,6 +267,7 @@ LDFLAGS += -L$(top_builddir)/libdaemon/client CLDFLAGS += -L$(top_builddir)/libdaemon/client ifeq ("@DMEVENTD@", "yes") + DMEVENT_LIBS = -ldevmapper-event LDFLAGS += -L$(top_builddir)/daemons/dmeventd CLDFLAGS += -L$(top_builddir)/daemons/dmeventd endif @@ -420,14 +434,13 @@ endif .LIBPATTERNS = lib%.so lib%.a %.o: %.c - $(CC) -c $(INCLUDES) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@ + $(CC) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@ %.o: %.cpp - $(CXX) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@ + $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@ %.pot: %.c Makefile - $(CC) -E $(INCLUDES) $(BLKID_CFLAGS) $(VALGRIND_CFLAGS) $(UDEV_CFLAGS) -include $(top_builddir)/include/pogen.h \ - $(DEFS) $(WFLAGS) $(CFLAGS) $< > $@ + $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/include/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $< >$@ %.so: %.o $(CC) -c $(CFLAGS) $(CLDFLAGS) $< $(LIBS) -o $@ @@ -477,7 +490,7 @@ $(LIB_STATIC): $(OBJECTS) set -e; \ FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \ DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \ - $(CC) -MM $(INCLUDES) $(BLKID_CFLAGS) $(VALGRIND_CFLAGS) $(UDEV_CFLAGS) $(DEFS) -o $@ $<; \ + $(CC) -MM $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) -o $@ $<; \ sed -i "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" $@; \ DEPLIST=`sed 's/ \\\\//;s/.*://;' < $@`; \ echo $$DEPLIST | fmt -1 | sed 's/ //g;s/\(.*\)/\1:/' >> $@; \ diff --git a/man/Makefile.in b/man/Makefile.in index f88b569..219b2b9 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -151,14 +151,14 @@ SEE_ALSO=$(srcdir)/see_also.end .PRECIOUS: %.8_gen %.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN) - ( \ + @( \ if [ ! -s $(TESTMAN) ] ; then \ echo "Copying pre-generated template $@" ; \ else \ echo "Generating template $@" ; \ fi \ ) - ( \ + set -e ; ( \ if [ ! -s $(TESTMAN) ] ; then \ cat $(srcdir)/$(@:%.8_gen=%.8_pregen) ; \ else \ @@ -276,7 +276,7 @@ install_all_man: install install_systemd_generators # Copy generated man pages back to source tree as fallback for machines where generator doesn't work pregenerated_man: all - for i in $(srcdir)/*.8_des; do \ + set -e ; for i in $(srcdir)/*.8_des; do \ CMD=`basename $$i .8_des`; \ cat $${CMD}.8_gen > $(srcdir)/$$CMD.8_pregen ; \ done diff --git a/tools/Makefile.in b/tools/Makefile.in index e18c8d7..de5b628 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -95,7 +95,7 @@ ifeq ("@STATIC_LINK@", "yes") INSTALL_CMDLIB_TARGETS += install_cmdlib_static endif -LVMLIBS = $(LVMINTERNAL_LIBS) +LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper LIB_VERSION = $(LIB_VERSION_LVM) CLEAN_TARGETS = liblvm2cmd.$(LIB_SUFFIX) $(TARGETS_DM) \ @@ -109,12 +109,6 @@ ifeq ("@CMDLIB@", "yes") INSTALL_LVM_TARGETS += $(INSTALL_CMDLIB_TARGETS) endif -ifeq ("@DMEVENTD@", "yes") - LVMLIBS += -ldevmapper-event -endif - -LVMLIBS += -ldevmapper - EXPORTED_HEADER = $(srcdir)/lvm2cmd.h EXPORTED_FN_PREFIX = lvm2 @@ -129,7 +123,7 @@ device-mapper: $(TARGETS_DM) CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS) dmsetup: dmsetup.o $(top_builddir)/libdm/libdevmapper.$(LIB_SUFFIX) - $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) -L$(top_builddir)/libdm \ + $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ -o $@ dmsetup.o -ldevmapper $(LIBS) dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a @@ -139,13 +133,12 @@ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a all: device-mapper CFLAGS_lvm.o += $(EXTRA_EXEC_CFLAGS) -CFLAGS_lvmcmdline.o += $(VALGRIND_CFLAGS) INCLUDES += -I$(top_builddir)/tools lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \ - $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic + $(LVMLIBS) $(READLINE_LIBS) $(LIBS) DEFS_man-generator.o += -DMAN_PAGE_GENERATOR
1
0
0
0
master - makefiles: use gcc warns with gcc only
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=918e867abe6a455a40134…
Commit: 918e867abe6a455a401346744820d9e54a977749 Parent: 57727bb4ebffb30cf21b151cc2f66bfd7d924a81 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Aug 1 00:04:20 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:13 2017 +0200 makefiles: use gcc warns with gcc only Avoid passing 'gcc' warning options to non-gcc compiler --- make.tmpl.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/make.tmpl.in b/make.tmpl.in index 2b2ddd1..102079e 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -163,6 +163,7 @@ INSTALL_SCRIPT = $(INSTALL) -p $(M_INSTALL_PROGRAM) .SUFFIXES: .SUFFIXES: .c .cpp .d .o .so .a .po .pot .mo .dylib +ifeq ("$(notdir $(CC))", "gcc") WFLAGS +=\ -Wall\ -Wcast-align\ @@ -207,6 +208,7 @@ endif ifeq ("@HAVE_WSYNCNAND@", "yes") WFLAGS += -Wsync-nand endif +endif ifneq ("@STATIC_LINK@", "yes") ifeq ("@HAVE_PIE@", "yes")
1
0
0
0
master - makefiles: RT_LIB
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=57727bb4ebffb30cf21b1…
Commit: 57727bb4ebffb30cf21b151cc2f66bfd7d924a81 Parent: 2593777f65da806e24d9b1a2c9cab25ff59c5351 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Mon Jul 31 23:56:58 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:13 2017 +0200 makefiles: RT_LIB Link -lrt directly only with libdevmapper. All other users get dependency transiently. --- configure | 2 +- configure.in | 2 +- libdm/Makefile.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index e1ae0e8..8396e3e 100755 --- a/configure +++ b/configure @@ -3170,6 +3170,7 @@ fi case "$host_os" in linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + # equivalent to -rdynamic ELDFLAGS="-Wl,--export-dynamic" # FIXME Generate list and use --dynamic-list=.dlopen.sym CLDWHOLEARCHIVE="-Wl,-whole-archive" @@ -14363,7 +14364,6 @@ fi $as_echo "#define HAVE_REALTIME 1" >>confdefs.h - LIBS="-lrt $LIBS" RT_LIB="-lrt" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling realtime clock" >&5 diff --git a/configure.in b/configure.in index 2e5e015..4e13679 100644 --- a/configure.in +++ b/configure.in @@ -31,6 +31,7 @@ AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"]) case "$host_os" in linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + # equivalent to -rdynamic ELDFLAGS="-Wl,--export-dynamic" # FIXME Generate list and use --dynamic-list=.dlopen.sym CLDWHOLEARCHIVE="-Wl,-whole-archive" @@ -1675,7 +1676,6 @@ if test "$REALTIME" = yes; then if test "$HAVE_REALTIME" = yes; then AC_DEFINE([HAVE_REALTIME], 1, [Define to 1 to include support for realtime clock.]) - LIBS="-lrt $LIBS" RT_LIB="-lrt" else AC_MSG_WARN(Disabling realtime clock) diff --git a/libdm/Makefile.in b/libdm/Makefile.in index 3c9a4ce..5adf992 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -56,7 +56,7 @@ include $(top_builddir)/make.tmpl CFLAGS += $(UDEV_CFLAGS) $(VALGRIND_CFLAGS) -LIBS += $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) +LIBS += $(RT_LIB) $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(M_LIBS) device-mapper: all
1
0
0
0
master - libdm: log_warn
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2593777f65da806e24d9b…
Commit: 2593777f65da806e24d9b1a2c9cab25ff59c5351 Parent: c1b5f38bbe30e14f33a0cd76eed74c48280865ee Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Mon Jul 24 14:40:41 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:12 2017 +0200 libdm: log_warn No real effect anyway - function returs '1' in all paths, but just make sure we do not have 'log_error()' on non-error path. --- libdm/libdm-deptree.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index cf4fd62..b0a48f3 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -938,7 +938,7 @@ static int _info_by_dev(uint32_t major, uint32_t minor, int with_open_count, } if (!with_open_count && !dm_task_no_open_count(dmt)) - log_error("Failed to disable open_count"); + log_warn("WARNING: Failed to disable open_count."); if (!(r = dm_task_run(dmt))) goto_out; @@ -1053,7 +1053,7 @@ static int _deactivate_node(const char *name, uint32_t major, uint32_t minor, } if (!dm_task_no_open_count(dmt)) - log_error("Failed to disable open_count"); + log_warn("WARNING: Failed to disable open_count."); if (cookie) if (!dm_task_set_cookie(dmt, cookie, udev_flags)) @@ -1343,7 +1343,7 @@ static int _rename_node(const char *old_name, const char *new_name, uint32_t maj goto_out; if (!dm_task_no_open_count(dmt)) - log_error("Failed to disable open_count"); + log_warn("WARNING: Failed to disable open_count."); if (!dm_task_set_cookie(dmt, cookie, udev_flags)) goto out; @@ -1384,10 +1384,10 @@ static int _resume_node(const char *name, uint32_t major, uint32_t minor, } if (!dm_task_no_open_count(dmt)) - log_error("Failed to disable open_count"); + log_warn("WARNING: Failed to disable open_count."); if (!dm_task_set_read_ahead(dmt, read_ahead, read_ahead_flags)) - log_error("Failed to set read ahead"); + log_warn("WARNING: Failed to set read ahead."); if (!dm_task_set_cookie(dmt, cookie, udev_flags)) goto_out; @@ -1430,13 +1430,13 @@ static int _suspend_node(const char *name, uint32_t major, uint32_t minor, } if (!dm_task_no_open_count(dmt)) - log_error("Failed to disable open_count"); + log_warn("WARNING: Failed to disable open_count."); if (skip_lockfs && !dm_task_skip_lockfs(dmt)) - log_error("Failed to set skip_lockfs flag."); + log_warn("WARNING: Failed to set skip_lockfs flag."); if (no_flush && !dm_task_no_flush(dmt)) - log_error("Failed to set no_flush flag."); + log_warn("WARNING: Failed to set no_flush flag."); if ((r = dm_task_run(dmt))) { inc_suspended(); @@ -1467,7 +1467,7 @@ static int _thin_pool_get_status(struct dm_tree_node *dnode, } if (!dm_task_no_flush(dmt)) - log_warn("Can't set no_flush flag."); /* Non fatal */ + log_warn("WARNING: Can't set no_flush flag."); /* Non fatal */ if (!dm_task_run(dmt)) goto_out; @@ -2031,7 +2031,7 @@ static int _create_node(struct dm_tree_node *dnode) } if (!dm_task_no_open_count(dmt)) - log_error("Failed to disable open_count"); + log_warn("WARNING: Failed to disable open_count."); if ((r = dm_task_run(dmt))) { if (!(r = dm_task_get_info(dmt, &dnode->info)))
1
0
0
0
master - man: fix generated paths
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c1b5f38bbe30e14f33a0c…
Commit: c1b5f38bbe30e14f33a0cd76eed74c48280865ee Parent: 8256170e6a2dbed15b790e75f5d1026e3de69a16 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Tue Aug 1 11:17:04 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:53:11 2017 +0200 man: fix generated paths Use user configured paths instead of some developers paths ;) --- WHATS_NEW | 1 + make.tmpl.in | 1 + man/Makefile.in | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 41ddda7..515b0eb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.174 - ================================= + Fix some paths in generated makefiles to respected configured settings. Add warning when creating thin-pool with zeroing and chunk size >= 512KiB. Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails. Add synchronization points with udev during reshape of raid LVs. diff --git a/make.tmpl.in b/make.tmpl.in index cb5953a..2b2ddd1 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -123,6 +123,7 @@ DEFAULT_CACHE_DIR = $(DEFAULT_SYS_DIR)/@DEFAULT_CACHE_SUBDIR@ DEFAULT_PROFILE_DIR = $(DEFAULT_SYS_DIR)/@DEFAULT_PROFILE_SUBDIR@ DEFAULT_LOCK_DIR = @DEFAULT_LOCK_DIR@ DEFAULT_RUN_DIR = @DEFAULT_RUN_DIR@ +DEFAULT_PID_DIR = @DEFAULT_PID_DIR@ DEFAULT_MANGLING = @MANGLING@ # Setup vpath search paths for some suffixes diff --git a/man/Makefile.in b/man/Makefile.in index d0efb5d..f88b569 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -179,10 +179,10 @@ $(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \ -e "s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+" \ -e "s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+" \ -e "s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+" \ - -e "s+#CLVMD_PATH#+/data/lvmtest/usr/sbin/clvmd+" \ - -e "s+#LVM_PATH#+/data/lvmtest/sbin/lvm+" \ - -e "s+#DEFAULT_RUN_DIR#+/var/run/lvm+" \ - -e "s+#DEFAULT_PID_DIR#+/var/run+" \ + -e "s+#CLVMD_PATH#+$(exec_prefix)/clvmd+" \ + -e "s+#LVM_PATH#+$(exec_prefix)/lvm+" \ + -e "s+#DEFAULT_RUN_DIR#+$(DEFAULT_RUN_DIR)+" \ + -e "s+#DEFAULT_PID_DIR#+$(DEFAULT_PID_DIR)+" \ -e "s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+" \ -e "s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+" $< > $@ endef
1
0
0
0
master - thin: warn about too big chunks size
by Zdenek Kabelac
01 Aug '17
01 Aug '17
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8256170e6a2dbed15b790…
Commit: 8256170e6a2dbed15b790e75f5d1026e3de69a16 Parent: 3654f478e1beab950f9ee91bc2fd759d22552e1c Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Fri Jul 21 20:58:33 2017 +0200 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Tue Aug 1 11:52:27 2017 +0200 thin: warn about too big chunks size lvm2 warned about zeroing and too big chunksize (>=512KiB), but only during lvconvert, so lvcreate was creating thin-pools without any warning about possible slowness of thin provisioning because of zeroing. --- WHATS_NEW | 1 + lib/metadata/thin_manip.c | 13 ++++++++++++- tools/lvconvert.c | 5 ----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 20da268..41ddda7 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.174 - ================================= + Add warning when creating thin-pool with zeroing and chunk size >= 512KiB. Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails. Add synchronization points with udev during reshape of raid LVs. diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c index 88dc51a..bd2d2c3 100644 --- a/lib/metadata/thin_manip.c +++ b/lib/metadata/thin_manip.c @@ -752,8 +752,19 @@ int update_thin_pool_params(struct cmd_context *cmd, !set_pool_discards(discards, DEFAULT_THIN_POOL_DISCARDS)) return_0; - if (*zero_new_blocks == THIN_ZERO_UNSELECTED) + if (*zero_new_blocks == THIN_ZERO_UNSELECTED) { *zero_new_blocks = (DEFAULT_THIN_POOL_ZERO) ? THIN_ZERO_YES : THIN_ZERO_NO; + log_verbose("%s pool zeroing on default.", (*zero_new_blocks == THIN_ZERO_YES) ? + "Enabling" : "Disabling"); + } + + if ((*zero_new_blocks == THIN_ZERO_YES) && + (*chunk_size >= DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE * 2)) { + log_warn("WARNING: Pool zeroing and %s large chunk size slows down thin provisioning.", + display_size(cmd, *chunk_size)); + log_warn("WARNING: Consider disabling zeroing (-Zn) or using smaller chunk size (<%s).", + display_size(cmd, DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE * 2)); + } log_verbose("Preferred pool metadata size %s.", display_size(cmd, (uint64_t)*pool_metadata_extents * extent_size)); diff --git a/tools/lvconvert.c b/tools/lvconvert.c index d90e675..94dee9d 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -3088,11 +3088,6 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, if (!vg_write(vg) || !vg_commit(vg)) goto_bad; - if ((seg->zero_new_blocks == THIN_ZERO_YES) && - seg->chunk_size >= DEFAULT_THIN_POOL_CHUNK_SIZE_PERFORMANCE * 2) - log_warn("WARNING: Pool zeroing and large %s chunk size slows down provisioning.", - display_size(cmd, seg->chunk_size)); - if (activate_pool && !lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { log_error("Failed to lock pool LV %s.", display_lvname(pool_lv)); goto out;
1
0
0
0
← Newer
1
2
3
4
5
Older →
Jump to page:
1
2
3
4
5
Results per page:
10
25
50
100
200