summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pehjota>2012-07-05 13:08:38 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-07-05 13:08:38 (EDT)
commit5469bc998c25584d57304c45327c2a6bdcf6b949 (patch)
treeb166571d2b1e8520eb3e2598db35c97378832b25
parent8879fea9ec7916bf1b6c170681b294377ef865c1 (diff)
Add "Removing libbb from opkg" to wiki.
-rw-r--r--dev/todo/removing-libbb-from-opkg.mdwn49
1 files changed, 49 insertions, 0 deletions
diff --git a/dev/todo/removing-libbb-from-opkg.mdwn b/dev/todo/removing-libbb-from-opkg.mdwn
new file mode 100644
index 0000000..2417261
--- /dev/null
+++ b/dev/todo/removing-libbb-from-opkg.mdwn
@@ -0,0 +1,49 @@
+[[!meta title="Removing libbb from opkg"]]
+
+opkg includes and is statically linked with [a copy of libbb][opkg-libbb],
+BusyBox's helper library. Of course, BusyBox is also linked against its own
+copy of libbb. This is a bad idea in general, since duplicated code makes
+maintenance more difficult and is often subject to bit rot (resulting in
+long-standing bugs and security problems). It's an even larger problem (no pun
+intended) in embedded systems, where saving space is important.
+
+The Good News
+-------------
+
+libbb can be built as a shared library by setting the `CONFIG_BUILD_LIBBUSYBOX`
+option to `y` in BusyBox's configuration. So, we can make `libbusybox.N` and
+`libbusybox.N-dev` binary packages that provide this shared library and its
+header files, modify opkg to dynamically link against this library (instead of
+statically linking against its own copy), and add dependency information to the
+`opkg` source package and its binary packages.
+
+The Bad News
+------------
+
+The copy of libbb in opkg hasn't been updated from its upstream source since at
+least 2008, when opkg development began from the old ipkg sources. Three months
+later, [an attempt][opkg-devel-libbb] was made by Koen Kooi to update the copy
+of libbb, but it was determined that BusyBox had changed significantly since the
+code was added to ipkg. Things have most likely gotten much worse in the more
+than three years since then.
+
+To make matters slightly worse, many of the libbb files have been patched in
+opkg. Any files in [/trunk/libbb][opkg-libbb] newer than revision 3 have opkg
+modifications.
+
+The Plan
+--------
+
+ * Build a shared libbusybox library and set of binary packages.
+ * Port opkg to work with more recent versions of BusyBox's shared library.
+ * Modify opkg to dynamically link against libbusybox.
+ * Add `Build-Depends` and `Depends` fields to the `opkg` source package.
+ * Investigate API and ABI stability of libbusybox. This may require
+ coordination with BusyBox developers.
+ * Look at each patch in opkg against libbb. If it's still useful in newer
+ versions, then refresh it, apply it to the `busybox` source package, and
+ forward it upstream to BusyBox.
+
+
+[opkg-libbb]: https://code.google.com/p/opkg/source/browse/trunk/libbb
+[opkg-devel-libbb]: https://groups.google.com/group/opkg-devel/browse_thread/thread/fe5c620bc339ba63