Bonding period 1 – Modernization of Portage
I am Berin Aniesh, one of the four contributors for Gentoo through GSOC 2023. You can read more about us here. In this post, I want to talk about the project I am working on and the first two weeks of the community bonding period
Title and Project Scope
The title of the project is “Modernization of portage codebase by refactoring and rewriting performance critical parts as C++ extensions”.
Portage is probably the most versatile package manager on the planet and this has been its boon and bane at the same time This versatility combined with portage’s feature richness has made it possible for not only gentoo users, but projects like chromium OS, Flatcar container linux, a numerous downstream projects and many more. In linux, it can support any underlying stack (eg. glibc vs musl, hardened systems, systemd vs openrc, etc). Other than linux, it can also run on BSD and MacOS. It supports compile time feature selection through
USE flags. Taking all these factors into account, together with the fact that portage supports numerous architectures, seeing portage perform its duties as it was designed to is a huge feat of engineering. And above all, everything of portage is written by passionate volunteers. If anything, understanding the landscape of gentoo has brought me huge respect towards the gentoo developers and the community.
My time in the community bonding period was spent, well, bonding with the community, understanding the spread of gentoo and studying the codebase.
Gentoo community is one of the most knowledgeable and welcoming of the linux communities. Gentoo is different from other linux distros in the fact that it urges the community to contribute. This combined with the patience needed to run gentoo as a daily driver has brought together a community, that is mature, knowledgeable and composed. I learnt so many things, trivial and non trivial just by hanging around in #gentoo-chat of libera.chat. If anyone reading this has not participated in #gentoo-chat, I really insist that you to have a look around in your free time.
Setting up an IRC Bouncer
Though mailing lists exist, the main mode of communication for most things gentoo is through IRC. There is just one small problem. IRC doesn’t work like other modern chat applications, there is no centralized server to save our messages. Someone can’t drop us a message and expect it to get delivered all the time. The recipient has to be online at the time of sending to receive the message. This is not feasible and so we have to setup something called an IRC bouncer, which stays online 24/7, gets messages on our behalf, stores it and and relays the message to us when we are online. We have two options, find a managed bouncer service or self host one and you guessed it, I of course went with the self hosting method.
Setting up the bouncer was not so easy as it is a combination of many technologies which work together. There are so many options to choose from and each choice only documents its very specific job. I had to learn about the overview of IRC servers and clients, their interworking, websockets, SSL, nginx and many more. At the end, with a lot of help from #gentoo-chat and my friend catcream, I did manage to setup a bouncer on linode with
soju from emersion and his IRC client,
Though the process is painful, I think it was worth the effort. Chatting using the bouncer I setup is indeed very satisfying.
Getting familiar with the codebase
Portage is a huge codebase with a lot of intertwined functions and getting familiar with nearly twenty years of work is no easy task. The mentors understood this and helped in every way possible. Other than reading the codebase, my mentor Mr. Sam James suggested that I try fixing a few bugs so that I get familiar with the codebase. I’ll be searching the bugzilla for simpler bugs, which are easy to fix and fixing them. That would be the plan for the next two weeks.
So, in the first two weeks of the community bonding period,
- I got familiar with the community and made a lot of friends
- I am getting to know about the places where portage is used
- I am getting familiar with the portage codebase.
That marks the end of two weeks into GSOC. I have been thoroughly enjoying my time at gentoo. I am thankful for the opportunity and I hope to make some meaningful contribution to gentoo in the upcoming weeks.