Bug 820688

Summary: rhpkg refuses to build an older SRPM with a confusing error message
Product: [Fedora] Fedora Reporter: Miloslav Trmač <mitr>
Component: rpkgAssignee: cqi
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 27CC: cqi
Target Milestone: ---Keywords: EasyFix, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 22:15:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miloslav Trmač 2012-05-10 17:24:44 UTC
Description of problem:
(in libuser repo):
> $ rhpkg srpm
> Zapsáno: /home/mitr/rh/dist/libuser/libuser-0.54.7-3.el5.src.rpm
> $ git checkout 930fe37ec43ea4734261429aa3e6eda161ab0063
> Note: checking out '930fe37ec43ea4734261429aa3e6eda161ab0063'.
>
> You are in 'detached HEAD' state. <snip>
> $ rhpkg srpm
> Could not execute srpm: Repo in inconsistent state: HEAD is a detached symbolic reference as it points to '930fe37ec43ea4734261429aa3e6eda161ab0063'

Isn't the above the natural way how to get a SRPM of an older version?  --help does not suggest anything to fix this..

... but:
> $ rhpkg --dist rhel-5.9 srpm
> Zapsáno: /home/mitr/rh/dist/libuser/libuser-0.54.7-2.el5.6.src.rpm
works fine.

Version-Release number of selected component (if applicable):
pyrpkg-1.18-1.fc16.noarch
rhpkg-1.14-1.fc16.noarch

Comment 1 Jesse Keating 2012-05-10 17:53:47 UTC
Without the --dist option, rhpkg has to try and figure out the distribution based on what remote branch your local branch is tracking.  We can't get that information if the head is detached.

This scenario just needs to be detected and the user should be prompted to use --dist.

Comment 2 Fedora Admin XMLRPC Client 2012-11-30 18:31:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora End Of Life 2013-04-03 19:18:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 4 Fedora End Of Life 2015-01-09 21:58:14 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Miloslav Trmač 2015-01-12 19:11:51 UTC
Reproduced with pyrpkg-1.28-1.fc20.noarch .

Comment 6 Fedora End Of Life 2015-05-29 08:44:26 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Miloslav Trmač 2015-06-03 17:11:48 UTC
Reproduced with pyrpkg-1.35-2.fc22.noarch.

(Use e.g. (git checkout b44cae5) instead of the commit hash in comment #0.)

Comment 8 Fedora End Of Life 2016-07-19 20:02:05 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 cqi 2016-07-21 09:26:03 UTC
Reopen since this still happen.

Prompt user to provide --dist could be a way to bypass. However, in a way, usually making a git repo in detached mode by `git checkout commit-id' is not a good practice in daily work. It would be helpful to prompt user something like "repo is in detached mode" and suggest to clean the repo or use -b just as git suggests.

Comment 10 Jan Kurik 2018-05-31 09:00:52 UTC
This bug is currently reported against a Fedora version which is already unsuported.
I am changing the version to '27', the latest supported release.

Please check whether this bug is still an issue on the '27' release.
If you find this bug not being applicable on this release, please close it.

Comment 11 Ben Cotton 2018-11-27 14:56:04 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2018-11-30 22:15:16 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.