This repository contains tools for synchronizing RPM packages between two Linux systems (VMs or physical machines) running either DNF or rpm-ostree package managers.
-
Configure your environment:
cp config.env.example config.env # Edit config.env with your VM/host details -
Set up your VMs:
./simple_setup.sh
-
Set up SSH keys (optional but recommended):
./setup_ssh_keys.sh
-
Run a test:
./simple_test.sh
Before using any scripts, copy config.env.example to config.env and update the values:
VM1_IPandVM2_IP: IP addresses of your VMs/hostsVM_USER: Username for SSH connectionsSSH_OPTS: SSH options (usually don't need to change)
SSH_TIMEOUT: Connection timeout in seconds (default: 10)TEST_PACKAGE_VM1: Package to install on VM1 for testing (default: git)TEST_PACKAGE_VM2: Packages to install on VM2 for testing (default: wget curl)TEMP_DIR: Temporary directory for remote operations (default: /tmp)SSH_KEY_PATH: SSH key path relative to home directory (default: ~/.ssh/id_rsa)FALLBACK_USERS: Space-separated list of usernames to try during SSH testing
RPM_sync.py: Full-featured sync using Unison for bidirectional synchronizationRPM_sync_simple.py: Simplified version using SSH without Unison dependencyRPM_sync_host_relay.py: Host-relay version for isolated VM environments
simple_setup.sh: Basic VM setup with required packagessetup_ssh_keys.sh: Configure passwordless SSH authenticationsimple_test.sh: Run a basic synchronization testdebug_simple_sync.sh: Debug connectivity and sync issues
# On VM1, sync with VM2
python3 RPM_sync_simple.py -r [VM2_IP_OR_HOSTNAME]# On VM1, sync with VM2 using Unison
python3 RPM_sync.py -r [VM2_IP_OR_HOSTNAME]- Python 3.x
- SSH access between systems
- DNF or rpm-ostree package manager
- Optional: Unison (for bidirectional sync)
- Scripts use SSH for remote connections
- Passwordless SSH setup is recommended for automation
- All package installations require sudo privileges
- Review scripts before running in production environments
Run the debug script to check connectivity and dependencies:
./debug_simple_sync.shSee TESTING_GUIDE.md for detailed testing instructions.