Skip to main content

the avatar of danigm's Blog

Python in openSUSE Tumbleweed

openSUSE Tumbleweed is a rolling release distribution, so it's ideal for developers and users that like to have the bleeding edge software.

It's also really "stable" to be a rolling release, from time to time you can find a broken package because of one package is updated and another one is not compatible yet, but it's something that doesn't happen too often thanks to openqa tests, so you don't need to worry about a breaking system.

You can find the Python interpreter and a lot of python modules in every Linux distribution, but Tumbleweed does an interesting thing for Python.

Default Python version (python3 -> python-3.11)

If you don't worry about the python version, you can just rely on python3. In Tumbleweed python3 is not a real package, but the default python version provides python3, so depending on when you install python3 you will get a different package, if you install it today (August 2023) you'll get python311.

In your system you'll have the /usr/bin/python3 binary that points to the default python, so you don't need to worry about the current version, you'll have there the default Python version for the operating system.

In addition to the Python interpreter, you can find in the distribution a lot of python modules, but again you can use the default version, so, for example, if you want to install poetry, you just use zypper install python3-poetry and that will install the real package python311-poetry.

Multiple python versions (3.8, 3.9, 3.10, 3.11)

Besides the default Python, in Tumbleweed you can also find other supported Python interpreters. Right now you can find all the Python versions currently supported by the Python Foundation, from 3.8 to 3.11.

For Python 3.8 you'll only find the interpreter, because the python modules are not built anymore, but for all the other versions you can find almost the same modules.

All python modules that provide binaries uses the update-alternatives, so you can configure in your system the version that you want to use as default. For example, if you want to use the 3.9 version of poetry, having installed different versions you can decide what /usr/bin/poetry points to:

$ sudo zypper in python311-poetry python39-poetry
$ sudo update-alternatives --config poetry

/usr/bin/python3 is a link provided by the default python package, so you can't modify with update-alternatives, so if you want to use a different python version, make sure to do the correct call with the full name python3.9, and use the correct shebang in your python scripts, for example #!/usr/bin/env python3.9.

What happens when default changes?

This way of distributing Python interpreter and modules is useful, because you don't need to update your software to work with the latest Python version, if your software requires another version, you can just install and continue using it, even on a bleeding-edge distribution like Tumbleweed.

But this method has some problems. When the default Python interpreter is changed in the distribution, all packages that depends on python3 will be updated, and that works correctly. But if you have installed some python module using the python3 prefix, that package, and all dependencies, is not updated automatically.

For example, if you installed python3-poetry when python3.10 was the default system, and then the distribution updates the system Python to python3.11, you don't get the python311-poetry package by default, you'll need to install it again. This could break you software, because if you use python3 and the dependencies are not updated, you'll find that some dependencies are not installed after updating.

For that reason, when the default python is changed in Tumbleweed, if you've software that rely on python3 you should make sure to install dependencies again by hand. And also you can do a cleanup and remove all old version packages that you don't need anymore.

If you just want the latest version you can just do all at once with a simple script like this:

#!/bin/bash
# up-py-tw.sh

FROM=$1
TO=$2

if [ $# -lt 2 ]
then
    echo "Usage:   up-py-tw.sh FROM TO"
    echo "example: up-py-tw.sh 310 311"
    exit 0
fi

echo "Updating python packages from $FROM to $TO"

OLDP=$(zypper -q search -i python${FROM}-* | tail --lines +4 | cut --delimiter \| --fields 2)
NEWP=$(echo $OLDP | sed "s/python${FROM}/python${TO}/g")

sudo zypper in $NEWP
sudo zypper rm $OLDP

You should verify what will be installed and what will be removed to make sure that just the python related packages are removed. It's possible that other packages depend on a python version that's older than the system one and that's okay.

Beta version (3.12.0b4)

In Tumbleweed, right now you can find all the supported Python versions, but it's not just that. At this moment you can also find the beta version of the next Python interpreter.

$ sudo zypper in python312

So if you are adventurous and want to test some new feature in the next Python release, you can do it with the version provided there. This version could also be used by openSUSE packagers to test the packages before the Python version is released so it allow us to prepare everything for the release and it could be in the distribution earlier and more tested.

Development

All this multiple python versions is done at distribution level and usually there's only one source package that produces the python39-foo, python310-foo and python311-foo. The source package is usually called python-foo and can be found in the Python devel project.

These packages spec uses the python-rpm-macros to generate all the versions from one source. If you're a packager you can find more information on the openSUSE wiki about Python Packaging.

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

openSUSE Tumbleweed – Review of the weeks 2023/30 & 31

Dear Tumbleweed users and hackers,

As so often during the vacation season, I take some Fridays off and am punished for it by having to do reviews spanning more than one week. The same thing happened this time, so you had to wait an extra week again to find out what happened in Tumbleweed. A total of 10 snapshots have been published since my last review (0719, 0724, 0727..0731, 0801, 0802, and 0803). Between 0719 and 0724, there was a more significant gap due to SUSE moving some infrastructure between data centers.

The most relevant changes delivered during the last two weeks include:

  • Qemu 8.0.3
  • systemd 253.7
  • Linux kernel 6.4.4 & 6.4.6
  • openSSH 9.3p2
  • PHP 8.2.8
  • Mesa 23.1.4
  • cURL 8.2.0 & 8.2.1
  • GStreamer 1.22.5
  • Samba 4.18.5
  • Mozilla Firefox 115.0.3
  • KDE Plasma 5.27.7
  • Inkscape 1.3

Staging projects are well used, and we have the following changes in the queue for testing:

  • glibc 2.38
  • Mesa 23.1.5
  • Mozilla Firefox 116 (fails to build on i586, aarch64, armv7l – inclusion blocked)
  • Linux kernel 6.4.8
  • Perl 5.38.0
  • Python Sphinx 7.1.x

the avatar of Open Build Service

Post-mortem: Database Cluster Crashes

Downtime on the afternoon of 3rd of August On 3. August, a few hours after a large migration performed within the maintenance window earlier that day, we experienced multiple downtimes while recovering from database inconsistencies. Date: 03.08.2023 Impact: Multiple downtimes throughout the day. Root Causes: Our database cluster ran out of available space during a large schema/data migration (#14597 - Migrate the remaining database tables and columns to utf8mb4) Trigger: Morning deployment and migration from...

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

Accelerating single TCP connections in syslog-ng: parallelize()

One of the highlights of the syslog-ng 4.3.0 release is parallelize(). Normally, syslog-ng processes incoming messages from a TCP connection in a single thread. While this works fine with many connections, it is a bottleneck when using a single or very few high-traffic connections. Using parallelize() allows syslog-ng to process log messages from a single high-traffic TCP connection in multiple threads, thus increasing processing performance on multi-core machines.

As you will see, parallelize() helps when you have a single high-traffic TCP connection. In this case parallelize() distributes incoming messages to multiple threads, so resources are better utilized. However, when using many TCP connections, parallelize() only gives an extra overhead. Likewise, you don’t need to use parallelize() if you have a single low-traffic connection, as a single thread can handle the messages without being a bottleneck in that case.

Read more at https://www.syslog-ng.com/community/b/blog/posts/accelerating-single-tcp-connections-in-syslog-ng-parallelize

syslog-ng logo

the avatar of openSUSE News

Try out the new CDN with openSUSE-repos

For a while Dirk Mueller was working in the background to get a sponsored CDN subscription. Thanks to his effort Fastly.com has agreed to sponsor the openSUSE project with bandwidth. We primarily intend to use it to improve the reachability (latency) of download.opensuse.org in various areas of the world, but of course can expand it to other usecases as well.

openSUSE-repos simplifies openSUSE repository management by utilizing Repository Index Service (RIS) for core distribution repositories and its latest update switches users to the new cdn.opensuse.org.

Change just landed in Tumbleweed, openSUSE Leap 15.5 users will receive it in the next few days via a maintenance update. The change will be available also as part of Leap Micro 5.5. Users who don’t want to wait can get it from Base:System/openSUSE-repos.

Installation of openSUSE-repos for your distribution

openSUSE-repos backs up and disables all default system repositories as long as they have original filenames. User-defined repositories will remain untouched.

Install the correct package for your distribution and you should be all set.

sudo zypper in openSUSE-repos-Leap

sudo zypper in openSUSE-repos-Tumbleweed

sudo zypper in openSUSE-repos-MicroOS

sudo zypper in openSUSE-repos-LeapMicro

About Repository Index Service

zypp supports RIS services which translate a (remote) repoindex.xml into (local) repository definitions. These definitions are identified by a prefix, in this particular case openSUSE: .

Example: /etc/zypp/repos.d/openSUSE:repo-oss.repo

Making a change like switching users to CDN takes a one-line change in the service template. Service template can reference zypp variables such as a new /etc/zypp/vars.d/DIST_ARCH.

# head /usr/share/zypp/local/service/openSUSE/repo/repoindex.xml
<repoindex ttl="0"
disturl="https://cdn.opensuse.org"
distsub="leap/"
distver="${releasever}"
debugenable="false"
sourceenable="false">

<repo url="%{disturl}/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>

Let’s have a look at our services

# zypper ls # list-services
# | Alias | Name | Enabled | GPG Check | Refresh | Type
--+----------------------------------------+----------------------+---------+-----------+---------+-------
1 | openSUSE | openSUSE | Yes | ---- | Yes | ris
2 | NVIDIA | NVIDIA | Yes | (r ) Yes | Yes | rpm-md
3 | google-chrome | google-chrome | Yes | (r ) Yes | Yes | rpm-md

You may optionally use zypper ref -s to explicitly refresh services. You can manually trigger refresh the service including its repos with zypper refs -r.

If you’d experiment with your own services, /var/log/zypper.log will help you troubleshoot most of the service-related issues. See doc-o-o for more information about zypper and RIS.

Rollback

Users can restore old repository files by following instructions in the project README file.

the avatar of openSUSE News

openSUSE Wishes You a Happy SysAdmin Day

System administrators (sysadmins) are the unsung heroes of technology, and the openSUSE Project is thankful for all the openSUSE heroes that help our project to function.

Sysadmins are responsible for maintaining the backbone of our technology. They work behind the scenes to maintain infrastructure, security, and overall functionality of computer systems.

SysAdmin Day is celebrated every year on the last Friday of July and is a special occasion that recognizes the crucial role they play in keeping our digital world operational.

Some of the responsibilities include tasks like Installing, configuring, and maintaining hardware and software. They ensure system security, troubleshoot and solve problems. These individuals continuously learn and adapt while building positive work environments. Some might answer the phone asking if you “have you tried turning it off or on”. :joy:

These projections’ efforts are essential to the smooth running of businesses and organizations of all sizes. Without sysadmins, the digital world would grind to a halt and so would several open source projects.

On this SysAdmin Day 2023, let us take a moment to thank these dedicated professionals; They deserve our appreciation.

Here are some ways to show your appreciation for your sysadmins on SysAdmin Day:

  • Send them a gift from shop.opensuse.org
  • Hand them a card or send email expressing your thanks
  • Take them lunch or dinner.
  • Buy them a beer

No matter what you choose, your sysadmins will be grateful for your kind gesture and show of appreciation.

Thank you sysadmins for keeping our digital world running smoothly.

Happy SysAdmin Day!

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

GUADEC

GUADEC 2023 is underway in Riga. It’s great to see people face to face after a long time. Kicked off the first day with an ADHD trip of a talk. Rather than putting links in my slides, where nobody has the chance of actually follow, I’ve assembled them here. Enjoy!

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

openSUSE Tumbleweed – Review of the week 2023/29

Dear Tumbleweed users and hackers,

This week is all in the spirit of some data center moves. OBS had been announced to have fewer worker powers and openQA is also in read-only mode, busy moving to a new home. This of course has some effect on the number of Tumbleweed snapshots: we won’t be publishing snapshots that cannot go through openQA. For this reason, we have only published 4 snapshots this week (0714, 0716, 0717, and 0718).

The most relevant changes contained in these snapshots are:

  • Mozilla Firefox 1150.2
  • audit 3.1.1
  • Linux kernel 6.4.3 (with full lockdown enabled)
  • Libvirt 9.5.0
  • Freetype2 2.13.1
  • krb5 1.21.1
  • Poppler 23.07.0

Staging projects started getting crowded – mostly due to openQA being down and no tests being executed at the moment. The list of staged changes includes:

  • systemd 253.7
  • Rust 1.71
  • Meson 1.2.0: enabled Python cache builds by default, resulting in a bunch of files section not matching anymore
  • Linux kernel 6.4.4
  • PHP 8.2.8
  • Samba 4.18.5
  • GCC 13.2
the avatar of openSUSE News

Tumbleweed Update Highlights Redis, HarfBuzz Changes

This week’s openSUSE Tumbleweed updates had changes for harfbuzz, xterm, Redis, Audacity and more

Snapshots have been rolling out consistently this week.

The 20230718 snapshot updated two packages. Changes in the pentobi 23.1 update include a fix for an issue related to overwriting game files on Android and the zlib-ng-compat 2.1.3 had improvements and implemented updates to make the library more robust and efficient. The data compression optimizer package also dropped a patch that was no longer needed with the upstream changes.

Among the packages to update in snapshot 20230717 was a new major version of ext shaping engine harfbuzz; the 8.0.1 version includes a number of new features like an experimental, WebAssembly (WASM) shaper, as well as a number of bug fixes. The shaper offers increased flexibility for shaping fonts by utilizing WebAssembly embedded within the font file, but the WASM shaper is disabled by default and needs to be enabled during the build process. There were also several optimizations with the package. Font render freetype2 2.13.1 had a number of new features and bug fixes. The most notable changes are the addition of a new function FT_Get_Default_Named_Instance , FT_GlyphSlot_AdjustWeight, which can be used to adjust the glyph weight either horizontally or vertically. The fuse3 3.15.1 includes a reduction in the default write size by half. An update of poppler 23.07.0 made improvements and addresses issues such as reading UTF8-with-BOM files, rendering malformed documents, and took care of crashes related to overprint preview and signature handling. An update of xterm 384 also corrected the rendering of double-width characters with bitmap fonts, and fixes problems related to Remote Graphic Instruction Set, including handling color initialization and whitespace for color values. Overall, the snapshot covered a common theme of improving and enhancing various packages related to font rendering, shaping, document handling, and terminal emulation. Several other packages updated in the snapshot including krb5 1.21.1 and rsyslog 8.2306.0.

Mozilla Firefox updated in snapshot 20230716. Version 115.0.2 had a number of bug fixes and a Common Vulnerabilities and Exposures fix. CVE-2023-3600 was a use-after-free vulnerability that could be exploitable through a crash. In the macvlan component of iproute2 6.4, a new parameter called bclim was added. The Linux Kernel updated to version 6.4.3 after a hold in openSUSE’s bugzilla with issue 1012628. Another package to update in the snapshot was libvirt 9.5.0. The new version includes important changes such as the ability to configure the discard-no-unref feature of the qcow2 driver in qemu, which is expected to reduce cluster fragmentation of the image. Other improvements were made in the handling of CPU compatibility and proper handling of memory slots for non-DIMM devices. Several other packages were updated in the snapshot.

Snapshot 20230714 updated redis to version 7.0.12, which took care of two CVEs. CVE-2022-24834 was related to Lua scripts that can be executed to perform various operations. The flaw would have allowed a specially crafted Lua script to trigger a heap overflow in the cjson library. The other, CVE-2023-36824, was related to extracting key names from a command and a list of arguments and, in certain cases, had an extraction process that could also trigger a heap overflow. An update of ibus-table 1.17.1 updated translations and function get_active_window_xprop() is expected to return an empty values as pointed out in a resolved Fedora issue. Added support for Python 3.12, and compatibility updates with the railroad-diagrams package was made in the python311-pyparsing 3.1.0 update.. Netfilter library libnftnl 1.2.6 introduced a new expression for routing tables and GTK4 map widget libshumate 1.0.4 had change to the download process during animations.

No packages received a new version is snapshot 20230713, but it had a small change with audacity that updated constraints for the RISC-V architecture. The glibc package also had a change to improve its functionality and reliability. Changes were also made so that the package is compatible with the latest GNU Compiler Collection 12 version, which were helpful for builds arriving later in the week. A change was made to the libguestfs package to resolve an issue with resolve an issue with finding the supermin tool.

the avatar of SUSE Community Blog

From openSUSE Leap to SUSE Linux Enterprise Server PAYG on Azure

Several years back, SUSE had provided the sources from SUSE Linux Enterprise for usage in openSUSE Leap to bring the experience and quality of openSUSE Leap and SUSE Linux Enterprise (SLE) to a new level. The contribution promoted openSUSE Leap as a development platform for communities and industry partners going forward, as the provided source […]

The post From openSUSE Leap to SUSE Linux Enterprise Server PAYG on Azure appeared first on SUSE Communities.