This is an old revision of the document!
Separation of Ports Build Process from Local Installation
- Student: TheronTarigo
- Mentor: BakulShah
This project aims to provide the capability of the FreeBSD ports infrastructure to safely and cleanly build ports and all their dependencies without superuser privileges, jails, or touching the installed system in anyway, in the interest of improving the safety, reliability, and repeatability of ports building without the administrative and resource overhead of a separated build host or jail.
Currently this level of separation can only be accomplished in practice through chroot or Jail. This project will eliminate the need for cooperation of the root user since /usr/local will not need to be touched. To enable this, file accesses will be redirected to a location controlled by the ports build process through use of a userspace library to intercept file accesses.
Timeline
| Week | Task | Progress |
| 05/27 - 05/31 | Study dependency resolution mechanisms in Mk/bsd.port.mk, Mk/Scripts/*, what works, what doesn’t, in context of a temporary install location. | Familiarized with port dependency mechanisms in /usr/ports/Mk/Scripts. Studied /usr/src/lib/libc to understand chain of userspace calls between C API and system call. Implemented proof-of-concept redirection library intercepting open(…). |
| 06/03 - 06/07 | Implement file path redirection library and test against common tools | |
| 06/10 - 06/14 | Modify bsd.port.mk (and related) to utilize install location and redirection lib | |
| 06/17 - 06/21 | Demonstrate successful building of a port with dependencies | |
| 06/24 - 06/28 | Document and present findings | |
| 07/01 - 07/12 | Identify ports using statically linked build tools. Add option for building such tools to include file path redirection support. | |
| 07/15 - 07/26 | Build a larger number of ports. See what breaks and why. | |
| 07/22 - 07/26 | Document findings and present progress | |
| 07/29 - 08/04 | Fix problems which prevent some ports from building. | |
| 08/11 - 08/23 | Thoroughly test process. Document what can’t be fixed and why. | |
| 08/19 - 08/23 | Thoroughly document all added components and present summary of compatibility. |