This is an old revision of the document!
mtree parsing and manipulation library
- Student: Michal Ratajsky (michal@FreeBSD.org)
- Mentor: Brooks Davis (brooks@FreeBSD.org)
Project description
FreeBSD currently includes several tools that work with file system hierarchy descriptions and each contains its own routines to parse and/or manipulate these descriptions.
This project attempts to improve this by designing a library to include all the common code, removing duplications from application code and allowing simple future extensions.
Approach to solving the problem
Develop a new libmtree library
The library will provide an API for specfile-related operations that are currently present in the mtree tool and other tools as well as additional manipulations (filter, merge, update and possibly others) that could be useful to applications in the future or allow expansion of the mtree tool.
The API will be designed to be intuitive, well documented and easily useable by applications.
Some code will be reused from existing applications, mainly from the mtree tool. All reused code will be verified and eventually adapted or rewritten to fit the required abstraction.
The library will include complete API documentation and unit tests.
Modify existing applications and libraries to use libmtree
Applications and libraries that contain mtree code will be modified to use libmtree instead:
- mtree
- makefs
- xinstall
The mtree tool itself will be distributed in the same source tree as libmtree. Both libmtree and mtree will be implemented portably.
Milestones
- May 25: Start of coding
- June 26: Fully functional libmtree and mtree with support for reading, writing, comparison of spec files
- June 26-July 3: Mid-term Evaluations
- July 5: Fully functional mtree with support for all current features and command-line options
- July 26: All applications and libraries ported to libmtree
- August 9: Complete and fully documented libmtree and mtree
- August 17: FreeBSD source tree updated to include libmtree and the new mtree implementation
- August 17: End of coding (soft)
- August 21 19:00 UTC: End of coding (hard)
Timeline
| Week 1 (May 25 - 31) | Status |
| Create project skeleton with autotools support | DONE |
| libmtree: Initial API design | DONE |
| libmtree: Start implementing support functions | DONE |
| Week 2 - 5 (June 1 - 26) | |
| libmtree: Implement reading of mtree specs | DONE |
| libmtree: Implement creation of mtree specs from directory structure | DONE |
| libmtree: Implement writing of mtree specs | DONE |
| libmtree: Implement comparison of/against mtree specs | DONE |
| Provide initial mtree implementation of the current libmtree features | DONE |
| Week 6 - 7 (June 29 - July 12) | |
| libmtree: Implement spec filtering | DONE |
| Implement remaining pieces of mtree | DONE |
| Week 8 - 9 (July 13 - July 26) | |
| libmtree: Implement additional API parts required by applications | DONE |
| Port libarchive to libmtree | DONE |
| Port makefs to libmtree | DONE |
| Port xinstall to libmtree | DONE |
| Week 10 - 11 (July 27 - August 9) | |
| libmtree: Implement spec merging | DONE |
| libmtree: Implement remaining tests | DONE |
| Write libmtree and mtree manual pages | DONE |
| Week 12 (August 10 - August 17) | |
| Update the FreeBSD source tree to include libmtree and remove redundant code | NOT DONE :( |