summaryrefslogtreecommitdiffstats
path: root/dev/opkbootstrap.mdwn
blob: cf52faf79fe65f05e3ad35f841bc774bbee847ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[[!meta title="opkbootstrap"]]
[[!template id="releasegoal" rs="1"]]

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|dev/archive/layout]] 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|dev/capstone-2012f]].*


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][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][opkbootstrap-git] 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][debootstrap]
([repository][debootstrap-git]) of Debian and Debian-derived distributions.

debootstrap is therefore a good reference for functionality and logic.

ipkg
----

[ipkg][ipkg-wp] ([old Handhelds.org page][ipkg-hho]), "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][ipkg-openwrt] and
[NSLU2's][ipkg-nslu2].

ipkg may be a decent reference for package unpacking and configuration.


[posix.1-2008]: http://pubs.opengroup.org/onlinepubs/9699919799/
[opkbootstrap-git]: http://git.os.libiquity.com/opkbootstrap/opkbootstrap.git/
[debootstrap]: https://wiki.debian.org/Debootstrap
[debootstrap-git]: http://anonscm.debian.org/gitweb/?p=d-i/debootstrap.git
[ipkg-wp]: https://en.wikipedia.org/wiki/Ipkg
[ipkg-hho]: http://web.archive.org/web/20100823030002/http://www.handhelds.org/moin/moin.cgi/Ipkg
[ipkg-openwrt]: https://dev.openwrt.org/browser/trunk/root/bin/ipkg?rev=113
[ipkg-nslu2]: http://svn.nslu2-linux.org/svnroot/optware/trunk/sources/optware-bootstrap/ipkg.sh