From 9a8457a4b2b74db540b11e6ccd36a20a370e7bc3 Mon Sep 17 00:00:00 2001 From: cloonix Date: Sun, 19 Nov 2023 19:23:47 +0100 Subject: [PATCH] v33-00 --- README | 48 +- allclean | 4 +- build_tools/build_client | 6 +- build_tools/build_server | 1 - build_tools/datafiles/asoundrc | 7 - build_tools/datafiles/immodules.cache | 45 -- build_tools/datafiles/loaders.cache | 93 --- build_tools/datafiles/sed_caches.sh | 6 - build_tools/install_cloonix | 4 +- build_tools/pack_client | 6 +- build_tools/pack_common_after | 5 +- build_tools/pack_common_before | 94 ++- build_tools/pack_server | 4 +- build_tools/test_bundle.sh | 59 -- .../vmbuild/{debian_vmbuild_build => doitall} | 0 build_tools/vmbuild/fedora_vmbuild_build | 39 -- build_tools/vmbuild/fedora_vmbuild_config | 79 --- .../{debian_vmbuild_config => vmbuild_create} | 8 +- .../cairo_canvas/src/bank/include/bank.h | 4 +- .../cairo_canvas/src/bank/src/add_new_item.c | 6 +- .../cairo_canvas/src/bank/src/bank_item.h | 4 +- .../src/bank/src/from_interface.c | 7 +- cloonix/client/cairo_canvas/src/canvas_ctx.c | 48 +- .../src/interface/src/interface.c | 15 +- .../src/interface/src/timeout_end_req.c | 18 +- .../src/interface/src/timeout_end_resp.c | 4 +- .../client/cairo_canvas/src/menu_dialog_cnt.c | 77 +-- .../client/cairo_canvas/src/menu_dialog_cnt.h | 4 - cloonix/client/cairo_canvas/src/menus.c | 50 +- cloonix/client/cairo_canvas/src/topo.c | 19 +- cloonix/client/ctrl/src/cloonix_ctrl.c | 3 +- cloonix/client/ctrl/src/cmd_ctrl.c | 31 +- cloonix/client/ctrl/src/cmd_help_fn.h | 3 +- cloonix/client/ctrl/src/cnt_cli.c | 30 +- cloonix/client/ctrl/src/help.c | 12 +- cloonix/client/ctrl/src/vm_cli.c | 6 +- cloonix/client/hide_dirs/allclean | 4 + cloonix/client/hide_dirs/cmd | 4 + cloonix/client/hide_dirs/hide_dirs.c | 628 ++++++++++++++++++ .../lib_client/include/client_clownix.h | 3 +- .../client/lib_client/src/client_clownix.c | 23 +- cloonix/client/lib_client/src/client_stub.c | 2 +- cloonix/client/openssh/openssh.patch | 4 +- .../client/spice/spice_client/cloonix.patch | 121 +--- cloonix/cloonix_cli | 22 +- cloonix/cloonix_config | 30 +- cloonix/cloonix_dsh | 11 + cloonix/cloonix_exports | 18 - cloonix/cloonix_gui | 21 +- cloonix/cloonix_ice | 55 +- cloonix/cloonix_lsh | 5 + cloonix/cloonix_net | 8 +- cloonix/cloonix_ocp | 68 +- cloonix/cloonix_osh | 48 +- cloonix/cloonix_ovs | 29 +- cloonix/cloonix_scp | 47 +- cloonix/cloonix_ssh | 47 +- cloonix/cloonix_wir | 17 - cloonix/cloonix_wsk | 33 +- cloonix/common/glob_include/glob_common.h | 17 +- .../lib_rpc_clownix/include/rpc_clownix.h | 6 +- .../lib_rpc_clownix/src/xml_interface.c | 92 +-- .../lib_rpc_clownix/src/xml_interface.h | 13 +- cloonix/common/lib_rpc_clownix/tst/tester.c | 52 +- cloonix/common/lib_utils/src/topo_items.c | 1 - cloonix/common/xwy/srv/pty_fork.c | 45 +- cloonix/crun_init_user.sh | 4 + cloonix/podman_init_user.sh | 4 + .../init_starter/crun_init_starter.sh | 10 +- ...init_starter.sh => podman_init_starter.sh} | 10 +- cloonix/server/doorways/src/sock.c | 1 + cloonix/server/gerard_lledo/Makefile | 26 - cloonix/server/gerard_lledo/cmd | 4 - cloonix/server/gerard_lledo/src/common.h | 28 - cloonix/server/gerard_lledo/src/dcache.c | 128 ---- cloonix/server/gerard_lledo/src/dcache.h | 12 - cloonix/server/gerard_lledo/src/disk.c | 147 ---- cloonix/server/gerard_lledo/src/disk.h | 31 - cloonix/server/gerard_lledo/src/e4f_dcache.h | 30 - cloonix/server/gerard_lledo/src/ext4_basic.h | 17 - cloonix/server/gerard_lledo/src/ext4_dentry.h | 43 -- .../server/gerard_lledo/src/ext4_extents.h | 66 -- cloonix/server/gerard_lledo/src/ext4_inode.h | 125 ---- cloonix/server/gerard_lledo/src/ext4_super.h | 146 ---- cloonix/server/gerard_lledo/src/extents.c | 101 --- cloonix/server/gerard_lledo/src/extents.h | 8 - cloonix/server/gerard_lledo/src/fuse-main.c | 151 ----- cloonix/server/gerard_lledo/src/inode.c | 255 ------- cloonix/server/gerard_lledo/src/inode.h | 32 - cloonix/server/gerard_lledo/src/logging.c | 64 -- cloonix/server/gerard_lledo/src/logging.h | 43 -- cloonix/server/gerard_lledo/src/op_getattr.c | 48 -- cloonix/server/gerard_lledo/src/op_init.c | 39 -- cloonix/server/gerard_lledo/src/op_open.c | 28 - cloonix/server/gerard_lledo/src/op_read.c | 119 ---- cloonix/server/gerard_lledo/src/op_readdir.c | 66 -- cloonix/server/gerard_lledo/src/op_readlink.c | 57 -- cloonix/server/gerard_lledo/src/ops.h | 17 - cloonix/server/gerard_lledo/src/super.c | 94 --- cloonix/server/gerard_lledo/src/super.h | 30 - cloonix/server/ovs/ovs.patch | 12 +- cloonix/server/ovs_a2b/cmd | 3 + cloonix/server/ovs_a2b/src/ovs_a2b.c | 89 ++- cloonix/server/ovs_a2b/src/replace.c | 510 ++++++++++++++ cloonix/server/ovs_a2b/src/replace.h | 21 + cloonix/server/ovs_a2b/src/rxtx.c | 3 + cloonix/server/ovs_c2c/cmd | 2 + cloonix/server/ovs_drv/cmd | 2 + cloonix/server/ovs_drv/src/netns.c | 2 +- cloonix/server/ovs_drv/src/ovs_drv.c | 368 ++++++++-- cloonix/server/ovs_drv/src/ovs_execv.c | 4 +- cloonix/server/ovs_nat/cmd | 2 + cloonix/server/ovs_nat/src/icmp.c | 4 +- cloonix/server/ovs_nat/src/utils.c | 26 +- cloonix/server/ovs_snf/cmd | 2 + cloonix/server/ovs_snf/src/tun_tap.c | 18 +- cloonix/server/qemu/cloonix_patch | 16 +- cloonix/server/qemu/cmd | 11 +- cloonix/server/spice_lib_server/cmd | 2 +- cloonix/server/suid_power/Makefile | 8 +- cloonix/server/suid_power/src/crun.c | 68 +- cloonix/server/suid_power/src/crun_utils.c | 232 ++----- cloonix/server/suid_power/src/crun_utils.h | 10 +- .../suid_power/src/{dockir.c => podman.c} | 263 ++++---- .../suid_power/src/{dockir.h => podman.h} | 10 +- .../src/{dockerimages.c => podmanimages.c} | 98 +-- .../src/{dockerimages.h => podmanimages.h} | 12 +- cloonix/server/suid_power/src/suid_power.c | 45 +- .../suid_power/src/{loop_img.c => tar_img.c} | 249 ++----- .../suid_power/src/{loop_img.h => tar_img.h} | 11 +- cloonix/server/uml_cloonix_switch/Makefile | 7 +- .../server/uml_cloonix_switch/src/cfg_store.c | 9 +- cloonix/server/uml_cloonix_switch/src/cnt.c | 60 +- cloonix/server/uml_cloonix_switch/src/crun.c | 11 +- .../uml_cloonix_switch/src/doorways_mngt.c | 2 +- .../server/uml_cloonix_switch/src/fmt_diag.c | 43 +- .../server/uml_cloonix_switch/src/fmt_diag.h | 6 +- cloonix/server/uml_cloonix_switch/src/kvm.c | 48 +- .../uml_cloonix_switch/src/lan_to_name.c | 107 +-- .../uml_cloonix_switch/src/lan_to_name.h | 24 +- .../uml_cloonix_switch/src/layout_topo.c | 2 +- .../uml_cloonix_switch/src/list_commands.c | 149 +++-- .../uml_cloonix_switch/src/llid_trace.c | 4 +- .../server/uml_cloonix_switch/src/mactopo.c | 580 ++++++++++++++++ .../server/uml_cloonix_switch/src/mactopo.h | 25 + cloonix/server/uml_cloonix_switch/src/msg.c | 23 +- cloonix/server/uml_cloonix_switch/src/msg.h | 9 +- cloonix/server/uml_cloonix_switch/src/ovs.c | 4 +- .../server/uml_cloonix_switch/src/ovs_a2b.c | 161 ++++- .../server/uml_cloonix_switch/src/ovs_c2c.c | 123 ++-- .../server/uml_cloonix_switch/src/ovs_c2c.h | 6 +- .../server/uml_cloonix_switch/src/ovs_nat.c | 33 +- .../server/uml_cloonix_switch/src/ovs_phy.c | 452 +++++++++---- .../server/uml_cloonix_switch/src/ovs_phy.h | 9 +- .../server/uml_cloonix_switch/src/ovs_snf.c | 179 +---- .../server/uml_cloonix_switch/src/ovs_snf.h | 3 - .../server/uml_cloonix_switch/src/ovs_tap.c | 112 ++-- .../server/uml_cloonix_switch/src/ovs_tap.h | 2 +- .../src/{docker.c => podman.c} | 55 +- .../src/{docker.h => podman.h} | 10 +- .../src/{docker_images.c => podman_images.c} | 18 +- .../src/{docker_images.h => podman_images.h} | 6 +- .../uml_cloonix_switch/src/qemu_automaton.c | 4 +- .../uml_cloonix_switch/src/recv_from_client.c | 32 +- .../uml_cloonix_switch/src/server_stub.c | 7 - .../uml_cloonix_switch/src/slowperiodic.c | 14 +- .../uml_cloonix_switch/src/suid_power.c | 14 +- .../src/uml_clownix_switch.c | 7 +- quickstart/cnt_create/bookworm | 32 + .../cnt_create/busybox/build_zip/lddlist.c | 223 +++++++ .../cnt_create/busybox/build_zip/part_one.sh | 45 ++ .../cnt_create/busybox/build_zip/part_two.sh | 95 +++ .../cnt_create/busybox/create_busybox.sh | 76 +++ quickstart/cnt_create/centos9 | 54 ++ quickstart/cnt_create/doitall.sh | 20 + quickstart/cnt_create/fedora39 | 90 +++ quickstart/cnt_create/jammy | 42 ++ quickstart/cnt_create/podman_create | 44 ++ quickstart/create_cnt_kvm/cnt/bookworm | 76 --- quickstart/create_cnt_kvm/cnt/centos9 | 95 --- .../create_cnt_kvm/cnt/docker_bookworm.sh | 58 -- quickstart/create_cnt_kvm/cnt/doitall.sh | 28 - quickstart/create_cnt_kvm/cnt/fedora38 | 140 ---- quickstart/create_cnt_kvm/cnt/lunar | 83 --- quickstart/create_cnt_kvm/cnt/openwrt | 67 -- .../create_cnt_kvm/cnt/podman_bookworm.sh | 58 -- quickstart/create_cnt_kvm/fill_bulk.sh | 9 - quickstart/create_cnt_kvm/kvm/bookworm | 128 ---- quickstart/create_cnt_kvm/kvm/doitall.sh | 34 - quickstart/create_cnt_kvm/kvm/fedora38 | 187 ------ .../libopenssl1.1_1.1.1q-1_x86_64.ipk | Bin 1519493 -> 0 bytes ...l20201210_2022-01-16-868fd881-2_x86_64.ipk | Bin 5533 -> 0 bytes quickstart/demos/perfs/crun_a2b_crun.sh | 61 -- quickstart/demos/perfs/crun_c2c_crun.sh | 75 --- quickstart/demos/perfs/crun_crun.sh | 58 -- quickstart/demos/perfs/crun_tap.sh | 53 -- quickstart/demos/perfs/pod_pod.sh | 58 -- quickstart/demos/perfs/tap_crun.sh | 53 -- quickstart/depends_install/bookworm | 95 --- quickstart/depends_install/bullseye | 95 --- quickstart/depends_install/centos8 | 73 -- quickstart/depends_install/centos9 | 73 -- quickstart/depends_install/compile_all.sh | 58 -- quickstart/depends_install/depend_all.sh | 20 - quickstart/depends_install/fedora37 | 112 ---- quickstart/depends_install/fedora38 | 112 ---- quickstart/depends_install/jammy | 97 --- quickstart/depends_install/lunar | 97 --- quickstart/depends_install/tumbleweed | 93 --- .../kvm_create/bookworm | 35 +- .../kvm => kvm_create}/centos9 | 2 +- .../cisco/README | 6 +- .../cisco/configs/cisco1.cfg | 0 .../cisco/configs/cisco2.cfg | 0 .../cisco/configs/cisco3.cfg | 0 .../cisco/configs/iosxe_config.txt | 0 .../cisco/step1_make_preconf_iso.sh | 0 .../cisco/step2_make_qcow2.sh | 3 +- .../cisco/step3_iosxe_config.sh | 0 .../cisco/step4_run_demo.sh | 0 quickstart/kvm_create/doitall.sh | 22 + .../kvm_create/fedora39 | 13 +- .../{create_cnt_kvm/kvm => kvm_create}/jammy | 2 +- .../kvm => kvm_create}/opensuse155 | 2 +- .../kvm => kvm_create/various}/arch | 0 .../various}/arch_install.sh | 0 .../kvm => kvm_create/various}/bookworm_fr | 14 +- .../kvm_create/various/bookworm_lxde.sh | 114 ++++ .../kvm => kvm_create/various}/bullseye | 0 .../kvm => kvm_create/various}/bullseye_fr | 0 .../kvm => kvm_create/various}/centos8 | 0 .../kvm => kvm_create/various}/fedora37 | 0 .../kvm => kvm_create/various}/lunar | 0 .../various}/mikrotik/make_mikrotik.sh | 0 .../kvm => kvm_create/various}/openwrt | 0 .../libopenssl1.1_1.1.1q-1_x86_64.ipk | Bin ...l20201210_2022-01-16-868fd881-2_x86_64.ipk | Bin .../various}/test_qemu_binary.sh | 0 .../kvm => kvm_create/various}/tumbleweed | 0 .../{demos/ping_crun.sh => ping_cnt.sh} | 21 +- quickstart/{demos => }/ping_kvm.sh | 6 +- .../{demos/perfs/kvm_kvm.sh => ping_pod.sh} | 30 +- update_targz_store.sh | 1 + xdoc/cmd | 8 +- xdoc/doc/building.rst | 36 +- xdoc/doc/cisco.rst | 2 +- xdoc/doc/clients.rst | 27 +- xdoc/doc/items.rst | 63 +- xdoc/doc/ovs.rst | 8 + xdoc/doc/release.rst | 22 +- xdoc/doc/system.rst | 45 +- xdoc/index.rst | 27 +- 252 files changed, 5096 insertions(+), 7150 deletions(-) delete mode 100644 build_tools/datafiles/asoundrc delete mode 100755 build_tools/datafiles/immodules.cache delete mode 100755 build_tools/datafiles/loaders.cache delete mode 100755 build_tools/datafiles/sed_caches.sh delete mode 100755 build_tools/test_bundle.sh rename build_tools/vmbuild/{debian_vmbuild_build => doitall} (100%) delete mode 100755 build_tools/vmbuild/fedora_vmbuild_build delete mode 100755 build_tools/vmbuild/fedora_vmbuild_config rename build_tools/vmbuild/{debian_vmbuild_config => vmbuild_create} (94%) create mode 100755 cloonix/client/hide_dirs/allclean create mode 100755 cloonix/client/hide_dirs/cmd create mode 100644 cloonix/client/hide_dirs/hide_dirs.c create mode 100755 cloonix/cloonix_dsh delete mode 100644 cloonix/cloonix_exports create mode 100755 cloonix/cloonix_lsh delete mode 100755 cloonix/cloonix_wir create mode 100755 cloonix/crun_init_user.sh create mode 100755 cloonix/podman_init_user.sh rename cloonix/server/create_insider_agents_iso/init_starter/{docker_init_starter.sh => podman_init_starter.sh} (52%) delete mode 100644 cloonix/server/gerard_lledo/Makefile delete mode 100755 cloonix/server/gerard_lledo/cmd delete mode 100644 cloonix/server/gerard_lledo/src/common.h delete mode 100644 cloonix/server/gerard_lledo/src/dcache.c delete mode 100644 cloonix/server/gerard_lledo/src/dcache.h delete mode 100644 cloonix/server/gerard_lledo/src/disk.c delete mode 100644 cloonix/server/gerard_lledo/src/disk.h delete mode 100644 cloonix/server/gerard_lledo/src/e4f_dcache.h delete mode 100644 cloonix/server/gerard_lledo/src/ext4_basic.h delete mode 100644 cloonix/server/gerard_lledo/src/ext4_dentry.h delete mode 100644 cloonix/server/gerard_lledo/src/ext4_extents.h delete mode 100644 cloonix/server/gerard_lledo/src/ext4_inode.h delete mode 100644 cloonix/server/gerard_lledo/src/ext4_super.h delete mode 100644 cloonix/server/gerard_lledo/src/extents.c delete mode 100644 cloonix/server/gerard_lledo/src/extents.h delete mode 100644 cloonix/server/gerard_lledo/src/fuse-main.c delete mode 100644 cloonix/server/gerard_lledo/src/inode.c delete mode 100644 cloonix/server/gerard_lledo/src/inode.h delete mode 100644 cloonix/server/gerard_lledo/src/logging.c delete mode 100644 cloonix/server/gerard_lledo/src/logging.h delete mode 100644 cloonix/server/gerard_lledo/src/op_getattr.c delete mode 100644 cloonix/server/gerard_lledo/src/op_init.c delete mode 100644 cloonix/server/gerard_lledo/src/op_open.c delete mode 100644 cloonix/server/gerard_lledo/src/op_read.c delete mode 100644 cloonix/server/gerard_lledo/src/op_readdir.c delete mode 100644 cloonix/server/gerard_lledo/src/op_readlink.c delete mode 100644 cloonix/server/gerard_lledo/src/ops.h delete mode 100644 cloonix/server/gerard_lledo/src/super.c delete mode 100644 cloonix/server/gerard_lledo/src/super.h create mode 100644 cloonix/server/ovs_a2b/src/replace.c create mode 100644 cloonix/server/ovs_a2b/src/replace.h rename cloonix/server/suid_power/src/{dockir.c => podman.c} (73%) rename cloonix/server/suid_power/src/{dockir.h => podman.h} (88%) rename cloonix/server/suid_power/src/{dockerimages.c => podmanimages.c} (81%) rename cloonix/server/suid_power/src/{dockerimages.h => podmanimages.h} (83%) rename cloonix/server/suid_power/src/{loop_img.c => tar_img.c} (68%) rename cloonix/server/suid_power/src/{loop_img.h => tar_img.h} (83%) create mode 100644 cloonix/server/uml_cloonix_switch/src/mactopo.c create mode 100644 cloonix/server/uml_cloonix_switch/src/mactopo.h rename cloonix/server/uml_cloonix_switch/src/{docker.c => podman.c} (79%) rename cloonix/server/uml_cloonix_switch/src/{docker.h => podman.h} (86%) rename cloonix/server/uml_cloonix_switch/src/{docker_images.c => podman_images.c} (93%) rename cloonix/server/uml_cloonix_switch/src/{docker_images.h => podman_images.h} (92%) create mode 100755 quickstart/cnt_create/bookworm create mode 100644 quickstart/cnt_create/busybox/build_zip/lddlist.c create mode 100755 quickstart/cnt_create/busybox/build_zip/part_one.sh create mode 100755 quickstart/cnt_create/busybox/build_zip/part_two.sh create mode 100755 quickstart/cnt_create/busybox/create_busybox.sh create mode 100755 quickstart/cnt_create/centos9 create mode 100755 quickstart/cnt_create/doitall.sh create mode 100755 quickstart/cnt_create/fedora39 create mode 100755 quickstart/cnt_create/jammy create mode 100755 quickstart/cnt_create/podman_create delete mode 100755 quickstart/create_cnt_kvm/cnt/bookworm delete mode 100755 quickstart/create_cnt_kvm/cnt/centos9 delete mode 100755 quickstart/create_cnt_kvm/cnt/docker_bookworm.sh delete mode 100755 quickstart/create_cnt_kvm/cnt/doitall.sh delete mode 100755 quickstart/create_cnt_kvm/cnt/fedora38 delete mode 100755 quickstart/create_cnt_kvm/cnt/lunar delete mode 100755 quickstart/create_cnt_kvm/cnt/openwrt delete mode 100755 quickstart/create_cnt_kvm/cnt/podman_bookworm.sh delete mode 100755 quickstart/create_cnt_kvm/fill_bulk.sh delete mode 100755 quickstart/create_cnt_kvm/kvm/bookworm delete mode 100755 quickstart/create_cnt_kvm/kvm/doitall.sh delete mode 100755 quickstart/create_cnt_kvm/kvm/fedora38 delete mode 100644 quickstart/create_cnt_kvm/kvm/openwrt_ipk/libopenssl1.1_1.1.1q-1_x86_64.ipk delete mode 100644 quickstart/create_cnt_kvm/kvm/openwrt_ipk/libustream-openssl20201210_2022-01-16-868fd881-2_x86_64.ipk delete mode 100755 quickstart/demos/perfs/crun_a2b_crun.sh delete mode 100755 quickstart/demos/perfs/crun_c2c_crun.sh delete mode 100755 quickstart/demos/perfs/crun_crun.sh delete mode 100755 quickstart/demos/perfs/crun_tap.sh delete mode 100755 quickstart/demos/perfs/pod_pod.sh delete mode 100755 quickstart/demos/perfs/tap_crun.sh delete mode 100755 quickstart/depends_install/bookworm delete mode 100755 quickstart/depends_install/bullseye delete mode 100755 quickstart/depends_install/centos8 delete mode 100755 quickstart/depends_install/centos9 delete mode 100755 quickstart/depends_install/compile_all.sh delete mode 100755 quickstart/depends_install/depend_all.sh delete mode 100755 quickstart/depends_install/fedora37 delete mode 100755 quickstart/depends_install/fedora38 delete mode 100755 quickstart/depends_install/jammy delete mode 100755 quickstart/depends_install/lunar delete mode 100755 quickstart/depends_install/tumbleweed rename build_tools/vmbuild/debian_vmbuild_init => quickstart/kvm_create/bookworm (82%) rename quickstart/{create_cnt_kvm/kvm => kvm_create}/centos9 (99%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/README (83%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/configs/cisco1.cfg (100%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/configs/cisco2.cfg (100%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/configs/cisco3.cfg (100%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/configs/iosxe_config.txt (100%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/step1_make_preconf_iso.sh (100%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/step2_make_qcow2.sh (91%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/step3_iosxe_config.sh (100%) rename quickstart/{create_cnt_kvm => kvm_create}/cisco/step4_run_demo.sh (100%) create mode 100755 quickstart/kvm_create/doitall.sh rename build_tools/vmbuild/fedora_vmbuild_init => quickstart/kvm_create/fedora39 (94%) rename quickstart/{create_cnt_kvm/kvm => kvm_create}/jammy (99%) rename quickstart/{create_cnt_kvm/kvm => kvm_create}/opensuse155 (99%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/arch (100%) rename quickstart/{tools => kvm_create/various}/arch_install.sh (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/bookworm_fr (95%) create mode 100755 quickstart/kvm_create/various/bookworm_lxde.sh rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/bullseye (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/bullseye_fr (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/centos8 (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/fedora37 (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/lunar (100%) rename quickstart/{create_cnt_kvm => kvm_create/various}/mikrotik/make_mikrotik.sh (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/openwrt (100%) rename quickstart/{create_cnt_kvm/cnt => kvm_create/various}/openwrt_ipk/libopenssl1.1_1.1.1q-1_x86_64.ipk (100%) rename quickstart/{create_cnt_kvm/cnt => kvm_create/various}/openwrt_ipk/libustream-openssl20201210_2022-01-16-868fd881-2_x86_64.ipk (100%) rename quickstart/{tools => kvm_create/various}/test_qemu_binary.sh (100%) rename quickstart/{create_cnt_kvm/kvm => kvm_create/various}/tumbleweed (100%) rename quickstart/{demos/ping_crun.sh => ping_cnt.sh} (68%) rename quickstart/{demos => }/ping_kvm.sh (96%) rename quickstart/{demos/perfs/kvm_kvm.sh => ping_pod.sh} (68%) diff --git a/README b/README index a5bacd29..54716796 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ ============================================================================== Cloonix is an AGPLv3 software that constitute a tool to create networks of -kvm virtual machines or crun, docker and podman containers. +kvm virtual machines or crun, and podman containers. The network connecting the virtual machines and containers is created through the use of the openvswitch software running inside a net namespace so that @@ -24,32 +24,24 @@ files and libraries are collected and put into an autonomous bundle, this makes the bundle self-contained. No added files or packages are necessary. See clownix.net for a documentation (which is usually not up to date). -http://clownix.net/doc_stored/build-30-01/html/index.html doc. +http://clownix.net/doc_stored/build-33-00/html/index.html doc. NOTE: qemu-guest-agent sometimes called qemu-ga has to be installed inside the kvm guests virtual machines to have the pseudo-ssh and pseudo-scp. - -NOTE: It is now strongly advised to install with the bundle of binaries, - libraries and config files, much simpler method than by compiling. - -NOTE: If you have an old version of cloonix, you must erase it first, - the way to erase the old version was: "rm -rf /usr/local/bin/cloonix*". - The new cloonix is not at the same place as before. ----------------------------------------------------------------------------- DOWNLOADS: -http://clownix.net/downloads/cloonix-32 +http://clownix.net/downloads/cloonix-33 ----------------------------------------------------------------------------- INSTALL BINARY AND LIBRARIES ON YOUR HOST -wget http://clownix.net/downloads/cloonix-32/cloonix-bundle-32-00.tar.gz -tar xvf cloonix-bundle-32-00.tar.gz -cd cloonix-bundle-32-00 +wget http://clownix.net/downloads/cloonix-33/cloonix-bundle-33-00.tar.gz +tar xvf cloonix-bundle-33-00.tar.gz +cd cloonix-bundle-33-00 sudo ./install_cloonix - ----------------------------------------------------------------------------- TO UNINSTALL: @@ -62,43 +54,31 @@ GET A WORKING QCOW AND PUT IT IN BULK TO TEST KVM: mkdir -p /var/lib/cloonix/bulk cd /var/lib/cloonix/bulk -wget http://clownix.net/downloads/cloonix-32/bulk/bookworm.qcow2.gz +wget http://clownix.net/downloads/cloonix-33/bulk/bookworm.qcow2.gz gunzip bookworm.qcow2.gz ----------------------------------------------------------------------------- -GET A WORKING IMG AND PUT IT IN BULK TO TEST CRUN: +GET A WORKING ZIP AND PUT IT IN BULK TO TEST CRUN: mkdir -p /var/lib/cloonix/bulk cd /var/lib/cloonix/bulk -wget http://clownix.net/downloads/cloonix-32/bulk/bookworm.img.gz -gunzip bookworm.img.gz +wget http://clownix.net/downloads/cloonix-33/bulk/busybox.zip.gz +gunzip busybox.zip.gz ----------------------------------------------------------------------------- -LAUNCH KVM SCRIPT: +LAUNCH TEST PINGS: + +cd cloonix-bundle-33-00 -cd cloonix-bundle-32-00 ./ping_kvm.sh On the gui, a double-click on the blue machine gives a shell, a double-click on the green interface gives a wireshark spy, a right-click on the blue machine gives a spice desktop. ------------------------------------------------------------------------------ -LAUNCH CRUN SCRIPT: - -cd cloonix-bundle-32-00 -./ping_crun.sh +./ping_cnt.sh On the gui, a double-click on the blue machine gives a shell, a double-click on the green interface gives a wireshark spy. - ------------------------------------------------------------------------------ -CISCO C8000 IN CLOONIX: - -cd cloonix-bundle-32-00/cisco -follow the README. - ============================================================================== - - diff --git a/allclean b/allclean index 6ea3a782..9667d6e3 100755 --- a/allclean +++ b/allclean @@ -45,7 +45,8 @@ rm -rf ${CLOONIX_TREE_ROOT}/build_tools/cloonix-bundle-* make clean done #---------------------------------------------------------- - for i in openssh \ + for i in hide_dirs \ + openssh \ rxvt \ spice \ spice_lib_client \ @@ -56,7 +57,6 @@ rm -rf ${CLOONIX_TREE_ROOT}/build_tools/cloonix-bundle-* #---------------------------------------------------------- for i in doorways \ suid_power \ - gerard_lledo \ uml_cloonix_switch ; do cd ${SERVER}/${i} make clean diff --git a/build_tools/build_client b/build_tools/build_client index 526a3c22..7ddd71a2 100755 --- a/build_tools/build_client +++ b/build_tools/build_client @@ -30,7 +30,8 @@ for i in cloonix_osh \ cloonix_ice \ cloonix_ssh \ cloonix_wsk \ - cloonix_wir \ + cloonix_dsh \ + cloonix_lsh \ cloonix_ovs; do mv ${TMPBUILD}/cloonix/${i} ${TMPBUILD} done @@ -58,7 +59,8 @@ done echo BUILDING CLIENT echo #---------------------------------------------------------- - for i in spice_lib_client \ + for i in hide_dirs \ + spice_lib_client \ agent_dropbear \ lib_client \ ctrl \ diff --git a/build_tools/build_server b/build_tools/build_server index 8cbf75af..1f691f7f 100755 --- a/build_tools/build_server +++ b/build_tools/build_server @@ -54,7 +54,6 @@ mv ${TMPBUILD}/cloonix/cloonix_net ${TMPBUILD} ovs \ doorways \ suid_power \ - gerard_lledo \ uml_cloonix_switch \ ovs_drv \ ovs_snf \ diff --git a/build_tools/datafiles/asoundrc b/build_tools/datafiles/asoundrc deleted file mode 100644 index 2795ef8d..00000000 --- a/build_tools/datafiles/asoundrc +++ /dev/null @@ -1,7 +0,0 @@ -pcm.PCH { type hw; card PCH; } -ctl.PCH { type hw; card PCH; } -pcm.NVidia { type hw; card NVidia; } -ctl.NVidia { type hw; card NVidia; } -pcm.!default pcm.PCH -ctl.!default ctl.PCH - diff --git a/build_tools/datafiles/immodules.cache b/build_tools/datafiles/immodules.cache deleted file mode 100755 index 62a072f4..00000000 --- a/build_tools/datafiles/immodules.cache +++ /dev/null @@ -1,45 +0,0 @@ -# GTK+ Input Method Modules file -# Automatically generated file, do not edit -# Created by /usr/libexec/cloonix/common/lib/libgtk-3-0/gtk-query-immodules-3.0 from gtk+-3.24.37 -# -# ModulesPath = /usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/linux/immodules:/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules:/usr/libexec/cloonix/common/lib/gtk-3.0/linux/immodules:/usr/lib/x86_64-linux-gnu/gtk-3.0/immodules -# -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-am-et.so" -"am_et" "Amharic (EZ+)" "gtk30" "/usr/libexec/cloonix/common/share/locale" "am" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-broadway.so" -"broadway" "Broadway" "gtk30" "/usr/libexec/cloonix/common/share/locale" "" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" -"cedilla" "Cedilla" "gtk30" "/usr/libexec/cloonix/common/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-cyrillic-translit.so" -"cyrillic_translit" "Cyrillic (Transliterated)" "gtk30" "/usr/libexec/cloonix/common/share/locale" "" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-inuktitut.so" -"inuktitut" "Inuktitut (Transliterated)" "gtk30" "/usr/libexec/cloonix/common/share/locale" "iu" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-ipa.so" -"ipa" "IPA" "gtk30" "/usr/libexec/cloonix/common/share/locale" "" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-multipress.so" -"multipress" "Multipress" "gtk30" "/usr/libexec/cloonix/common/share/locale" "" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-thai.so" -"thai" "Thai-Lao" "gtk30" "/usr/libexec/cloonix/common/share/locale" "lo:th" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-ti-er.so" -"ti_er" "Tigrigna-Eritrean (EZ+)" "gtk30" "/usr/libexec/cloonix/common/share/locale" "ti" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-ti-et.so" -"ti_et" "Tigrigna-Ethiopian (EZ+)" "gtk30" "/usr/libexec/cloonix/common/share/locale" "ti" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-viqr.so" -"viqr" "Vietnamese (VIQR)" "gtk30" "/usr/libexec/cloonix/common/share/locale" "" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-wayland.so" -"wayland" "Wayland" "gtk30" "/usr/libexec/cloonix/common/share/locale" "" - -"/usr/libexec/cloonix/common/lib/gtk-3.0/3.0.0/immodules/im-xim.so" -"xim" "X Input Method" "gtk30" "/usr/libexec/cloonix/common/share/locale" "ko:ja:th:zh" - diff --git a/build_tools/datafiles/loaders.cache b/build_tools/datafiles/loaders.cache deleted file mode 100755 index f7a4cda8..00000000 --- a/build_tools/datafiles/loaders.cache +++ /dev/null @@ -1,93 +0,0 @@ -# GdkPixbuf Image Loader Modules file -# Automatically generated file, do not edit -# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.42.10 -# -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.so" -"ani" 4 "gdk-pixbuf" "Windows animated cursor" "LGPL" -"application/x-navi-animation" "" -"ani" "" -"RIFF ACON" " xxxx " 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so" -"bmp" 5 "gdk-pixbuf" "BMP" "LGPL" -"image/bmp" "image/x-bmp" "image/x-MS-bmp" "" -"bmp" "" -"BM" "" 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so" -"gif" 4 "gdk-pixbuf" "GIF" "LGPL" -"image/gif" "" -"gif" "" -"GIF8" "" 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so" -"icns" 4 "gdk-pixbuf" "MacOS X icon" "GPL" -"image/x-icns" "" -"icns" "" -"icns" "" 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ico.so" -"ico" 5 "gdk-pixbuf" "Windows icon" "LGPL" -"image/x-icon" "image/x-ico" "image/x-win-bitmap" "image/vnd.microsoft.icon" "application/ico" "image/ico" "image/icon" "text/ico" "" -"ico" "cur" "" -" \001 " "zz znz" 100 -" \002 " "zz znz" 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.so" -"pnm" 4 "gdk-pixbuf" "PNM/PBM/PGM/PPM" "LGPL" -"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" "" -"pnm" "pbm" "pgm" "ppm" "" -"P1" "" 100 -"P2" "" 100 -"P3" "" 100 -"P4" "" 100 -"P5" "" 100 -"P6" "" 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so" -"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL" -"image/x-quicktime" "image/qtif" "" -"qtif" "qif" "" -"abcdidsc" "xxxx " 100 -"abcdidat" "xxxx " 100 - -"/usr/libexec/cloonix/common/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so" -"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL" -"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" "" -"svg" "svgz" "svg.gz" "" -" ${COMMON}/etc/fonts/fonts.conf << EOF @@ -44,68 +44,48 @@ cat > ${COMMON}/etc/fonts/fonts.conf << EOF /usr/libexec/cloonix/common/share EOF - -#---------------------------------------------------------- -case "$pretty_name" in -#---------------------------------------------------------- -"Debian") -cp -rf /etc/pulse ${COMMON}/etc -cat > ${COMMON}/etc/pulse/client.conf << EOF -daemon-binary = ${COMMON}/cloonix-pulseaudio -enable-shm = no +cat > ${COMMON}/etc/locale.gen << EOF +en_US.UTF-8 UTF-8 +EOF +cat > ${COMMON}/etc/locale.conf << EOF +LANG=en_US.UTF-8 EOF -cp -f /usr/bin/xauth ${COMMON}/cloonix-xauth -cp -f /bin/bash ${COMMON}/cloonix-bash -cp -f /usr/bin/pulseaudio ${COMMON}/cloonix-pulseaudio -for i in icons mime themes fonts gtk-3.0 \ - gstreamer-1.0 applications pulseaudio ; do - cp -rf /usr/share/${i} ${COMMON}/share -done -;; #---------------------------------------------------------- -"Fedora") cp -f /usr/bin/xauth ${COMMON}/cloonix-xauth -cp -f /bin/bash ${COMMON}/cloonix-bash -cp -f /usr/bin/pulseaudio ${COMMON}/cloonix-pulseaudio +cp -f /bin/busybox ${COMMON} +cp -f /usr/bin/locale ${COMMON} +cp -f /usr/bin/localedef ${COMMON} +cp -f /usr/bin/localectl ${COMMON} +cp -f /usr/sbin/locale-gen ${COMMON} +cp -f /usr/lib/locale/locale-archive ${COMMON} +cd ${COMMON} +for i in cat cp echo env grep id ifconfig ip \ + iproute kill ls mv ps rm sh su chmod \ + chown awk; do + ln -s busybox ${i} +done +cd $FROM_HERE for i in icons mime themes fonts gtk-3.0 \ - gstreamer-1.0 applications ; do - cp -rf /usr/share/${i} ${COMMON}/share + gstreamer-1.0 ; do + cp -Lrf /usr/share/${i} ${COMMON}/share done -;; -esac +cp -Lrf /usr/share/locale/en ${COMMON}/share/locale +cp -Lrf /usr/share/X11/locale/en_US.UTF-8 ${COMMON}/share/X11/locale +cp -Lrf /usr/share/X11/locale/C ${COMMON}/share/X11/locale +cp -Lrf /usr/share/X11/locale/locale.dir ${COMMON}/share/X11/locale #---------------------------------------------------------- tar --directory=${COMMON}/share -xf ${TARGZ_STORE}/shark/built_objects/share_wireshark.tar.gz mv ${COMMON}/share/share_wireshark ${COMMON}/share/wireshark #---------------------------------------------------------- cp -f /lib64/ld-linux-x86-64.so.2 ${COMMON}/lib64 cp -f ${CLOONIX_TREE_ROOT}/cloonix/cloonix_config ${COMMON}/etc/cloonix.cfg -cp -f ${CLOONIX_TREE_ROOT}/cloonix/cloonix_exports ${COMMON}/etc -#---------------------------------------------------------- -case "$pretty_name" in - "Debian") - for i in qt6 gdk-pixbuf-2.0 gtk-3.0 \ - gstreamer-1.0 pulseaudio ; do - cp -rf /usr/lib/x86_64-linux-gnu/${i} ${COMMON}/lib - done - cp /usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner ${COMMON} - ;; - "Fedora") - for i in qt6 gdk-pixbuf-2.0 gtk-3.0 \ - gstreamer-1.0 pulseaudio ; do - cp -rf /usr/lib64/${i} ${COMMON}/lib - done - cp -f /usr/libexec/gstreamer-1.0/gst-plugin-scanner ${COMMON} - ;; - *) - printf "\n\tERROR: Your distribution: $pretty_name is not supported" - exit - ;; -esac -IMMOD=${COMMON}/lib/gtk-3.0/3.0.0 -LOADER=${COMMON}/lib/gdk-pixbuf-2.0/2.10.0 -ASOUNDRC=${COMMON}/share/alsa -cp -f ${DATAFILES}/immodules.cache ${IMMOD} -cp -f ${DATAFILES}/loaders.cache ${LOADER} -cp -f ${DATAFILES}/asoundrc ${ASOUNDRC} +cp -f ${CLOONIX_TREE_ROOT}/cloonix/cloonix_osh ${COMMON} +cp -f ${CLOONIX_TREE_ROOT}/cloonix/cloonix_cli ${COMMON} +cp -f ${CLOONIX_TREE_ROOT}/cloonix/crun_init_user.sh ${COMMON}/etc +cp -f ${CLOONIX_TREE_ROOT}/cloonix/podman_init_user.sh ${COMMON}/etc #---------------------------------------------------------- +for i in qt6 gdk-pixbuf-2.0 gtk-3.0 gstreamer-1.0 ; do + cp -rf /usr/lib/x86_64-linux-gnu/${i} ${COMMON}/lib +done +cp /usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner ${COMMON} #---------------------------------------------------------- diff --git a/build_tools/pack_server b/build_tools/pack_server index 957dffad..7399b7b6 100755 --- a/build_tools/pack_server +++ b/build_tools/pack_server @@ -26,13 +26,11 @@ cp ${SERVER}/xwy/cloonix-xwy-srv ${SERVER} rm -rf ${SERVER}/xwy #---------------------------------------------------------- cp -f ${SERVER}/suid_power/cloonix-suid-power ${SERVER} -cp -f ${SERVER}/gerard_lledo/cloonix-ext4fuse ${SERVER} cp -f ${SERVER}/doorways/cloonix-doorways ${SERVER} cp -f ${SERVER}/suid_power/cloonix-suid-power ${SERVER} cp -f ${SERVER}/uml_cloonix_switch/cloonix-main-server ${SERVER} for i in doorways \ suid_power \ - gerard_lledo \ uml_cloonix_switch ; do rm -rf ${SERVER}/${i} done @@ -79,10 +77,10 @@ rm -rf ${SERVER}/crun cp -f ${TARGZ_STORE}/shark/built_objects/wireshark ${SERVER}/cloonix-wireshark cp -f ${TARGZ_STORE}/shark/built_objects/dumpcap ${SERVER} #---------------------------------------------------------- +cp -f /usr/bin/fuse-zip ${SERVER}//cloonix-fuse-zip cp -f /sbin/ip ${SERVER}/ip cp -f /bin/mount ${SERVER}/cloonix-mount cp -f /bin/umount ${SERVER}/cloonix-umount -cp -f /sbin/losetup ${SERVER}/cloonix-losetup cp -f /usr/bin/fuse-overlayfs ${SERVER}/cloonix-fuse-overlayfs cp -f /bin/mknod ${SERVER}/cloonix-mknod cp -f /bin/chmod ${SERVER}/cloonix-chmod diff --git a/build_tools/test_bundle.sh b/build_tools/test_bundle.sh deleted file mode 100755 index 89c096e7..00000000 --- a/build_tools/test_bundle.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -HERE=`pwd` -PARAMS="ram=5000 cpu=4 eth=s" -NET=nemo -# QCOW2=lxde_bookworm.qcow2 -# QCOW2=lxde_bullseye_fr.qcow2 - -# QCOW2=bookworm.qcow2 -# QCOW2=centos8.qcow2 -# QCOW2=fedora37.qcow2 -# QCOW2=jammy.qcow2 -# QCOW2=opensuse155.qcow2 -# QCOW2=tumbleweed.qcow2 -# QCOW2=bullseye.qcow2 -# QCOW2=centos9.qcow2 -# QCOW2=fedora38.qcow2 -# QCOW2=lunar.qcow2 -QCOW2=arch.qcow2 - -NAME=vmname -BULK="/var/lib/cloonix/bulk" - -####################################################################### -is_started=$(cloonix_cli $NET pid |grep cloonix_server) -if [ "x$is_started" == "x" ]; then - printf "\nServer Not started, launching:" - printf "\ncloonix_net $NET:\n" - cloonix_net $NET -else - cloonix_cli $NET rma -fi - -echo waiting 2 sec -sleep 2 - -####################################################################### -cloonix_gui $NET -#---------------------------------------------------------------------- -cloonix_cli $NET add kvm ${NAME} ${PARAMS} ${QCOW2} & -#---------------------------------------------------------------------- -set +e -for i in 1 2 ; do - while ! cloonix_ssh $NET ${NAME} "echo" 2>/dev/null; do - echo ${NAME} not ready, waiting 5 sec - sleep 5 - done -done -set -e -#---------------------------------------------------------------------- -cloonix_ssh $NET ${NAME} "mkdir -p ${BULK}" -cloonix_scp $NET ${BULK}/${QCOW2} ${NAME}:${BULK}/bookworm.qcow2 -cloonix_scp $NET -r ${HERE}/cloonix-bundle* ${NAME}:~ -cloonix_ssh $NET ${NAME} "cd cloonix-bundle* ; ./install_cloonix" -cloonix_scp $NET ${HERE}/../quickstart/demos/ping_kvm.sh ${NAME}:~ -cloonix_ssh $NET ${NAME} "./ping_kvm.sh" -#---------------------------------------------------------------------- - - - diff --git a/build_tools/vmbuild/debian_vmbuild_build b/build_tools/vmbuild/doitall similarity index 100% rename from build_tools/vmbuild/debian_vmbuild_build rename to build_tools/vmbuild/doitall diff --git a/build_tools/vmbuild/fedora_vmbuild_build b/build_tools/vmbuild/fedora_vmbuild_build deleted file mode 100755 index c329fdad..00000000 --- a/build_tools/vmbuild/fedora_vmbuild_build +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -HERE=`pwd` -NET=nemo -NAME=dev -QCOW2=fedora_builder.qcow2 -CLOONIX_TREE_ROOT=${HERE}/../.. -#---------------------------------------------------------------------- -rm -f cloonix-* -rm -rf /tmp/cloonix_build_tree -mkdir -p /tmp/cloonix_build_tree -cd ${CLOONIX_TREE_ROOT} -./allclean -cd ${CLOONIX_TREE_ROOT}/.. -tar zcvf /tmp/cloonix_build_tree/sources.tar.gz ./sources -cd ${CLOONIX_TREE_ROOT}/build_tools -#---------------------------------------------------------------------- -cloonix_net ${NET} -cloonix_gui ${NET} -#---------------------------------------------------------------------- -PARAMS="ram=8000 cpu=4 eth=s" -cloonix_cli ${NET} add kvm ${NAME} ${PARAMS} ${QCOW2} -#---------------------------------------------------------------------- -sleep 3 -#---------------------------------------------------------------------- -set +e -while ! cloonix_ssh ${NET} ${NAME} "echo" 2>/dev/null; do - echo ${NAME} not ready, waiting 5 sec - sleep 5 -done -#---------------------------------------------------------------------- -cloonix_scp ${NET} /tmp/cloonix_build_tree/sources.tar.gz ${NAME}:/root -cloonix_ssh ${NET} ${NAME} "mkdir -p /var/lib/cloonix/bulk" -cloonix_ssh ${NET} ${NAME} "tar xvf sources.tar.gz" -cloonix_ssh ${NET} ${NAME} "cd /root/sources; ./doitall" -#---------------------------------------------------------------------- -cloonix_scp ${NET} -r ${NAME}:/root/sources/build_tools/cloonix-bundle-* ${CLOONIX_TREE_ROOT}/build_tools -#---------------------------------------------------------------------- - - diff --git a/build_tools/vmbuild/fedora_vmbuild_config b/build_tools/vmbuild/fedora_vmbuild_config deleted file mode 100755 index c3ee44f7..00000000 --- a/build_tools/vmbuild/fedora_vmbuild_config +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -HERE=`pwd` -DISTRO=fedora38 -NET=nemo -NAME=dev -QCOW2=fedora_builder.qcow2 -BULK="/var/lib/cloonix/bulk" -#---------------------------------------------------------------------- -cloonix_net ${NET} -#---------------------------------------------------------------------- -echo cp -f ${BULK}/${DISTRO}.qcow2 ${BULK}/${QCOW2} -cp -f ${BULK}/${DISTRO}.qcow2 ${BULK}/${QCOW2} -#---------------------------------------------------------------------- -sync -#---------------------------------------------------------------------- -cloonix_gui ${NET} -cloonix_cli ${NET} add nat nat -#---------------------------------------------------------------------- -PARAMS="ram=8000 cpu=4 eth=s" -cloonix_cli ${NET} add kvm ${NAME} ${PARAMS} ${QCOW2} --persistent -#---------------------------------------------------------------------- -sleep 3 -cloonix_cli ${NET} add lan ${NAME} 0 lan1 -cloonix_cli ${NET} add lan nat 0 lan1 -#---------------------------------------------------------------------- -set +e -while ! cloonix_ssh ${NET} ${NAME} "echo" 2>/dev/null; do - echo ${NAME} not ready, waiting 5 sec - sleep 5 -done -#---------------------------------------------------------------------- -cloonix_ssh ${NET} ${NAME} "dhclient eth0" -#---------------------------------------------------------------------- -cloonix_ssh ${NET} ${NAME} "dnf update -y" - -cloonix_ssh ${NET} ${NAME} "dnf install -y make gcc gcc-c++ gdb \ - libstdc++-devel intltool glibc-devel libtool tar \ - pkg-config glib2-devel meson ninja-build patch \ - tar openssl-devel glib2-devel pixman-devel strace \ - python3-six python3-pyparsing libjpeg-turbo-devel \ - polkit-devel lz4-devel libacl-devel cyrus-sasl-devel \ - libunwind-devel numactl-devel gtk3-devel libepoxy-devel \ - libpcap-devel json-glib-devel libcap-ng-devel fuse3-devel \ - fuse-overlayfs bzip2 rxvt-unicode xorriso libusb1-devel \ - yajl-devel git libcap-devel libseccomp-devel \ - libptytty-devel" - -cloonix_ssh ${NET} ${NAME} "dnf install -y meson gtk3-devel openssl-devel \ - pulseaudio-libs-devel pulseaudio \ - pixman-devel gobject-introspection-devel \ - libjpeg-turbo-devel zlib-devel cyrus-sasl-devel \ - gtk-doc gettext-devel vala python3 \ - python3-pyparsing" - -cloonix_ssh ${NET} ${NAME} "dnf install -y gstreamer1-devel \ - gstreamer1-plugins-base-devel \ - gstreamer1-plugins-good \ - gstreamer1-plugins-bad-free" - -cloonix_ssh ${NET} ${NAME} "dnf install -y c-ares-devel \ - libpcap-devel \ - pcre2-devel \ - flex \ - cmake \ - python3 \ - libgcrypt-devel \ - speexdsp-devel \ - qt6-qtbase-devel \ - qt6-qttools-devel \ - qt6-qt5compat-devel \ - qt6-qtmultimedia-devel \ - libxkbcommon-devel" - -#---------------------------------------------------------------------- -cloonix_ssh ${NET} ${NAME} "sync" -cloonix_ssh ${NET} ${NAME} "poweroff" -#---------------------------------------------------------------------- - - diff --git a/build_tools/vmbuild/debian_vmbuild_config b/build_tools/vmbuild/vmbuild_create similarity index 94% rename from build_tools/vmbuild/debian_vmbuild_config rename to build_tools/vmbuild/vmbuild_create index 1d506b0a..8cba2456 100755 --- a/build_tools/vmbuild/debian_vmbuild_config +++ b/build_tools/vmbuild/vmbuild_create @@ -51,10 +51,13 @@ cloonix_ssh ${NET} ${NAME} "apt-get -y install tar build-essential g++ cmake \ liblz4-dev libpcap-dev libsasl2-dev libfuse3-dev \ fuse-overlayfs libnuma-dev libepoxy-dev xorriso \ libgtk-3-dev libjson-glib-dev libacl1-dev \ - libpolkit-gobject-1-dev \ + libpolkit-gobject-1-dev busybox-static \ libyajl-dev make git libsystemd-dev \ libprotobuf-c-dev libcap-dev libseccomp-dev \ - libgcrypt20-dev go-md2man python3 python3-venv" + libgcrypt20-dev go-md2man python3 python3-venv \ + locales libffi-dev libfdt-dev libfuse-dev \ + libarchive-dev libaio-dev liburing-dev \ + fuse-zip libasound2-dev" cloonix_ssh ${NET} ${NAME} "apt-get -y install libc-ares-dev \ libpcre2-dev \ @@ -88,6 +91,7 @@ cloonix_ssh ${NET} ${NAME} "apt-get -y install libc-ares-dev \ ccache \ doxygen" + #---------------------------------------------------------------------- cloonix_ssh ${NET} ${NAME} "sync" cloonix_ssh ${NET} ${NAME} "poweroff" diff --git a/cloonix/client/cairo_canvas/src/bank/include/bank.h b/cloonix/client/cairo_canvas/src/bank/include/bank.h index e1612b95..fd58f19c 100644 --- a/cloonix/client/cairo_canvas/src/bank/include/bank.h +++ b/cloonix/client/cairo_canvas/src/bank/include/bank.h @@ -42,7 +42,6 @@ typedef struct t_pbi_cnt int cnt_evt_ping_ok; char type[MAX_NAME_LEN]; char image[MAX_PATH_LEN]; - char customer_launch[MAX_PATH_LEN]; int cnt_vm_id; int nb_tot_eth; t_eth_table eth_tab[MAX_ETH_VM]; @@ -172,8 +171,7 @@ int is_first_brtcl_on_canvas(void); t_bank_item *look_for_sat_with_id(char *name); t_bank_item *look_for_eth_with_id(char *name, int num); /*--------------------------------------------------------------------------*/ -void bank_cnt_create(char *type, char *name, char *image, - char *customer_launch, int vm_id, +void bank_cnt_create(char *type, char *name, char *image, int vm_id, int ping_ok, int nb_tot_eth, t_eth_table *eth_tab, double x, double y, int hidden_on_graph, double *tx, double *ty, int32_t *thidden); diff --git a/cloonix/client/cairo_canvas/src/bank/src/add_new_item.c b/cloonix/client/cairo_canvas/src/bank/src/add_new_item.c index 1aab0f6b..28058564 100644 --- a/cloonix/client/cairo_canvas/src/bank/src/add_new_item.c +++ b/cloonix/client/cairo_canvas/src/bank/src/add_new_item.c @@ -728,8 +728,8 @@ int add_new_node(char *name, char *kernel, char *rootfs_used, /*--------------------------------------------------------------------------*/ /****************************************************************************/ -int add_new_cnt(char *type, char *name, char *image, char *customer_launch, - int vm_id, double x, double y, int hidden_on_graph, +int add_new_cnt(char *type, char *name, char *image, int vm_id, + double x, double y, int hidden_on_graph, int ping_ok, int nb_tot_eth, t_eth_table *eth_tab) { int result = 0; @@ -749,8 +749,6 @@ int add_new_cnt(char *type, char *name, char *image, char *customer_launch, memset(bitem->pbi.pbi_cnt, 0, sizeof(t_pbi_cnt)); strncpy(bitem->pbi.pbi_cnt->type, type, MAX_NAME_LEN-1); strncpy(bitem->pbi.pbi_cnt->image, image, MAX_PATH_LEN-1); - strncpy(bitem->pbi.pbi_cnt->customer_launch, customer_launch, - MAX_PATH_LEN-1); bitem->pbi.pbi_cnt->cnt_evt_ping_ok = ping_ok; bitem->pbi.pbi_cnt->cnt_vm_id = vm_id; bitem->pbi.pbi_cnt->nb_tot_eth = nb_tot_eth; diff --git a/cloonix/client/cairo_canvas/src/bank/src/bank_item.h b/cloonix/client/cairo_canvas/src/bank/src/bank_item.h index afae918b..66228692 100644 --- a/cloonix/client/cairo_canvas/src/bank/src/bank_item.h +++ b/cloonix/client/cairo_canvas/src/bank/src/bank_item.h @@ -29,8 +29,8 @@ void delete_bitem(t_bank_item *bitem); void selectioned_item_init(void); void selectioned_item_delete(t_bank_item *bitem); /*--------------------------------------------------------------------------*/ -int add_new_cnt(char *type, char *name, char *image, char *customer_launch, - int vm_id, double x, double y, int hidden_on_graph, +int add_new_cnt(char *type, char *name, char *image, int vm_id, + double x, double y, int hidden_on_graph, int ping_ok, int nb_tot_eth, t_eth_table *eth_tab); /*--------------------------------------------------------------------------*/ int add_new_node(char *name, char *kernel, char *rootfs_used, diff --git a/cloonix/client/cairo_canvas/src/bank/src/from_interface.c b/cloonix/client/cairo_canvas/src/bank/src/from_interface.c index f937564f..8290fc91 100644 --- a/cloonix/client/cairo_canvas/src/bank/src/from_interface.c +++ b/cloonix/client/cairo_canvas/src/bank/src/from_interface.c @@ -94,15 +94,14 @@ void bank_node_create(char *name, char *kernel, char *rootfs_used, /*--------------------------------------------------------------------------*/ /****************************************************************************/ -void bank_cnt_create(char *type, char *name, char *image, - char *customer_launch, int vm_id, +void bank_cnt_create(char *type, char *name, char *image, int vm_id, int ping_ok, int nb_tot_eth, t_eth_table *eth_tab, double x, double y, int hidden_on_graph, double *tx, double *ty, int32_t *thidden) { int i; - add_new_cnt(type, name, image, customer_launch, vm_id, x, y, - hidden_on_graph, ping_ok, nb_tot_eth, eth_tab); + add_new_cnt(type, name, image, vm_id, x, y, hidden_on_graph, + ping_ok, nb_tot_eth, eth_tab); for (i=0; i < nb_tot_eth; i++) { if ((eth_tab[i].endp_type == endp_type_eths) || diff --git a/cloonix/client/cairo_canvas/src/canvas_ctx.c b/cloonix/client/cairo_canvas/src/canvas_ctx.c index a7afcf4d..b380cdb1 100644 --- a/cloonix/client/cairo_canvas/src/canvas_ctx.c +++ b/cloonix/client/cairo_canvas/src/canvas_ctx.c @@ -93,16 +93,25 @@ static void call_cloonix_interface_tap_create(double x, double y) snprintf(name, IFNAMSIZ-1, "%stap%d", net_name, num++); name[IFNAMSIZ-1] = 0; topo_get_matrix_inv_transform_point(&x0, &y0); - to_cloonix_switch_create_sat(name, endp_type_tapv, NULL, x0, y0); + to_cloonix_switch_create_sat(name, endp_type_taps, NULL, x0, y0); } /*--------------------------------------------------------------------------*/ /****************************************************************************/ -static void call_cloonix_interface_phy_create(char *name, double x, double y) +static void call_interface_absorb_phy_create(char *name, double x, double y) { double x0=x, y0=y; topo_get_matrix_inv_transform_point(&x0, &y0); - to_cloonix_switch_create_sat(name, endp_type_phyv, NULL, x0, y0); + to_cloonix_switch_create_sat(name, endp_type_phyas, NULL, x0, y0); +} +/*--------------------------------------------------------------------------*/ + +/****************************************************************************/ +static void call_interface_macvlan_phy_create(char *name, double x, double y) +{ + double x0=x, y0=y; + topo_get_matrix_inv_transform_point(&x0, &y0); + to_cloonix_switch_create_sat(name, endp_type_phyms, NULL, x0, y0); } /*--------------------------------------------------------------------------*/ @@ -536,10 +545,18 @@ static void c2c_cact(void) /*--------------------------------------------------------------------------*/ /****************************************************************************/ -static void cphy(gpointer data) +static void macvlan_phy(gpointer data) { unsigned long i = (unsigned long) data; - call_cloonix_interface_phy_create(g_topo_phy[i].name, g_x_mouse, g_y_mouse); + call_interface_macvlan_phy_create(g_topo_phy[i].name, g_x_mouse, g_y_mouse); +} +/*--------------------------------------------------------------------------*/ + +/****************************************************************************/ +static void absorb_phy(gpointer data) +{ + unsigned long i = (unsigned long) data; + call_interface_absorb_phy_create(g_topo_phy[i].name, g_x_mouse, g_y_mouse); } /*--------------------------------------------------------------------------*/ @@ -547,18 +564,29 @@ static void cphy(gpointer data) static void phy_sub_menu(GtkWidget *phy) { unsigned long i; - GtkWidget *menu = gtk_menu_new(); - GtkWidget *item; + GtkWidget *menu_intf = gtk_menu_new(); + GtkWidget *menu, *item, *item_intf; if (!phy) KOUT(" "); for (i=0; iphy[i]); bitem = bank_get_item(bank_type_sat, cur->name, 0, NULL); - if ((bitem) && ((bitem->pbi.endp_type == endp_type_phys) || - (bitem->pbi.endp_type == endp_type_phyv))) + if ((bitem) && + ((bitem->pbi.endp_type == endp_type_phyas) || + (bitem->pbi.endp_type == endp_type_phyav) || + (bitem->pbi.endp_type == endp_type_phyms) || + (bitem->pbi.endp_type == endp_type_phymv))) { bitem->pbi.endp_type = cur->endp_type; } @@ -362,13 +365,6 @@ static void slowperiodic_img_cb(int nb, t_slowperiodic *spic) } /*--------------------------------------------------------------------------*/ -/****************************************************************************/ -static void slowperiodic_docker_cb(int nb, t_slowperiodic *spic) -{ - set_buldoc(nb, spic); -} -/*--------------------------------------------------------------------------*/ - /****************************************************************************/ static void slowperiodic_podman_cb(int nb, t_slowperiodic *spic) { @@ -441,7 +437,6 @@ void timer_topo_subscribe(void *data) client_req_eventfull(eventfull_cb); client_req_slowperiodic(slowperiodic_qcow2_cb, slowperiodic_img_cb, - slowperiodic_docker_cb, slowperiodic_podman_cb); } /*--------------------------------------------------------------------------*/ diff --git a/cloonix/client/cairo_canvas/src/interface/src/timeout_end_req.c b/cloonix/client/cairo_canvas/src/interface/src/timeout_end_req.c index f8705921..5836ebc3 100644 --- a/cloonix/client/cairo_canvas/src/interface/src/timeout_end_req.c +++ b/cloonix/client/cairo_canvas/src/interface/src/timeout_end_req.c @@ -98,12 +98,8 @@ void timer_create_item_node_req(void *data) cust_topo_cnt.nb_tot_eth*sizeof(t_eth_table)); if (!strcmp(cust_cnt->brandtype, "crun")) strncpy(cust_topo_cnt.image, cust_cnt->cru_image, MAX_PATH_LEN-1); - else if (!strcmp(cust_cnt->brandtype, "docker")) - strncpy(cust_topo_cnt.image, cust_cnt->doc_image, MAX_PATH_LEN-1); else if (!strcmp(cust_cnt->brandtype, "podman")) strncpy(cust_topo_cnt.image, cust_cnt->pod_image, MAX_PATH_LEN-1); - strncpy(cust_topo_cnt.customer_launch, cust_cnt->customer_launch, - MAX_PATH_LEN-1); client_add_cnt(0, callback_end, &cust_topo_cnt); } clownix_free(pa, __FUNCTION__); @@ -134,16 +130,24 @@ void timer_create_item_req(void *data) } else if (pa->endp_type == endp_type_a2b) client_add_a2b(0, callback_end, pa->name); - else if (pa->endp_type == endp_type_tapv) + else if (pa->endp_type == endp_type_taps) client_add_tap(0, callback_end, pa->name); else if (pa->endp_type == endp_type_natv) client_add_nat(0, callback_end, pa->name); - else if (pa->endp_type == endp_type_phyv) + else if ((pa->endp_type == endp_type_phyas) || + (pa->endp_type == endp_type_phyms)) { if (strlen(pa->name) == 0) KERR("%d %d", pa->bank_type, pa->endp_type); else - client_add_phy(0, callback_end, pa->name); + { + if (pa->endp_type == endp_type_phyas) + client_add_phy(0, callback_end, pa->name, endp_type_phyas); + else if (pa->endp_type == endp_type_phyms) + client_add_phy(0, callback_end, pa->name, endp_type_phyms); + else + KOUT("ERROR %s %d", pa->name, pa->endp_type); + } } else KERR("%d %s %d", pa->bank_type, pa->name, pa->endp_type); diff --git a/cloonix/client/cairo_canvas/src/interface/src/timeout_end_resp.c b/cloonix/client/cairo_canvas/src/interface/src/timeout_end_resp.c index 21bddfb7..77142249 100644 --- a/cloonix/client/cairo_canvas/src/interface/src/timeout_end_resp.c +++ b/cloonix/client/cairo_canvas/src/interface/src/timeout_end_resp.c @@ -65,8 +65,8 @@ static void create_cnt_resp(t_topo_cnt *cnt) get_node_layout_x_y(cnt->name, &x, &y, &hidden_on_graph, tx, ty, thidden_on_graph); - bank_cnt_create(cnt->brandtype, cnt->name, cnt->image, cnt->customer_launch, - cnt->vm_id, cnt->ping_ok, cnt->nb_tot_eth, cnt->eth_table, + bank_cnt_create(cnt->brandtype, cnt->name, cnt->image, cnt->vm_id, + cnt->ping_ok, cnt->nb_tot_eth, cnt->eth_table, x, y, hidden_on_graph, tx, ty, thidden_on_graph); } /*--------------------------------------------------------------------------*/ diff --git a/cloonix/client/cairo_canvas/src/menu_dialog_cnt.c b/cloonix/client/cairo_canvas/src/menu_dialog_cnt.c index fe721bcb..d166b30a 100644 --- a/cloonix/client/cairo_canvas/src/menu_dialog_cnt.c +++ b/cloonix/client/cairo_canvas/src/menu_dialog_cnt.c @@ -35,13 +35,11 @@ GtkWidget *get_main_window(void); static t_custom_cnt g_custom_cnt; -static GtkWidget *g_custom_dialog, *g_entry_image, *g_entry_customer_launch; +static GtkWidget *g_custom_dialog, *g_entry_image; static GtkWidget *g_image_menu; void menu_choice_cnt(void); static t_slowperiodic g_bulcru[MAX_BULK_FILES]; static int g_nb_bulcru; -static t_slowperiodic g_buldoc[MAX_BULK_FILES]; -static int g_nb_buldoc; static t_slowperiodic g_bulpod[MAX_BULK_FILES]; static int g_nb_bulpod; @@ -63,11 +61,6 @@ static void img_get(GtkWidget *check, gpointer data) memset(cust->cru_image, 0, MAX_NAME_LEN); strncpy(cust->cru_image, name, MAX_NAME_LEN-1); } - else if (!strcmp(cust->brandtype, "docker")) - { - memset(cust->doc_image, 0, MAX_NAME_LEN); - strncpy(cust->doc_image, name, MAX_NAME_LEN-1); - } else if (!strcmp(cust->brandtype, "podman")) { memset(cust->pod_image, 0, MAX_NAME_LEN); @@ -124,11 +117,6 @@ static void setup_list_choices(void) gtk_entry_set_text(GTK_ENTRY(g_entry_image), cust->cru_image); menu = get_bul(g_nb_bulcru, g_bulcru, cust->cru_image); } - else if (!strcmp(cust->brandtype, "docker")) - { - gtk_entry_set_text(GTK_ENTRY(g_entry_image), cust->doc_image); - menu = get_bul(g_nb_buldoc, g_buldoc, cust->doc_image); - } else if (!strcmp(cust->brandtype, "podman")) { gtk_entry_set_text(GTK_ENTRY(g_entry_image), cust->pod_image); @@ -155,17 +143,6 @@ void set_bulcru(int nb, t_slowperiodic *slowperiodic) } /*--------------------------------------------------------------------------*/ -/*****************************************************************************/ -void set_buldoc(int nb, t_slowperiodic *slowperiodic) -{ - if (nb<0 || nb >= MAX_BULK_FILES) - KOUT("%d", nb); - g_nb_buldoc = nb; - memset(g_buldoc, 0, MAX_BULK_FILES * sizeof(t_slowperiodic)); - memcpy(g_buldoc, slowperiodic, g_nb_buldoc * sizeof(t_slowperiodic)); -} -/*--------------------------------------------------------------------------*/ - /*****************************************************************************/ void set_bulpod(int nb, t_slowperiodic *slowperiodic) { @@ -206,12 +183,6 @@ static void update_cust(t_custom_cnt *cust, GtkWidget *entry_name) tmp = (char *) gtk_entry_get_text(GTK_ENTRY(entry_name)); memset(cust->name, 0, MAX_NAME_LEN); strncpy(cust->name, tmp, MAX_NAME_LEN-1); - - - tmp = (char *) gtk_entry_get_text(GTK_ENTRY(g_entry_customer_launch)); - memset(cust->customer_launch, 0, MAX_PATH_LEN); - strncpy(cust->customer_launch, tmp, MAX_PATH_LEN-1); - } /*--------------------------------------------------------------------------*/ @@ -312,7 +283,7 @@ static void flags_eth_check_button(GtkWidget *grid, int *line_nb, /*--------------------------------------------------------------------------*/ /****************************************************************************/ -static void crun_docker_podman_cb(GtkWidget *check, gpointer data) +static void crun_podman_cb(GtkWidget *check, gpointer data) { int brand = (int) ((unsigned long) data); t_custom_cnt *cust = &g_custom_cnt; @@ -320,8 +291,6 @@ static void crun_docker_podman_cb(GtkWidget *check, gpointer data) KOUT(" "); if (brand == brand_crun) strcpy(cust->brandtype, "crun"); - else if (brand == brand_docker) - strcpy(cust->brandtype, "docker"); else if (brand == brand_podman) strcpy(cust->brandtype, "podman"); else @@ -331,34 +300,27 @@ static void crun_docker_podman_cb(GtkWidget *check, gpointer data) /*--------------------------------------------------------------------------*/ /****************************************************************************/ -static GtkWidget *crun_docker_podman(void) +static GtkWidget *crun_podman(void) { - GtkWidget *result, *rad1, *rad2, *rad3; + GtkWidget *result, *rad1, *rad2; GSList *group = NULL; t_custom_cnt *cust = &g_custom_cnt; result = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); rad1 = gtk_radio_button_new_with_label(group, "crun"); group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(rad1)); - rad2 = gtk_radio_button_new_with_label(group, "docker"); - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(rad2)); - rad3 = gtk_radio_button_new_with_label(group, "podman"); + rad2 = gtk_radio_button_new_with_label(group, "podman"); g_signal_connect(G_OBJECT(rad1),"clicked", - (GCallback)crun_docker_podman_cb, (gpointer) brand_crun); + (GCallback)crun_podman_cb, (gpointer) brand_crun); g_signal_connect(G_OBJECT(rad2),"clicked", - (GCallback)crun_docker_podman_cb, (gpointer) brand_docker); - g_signal_connect(G_OBJECT(rad3),"clicked", - (GCallback)crun_docker_podman_cb, (gpointer) brand_podman); + (GCallback)crun_podman_cb, (gpointer) brand_podman); if (!strcmp(cust->brandtype, "crun")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rad1),TRUE); - else if (!strcmp(cust->brandtype, "docker")) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rad2),TRUE); else if (!strcmp(cust->brandtype, "podman")) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rad3),TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rad2),TRUE); else KOUT("%s", cust->brandtype); gtk_box_pack_start(GTK_BOX(result), rad1, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(result), rad2, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(result), rad3, FALSE, FALSE, 0); gtk_widget_show_all(result); return result; } @@ -391,17 +353,6 @@ static void custom_vm_dialog(t_custom_cnt *cust) if ((found == 0) && (g_nb_bulcru >= 1)) strncpy(cust->cru_image, g_bulcru[0].name, MAX_NAME_LEN-1); } - else if (!strcmp(cust->brandtype, "docker")) - { - strncpy(image, cust->doc_image, MAX_NAME_LEN); - for (i=0; idoc_image, g_buldoc[i].name)) - found = 1; - } - if ((found == 0) && (g_nb_buldoc >= 1)) - strncpy(cust->doc_image, g_buldoc[0].name, MAX_NAME_LEN-1); - } else if (!strcmp(cust->brandtype, "podman")) { strncpy(image, cust->pod_image, MAX_NAME_LEN); @@ -438,17 +389,11 @@ static void custom_vm_dialog(t_custom_cnt *cust) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(is_persistent), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(is_persistent), FALSE); - - brand = crun_docker_podman(); - + brand = crun_podman(); g_signal_connect(is_persistent,"toggled",G_CALLBACK(is_persistent_toggle),NULL); append_grid(grid, is_persistent, "remanence:", line_nb++); append_grid(grid, brand, "container:", line_nb++); - g_entry_customer_launch = gtk_entry_new(); - gtk_entry_set_text(GTK_ENTRY(g_entry_customer_launch), cust->customer_launch); - append_grid(grid, g_entry_customer_launch, "Customer_launch:", line_nb++); - for (i=0; ipbi.pbi_cnt->image); - len += snprintf(text + len, MAX_TEXT-len-1, "\nCustomer_launch: %s", - bitem->pbi.pbi_cnt->customer_launch); text[MAX_TEXT-1] = 0; display_info(title, text); } @@ -359,8 +357,10 @@ static void sat_item_info(GtkWidget *mn, t_item_ident *pm) { snprintf(title, MAX_PATH_LEN, "%s", bitem->name); title[2*MAX_NAME_LEN-1] = 0; - if ((bitem->pbi.endp_type == endp_type_phys) || - (bitem->pbi.endp_type == endp_type_phyv)) + if ((bitem->pbi.endp_type == endp_type_phyas) || + (bitem->pbi.endp_type == endp_type_phyav) || + (bitem->pbi.endp_type == endp_type_phyms) || + (bitem->pbi.endp_type == endp_type_phymv)) len += sprintf(text + len, "\nPHY"); else if ((bitem->pbi.endp_type == endp_type_taps) || (bitem->pbi.endp_type == endp_type_tapv)) @@ -790,15 +790,17 @@ void sat_ctx_menu(t_bank_item *bitem) t_item_ident *pm = get_and_init_pm(bitem); bitem->pbi.menu_on = 1; - if ((pm->endp_type == endp_type_tapv) || - (pm->endp_type == endp_type_phyv) || - (pm->endp_type == endp_type_natv) || + if ((pm->endp_type == endp_type_tapv) || + (pm->endp_type == endp_type_phyav) || + (pm->endp_type == endp_type_phymv) || + (pm->endp_type == endp_type_natv) || (pm->endp_type == endp_type_c2cv)) item_dyn_snf = gtk_menu_item_new_with_label("Add snf capa"); - if ((pm->endp_type == endp_type_taps) || - (pm->endp_type == endp_type_phys) || - (pm->endp_type == endp_type_nats) || + if ((pm->endp_type == endp_type_taps) || + (pm->endp_type == endp_type_phyas) || + (pm->endp_type == endp_type_phyms) || + (pm->endp_type == endp_type_nats) || (pm->endp_type == endp_type_c2cs)) { item_wireshark = gtk_menu_item_new_with_label("wireshark"); @@ -809,16 +811,18 @@ void sat_ctx_menu(t_bank_item *bitem) item_delete = gtk_menu_item_new_with_label("Delete"); item_info = gtk_menu_item_new_with_label("Info"); - if ((pm->endp_type == endp_type_tapv) || - (pm->endp_type == endp_type_phyv) || - (pm->endp_type == endp_type_natv) || + if ((pm->endp_type == endp_type_tapv) || + (pm->endp_type == endp_type_phyav) || + (pm->endp_type == endp_type_phymv) || + (pm->endp_type == endp_type_natv) || (pm->endp_type == endp_type_c2cv)) g_signal_connect(G_OBJECT(item_dyn_snf), "activate", G_CALLBACK(intf_item_dyn_snf_on), (gpointer) pm); - if ((pm->endp_type == endp_type_taps) || - (pm->endp_type == endp_type_phys) || - (pm->endp_type == endp_type_nats) || + if ((pm->endp_type == endp_type_taps) || + (pm->endp_type == endp_type_phyas) || + (pm->endp_type == endp_type_phyms) || + (pm->endp_type == endp_type_nats) || (pm->endp_type == endp_type_c2cs)) { g_signal_connect(G_OBJECT(item_wireshark), "activate", @@ -836,18 +840,20 @@ void sat_ctx_menu(t_bank_item *bitem) g_signal_connect(G_OBJECT(menu), "hide", G_CALLBACK(menu_hidden), (gpointer) pm); - if ((pm->endp_type == endp_type_taps) || - (pm->endp_type == endp_type_phys) || - (pm->endp_type == endp_type_nats) || + if ((pm->endp_type == endp_type_taps) || + (pm->endp_type == endp_type_phyas) || + (pm->endp_type == endp_type_phyms) || + (pm->endp_type == endp_type_nats) || (pm->endp_type == endp_type_c2cs)) { gtk_menu_shell_append(GTK_MENU_SHELL(menu), item_wireshark); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item_dyn_snf); } - if ((pm->endp_type == endp_type_tapv) || - (pm->endp_type == endp_type_phyv) || - (pm->endp_type == endp_type_natv) || + if ((pm->endp_type == endp_type_tapv) || + (pm->endp_type == endp_type_phyav) || + (pm->endp_type == endp_type_phymv) || + (pm->endp_type == endp_type_natv) || (pm->endp_type == endp_type_c2cv)) gtk_menu_shell_append(GTK_MENU_SHELL(menu), item_dyn_snf); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item_hidden); diff --git a/cloonix/client/cairo_canvas/src/topo.c b/cloonix/client/cairo_canvas/src/topo.c index 778b1c51..a3648003 100644 --- a/cloonix/client/cairo_canvas/src/topo.c +++ b/cloonix/client/cairo_canvas/src/topo.c @@ -364,9 +364,10 @@ static void process_mouse_double_click(t_bank_item *bitem) case bank_type_sat: bitem->pbi.flag = flag_normal; - if ((bitem->pbi.endp_type == endp_type_nats) || - (bitem->pbi.endp_type == endp_type_taps) || - (bitem->pbi.endp_type == endp_type_phys) || + if ((bitem->pbi.endp_type == endp_type_nats) || + (bitem->pbi.endp_type == endp_type_taps) || + (bitem->pbi.endp_type == endp_type_phyas) || + (bitem->pbi.endp_type == endp_type_phyms) || (bitem->pbi.endp_type == endp_type_c2cs)) wireshark_launch(0, bitem->name, 0); else @@ -983,10 +984,12 @@ static void on_item_paint_tap(CrItem *item, cairo_t *c) cairo_set_source_rgba (c, black.r, black.g, black.b, 1.0); cairo_stroke_preserve(c); if ((bitem->pbi.endp_type == endp_type_taps) || - (bitem->pbi.endp_type == endp_type_phys)) + (bitem->pbi.endp_type == endp_type_phyas) || + (bitem->pbi.endp_type == endp_type_phyms)) cairo_set_source_rgba (c, lightgreen.r, lightgreen.g, lightgreen.b, 1.0); else if ((bitem->pbi.endp_type == endp_type_tapv) || - (bitem->pbi.endp_type == endp_type_phyv)) + (bitem->pbi.endp_type == endp_type_phyav) || + (bitem->pbi.endp_type == endp_type_phymv)) cairo_set_source_rgba (c, lightcyan.r, lightcyan.g, lightcyan.b, 1.0); else KERR("ERROR %s %d", bitem->name, bitem->pbi.endp_type); @@ -1407,8 +1410,10 @@ void topo_add_cr_item_to_canvas(t_bank_item *bitem, t_bank_item *bnode) } else if ((bitem->pbi.endp_type == endp_type_taps) || (bitem->pbi.endp_type == endp_type_tapv) || - (bitem->pbi.endp_type == endp_type_phys) || - (bitem->pbi.endp_type == endp_type_phyv)) + (bitem->pbi.endp_type == endp_type_phyas) || + (bitem->pbi.endp_type == endp_type_phyav) || + (bitem->pbi.endp_type == endp_type_phyms) || + (bitem->pbi.endp_type == endp_type_phymv)) { g_signal_connect(item, "paint", (GCallback) on_item_paint_tap, NULL); } diff --git a/cloonix/client/ctrl/src/cloonix_ctrl.c b/cloonix/client/ctrl/src/cloonix_ctrl.c index e3b9da61..21e6554d 100644 --- a/cloonix/client/ctrl/src/cloonix_ctrl.c +++ b/cloonix/client/ctrl/src/cloonix_ctrl.c @@ -98,8 +98,7 @@ struct cmd_struct level_add_cmd[] = { {"lan", "Add lan (emulated cable)", NULL, cmd_add_vl2sat, help_add_vl2sat}, {"kvm", "Add kvm (virtualized machine)", NULL,cmd_add_vm_kvm,help_add_vm_kvm}, {"cru", "Add container crun", NULL, cmd_add_cru, help_add_cru}, -{"doc", "Add container docker", NULL, cmd_add_doc, help_add_doc_pod}, -{"pod", "Add container podman", NULL, cmd_add_pod, help_add_doc_pod}, +{"pod", "Add container podman", NULL, cmd_add_pod, help_add_pod}, {"tap", "Add tap (host network interface)", NULL, cmd_add_tap, help_add_tap}, {"phy", "Add phy (real host network interface)", NULL, cmd_add_phy, help_add_phy}, {"nat", "Add nat (access host ip)",NULL, cmd_add_nat, help_add_nat}, diff --git a/cloonix/client/ctrl/src/cmd_ctrl.c b/cloonix/client/ctrl/src/cmd_ctrl.c index a04398ce..cc88ab6e 100644 --- a/cloonix/client/ctrl/src/cmd_ctrl.c +++ b/cloonix/client/ctrl/src/cmd_ctrl.c @@ -123,11 +123,17 @@ static char *get_type_endp(int type) char *result = "notfound"; switch (type) { - case endp_type_phys: - result = "phys"; + case endp_type_phyas: + result = "phyas"; break; - case endp_type_phyv: - result = "phyv"; + case endp_type_phyav: + result = "phyav"; + break; + case endp_type_phyms: + result = "phyms"; + break; + case endp_type_phymv: + result = "phymv"; break; case endp_type_eths: result = "eths"; @@ -555,12 +561,19 @@ int cmd_add_tap(int argc, char **argv) /*****************************************************************************/ int cmd_add_phy(int argc, char **argv) { - int result = -1; - if (argc == 1) + int num = -1, result = -1; + if (argc == 2) { - result = 0; - init_connection_to_uml_cloonix_switch(); - client_add_phy(0, callback_end, argv[0]); + if (!strcmp(argv[1], "absorb")) + num = endp_type_phyav; + if (!strcmp(argv[1], "macvlan")) + num = endp_type_phymv; + if (num >= 0) + { + result = 0; + init_connection_to_uml_cloonix_switch(); + client_add_phy(0, callback_end, argv[0], num); + } } return result; } diff --git a/cloonix/client/ctrl/src/cmd_help_fn.h b/cloonix/client/ctrl/src/cmd_help_fn.h index 091c191b..f3c5dfa1 100644 --- a/cloonix/client/ctrl/src/cmd_help_fn.h +++ b/cloonix/client/ctrl/src/cmd_help_fn.h @@ -34,7 +34,6 @@ int cmd_color_kvm(int argc, char **argv); int cmd_color_cnt(int argc, char **argv); int cmd_add_tap(int argc, char **argv); int cmd_add_cru(int argc, char **argv); -int cmd_add_doc(int argc, char **argv); int cmd_add_pod(int argc, char **argv); int cmd_add_phy(int argc, char **argv); int cmd_add_a2b(int argc, char **argv); @@ -65,7 +64,7 @@ void help_add_snf(char *line); void help_add_phy(char *line); void help_add_tap(char *line); void help_add_cru(char *line); -void help_add_doc_pod(char *line); +void help_add_pod(char *line); void help_add_a2b(char *line); void help_add_c2c(char *line); void help_del_sat(char *line); diff --git a/cloonix/client/ctrl/src/cnt_cli.c b/cloonix/client/ctrl/src/cnt_cli.c index 074b1852..6e6de656 100644 --- a/cloonix/client/ctrl/src/cnt_cli.c +++ b/cloonix/client/ctrl/src/cnt_cli.c @@ -41,37 +41,35 @@ void help_add_cru(char *line) printf("\n\t\t eth=svv says eth0 eth1 and eth2, eth0 is spyable"); printf("\n\tMax eth: %d", MAX_ETH_VM); printf("\n\t[options]"); - printf("\n\t --customer_launch=\"