﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1337	pkg-oss: `dist` macro changes on CentOS 7 break nginx-module packages	davidjb	Andrei Belov	"With CentOS 7, the `{?dist}` macro has changed within spec files from `.e7` to `.e7.centos`.  This means that any packages built with the current version of `pkg-oss` on CentOS 7 have their dependency set on nginx with this dist suffix included like so:

{{{
    nginx = 1.12.1-1.el7.centos.ngx
}}}

This causes a problem because this dependency is not correct as the EL7 releases for nginx are named like so:

{{{
    nginx = 1:1.12.1-1.el7.ngx
}}}

The result is that if you try and install a built module whilst having the main nginx yum repo configured, the following failure occurs:

{{{
Marking /root/rpmbuild/RPMS/x86_64/nginx-module-shibboleth-debuginfo-1.12.1-1.el7.centos.ngx.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nginx-module-shibboleth.x86_64 1:1.12.1-1.el7.centos.ngx will be installed
--> Processing Dependency: nginx = 1:1.12.1-1.el7.centos.ngx for package: 1:nginx-module-shibboleth-1.12.1-1.el7.centos.ngx.x86_64
Loading mirror speeds from cached hostfile
 * base: mirror.intergrid.com.au
 * extras: mirror.aarnet.edu.au
 * updates: mirror.overthewire.com.au
---> Package nginx-module-shibboleth-debuginfo.x86_64 1:1.12.1-1.el7.centos.ngx will be installed
--> Finished Dependency Resolution
Error: Package: 1:nginx-module-shibboleth-1.12.1-1.el7.centos.ngx.x86_64 (/nginx-module-shibboleth-1.12.1-1.el7.centos.ngx.x86_64)
           Requires: nginx = 1:1.12.1-1.el7.centos.ngx
           Available: 1:nginx-1.8.0-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.8.0-1.el7.ngx
           Available: 1:nginx-1.8.1-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.8.1-1.el7.ngx
           Available: 1:nginx-1.10.0-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.10.0-1.el7.ngx
           Available: 1:nginx-1.10.1-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.10.1-1.el7.ngx
           Available: 1:nginx-1.10.2-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.10.2-1.el7.ngx
           Available: 1:nginx-1.10.3-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.10.3-1.el7.ngx
           Available: 1:nginx-1.12.0-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.12.0-1.el7.ngx
           Available: 1:nginx-1.12.1-1.el7.ngx.x86_64 (nginx)
               nginx = 1:1.12.1-1.el7.ngx
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
}}}

The change stems from https://bugs.centos.org/view.php?id=7416 so to fix the issue (or at least workaround it), I've taken to adding the following `%define` into the `pkg-oss`'s `nginx-module.spec.in` file:

{{{
%if 0%{?rhel} == 7
 [...snip...]
# CentOS 7 specifies dist as "".el7.centos"" (https://bugs.centos.org/view.php?id=7416)
# but releases for nginx are just "".el7"" so force this.
%define dist .el7
%endif
}}}

Could this change be applied to the `nginx-module.spec.in` file?  Thanks."	defect	closed	minor		nginx-package	1.13.x	fixed			Linux a26ace3868c3 4.9.36-moby #1 SMP Wed Jul 12 15:29:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux	pkg-oss
