Cannot build use Leap 16 as base in OBS Dockerfile build #7

Closed
opened 2025-10-14 01:19:36 +02:00 by crameleon · 16 comments

Dockerfile in OBS with

FROM opensuse/leap:16.0

in project with

  <repository name="containers">
    <path project="openSUSE:Containers:Leap:16.0" repository="containers"/>
    <arch>x86_64</arch>
  </repository>

will give

buildinfo is broken... it says:
unresolvable: nothing provides dummy-release

my patch openSUSE/Leap#26 was supposed to solve it but it still does not work.

Dockerfile in OBS with ``` FROM opensuse/leap:16.0 ``` in project with ``` <repository name="containers"> <path project="openSUSE:Containers:Leap:16.0" repository="containers"/> <arch>x86_64</arch> </repository> ``` will give ``` buildinfo is broken... it says: unresolvable: nothing provides dummy-release ``` my patch https://src.opensuse.org/openSUSE/Leap/pulls/26 was supposed to solve it but it still does not work.
Author
@lkocman
Member

i think we broke Leap builds. check if it works again after openSUSE/Leap#31 is merged

i think we broke Leap builds. check if it works again after https://src.opensuse.org/openSUSE/Leap/pulls/31 is merged
Member

please check again now

please check again now
Author

still does not work, but is that change actually deployed? osc meta prjconf openSUSE:Leap:16.0 does not match https://src.opensuse.org/openSUSE/Leap/src/branch/leap-16.0/_config from what I can tell - or is it a different project?

still does not work, but is that change actually deployed? `osc meta prjconf openSUSE:Leap:16.0` does not match https://src.opensuse.org/openSUSE/Leap/src/branch/leap-16.0/_config from what I can tell - or is it a different project?
Member

looks in sync to me.

looks in sync to me.
Author

now it is for me as well (but I am rather sure it wasn't at the time I posted the comment ...), anyways - still getting the same error: buildinfo.txt.

now it is for me as well (but I am rather sure it wasn't at the time I posted the comment ...), anyways - still getting the same error: [buildinfo.txt](/attachments/dfe3f880-b020-40cd-a370-5fce10fe8fe3).

how if you add this line to your prjconf?

Substitute: system-packages:docker kmod kernel-default Leap-release docker createrepo_c container-build-checks-vendor-SUSE skopeo umoci

how if you add this line to your prjconf? `Substitute: system-packages:docker kmod kernel-default Leap-release docker createrepo_c container-build-checks-vendor-SUSE skopeo umoci`
Author

with that line I get

unresolvable: have choice for docker-buildx needed by docker: docker-buildx docker-stable-buildx

if I additionally add

Prefer: docker-buildx

it works.

I also tried Prefer: docker-stable-buildx because I don't know the difference, but that one caused

unresolvable: conflict for providers of docker-stable >= 19.03.0_ce needed by docker-stable-buildx
      (provider docker-stable is in conflict with docker)

so figured the first one is right.

with that line I get ``` unresolvable: have choice for docker-buildx needed by docker: docker-buildx docker-stable-buildx ``` if I additionally add ``` Prefer: docker-buildx ``` it works. I also tried `Prefer: docker-stable-buildx` because I don't know the difference, but that one caused ``` unresolvable: conflict for providers of docker-stable >= 19.03.0_ce needed by docker-stable-buildx (provider docker-stable is in conflict with docker) ``` so figured the first one is right.
Author

interestingly though albeit it now (with the project config additions above) doing something locally with osc build --no-verify containers it still shows as "excluded" on the server: https://build.opensuse.org/package/show/home:crameleon:test16/test16 (not sure if that is related - also tried to explicitly enable it in the package meta but it did not help).

interestingly though albeit it now (with the project config additions above) doing something locally with `osc build --no-verify containers` it still shows as "excluded" on the server: https://build.opensuse.org/package/show/home:crameleon:test16/test16 (not sure if that is related - also tried to explicitly enable it in the package meta but it did not help).

you need to define what type to build on "containers" repo, add a Type: docker to your project config

like this,

'''
%if "%_repository" == "containers"
Type: docker
%endif
'''

you need to define what type to build on "containers" repo, add a `Type: docker` to your project config like this, ''' %if "%_repository" == "containers" Type: docker %endif '''
Author

It was not needed with 15.6, where I was able to build against openSUSE:Templates:Images:15.6 which defined

%if "%_repository" == "images"
Type: kiwi
Repotype: none
Patterntype: none
%endif

%if "%_repository" == "containers"
Type: docker
Repotype: none
Patterntype: none
%endif

for me (assuming one uses the standard "containers" or "images" names).

It was not needed with 15.6, where I was able to build against openSUSE:Templates:Images:15.6 which defined ``` %if "%_repository" == "images" Type: kiwi Repotype: none Patterntype: none %endif %if "%_repository" == "containers" Type: docker Repotype: none Patterntype: none %endif ``` for me (assuming one uses the standard "containers" or "images" names).

you're build against openSUSE:Containers:Leap:16.0 now which doesn't have such configurations.

you're build against `openSUSE:Containers:Leap:16.0` now which doesn't have such configurations.
Author

I understand, I am asking if this is by design that we no longer provide such configuration out of the box?

I understand, I am asking if this is by design that we no longer provide such configuration out of the box?
Author

and another issue, package installation during the build

#!BuildTag: test:latest
FROM opensuse/leap:16.0

RUN zypper -n in vim

makes it try to connect with internet repositories - that naturally fails:

[   25s] #7 [3/5] RUN obs-docker-support --upload-packages --install
[   25s] #7 0.167 Retrieving repository 'obs_repository' metadata [.[200 /repodata/repomd.xml][404 /media.1/media][200 /repodata/repomd.xml][404 /repodata/repomd.xml.asc][200 /repodata/991939$
bc336a20315ac67053489564473604f779665d17add5ef6e4e31dfc04-primary.xml.zst][200 PUT:/basepackages]..done]
[   25s] #7 0.178 Building repository 'obs_repository' cache [....done]
[   25s] #7 0.185 All repositories have been refreshed.
[   25s] #7 0.250   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[   25s] #7 0.250                                  Dload  Upload   Total   Spent    Left  Speed
100 17585  100    11  100 17574  10989  16.7M --:--:-- --:--:-- --:--:-- 16.7M
[   25s] #7 DONE 0.3s
[   25s]
[   25s] #8 [4/5] RUN zypper in vim
[   25s] #8 0.127 Refreshing service 'openSUSE'.
[   25s] time="2025-10-14T20:29:21.864524979Z" level=error msg=/moby.buildkit.v1.Control/Solve error="rpc error: code = Unknown desc = process \"/bin/sh -c zypper in vim\" did not complete suc
cessfully: exit code: 4" spanID=55cdca56e8fb92ac traceID=f97be4b583ec228ee2e4ee04d4084641
[   25s] #8 0.140 Retrieving repository 'repo-openh264 (16.0)' metadata [.error]
[   25s] #8 0.145 Repository 'repo-openh264 (16.0)' is invalid.
[   25s] #8 0.145 [openSUSE:repo-openh264|http://codecs.opensuse.org/openh264/openSUSE_Leap_16] Failed to retrieve new repository metadata.
[   25s] #8 0.145 History:
[   25s] #8 0.145  - [|] Error trying to read from 'http://codecs.opensuse.org/openh264/openSUSE_Leap_16'
[   25s] #8 0.145  - Download (curl) error for 'http://codecs.opensuse.org/openh264/openSUSE_Leap_16/content':
[   25s] #8 0.145    Error code: Connection failed Curl error (6)
[   25s] #8 0.145    Error message: Could not resolve host: codecs.opensuse.org
[   25s] #8 0.145 Please check if the URIs defined for this repository are pointing to a valid repository.
[   25s] #8 0.145 Warning: Skipping repository 'repo-openh264 (16.0)' because of the above error.
[   25s] #8 0.148 Retrieving repository 'repo-oss (16.0)' metadata [.error]
[   25s] #8 0.152 Repository 'repo-oss (16.0)' is invalid.
[   25s] #8 0.152 [openSUSE:repo-oss|http://cdn.opensuse.org/distribution/leap/16.0/repo/oss/x86_64] Failed to retrieve new repository metadata.
[   25s] #8 0.152 History:
[   25s] #8 0.152  - [|] Error trying to read from 'http://cdn.opensuse.org/distribution/leap/16.0/repo/oss/x86_64'
[   25s] #8 0.152  - Download (curl) error for 'http://cdn.opensuse.org/distribution/leap/16.0/repo/oss/x86_64/content':
[   25s] #8 0.152    Error code: Connection failed Curl error (6)
[   25s] #8 0.152    Error message: Could not resolve host: cdn.opensuse.org
[   25s] #8 0.152 Please check if the URIs defined for this repository are pointing to a valid repository.
[   25s] #8 0.153 Warning: Skipping repository 'repo-oss (16.0)' because of the above error.
[   25s] #8 0.153 Some of the repositories have not been refreshed because of an error.
...
[   27s] #8 ERROR: process "/bin/sh -c zypper -n in vim" did not complete successfully: exit code: 106
and another issue, package installation during the build ``` #!BuildTag: test:latest FROM opensuse/leap:16.0 RUN zypper -n in vim ``` makes it try to connect with internet repositories - that naturally fails: ``` [ 25s] #7 [3/5] RUN obs-docker-support --upload-packages --install [ 25s] #7 0.167 Retrieving repository 'obs_repository' metadata [.[200 /repodata/repomd.xml][404 /media.1/media][200 /repodata/repomd.xml][404 /repodata/repomd.xml.asc][200 /repodata/991939$ bc336a20315ac67053489564473604f779665d17add5ef6e4e31dfc04-primary.xml.zst][200 PUT:/basepackages]..done] [ 25s] #7 0.178 Building repository 'obs_repository' cache [....done] [ 25s] #7 0.185 All repositories have been refreshed. [ 25s] #7 0.250 % Total % Received % Xferd Average Speed Time Time Time Current [ 25s] #7 0.250 Dload Upload Total Spent Left Speed 100 17585 100 11 100 17574 10989 16.7M --:--:-- --:--:-- --:--:-- 16.7M [ 25s] #7 DONE 0.3s [ 25s] [ 25s] #8 [4/5] RUN zypper in vim [ 25s] #8 0.127 Refreshing service 'openSUSE'. [ 25s] time="2025-10-14T20:29:21.864524979Z" level=error msg=/moby.buildkit.v1.Control/Solve error="rpc error: code = Unknown desc = process \"/bin/sh -c zypper in vim\" did not complete suc cessfully: exit code: 4" spanID=55cdca56e8fb92ac traceID=f97be4b583ec228ee2e4ee04d4084641 [ 25s] #8 0.140 Retrieving repository 'repo-openh264 (16.0)' metadata [.error] [ 25s] #8 0.145 Repository 'repo-openh264 (16.0)' is invalid. [ 25s] #8 0.145 [openSUSE:repo-openh264|http://codecs.opensuse.org/openh264/openSUSE_Leap_16] Failed to retrieve new repository metadata. [ 25s] #8 0.145 History: [ 25s] #8 0.145 - [|] Error trying to read from 'http://codecs.opensuse.org/openh264/openSUSE_Leap_16' [ 25s] #8 0.145 - Download (curl) error for 'http://codecs.opensuse.org/openh264/openSUSE_Leap_16/content': [ 25s] #8 0.145 Error code: Connection failed Curl error (6) [ 25s] #8 0.145 Error message: Could not resolve host: codecs.opensuse.org [ 25s] #8 0.145 Please check if the URIs defined for this repository are pointing to a valid repository. [ 25s] #8 0.145 Warning: Skipping repository 'repo-openh264 (16.0)' because of the above error. [ 25s] #8 0.148 Retrieving repository 'repo-oss (16.0)' metadata [.error] [ 25s] #8 0.152 Repository 'repo-oss (16.0)' is invalid. [ 25s] #8 0.152 [openSUSE:repo-oss|http://cdn.opensuse.org/distribution/leap/16.0/repo/oss/x86_64] Failed to retrieve new repository metadata. [ 25s] #8 0.152 History: [ 25s] #8 0.152 - [|] Error trying to read from 'http://cdn.opensuse.org/distribution/leap/16.0/repo/oss/x86_64' [ 25s] #8 0.152 - Download (curl) error for 'http://cdn.opensuse.org/distribution/leap/16.0/repo/oss/x86_64/content': [ 25s] #8 0.152 Error code: Connection failed Curl error (6) [ 25s] #8 0.152 Error message: Could not resolve host: cdn.opensuse.org [ 25s] #8 0.152 Please check if the URIs defined for this repository are pointing to a valid repository. [ 25s] #8 0.153 Warning: Skipping repository 'repo-oss (16.0)' because of the above error. [ 25s] #8 0.153 Some of the repositories have not been refreshed because of an error. ... [ 27s] #8 ERROR: process "/bin/sh -c zypper -n in vim" did not complete successfully: exit code: 106 ````
Author

I found that last one is related to obs-docker-support, I reported it at https://github.com/openSUSE/obs-build/issues/1107.

I found that last one is related to obs-docker-support, I reported it at https://github.com/openSUSE/obs-build/issues/1107.
Member

dummy-release problem has been fixed via openSUSE/Leap#32

dummy-release problem has been fixed via https://src.opensuse.org/openSUSE/Leap/pulls/32
Sign in to join this conversation.