Chapter 10: The Computer Anybody Can Edit
The goal of Free Software is for all software to be Free as in Freedom -- for you to be free to Use, Study, Change and Share the software.
"Without rebuilding and recompiling all of the packages on a large distribution, it is possible to "remaster" an ISO and get a different system -- even before you install it."Installing a different operating system is sometimes as simple as downloading a file, writing it to a CD, DVD or USB, booting the computer with that and then using it to write the same to the computer itself.
Ideally, changing that download would be as easy to edit as Wikipedia.
Some will argue that it already is that easy, but that isn't entirely true. While I don't believe that you (or by extension, anybody else) are obligated to work with other people on a project, ideally we would facilitate both working on projects as groups or as individuals, at their option.
Besides, just because what I'm talking about is partially implemented, doesn't mean you can just download Debian for example, click "Edit" and have a new bootable ISO.
"You wouldn't want to remaster and install an ISO just to add leafpad to your system, of course."The ISO is not the only way to install GNU/Linux, but it is the way to get it onto a CD or DVD that you can use to do installation. Without rebuilding and recompiling all of the packages on a large distribution, it is possible to "remaster" an ISO and get a different system -- even before you install it.
"To edit Wikipedia, not only do you have to get past a lot of politics to create edits, you need to learn the code -- the wiki syntax in particular."Distros conventionally arrange software into "packages" -- a package is a group of files, and installing software in a modular way typically pulls in a handful of support packages which are needed to make the software work. For example, to install Leafpad in Debian you would just say:
sudo apt-get install leafpad
"If you don't like a change it makes, you can just remove those lines. Editing an operating system is like editing a wiki!"To edit Wikipedia, not only do you have to get past a lot of politics to create edits, you need to learn the code -- the wiki syntax in particular. Wiki syntax was originally created to make it easier to edit the HTML code in Web pages.
Instead of 4 angle brackets, quotes and repeating the name of the closing tag with a /, you can just say [[article name]] to create a link to another page for example. For a single link these are small savings, but for editing an encyclopedia the difference in convenience and readability is substantial.
It would be cool if you could simply open a file, change a few things you wanted to be different in your GNU/Linux distro, and run a command to create a different ISO. Existing remastering tools tend to fall into two categories: serious developer tools that can do nearly anything, and toy remastering utilities that give you a taste of real power, but make it tedious (and manual) to do lots of work.
Distro-libre was my own effort to make toys that can do anything. I started by creating a toy programming language, with fewer than 100 commands. While this language is very simple, it translates automatically to Python code that you can run on almost any GNU/Linux system.
The language can also run shell code, so I had it call code to open an ISO, decompress the filesystem, make changes and zip it back up. Syslinux has a tool called isohybrid that turns your bootable ISO into one you can write to a USB with a single command: dd if=name-of-iso of=/dev/sdx, where sdx is the device you are writing to. Lots of distros offer hybrid ISOs that can be written to USB, but distro-libre runs isohybrid for you.
The goal here was to make the ISO itself optional. An ISO is a large file -- sometimes more than 1 GB (that's a lot for an amateur to host -- Devuan for example, doesn't even archive its older versions). With distro-libre, instead of making a few changes to an ISO and then uploading and hosting a gigabyte or half of one for people to download, you can simply download a text file written in a wiki-like programming language and run THAT instead.
What this accomplishes is that if you are remastering say, Debian 9 -- it can download the Debian 9 ISO, automatically open / decompress / change / compress / write the ISO / hybridise it and spit it out into a new ISO, all automatically.
It is automatic, though you are in complete control of it -- because it is a single file that has one or a few lines for every single change.
"After creating my own ISO based more exclusively on Refracta, I set out to remaster more distros, and used Distro-libre to remove systemd from both Trisquel 8 and Debian 9 -- to show it could be done by an automatic remastering tool."If you don't like a change it makes, you can just remove those lines. Editing an operating system is like editing a wiki!
There are a few things to note about this system -- one is that I never wanted the job of remastering distros. I was hoping Debian would always be true enough to itself and to free software to take care of that for us. I only started remastering after Debian and Devuan failed to be projects I could rely on, and I never thought Debian would become unreliable or corrupt as a project.
I didn't even set out to remaster distros, I was writing a toy/demo program (it's the truth) to analyse the contents of ISO files. Eventually I realised how close it was to a remastering program and I added the features needed to make it one.
My first distro was created with my own programming language -- one of the drawbacks of most (not all) remastering programs is they are specific to the distro family they are created for. Instead of a family-specific remaster tool, I wanted something that could (in theory, and hopefully in practice) remaster any distro. I adapted it to remaster Puppy, Refracta, Debian, Trisquel, Void, Tiny Core and others.
Once I was able to remaster, I set out to mix two distributions into a single ISO -- Puppy Linux and Refracta. I still didn't plan on more than experimenting with mixing ISOs together.
After creating my own ISO based more exclusively on Refracta, I set out to remaster more distros, and used Distro-libre to remove systemd from both Trisquel 8 and Debian 9 -- to show it could be done by an automatic remastering tool.
Although I wasn't sure of this at first, I didn't create the first automatic remaster tool for the purpose of making a new distro from an existing one -- OLPC has created a similar tool to make an OLPC software platform from Ubuntu
To give you an idea of how this works in practice, an author can take some code that is designed to add or remove Leafpad to an existing iso, and put some code around it like this:
function add_leafpad
CODE GOES HERE
next
now add_leafpad now remove_systemd now add_sysvinit now delete_icons # saves space! now remove_langsupport now add_en_gb
p add_leafpad p remove_systemd p add_sysvinit p delete_icons # saves space! p remove_langsupport p add_en_gb
"...Hyperbola happens to be the only one taking several threats seriously that I consider relevant to the demise of Free software."The purpose of this book, I promise -- is NOT to promote HyperbolaBSD. It may do so, because out of hundreds of distros (and a dozen "fully free" ones) Hyperbola happens to be the only one taking several threats seriously that I consider relevant to the demise of Free software. I have some criticisms for Hyperbola as well (nothing is perfect -- I don't even use Hyperbola, though I would be very interested in trying it).
The reason I keep "plugging" Hyperbola and saying nice things about it is very simply credit-where-credit is due. I've never even used their distro -- I downloaded it and had a look at how it is put together, before they switched to BSD I think. I AM interested in libre versions of BSD, for reasons this book will hopefully explain at the right time...
The other thing this book is not deliberately doing, is teasing you about other chapters that I haven't even (as of this writing) written yet. In other words, I'm not going that to try to create suspense or interest. If it achieves that effect, great! But its honestly not intentional. Rather, I can only introduce so many things at the same time, and I'm trying to lay a foundation as much as possible.
After writing the first 9 chapters of this book, I went through nearly 100 freely-licensed articles I've written to decide which topic was best to cover next.
This particular chapter is inspired by part 7 of the book this is intended to bring up to date-
Guarding and Rescuing the FSF Titanic: Distro-libre and feature-schema
That book (along with another book I wrote, in better detail) predicted the ousting of rms from the FSF, and was written based on the idea that we could save the FSF from itself -- like a fleet of lifeboats running alongside the Titanic, which didn't bother including a sufficient number of them.
Since that was written, I no longer think the FSF can be saved -- but I do think Free Software is still important. Many of the problems ahead are what to do about the Linux kernel and Microsoft GitHub. I still think distro-libre is a good idea, but sadly there are problems now that are so foundational that remixing all distros into fully free ones brings up some related issues that have to be addressed. ⬆
Licence: Creative Commons CC0 1.0 (public domain)