-
Notifications
You must be signed in to change notification settings - Fork 233
Building an RPM in an OBS branch package
Using the addition of a docker logout step after interacting with docker
registries. The only impact this has is on which package needs to be re-built with my changes.
Note: Requires uyuni-releng-tools.
- Change code and
git commit -
cd susemanager-utils/susemanager-sls(path can be read fromrel-eng/packages/susemanager-sls) osc branch systemsmanagement:Uyuni:Master susemanager-sls- (not needed when direnv is used)
export OSCAPI=https://api.opensuse.org TEST=1 OBS_PROJ=home:agraul:branches:systemsmanagement:Uyuni:Master -
build-packages-for-obs susemanager-sls(setNOCPIO=1to create tar archives instead of cpio archives ) push-packages-to-obs susemanager-sls
.envrc:
% cat >.envrc <<EOF
export OSCAPI=https://api.opensuse.org
export OBS_PROJ=home:agraul:branches:systemsmanagement:Uyuni:Master'
export TEST=1
export NOCPIO=1
EOF
% direnv allowUyuni Server packages are not directly installed on the Uyuni Server. Instead, they are included in the uyuni-server container. This container is built in OBS, the source package is called server-image. To try the branched RPM, the server-image needs to be rebuilt.
When OBS builds the server-image, it resolves the dependencies listed in the Dockerfile. OBS first tries to find the dependencies in the same project that server-image is built in and only if it can’t find them, it looks at the projects mentioned in the repository configuration.
To build server-image and include the branched susemanager-sls, all you have to do is to osc link systemsmanagement:Uyuni:Master server-image $OBS_PROJ.
By default, osc branch creates a project that does not publish the built artifacts (RPMs, container images etc.). Publishing can be enabled through the WebUI or by editing the project meta configuration.
- Visit https://build.opensuse.org/repositories/$OBS_PROJ with a web browser
- Toggle Publish Flag for containerfile repository
-
osc meta proj -e $OBS_PROJ(opens$EDITOR) - Change the XML Element
<publish>...</publish>. From<project name="home:agraul:branches:systemsmanagement:Uyuni:Master"> <title>Branch project for package susemanager-sls</title> <description>This project was created for package susemanager-sls via attribute OBS:Maintained</description> <person userid="agraul" role="maintainer"/> <publish> <disable/> </publish> </repository name="...""> [...] </project>
to
<project name="home:agraul:branches:systemsmanagement:Uyuni:Master"> <title>Branch project for package susemanager-sls</title> <description>This project was created for package susemanager-sls via attribute OBS:Maintained</description> <person userid="agraul" role="maintainer"/> <publish> <disable/> <enable repository="containerfile"/> </publish> </repository name="...""> [...] </project>
- Save the file and quit the editor.
oscwill upload the updated project meta configuration.
Find the image repository for your server-image in the container registry.
- Visit https://registry.opensuse.org/cgi-bin/cooverview
- Search for
project=^$OBS_PROJ(e.g.project=^home:agraul:branches:systemsmanagement:Uyuni:Master) - Click on the container image for the wanted architecture
- In the row for the
latesttag, click on “Copy to clipboard” ssh root@uyuni-server-vm.virtmgradm upgrade podman --pullPolicy=Always --image=<insert from clipboard, remove the leading podman pull>