Carbs Linux

October 2021 News Post

posted on Oct 25, 2021

After a long absence during the summer and working my way through moving to Berlin, I think it's the appropriate time to write a new blog post about the changes that arrived to the distribution. I have started writing this post in August, and now it's finished! Only a few months late. Since I have been holding this post for so long, there are quite a numerous details to be discussed.

Repository meta file

You might have noticed that most packages now contain a file named meta. This file contains a small description, license for the package, and the maintainer information of the package. A sample meta file looks like the following:

description: Carbs Packaging Tools
license:     MIT
maintainer:  Cem Keylan <cem@carbslinux.org>

Inclusion of this file makes it easier to query package information, as it is now implemented inside the cpt-search utility. Running cpt-search -q puts the utility in query mode, and makes use of the package descriptions when searching for packages. Unlike the default operation mode, using the -q flag makes the tool output in a pretty format, which is not meant to be parsed by other tools. The format is similar to the output of apt search. Below is an example of running cpt-search -q carbs:

baselayout@/home/cem/repos/main/core/baselayout 3-1
  Carbs Linux base directories / scripts / configuration

carbs-docs@/home/cem/repos/main/core/carbs-docs 20201226-1
  Carbs Linux documentation

carbs-init@/home/cem/repos/main/core/carbs-init 1.2.2-3
  Carbs Linux init scripts

cl-utils@/home/cem/repos/main/core/cl-utils 1.0.1-1
  Carbs Linux repository utilities

cpt@/home/cem/repos/main/core/cpt 6.2.0-1
  Carbs Packaging Tools

The package manager library provides the pkg_query_meta() function to easily parse the meta file, which is further explained in the package manager documentation. Also see cpt-search(1) for more information on the flags and their behaviours.

Blake3 checksums

The package manager now uses BLAKE3 to generate checksums, however this change is backwards compatible, and does not break any old packages that are lying about. If for some reason you need a package to have old SHA256 checksums, you can generate the checksums using cpt-checksum -s, which is what I'm using the generate the checksums for the cpt package itself.

Message of the Day files

With the release of the version 6.1.0 of CPT, I have added a MOTD file for displaying updates and important information from the repository. This file is a simple plaintext file that should be present on the root of the repository, and it is printed to the standard output during the cpt-update command.

Adding the core repository to the tarball

I am thinking of adding a copy of the core repository to the release tarballs. By adding it, it will be a good incentive to remove the git package from the tarball, and let the user choose which repository backend they want to install (git/fossil/rsync) instead of enforcing git.

Packaging Linux Kernel headers

The kernel header files are now packaged from a separate source tarball that only contains the kernel headers so that the downloads are much smaller. For comparison, the kernel tarball is sized ~110 Megabytes, while our header tarball is 1.6 Megabytes. The sources for the headers can be found on https://fossil.carbslinux.org/linux-headers.

You can also fork the package and install LTS headers that are also provided by this repository, if they better fit your needs.

Website Update

No blog post is complete without me butchering this website, trying to shove it into a different static site generation software, breaking lots of links in the process, and write it up here as if it were some sort of achievement or something. I've switched to Hugo this time, because it's obviously better(TM) than using org-publish. Well, let's see how long my position on that will last.

I have created symlinks for the time being, but you will need to update your RSS feeds for the blog and the news:

I will also no longer be serving plaintext pages, with the exception of the installation guide. The documentation is available offline through cpt and carbs-docs packages (in both multiple formats), and the website is clean enough to be easily navigated through a terminal browser.