canonical / chisel-releases

36 stars 51 forks source link

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

Closed clay-lake closed 6 days ago

clay-lake commented 4 months ago

Proposed changes

Add slices for git and dependency libcurl3t64-gnutls.

Related issues/PRs

Testing

Rudimentary smoke testing was provided by the script below. The bins slice successfully executes basic git operations, except for cloning a repository over http, which requires the core slice. Cloning over ssh has not yet been tested.

set -e

function echo_status(){
        $@ > /dev/null
        echo  $@ " " $? 
}

cd figlet-local
echo_status git status
echo_status git log
echo_status git config --global user.email "NA"
echo_status git config --global user.name "NA"
echo_status git checkout -b test
echo //new comment > getopt.c
echo_status git commit -a -m test_commit
echo_status git checkout master
echo_status git branch
echo_status git merge test

echo_status cd ~

echo_status mkdir figlet-http
echo_status git clone https://github.com/cmatsuoka/figlet.git figlet-http

echo TESTS PASS

All testing was performed on a chiseled (ubuntu-24.04) container containing the following slices.

base-files_base 
base-files_release-info 
busybox_bins 
git_bins # or git_core
ca-certificates_data

Checklist

github-actions[bot] commented 4 months ago

Diff of dependencies:

slices/git.yaml ```diff @@ -1,8 +1,5 @@ -git-man libc6 libcurl3t64-gnutls -liberror-perl libexpat1 libpcre2-8-0 -perl zlib1g ```

clay-lake commented 2 weeks ago

@cjdcordeiro That is a good point. Let me see what I can do to refactor the tests.

lengau commented 2 weeks ago

@clay-lake I took a swing at the tests in my PR: https://github.com/canonical/chisel-releases/blob/b3a23c67505afa0bd352927aebd669c40f0ed2bb/tests/spread/integration/git/task.yaml

clay-lake commented 2 weeks ago

@lengau Thanks! Looks good. I replaced my test with yours, and added some of the changes I was working on since Cris' review. I also added support for some commands @dariuszd21 requested:

clay-lake commented 2 weeks ago

The python tests are working now. It was a mismatch between python versions.

cjdcordeiro commented 1 week ago

@clay-lake can you pls raise these changes to 24.10 too?

clay-lake commented 6 days ago

Will do! @cjdcordeiro https://github.com/canonical/chisel-releases/pull/396

@lengau Merge is complete :) There are few more changes for you to pull before you merge your PR.