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 1085308 - mock: User configuration is lost during update
Summary: mock: User configuration is lost during update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-08 10:53 UTC by Mikolaj Izdebski
Modified: 2015-01-06 02:06 UTC (History)
6 users (show)

Fixed In Version: mock-1.2.3-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-12 04:08:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mikolaj Izdebski 2014-04-08 10:53:41 UTC
During mock package update user configuration is lost -- %post scriplet removes config file default.cfg.

default.cfg is a config file marked as %config(noreplace) and as such I didn't expect it to be removed or replaced during package update.  Mock should either not mark default.cfg as noreplace or not touch it during update.  In any case, removing existing user configuration without even creating a backup file is a bad thing to do, IMHO.

Version-Release number of selected component (if applicable):
1.1.36

Comment 1 Christopher Meng 2014-04-11 01:13:12 UTC
Could not find required config file: /etc/mock/default.cfg!

Fedora rawhide here.

Comment 2 Jerry James 2014-04-21 16:04:04 UTC
(In reply to Christopher Meng from comment #1)
> Could not find required config file: /etc/mock/default.cfg!
> 
> Fedora rawhide here.

That's probably due to bug 1083689.

Comment 3 Christopher Meng 2014-04-22 02:58:13 UTC
(In reply to Jerry James from comment #2)
> (In reply to Christopher Meng from comment #1)
> > Could not find required config file: /etc/mock/default.cfg!
> > 
> > Fedora rawhide here.
> 
> That's probably due to bug 1083689.

Thanks.

Comment 4 Miroslav Suchý 2014-05-19 17:37:08 UTC
File default.cfg is symlink. And should stay symlink. If it will not become updated, then we hit regression on bug 858822.

And default.cfg is %ghost, so it is actually not deployed nor updated.
It is manualy updated in %post. Therefore removing 'noreplace' will not solve it.

Unless someone propose smart idea, I'm afraid I will have to close it as CANTFIX.

Mikolaj do you have idea?

Comment 5 Mikolaj Izdebski 2014-05-20 07:03:32 UTC
As I understand:

"configuration is not updated, becomes outdated over time" - that's expected with "noreplace". Any new config from package maintainer can be stored as .rpmnew, but sys is responsible for keeping the config up-to-date.

Without "noreplace" packaging system is free to modify the config.

My ideas:

1) remove "noreplace" or even "%config" from default.cfg - if the symlink is not meant to be user-configurable

2) write new symlink as .rpmnew - user will see that from yum output and can adjust the symlink as needed

Comment 6 Mikolaj Izdebski 2014-05-20 07:05:21 UTC
(In reply to Mikolaj Izdebski from comment #5)
> but sys is responsible
s/sys/sys admin/

Comment 7 Miroslav Suchý 2014-10-23 11:10:00 UTC
Resolved by commit af3ce20.
Mock will now create .rpmnew file if $(readlink default.cfg) is different from what we think should be the target.

Comment 8 Fedora Update System 2014-11-16 17:37:25 UTC
mock-1.2.1-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.1-1.fc21

Comment 9 Fedora Update System 2014-11-16 17:38:48 UTC
mock-1.2.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.1-1.fc20

Comment 10 Fedora Update System 2014-11-16 17:39:40 UTC
mock-1.2.1-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.1-1.el7

Comment 11 Fedora Update System 2014-11-16 17:40:40 UTC
mock-1.2.1-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.1-1.el6

Comment 12 Fedora Update System 2014-11-17 06:29:46 UTC
Package mock-1.2.1-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.2.1-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15217/mock-1.2.1-1.fc20
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2014-12-04 12:07:04 UTC
mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc21

Comment 14 Fedora Update System 2014-12-04 12:10:33 UTC
mock-1.2.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc20

Comment 15 Fedora Update System 2014-12-04 12:11:30 UTC
mock-1.2.3-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.el7

Comment 16 Fedora Update System 2014-12-12 04:08:00 UTC
mock-1.2.3-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2014-12-17 04:43:02 UTC
mock-1.2.3-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 18 Fedora Update System 2015-01-06 02:06:47 UTC
mock-1.2.3-1.el7 has been pushed to the Fedora EPEL 7 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.