RHEL Yum repo instructions don't work on RHEL 7

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RHEL Yum repo instructions don't work on RHEL 7

J. Lewis Muir
Hello!

I'd like to report a problem with the RHEL/CentOS instructions at

  https://nginx.org/en/linux_packages.html#RHEL-CentOS

They don't work on RHEL 7.  When I attempt to install the nginx package
as root with

  yum install nginx

I get an HTTP 404 error:

  http://nginx.org/packages/centos/7Workstation/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

The problem seems to be the use of the $releasever Yum variable in the
baseurl key of the nginx.repo spec:

  baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

On my RHEL 7 machine, that variable is evaluating to

  7Workstation

Looking at

  http://nginx.org/packages/centos/

the nginx repo is expecting $releasever to evaluate to just the release
number without the variant/edition text.  So, if in nginx.repo I change

  baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

to

  baseurl=http://nginx.org/packages/centos/7/$basearch/

it works.

There's more info at

  https://access.redhat.com/solutions/1256473

I have a default

  /etc/yum.conf

and it does not have a line that sets the distroverpkg key.

I think something in the documentation or the nginx repo needs to be
changed.

One fix would be to list the release version number explicitly in the
baseurl key value like I did above.  And just say in the documentation
that you have to set the number to the version that matches your
installed version of RHEL/CentOS.

Another fix would be to add symlinks or redirects or whatever at

  http://nginx.org/packages/centos/

that would make the $releasever work.  For example:

  7Workstation -> 7
  7Server -> 7

I don't know whether there are other release variants/editions.  At some
point, "Client" was a variant/edition, I think, but it seems like these
are changing a fair amount from major release to major release, so it
may be a moving target.

And maybe there are other better fixes that I'm not aware of.

Thanks!

Lewis
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: RHEL Yum repo instructions don't work on RHEL 7

Konstantin Pavlov
Hi Lewis,

Thanks for bringing the issue to our attention.

01.10.2019 20:42, J. Lewis Muir wrote:

> Another fix would be to add symlinks or redirects or whatever at
>
>   http://nginx.org/packages/centos/
>
> that would make the $releasever work.  For example:
>
>   7Workstation -> 7
>   7Server -> 7
>
> I don't know whether there are other release variants/editions.  At some
> point, "Client" was a variant/edition, I think, but it seems like these
> are changing a fair amount from major release to major release, so it
> may be a moving target.

Yep, that seems like the easiest solution.  I've put Client, Workstation
and Server symlinks for respectable major releases to both stable and
mainline repos - I'd appreciate if you try again and let me know if that
fixes the issue for you.

Thank you,

--
Konstantin Pavlov
https://www.nginx.com/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: RHEL Yum repo instructions don't work on RHEL 7

J. Lewis Muir
On 10/02, Konstantin Pavlov wrote:
> Yep, that seems like the easiest solution.  I've put Client, Workstation
> and Server symlinks for respectable major releases to both stable and
> mainline repos - I'd appreciate if you try again and let me know if that
> fixes the issue for you.

I confirm that using the $releasever Yum variable in the baseurl key
value as given in the nginx documentation works now.  Thanks!

Lewis
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx