* Implementación del rol de Ansible 'siguldry' para CentOS Stream 10 * Migración del plugin de firmas de Koji Hub a un spooler asíncrono * Modificación de roles para utilizar empaquetamiento RPM nativo de siguldry-pkcs11 * Documentación de decisiones (ADRs) y roadmap en docs/technical/ * Limpieza de binarios locales pesados de PKCS#11 en Ansible Co-developed-by: Gemini AI <renich+gemini@woralelandia.com> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
3.5 KiB
SVG to PNG Conversion on EL10/CS10
Context and Tooling Selection
Personalizing Koji Web branding for MxOS requires converting corporate vector assets (specifically mxos.svg and mxos-reducido.svg) into high-resolution PNG format (e.g. to be placed in images/koji.png within the custom theme).
Because enterprise servers require lightweight and reliable packages, CentOS Stream 10 (EL10) / RHEL 10 AppStream repositories provide native utilities for graphic conversion. Additional modern utilities can be pulled from EPEL 10 or installed via the Python ecosystem.
Conversion Tools and Usage
Three primary methods are available on CentOS Stream 10 to perform SVG to PNG conversion:
rsvg-convert (librsvg2-tools)
This is the recommended, native tool for server environments. It is extremely lightweight, fast, and does not require a graphical display server (X11/Wayland).
Package installation:
sudo dnf install librsvg2-toolsCommand usage: To perform a simple conversion, use the output flag (-o):
rsvg-convert -o koji.png mxos.svgSizing and aspect ratio preservation: Specify target dimensions directly. Use the --keep-aspect-ratio flag to prevent stretching:
rsvg-convert -w 250 --keep-aspect-ratio -o koji.png mxos.svg
Inkscape CLI
Inkscape is a powerful editor, but is heavier than rsvg-convert. It is useful if complex SVG features (like certain embedded filters or text styling) do not render correctly in rsvg-convert.
Package installation: Depending on EPEL 10 availability, install via DNF or use Flatpak as an isolated container:
sudo dnf install inkscapeCommand usage: The modern Inkscape command-line structure uses the -o flag:
inkscape -o koji.png mxos.svgSizing: Resize the export using the -w (width) or -h (height) options:
inkscape -w 250 -o koji.png mxos.svg
CairoSVG (Python Library)
CairoSVG is a Python-based SVG-to-PDF/PNG converter. It is not packaged as a native RPM in base EL10 repositories, but is useful for scripted configurations.
Installation: Install using Python's package manager within a virtual environment or on the user-level path:
pip3 install --user cairosvgCommand usage:
cairosvg mxos.svg -o koji.pngPython Code integration:
import cairosvg cairosvg.svg2png(url='mxos.svg', write_to='koji.png', output_width=250)
Application for Koji Web Branding
To personalize the Koji Web theme for MxOS:
Convert the logo vector to the required logo size (standard Koji logos are usually around 100-250px wide):
rsvg-convert -w 250 --keep-aspect-ratio -o koji.png mxos.svg rsvg-convert -w 64 --keep-aspect-ratio -o koji-reducido.png mxos-reducido.svgCopy the resulting PNG assets into the custom Koji Web static theme directory (e.g. /usr/share/koji-web/static/themes/mxos/images/koji.png).