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
(5-10 milestones, with dates, indicating when you hope or expect to be able to complete features. This section is mandatory. Please negotiate these with your mentor to make sure you're not under- or over-estimating the amount of work to be done. Please also make sure the following four dates are included within your 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 | IN PROGRESS |
| libmtree: Start implementing support functions | IN PROGRESS |
| Week 2 - 4 (June 1 - 21) | |
| libmtree: Implement reading of mtree specs | NOT STARTED |
| libmtree: Implement creation of mtree specs from directory structure | NOT STARTED |
| libmtree: Implement writing of mtree specs | NOT STARTED |
| libmtree: Implement comparison of/against mtree specs | NOT STARTED |
| Provide initial mtree implementation of the current libmtree features | NOT STARTED |
| Week 5 (June 22 - 28) | |
| libmtree: Implement additional API parts required by applications | NOT STARTED |
| libmtree: Implement remaining tests | NOT STARTED |
| Week 6 (June 29 - July 5) | |
| Implement remaining pieces of mtree | NOT STARTED |
| Week 7 - 9 (July 6 - July 26) | |
| Port libarchive to libmtree | NOT STARTED |
| Port makefs to libmtree | NOT STARTED |
| Port xinstall to libmtree | NOT STARTED |
| Week 10 - 11 (July 27 - August 9) | |
| Implement more libmtree/mtree features (merge, filter, …) | NOT STARTED |
| Write libmtree and mtree manual pages | NOT STARTED |
| Week 12 (August 10 - August 17) | |
| Update the FreeBSD source tree to include libmtree and remove redundant code | NOT STARTED |