Skip to content

Repository files navigation

RPM Package Synchronization Tools

This repository contains tools for synchronizing RPM packages between two Linux systems (VMs or physical machines) running either DNF or rpm-ostree package managers.

Quick Start

  1. Configure your environment:

    cp config.env.example config.env
    # Edit config.env with your VM/host details
  2. Set up your VMs:

    ./simple_setup.sh
  3. Set up SSH keys (optional but recommended):

    ./setup_ssh_keys.sh
  4. Run a test:

    ./simple_test.sh

Configuration

Before using any scripts, copy config.env.example to config.env and update the values:

Core Configuration

  • VM1_IP and VM2_IP: IP addresses of your VMs/hosts
  • VM_USER: Username for SSH connections
  • SSH_OPTS: SSH options (usually don't need to change)

Advanced Configuration

  • 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

Tools Included

Python Scripts

  • RPM_sync.py: Full-featured sync using Unison for bidirectional synchronization
  • RPM_sync_simple.py: Simplified version using SSH without Unison dependency
  • RPM_sync_host_relay.py: Host-relay version for isolated VM environments

Shell Scripts

  • simple_setup.sh: Basic VM setup with required packages
  • setup_ssh_keys.sh: Configure passwordless SSH authentication
  • simple_test.sh: Run a basic synchronization test
  • debug_simple_sync.sh: Debug connectivity and sync issues

Usage Examples

Direct sync between VMs:

# On VM1, sync with VM2
python3 RPM_sync_simple.py -r [VM2_IP_OR_HOSTNAME]

Using Unison (requires setup):

# On VM1, sync with VM2 using Unison
python3 RPM_sync.py -r [VM2_IP_OR_HOSTNAME]

Requirements

  • Python 3.x
  • SSH access between systems
  • DNF or rpm-ostree package manager
  • Optional: Unison (for bidirectional sync)

Security Notes

  • 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

Troubleshooting

Run the debug script to check connectivity and dependencies:

./debug_simple_sync.sh

See TESTING_GUIDE.md for detailed testing instructions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages