### Objectives
1. To be able to sync git (`git clone`, `git pull`, `git push`) repositories through different doms (VMs), so that users can have an infra-tools vault VM with git bares to serve as remote.
2. Having SaltStack states that create infra-tools vault and easily set's up desired git bares. It would be good to do it having a VM to interact with online git communities (codeberg, gitlab, github, etc..) and having infra-tools vault clone from there.
3. Integrate infra-tools to Qubes main development branch.
### Status
At this point, all we have:
To sync a git repo from dom0 to vm:
| # Sync git repositories with dom0
This solution is intended have git repos easily in sync with dom0.
The initial motivation is to reduce the toil on the development of SaltStack/Jinja states for Qubes.
The solution consists of a bash file (`dom0-syncer.sh` - a lib) with a function. It should be added somewhere in the project.
On project root path, the user should create one (or two) bash script "sourcing the lib" (bash's "importing") and calling the function (as described in Suggested Usage).
### Under the hood
To sync a git repo **from** dom0 to vm:
|
git bundle create $DOM0DIRPATH/$FILENAME --all
sudo qvm-move-to-vm $VM_NAME $DOM0DIRPATH/$FILENAME
| # dom0:
git bundle create $DOM0DIRPATH/$FILENAME --all
sudo qvm-move-to-vm $VM_NAME $DOM0DIRPATH/$FILENAME
|
To sync a git repo to dom0:
| To sync a git repo **to** dom0:
|
sudo qvm-run --pass $VM_NAME 'cd ${VMPATH} && git bundle create - --all ' > $DOM0DIRPATH/$FILENAME
| # dom0:
sudo qvm-run --pass $VM_NAME 'cd ${VMPATH} && git bundle create - --all ' > $DOM0DIRPATH/$FILENAME
|
### Working Repo, please contribute
| ### Context (History)
We are in Qubes 4.1.2. It's 2023-12. First contribution by Bruno Schroeder.
Similar effort by @solene:
- (https://dataswamp.org/~solene/2023-06-17-qubes-os-git-bundle.html)
### Source Code
It's GPL v3+, be my guest at codeberg:
|