Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new slice definitions for 'git' and dependancies #282

Merged
merged 34 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
58dd5c4
feat: add new slice definitions for 'git' and dependancy 'libcurl3t64…
clay-lake Jul 14, 2024
ecd23aa
fix(git.yaml): essential entries in core are not sorted
clay-lake Jul 15, 2024
127747b
fix(git.yaml): duplicate essential entries in dependant slice
clay-lake Jul 15, 2024
e226db8
fix(git.yaml): removed documentation not required in slice
clay-lake Jul 15, 2024
705e014
fix(git.yaml): removed perl library slice. Unused
clay-lake Jul 15, 2024
0a79b04
Merge branch 'ubuntu-24.04' into create-git-slice
cjdcordeiro Aug 21, 2024
872b340
Merge branch 'ubuntu-24.04' into create-git-slice
clay-lake Oct 2, 2024
d75840b
fea: blank task for git tests, wip
clay-lake Oct 2, 2024
46209f5
refactor: git sdf
clay-lake Oct 2, 2024
ed83599
refactor: minimize SDF according to TDD
clay-lake Oct 21, 2024
e937318
refactor: linter warnings
clay-lake Oct 22, 2024
aefaa73
refactor: linter warnings. Missing changes
clay-lake Oct 22, 2024
6b6a925
Merge branch 'ubuntu-24.04' into create-git-slice
clay-lake Nov 7, 2024
1ca91ec
feat: sliced python3-pyftpdlib
clay-lake Nov 8, 2024
75e15ae
feat: added support for git daemon, ftp clone
clay-lake Nov 8, 2024
efa3af3
Merge branch 'ubuntu-24.04' into create-git-slice
clay-lake Nov 8, 2024
1d4aafb
fix: linting issue
clay-lake Nov 8, 2024
547aa0d
trigger build
clay-lake Nov 8, 2024
9833a85
refactor: remove busybox from tests
clay-lake Nov 15, 2024
f8420f5
feat: restore case if server exits early
clay-lake Nov 15, 2024
8538c23
fix: make all tests run in rootfs dir
clay-lake Nov 15, 2024
2e35356
fix: linting error
clay-lake Nov 15, 2024
73dc281
fix: bad path in git task
clay-lake Nov 15, 2024
0ed31a9
fix: git SDF bad content sorting
clay-lake Nov 15, 2024
9e746b2
refactor: remove unused symlinks
clay-lake Nov 15, 2024
a470e55
feat: integration test for python3-pyftpdlib
lengau Nov 15, 2024
6290be3
refactor(slices/git.yaml): remove excess content
clay-lake Nov 18, 2024
9484438
fix(tests/spread/integration/python3-pyftpdlib/task.yaml): fix path t…
clay-lake Nov 18, 2024
6dbecb3
refactor(git.yaml): removed unused library
clay-lake Nov 21, 2024
09e2324
fix(git.yaml, git/task.yaml): apply slice name suggestion
clay-lake Nov 21, 2024
972f3f4
Merge branch 'ubuntu-24.04' into create-git-slice
clay-lake Nov 25, 2024
107b89e
refactor: migrate git to use python3 slices
clay-lake Nov 25, 2024
f7cecff
refactor: changes from pair programming with Rafid
clay-lake Nov 25, 2024
792cb6f
Update slices/git.yaml with comment on git symlink
clay-lake Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions slices/git.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package: git

essential:
- git_copyright

slices:
bins:
clay-lake marked this conversation as resolved.
Show resolved Hide resolved
clay-lake marked this conversation as resolved.
Show resolved Hide resolved
# basic functionality including:
# - init
# - config
# - add
# - commit
# - status
# - log
# - checkout
# - blame
# - diff
# - merge
essential:
- libc6_libs
- libpcre2-8-0_libs
- zlib1g_libs
contents:
/usr/bin/git:

http-clone:
clay-lake marked this conversation as resolved.
Show resolved Hide resolved
# requirements for cloning over http`git clone https://`:
essential:
- git_bins
- libcurl3t64-gnutls_libs
- libexpat1_libs
- libpcre2-8-0_libs
clay-lake marked this conversation as resolved.
Show resolved Hide resolved
contents:
/usr/lib/git-core/git-remote-http:
clay-lake marked this conversation as resolved.
Show resolved Hide resolved
/usr/lib/git-core/git-remote-https: # link pointing to git-remote-http

copyright:
contents:
/usr/share/doc/git/copyright:
27 changes: 27 additions & 0 deletions slices/libcurl3t64-gnutls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package: libcurl3t64-gnutls

essential:
- libcurl3t64-gnutls_copyright

slices:
libs:
essential:
- libbrotli1_libs
- libc6_libs
- libgnutls30t64_libs
- libgssapi-krb5-2_libs
- libidn2-0_libs
- libldap2_libs
- libnettle8t64_libs
- libnghttp2-14_libs
- libpsl5t64_libs
- librtmp1_libs
- libssh-4_libs
- libzstd1_libs
- zlib1g_libs
contents:
/usr/lib/*-linux-*/libcurl-gnutls.so.*:

copyright:
contents:
/usr/share/doc/libcurl3t64-gnutls/copyright:
72 changes: 72 additions & 0 deletions tests/spread/integration/git/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
summary: Integration tests for git

execute: |
clay-lake marked this conversation as resolved.
Show resolved Hide resolved

function setup(){

mkdir -p "$1/dev/"
mkdir -p "$1/etc/"

# fake essentials
touch "$1/dev/null"
head -c 500 /dev/urandom > "$1/dev/urandom"
cp /etc/resolv.conf $1/etc/

# link busybox
pushd "$1/usr/bin/"
for TARGET in ash mkdir
do
ln -sf busybox $TARGET
done
popd

}

rootfs_bins=$(install-slices git_bins busybox_bins)
setup "$rootfs_bins"

chroot "$rootfs_bins" ash << EOF
set -ex

mkdir repo
cd repo

git init

git config user.email "[email protected]"
git config user.name "Your Name"
git config core.pager cat

echo hello_world > test_file
git add test_file
git commit -m "hello hello_world"

git status
git log

git blame -L 1,1 test_file

git checkout -b test

echo foo_bar >> test_file
git add test_file
git commit -m "hello foo_bar"

git diff master

git branch
git checkout master
git merge test
EOF


# Testing for http-clone
rootfs_core=$(install-slices git_http-clone busybox_bins ca-certificates_data)
setup "$rootfs_core"

chroot "$rootfs_core" ash << EOF
set -ex

git clone https://github.com/cmatsuoka/figlet.git "$rootfs_bins/figlet"

EOF
Loading