[libvirt] [PATCH] Allow building lxc without virt-login-shell
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++++++++++++++ tools/Makefile.am | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,6 +1074,19 @@ if test "$with_lxc" = "yes" ; then fi AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"]) +AC_ARG_WITH([login_shell], + [AS_HELP_STRING([--with-login-shell], + [build virt-login-shell @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_login_shell=yes]) + +if test "$with_lxc" != "yes" ; then + with_login_shell="no" +fi +if test "$with_login_shell" ; then + AC_DEFINE_UNQUOTED([WITH_LOGIN_SHELL], 1, [whether virt-login-shell is built]) +fi +AM_CONDITIONAL([WITH_LOGIN_SHELL], [test "$with_login_shell" = "yes"]) + dnl dnl Checks for the Parallels driver dnl @@ -2974,6 +2987,7 @@ AC_MSG_NOTICE([ Init script: $with_init_script]) AC_MSG_NOTICE([Char device locks: $with_chrdev_lock_files]) AC_MSG_NOTICE([ Default Editor: $DEFAULT_EDITOR]) AC_MSG_NOTICE([ Loader/NVRAM: $with_loader_nvram]) +AC_MSG_NOTICE([ virt-login-shell: $with_login_shell]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([Developer Tools]) AC_MSG_NOTICE([]) diff --git a/tools/Makefile.am b/tools/Makefile.am index d5638d9..d005035 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -71,12 +71,12 @@ sbin_SCRIPTS = virt-sanlock-cleanup DISTCLEANFILES += virt-sanlock-cleanup endif WITH_SANLOCK -if WITH_LXC +if WITH_LOGIN_SHELL conf_DATA += virt-login-shell.conf bin_PROGRAMS += virt-login-shell -else ! WITH_LXC +else ! WITH_LOGIN_SHELL EXTRA_DIST += virt-login-shell.conf -endif ! WITH_LXC +endif ! WITH_LOGIN_SHELL dist_man1_MANS = \ @@ -84,11 +84,11 @@ dist_man1_MANS = \ virt-pki-validate.1 \ virt-xml-validate.1 \ virsh.1 -if WITH_LXC +if WITH_LOGIN_SHELL dist_man1_MANS += virt-login-shell.1 -else ! WITH_LXC +else ! WITH_LOGIN_SHELL EXTRA_DIST += virt-login-shell.1 -endif ! WITH_LXC +endif ! WITH_LOGIN_SHELL if WITH_SANLOCK dist_man8_MANS = virt-sanlock-cleanup.8 endif WITH_SANLOCK -- 2.1.4
On 10.11.2015 00:28, Cédric Bosdonnat wrote:
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++++++++++++++ tools/Makefile.am | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,6 +1074,19 @@ if test "$with_lxc" = "yes" ; then fi AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
+AC_ARG_WITH([login_shell], + [AS_HELP_STRING([--with-login-shell], + [build virt-login-shell @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_login_shell=yes]) + +if test "$with_lxc" != "yes" ; then + with_login_shell="no"
what if somebody calls ./configure --without-lxc --with-login-shell? Should we fail explicitly instead of silently disabling login shell?
+fi +if test "$with_login_shell" ; then + AC_DEFINE_UNQUOTED([WITH_LOGIN_SHELL], 1, [whether virt-login-shell is built]) +fi +AM_CONDITIONAL([WITH_LOGIN_SHELL], [test "$with_login_shell" = "yes"]) +
Otherwise looking good. Tentative ACK. Michal
On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote:
On 10.11.2015 00:28, Cédric Bosdonnat wrote:
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++++++++++++++ tools/Makefile.am | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,6 +1074,19 @@ if test "$with_lxc" = "yes" ; then fi AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
+AC_ARG_WITH([login_shell], + [AS_HELP_STRING([--with-login-shell], + [build virt-login-shell @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_login_shell=yes]) + +if test "$with_lxc" != "yes" ; then + with_login_shell="no"
what if somebody calls ./configure --without-lxc --with-login-shell? Should we fail explicitly instead of silently disabling login shell?
No idea what is the best thing to do... but surely an error would be more explicit indeed.
+fi +if test "$with_login_shell" ; then + AC_DEFINE_UNQUOTED([WITH_LOGIN_SHELL], 1, [whether virt-login-shell is built]) +fi +AM_CONDITIONAL([WITH_LOGIN_SHELL], [test "$with_login_shell" = "yes"]) +
Otherwise looking good. Tentative ACK.
Michal
On 20.11.2015 16:42, Cedric Bosdonnat wrote:
On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote:
On 10.11.2015 00:28, Cédric Bosdonnat wrote:
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++++++++++++++ tools/Makefile.am | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,6 +1074,19 @@ if test "$with_lxc" = "yes" ; then fi AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
+AC_ARG_WITH([login_shell], + [AS_HELP_STRING([--with-login-shell], + [build virt-login-shell @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_login_shell=yes]) + +if test "$with_lxc" != "yes" ; then + with_login_shell="no"
what if somebody calls ./configure --without-lxc --with-login-shell? Should we fail explicitly instead of silently disabling login shell?
No idea what is the best thing to do... but surely an error would be more explicit indeed.
I vote for explicit erroring out on conflicting arguments. So if you fix that you got my ACK. Michal
On Fri, Nov 20, 2015 at 04:42:56PM +0100, Cedric Bosdonnat wrote:
On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote:
On 10.11.2015 00:28, Cédric Bosdonnat wrote:
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++++++++++++++ tools/Makefile.am | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,6 +1074,19 @@ if test "$with_lxc" = "yes" ; then fi AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
+AC_ARG_WITH([login_shell], + [AS_HELP_STRING([--with-login-shell], + [build virt-login-shell @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_login_shell=yes]) + +if test "$with_lxc" != "yes" ; then + with_login_shell="no"
what if somebody calls ./configure --without-lxc --with-login-shell? Should we fail explicitly instead of silently disabling login shell?
No idea what is the best thing to do... but surely an error would be more explicit indeed.
That is still a valid configuration, because virt-login-shell doesn't hve a build-time dependancy on the LXC driver - only the libvirt-lxc.so client library which is built unconditionally. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
On 20.11.2015 17:09, Daniel P. Berrange wrote:
On Fri, Nov 20, 2015 at 04:42:56PM +0100, Cedric Bosdonnat wrote:
On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote:
On 10.11.2015 00:28, Cédric Bosdonnat wrote:
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++++++++++++++ tools/Makefile.am | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,6 +1074,19 @@ if test "$with_lxc" = "yes" ; then fi AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
+AC_ARG_WITH([login_shell], + [AS_HELP_STRING([--with-login-shell], + [build virt-login-shell @<:@default=yes@:>@])]) +m4_divert_text([DEFAULTS], [with_login_shell=yes]) + +if test "$with_lxc" != "yes" ; then + with_login_shell="no"
what if somebody calls ./configure --without-lxc --with-login-shell? Should we fail explicitly instead of silently disabling login shell?
No idea what is the best thing to do... but surely an error would be more explicit indeed.
That is still a valid configuration, because virt-login-shell doesn't hve a build-time dependancy on the LXC driver - only the libvirt-lxc.so client library which is built unconditionally.
In that case the check is spurious and should be removed. Michal
participants (4)
-
Cedric Bosdonnat -
Cédric Bosdonnat -
Daniel P. Berrange -
Michal Privoznik