Tag: linux

  • Stasiek Michalski wins the race for the openSUSE Board

    The openSUSE Ad-hoc Board Election is now concluded.

    Stasiek Michalski has been elected to join the openSUSE Board. The complete result is as follows:

    • Stasiek Michalski — 160 votes
    • Pierre Böckmann — 70 votes

    234 out of 510 eligible members have cast their vote in this election. We recorded 4 blank votes.

    We thank both of them for stepping up and running in this election and we congratulate Stasiek for his win.

    Lastly, thanks to Edwin Zakaria and Ariez Vachha for their help in the planning of this election.

  • openSUSE Ad-hoc Board Election 2020

    Back in February 2020 Christian Boltz resigned from the openSUSE Board explaining the reasons behind his decision on the project mailing list. His resignation came about two weeks after Sarah Julia Kriesch’s resignation from the Board.

    The openSUSE Board was left with two vacant seats to be filled. Sarah had been a board member for just about a few weeks after the 2019-2020 board elections. After her resignation, the openSUSE Board decided to appoint Vinzenz Vietzke on the board based on the results of the 2019-2020 board elections. Following that, only one seat remained vacant on the board. However, before the Election Committee could start discussions for an election to fill that vacant seat, about two weeks after Vinzenz’s appointment, openSUSE member Pierre Böckmann called for a No-Confidence vote against the current board. It was unprecedented in the community and that put things on halt for a while.

    The board election rules state that:

    If 20 per cent or more of the openSUSE members require a new board, an election will be held for the complete elected Board seats.

    The Election Committee was tasked to find out whether 20% of the community is indeed calling for a re-election. At this point I should disclose that I am an election official in the openSUSE Election Committee and the task given to us was not easy. After much consultation, we finally came up with a way to “measure” this 20% requirement of the election rule. We set up an electronic petition using the voting platform that is used for openSUSE Board elections.

    A few days ago the petition ended and the result showed that only 11.6% of the community was in favour of a re-election. That does not satisfy the requirement for a forced re-election and thus an ad-hoc election will be carried to fill the one vacant seat only.

    Ariez Vachha announced the ad-hoc board election schedule on the project mailing list and details are also available on the openSUSE wiki.

    Starting now and until the 2nd of August openSUSE members wishing to run for this election or nominate someone from the community can do so by sending an email to [email protected]. I wish to remind that only openSUSE members can run for board candidacy and vote in this election.

    The Election Committee is composed of Ariez Vachha, Edwin Zakaria and myself.

  • Podman – unable to pull image

    Today, while pulling the latest Nextcloud container image from the docker.io repository I noticed that it is failing. Looking at the read: connection reset by peer error I assume it could be primarily due to network failure; maybe poor quality of the connection.

    Note that Mauritius is far from “everywhere” else and connectivity issues are nothing new.

    ish@coffee-bar:~> podman pull docker.io/library/nextcloud
    Trying to pull docker.io/library/nextcloud...
    Getting image source signatures
    Copying blob e0276193a084 done  
    Copying blob eb2d00c10344 done  
    Copying blob 3a60f364b0c5 done  
    Copying blob e0d3d1244592 done  
    Copying blob f54006e0dc29 done  
    Copying blob 8559a31e96f4 done  
    Copying blob b22875b95a2a done  
    Copying blob f65316e96b10 done  
    Copying blob 3e309988c00b done  
    Copying blob 0c78caf16ec3 [======================================] 13.1MiB / 13.2MiB
    Copying blob 4fc30aae7ee5 done  
    Copying blob 37b016cacdc6 done  
    Copying blob fd56bf3cc539 done  
    Copying blob e3cd35f544b5 done  
    Copying blob 467fea8f6f80 done  
    Copying blob 0dc7444f9282 done  
    Copying blob 547ae6684264 done  
    Copying blob 3139b6de5be7 done  
    Copying blob 00e77223b529 done  
    Copying blob 2b37e3b3a856 done  
      read tcp 192.168.100.6:33536->104.18.124.25:443: read: connection reset by peer
    Error: error pulling image "docker.io/library/nextcloud": unable to pull docker.io/library/nextcloud: unable to pull image: Error writing blob: error storing blob to file "/var/tmp/storage720474498/10": read tcp 192.168.100.6:33536->104.18.124.25:443: read: connection reset by peer
    

    Podman does not retry to copy the image in case of failures.

    A few days ago there was a suggestion to implement a similar feature in Podman that is present in Buildah, which provides the image copy retry functionality.

    For the curious, the implementation can be seen here.

    Container images that are pulled by Buildah are stored in the local repository which can also by accessed by Podman, so that’s an advantage. I tried pulling the Nextcloud container image using Buildah and it completed successfully.

    ish@coffee-bar:~> buildah pull nextcloud
    Getting image source signatures
    Copying blob e0d3d1244592 done  
    Copying blob 8559a31e96f4 done  
    Copying blob eb2d00c10344 done  
    Copying blob 3a60f364b0c5 done  
    Copying blob f54006e0dc29 done  
    Copying blob e0276193a084 done  
    Copying blob f65316e96b10 done  
    Copying blob b22875b95a2a done  
    Copying blob 3e309988c00b done  
    Copying blob 0c78caf16ec3 done  
    Copying blob 4fc30aae7ee5 done  
    Copying blob 37b016cacdc6 done  
    Copying blob e3cd35f544b5 done  
    Copying blob fd56bf3cc539 done  
    Copying blob 467fea8f6f80 done  
    Copying blob 0dc7444f9282 done  
    Copying blob 547ae6684264 done  
    Copying blob 2b37e3b3a856 done  
    Copying blob 00e77223b529 done  
    Copying blob 3139b6de5be7 done  
    Copying config 327476ebe3 done  
    Writing manifest to image destination
    Storing signatures
    327476ebe3280c7b570d8463edd136956eab120959976b643cb7dbfaa73f98c1

    Now, the downloaded container image is also accessible by Podman.

    ish@coffee-bar:~> podman images
    REPOSITORY                     TAG      IMAGE ID       CREATED        SIZE
    docker.io/libreoffice/online   latest   0586fecfa3c1   28 hours ago   2.84 GB
    docker.io/library/nextcloud    latest   327476ebe328   3 days ago     774 MB

    To conclude, while we are waiting that a retryCopyImage function is available in Podman, we can use Buildah to pull container images that are troublesome due to network issues.

  • A quick intro to Podman by Estu Fardani

    Estu Fardani is a helpful & jovial fellow whom I met at the openSUSE Asia Summit last year in Bali, Indonesia. Recently, for the openSUSE Virtual Summit, Estu did a short presentation on Podman. His presentation video is available on YouTube and slides deck available on Google Slides.

    While I am not a fan of alias docker=podman I believe Estu added that part in his slide below to make the Podman transition a bit smoother for users already familiar with Docker commands.

    Slide from Estu’s presentation

    Note that the latest release of openSUSE Leap, i.e version 15.2, comes with support for Podman through the libcontainers-common package.

    Previously, if one needed to experiment with Podman and/or deploy in production then openSUSE Tumbleweed, Kubic or MicroOS were the supported choices. Now, one may deploy Podman containers on their existing Leap infrastructure (after upgrading to the latest version 15.2).

  • कुछ बातें openSUSE Leap 15.2 के बारे में जानें

    २ जुलाई २०२० को openSUSE Leap 15.2 संस्करण उपलब्ध हुआ।

    openSUSE Leap एक निशुल्क और लिनक्स-आधारित ऑपरेटिंग सिस्टम है जो आप अपने पीसी, लैपटॉप या सर्वर पर इस्तेमाल कर सकते है। Leap 15.2 और SUSE Linux Enterprise एक समान कोडबेस उपयोग करते है जिस से openSUSE Leap 15.2 की स्थिरता और ज्यादा मज़बूत होती है।

    यह विशेष संस्करण कृत्रिम बुद्धिमत्ता, यानी आर्टिफिशियल इंटेलिजेंस, को अधिक आसानी से सुलभ बनाता है। निम्नलिखित पैकेज ऑफिशल रिपॉजिटरीज से प्राप्त किए जा सकते हैं।

    इस संस्करण में अधिक कंटेनर टूलस् शामिल है, जैसे कि कुबनेटिस् (जो पहली बार के लिए Leap संस्करण में उपलब्ध हुआ है) हेल्म और सिल्यम

  • Convert .VOB files to .MP4

    I had a bunch of video files in the .VOB format which I copied from a few DVDs a couple of years back. Uploading them on a cloud storage service (e.g Google Drive, OneDrive etc) for safe keeping is nice but not practical since they cannot be played directly through the cloud service’s video player. The latter would play .MP4 video files.

    FFMPEG comes handy here to convert the video files.

    ffmpeg -i bla.vob -b:v 3000k -b:a 256k bla.mp4

    I used mediainfo to find the maximum video & audio bit rate.

    mediainfo bla.vob
  • Managing the Linux /home directory is about to change

    systemd 245 came out on the 6th of March 2020.

    In this release, among many changes brought, a notable one is that regarding how we see and think of the Linux /home directory. A new service systemd-homed.service has been added, whose role is to manage home directories.

    Traditionally, user information on Linux systems have recorded in the /etc/passwd and /etc/shadow files. The former contains details about the user name, id, group id, shell, home directory, among other details, while the latter contains the user password information.

    On the other hand systemd-homed.service stores user information in a ~/.identity file in JSON format. The choice of JSON was mainly due to its popularity and easiness to process with the majority of programming languages.

    Thus, every directory managed by systemd-homed.service contains both the user information and the user data.

    To create, remove or change home directories one would use the homectl command.

    $ sudo homectl create john --real-name="John Doe" -G wheel --disk-size=500M

    What if you could carry your home directory in a pendrive and work from any (Linux) machine as if you are “home” ?

    $ sudo homectl create john --real-name="John Doe" --image-path=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_476fff954b2b5c44-0:0 --tasks-max=500

    The above command creates the user john in a pendrive and assigns a maximum of 500 concurrent task to him.

    systemd-homed.service also allows you to have an encrypted home directory, but that, I will write about on another day. 😉


    Twitter/Facebook card image source: auroria.io

  • Playing Quake again after 23 years

    Quake was born when Christina and I were studying in France in 1996.

    Like most people we knew, we fell in love with the game: the graphics were amazing (and we even bought a 3dfx Voodoo 2 to run it), the audio was great and the atmosphere phenomenal. As a matter of fact, Quake is one of the few games I completed. I ran it on Windows 95.

    Fast forward 23 years

    Today, my laptop runs Fedora Linux 29 and I only use its integrated Intel graphics chipset (despite the laptop having an nVidia chipset as well). This morning, I stumbled upon Quaddicted:

    From there, I quickly discovered that, since Quake was released as open source software in 2012, a number of people have embarked on correcting bugs and enhancing the Quake engine. According to Quaddicted (and who am I to disagree!), the best engine for Linux is Quakespasm.

    I quickly downloaded it and found an executable called quakespasm-sdl2 which I quickly ran. I got an error message telling me that a folder id1 was not found.

    I remembered having zipped my Quake installation years and years ago and, because I am a very methodical guy, took only 5 seconds to find the ZIP. It had the id1 folder in it which I quickly copied to the Quakespasm folder. I got the Quake music. I ran quakespasm-sdl2 again and, lo and behold, Quake started in all its glory. I quickly selected the full screen option and opened a save game from decades ago and it worked! This is what you can see in the top screenshot.

    But quake is more than quake…

    While reading Quaddicted, a stumbled upon Quake Injector, a tool written in Java which allows you to easily download and run 3rd party maps in Quake. Think maps as levels, distinct from the Quake default levels, but as great and sometimes greater to play.

    [Caveat: Quake Injector did not run at first as I had Java 11 on my Linux laptop. I had to switch to Java 8 (which I also had but was inactive)]

    As soon as Quake Injector started, I installed the very highly rated DaMaul6 map and this is where I am now. Wish me luck as DaMaul6 is known to be very difficult.

  • A journey from Unison to Syncthing and back to Unison

    I generally work on my laptop, an old Dell Inspiron 15 still running Fedora Linux 29 quite well. At home, I also tend to work on an Apple iMac (still) running macOS El Capitan (which I intend to upgrade to High Sierra soon — unfortunately, Apple has decided that this iMac cannot run Mojave).

    Since the very beginning, I needed to have a proper file synchronisation process for these two computers and cloud solutions such as Google Drive or Dropbox were not options as I had many many Gigabytes to synchronise and this would have been very expensive to be done online.

    For 1-2 years, I used Unison, a file synchronisation utility written by one of my Computer Science heroes, Benjamin Pierce, author of the quite renowned book “Types and Programming Languages” which, I have to confess, I have not yet read because, well, I never had the chance to stumble upon it. Anyway, Unison is a tool which does two-way synchronisation between computers and every time there is an inconsistency (a new file, a deleted file, a change, etc.) ask the user to manually choose on the action to make. One important of Unison is that one has to run it manually i.e. the synchronisation only happens when initiated by the user. For example, I like to run Unison every afternoon when I get back home after one day of work.

    One year ago, I stopped using Unison. The reason was that I wanted to have real time synchronisation between the two computers i.e. as soon as one changes, the other one is updated (if on of course.) I settled on Syncthing. I tried two different ways of using Syncthing (with a central repository or in peer-to-peer mode) and both worked as expected. But after one year, I have to say that I have two issues with Syncthing. First of all, changes are detected through the inotify mechanism provided by Linux and the macOS kernel. As soon as a file is changed, Syncthing knows about it and can propagate the change to the other computer. All good in principle. But this also means that all errors (a file deleted by mistake, a file overwritten by mistake, etc.) are also immediately propagated. So I used different kinds of versioning techniques to make sure that backups are kept in these situations. But, nevertheless, I slowly realised that real-time propagation might not be a good idea. The second issue is that Syncthing uses a lot of CPU.

    Two days ago, I stopped the Syncthing service on all my computers and revived my Unison installation. And, believe it or not, Unison works great for my use case: I can synchronise my computers when I want (after work for instance) and I have the possibility (if there are incoherences) to think deep about which version to keep. For me, and because my files are very valuable to me, this is a much better process.

    [At this point, let me point out that I use Unison for synchronisation and I use regular rsync for backup on other devices. It is important to understand the difference between these two processes. Synchronisation is not always needed but backups definitely. Especially when it is compliant with the 3-2-1 strategy.]

    What about you? What do you use for synchronising multiple computers when cloud synchronisation is not possible? Do you use Unison? Syncthing? Something else? Why?

  • Using Apache HTTP as reverse proxy

    Using Apache HTTP as reverse proxy

    The Apache HTTP Server, colloquially called Apache, is a free and open-source cross-platform web server. This article explains briefly how to set up Apache as a reverse proxy to a web site in an internal network.

    To set the expectations in this article. I’m not going to explain you how to install Apache web server or how to get it operational on your system. There are thousands of tutorials including my own Accessing your web server via IPv6 on the Internet that already cover that step.

    In case more information about the configuration directives used below is needed, I recommend to consult the official documentation of a particular keyword.

    The scenario

    I have a web site running on a system in an internal network. This could be either a full-fledged Windows/Linux server or an IoT device running on a single board computer (SBC), like i.e. a Raspberry Pi, an Arduino, ESP8266 chipset.

    Using Apache HTTP as reverse proxy
    A reverse proxy taking requests from the Internet and forwarding them to servers in an internal network. Source: Wikipedia

    Now, I want to enable access from the Internet to that internal server using Apache.

    Configuring Apache as reverse proxy

    In order to complete our task we need to look into the features of the mod_proxy module for Apache. Here, we get a directive called ProxyPass which does the job as expected. According to Apache’s Reverse Proxy Guide the simplest example proxies all requests ("/") to a single backend:

    ProxyPass "/"  "http://www.example.com/"
    

    Additionally, to hide any reference to the system on the internal network it is required to specify the directive ProxyPassReverse to modify certain HTTP header values in the response, and use the proxy data instead.

    Following is a working example of how to set up a virtual host in Apache that provides reverse proxy capabilities.

    <VirtualHost *:80>
            ServerName mediacentre.kirstaetter.name
    
            ProxyRequests On
            ProxyPreserveHost On
            ProxyVia full
    
            <Proxy *>
                    Order deny,allow
                    Allow from all
            </Proxy>
    
            ProxyPass               /       http://10.0.240.4:8080/
            ProxyPassReverse        /       http://10.0.240.4:8080/
    </VirtualHost>
    

    The host system on IP address 10.0.240.4 is part of an OpenVPN infrastructure and therefore accessible from the proxy system.

    Multiple proxies possible

    No problem with Apache. You can configure and run as many reverse proxies as would like to. One has to pay attention to avoid overlaps either via ServerName directive or by using different port numbers to bind to. Although I have only one reverse proxy running on Apache I configured multiple scenarios using nginx. More details are described in Using nginx as reverse proxy.

    Do you have any interesting use cases or active configurations of Apache as reverse proxy? If yes, please use the comment section below give me and other readers more details. Thanks!

    Image credit: Nick Fewing