Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

openSUSE Tumbleweed – Review of the week 2021/30

Dear Tumbleweed users and hackers,

Solid and predictable – that’s what openSUSE Tumbleweed tries to offer to the users. This also shows in the number of snapshots we release. 5 – 7 snapshots a week is absolutely normal – and was also achieved this week, in which we have published 6 snapshots (0723, 0724, 0725, 0726, 0727, and 0728).

The main changes in these snapshots included:

  • Mozilla Firefox 90.0.1
  • NetworkManager 1.32.4
  • cURL 7.78.0
  • VirtualBox 6.1.24
  • Meson 0.58.2
  • Linux kernel 5.13.4
  • Node.JS 16.5.0
  • GCC 11.2 RC1
  • LibreOffice 7.1.5
  • Poppler 21.07.0

Stagings are getting fuller again – with a few things causing different breakages being collected temporarily in Staging:F. The main changes being worked on are:

  • Mozilla Firefox 90.0.2
  • KDE Plasma 5.22.4
  • Mesa 21.1.6
  • system 248.6
  • Linux kernel 5.13.6
  • Inkscape 1.1 (needs openQA test adjusments)
  • rpmlint 2.0
a silhouette of a person's head and shoulders, used as a default avatar

Lanzado Lliurex 21, mejorando versión a versión

Ya no suelo hablar mucho de distribuciones. Nunca he cambiado mucho entre ellas y cuando apareció KDE Neon me quedé en ella para siempre. Así que ahora no estoy mucho al día de sus novedades. No obstante sí que hay una distribución que sigo de cerca y por ello me congratula compartir con vosotros que ha sido lanzado Lliurex 21, la actualizada distribución promovida por la Generalitat Valenciana y que seigue mejorando versión a versión y que, además, viene utilizando Plasma desde su versión 19.

Lanzado Lliurex 21, mejorando versión a versión

Hay gente que no entiende porqué debe existir una distribución dedicada a un colectivo: músicos, jugadores, diseño, arqueología, etc. Puede ser que alguna sea superflua pero os puedo asegurar que la distribución educativa Lliurex no lo es.

Simplemente debemos pensar a quien va dirigida esta distribución: la gran mayoría de ordenadores en los que se va a instalar suelen ser poco potentes, algo obsoletos, y dedicados a la docencia, con aplicaciones específicas.

Es por ello que es de alabar el trabajo de los desarrolladores de Lliurex, una distribución con solera, que lleva desde el 2005 dando guerra y que en la versión del 2019 decidió dar el salto al escritorio Plasma de la Comunidad KDE, lo cual han mantenido es esta versión del 2021, síntoma de que la cosa ha funcionado.

Los nuevos fondos por defecto para lliurex 21 son preciosos. Podéis encontrarlos en este enlace.

En palabras de sus desarrolladores:

«LliureX 21 nace con el mismo propósito de siempre: facilitar el acceso a las TIC y promover el uso del software libre, ofreciendo a sus usuarios una experiencia agradable y sencilla, con todo el que esto implica. Aspectos como la compatibilidad con el hardware más actual, el acceso en el software de última generación y la seguridad, son los tres grandes pilares en los cuales todo sistema moderno tiene que sustentarse, y que justifican la importancia de mantenerse en el día. El salto a LliureX 21 compuerta todos estos beneficios y otras muchas novedades y valores añadidos, […]«

En próximas entradas desgranamos lo que ofrece esta versión, mientras tanto es el momento de descargar y probar, que ¡ahora los maestros ya estamos de vacaciones!

Más información: Lliurex | Descarga

the avatar of openSUSE News

Node.js, curl update in Tumbleweed

Six openSUSE Tumbleweed snapshots were released this week.

Among the updated packages that landed this week in the rolling release were curl, GNU Compiler Collection, Node.js, redis and LibreOffice.

The office suite package LibreOffice came in snapshot 20210728. The update to version 7.1.5.2 provided bugfixes addressing some regressions and a few fixes were made to prevent crashes in Writer. Linux Kernel firmware was updated in the snapshot and PDF rendering library poppler 21.07.0 provided some minor code improvements for build systems while also fixing a memory leak on broken files. The 2.32.3 webkit2gtk3 fixed several crashes and rendering issues and addressed a dozen Common Vulnerabilities and Exposures.

The 20210727 snapshot provided just a single package update to gcc11. The update of the head branch included the 11.2 release candidate and a corrected adjustment to the General Public License version 3.0. The package update also provided a libc-bootstrap cross compiler for AArch64 and RISC-V.

Snapshot 20210726 provided four package updates. Updated packages include gnome-sudoku 40.2 that fixed complex text for printing sudokus, The Linux networking package iputils 20210722 added a build requirement and fixed a broken start of services function. The two openSUSE packages updated in the snapshot were to polkit-default-privs and module manager yast2-nfs-server 4.4.1, which had a fix to properly determine a client name.

Node.js upgraded some dependencies in version 16.5.0 and has an experimental implementation of the Web Streams API in snapshot 20210725. The 6.2.5 version of redis, which supports different kinds of abstract data structures, fixed a CVE integer overflow. A few YaST packages were updated in the snapshot like yast2-control-center 4.4.1 and yast2-iscsi-client 4.4.2. The 0.17.3 version of createrepo_c dropped Python2 support and removed some distutils, which were deprecated in Python3. An update to the newest python-setuptools 57.4 was made in the snapshot; the jump from the 57.0 version revamped the backward and cross-tool compatibility section to remove confusion and the package now relies on a native SSL implementation.

Just two packages were update in snapshot 20210724. The 5.13.4 version of the Linux Kernel brought the patch for the Sequoia CVE-20212-33909. The kernel also fixed some ethernet plugin detections problems for arm as well as a duplication of a USB4 target module node. The same version for kvm_stat added a restart patch to enable a kvm service reboot as systemd’s initial attempt to start the kvm unit file may fail; this appears to be done in case the kvm module is not loaded.

The snapshot that started off the week, 20210723, brought some fixes to Mozilla Firefox 90. The 90.0.1 version updated a rare crash on shutdown and fixed a looping process of some HTTP3 responses. Daniel Stenberg provided an update of the curl 7.78.0 security fixes, which is a popular library and command-line tool that transfers data using various network protocols. The curl team addressed a few CVEs including CVE-2021-22924 that had a bad connection based on the config matching function. GTK3 3.24.30 had some accessibility improvements and fixed a memory leak. The updated version NetworkManager 1.32.4 changed some IPv4 configuration and fixed a nftables backend. The compiler plugin that allows clang to understand Qt semantics, called clazy, updated to version 1.10 and fixed a crash when the Platform Controller Hub is enabled. Other packages to updated in the snapshot were virtualbox 6.1.24, ncurses, yast2-network 4.4.21 and webkit2gtk3 2.32.2.

a silhouette of a person's head and shoulders, used as a default avatar

Syslog-ng 3.33: the MQTT destination

Syslog-ng 3.33: the MQTT destination

Version 3.33 of syslog-ng introduced an MQTT destination. It uses the paho-c client library to send log messages to an MQTT broker. The current implementation supports version 3.1 and 3.1.1 of the protocol over non-encrypted connections, but this is only a first step.

From this blog, you can learn how to configure and test the mqtt() destination in syslog-ng.

Read my blog at https://www.syslog-ng.com/community/b/blog/posts/syslog-ng-3-33-the-mqtt-destination

a silhouette of a person's head and shoulders, used as a default avatar

El poder de Plasma – Vídeo

Quienes me conocen lo saben. Este año ha sido muy intenso para mi, como lo vienen siendo estos últimos. Tanto que se me han escapado cosas de la actualidad KDE como como el siguiente vídeo «El poder de Plasma» de KDE Community. Hora de enmendar ese error.

El poder de Plasma – Vídeo

«Simple de forma predeterminada, potente cuando es necesario» es la máxima del escritorio Plasma de la Comunidad KDE, un eslogan que ha sido copiado por Windows 11 en su anuncio (lo cual demuestra que la Comunidad KDE marca el camino en cuanto a escritorios se refiere).

Y este objetivo es muy importante ya que el escritorio Plasma cada vez está más presente en ordenadores de usuarios con poca experiencia, a los que debe ofrecer sencillez y eficacia pero al mismo tiempo, debe mantener la potencia, flexibilidad y personalización extrema que lo ha hecho tan famoso entre los linuxeros.

El poder de Plasma - Vídeo

Justo este es el objetivo de este vídeo presentado por el canal de Youtube de The KDE Community que lleva por título «The Power of Plasma» (que podéis ver un poco más abajo) y que en apenas un minuto no solo nos muestras algunas de las bondades del escritorio sino que nos muestra algunas de personalizaciones que nuestro entorno de trabajo puede llegar a adquirir.

De esta forma nos muestra la información básica que nos proporciona la bandeja del sistema (calendario, inserción de dispositivos USB, etc), la posibilidad de proteger encriptadas las carpetas que desees con Vault, la forma de instalación de aplicaciones con Discover, las posibilidades de Krunner, etc.

En resumen, el vídeo no es más que un pequeño resumen de la excelente página web del escritorio Plasma que poco a poco se muestra más completa, informativa y espectacular al tiempo que se simplifica y se hace accesible a todo tipo de usuarios.

a silhouette of a person's head and shoulders, used as a default avatar

Alternativas modernas de reemplazo a los comandos de Unix

Estas son algunas herramientas más modernas que sirven de reemplazo a algunos de los comandos más conocidos de sistemas Unix y derivados como sistemas GNU/Linux

Unix y GNU/Linux han evolucionado con el tiempo, así algunas herramientas fundamentales que conocemos y utilizamos en nuestras distribuciones se han quedado un poco desfasadas aunque siguen siendo actualizadas y funcionales al 100%.

Para muchas de esas herramientas o comandos algunas personas han creado alternativas con nuevas funcionalidades o reescritas en lenguajes más modernos que las hacen más rápidas. Como por ejemplo el caso de exa como reemplazo a ls.

Vamos a hacer un repaso de algunas de esas alternativas y si quieres incorporarlas en tu arsenal de útiles para la línea de comandos.

Este listado es una recopilación que puedes encontrar en este repositorio de GitHub:

Bat como reemplazo a cat

Cat es la conocida aplicación para mostrar el contenido de un archivo en la línea de comandos. Bat añade resaltado de sintaxis, integración con git y mejoras en la presentación del texto.

Exa como reemplazo a ls

ls nos muestra el contenido de la carpeta actual, mostrándonos los archivos y carpetas que contiene. Exa añade una salida coloreada, posibilidad de añadir iconos, una visualización más ordenada.

lsd como reemplazo a ls

También como reemplazo a ls, lsd está escrito en Rust y también añade colores para una visualización mejor de la salida.

Delta un visor para git y diff

Delta nos facilita el poder revisar las diferencias en un repositorio git, mostrándonos los cambios en varias vistas, resaltado de sintaxis, modificación rápida de los textos modificados y también escrito en Rust.

duf como reemplazo a df

df es una unitildad para conocer el uso de nuestro disco duro y saber cuanto nos queda de capacidad. duf está escrito en Go y también añade colores para una mejor visualización, se ajusta a nuestra terminal, podemos ordenar los resultados, etc.

broot como reemplazo a tree

Con tree se nos muestra en pantalla una vista jerárquica de nuestras carpetas y los archivos que continene. Broot escrito en Rust, nos muestra más información, más visual y podemos interactuar con esas carpetas.

fd como reemplazo a find

Con find podemos buscar un archivo en nuestro sistema. Fd escrito en Rust hace más sencilla la sintaxis de uso de esa búsqueda, es más rápido, añade colores para una mejor visualización, es iteligente en cuanto a mayúsculas y minúsculas entre otras funcionalidades.

ripgrep como reemplazo a grep

grep es el comando para buscar una cadena de texto dentro de un archivo. Ripgrep también escrito sobre todo en Rust hace una tarea similar pero más rápido, además de añadir otras funcionalidades.

ag como reemplazo a ack

ack es una herramienta de de búsqueda de código. Ag está escrito en C y enfocado en la rapidez.

fzf como herramienta multiusos para buscar

fzf es un “buscador difuso” que se integra con muchas herramientas y que sirve para buscar con unas pocas letras entre muchas opciones: procesos, archivos, historial de comandos…

También recomendar el artículo que le dedicó Lorenzo aka “atareao” en su indispensable blog:

McFly como buscador en el historial de comandos

El historial de comandos guarda todos los comandos que hemos ejecutado y con Ctrl-r podremos buscar. Pero McFly escrito sobre todo en Rust, va más allá y de entre las opciones prioriza en función de las búsquedas, etc.

Choose como reemplazo a cut y también a awk

Sin duda cut y awk son dos grandes herramientas a la hora de “diseccionar” partes de un texto en un listado. Pero estaréis conmigo que la sintaxis, sobre todo de awk, de uso es poco intuitiva. Choose quiere hacer que sea más sencillo el uso a la hora de tomar partes de texto.

sd como reemplazo a sed y awk

De nuevo una herramienta para facilitar el uso de sed y awk. Con sd será más sencillo encontrar y reemplazar texto por su uso intuitivo

tldr como reemplazo a las páginas man

Las páginas man son imprescindibles a la hora de llegar a dominar un comando… pero a veces es difícil encontrar lo que queremos. Para eso tldr va al meollo, resumiendo los comandos y dando prácticos ejemplos de algunas opciones. (y desde hace un tiempo he ido contribuyendo con algunas traducciones al español)

Diferentes herramientas como sustitutos de top

A la hora de ver los recursos que consumen los diferentes procesos en nuestro equipo top se ha quedado algo anticuado. En el blog ya pudiste leer hace tiempo un artículo que listaba varias de esas opciones, algunas muy interesantes:

gping como reemplazo a ping

Ping sin duda es una de esas herramientas que siempre hemos utilizado alguna vez para probar conexiones, configuraciones de red, si está vivo nuestro servidor u otros casos. Con gping, escrito en Rust, tenemos esas mismas funcionalidades pero representada la salida con un bonito gráfico.

zoxide (z) como reemplazo a cd

Creo que cd estaría en el top de comandos utilizados, es la herramienta para cambiar en una carpeta desde la terminal. Z hace lo mismo pero aprende de cómo lo usas y eso lo utiliza para tratar de ahorrarte trabajo, adivinando a dónde quieres ir y mostrándotelo.


Estas y algunas otras herramientas que se irán añadiendo al listado son las herramientas que vienen no sé si a sustituir a los conocidos comandos, pero sí quizás a hacerse imprescindibles en nuestros equipos una vez que las probemos.

¿Has probado alguna y te ha gustado? Comparte tus experiencias en los comentarios.

a silhouette of a person's head and shoulders, used as a default avatar

Lanzada la cuarta actualización de Plasma 5.22

Tal y como estaba previsto en el calendario de lanzamiento de los desarrolladores, ayer martes 27 de julio la Comunidad KDE ha comunicado que ha sido lanzada la cuartaº actualización de Plasma 5.22. Una noticia que aunque es esperada y previsible es la demostración palpable del alto grado de implicación de la Comunidad en la mejora continua de este gran entorno de escritorio de Software Libre.

Lanzada la cuarta actualización de Plasma 5.22

No existe Software creado por la humanidad que no contenga errores. Es un hecho incontestable y cuya única solución son las actualizaciones. Es por ello que en el ciclo de desarrollo del software creado por la Comunidad KDE se incluye siempre las fechas de las actualizaciones.

Lanzada la cuarta actualización de Plasma 5.22

De esta forma, el martes 27 de julio ha sido lanzada la cuarta actualización de Plasma 5.22, la cual solo trae (que no es poco) soluciones a los bugs encontrados en esta semana de vida del escritorio y mejoras en las traducciones. Es por tanto, una actualización 100% recomendable.

Más información: KDE

Las novedades básicas de Plasma 5.22

La lista principal de las novedades de Plasma 5.22 son las siguientes:

  • Grandes mejoras visuales, donde destaca la nueva funcionalidad de transparencia adaptativa: esto significa que el panel y los widgets que contiene serán agradablemente translúcidos por norma general, aunque se volverán completamente opacos si existen ventanas maximizadas para evitar cualquier distracción.
  • Nueva pantalla de inicio de las Preferencias del Sistema donde además de las acciones más habituales que solemos hacer los usuarios tendremos el acceso a los módulos que más utilizamos.
  • Mejoras en las actualizaciones en diferido, útiles para algunos usuarios, no tanto para otros, y que como es habitual en esta versión se han pulido para contentar a todos.
  • Los widgets de la Bandeja del sistema (situados normalmente en la parte inferior derecha del panel) son mucho más consistentes en aspecto y también más útiles
  • Mejoras en KWin, Wayland, el lanzador de «todo» Kunner y, por supuesto, en las notificaciones.

Más información: KDE

the avatar of Alessandro de Oliveira Faria

Novos códigos All Star Tower Defense (update 9)

Ver a imagem de origem
As seguir a lista dos últimos códigos do jogo All Tower Defense que podem ser trocados por joias gratuitas, que você usa para invocar novos personagens para ajudar na defesa contra seus inimigos.
  • specialkingluffy100k – 150 gemas (novo)
  • illbewatchingyou – 300 gemas (novo)
  • gamebreakingvisits101 – 250 gemas (novo)
  • nowherescoredeal – 250 gemas (novo)
  • Minishutdown – 200 gemas
  • mrworldwide – 300 gemas
  • morecodeforyouxd – 175 gemas
  • codeofprisma – 250 gemas [Servidor privado]
  • Codeoflight – 250 gemas [Servidor Privado]
  • listentothemusic132 – 175 gemas
  • howareyoutodaymyfriendo – 175 gemas [Servidor Privado]
  • NAVYXFLAME4CODE – 150 gemas
  • fruitysubmoe – 250 gemas
  • 4thofjulyupdate – 250 gemas
  • lesgolesgoyuuh – 150 gemas
  • supertime – 150 gemas
  • biggerthanlife1 – 150 gemas
  • 600klikes – 175 gemas
  • fruitgame – 150 gemas
  • updatejune2021 – 250 gemas
  • addnewunitstobannerfix – 150 gemas
  • fruit – 550 gemas
  • 2021memorialday2021x – 150 gemas
  • Update53021 – 150 gemas
  • lovetobrazil – 150 gemas
  • addnewunitstobannerfix – 150 gemas
  • diamondnowina – 150 gemas
  • ohmahgawdskill – 150 gemas
  • yellowsix – 150 gemas
  • tysmfor1mfavorite – 720 gemas
  • jahajha – 150 gems
  • smoothcriminal2 – 150 gems
  • freedom – 150 gems
  • lieawake – 150 gems
  • likeapartyonthelist – 150 gems
  • shotofmemories – 150 gems
  • quickshut – 100 gems
  • ohmahgawdskill – 150 gemas (novo)
  • yellowsix – 150 gemas (novo)
  • tysmfor1mfavorite – 720 gemas (novo)
  • jahajha – 150 gems
  • smoothcriminal2 – 150 gems
  • freedom – 150 gems
  • lieawake – 150 gems
  • likeapartyonthelist – 150 gems
  • shotofmemories – 150 gems
  • quickshut – 100 gems
a silhouette of a person's head and shoulders, used as a default avatar

Running openSUSE in a FreeBSD jail using Bastille

Why?

Last week, when the latest version of Bastille, a jail (container) management system for FreeBSD was released, it also included experimental Linux support. Its author needed Ubuntu, so that was implemented. I prefer openSUSE, so with some ugly hacks I could get openSUSE up and running in Bastille. I was asked to document it in a blog. This topic does not fit the sudo or syslog-ng blogs, where I regularly contribute. However it involves two of my favorite operating systems: FreeBSD, which I started to use in 1994 and (open)SUSE, which I started to use in 1996. This is how my personal blog was born after years of procrastination :-)

Note. OpenSUSE in a FreeBSD jail is barely usable. The way I installed it is an ugly hack, even in my own view. But it works, and some people might find it useful…

Some preparations

First of all, you need FreeBSD and you need the latest Bastille installed. I do not know if this version is already available in FreeBSD ports, I installed it using git based on the instructions on the Bastille documentation at: https://bastille.readthedocs.io/en/latest/chapters/installation.html#git.

Before going on to play with Linux I made sure that everything works with Bastille as expected. So, I followed my blog from earlier and created a syslog-ng jail using Bastille: https://www.syslog-ng.com/community/b/blog/posts/running-syslog-ng-in-bastille-revisited Note, that /usr/local/etc/bastille/bastille.conf is not installed when installing from git. Copy /usr/local/etc/bastille/bastille.conf.sample to bastille.conf

Once I made sure that Bastille works fine with FreeBSD jails, the next step was to get Ubuntu working. Just as with FreeBSD-based jails in Bastille, first you need to bootstrap it. If Linux support is not yet enabled, Bastille can do that for you: modify configuration files and load the necessary kernel modules.

root@fb130:~ # bastille bootstrap focal
sysrc: unknown variable 'linprocfs_load'
sysrc: unknown variable 'linsysfs_load'
sysrc: unknown variable 'tmpfs_load'
linprocfs_load, linsysfs_load, tmpfs_load not enabled in /boot/loader.conf or linux_enable not active. Should I do that for you?  (N|y)
y
Loading modules
kldload: can't load tmpfs: module already loaded or in kernel
Persisting modules
linux_enable: NO -> YES
linprocfs_load:  -> YES
linsysfs_load:  -> YES
tmpfs_load:  -> YES
W: Probably required module fdescfs is not loaded
I: Retrieving InRelease 
I: Retrieving Packages 
I: Validating Packages 
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://archive.ubuntu.com/ubuntu...
I: Retrieving adduser 3.118ubuntu2
I: Validating adduser 3.118ubuntu2
I: Retrieving apt 2.0.2
[...]

Now you can create your first Linux-based jail to test that everything works as expected:

root@fb130:~ # bastille create -L ubuntu focal 10.17.89.51
Valid: (10.17.89.51).
[ubuntu]:
ubuntu: created

Fetching packages...
Selecting previously unselected package adduser.
(Reading database ... 0 files and directories currently installed.)
Preparing to unpack .../adduser_3.118ubuntu2_all.deb ...
Unpacking adduser (3.118ubuntu2) ...
[...]
Get:3 http://archive.ubuntu.com/ubuntu focal/main Translation-en [506 kB]
Fetched 1741 kB in 1s (1841 kB/s)                             
Reading package lists... Done
Building dependency tree... Done
All packages are up to date.

Verify that the second jail is up and running:

root@fb130:~ # jls
   JID  IP Address      Hostname                      Path
     2  10.17.89.50     alcatraz                      /usr/local/bastille/jails/alcatraz/root
     3  10.17.89.51     ubuntu                        /usr/local/bastille/jails/ubuntu/root
root@fb130:~ # 

You can now reach the console, install software and enjoy your first Linux jail in Bastille.

root@fb130:~ # bastille console ubuntu
[ubuntu]:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 3.17.0 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Last login: Sun Jul 25 19:32:28 UTC 2021 on pts/0
root@ubuntu:~# uname -a
Linux ubuntu 3.17.0 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~# apt-get install python3-bs4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libxslt1.1 python3-chardet python3-html5lib python3-lxml python3-soupsieve python3-webencodings
[...]

Installing openSUSE

There is no dedicated installation method yet for openSUSE. And I am not aware of a tool similar to debootstrap for openSUSE, that could bootstrap a distribution. Instead of that I downloaded a ready to use openSUSE operating system image and replaced the content of the Ubuntu directory under /usr/local/bastille/releases/Ubuntu_2004 with the openSUSE image.

root@fb130:~ # cd /usr/local/bastille/releases/
root@fb130:/usr/local/bastille/releases # ls
13.0-RELEASE					Ubuntu_2004
root@fb130:/usr/local/bastille/releases # mv Ubuntu_2004 Ubuntu_2004.orig
root@fb130:/usr/local/bastille/releases # mkdir Ubuntu_2004
root@fb130:/usr/local/bastille/releases # wget http://download.opensuse.org/distribution/leap/15.3/appliances/opensuse-leap-dnf-image.x86_64-lxc-dnf.tar.xz
--2021-07-26 22:36:42--  http://download.opensuse.org/distribution/leap/15.3/appliances/opensuse-leap-dnf-image.x86_64-lxc-dnf.tar.xz
Resolving download.opensuse.org (download.opensuse.org)... 195.135.221.134, 2001:67c:2178:8::13
Connecting to download.opensuse.org (download.opensuse.org)|195.135.221.134|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloadcontent.opensuse.org/distribution/leap/15.3/appliances/opensuse-leap-dnf-image.x86_64-15.3.0-lxc-dnf-Build9.150.tar.xz [following]
--2021-07-26 22:36:42--  http://downloadcontent.opensuse.org/distribution/leap/15.3/appliances/opensuse-leap-dnf-image.x86_64-15.3.0-lxc-dnf-Build9.150.tar.xz
Resolving downloadcontent.opensuse.org (downloadcontent.opensuse.org)... 195.135.221.157, 2001:67c:2178:8::27
Connecting to downloadcontent.opensuse.org (downloadcontent.opensuse.org)|195.135.221.157|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45147784 (43M) [application/octet-stream]
Saving to: ‘opensuse-leap-dnf-image.x86_64-lxc-dnf.tar.xz’

opensuse-leap-dnf-image.x86_64-lxc-dnf.tar.xz               100%[=========================================================================================================================================>]  43.06M  10.7MB/s    in 4.3s    

2021-07-26 22:36:46 (10.1 MB/s) - ‘opensuse-leap-dnf-image.x86_64-lxc-dnf.tar.xz’ saved [45147784/45147784]

root@fb130:/usr/local/bastille/releases # cd Ubuntu_2004
root@fb130:/usr/local/bastille/releases/Ubuntu_2004 # tar xf ../opensuse-leap-dnf-image.x86_64-lxc-dnf.tar.xz

There are more images available on the openSUSE download site, but the above one seemed to be small enough and still contain package management. It is the latest stable release, Leap 15.2 is still available and Tumbleweed provides you with a cutting edge rolling-release distribution.

Next, create another jail based on the Ubuntu image, which in practice contains now openSUSE. There will be plenty of error messages, as the script tries to run Debian package management tools, but in the end there will be an openSUSE image up and running:

root@fb130:~ # bastille create -L opensuse focal 10.17.89.52
Valid: (10.17.89.52).
[opensuse]:
opensuse: created

Fetching packages...
rm: cannot remove '/var/cache/apt/archives/rsyslog*.deb': No such file or directory
/bin/bash: dpkg: command not found
/bin/bash: dpkg: command not found
/bin/bash: apt: command not found
root@fb130:~ #

You can verify that something is up and running:

root@fb130:~ # jls
   JID  IP Address      Hostname                      Path
     1  10.17.89.50     alcatraz                      /usr/local/bastille/jails/alcatraz/root
     2  10.17.89.51     ubuntu                        /usr/local/bastille/jails/ubuntu/root
     3  10.17.89.52     opensuse                      /usr/local/bastille/jails/opensuse/root

Unfortunately the bastille console command does not work with openSUSE. Not even after the missing dependencies are installed. You can still access the running jail using jexec. In this case the command is, where 3 is the JID:

root@fb130:~ # jexec 3 /bin/bash
opensuse:/ # uname -a
Linux opensuse 3.17.0 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
opensuse:/ # dnf update
openSUSE Leap 15.3 - OSS                                                                                                                                                                                      0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'opensuse-leap-oss':
  - Curl error (6): Couldn't resolve host name for http://download.opensuse.org/distribution/leap/15.3/repo/oss/repodata/repomd.xml [Could not resolve host: download.opensuse.org]
Error: Failed to download metadata for repo 'opensuse-leap-oss': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
openSUSE Leap 15.3 - OSS - Updates                                                                                                                                                                            0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'opensuse-leap-oss-update':
  - Curl error (6): Couldn't resolve host name for http://download.opensuse.org/update/leap/15.3/oss/repodata/repomd.xml [Could not resolve host: download.opensuse.org]
Error: Failed to download metadata for repo 'opensuse-leap-oss-update': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
openSUSE Leap 15.3 - Updates from Backports for SUSE Linux Enterprise                                                                                                                                         0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'opensuse-leap-sle-backports-update':
  - Curl error (6): Couldn't resolve host name for http://download.opensuse.org/update/leap/15.3/backports/repodata/repomd.xml [Could not resolve host: download.opensuse.org]
Error: Failed to download metadata for repo 'opensuse-leap-sle-backports-update': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
openSUSE Leap 15.3 - Updates from SUSE Linux Enterprise                                                                                                                                                       0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'opensuse-leap-sle-update':
  - Curl error (6): Couldn't resolve host name for http://download.opensuse.org/update/leap/15.3/sle/repodata/repomd.xml [Could not resolve host: download.opensuse.org]
Error: Failed to download metadata for repo 'opensuse-leap-sle-update': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: opensuse-leap-oss, opensuse-leap-oss-update, opensuse-leap-sle-backports-update, opensuse-leap-sle-update
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Dependencies resolved.
Nothing to do.
Complete!

As you can see, networking does not work either. It’s a missing /etc/resolve.conf, which is easy to resolve (pun intended):

root@fb130:~ # cp /etc/resolv.conf /usr/local/bastille/jails/opensuse/root/etc/
root@fb130:~ # 

Now you can jexec again into the openSUSE jail, install software packages and enjoy :)

opensuse:/ # dnf install python3-beautifulsoup4
Last metadata expiration check: 0:03:34 ago on Mon Jul 26 21:02:50 2021.
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                           Architecture                                      Version                                               Repository                                                    Size
==============================================================================================================================================================================================================================================
Installing:
 python3-beautifulsoup4                                            noarch                                            4.8.2-1.18                                            opensuse-leap-oss                                            191 k
Installing dependencies:
 python3-soupsieve                                                 noarch                                            1.9.5-1.17                                            opensuse-leap-oss                                             68 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install  2 Packages

Total download size: 259 k
Installed size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): python3-soupsieve-1.9.5-1.17.noarch.rpm                                                                                                                                                                444 kB/s |  68 kB     00:00    
(2/2): python3-beautifulsoup4-4.8.2-1.18.noarch.rpm                                                                                                                                                           1.2 MB/s | 191 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         1.5 MB/s | 259 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1 
  Installing       : python3-soupsieve-1.9.5-1.17.noarch                                                                                                                                                                                  1/2 
  Installing       : python3-beautifulsoup4-4.8.2-1.18.noarch                                                                                                                                                                             2/2 
  Verifying        : python3-beautifulsoup4-4.8.2-1.18.noarch                                                                                                                                                                             1/2 
  Verifying        : python3-soupsieve-1.9.5-1.17.noarch                                                                                                                                                                                  2/2 

Installed:
  python3-beautifulsoup4-4.8.2-1.18.noarch                                                                                 python3-soupsieve-1.9.5-1.17.noarch                                                                                

Complete!

What is next?

I’m still not convinced how useful it is, but you can run openSUSE on FreeBSD using Bastille. You can try other openSUSE images, install more software in the jail, etc. Note, that Linux support is still experimental in Bastille, and running openSUSE is an ugly hack. But as this hack lets me run my two favorite operating systems together, I love this hack :-)

a silhouette of a person's head and shoulders, used as a default avatar

Syslog-ng 3.33: the MQTT destination

Version 3.33 of syslog-ng introduced an MQTT destination. It uses the paho-c client library to send log messages to an MQTT broker. The current implementation supports version 3.1 and 3.1.1 of the protocol over non-encrypted connections, but this is only a first step.

From this blog, you can learn how to configure and test the mqtt() destination in syslog-ng.

Before you begin

To use the MQTT destination of syslog-ng, you need to use at least syslog-ng version 3.33. It is not yet included in most Linux distributions, but luckily it is available in some 3rd-party syslog-ng repositories. You can find a list of them at https://www.syslog-ng.com/products/open-source-log-management/3rd-party-binaries.aspx MQTT support is usually included in a sub-package of syslog-ng, often called syslog-ng-mqtt. You also need an MQTT broker, where you can forward log messages using the mqtt() destination.,

For my tests, I used Fedora 34 with the Mosquitto MQTT broker and syslog-ng installed from the unofficial Copr repository.

Configuring syslog-ng

If your distribution of choice supports it, create a new configuration file under the /etc/syslog-ng/conf.d/ directory with a .conf extension. Otherwise, append the configuration below to syslog-ng.conf.

destination d_mqtt {
  mqtt (
    address("tcp://localhost:1883"),
    topic("test/$HOST"),
    fallback-topic("syslog/fallback")
    template("$MESSAGE")
    qos(1)
  );
};

log {
    source(s_sys);
    destination(d_mqtt);
};

The MQTT destination has three mandatory options:

  • address() defines where to send log messages: it includes the hostname (or IP address) and the port number of the MQTT broker. These values work if the broker is running on localhost at the default port.

  • topic() defines in which topic syslog-ng stores the log message. You can also use templates here, and use, for example, the $HOST macro in the topic name hierarchy.

  • fallback-topic() is used when syslog-ng cannot post a message to the originally defined topic (which can include invalid characters coming from templates).

Optional parameters of the MQTT destination include:

  • template(), where you can configure the message template sent to the MQTT broker. By default, the template is: “$ISODATE $HOST $MSGHDR$MSG”

  • qos stands for quality of service and can take three values in the MQTT world. Its default value is 0, where there is no guarantee that the message is ever delivered. Setting it to 1 makes sure that the message is delivered at least once, while 2 ensures that a message is delivered exactly once. Obviously, 0 has the best performance, while 2 can be much slower.

The log statement connects the local log sources with the MQTT destination. Note, that the name of the source might be different, depending on syslog-ng.conf. Configurations on Fedora and RHEL call the local log source s_sys, by default.

Testing

As mentioned in the introduction, I used the Mosquitto MQTT broker for testing. There are dozens of others listed at https://mqtt.org/software/, verifying incoming messages is different for each software.

Once you reloaded syslog-ng to ensure that the configuration takes effect, you are ready for testing. We use two utilities for testing:

  • logger sends syslog messages to the local server

  • mosquitto_sub is part of the Mosquitto MQTT broker software and can subscribe to messages arriving on a broker

First start mosquitto_sub in a terminal:

mosquitto_sub -h localhost -p 1883 -t 'test/+'

This will listen to incoming messages on the broker on all subtopics under the “test” topic. “+” is a wildcard here.

Next, you can send some log messages using the logger command:

logger this is a test

And you should see the line appear in the output of mosquitto_sub:

2021-07-26T16:39:55+02:00 fedora34.localdomain root[3077]: this is a test

What is next?

This is just the first step in adding MQTT support to syslog-ng. Your feedback is very welcome about this new feature. Detailed problem reports help to make the next version more robust while positive feedback lets us know that the feature is in use and it is worth developing it further.

-

If you have questions or comments related to syslog-ng, do not hesitate to contact us. You can reach us by email or even chat with us. For a list of possibilities, check our GitHub page under the “Community” section at https://github.com/syslog-ng/syslog-ng. On Twitter, I am available as @Pczanik.