5.1 KiB
Contributing to EasyQEMU
Thank you for your interest in contributing to EasyQEMU! This document provides guidelines for contributing to the project.
Code of Conduct
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on constructive feedback
- Respect differing viewpoints and experiences
How to Contribute
Reporting Bugs
If you find a bug, please create an issue with:
- Description: Clear description of the bug
- Steps to Reproduce: Detailed steps to reproduce the issue
- Expected Behavior: What you expected to happen
- Actual Behavior: What actually happened
- Environment:
- OS and version
- QEMU version (
qemu-system-x86_64 --version) - EasyQEMU version (
easyqemu version)
- Logs: Relevant error messages or logs
Suggesting Features
Feature suggestions are welcome! Please create an issue with:
- Use Case: Why is this feature needed?
- Proposed Solution: How should it work?
- Alternatives: What alternatives have you considered?
- Examples: Example commands or usage
Pull Requests
-
Fork the Repository
git clone https://github.com/yourusername/easyqemu.git cd easyqemu -
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make Your Changes
- Follow the coding style (see below)
- Test your changes thoroughly
- Update documentation if needed
-
Test Your Changes
# Test basic functionality ./easyqemu vm create --name test ./easyqemu vm list ./easyqemu vm delete test -f # Test new features # Add specific tests for your changes -
Commit Your Changes
git add . git commit -m "feat: add new feature" # or "fix: resolve bug"Commit message format:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for test additionschore:for maintenance tasks
-
Push and Create PR
git push origin feature/your-feature-nameThen create a Pull Request on GitHub with:
- Clear title and description
- Reference to related issues
- Screenshots/examples if applicable
Coding Style
Bash Style Guide
-
Indentation: 4 spaces (no tabs)
-
Function Names: Use snake_case
vm_create() { # ... } -
Variable Names: Use UPPER_CASE for constants, snake_case for variables
DEFAULT_MEMORY="2048" local vm_id="test" -
Comments: Use comments for complex logic
# Parse command line arguments while [[ $# -gt 0 ]]; do # ... done -
Error Handling: Always check for errors
[[ -z "$vm_id" ]] && fatal "VM ID is required" -
Quoting: Always quote variables
echo "$variable" # Good echo $variable # Bad -
Command Substitution: Use
$(command)instead of backtickslocal result=$(some_command) # Good local result=`some_command` # Bad
Documentation
- Update README.md for new features
- Add examples to EXAMPLES.sh
- Include inline comments for complex code
- Update help text in the main script
Testing
Before submitting:
-
Syntax Check
bash -n easyqemu -
ShellCheck (if available)
shellcheck easyqemu -
Functional Tests
- Test VM operations (create, start, delete)
- Test volume operations
- Test snapshot operations
- Test repository operations
-
Edge Cases
- Missing parameters
- Invalid inputs
- Non-existent VMs/volumes
- Permission issues
Areas for Contribution
High Priority
- Windows VM support (UEFI boot)
- Better error messages
- Progress bars for long operations
- Configuration wizard
- Automated tests
Medium Priority
- Web UI
- Remote VM management
- Cloud-init support
- Network configuration wizard
- Resource monitoring
Low Priority
- Plugin system
- VM templates library
- Backup automation
- Integration with cloud providers
Development Setup
-
Install QEMU
# Debian/Ubuntu sudo apt-get install qemu-system-x86 qemu-utils shellcheck # Fedora/RHEL sudo dnf install qemu-kvm qemu-img ShellCheck -
Clone Repository
git clone https://github.com/yourusername/easyqemu.git cd easyqemu -
Make Executable
chmod +x easyqemu -
Test
./easyqemu help ./easyqemu version
Release Process
For maintainers:
- Update version in script
- Update CHANGELOG.md
- Create git tag
- Create GitHub release
Questions?
- Create an issue for questions
- Check existing issues and documentation
- Be patient and respectful
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to EasyQEMU! 🚀