diff mbox series

[2/2] automation: fix dependencies on openSUSE Tumbleweed containers

Message ID 162133945335.25010.4601866854997664898.stgit@Wayrath (mailing list archive)
State Superseded
Headers show
Series automation: fix building in the openSUSE Tumbleweed | expand

Commit Message

Dario Faggioli May 18, 2021, 12:04 p.m. UTC
From: Dario Faggioli <dario@Solace.fritz.box>

Fix the build inside our openSUSE Tumbleweed container by using
the proper python development packages (and adding zstd headers).

Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
Cc: Doug Goldstein <cardoe@cardoe.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
 .../build/suse/opensuse-tumbleweed.dockerfile      |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Roger Pau Monné May 18, 2021, 1:20 p.m. UTC | #1
On Tue, May 18, 2021 at 02:04:13PM +0200, Dario Faggioli wrote:
> From: Dario Faggioli <dario@Solace.fritz.box>
> 
> Fix the build inside our openSUSE Tumbleweed container by using
> the proper python development packages (and adding zstd headers).
> 
> Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
> ---
> Cc: Doug Goldstein <cardoe@cardoe.com>
> Cc: Roger Pau Monne <roger.pau@citrix.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
>  .../build/suse/opensuse-tumbleweed.dockerfile      |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile b/automation/build/suse/opensuse-tumbleweed.dockerfile
> index 8ff7b9b5ce..5b99cb8a53 100644
> --- a/automation/build/suse/opensuse-tumbleweed.dockerfile
> +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile
> @@ -45,6 +45,7 @@ RUN zypper install -y --no-recommends \
>          libtasn1-devel \
>          libuuid-devel \
>          libyajl-devel \
> +        libzstd-devel \
>          lzo-devel \
>          make \
>          nasm \
> @@ -56,10 +57,8 @@ RUN zypper install -y --no-recommends \
>          pandoc \
>          patch \
>          pkg-config \
> -        python \
>          python-devel \
> -        python3 \
> -        python3-devel \
> +        python38-devel \

When I tested python3-devel was translated into python38-devel, which
I think is better as we don't need to modify the docker file for every
new Python version?

Thanks, Roger.
Dario Faggioli May 18, 2021, 2:33 p.m. UTC | #2
On Tue, 2021-05-18 at 15:20 +0200, Roger Pau Monné wrote:
> On Tue, May 18, 2021 at 02:04:13PM +0200, Dario Faggioli wrote:
> > From: Dario Faggioli <dario@Solace.fritz.box>
> > 
Mmm... this email address does not really exist, and it's a mistake
that it ended up here. :-/

> > Fix the build inside our openSUSE Tumbleweed container by using
> > the proper python development packages (and adding zstd headers).
> > 
> > Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
> > ---
> > Cc: Doug Goldstein <cardoe@cardoe.com>
> > Cc: Roger Pau Monne <roger.pau@citrix.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > ---
> >  .../build/suse/opensuse-tumbleweed.dockerfile      |    5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile
> > b/automation/build/suse/opensuse-tumbleweed.dockerfile
> > index 8ff7b9b5ce..5b99cb8a53 100644
> > --- a/automation/build/suse/opensuse-tumbleweed.dockerfile
> > +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile
> > 
> > @@ -56,10 +57,8 @@ RUN zypper install -y --no-recommends \
> >          pandoc \
> >          patch \
> >          pkg-config \
> > -        python \
> >          python-devel \
> > -        python3 \
> > -        python3-devel \
> > +        python38-devel \
> 
> When I tested python3-devel was translated into python38-devel, 
>
Oh, really? And when was it that you tested it, if I can ask?

> which
> I think is better as we don't need to modify the docker file for
> every
> new Python version?
> 
That would definitely be better. Right now, I don't see any
python3-devel package. If python3-devel can still be used (and it
somehow translates to the proper -devel package), then sure we should
use it. I'm not sure how that would happen, but maybe it's just me
being unaware of some packaging magic.

Let me put "python3-devel" there and test locally again, so we know if
it actually works.

Thanks and Regards
Roger Pau Monné May 18, 2021, 3:09 p.m. UTC | #3
On Tue, May 18, 2021 at 04:33:43PM +0200, Dario Faggioli wrote:
> On Tue, 2021-05-18 at 15:20 +0200, Roger Pau Monné wrote:
> > On Tue, May 18, 2021 at 02:04:13PM +0200, Dario Faggioli wrote:
> > > From: Dario Faggioli <dario@Solace.fritz.box>
> > > 
> Mmm... this email address does not really exist, and it's a mistake
> that it ended up here. :-/
> 
> > > Fix the build inside our openSUSE Tumbleweed container by using
> > > the proper python development packages (and adding zstd headers).
> > > 
> > > Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
> > > ---
> > > Cc: Doug Goldstein <cardoe@cardoe.com>
> > > Cc: Roger Pau Monne <roger.pau@citrix.com>
> > > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > > ---
> > >  .../build/suse/opensuse-tumbleweed.dockerfile      |    5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > b/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > index 8ff7b9b5ce..5b99cb8a53 100644
> > > --- a/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > 
> > > @@ -56,10 +57,8 @@ RUN zypper install -y --no-recommends \
> > >          pandoc \
> > >          patch \
> > >          pkg-config \
> > > -        python \
> > >          python-devel \
> > > -        python3 \
> > > -        python3-devel \
> > > +        python38-devel \
> > 
> > When I tested python3-devel was translated into python38-devel, 
> >
> Oh, really? And when was it that you tested it, if I can ask?

I've tried just now with the current docker file, and this is the
(trimmed) output:

Step 7/7 : RUN zypper install -y --no-recommends         acpica         bc         bin86         bison         bzip2         checkpolicy         clang         cmake         dev86         discount         flex         gcc         gcc-c++         gettext-tools         git         glib2-devel         glibc-devel         glibc-devel-32bit         gzip         hostname         libSDL2-devel         libaio-devel         libbz2-devel         libext2fs-devel         libgnutls-devel         libjpeg62-devel         libnl3-devel         libnuma-devel         libpixman-1-0-devel         libpng16-devel         libssh2-devel         libtasn1-devel         libuuid-devel         libyajl-devel         lzo-devel         make         nasm         ncurses-devel         ocaml         ocaml-findlib-devel         ocaml-ocamlbuild         ocaml-ocamldoc         pandoc         patch         pkg-config         python         python-devel         python3         python3-devel         systemd-devel         tar         transfig         valgrind-devel         wget         which         xz-devel         zlib-devel         &&         zypper clean -a
 ---> Running in af6a184e482b
Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata [..done]
Building repository 'openSUSE-Tumbleweed-Non-Oss' cache [....done]
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata [.......done]
Building repository 'openSUSE-Tumbleweed-Oss' cache [....done]
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata [.done]
Building repository 'openSUSE-Tumbleweed-Update' cache [....done]
Loading repository data...
Reading installed packages...
'python3' not found in package names. Trying capabilities.
'python3-devel' not found in package names. Trying capabilities.

There's this message here ...

'pkg-config' not found in package names. Trying capabilities.
Resolving package dependencies...

The following 509 NEW packages are going to be installed:
[...] python38 python38-base python38-devel [...]

... but it seems python3-devel gets translated into python38-devel, or
maybe something else selects python38-devel?

Not familiar with the system, so maybe it's indeed a dependency of
some other package.

> > which
> > I think is better as we don't need to modify the docker file for
> > every
> > new Python version?
> > 
> That would definitely be better. Right now, I don't see any
> python3-devel package. If python3-devel can still be used (and it
> somehow translates to the proper -devel package), then sure we should
> use it. I'm not sure how that would happen, but maybe it's just me
> being unaware of some packaging magic.
> 
> Let me put "python3-devel" there and test locally again, so we know if
> it actually works.

It does seem to be picked up, whether that's because python3-devel
gets translated into python38-devel, or something else pulls it in
I don't certainly know.

Thanks, Roger.
Dario Faggioli May 18, 2021, 3:30 p.m. UTC | #4
On Tue, 2021-05-18 at 16:33 +0200, Dario Faggioli wrote:
> On Tue, 2021-05-18 at 15:20 +0200, Roger Pau Monné wrote:
> > On Tue, May 18, 2021 at 02:04:13PM +0200, Dario Faggioli wrote:
> > > From: Dario Faggioli <dario@Solace.fritz.box>
> > > 
> Mmm... this email address does not really exist, and it's a mistake
> that it ended up here. :-/
> 
> > > Fix the build inside our openSUSE Tumbleweed container by using
> > > the proper python development packages (and adding zstd headers).
> > > 
> > > Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
> > > ---
> > > Cc: Doug Goldstein <cardoe@cardoe.com>
> > > Cc: Roger Pau Monne <roger.pau@citrix.com>
> > > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > > ---
> > >  .../build/suse/opensuse-tumbleweed.dockerfile      |    5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > b/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > index 8ff7b9b5ce..5b99cb8a53 100644
> > > --- a/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile
> > > 
> > > @@ -56,10 +57,8 @@ RUN zypper install -y --no-recommends \
> > >          pandoc \
> > >          patch \
> > >          pkg-config \
> > > -        python \
> > >          python-devel \
> > > -        python3 \
> > > -        python3-devel \
> > > +        python38-devel \
> > 
> > When I tested python3-devel was translated into python38-devel, 
> > 
> Oh, really? And when was it that you tested it, if I can ask?
> 
> > which
> > I think is better as we don't need to modify the docker file for
> > every
> > new Python version?
> > 
> That would definitely be better. Right now, I don't see any
> python3-devel package. If python3-devel can still be used (and it
> somehow translates to the proper -devel package), then sure we should
> use it. I'm not sure how that would happen, but maybe it's just me
> being unaware of some packaging magic.
> 
> Let me put "python3-devel" there and test locally again, so we know
> if
> it actually works.
> 
Ok, indeed it works. And, on a second though, it's not obscure at all
that it does.

It's just that python38-devel _provides_ python3-devel, which makes a
lot of sense, and it was silly of me to not think it does that and use
just python3-devel in the first place:

dario@4b10a592ca98:~> zypper if --provides python38-devel
Information for package python38-devel:                                                                                                                                                                                                       
---------------------------------------                                                                                                                                                                                                       
Repository     : @System                                                                                                                                                                                                                      
Name           : python38-devel                                                                                                                                                                                                               
Version        : 3.8.10-1.2
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 882.7 KiB
Installed      : Yes
Status         : up-to-date
Source package : python38-core-3.8.10-1.2.src
Summary        : Include Files and Libraries Mandatory for Building Python Modules
[...]
Provides       : [8]
    libpython3.so()(64bit)
    pkgconfig(python-3.8) = 3.8
    pkgconfig(python-3.8-embed) = 3.8
    pkgconfig(python3) = 3.8
    pkgconfig(python3-embed) = 3.8
    python3-devel = 3.8.10
    python38-devel = 3.8.10-1.2
    python38-devel(x86-64) = 3.8.10-1.2

What now puzzles me a little, though, is why the build was failing, as
python3-devel was already there in the docker file. Maybe we "just"
forgot to push the image?

Well, there's a different issue (missing libzstd-devel), so I'll send a
v2 of this series anyway.

Regards
diff mbox series

Patch

diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile b/automation/build/suse/opensuse-tumbleweed.dockerfile
index 8ff7b9b5ce..5b99cb8a53 100644
--- a/automation/build/suse/opensuse-tumbleweed.dockerfile
+++ b/automation/build/suse/opensuse-tumbleweed.dockerfile
@@ -45,6 +45,7 @@  RUN zypper install -y --no-recommends \
         libtasn1-devel \
         libuuid-devel \
         libyajl-devel \
+        libzstd-devel \
         lzo-devel \
         make \
         nasm \
@@ -56,10 +57,8 @@  RUN zypper install -y --no-recommends \
         pandoc \
         patch \
         pkg-config \
-        python \
         python-devel \
-        python3 \
-        python3-devel \
+        python38-devel \
         systemd-devel \
         tar \
         transfig \