Hi All,
Congrats on Centos 7, and thanks a million!
This may have been answered before but I can't seem to discover...
I did:
yumdownloader --source sssd rpmbuild --rebuild sssd-1.11.2-68.el7_0.5.src.rpm
And the packages I got had a different "dist" tag than the installed versions.
Installed versions are ".el7_0" and the built ones were ".el7.centos".
sssd-1.11.2-68.el7_0.5.x86_64 <== in repo sssd-1.11.2-68.el7.centos.5.x86_64 <== rebuilt locally
Is there a reason for this mismatch and is in intentional or an error? It's a pain in the butt because I often want to replace existing package version using 'rpm --replacepkgs --oldpackage' while testing fixes and this makes it close to impossible due to huge dependency issues.
(also, it seems like the default rebuild of the above package "forgets" to generate one of the necessary packages: python-sssdconfig, but thats a different issue).
On 07/15/2014 10:02 AM, David Mansfield wrote:
Hi All,
Congrats on Centos 7, and thanks a million!
This may have been answered before but I can't seem to discover...
I did:
yumdownloader --source sssd rpmbuild --rebuild sssd-1.11.2-68.el7_0.5.src.rpm
And the packages I got had a different "dist" tag than the installed versions.
Installed versions are ".el7_0" and the built ones were ".el7.centos".
sssd-1.11.2-68.el7_0.5.x86_64 <== in repo sssd-1.11.2-68.el7.centos.5.x86_64 <== rebuilt locally
Is there a reason for this mismatch and is in intentional or an error? It's a pain in the butt because I often want to replace existing package version using 'rpm --replacepkgs --oldpackage' while testing fixes and this makes it close to impossible due to huge dependency issues.
(also, it seems like the default rebuild of the above package "forgets" to generate one of the necessary packages: python-sssdconfig, but thats a different issue).
You need to define your own dist variable for each rpm built, if you do not want the default. You can do it via rpmbuild:
rpmbuild --define "dist .el7_0" <other stuff>
...OR... you can do a default in your .rpmmacros
The system default dist (as you found) is .el7.centos if it is not modified.
On 07/15/2014 02:15 PM, Johnny Hughes wrote:
On 07/15/2014 10:02 AM, David Mansfield wrote:
Hi All,
Congrats on Centos 7, and thanks a million!
This may have been answered before but I can't seem to discover...
I did:
yumdownloader --source sssd rpmbuild --rebuild sssd-1.11.2-68.el7_0.5.src.rpm
And the packages I got had a different "dist" tag than the installed versions.
Installed versions are ".el7_0" and the built ones were ".el7.centos".
sssd-1.11.2-68.el7_0.5.x86_64 <== in repo sssd-1.11.2-68.el7.centos.5.x86_64 <== rebuilt locally
Is there a reason for this mismatch and is in intentional or an error? It's a pain in the butt because I often want to replace existing package version using 'rpm --replacepkgs --oldpackage' while testing fixes and this makes it close to impossible due to huge dependency issues.
(also, it seems like the default rebuild of the above package "forgets" to generate one of the necessary packages: python-sssdconfig, but thats a different issue).
You need to define your own dist variable for each rpm built, if you do not want the default. You can do it via rpmbuild:
rpmbuild --define "dist .el7_0" <other stuff>
...OR... you can do a default in your .rpmmacros
The system default dist (as you found) is .el7.centos if it is not modified.
But why is the system default not the same as what the installed packages were built with? Surely that's a regression from any prior Centos platform. Is there an "upstreamy" reason for this (like they use inconsistent dist tag or something?).
Thanks, David
On 07/16/2014 08:27 AM, David Mansfield wrote:
On 07/15/2014 02:15 PM, Johnny Hughes wrote:
On 07/15/2014 10:02 AM, David Mansfield wrote:
Hi All,
Congrats on Centos 7, and thanks a million!
This may have been answered before but I can't seem to discover...
I did:
yumdownloader --source sssd rpmbuild --rebuild sssd-1.11.2-68.el7_0.5.src.rpm
And the packages I got had a different "dist" tag than the installed versions.
Installed versions are ".el7_0" and the built ones were ".el7.centos".
sssd-1.11.2-68.el7_0.5.x86_64 <== in repo sssd-1.11.2-68.el7.centos.5.x86_64 <== rebuilt locally
Is there a reason for this mismatch and is in intentional or an error? It's a pain in the butt because I often want to replace existing package version using 'rpm --replacepkgs --oldpackage' while testing fixes and this makes it close to impossible due to huge dependency issues.
(also, it seems like the default rebuild of the above package "forgets" to generate one of the necessary packages: python-sssdconfig, but thats a different issue).
You need to define your own dist variable for each rpm built, if you do not want the default. You can do it via rpmbuild:
rpmbuild --define "dist .el7_0" <other stuff>
...OR... you can do a default in your .rpmmacros
The system default dist (as you found) is .el7.centos if it is not modified.
But why is the system default not the same as what the installed packages were built with? Surely that's a regression from any prior Centos platform. Is there an "upstreamy" reason for this (like they use inconsistent dist tag or something?).
They us all kinds of inconsistent dist tags yes
They use .el7, .el7_0, etc.
We use .el7 and .el7_0 and .el7.centos
(and all the other things for other versions .. .el5 or .el5_[0-10] or .el5.centos, ... same for 6)
If CentOS changes a package, it becomes .el7.centos (or .el6.centos or .el5.centos) .. otherwise (if we don't change a package) we match what upstream has, which can be any number of things. So that means every single package has to have its dist tag checked. This is nothing new, it has been around and the policy since the beginning of CentOS-4.
On 07/16/2014 04:41 PM, Johnny Hughes wrote:
upstream has, which can be any number of things. So that means every single package has to have its dist tag checked. This is nothing new, it has been around and the policy since the beginning of CentOS-4.
the change in centos-release to default to .elN.centos instead of .elN is "new", relatively speaking ( *). and makes life a bit awkward for those who want to recompile a src.rpm and end with .el7.centos instead of .el as release tag
* it appeared in C6, sometime last year. there was a mail thread on that
On 07/16/2014 08:54 AM, Manuel Wolfshant wrote:
On 07/16/2014 04:41 PM, Johnny Hughes wrote:
upstream has, which can be any number of things. So that means every single package has to have its dist tag checked. This is nothing new, it has been around and the policy since the beginning of CentOS-4.
the change in centos-release to default to .elN.centos instead of .elN is "new", relatively speaking ( *). and makes life a bit awkward for those who want to recompile a src.rpm and end with .el7.centos instead of .el as release tag
- it appeared in C6, sometime last year. there was a mail thread on that
That is true .. what the default is could be different, but all the other parts ... Multiple dist tags used, is true for all versions of centos and rhel. So, each package, if you are building from SRPMS from either RHEL or CentOS, needs to have its dist tag found individually if you want to match upstream.
The default is not normally the tag used unless it happens to be a point release (by upstream) ... most errata releases between point releases will be ,el7_0 or .el5_10, etc.
On 07/16/2014 10:10 AM, Johnny Hughes wrote:
On 07/16/2014 08:54 AM, Manuel Wolfshant wrote:
On 07/16/2014 04:41 PM, Johnny Hughes wrote:
upstream has, which can be any number of things. So that means every single package has to have its dist tag checked. This is nothing new, it has been around and the policy since the beginning of CentOS-4.
the change in centos-release to default to .elN.centos instead of .elN is "new", relatively speaking ( *). and makes life a bit awkward for those who want to recompile a src.rpm and end with .el7.centos instead of .el as release tag
- it appeared in C6, sometime last year. there was a mail thread on that
That is true .. what the default is could be different, but all the other parts ... Multiple dist tags used, is true for all versions of centos and rhel. So, each package, if you are building from SRPMS from either RHEL or CentOS, needs to have its dist tag found individually if you want to match upstream.
The default is not normally the tag used unless it happens to be a point release (by upstream) ... most errata releases between point releases will be ,el7_0 or .el5_10, etc.
I appreciate the explanation - makes perfect sense to me. I'll just be "wary" each time I rebuild an SRPM to specify the %dist macro somewhere either in the spec or command line or whatever. I just got caught by surprise that the packages I had just built were "incompatible" with my system - ie. caused dependency hell.
On 07/15/2014 10:02 AM, David Mansfield wrote:
Hi All,
Congrats on Centos 7, and thanks a million!
This may have been answered before but I can't seem to discover...
I did:
yumdownloader --source sssd rpmbuild --rebuild sssd-1.11.2-68.el7_0.5.src.rpm
And the packages I got had a different "dist" tag than the installed versions.
Installed versions are ".el7_0" and the built ones were ".el7.centos".
sssd-1.11.2-68.el7_0.5.x86_64 <== in repo sssd-1.11.2-68.el7.centos.5.x86_64 <== rebuilt locally
Is there a reason for this mismatch and is in intentional or an error? It's a pain in the butt because I often want to replace existing package version using 'rpm --replacepkgs --oldpackage' while testing fixes and this makes it close to impossible due to huge dependency issues.
(also, it seems like the default rebuild of the above package "forgets" to generate one of the necessary packages: python-sssdconfig, but thats a different issue).
Also note that if you do checkouts from git instead of yumdownloader, we have specifically added an into_srpm.sh script that calls return_disttag.sh and builds an SRPM from the tree. There is no reason you can't also use those script in any rpmbuild extracted build area ... it should work there too
scripts located here:
On 07/16/2014 08:53 AM, Johnny Hughes wrote:
On 07/15/2014 10:02 AM, David Mansfield wrote:
Hi All,
Congrats on Centos 7, and thanks a million!
This may have been answered before but I can't seem to discover...
I did:
yumdownloader --source sssd rpmbuild --rebuild sssd-1.11.2-68.el7_0.5.src.rpm
And the packages I got had a different "dist" tag than the installed versions.
Installed versions are ".el7_0" and the built ones were ".el7.centos".
sssd-1.11.2-68.el7_0.5.x86_64 <== in repo sssd-1.11.2-68.el7.centos.5.x86_64 <== rebuilt locally
Is there a reason for this mismatch and is in intentional or an error? It's a pain in the butt because I often want to replace existing package version using 'rpm --replacepkgs --oldpackage' while testing fixes and this makes it close to impossible due to huge dependency issues.
(also, it seems like the default rebuild of the above package "forgets" to generate one of the necessary packages: python-sssdconfig, but thats a different issue).
Also note that if you do checkouts from git instead of yumdownloader, we have specifically added an into_srpm.sh script that calls return_disttag.sh and builds an SRPM from the tree. There is no reason you can't also use those script in any rpmbuild extracted build area ... it should work there too
scripts located here:
I was wrong :)
Many of those scripts look for git specific things and will not work in an rpmbuild area that is not git based .. BUT .. I think, after reviewing return_disttag.sh it will work there.
Regardless, those would be a good basis for scripts that would work with yumdownloader if you want to create them.