Share with friends and colleagues on social media

Do you have to be an expert developer to contribute to an open source project?
Quick answer: no.

Actually it’s the opposite. When you join an open source project and its community you have the opportunity to level up from a beginner to a master of code.
Read French Version here.

The best way to start is without any doubt openSUSE Factory.

Every package available in openSUSE distribution goes through the Factory.
This continuous integration (CI) pipeline test all the code submited by the developpement teams on various virtual machines to build code on various environment.
From standard x86 to ARM Soc for IOT and Edge

You can see this pipeline in real time via our dashboard and see which packages have errors.

Take a look at iftop. A very nifty cli that shows the network traffic the same way top shows processes.
This package is at a failed state. But it works perfectly on previous version of openSUSE.
Why ? Let’s investigate!

The building errors are visible via the compilation logs through the web UI:
[ 84s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: iftop-tui.o (symbol from plugin): in function `tui_print': [ 84s] (.text+0x0): multiple definition of `service_hash'; iftop-iftop.o (symbol from plugin):(.text+0x0): first defined here

openSUSE is a project in perpetual motion and improvement. Each new release we push the optimisation and the security level further.
Here is an example of new GCC10 behaviour. Source code in C lang where global variable is not explicitly declare rise an error.
More info: https://www.gnu.org/software/gcc/gcc-10/porting_to.html

Let’s read the error log in simple english: the tui_print function from iftop-tui.o declare a variable named service_hash. But this variable already exist in iftop-iftop.o.
This is normal as it is actually the same variable.

With the new GCC10 rules this implicit declaration is forbidden.
We have to use the extern keyword at declaration time in order to tell GCC that this is not a memory issue or a vulnerability.

So I had to create a patch to declare all those variables as “extern”.

Create a patch with git: https://git-scm.com/docs/git-diff
Create change :   https://en.opensuse.org/openSUSE:Creating_a_changes_file_(RPM)#Patches_changes

Find the whole process and commands to create a branch – your own private environment hosted on openSUSE Open Build Service – and submit your patch to the community.

OpenSUSE Factory: How_to_contribute_to_Factory

Join us and Have a lot of fun…

Share with friends and colleagues on social media
(Visited 1 times, 1 visits today)
Tags: , , , , , ,
Category: Chameleon, DevOps, openSUSE, SUSE News, Technical Solutions
This entry was posted Wednesday, 15 July, 2020 at 5:02 pm
You can follow any responses to this entry via RSS.

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet