fix an error message when running configure
PATCH 1/1 fix an error message when running configure
Fix an error reported by configure
This code path calls "$PKG_CONFIG" without initializing the PKG_CONFIG variable. It results in this error when running ./configure:
"./configure: line 9757: --variable=systemdsystemunitdir: command not found"
The patch changes it so that we try to find pkg_config and initialize $PKG_CONFIG. If pkg-config isn't found and the variable is still empty, we don't try to run "$PKG_CONFIG"
--- configure.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
configure.in +7 -1
@@ -1208,7 +1208,13 @@ AC_ARG_WITH(systemdsystemunitdir, AC_HELP_STRING([--with-systemdsystemunitdir=DIR], [systemd service files in DIR]), systemdsystemunitdir=$withval, - pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)) + if test x$PKGCONFIG_INIT != x1; then + pkg_config_init + fi + if test -n "$PKG_CONFIG"; then + pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) + fi + ) if test -n "$pkg_systemdsystemunitdir"; then systemdsystemunitdir=$pkg_systemdsystemunitdir;
PATCH 1/1 integrate veritysetup to lvm
Hi
This patch integrates veritysetup to lvm build. Use --enable-veritysetup to enable it.
For hashing, it supports openssl, nss, gcrypt.
If you want to force a specific crypto library, use --enable-veritysetup=openssl --enable-veritysetup=nss --enable-veritysetup=gcrypt
For sha256 hash, openssl is the fastest, then comes nss and gcrypt is the slowest.
Mikulas
---
veritysetup
This patch integrates veritysetup into LVM tree.
--- Makefile.in | 8 configure.in | 64 +++ veritysetup/Makefile.in | 31 + veritysetup/veritysetup.c | 948 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1050 insertions(+), 1 deletion(-)
configure.in +64 -0
@@ -62,6 +62,8 @@ case "$host_os" in ;; esac +VERITYSETUP=no + ################################################################################ dnl -- Checks for programs. AC_PROG_SED
@@ -1012,6 +1014,67 @@ if test x$DMEVENTD = xyes; then fi ################################################################################ +dnl -- enable veritysetup +AC_MSG_CHECKING(whether to install veritysetup) +AC_ARG_ENABLE(veritysetup, AC_HELP_STRING([--enable-veritysetup], [install veritysetup]), + VERITYSETUP=$enableval) +AC_MSG_RESULT($VERITYSETUP) + +if test x$VERITYSETUP != xno -a x$VERITYSETUP != x; then + if test x$PKGCONFIG_INIT != x1; then + pkg_config_init + fi + + dnl Test OPENSSL + if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xopenssl; then + PKG_CHECK_MODULES(OPENSSL, openssl, [ + VERITYSETUP_CFLAGS="$OPENSSL_CFLAGS -DCRYPT_OPENSSL" + VERITYSETUP_LIBS="`echo "$OPENSSL_LIBS" | sed 's/-lssl\>//'`" + ], [ + AC_CHECK_LIB(crypto, EVP_get_digestbyname, [ + AC_CHECK_HEADER(openssl/evp.h, [ + VERITYSETUP_CFLAGS="-DCRYPT_OPENSSL" + VERITYSETUP_LIBS="-lcrypto" + ]) + ]) + ]) + fi + + dnl Test NSS + if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xnss; then + PKG_CHECK_MODULES(NSS, nss, [ + VERITYSETUP_CFLAGS="$NSS_CFLAGS -DCRYPT_NSS" + VERITYSETUP_LIBS="`echo "$NSS_LIBS" | sed 's/-lsmime3\>//' | sed 's/-lssl3\>//'`" + ], true) + fi + + dnl Test GCRYPT + if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xgcrypt; then + AC_CHECK_LIB(gcrypt, gcry_md_map_name, [ + AC_CHECK_HEADER(gcrypt.h, [ + VERITYSETUP_CFLAGS="-DCRYPT_GCRYPT" + VERITYSETUP_LIBS="-lgcrypt" + ]) + ]) + fi + + if test -z "$VERITYSETUP_CFLAGS"; then + AC_MSG_ERROR(No cryptographic library for veritysetup found) + fi + AC_CHECK_LIB(popt, poptGetContext, true, [ + AC_MSG_ERROR(popt library was not found) + ]) + AC_CHECK_HEADER(popt.h, true, [ + AC_MSG_ERROR(popt.h was not found) + ]) + VERITYSETUP_LIBS="$VERITYSETUP_LIBS -lpopt" + AC_SUBST(VERITYSETUP_CFLAGS) + AC_SUBST(VERITYSETUP_LIBS) + VERITYSETUP=yes +fi +AC_SUBST(VERITYSETUP) + +################################################################################ dnl -- getline included in recent libc AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
@@ -1561,6 +1624,7 @@ udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile +veritysetup/Makefile ]) AC_OUTPUT
Makefile.in +7 -1
@@ -36,12 +36,16 @@ ifeq ("@BUILD_LVMETAD@", "yes") SUBDIRS += libdaemon endif +ifeq ("@VERITYSETUP@", "yes") + SUBDIRS += veritysetup +endif + # FIXME Should use intermediate Makefiles here! ifeq ($(MAKECMDGOALS),distclean) SUBDIRS = doc include man scripts \ libdaemon lib tools daemons libdm \ udev po liblvm test \ - unit-tests/datastruct unit-tests/mm unit-tests/regex + unit-tests/datastruct unit-tests/mm unit-tests/regex veritysetup endif DISTCLEAN_DIRS += lcov_reports* DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
@@ -53,6 +57,7 @@ lib: libdm libdaemon liblvm: lib daemons: lib libdaemon tools tools: lib libdaemon device-mapper +veritysetup: libdm po: tools daemons lib.device-mapper: include.device-mapper
@@ -60,6 +65,7 @@ libdm.device-mapper: include.device-mapp liblvm.device-mapper: include.device-mapper daemons.device-mapper: libdm.device-mapper tools.device-mapper: libdm.device-mapper +veritysetup.device-mapper: libdm.device-mapper device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper ifeq ("@INTL@", "yes")
veritysetup/Makefile.in new file +31 -0
@@ -0,0 +1,31 @@ +# Copyright (C) 2012 Red Hat, Inc. All rights reserved. +# +# This file is part of the device-mapper userspace tools. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU Lesser General Public License v.2.1. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ + +SOURCES = veritysetup.c + +TARGETS = veritysetup + +INCLUDES += @VERITYSETUP_CFLAGS@ + +include $(top_builddir)/make.tmpl + +VERITYSETUP_LIBS = @VERITYSETUP_LIBS@ + +veritysetup: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) -o veritysetup $(OBJECTS) $(VERITYSETUP_LIBS) + +install: $(TARGETS) + $(INSTALL_PROGRAM) -D veritysetup $(sbindir)/veritysetup
veritysetup/veritysetup.c new file +948 -0
948 lines not on this page · raw message
PATCH 1/1 integrate veritysetup to lvm
Dne 22.3.2012 04:33, Mikulas Patocka napsal(a):
Quoted 6 lines
Hi
This patch integrates veritysetup to lvm build. Use --enable-veritysetup to enable it.
Quoted 7 lines
--- Makefile.in | 8 configure.in | 64 +++ veritysetup/Makefile.in | 31 + veritysetup/veritysetup.c | 948 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1050 insertions(+), 1 deletion(-)
Why not using /tools like with do with the rest ?
Also I think some basic man page with examples of usage needs to be bundled with introduction of new supported tool.
Zdenek
PATCH 1/1 integrate veritysetup to lvm
Quoted 1 line · Zdenek Kabelac
Why not using /tools like with do with the rest ?
As we intend to package it separately, I think it makes it dependencies more straightforward at the moment.
Alasdair
PATCH 1/1 integrate veritysetup to lvm
In reply to Zdenek KabelacQuoted 6 lines · Zdenek Kabelac
Why not using /tools like with do with the rest ?
Also I think some basic man page with examples of usage needs to be bundled with introduction of new supported tool.
Zdenek
/tools contains the lvm tool and all its commands. veritysetup is a separate program, it has nothing to do with lvm.
Mikulas
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 integrate veritysetup to lvm
This is an updated patch without POPT_ARG_LONGLONG (and it also fixes another bug --- zero device size was wrongly stored into the superblock).
---
veritysetup
This patch integrates veritysetup into LVM tree.
--- Makefile.in | 8 configure.in | 64 +++ veritysetup/Makefile.in | 31 + veritysetup/veritysetup.c | 974 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1076 insertions(+), 1 deletion(-)
configure.in +64 -0
@@ -62,6 +62,8 @@ case "$host_os" in ;; esac +VERITYSETUP=no + ################################################################################ dnl -- Checks for programs. AC_PROG_SED
@@ -1012,6 +1014,67 @@ if test x$DMEVENTD = xyes; then fi ################################################################################ +dnl -- enable veritysetup +AC_MSG_CHECKING(whether to install veritysetup) +AC_ARG_ENABLE(veritysetup, AC_HELP_STRING([--enable-veritysetup], [install veritysetup]), + VERITYSETUP=$enableval) +AC_MSG_RESULT($VERITYSETUP) + +if test x$VERITYSETUP != xno -a x$VERITYSETUP != x; then + if test x$PKGCONFIG_INIT != x1; then + pkg_config_init + fi + + dnl Test OPENSSL + if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xopenssl; then + PKG_CHECK_MODULES(OPENSSL, openssl, [ + VERITYSETUP_CFLAGS="$OPENSSL_CFLAGS -DCRYPT_OPENSSL" + VERITYSETUP_LIBS="`echo "$OPENSSL_LIBS" | sed 's/-lssl\>//'`" + ], [ + AC_CHECK_LIB(crypto, EVP_get_digestbyname, [ + AC_CHECK_HEADER(openssl/evp.h, [ + VERITYSETUP_CFLAGS="-DCRYPT_OPENSSL" + VERITYSETUP_LIBS="-lcrypto" + ]) + ]) + ]) + fi + + dnl Test NSS + if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xnss; then + PKG_CHECK_MODULES(NSS, nss, [ + VERITYSETUP_CFLAGS="$NSS_CFLAGS -DCRYPT_NSS" + VERITYSETUP_LIBS="`echo "$NSS_LIBS" | sed 's/-lsmime3\>//' | sed 's/-lssl3\>//'`" + ], true) + fi + + dnl Test GCRYPT + if test -z "$VERITYSETUP_CFLAGS" && test x$VERITYSETUP = xyes -o x$VERITYSETUP = xgcrypt; then + AC_CHECK_LIB(gcrypt, gcry_md_map_name, [ + AC_CHECK_HEADER(gcrypt.h, [ + VERITYSETUP_CFLAGS="-DCRYPT_GCRYPT" + VERITYSETUP_LIBS="-lgcrypt" + ]) + ]) + fi + + if test -z "$VERITYSETUP_CFLAGS"; then + AC_MSG_ERROR(No cryptographic library for veritysetup found) + fi + AC_CHECK_LIB(popt, poptGetContext, true, [ + AC_MSG_ERROR(popt library was not found) + ]) + AC_CHECK_HEADER(popt.h, true, [ + AC_MSG_ERROR(popt.h was not found) + ]) + VERITYSETUP_LIBS="$VERITYSETUP_LIBS -lpopt" + AC_SUBST(VERITYSETUP_CFLAGS) + AC_SUBST(VERITYSETUP_LIBS) + VERITYSETUP=yes +fi +AC_SUBST(VERITYSETUP) + +################################################################################ dnl -- getline included in recent libc AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
@@ -1561,6 +1624,7 @@ udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile +veritysetup/Makefile ]) AC_OUTPUT
Makefile.in +7 -1
@@ -36,12 +36,16 @@ ifeq ("@BUILD_LVMETAD@", "yes") SUBDIRS += libdaemon endif +ifeq ("@VERITYSETUP@", "yes") + SUBDIRS += veritysetup +endif + # FIXME Should use intermediate Makefiles here! ifeq ($(MAKECMDGOALS),distclean) SUBDIRS = doc include man scripts \ libdaemon lib tools daemons libdm \ udev po liblvm test \ - unit-tests/datastruct unit-tests/mm unit-tests/regex + unit-tests/datastruct unit-tests/mm unit-tests/regex veritysetup endif DISTCLEAN_DIRS += lcov_reports* DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl
@@ -53,6 +57,7 @@ lib: libdm libdaemon liblvm: lib daemons: lib libdaemon tools tools: lib libdaemon device-mapper +veritysetup: libdm po: tools daemons lib.device-mapper: include.device-mapper
@@ -60,6 +65,7 @@ libdm.device-mapper: include.device-mapp liblvm.device-mapper: include.device-mapper daemons.device-mapper: libdm.device-mapper tools.device-mapper: libdm.device-mapper +veritysetup.device-mapper: libdm.device-mapper device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper ifeq ("@INTL@", "yes")
veritysetup/Makefile.in new file +31 -0
@@ -0,0 +1,31 @@ +# Copyright (C) 2012 Red Hat, Inc. All rights reserved. +# +# This file is part of the device-mapper userspace tools. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU Lesser General Public License v.2.1. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ + +SOURCES = veritysetup.c + +TARGETS = veritysetup + +INCLUDES += @VERITYSETUP_CFLAGS@ + +include $(top_builddir)/make.tmpl + +VERITYSETUP_LIBS = @VERITYSETUP_LIBS@ + +veritysetup: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) -o veritysetup $(OBJECTS) $(VERITYSETUP_LIBS) + +install: $(TARGETS) + $(INSTALL_PROGRAM) -D veritysetup $(sbindir)/veritysetup
veritysetup/veritysetup.c new file +974 -0
974 lines not on this page · raw message