This page describes a goal for release 1.0.
opkbootstrap has been replaced by prokit.
The rest of this page is kept only for reference and historical purposes.
opkbootstrap is a tool to bootstrap the installation of a basic root filesystem in a specified target directory. It will read package indices from a package archive to determine which packages must be installed, download the packages, unpack them into a target directory, and configure them for use.
It needs to handle multiple package indices, since packages will need to be found for at least four architecture and platform permutations:
- Host architecture and host platform,
- "all" architecture and host platform,
- Host architecture and "all" platform, and
- "all" architecture and "all" platform.
opkbootstrap is part of a project in the fall 2012 NJIT CCS Capstone.
Use Cases
opkbootstrap will have two main types of uses. The first is installation of operating systems for use on hardware devices. opkbootstrap can be pointed to a package archive on a network or on local media (e.g. an installation CD).
The other type of use is installation of development systems. Distribution developers will be able to use opkbootstrap to set up isolated systems in which they can build their packages. Additionally, opkbootstrap can be used to set up isolated systems managed by build daemon processes to automatically build packages.
Portability Concerns
opkbootstrap should be written to run on any operating system that at least
mostly conforms to POSIX.1-2008 XCU and has tar
(or pax
?)
and chroot
programs.
opkbootstrap needs to perform the tasks of a package manager (resolving dependencies, unpacking packages, etc.) because opkg is not expected to be present on host systems.
Status
Development has begun on opkbootstrap. It currently downloads old ipkg-style source lists, finds essential packages, and unpacks packages. To do are resolving dependencies, downloading packages, setting up an isolated environment ("chroot"), and running maintainer scripts.
References
debootstrap
opkbootstrap will be similar in function to debootstrap (repository) of Debian and Debian-derived distributions.
debootstrap is therefore a good reference for functionality and logic.
ipkg
ipkg (old Handhelds.org page), "the itsy package management system", is the predecessor to opkg. ipkg was originally written by Carl D. Worth in 2001 as a monolithic UNIX shell script, complete with "black magic" and "blacker magic" sed scripts. The old ipkg script can still be found in some old repositories, such as OpenWRT's and NSLU2's.
ipkg may be a decent reference for package unpacking and configuration.