From f0a75df8e348b6666037d02fced3047caa5923e8 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 30 Jul 2024 18:45:26 +0300 Subject: [PATCH 1/4] feat: add vim and vim-tiny slices to 24.04 --- slices/libgpm2.yaml | 15 +++++++++++ slices/libpython3.12t64.yaml | 12 +++++++++ slices/libsodium23.yaml | 15 +++++++++++ slices/vim-common.yaml | 18 +++++++++++++ slices/vim-runtime.yaml | 49 ++++++++++++++++++++++++++++++++++++ slices/vim-tiny.yaml | 25 ++++++++++++++++++ slices/vim.yaml | 24 ++++++++++++++++++ 7 files changed, 158 insertions(+) create mode 100644 slices/libgpm2.yaml create mode 100644 slices/libpython3.12t64.yaml create mode 100644 slices/libsodium23.yaml create mode 100644 slices/vim-common.yaml create mode 100644 slices/vim-runtime.yaml create mode 100644 slices/vim-tiny.yaml create mode 100644 slices/vim.yaml diff --git a/slices/libgpm2.yaml b/slices/libgpm2.yaml new file mode 100644 index 000000000..1971dea3f --- /dev/null +++ b/slices/libgpm2.yaml @@ -0,0 +1,15 @@ +package: libgpm2 + +essential: + - libgpm2_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/libgpm.so.2: + + copyright: + contents: + /usr/share/doc/libgpm2/copyright: diff --git a/slices/libpython3.12t64.yaml b/slices/libpython3.12t64.yaml new file mode 100644 index 000000000..fdfcc83b9 --- /dev/null +++ b/slices/libpython3.12t64.yaml @@ -0,0 +1,12 @@ +package: libpython3.12t64 + +slices: + libs: + essential: + - libc6_libs + - libexpat1_libs + - libpython3.12-stdlib_core + - zlib1g_libs + contents: + /usr/lib/python3.12/config-3.12-*-linux-*/libpython3.12.so: + /usr/lib/*-linux-*/libpython3.12.so.1*: diff --git a/slices/libsodium23.yaml b/slices/libsodium23.yaml new file mode 100644 index 000000000..2e0efb348 --- /dev/null +++ b/slices/libsodium23.yaml @@ -0,0 +1,15 @@ +package: libsodium23 + +essential: + - libsodium23_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/libsodium.so.23*: + + copyright: + contents: + /usr/share/doc/libsodium23/copyright: diff --git a/slices/vim-common.yaml b/slices/vim-common.yaml new file mode 100644 index 000000000..ea8478c1b --- /dev/null +++ b/slices/vim-common.yaml @@ -0,0 +1,18 @@ +package: vim-common + +essential: + - vim-common_copyright + +slices: + config: + contents: + /etc/vim/vimrc: + /usr/share/vim/vim91/debian.vim: + + data: + contents: + /usr/bin/helpztags: + + copyright: + contents: + /usr/share/doc/vim-common/copyright: diff --git a/slices/vim-runtime.yaml b/slices/vim-runtime.yaml new file mode 100644 index 000000000..b6e15f47e --- /dev/null +++ b/slices/vim-runtime.yaml @@ -0,0 +1,49 @@ +package: vim-runtime + +essential: + - vim-runtime_copyright + +slices: + vimtutor: + contents: + /usr/bin/vimtutor: + /usr/share/vim/vim*/tutor/tutor*: + + plugins: + contents: + /usr/share/vim/vim*/autoload/**: + /usr/share/vim/vim*/bugreport.vim: + /usr/share/vim/vim*/colors/**: + /usr/share/vim/vim*/compiler/**: + /usr/share/vim/vim*/defaults.vim: + /usr/share/vim/vim*/delmenu.vim: + /usr/share/vim/vim*/evim.vim: + /usr/share/vim/vim*/filetype.vim: + /usr/share/vim/vim*/ftoff.vim: + /usr/share/vim/vim*/ftplugin.vim: + /usr/share/vim/vim*/ftplugin/**: + /usr/share/vim/vim*/ftplugof.vim: + /usr/share/vim/vim*/gvimrc_example.vim: + /usr/share/vim/vim*/import/**: + /usr/share/vim/vim*/indent.vim: + /usr/share/vim/vim*/indent/**: + /usr/share/vim/vim*/indoff.vim: + /usr/share/vim/vim*/keymap/**: + /usr/share/vim/vim*/macros/**: + /usr/share/vim/vim*/menu.vim: + /usr/share/vim/vim*/mswin.vim: + /usr/share/vim/vim*/optwin.vim: + /usr/share/vim/vim*/pack/**: + /usr/share/vim/vim*/plugin/**: + /usr/share/vim/vim*/print/**: + /usr/share/vim/vim*/scripts.vim: + /usr/share/vim/vim*/spell/**: + /usr/share/vim/vim*/synmenu.vim: + /usr/share/vim/vim*/syntax/**: + /usr/share/vim/vim*/vimrc_example.vim: + /usr/share/vim/vim*/macros/urm/urm*: + + copyright: + contents: + /usr/share/doc/vim-runtime/copyright: + diff --git a/slices/vim-tiny.yaml b/slices/vim-tiny.yaml new file mode 100644 index 000000000..c243e5be0 --- /dev/null +++ b/slices/vim-tiny.yaml @@ -0,0 +1,25 @@ +package: vim-tiny + +essential: + - vim-tiny_copyright + +slices: + bins: + essential: + - libacl1_libs + - libc6_libs + - libselinux1_libs + - libtinfo6_libs + - vim-common_config + - vim-tiny_config + contents: + /usr/bin/vim.tiny: + /usr/bin/vi: {symlink: /usr/bin/vim.tiny} + + config: + contents: + /etc/vim/vimrc.tiny: + + copyright: + contents: + /usr/share/doc/vim-tiny/copyright: diff --git a/slices/vim.yaml b/slices/vim.yaml new file mode 100644 index 000000000..2f28df9d3 --- /dev/null +++ b/slices/vim.yaml @@ -0,0 +1,24 @@ +package: vim + +essential: + - vim_copyright + +slices: + bins: + essential: + - libacl1_libs + - libc6_libs + - libgpm2_libs + - libpython3.12t64_libs + - libselinux1_libs + - libsodium23_libs + - libtinfo6_libs + - vim-common_config + - vim-runtime_plugins + contents: + /usr/bin/vim.basic: + /usr/bin/vim: {symlink: /usr/bin/vim.basic} + + copyright: + contents: + /usr/share/doc/vim/copyright: From 417d86d261214e4c5f1fc650fa2339fc6d92d936 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 30 Jul 2024 19:06:18 +0300 Subject: [PATCH 2/4] add integration tests for vim --- slices/vim-runtime.yaml | 1 - tests/spread/integration/vim/task.yaml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/spread/integration/vim/task.yaml diff --git a/slices/vim-runtime.yaml b/slices/vim-runtime.yaml index b6e15f47e..64bd700da 100644 --- a/slices/vim-runtime.yaml +++ b/slices/vim-runtime.yaml @@ -46,4 +46,3 @@ slices: copyright: contents: /usr/share/doc/vim-runtime/copyright: - diff --git a/tests/spread/integration/vim/task.yaml b/tests/spread/integration/vim/task.yaml new file mode 100644 index 000000000..ba4fc97ec --- /dev/null +++ b/tests/spread/integration/vim/task.yaml @@ -0,0 +1,12 @@ +summary: Integration tests for vim and vim-tiny + +execute: | + rootfs="$(install-slices vim-tiny_bins)" + echo "hello world" > "$rootfs/test" + chroot "$rootfs" vi -c ":s/hello/bye/" -c ":wq" test + grep bye "$rootfs/test" + + rootfs="$(install-slices vim_bins)" + echo "hello world" > "$rootfs/test" + chroot "$rootfs" vim -c ":s/hello/bye/" -c ":wq" test + grep bye "$rootfs/test" From f50f96007bbc6c8b2884eb9210ff52dfe3649fa5 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Tue, 30 Jul 2024 19:10:21 +0300 Subject: [PATCH 3/4] fix lint errors --- slices/libpython3.12t64.yaml | 2 +- slices/vim-runtime.yaml | 2 +- slices/vim-tiny.yaml | 2 +- slices/vim.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/slices/libpython3.12t64.yaml b/slices/libpython3.12t64.yaml index fdfcc83b9..137600fc1 100644 --- a/slices/libpython3.12t64.yaml +++ b/slices/libpython3.12t64.yaml @@ -8,5 +8,5 @@ slices: - libpython3.12-stdlib_core - zlib1g_libs contents: - /usr/lib/python3.12/config-3.12-*-linux-*/libpython3.12.so: /usr/lib/*-linux-*/libpython3.12.so.1*: + /usr/lib/python3.12/config-3.12-*-linux-*/libpython3.12.so: diff --git a/slices/vim-runtime.yaml b/slices/vim-runtime.yaml index 64bd700da..d07479f1f 100644 --- a/slices/vim-runtime.yaml +++ b/slices/vim-runtime.yaml @@ -30,6 +30,7 @@ slices: /usr/share/vim/vim*/indoff.vim: /usr/share/vim/vim*/keymap/**: /usr/share/vim/vim*/macros/**: + /usr/share/vim/vim*/macros/urm/urm*: /usr/share/vim/vim*/menu.vim: /usr/share/vim/vim*/mswin.vim: /usr/share/vim/vim*/optwin.vim: @@ -41,7 +42,6 @@ slices: /usr/share/vim/vim*/synmenu.vim: /usr/share/vim/vim*/syntax/**: /usr/share/vim/vim*/vimrc_example.vim: - /usr/share/vim/vim*/macros/urm/urm*: copyright: contents: diff --git a/slices/vim-tiny.yaml b/slices/vim-tiny.yaml index c243e5be0..35d9bfe7b 100644 --- a/slices/vim-tiny.yaml +++ b/slices/vim-tiny.yaml @@ -13,8 +13,8 @@ slices: - vim-common_config - vim-tiny_config contents: - /usr/bin/vim.tiny: /usr/bin/vi: {symlink: /usr/bin/vim.tiny} + /usr/bin/vim.tiny: config: contents: diff --git a/slices/vim.yaml b/slices/vim.yaml index 2f28df9d3..8d76af4bb 100644 --- a/slices/vim.yaml +++ b/slices/vim.yaml @@ -16,8 +16,8 @@ slices: - vim-common_config - vim-runtime_plugins contents: - /usr/bin/vim.basic: /usr/bin/vim: {symlink: /usr/bin/vim.basic} + /usr/bin/vim.basic: copyright: contents: From 17b7f3979cb0b69b782afe30f37bbe49d540ae38 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Thu, 1 Aug 2024 10:48:06 +0300 Subject: [PATCH 4/4] delete redundant entry in contents of vim-runtime --- slices/vim-runtime.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/slices/vim-runtime.yaml b/slices/vim-runtime.yaml index d07479f1f..14ba07013 100644 --- a/slices/vim-runtime.yaml +++ b/slices/vim-runtime.yaml @@ -30,7 +30,6 @@ slices: /usr/share/vim/vim*/indoff.vim: /usr/share/vim/vim*/keymap/**: /usr/share/vim/vim*/macros/**: - /usr/share/vim/vim*/macros/urm/urm*: /usr/share/vim/vim*/menu.vim: /usr/share/vim/vim*/mswin.vim: /usr/share/vim/vim*/optwin.vim: