Project 2: Build Your Own Package Manager
A functional package manager that can install, remove, track dependencies, and upgrade software packages.
Quick Reference
| Attribute | Value |
|---|---|
| Primary Language | See main guide |
| Alternative Languages | N/A |
| Difficulty | Level 3: Advanced |
| Time Estimate | 2-3 weeks |
| Knowledge Area | Systems Administration / Algorithms |
| Tooling | Package Management |
| Prerequisites | Comfortable with C or Rust, basic data structures |
What You Will Build
A functional package manager that can install, remove, track dependencies, and upgrade software packages.
Why It Matters
This project builds core skills that appear repeatedly in real-world systems and tooling.
Core Challenges
- Designing a package format (tarball + metadata) (maps to packaging)
- Implementing dependency resolution algorithm (maps to graph algorithms)
- Handling file conflicts and ownership tracking (maps to filesystem management)
- Building a repository index and fetching packages (maps to networking/HTTP)
- Implementing atomic install/rollback (maps to transactions)
Key Concepts
- Dependency resolution: “Grokking Algorithms” Chapter 6 (Graphs) - Aditya Bhargava
- Database design for packages: “Designing Data-Intensive Applications” Chapter 2 - Martin Kleppmann
- Filesystem transactions: “Operating Systems: Three Easy Pieces” Chapter 42 - Arpaci-Dusseau
- Archive formats:
man tar,man ar, and studying .deb/.rpm internals
Real-World Outcome
Deliver a working demo with observable output that proves the feature is correct.
Implementation Guide
- Reproduce the simplest happy-path scenario.
- Build the smallest working version of the core feature.
- Add input validation and error handling.
- Add instrumentation/logging to confirm behavior.
- Refactor into clean modules with tests.
Milestones
- Milestone 1: Minimal working program that runs end-to-end.
- Milestone 2: Correct outputs for typical inputs.
- Milestone 3: Robust handling of edge cases.
- Milestone 4: Clean structure and documented usage.
Validation Checklist
- Output matches the real-world outcome example
- Handles invalid inputs safely
- Provides clear errors and exit codes
- Repeatable results across runs
References
- Main guide:
LINUX_DISTRIBUTION_BUILDING_LEARNING_PROJECTS.md - “Designing Data-Intensive Applications” by Martin Kleppmann