OpenSUSE OBS - hpaluch/hpaluch.github.io GitHub Wiki
OpenSUSE Open Build Service
Trying to configure Open Build Service for LEAP 16.0
OS: LEAP 16.0
Using guide: https://en.opensuse.org/openSUSE:Git_Packaging_Workflow
Run these commands as root:
zypper ar -f obs://openSUSE:Tools tools
zypper ref
(produces error):
Repository 'tools' is invalid.
[tools|https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Leap_16.0] Failed to retrieve new repository
metadata.
History:
- [tools|https://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Leap_16.0] Repository type can't be determ
ined.
Hotfix (run as root):
sed -i.rpmsave -e 's@/openSUSE_Leap_@/@' /etc/zypp/repos.d/tools.repo
Reported here: https://forums.opensuse.org/t/obs-opensuse-tools-produces-incorrect-repository-url/193027
And then:
zypper ref
zypper in osc build
zypper info osc | grep Repository
(must return `tools` as shown below):
Repository : tools
Continue with guide on https://en.opensuse.org/openSUSE:Git_Packaging_Workflow
Run as root:
zypper in -y git-lfs gitea-tea gitea-tea-bash-completion
Now we can continue with: https://en.opensuse.org/openSUSE:Git_Packaging_Workflow#Setting_up_your_account_at_src.opensuse.org
Created token git-obs with RW for issue, repository and user
Then issued (as normal user - that will develop packages):
$ git-obs login add opensuse --url https://src.opensuse.org
--user YOUR_SUSE_LOGIN --set-as-default \
--token XXXXXXX
Adding a Gitea credentials entry with name 'opensuse' ...
* Config path: /home/ansible/.config/tea/config.yml
Added entry:
Name : opensuse
Default : true
URL : https://src.opensuse.org
User : YOUR_SUSE_LOGIN
Next ssh key stuff:
$ ssh-keygen -t ed25519 -C "your_suse_email"
$ cat ~/.ssh/id_ed25519.pub
Add above ssh public key to https://src.opensuse.org/user/settings/keys
I'm not maintainer so I should continue on: https://en.opensuse.org/openSUSE:Git_Packaging_Workflow#Contributing_to_a_package_as_a_non-maintainer
Or AGit workflow.
Trying:
cd ~/pool
git clone https://src.opensuse.org/pool/libmtp.git
cd libmtp
How to find version used in leap:
- on your LEAP16.0 try:
$ rpm -qi libmtp-udev | grep VCS VCS : https://src.suse.de/pool/libmtp#cb5edbfd1054e15489d294294a0e463f40b3551d8a78f2f4ce312cfe07527373 - back in repo we can find:
cd ~/pool/libmtp # git allows to specify just unique commit prefix: git show cb5edbfd1054e154
commit cb5edbfd1054e15489d294294a0e463f40b3551d8a78f2f4ce312cfe07527373 (HEAD -> slfo-1.2, origin/slfo-1.2) Merge: e7a0b05 d70f608 Author: Ana Guerrero [email protected] Date: Thu Nov 21 14:13:11 2024 +0000
Accepting request 1225300 from devel:libraries:c_c++
- updated to 1.1.21 release
- bugfixes
- lots of new ids (forwarded request 1225299 from msmeissn)
OBS-URL: https://build.opensuse.org/request/show/1225300
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libmtp?expand=0&rev=85
...
- so now we now that proper branch for LEAP 16.0 is `slfo-1.2`:
```shell
git checkout slfo-1.2
git log --oneline
cb5edbf (HEAD -> slfo-1.2, origin/slfo-1.2) Accepting request 1225300 from devel:libraries:c_c++
- also we see link of interest on OBS: https://build.opensuse.org/package/show/openSUSE:Factory/libmtp?expand=0&rev=85
cd ~/pool/libmtp
###git-obs meta set --project=openSUSE:Factory
git-obs meta set --project=SUSE:SLFO:1.2
osc build
# will require your REAL login and password to https://build.opensuse.org/
# Gitea token will NOT work
...
osc build
# ...
# result is in my case in: /var/tmp/build-root/standard-x86_64/home/abuild/rpmbuild/RPMS/x86_64/
WARNING! It is not perfect
- local build:
libmtp-udev-1.1.22-0.x86_64.rpm - real rpm fro LEAP 16.0
libmtp-udev-1.1.22-160000.2.2.x86_64 - and here is 3rd variant: https://build.opensuse.org/projects/devel:libraries:c_c++/packages/libmtp/repositories/16.0/binaries
contains:
libmtp-udev-1.1.23-lp160.127.3.x86_64.rpm(incorrect version AND incorrect release) So there are missing some metadata...
LEAP 16 notes
LEAP 16 consists of at least 2 repos:
- https://src.opensuse.org/openSUSE/Leap branch
leap-16.0(packages specific to LEAP 16.x) OBS URL: https://build.opensuse.org/project/show/openSUSE:Leap:16.0 - https://src.opensuse.org/products/SLFO branch `` (packages shared with SLE 16), OBS URL: https://build.opensuse.org/project/show/SUSE:SLFO:1.2
Warning: there are many overrides on: https://build.opensuse.org/projects/SUSE:SLFO:1.2/prjconf for example:
...
# 15.5 does not exist !
%define suse_version 1600
%define workbench_version 0100
%define skelcd_compat 0
%define _without_aom 1
%define _without_avif 1
...
My own commands:
mkdir ~/projects
cd ~/projects
# all packages(???)
git clone -b leap-16.0 https://src.opensuse.org/products/PackageHub.git
# first "LEAP exclusive packages"
git clone -b leap-16.0 https://src.opensuse.org/openSUSE/Leap.git
# packages shared with SLE:
git clone -b slfo-1.2 https://src.opensuse.org/products/SLFO.git
# for each project do:
git submodule update --init
But still not seeing "umbrella" project...
- found on https://download.opensuse.org/distribution/leap/16.0/repo/oss/repodata/repomd.xml
obsproduct://build.opensuse.org/openSUSE:Leap:16.0:Products/Leap/16.0 cpe:/o:openSUSE:Leap:16.0
Finally got it (not sure, why it is hidden):
$ osc ls openSUSE:Leap:16.0:Products
000package-groups
000productcompose
000productcompose:leap_oss # <-- YEAH!, but "leap_oss" is FLAVOR (not PROJECT!)
000productcompose:leap_non_oss # <-- YEAH!, but "leap_non_oss" is FLAVOR (not PROJECT!)
000productcompose.dvd
000productcompose.dvd:leap_dvd5_aarch64
000productcompose.dvd:leap_dvd5_ppc64le
000productcompose.dvd:leap_dvd5_s390x
000productcompose.dvd:leap_dvd5_x86_64
000productcompose.dvd:leap_mini_aarch64
000productcompose.dvd:leap_mini_ppc64le
000productcompose.dvd:leap_mini_s390x
000productcompose.dvd:leap_mini_x86_64
000release-packages
000release-packages:Leap-Addon-NonOss-release
000release-packages:Leap-release
000update-repos
agama-installer-Leap
agama-installer-Leap:Leap_16.0
agama-installer-Leap:Leap_16.0_PXE
gdm
And finally checkout files:
mkdir ~/my-osc
cd ~/my-osc
osc co openSUSE:Leap:16.0:Products
Also available on:
- https://build.opensuse.org/project/show/openSUSE:Leap:16.0:Products
- https://build.opensuse.org/projects/openSUSE:Leap:16.0:Products/packages/000productcompose/files/default.productcompose?expand=1
Trying:
# really needed?
sudo zypper in skelcd-openSUSE skelcd-agama-installer-Leap_16.0
Then:
cd ~/my-osc/openSUSE:Leap:16.0:Products/000productcompose
osc build -M leap_oss product local
# always trust everything :-)
Example builds on OBS (not by me!):
- for oss: https://build.opensuse.org/package/live_build_log/openSUSE:Leap:16.0:Products/000productcompose:leap_oss/product/local
Using BUILD_ROOT=/var/cache/obs/worker/root_5/.mount Using BUILD_ARCH=local Doing kvm build in /var/cache/obs/worker/root_5/root i04-ch3c started "build default.productcompose" at Tue Apr 7 16:21:23 UTC 2026. Building 000productcompose:leap_oss for project 'openSUSE:Leap:16.0:Products' repository 'product' arch 'local' srcmd5 'f98db27c307e1d8ac1a1205afaf7176c' processing recipe /var/cache/obs/worker/root_5/.build-srcdir/default.productcompose ... running changelog2spec --target rpm --file /var/cache/obs/worker/root_5/.build-srcdir/default.productcompose init_buildsystem --configdir /var/run/obs/worker/5/build/configs --cachedir /var/cache/build --prepare --buildflavor leap_oss --clean --rpmlist /var/cache/obs/worker/root_5/.build.rpmlist /var/cache/obs/worker/root_5/.build-srcdir/default.productcompose build ... - on https://build.opensuse.org/public/build/openSUSE:Leap:16.0:Products/product/local/000productcompose:leap_non_oss/_log
Building 000productcompose:leap_non_oss for project 'openSUSE:Leap:16.0:Products' repository 'product' arch 'local' srcmd5 'f98db27c307e1d8ac1a1205afaf7176c' processing recipe /var/cache/obs/worker/root_1/.build-srcdir/default.productcompose ... running changelog2spec --target rpm --file /var/cache/obs/worker/root_1/.build-srcdir/default.productcompose init_buildsystem --configdir /var/run/obs/worker/1/build/configs --cachedir /var/cache/build --prepare --buildflavor leap_non_oss --clean --rpmlist /var/cache/obs/worker/root_1/.build.rpmlist /var/cache/obs/worker/root_1/.build-srcdir/default.productcompose build ...
/usr/bin/product-composer build --release 173.54 --flavor leap_non_oss --disturl obs://build.opensuse.org/openSUSE:Leap:16.0:Products/product/f98db27c307e1d8ac1a1205afaf7176c-000productcompose:leap_non_oss -v --clean /usr/src/packages/SOURCES/default.productcompose /usr/src/packages/PRODUCT