Bug 1160428 - mock 1.2.0 tries to install f21 packages in f19 chroot
Summary: mock 1.2.0 tries to install f21 packages in f19 chroot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Simacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-04 19:13 UTC by Richard Shaw
Modified: 2015-01-06 02:06 UTC (History)
7 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:07:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Includes both a successful build with 1.1.41 and the problem with 1.2.0 (176.72 KB, text/plain)
2014-11-04 19:13 UTC, Richard Shaw
no flags Details

Description Richard Shaw 2014-11-04 19:13:53 UTC
Created attachment 953789 [details]
Includes both a successful build with 1.1.41 and the problem with 1.2.0

Description of problem:
I rebuilt mock 1.2.0 for Fedora 20 to try out the nosync option which is actually very nice. Up until today I had only built f20 and newer packages. Today I tried to build packages for f19 (both x86_64 and i686) and building fails because the urls for all the packages required for the chroot are pointing to f19 mirrors, the package names themselves all have f21 for the dist tag.

Downgrading to mock 1.1.41 did not immediatealy fix the problem, but after turning off the nosync option I could build packages. Interestingly enough, upgrading back to 1.2 immediately exhibited the problem regardless of the nosync option.


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


How reproducible:
So far all attempts to build f19 packages under mock 1.2.0 have failed with the result above.

Comment 1 Miroslav Suchý 2014-11-05 07:42:32 UTC
Can you please provide?:
 * exact command you run
 * output of rpm -V mock
 * and if there are some config you modified (will be printed in previous step), then provide them as well

Comment 2 Richard Shaw 2014-11-05 13:59:51 UTC
In order of request:
mock -v -r fedora-19-x86_64 --resultdir ./mockbuild/19/wsjtx/ rpmbuild/wsjtx/SRPMS/wsjtx-1.4-0.1.rc3.fc20.src.rpm

$ rpm -V mock
S.5....T.  c /etc/mock/site-defaults.cfg

This was for 1.1.41 but it would look the same for 1.2.0, I only add a few options to site-defaults.cfg:

config_opts['cleanup_on_failure'] = 0
#config_opts['nosync'] = True
config_opts['macros']['%_smp_mflags'] = "-j6"

Comment 3 Miroslav Suchý 2014-11-13 09:37:31 UTC
I could not reproduce it.

Comment 4 Richard Shaw 2014-11-13 14:45:19 UTC
Looking at the packages it tries to download it seems the "update" repo is fc19 but the "fedora" repo is picking up fc21 packages.

Also, I noticed every time that when it tries to updated the repo, the one it downloads is ALWAYS older (2013) than the one it "already has" even though I did a --scrub=all.

Not using downloaded repomd.xml because it is older than what we have:
  Current   : Mon Mar  3 06:28:11 2014
  Downloaded: Fri Jun 28 06:44:05 2013
DEBUG: Not using downloaded repomd.xml because it is older than what we have:
DEBUG:   Current   : Mon Mar  3 06:28:11 2014
DEBUG:   Downloaded: Fri Jun 28 06:44:05 2013
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Tue Dec 17 09:07:06 2013
  Downloaded: Sat Jun 29 14:06:17 2013
DEBUG: Not using downloaded repomd.xml because it is older than what we have:
DEBUG:   Current   : Tue Dec 17 09:07:06 2013
DEBUG:   Downloaded: Sat Jun 29 14:06:17 2013

This looks like to me it's somehow reaching across to another chroot cache somehow.

I tried deleting everything rawhide related in /var/lib/mock and /var/cache/mock but I still get the same message. If I do a scrub=all, how can there be a "current" repomd.xml?

Comment 5 Miroslav Suchý 2014-11-13 14:57:58 UTC
Is it possible that you are using lvm_root plugin?

Comment 6 Miroslav Suchý 2014-11-13 15:00:05 UTC
Does it happen to you when you try to build into fedora-19-i386 as well?

Comment 7 Richard Shaw 2014-11-13 15:11:33 UTC
I've never tried setting up lvm_root as I don't have any unallocated LVM space. I'm trying i386 now but so far it appears to be working fine.

Comment 8 Richard Shaw 2014-11-13 15:33:36 UTC
I think I'm getting a little closer. 

I have a lot of old yum data all the way back to Fedora 16 in /var/lib/yum.

I removed everything but Fedora 20 and rawhide data /var/lib/yum/repos and it had fewer of the old "repomb.xml" errors but it still tried to pull in f21 packages.

Comment 9 Richard Shaw 2014-11-13 15:36:11 UTC
Ok, I figured it out... 

I had a LOT of old yum data in /var/cache/yum which brings up two points I can think of:

1. Updates to a piss poor job of cleaning up old data. I had stuff from Fedora 16 in there.
2. I'm guessing mock should NOT be paying any attention to files the host filesystem like /var/cache/yum.

Since this was not a problem with 1.1.41, I'm guessing some significant changes were made in 1.2.0 which caused it to start using repodata from the host system.

Comment 10 Michael Simacek 2014-11-13 16:04:58 UTC
I cannot direcly reproduce it, but I see it in strace, so I confirm that it can happen and will try to find out the cause

Comment 11 Miroslav Suchý 2014-11-13 16:07:22 UTC
I suspect py/mockbuild/plugins/yum_cache.py, which is enabled by default.

Comment 12 Michael Simacek 2014-11-14 15:52:42 UTC
yum_cache is innocent in this regard.

Apparently, for yum following invocations aren't the same:
yum install whatever --installroot /foo/bar
yum install whatever --installroot /foo/bar/

The first one ends up using /var/cache/yum as secondary cachedir, while the second one uses var/cache/yum (relative path, unlikely to exist when run from directories different from /). Old mock used the second one, but this changed during the rewrite of the module.

I created a patch and sent it upstream.

The bug might still appear when mock is run from /, but that would be the same for all versions of mock and cannot be easily solved, because it's a bug in yum, which shouldn't use system-wide caches. Dnf doesn't seem to exhibit this issue, regardless of the working directory.

Comment 13 Richard Shaw 2014-11-14 16:25:32 UTC
Would the recommendation be to install dnf at this point?

Comment 14 Fedora Update System 2014-11-16 17:37:04 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 15 Fedora Update System 2014-11-16 17:38:30 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 16 Fedora Update System 2014-11-16 17:39:22 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 17 Fedora Update System 2014-11-16 17:40:18 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 18 Fedora Update System 2014-11-17 06:29:21 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 19 Fedora Update System 2014-12-04 12:06:42 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 20 Fedora Update System 2014-12-04 12:10:12 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 21 Fedora Update System 2014-12-04 12:11:09 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 22 Fedora Update System 2014-12-12 04:07:37 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 23 Fedora Update System 2014-12-17 04:42:40 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 24 Fedora Update System 2015-01-06 02:06:24 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.