[libvirt] [jenkins-ci PATCH] guests: Install EPEL on CentOS 7 container

Fabiano Fidêncio posted 1 patch 4 years, 6 months ago
Failed in applying to current master (apply log)
guests/lcitool | 8 ++++++++
1 file changed, 8 insertions(+)
[libvirt] [jenkins-ci PATCH] guests: Install EPEL on CentOS 7 container
Posted by Fabiano Fidêncio 4 years, 6 months ago
Since commit d63d6a59cc we're installing EPEL on CentOS7 in order to
have both "ninja" and "python36-*" packages in the system.

However, we've forgot to add the very code to the lcitool so the
containers would also have EPEL release installed.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
---
 guests/lcitool | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/guests/lcitool b/guests/lcitool
index a3ef137..0d11d37 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -714,6 +714,14 @@ class Application:
                         {package_manager} autoremove -y && \\
                         {package_manager} clean all -y
                 """).format(**varmap))
+            else if os_name == "CentOS" and os_version == "7":
+                sys.stdout.write(textwrap.dedent("""
+                    RUN {package_manager} update -y && \\
+                        {package_manager} install -y epel-release && \\
+                        {package_manager} install -y {pkgs} && \\
+                        {package_manager} autoremove -y && \\
+                        {package_manager} clean all -y
+                """).format(**varmap))
             else:
                 sys.stdout.write(textwrap.dedent("""
                     RUN {package_manager} update -y && \\
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH] guests: Install EPEL on CentOS 7 container
Posted by Andrea Bolognani 4 years, 6 months ago
On Wed, 2019-10-09 at 17:52 +0200, Fabiano Fidêncio wrote:
> +++ b/guests/lcitool
> @@ -714,6 +714,14 @@ class Application:
>                          {package_manager} autoremove -y && \\
>                          {package_manager} clean all -y
>                  """).format(**varmap))
> +            else if os_name == "CentOS" and os_version == "7":
> +                sys.stdout.write(textwrap.dedent("""
> +                    RUN {package_manager} update -y && \\
> +                        {package_manager} install -y epel-release && \\
> +                        {package_manager} install -y {pkgs} && \\
> +                        {package_manager} autoremove -y && \\
> +                        {package_manager} clean all -y
> +                """).format(**varmap))

Unfortunately this is as gross as it is necessary :(

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH] guests: Install EPEL on CentOS 7 container
Posted by Daniel P. Berrangé 4 years, 6 months ago
On Wed, Oct 09, 2019 at 05:52:27PM +0200, Fabiano Fidêncio wrote:
> Since commit d63d6a59cc we're installing EPEL on CentOS7 in order to
> have both "ninja" and "python36-*" packages in the system.
> 
> However, we've forgot to add the very code to the lcitool so the
> containers would also have EPEL release installed.
> 
> Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
> ---
>  guests/lcitool | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/guests/lcitool b/guests/lcitool
> index a3ef137..0d11d37 100755
> --- a/guests/lcitool
> +++ b/guests/lcitool
> @@ -714,6 +714,14 @@ class Application:
>                          {package_manager} autoremove -y && \\
>                          {package_manager} clean all -y
>                  """).format(**varmap))
> +            else if os_name == "CentOS" and os_version == "7":
> +                sys.stdout.write(textwrap.dedent("""
> +                    RUN {package_manager} update -y && \\
> +                        {package_manager} install -y epel-release && \\

How does this actually work ?

Isn't there a chicken & egg problem here. The 'epel-release'  RPM is
in the EPEL repos, so you have to already have EPEL enabled in order
to enable EPEL surely....


> +                        {package_manager} install -y {pkgs} && \\
> +                        {package_manager} autoremove -y && \\
> +                        {package_manager} clean all -y
> +                """).format(**varmap))
>              else:
>                  sys.stdout.write(textwrap.dedent("""
>                      RUN {package_manager} update -y && \\
> -- 
> 2.23.0
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH] guests: Install EPEL on CentOS 7 container
Posted by Fabiano Fidêncio 4 years, 6 months ago
On Wed, Oct 9, 2019 at 6:03 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Wed, Oct 09, 2019 at 05:52:27PM +0200, Fabiano Fidêncio wrote:
> > Since commit d63d6a59cc we're installing EPEL on CentOS7 in order to
> > have both "ninja" and "python36-*" packages in the system.
> >
> > However, we've forgot to add the very code to the lcitool so the
> > containers would also have EPEL release installed.
> >
> > Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
> > ---
> >  guests/lcitool | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/guests/lcitool b/guests/lcitool
> > index a3ef137..0d11d37 100755
> > --- a/guests/lcitool
> > +++ b/guests/lcitool
> > @@ -714,6 +714,14 @@ class Application:
> >                          {package_manager} autoremove -y && \\
> >                          {package_manager} clean all -y
> >                  """).format(**varmap))
> > +            else if os_name == "CentOS" and os_version == "7":
> > +                sys.stdout.write(textwrap.dedent("""
> > +                    RUN {package_manager} update -y && \\
> > +                        {package_manager} install -y epel-release && \\
>
> How does this actually work ?
>
> Isn't there a chicken & egg problem here. The 'epel-release'  RPM is
> in the EPEL repos, so you have to already have EPEL enabled in order
> to enable EPEL surely....

epel-release is part of "extras" repository*, which is enabled by default.

*: http://mirror.centos.org/centos/7/extras/x86_64/Packages/

[snip]

Best Regards,
-- 
Fabiano Fidêncio

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list