The Future of Opkg in ProteanOS

ProteanOS is switching to opkg-lede.

The rest of this page is kept only for reference and historical purposes.

← Back to Opkg in ProteanOS

Background

ProteanOS uses opkg to manage packages after installation with prokit. opkg has a long history through different umbrella projects and maintainers. After more than three years since the 0.1.8 release, regular releases were resumed in August/September 2013 with the 0.2.x series. Starting in December 2013, development of opkg was moved from Google Code to infrastructure of the Yocto Project, a project of the Linux Foundation that also serves as a home for BitBake, OpenEmbedded, and Poky.

The Growing Lightweight Package Management System

Development has continued in the 0.3.x series. Multiple maintainers and contributors have added various bugfixes, new features, and architectural improvements to make opkg a more modern and maintainable codebase.

For a long time, opkg had an embedded copy of BusyBox's libbb for reading archives (as packages supported by opkg are doubly nested archive files). This copy of libbb had grown stale and heavily patched. Finally, in 2013/2014, libbb was replaced with libarchive. This removed a large amount of old code from opkg, however it added a dependency on a large library that was never designed with consideration for the code size restraints of embedded systems.

And in August 2015, support for external dependency solver libraries was added, so as to remove additional complexity from opkg and leave dependency solving to another project. Unfortunately, this also pulls in another large library, openSUSE's libsolv. As of now, this dependency is still optional, and the original internal solver can still be used. However, the current maintainer has indicated that the internal solver will eventually be deprecated.

The Future of the Past

ProteanOS currently still uses the 0.2.x series. The increasing size of modern opkg (starting with the 0.3.x series) and its dependencies makes it increasingly unsuitable for small system distributions like ProteanOS. We will need to find a solution going forward.

OpenWrt and libreCMC use a 0.1.8+r618 version (SVN revision 618, between 0.1.8 and 0.2.0) with numerous local patches. LEDE switched their opkg package to their own fork, which is based on the same 0.1.8+r618 version that OpenWrt and libreCMC use.

LEDE actively maintains their opkg fork and backports changes from upstream. This may be the best and easiest option for ProteanOS, although there are a couple of minor problems:

  1. It still has libbb, and
  2. It pulls in a new, but small, dependency: LEDE's libubox.

Note also that the original Autoconf/Automake-based build system was removed and replaced with CMake. This should have no effect on the resulting binaries or even the build makefile, since it uses oh-autobuild. However, it will add a build-time dependency on cmake.