Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1083689 - mock %post script fails on Rawhide
Summary: mock %post script fails on Rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-02 18:09 UTC by Jerry James
Modified: 2014-10-10 16:04 UTC (History)
2 users (show)

Fixed In Version: mock-1.1.41-3.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-01 22:23:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2014-04-02 18:09:58 UTC
Description of problem:
Seen today on a Rawhide machine:

  Updating   : mock-1.1.38-1.fc21.noarch                                  31/61 
warning: %post(mock-1.1.38-1.fc21.noarch) scriptlet failed, exit status 254
Non-fatal POSTIN scriptlet failure in rpm package mock-1.1.38-1.fc21.noarch

The problem is that the %post script's computation of the version doesn't take Rawhide into account.  It computes 21 for the value, then tries to link to /etc/mock/fedora-21-x86_64.cfg instead of /etc/mock/fedora-rawhide-x86_64.cfg.  One possible fix is to change the version computation as follows:

if [ -e /etc/fedora-release ]
then
    if grep -Fq Rawhide /etc/fedora-release; then
        ver=Rawhide
    else
        ver=$(rpm -q --nosignature --qf "%{VERSION}" --whatprovides fedora-release)
    fi
else
    ver=$(rpm -q --nosignature --qf "%{VERSION}" --whatprovides redhat-release)
fi


Version-Release number of selected component (if applicable):
mock-1.1.38-1.fc21.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install or upgrade mock on a Rawhide machine
2.
3.

Actual results:
/etc/mock/default.cfg is not created

Expected results:
/etc/mock/default.cfg is created

Additional info:

Comment 1 Jerry James 2014-04-02 18:11:25 UTC
Except that should be "rawhide" with a lower-case 'r', of course:

        ver=rawhide

Sorry about that.

Comment 2 Clark Williams 2014-04-03 15:06:34 UTC
Thanks, applied your fix to the specfile template and queued for the next release.

Comment 3 Fedora Update System 2014-05-27 15:39:33 UTC
mock-1.1.39-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.39-1.fc19

Comment 4 Fedora Update System 2014-05-27 15:39:49 UTC
mock-1.1.39-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.39-1.el6

Comment 5 Fedora Update System 2014-05-27 15:40:05 UTC
mock-1.1.39-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.39-1.fc20

Comment 6 Fedora Update System 2014-05-27 19:12:03 UTC
Package mock-1.1.39-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.1.39-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1506/mock-1.1.39-1.el6
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-06-01 22:23:01 UTC
mock-1.1.39-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-06-25 20:00:19 UTC
mock-1.1.39-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-07-18 02:13:31 UTC
mock-1.1.40-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.40-2.fc20

Comment 10 Fedora Update System 2014-07-18 02:13:56 UTC
mock-1.1.40-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.40-2.fc19

Comment 11 Fedora Update System 2014-07-18 02:14:19 UTC
mock-1.1.40-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.40-2.el6

Comment 12 Fedora Update System 2014-07-18 17:45:38 UTC
mock-1.1.41-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.1.41-1.fc20

Comment 13 Fedora Update System 2014-07-18 17:46:04 UTC
mock-1.1.41-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.41-1.fc19

Comment 14 Fedora Update System 2014-07-18 17:46:30 UTC
mock-1.1.41-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.41-1.el6

Comment 15 Fedora Update System 2014-07-20 03:24:49 UTC
mock-1.1.41-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2014-07-22 18:08:09 UTC
mock-1.1.41-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2014-09-16 16:47:07 UTC
mock-1.1.41-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.41-2.fc19

Comment 18 Fedora Update System 2014-09-30 09:00:22 UTC
mock-1.1.41-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.41-3.fc19

Comment 19 Fedora Update System 2014-10-10 16:04:33 UTC
mock-1.1.41-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.