4.2 KiB
4.2 KiB
rpm-ostree CLI Analysis for apt-ostree Mirroring
Date: December 19, 2024
Goal: Mirror all rpm-ostree CLI commands for identical user experience
Current rpm-ostree Commands
Based on rpm-ostree --help output:
Core Package Management
- ✅
install- Overlay additional packages (apt-ostree:install) - ✅
uninstall- Remove overlayed additional packages (apt-ostree:remove) - ✅
upgrade- Perform a system upgrade (apt-ostree:upgrade) - ✅
search- Search for packages (apt-ostree:search)
Deployment Management
- ✅
status- Get the version of the booted system (apt-ostree:status) - ✅
rollback- Revert to the previously booted tree (apt-ostree:rollback) deploy- Deploy a specific commit (apt-ostree:checkout- needs enhancement)rebase- Switch to a different tree (apt-ostree:checkout- needs enhancement)
Transaction Management
cancel- Cancel an active transactioncleanup- Clear cached/pending datareset- Remove all mutations
System Configuration
apply-live- Apply pending deployment changes to booted deploymentkargs- Query or modify kernel argumentsoverride- Manage base package overridesreload- Reload configuration
Initramfs Management
initramfs- Enable or disable local initramfs regenerationinitramfs-etc- Add files to the initramfs
Repository Management
refresh-md- Generate apt repo metadata (instead of RPM)compose- Commands to compose a tree
Database Operations
db- Commands to query the APT database (instead of RPM)
Advanced Features
usroverlay- Apply a transient overlayfs to /usr
Implementation Priority
High Priority (Core Functionality)
deploy- Essential for deployment managementrebase- Essential for switching between treescancel- Important for transaction safetycleanup- Important for system maintenancereset- Important for system recovery
Medium Priority (System Management)
apply-live- Advanced deployment featurekargs- Kernel argument managementoverride- Package override managementreload- Configuration management
Low Priority (Advanced Features)
initramfs- Initramfs managementinitramfs-etc- Initramfs file managementrefresh-md- Repository metadata generationcompose- Tree compositiondb- Database queryingusroverlay- Transient overlayfs
Key Differences to Consider
Package Search
- rpm-ostree: Has its own package search implementation
- apt-ostree: Currently relies on
apt search - Action: Implement our own package search like rpm-ostree
Database Operations
- rpm-ostree: Uses RPM database
- apt-ostree: Uses APT database
- Action: Implement APT-specific database operations
Repository Metadata
- rpm-ostree: Generates RPM repository metadata
- apt-ostree: Should generate APT repository metadata
- Action: Implement APT-specific metadata generation
Implementation Notes
Command Mapping
uninstall→remove(already implemented)deploy→checkout(needs enhancement)rebase→checkout(needs enhancement)
APT-Specific Adaptations
- Use APT database instead of RPM database
- Use APT repository metadata instead of RPM metadata
- Implement APT-specific package search
- Use APT package format instead of RPM
User Experience
- Maintain identical command syntax and behavior
- Provide same error messages and help text
- Ensure same output format where possible
- Keep same command-line options and flags
Next Steps
- Analyze rpm-ostree source code to understand command implementations
- Prioritize command implementation based on user needs
- Implement high-priority commands first
- Test command compatibility with rpm-ostree
- Update documentation to reflect complete CLI mirroring
References
- rpm-ostree source code: https://github.com/coreos/rpm-ostree
- rpm-ostree documentation: https://coreos.github.io/rpm-ostree/
- rpm-ostree CLI reference:
rpm-ostree --help