mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 07:33:48 +00:00
configure.ac: add --enable-deprecated flag
- lxc-clone and lxc-start-ephemeral are marked deprecated. We add a --enable-deprecated flag to configure.ac allowing us to enable these deprecated executables - update tests to use lxc-copy instead of lxc-clone Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
This commit is contained in:
parent
2ae6732f6b
commit
d0a6bd3940
@ -98,6 +98,6 @@ _have lxc-start && {
|
||||
|
||||
complete -o default -F _lxc_generic_t lxc-create
|
||||
|
||||
complete -o default -F _lxc_generic_o lxc-clone
|
||||
complete -o default -F _lxc_generic_o lxc-copy
|
||||
complete -o default -F _lxc_generic_o lxc-start-ephemeral
|
||||
}
|
||||
|
@ -147,6 +147,13 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
|
||||
AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
|
||||
fi
|
||||
|
||||
# Allow enabling deprecated executables
|
||||
AC_ARG_ENABLE([deprecated],
|
||||
[AC_HELP_STRING([--enable-deprecated],
|
||||
[enable deprecated executables [default=no]])],
|
||||
[], [enable_deprecated=false])
|
||||
AM_CONDITIONAL([ENABLE_DEPRECATED], [test "x$enable_deprecated" = "xyes"])
|
||||
|
||||
# Allow disabling rpath
|
||||
AC_ARG_ENABLE([rpath],
|
||||
[AC_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
|
||||
|
@ -21,7 +21,6 @@ man_MANS = \
|
||||
lxc-cgroup.1 \
|
||||
lxc-checkconfig.1 \
|
||||
lxc-checkpoint.1 \
|
||||
lxc-clone.1 \
|
||||
lxc-config.1 \
|
||||
lxc-console.1 \
|
||||
lxc-copy.1 \
|
||||
@ -50,9 +49,12 @@ man_MANS = \
|
||||
\
|
||||
lxc.7
|
||||
|
||||
if ENABLE_DEPRECATED
|
||||
man_MANS += lxc-clone.1
|
||||
if ENABLE_PYTHON
|
||||
man_MANS += lxc-start-ephemeral.1
|
||||
endif
|
||||
endif
|
||||
|
||||
%.1 : %.sgml
|
||||
$(db2xman) $<
|
||||
|
@ -13,7 +13,6 @@ man_MANS = \
|
||||
lxc-cgroup.1 \
|
||||
lxc-checkconfig.1 \
|
||||
lxc-checkpoint.1 \
|
||||
lxc-clone.1 \
|
||||
lxc-config.1 \
|
||||
lxc-console.1 \
|
||||
lxc-copy.1 \
|
||||
@ -42,9 +41,12 @@ man_MANS = \
|
||||
\
|
||||
lxc.7
|
||||
|
||||
if ENABLE_DEPRECATED
|
||||
man_MANS += lxc-clone.1
|
||||
if ENABLE_PYTHON
|
||||
man_MANS += lxc-start-ephemeral.1
|
||||
endif
|
||||
endif
|
||||
|
||||
%.1 : %.sgml
|
||||
$(db2xman) --encoding=UTF-8 $<
|
||||
|
@ -13,7 +13,6 @@ man_MANS = \
|
||||
lxc-cgroup.1 \
|
||||
lxc-checkconfig.1 \
|
||||
lxc-checkpoint.1 \
|
||||
lxc-clone.1 \
|
||||
lxc-config.1 \
|
||||
lxc-console.1 \
|
||||
lxc-copy.1 \
|
||||
@ -42,9 +41,12 @@ man_MANS = \
|
||||
\
|
||||
lxc.7
|
||||
|
||||
if ENABLE_DEPRECATED
|
||||
man_MANS += lxc-clone.1
|
||||
if ENABLE_PYTHON
|
||||
man_MANS += lxc-start-ephemeral.1
|
||||
endif
|
||||
endif
|
||||
|
||||
%.1 : %.sgml
|
||||
$(db2xman) --encoding=UTF-8 $<
|
||||
|
@ -192,16 +192,17 @@ bin_SCRIPTS = lxc-checkconfig
|
||||
EXTRA_DIST = \
|
||||
lxc-top.lua
|
||||
|
||||
if ENABLE_DEPRECATED
|
||||
if ENABLE_PYTHON
|
||||
bin_SCRIPTS += lxc-start-ephemeral
|
||||
endif
|
||||
endif
|
||||
|
||||
bin_PROGRAMS = \
|
||||
lxc-attach \
|
||||
lxc-autostart \
|
||||
lxc-cgroup \
|
||||
lxc-checkpoint \
|
||||
lxc-clone \
|
||||
lxc-copy \
|
||||
lxc-config \
|
||||
lxc-console \
|
||||
@ -222,6 +223,10 @@ bin_PROGRAMS = \
|
||||
lxc-usernsexec \
|
||||
lxc-wait
|
||||
|
||||
if ENABLE_DEPRECATED
|
||||
bin_PROGRAMS += lxc-clone
|
||||
endif
|
||||
|
||||
sbin_PROGRAMS = init.lxc
|
||||
pkglibexec_PROGRAMS = \
|
||||
lxc-monitord \
|
||||
@ -246,7 +251,6 @@ lxc_info_SOURCES = lxc_info.c
|
||||
init_lxc_SOURCES = lxc_init.c
|
||||
lxc_monitor_SOURCES = lxc_monitor.c
|
||||
lxc_monitord_SOURCES = lxc_monitord.c
|
||||
lxc_clone_SOURCES = lxc_clone.c
|
||||
lxc_ls_SOURCES = lxc_ls.c
|
||||
lxc_copy_SOURCES = lxc_copy.c
|
||||
lxc_start_SOURCES = lxc_start.c
|
||||
@ -261,6 +265,10 @@ lxc_usernsexec_SOURCES = lxc_usernsexec.c
|
||||
lxc_user_nic_SOURCES = lxc_user_nic.c network.c network.h
|
||||
lxc_checkpoint_SOURCES = lxc_checkpoint.c
|
||||
|
||||
if ENABLE_DEPRECATED
|
||||
lxc_clone_SOURCES = lxc_clone.c
|
||||
endif
|
||||
|
||||
if !HAVE_GETSUBOPT
|
||||
lxc_copy_SOURCES += ../include/getsubopt.c ../include/getsubopt.h
|
||||
endif
|
||||
|
@ -102,7 +102,7 @@ struct lxc_arguments {
|
||||
int list;
|
||||
char *groups; /* also used by lxc-ls */
|
||||
|
||||
/* lxc-snapshot and lxc-clone */
|
||||
/* lxc-snapshot and lxc-copy */
|
||||
enum task {
|
||||
CLONE,
|
||||
DESTROY,
|
||||
|
@ -124,7 +124,7 @@ for f in $s/*.conf; do
|
||||
echo "Test $testnum starting ($f)"
|
||||
lxc-create -t busybox -f $f -n lxctestb
|
||||
touch $CONTAINER_PATH/x1
|
||||
lxc-clone -s -o lxctestb -n lxctestb2
|
||||
lxc-copy -s -n lxctestb -N lxctestb2
|
||||
# verify that # nics did not change
|
||||
verify_numnics
|
||||
# verify hwaddr, if any changed
|
||||
|
@ -52,7 +52,7 @@ cleanup
|
||||
trap cleanup EXIT SIGHUP SIGINT SIGTERM
|
||||
|
||||
lxc-create -t busybox -n snapdeptest
|
||||
lxc-clone -s -o snapdeptest -n snapdeptest1
|
||||
lxc-copy -s -n snapdeptest -N snapdeptest1
|
||||
fail=0
|
||||
lxc-destroy -n snapdeptest || fail=1
|
||||
if [ $fail -eq 0 ]; then
|
||||
@ -61,7 +61,7 @@ if [ $fail -eq 0 ]; then
|
||||
fi
|
||||
|
||||
for i in `seq 2 20`; do
|
||||
lxc-clone -s -o snapdeptest -n snapdeptest$i
|
||||
lxc-copy -s -n snapdeptest -N snapdeptest$i
|
||||
done
|
||||
|
||||
verify_deps 20
|
||||
|
@ -134,7 +134,7 @@ run_cmd lxc-info -n c1
|
||||
run_cmd lxc-attach -n c1 -- /bin/true
|
||||
|
||||
run_cmd lxc-stop -n c1
|
||||
run_cmd lxc-clone -s -o c1 -n c2
|
||||
run_cmd lxc-copy -s -n c1 -N c2
|
||||
run_cmd lxc-start -n c2 -d
|
||||
p1=$(run_cmd lxc-info -n c2 -p -H)
|
||||
[ "$p1" != "-1" ] || { echo "Failed to start container c2"; false; }
|
||||
|
Loading…
Reference in New Issue
Block a user