Any Thoughts About Collaborating With Alpine Linux?

So recently I've been working with Docker. I have good experience with OpenWRT/LEDE, so I was contemplating trying to use it as a base to build slimmed-down, minimal container images. Then I learned that there is already a favoured solution for this in the docker community: Alpine Linux.

Comparing the two distros, the similarities are clear - both are Linux + Musl + Busybox based. In theory, they could already be binary compatible. Alpine have their own minimal packaging system called apk, which seems quite similar to opk in it's function.

So I just thought I'd throw this out there - has any consideration been given to working together on a shared packaging infrastructure? This could be beneficial to both projects in eliminating duplicated effort and creating a larger package ecosystem.

4 Likes

Did you try to launch alpine linux packages in openwrt x86 vm? Maybe i can get xorg from it

Ideally this two projects should collaborate or at least look on each others and maybe grab some changes. They both have a natural reason to be small and effective.

From what I understood differences are:

  • I think the Alpine is more known by usual developers.
  • Alpine is mostly used for containers but I found "suckless Alpine" as a desktop (like VoidLinux).
  • Alpine works on x86 and arm but doesn't support MIPS. But most of new routers use arm.
  • The OpenWrt procd looks more advanced then OpenRC

It's not that much of Alpine own software packages. The OpenWrt relays on many own tools like jshn, uclient-fetch, uhttpd, ubus, rpcd. Some of these tools should be useful to the Alpine too. Same for Ubuntu I already tried to make a PPA but will continue later.

Alpine repo has many packages that looks maintained better e.g. Postfix has v3.5.8 in OpenWrt but v3.8.1 in Alpine. They definitely have more resources to compile and test new versions. It also has big packages like OpenJDK that probably will never be in the OpenWrt repo.

Some of those compiled packages can be easily installed on the OpenWrt. Maybe even it is possible to just use the apk command to do that to make Alpine instructions working on the OpenWrt. For a better interoperability names of new packages may be same as in the Alpine.
By simply using build by Alpine packages the OpenWrt team can minimize burden and costs and focus more on drivers or Luci.

1 Like

You do realize that OpenWrt still has to go /much/ further in terms of getting stuff small at (almost) all costs? Even devices with generous amounts of flash (256 MB NAND or even 4 GB eMMC) rarely offer more than 20 MB to roughly 100 MB usable space (yes, even on 4 GB eMMC devices; usually with even harder size limits on the kernel size). There is a quite massive difference if you need to fit your whole distribution into <10 MB, rather than having at least ~200-270 MB (+addon packages) at your disposal.

On top of that we're sadly still seeing extreme device specifics basically everywhere (except for x86_64, and if you push your luck very far, maybe the SBC like platforms like RPi, sunxi or rockchip, which 'could' run a device specific u-boot, chainload a stripped down UEFI emulation (tianocore), chainload grub2-efi and a multi-platform kernel (~armsr) from there (e.g. like vanilla Debian can use u-boot+UEFI+grub to boot on the RPi4), as there still is basically zero standardization to be found on the primary targets for OpenWrt.

1 Like

Thank you for the explanation.
@Catmengi basically the Alpine APK package is just tar.gz file and you can extract it into root /.
I tried and installed successfully the OpenJDK 8 from Alpine into TurrisOS (OpenWrt for Turris Omnia) https://gist.github.com/stokito/7dd425da5a12abce8b39dda1bd1106d7
I had a bug with incorrect musl version but new OpenWrt versions shouldn't have that problem.