My thoughts on Slackware, life and everything

Tag: liveslak (Page 1 of 10)

How I setup cgit for a browsable liveslak repository

I received a request to document how I configured the backend for https://git.liveslak.org/ . This is where my git repository for liveslak is accessible and browseable using cgit as the engine.
Of course the server is also running an actual git repository service which people use to clone the liveslak files and for me to upload changes.
Setting up git is not hard, but it’s beyond the scope of this blog article. Also, setting up Let’s Encrypt to create a secure (https) web site is not in the scope of this article but you can read my Let’s Encrypt article of course.

I’ll explain the steps that are needed to create a cgit webserver in the text below.
First we build and install cgit as well as its dependencies; then we create the cgit configuration and add some customization. Lastly we configure Apache httpd so that it knows what to serve.

Let’s start with building the required packages in order. In case you are running Slackware -current (i.e. newer than 15.0) then the lua package is already included in the core distro, so you can skip compiling it now:

  • lua
  • luacrypto
  • lua-md5
  • highlight
  • cgit

You can find build scripts for all of them on the SlackBuilds.org (SBo) web site.
The lua* and highlight packages are needed for syntax highlighting, and lua is also needed for gravatar support.
The cgit package has customization added by the SBo admins which we are going to use, notably support for displaying the committers’ gravatar images.

Once you have built and installed the above packages, create a new directory to hold our custom cgit stuff:

# mkdir -p /home/www/cgit

Create some symlinks to the files that were installed by the Slackware cgit package:

# ln -s /var/www/cgi-bin/cgit.cgi /home/www/cgit/
# ln -s /var/www/cgi-bin/cgit.js /home/www/cgit/
# ln -s /var/www/cgi-bin/cgit.png /home/www/cgit/

But make a copy, not a symlink, of the CSS file:

# cp -ia /var/www/cgi-bin/cgit.css /home/www/cgit/

Some additional CSS code needs to be added to cgit.css to make the committer avatars hover properly. Here’s the lines to append to the file copy we just made (you will find this same code in the file /usr/doc/cgit-*/email-gravatar-sbo-additions.css which is part of the Slackware cgit package):

div#cgit span.gravatar img.onhover {
    display: none;
    border: 1px solid gray;
    padding: 0px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    width: 128px;
    height: 128px;
}
div#cgit span.gravatar img.inline {
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    width: 13px;
    height: 13px;
    margin-right: 0.2em;
    opacity: 0.8;
}
div#cgit span.gravatar:hover > img.onhover {
    display: block;
    position: absolute;
    margin-left: 1.5em;
    background-color: #eeeeee;
    box-shadow: 5px 5px 3px #bbb;
}

We also need to tweak the syntax-highlighting.sh script (part of the cgit package) a bit so it works better for us Slackers.
Make a copy of it, removing all comments:

# grep -Ev '(#$|^ *#)' /usr/share/cgit/filters/syntax-highlighting.sh > /home/www/cgit/syntax-highlighting.sh
# chmod +x /home/www/cgit/syntax-highlighting.sh

And then add these lines right before the final ‘exec’ line of the script:

# map SlackBuild to .sh
[ "$EXTENSION" == "SlackBuild" ] && EXTENSION=sh

To make the git.liveslak.org website stand out from others, I substituted my own frontpage image and a custom favicon image. These are created as /home/www/cgit/eric_hameleers.png (link) and /home/www/cgit/erichameleers_favicon.ico (link) and both filenames are referenced further down in the cgit configuration.
By default, cgit will look for a file called “/etc/cgitrc” to read its configuration, but I am running multiple sites on a single Slackware host (git.slackware.nl for instance), therefore I create a separate cgit configuration file for each site. For liveslak, it is called “/etc/cgitrc.git.liveslak.org” and then I instruct Apache httpd to look for that particular filename.

/etc/cgitrc.git.liveslak.org

# For more options, see cgitrc.5.txt in the docs folder
root-title=Alien BOB's
root-desc=Web interface to liveslak git repository
virtual-root=/
snapshots=tar.gz tar.xz

summary-branches=10
summary-log=10
summary-tags=10

repository-sort=date
commit-sort=date
branch-sort=age

enable-blame=1
enable-index-links=1
enable-commit-graph=1
enable-follow-links=1
enable-log-filecount=1
enable-log-linecount=1
max-stats=quarter

mimetype-file=/etc/httpd/mime.types
mimetype.rss=application/rss+xml
enable-html-serving=1

css=/cgit.css
logo=/eric_hameleers.png
favicon=/erichameleers_favicon.ico

about-filter=/usr/share/cgit/filters/about-formatting.sh

# for this to work you have to build cgit against lua
# and install luacrypto too
email-filter=lua:/usr/share/cgit/filters/email-gravatar-sbo.lua

# For this to work, you need lua and highlight packages:
source-filter=/home/www/cgit/syntax-highlighting.sh

repo.url=liveslak
repo.path=/path/to/repositories/liveslak.git
repo.desc=Slackware Live Edition by AlienBOB
repo.owner=alien@slackware.com
repo.clone-url=git://liveslak.org/liveslak.git
repo.readme=:README.txt

The actual definition for the git repository is the lines at the end starting with “repo.“.

Lastly, the Apache web server needs to be configured to serve our cgit stuff whenever someone visits git.liveslak.org.
These are the files used to accomplish that:

/etc/httpd/extra/git.liveslak.org.conf

(just an example filename, you will know how and where to add the content for your specific Apache configuration):

<VirtualHost *:80>
    ServerName git.liveslak.org
    ServerAdmin alien@slackware.com

    CustomLog /var/log/httpd/git.liveslak.org_access_log combined
    ErrorLog /var/log/httpd/git.liveslak.org_error_log

    # Include Let's Encrypt configuration:
    Include /etc/httpd/extra/letsencrypt.conf

    # Include the site definition (AFTER Let's Encrypt configuration!!):
    Include /etc/httpd/extra/git.liveslak.org_content.conf
</VirtualHost>
<VirtualHost *:443>
    ServerName git.liveslak.org
    ServerAdmin alien@slackware.com

    CustomLog /var/log/httpd/git.liveslak.org-ssl_access_log combined
    ErrorLog /var/log/httpd/git.liveslak.org-ssl_error_log

    # Include Let's Encrypt configuration:
    Include /etc/httpd/extra/letsencrypt.conf

    # Include web server generic SSL configuration for vhosts:
    Include /etc/httpd/extra/ssl_vhost.conf

    # Include the site definition (AFTER Let's Encrypt configuration!!):
    Include /etc/httpd/extra/git.liveslak.org_content.conf
</VirtualHost>

The file “git.liveslak.org_content.conf” is included twice in the above VirtualHost definition file for Apache. Using these “Include” lines prevents some duplication of code.
Here is the content of that included file:

/etc/httpd/extra/git.liveslak.org_content.conf

DocumentRoot /home/www/cgit
Options FollowSymlinks

# Use a custom name for the configuration - default is /etc/cgitrc:
SetEnv CGIT_CONFIG /etc/cgitrc.git.liveslak.org

DirectoryIndex cgit.cgi
AllowOverride none
Require all granted

SetHandler cgi-script

Options ExecCGI
Require all granted

Alias /cgit.css /home/www/cgit/cgit.css
Alias /cgit.png /home/www/cgit/cgit.png
Alias /erichameleers_favicon.ico /home/www/cgit/erichameleers_favicon.ico
Alias /eric_hameleers.png /home/www/cgit/eric_hameleers.png
Alias /robots.txt /home/www/cgit/robots.txt
Alias / /home/www/cgit/cgit.cgi/

I hope that this story may help some of you with getting your own browseable git repository online.

Good luck, Eric

KTOWN Live ISO based on liveslak-1.8.1 and Plasma6 Beta2

My work on the new Plasma6 for Slackware finally reached a level that I am OK with. I have uploaded a new KTOWN Live ISO image based on liveslak-1.8.1 and it contains a fully functional KDE Plasma6 Beta2 release.

The ISO is 5.2 GB in size, it is huge. Slackware has come to a point (already a while ago) where the full release does not fit on a DVD medium anymore. It’s the new age of digital, it’s really easy to install the distro via a network mirror, and if you want to run it off physical media (like the Live environment) a USB stick is required. I can really recommend using a Ventoy USB thumb drive onto which you can simply copy the full un-modified ISO image and then boot from the stick.
Making the Live environment persistent when you boot from an ISO file is detailed in an update to the liveslak documentation.

Points of note:

  • Plasma6 Beta2 is based on Qt 6.6.1 and consists of: KDE Frameworks5 5.113.0, Frameworks 5.247.0, Plasma 5.91.0 and Applications 24.01.85; The Frameworks5 package-set is still needed to support KDE Plasma5 applications.
  • Pipewire is the default audio server, fully replacing Pulseaudio.
  • The default graphical session is still X11 based but Wayland is fully functional and stable and you can select it from the SDDM session dropdown list.
    When you boot to runlevel 3, the command “startkwayland” will also give you a full Wayland session.
  • I added xwaylandvideobridge to allow Wayland windows to be streamed to X11 applications. You’ll need this to share your screen in applications like Discord, Skype etc.
  • I will soon make available in the ktown repository, my sources and scripts as well as the ‘deps’ packages (such as the new qt6 package and several Slackware originals recompiled to add Qt6 support to them).
  • I also added a background to celebrate the festive season, taken here in Brabant during a COVID pandemic winter walk. The two ice-skaters in the background, that’s not us 🙂

Get the new ISO from one of the following locations (the ISO is accompanied by a MD5 checksum file and a GPG signature):

Tell me what you think of it and what issues you ran into that I might be able to fix in either the Slackware packages or else in liveslak. Don’t forget to report actual functional issues to the KDE bug tracker: https://bugs.kde.org/

Have fun! Eric

KDE Plasma6 Beta2 (but the Live ISO won’t work)

Hi folks.

I have a nice set of packages ready for KDE Plasma6 Beta2 which was just announced two days ago.
As you see from below screenshot, it runs nicely as a Wayland session, both logged in via the SDDM login manager and by running “startkwayland” from a console in runlevel 3.

A few issues that I see may be related to running this test in a QEMU virtual machine, connecting to its VNC server interface from inside another remote VNC session… maybe that’s overdoing the complexity, I don’t know. I can not logout from either the X11 or the Wayland session, the virtual display freezes and I have to login via ssh and reboot the VM or do a back-and-forth switch between runlevels 3 and 4.

Another problem I am facing is the fact that I cannot yet test this on real hardware. I intend to generate and release a KTOWN variant of liveslak, i.e. an ISO image containing this Plasma6 Beta2 release. Unfortunately, the ISO I generated refuses to start either X11 or Wayland sessions, complaining about Qt6 interfaces that are missing or corrupt. I compared the Plasma6-specific package list in the ISO to what I have installed in this QEMU VM, and they are identical.
I will continue my troubleshooting and hope to fix this before Christmas. If not, then this will have to be delayed until after the family visits.

Happy Christmas!
Eric

KTOWN: live ISO with Plasma6 Alpha. Also, chromium now supports HEVC/AC3 playback

I have uploaded a 5 GB ISO file containing a new KTOWN variant of Slackware Live. This is the KDE Plasma6 Alpha release. Play around with it and perhaps you will be able to contribute to an improved Beta by finding and reporting the bugs you encounter.

Get the ISO from my NL or my US server (US ISO still uploading at the moment). There’s also an MD5 checksum and a GPG signature file in those same locations if you want to validate the download.

A lot of packages did not compile yet for various reasons. I am not too concerned about that, next update hopefully will be more complete. A lot of work still needs to be done however (by the KDE developers) to port the remainder of KDE Gear (formerly called Applications or Software Collection) to Qt6.
Not ported to Qt6 as of yet are: artikulate cantor cervisia juk kamoso kde-dev-utils kdenlive kdesdk-thumbnailers kdev-php kdev-python kdevelop kget kgpg kig kio-gdrive kipi-plugins kiten kmix konversation kqtquickcharts krfb ktorrent ktouch kwave libkipi lokalize marble okular parley poxml rocs umbrello.

Still, I was impressed with the fully working and stable Plasma6 Wayland session when I tested an unreleased KTOWN Live ISO a week ago. Of course, as things go, I seem to have broken the Wayland session in this public release of the KTOWN Live.
The version of SDDM graphical session manager should also be Wayland-capable but I will test that in a future ISO.

Let me know in the comments section below what you think of this Alpha release.

News about my chromium package (also its ungoogled sibling).

I was finally able to get the HEVC video and AC3 audio codec support working. There’s a patch set on github, maintained by StaZhu but I did not like the complexity and I am not really interested in GPU hardware-only support. The browser’s internal ffmpeg libraries playback HEVC just fine, taxing your CPU a bit more than in the case of a supported GPU.
Now, the Thorium Browser is also Chromium based and its developer Alex313031 used StaZhu’s patches and wrote some of his own to add not just HEVC video but also AC3 playback support.
Again, I did not like the complexity of his solution (documented on github) but could not get around using some of the patches provided by both. I simplified some of the others into a bunch of ‘sed’ commands. And that made it work for me.

The browser will now playback HEVC and AC3 media formats, as long as the container file is a MP4. I have not found how I can convince Chromium to also support MKV containers.
The chromium-119.0.6045.123 package is already available in my repository, and chromium-ungoogled is still compiling (the ungoogled patch kit only became available earlier today).

You can test the new HEVC playback capability here: https://test-videos.co.uk/ if you select any MP4/HEVC sample (none of those have sound) or Thorium browser test page: https://thorium.rocks/misc/h265-tester.html (those have AC3 audio).

Have fun!

KDE: February 2024 MegaRelease

Just a heads-up to you people who wondered when Alien BOB would pick up on the KDE Plasma bleeding edge again.
Simply put: Patrick did a hell of a job pushing every new KDE Plasma update into the slackware-current package tree (even before the 15.0 release) in no time. There was nothing for me to do (or to improve on) since Plasma5 got added to the distro.

My intention is to change that, soon.

Exactly one month ago, KDE published their planning for Plasma6, the successor to Plasma5, so numbered after the version of the Qt framework which underpins it. As seen on the ‘February 2024 MegaRelease‘ page, the first Alpha release of the Qt6-based Frameworks, Plasma and Gear (the three main components of KDE Plasma) is expected to see the light on November 8th, 2023. The final stable release of KDE Plasma6 will be on February 28th, 2024.

I don’t expect that Slackware itself will absorb this new software immediately upon release. Perhaps we will have a Slackware 15.1 next February, maybe not – but a new KDE desktop is a major and potentially disruptive upgrade. Still, it needs solid testing on Slackware -current somehow. Therefore I will have that stable KDE Plasma6 in my ktown repository when it is released.

I am currently working on updating the kde.SlackBuild infrastructure which I took from Slackware-current, to make it work with the new Plasma6 sources. It is not a trivial task; there are new non-KDE dependencies, new KDE programs and changed interdependencies, patches to remove and patches to add.
So far, I have finalized the scripts for all of the new dependencies, as well as the Frameworks and Plasma. Currently working on KDEPIM, and then the Gear collection (formerly called Applications) awaits. The results up to now took me a full week, and the Gear will probably have the same level of unpleasant surprises (hey, it won’t compile! what did they sneak in now? <initiates another search through KDE Invent>…).

Meaning, I won’t make promises on the timeline for a first Slackware-based test release. I aim to make it coïncide with KDE’s own Alpha release, but I may not be able to finish on time. To be clear about my roadmap: anything that I make available before the stable release of Feb 28, will take the shape of a Slackware Live ISO image (the ktown variant, we haven’t seen that one for two years almost!) for you to test and play with.
There will be no new packages in the ktown repository until the time when KDE Plasma6 stable gets released. I am supportive of people who want to compile this set themselves, so I will make the sources available in ktown as soon as I release the first live ISO and will keep updating those sources.

Note that I will not make Plasma6 co-installable with Plasma5. It’s going to be one or the other. Any official Slackware package that I have to recompile to add Qt6 support, will not lose its Qt5 support. Meaning, my ktown versions of gpgme, kdsoap, phonon, polkit-qt-1, poppler, qca, qcoro or qtkeychain will be 100% compatible with standard Slackware.

Hope to have more news in a week or two!

Sunday update (Oct 29) – a screenshot of the “about” screen after I compiled the new dependencies, Frameworks, Kdepim, Plasma, Plasma-extra and Gear (excluding some twenty packages which are not yet compatible with Qt6):

Eric

« Older posts

© 2024 Alien Pastures

Theme by Anders NorenUp ↑