Foxtoo: Gentoo + musl C library on 100MHz Pentium laptop

The beginnings of Adélie Linux.

I haven’t yet finished up writing all the content I want to write about the process needed to get this working, but I do have a little teaser picture to share:

That is a Compaq LTE 5150 with a 100MHz Pentium CPU and 40 MB EDO RAM running Gentoo Linux! The kernel version is 4.2-rc1 (because I’m an incorrigible ricer), it was all built with GCC 4.9.3 and it is using the venerable musl C library instead of glibc. Boot up takes only about 15 seconds off the 5400 RPM laptop IDE disk, and once booted, the minimal kernel I have + bash use only about 3 MB of the 40 MB total.

It may not seem like a very useful thing to have done, but I had a lot of fun building it up, and I’ve ended up finding and closing various bugs in everything from procps to the kernel itself. So I feel that not only has this been a fun personal project across two weekends, but it has been productive for the entire community 🙂

Python 2 -> 3 upgrade: status update

More Python projects ported to Python 3.

This is a small update on my bringing packages in Gentoo to Python 3.

I haven’t had time to contribute as much to this effort as I had hoped, but I have successfully finished with two packages and the patches are now in the hands of upstream maintainers. I’ve been toying with the musl C library as an alternative to glibc (and I’ll be posting about my experiences with that later), which has distracted me a bit from Python 3 work.

app-misc/ca-certificates
Required a bit of effort. Debian #789753 filed. Maintainer seems happy enough with it, but it’s not in master yet.
dev-libs/evdev
This was simple enough; libevdev has had upstream support for Python 3 since 2013. Gentoo #553110 filed with a patch to update the ebuild accordingly. No response as of post time.

Musings: SSH key types, PayPal API documentation, and more

I have a few random musings to arf about today.

Sleep is miserable. I don’t know why I even bother pretending to have a schedule to myself. Between work demands, personal issues, and the fact that I tend to favour going to sleep around the 05:00 hour naturally, it’s impossible. Sure, I can hold a “normal person” schedule indefinitely… if I have no external factors. But my life is full of external factors that make it impossible. And there are some people in my life that try and make me feel guilty for not being able to hold a schedule. It feels miserable.

In other news, PayPal’s API documentation for their SetExpressCheckout call lies. They say the xsi:type for the SolutionType is “ebl:SolutionTypeType”, but I found out the hard way that passing that as the type causes a SOAP Fault (and leaks the API password and signature out in the error message)! The only way I can find to do it properly is to set xmlns=”urn:ebay:apis:eBLBaseComponents” on the SolutionType node and then set xsi:type=”SolutionTypeType” (no ebl: namespace). Then the API accepts it fine. Who knows why their systems do what they do.

I investigated making a new SSH key that would be stronger than my current one. Unfortunately, it doesn’t seem I really have a choice in the matter. The only common denominator is RSA, as shown in this matrix:

Key Type Mac OS X NetBSD Debian
RSA Yes Yes Yes
DSA Yes Yes Yes
ed25519 No No No
ECDSA No Yes Yes
SSH Version / OS Version 5.6 / 10.8.5 5.9 / 6.1.5/i386. 6.0 / 8.0 “Jessie”.

Note that the following systems supported all listed key types:

  • Gentoo 20150623
  • FreeBSD 10.1
  • OpenBSD 5.6
  • Alpine Linux 3.2
  • Windows 2000

Truly a sad day when a 16 year old Windows OS has more SSH key types available (via mingw) than Mac OS X, NetBSD, and Debian combined. Looks like I’m sticking with RSA keys for the foreseeable future.

Removing Python 2.7 from Gentoo, one port at a time.

Trying to find all the packages I could try to port to be compatible with Python 3.

I’m highly motivated, as a Pythonista who loves Python 3 and all of the new features, syntax, and improvements, to help the rest of the community upgrade to Python 3 and enjoy all of its benefits.

To that end, I would like to end the dependence of Python 2 in the general community. Since I feel I am a fairly average power user of Gentoo, I figured I would start with the packages on my own system, and this is what I found:

  dev-lang/python-2.7.10 pulled in by:
    app-emulation/qemu-2.3.0-r2
    app-emulation/virtualbox-4.3.28
    app-misc/ca-certificates-20141019.3.19
    app-text/gnome-doc-utils-0.20.10-r1
    dev-lang/spidermonkey-1.8.5-r4
    dev-lang/spidermonkey-17.0.0-r3
    dev-lang/spidermonkey-24.2.0-r2
    dev-lang/yasm-1.3.0
    dev-libs/glib-2.44.1
    dev-libs/gobject-introspection-1.44.0
    dev-libs/libevdev-1.4
    dev-libs/libgamin-0.1.10-r5
    dev-libs/libnatspec-0.2.6-r1
    dev-libs/libxslt-1.1.28-r4
    dev-libs/protobuf-2.6.1-r3
    dev-libs/zziplib-0.13.62
    dev-python/google-apputils-0.4.0
    dev-python/ipaddress-1.0.7
    dev-python/librsvg-python-2.32.0-r1
    dev-python/m2crypto-0.22.3-r3
    dev-python/ndg-httpsclient-0.3.2
    dev-python/pygobject-2.28.6-r55
    dev-python/pygoocanvas-0.14.1-r1
    dev-python/python-gflags-2.0
    dev-python/twisted-core-15.2.1
    dev-python/wxpython-3.0.2.0
    dev-util/boost-build-1.56.0
    dev-util/scons-2.3.4
    dev-vcs/git-2.4.3
    dev-vcs/mercurial-3.4.1
    games-emulation/m64py-0.2.1-r1
    gnome-base/gconf-3.2.6-r3
    gnome-base/libglade-2.6.4-r2
    kde-apps/kajongg-4.14.3
    kde-base/krosspython-4.14.3
    kde-base/plasma-workspace-4.11.20
    media-gfx/gimp-2.8.14
    media-libs/alsa-lib-1.0.29
    media-libs/avidemux-plugins-2.6.8
    media-libs/libcaca-0.99_beta19
    media-libs/libgpod-0.8.3
    media-video/openshot-1.4.3
    net-analyzer/nmap-6.49_beta1
    net-dns/avahi-0.6.31-r7
    net-libs/farstream-0.1.2-r2
    net-libs/gupnp-0.20.14
    net-libs/libproxy-0.4.11-r2
    net-print/cups-2.0.2-r2
    net-wireless/crda-3.18
    sys-apps/usbutils-008-r1
    sys-devel/llvm-3.5.2
    sys-process/audit-2.4.1-r1
    sys-process/htop-1.0.3
    www-client/firefox-38.0.1
    x11-libs/xpyb-1.3.1-r3
    x11-plugins/purple-plugin_pack-2.7.0-r1

Not terrible for a world that has 1,277 packages. Now, we can wipe some of those off:

dev-lang/spidermonkey, www-client/firefox
The Mozilla build system…
dev-libs/protobuf, dev-python/google-apputils, dev-python/ipaddress, dev-python/python-gflags-2.0
I can’t make Google care about Python 3. I’m just a lone fox.
dev-python/ndg-httpsclient
This is apparently only pulled in because I have 2.7 compatibility enabled on other packages, and it also appears abandoned upstream.
dev-python/m2crypto
All but deprecated upstream. dev-python/cryptography pretty cleanly replaces it. I simply need to change dependencies to use that instead.
dev-python/twisted-*
The Twisted project is large, and already has a Python 3 objective. No need to worry about that until later, since they have others working on it.
dev-python/wxpython
They, too, are working on an official Python 3 port already. I’ve even used it; though it is ridiculously unstable, there has been a lot of progress made.
dev-util/scons
As of August 2014, they are officially porting to Python 3. Same as Twisted, then.
dev-vcs/mercurial
This is a very large codebase with a lot of issues related to 2->3. Not something one fox can help with either, I’m afraid.
any gnome package
Not really interested in contributing to the ever-dying and unmaintained GTK 2, and definitely not interested in contributing to the abomination of GTK 3.
KDE 4
As KDE 5 nears stability, this will become less and less maintained, so it probably isn’t worth it either.
net-print/cups, sys-devel/llvm
I doubt there is any hope of getting Python 3 code into Apple projects, since they seem to enjoy clinging to 1990-era development tech 😦

After doing some sorting to show the order I’d like to work on these, this leaves us with:

    app-misc/ca-certificates-20141019.3.19
    app-emulation/virtualbox-4.3.28
    dev-libs/libevdev-1.4
    media-libs/libcaca-0.99_beta19
    media-libs/libgpod-0.8.3
    media-libs/alsa-lib-1.0.29
    dev-libs/libxslt-1.1.28-r4
    net-wireless/crda-3.18
    dev-vcs/git-2.4.3
    sys-apps/usbutils-008-r1
    dev-lang/yasm-1.3.0
    x11-plugins/purple-plugin_pack-2.7.0-r1
    sys-process/audit-2.4.1-r1
    net-dns/avahi-0.6.31-r7
    sys-process/htop-1.0.3
    games-emulation/m64py-0.2.1-r1
    net-libs/libproxy-0.4.11-r2
    dev-libs/zziplib-0.13.62
    dev-libs/libnatspec-0.2.6-r1
    app-emulation/qemu-2.3.0-r2
    net-analyzer/nmap-6.49_beta1
    dev-util/boost-build-1.56.0
    media-video/openshot-1.4.3
    media-libs/avidemux-plugins-2.6.8
    x11-libs/xpyb-1.3.1-r3

I would really like to do at least one per week, but there’s no guarantees of course. Wish me luck!