Bug 1169981

Summary: New release overwrites old source tarball
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Harmsen <mharmsen>
Component: pki-coreAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mharmsen, rpattath
Target Milestone: rc   
Target Release: 7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-10.2.5-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 09:22:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Harmsen 2014-12-02 22:05:04 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/pki/ticket/1211

The spec file currently specifies a link to the source tarball that contains the version number but not the release number:
{{{
Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}%{?prerel}.tar.gz
}}}

In the current build/release process, when a new release is created a new tarball is also created with the same name, overwriting the tarball of the old release. See Fedora packaging guideline (http://fedoraproject.org/wiki/Packaging:SourceURL).

Option #1 is to add the release number into the tarball name:
{{{
Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}%-%{release}.tar.gz
}}}
The build scripts might need to be updated.

Option #2 is to provide a download instruction:
{{{
# The source for this package was pulled from upstream's git repo.  Use the
# following commands to generate the tarball:
#  git clone git://git.fedorahosted.org/git/pki.git pki-core-<version>
#  git -C pki-core-<version> checkout pki-core-<version>-<release>
#  gtar -zcvf pki-core-<version>.tar.gz pki-core-<version>
Source0: %{name}-%{version}.tar.gz
}}}
Please verify the download instruction. The above example might not be accurate since this is usually done using a compose script. Alternatively, replace the manual steps with script invocation.

Option #3 is to use a new versioning scheme (ticket #1210) which will increment the version number for any source changes. This will also make Fedora and RHEL releases more consistent.

Proposed milestone: 10.2.1 with option #1 or #2. In 10.3 it should be reverted once the new versioning scheme is adopted.

Comment 1 Matthew Harmsen 2014-12-02 22:07:24 UTC
In the event that a new versioning scheme has not been adopted, the solution detailed in comment #7 (https://fedorahosted.org/pki/ticket/1211#comment:7) should be applied to the DOGTAG_10_1_RHEL_BRANCH the next time that any sort of re-base takes place.

Comment 2 Matthew Harmsen 2015-07-08 19:01:22 UTC
This problem has been fixed via PKI 1211 and will be included in pki-core-10.2.5-3.el7.

Comment 6 Roshni 2015-08-27 19:13:45 UTC
[root@cloud-qe-7 SPECS]# rpm -qi pki-ca
Name        : pki-ca
Version     : 10.2.5
Release     : 5.el7
Architecture: noarch
Install Date: Thu 27 Aug 2015 03:13:09 PM EDT
Group       : System Environment/Daemons
Size        : 2429116
License     : GPLv2
Signature   : RSA/SHA256, Mon 17 Aug 2015 10:24:33 AM EDT, Key ID 938a80caf21541eb
Source RPM  : pki-core-10.2.5-5.el7.src.rpm
Build Date  : Wed 12 Aug 2015 09:51:40 PM EDT
Build Host  : ppc-034.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pki.fedoraproject.org/
Summary     : Certificate System - Certificate Authority

Verification steps:

Verified pki-core.spec has the following based on comment 1

%if 0%{?rhel}
# NOTE:  In the future, as a part of its path, this URL will contain a release
#        directory which consists of the fixed number of the upstream release
#        upon which this tarball was originally based.
Source0:          http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{release}/rhel/%{name}-%{version}%{?prerel}.tar.gz
%else
Source0:          http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{release}/%{name}-%{version}%{?prerel}.tar.gz
%endif

Comment 7 Roshni 2015-08-27 21:31:59 UTC
Verified using the following build as well

[root@qe-blade-08 ~]# rpm -qi pki-ca
Name        : pki-ca
Version     : 10.2.6
Release     : 8.el7pki
Architecture: noarch
Install Date: Thu 27 Aug 2015 05:29:15 PM EDT
Group       : System Environment/Daemons
Size        : 2416291
License     : GPLv2
Signature   : (none)
Source RPM  : pki-core-10.2.6-8.el7pki.src.rpm
Build Date  : Tue 25 Aug 2015 01:18:45 AM EDT
Build Host  : x86-025.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pki.fedoraproject.org/
Summary     : Certificate System - Certificate Authority

Comment 8 errata-xmlrpc 2015-11-19 09:22:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2276.html