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 1272381

Summary: RFE: implement "include" statement for mock config files
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, mebrown, Mikhail_Campos-Guadamuz, msimacek, msuchy, praiskup, williams
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mock-1.2.19-2.fc24 mock-1.2.20-1.el6 mock-1.2.20-1.el7 mock-1.2.20-1.fc25 mock-1.2.20-1.fc23 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1357564 (view as bug list) Environment:
Last Closed: 2016-09-03 02:17:44 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:
Bug Depends On:    
Bug Blocks: 1357564    
Attachments:
Description Flags
new config option - include
none
include statement to be used in config none

Description Pavel Raiskup 2015-10-16 10:03:40 UTC
From time to time, I need to create special mock configuration file which is
just a bit adjusted "copy & pasted" existing mock profile.

This is however painful when I upgrade mock -- original fedora mock profile is
changed and I need to adjust all of my special mock profiles to keep this in
sync.  Something like 'include/require' would be perfect.

I'm not sure whether mock profiles are actually generated automatically, but
this could lower the mock RPM payload a bit (because the mock profiles are
mostly identical across all chroots).

Comment 1 Mikhail Campos 2016-07-13 12:02:21 UTC
Created attachment 1179225 [details]
new config option - include

Here is a possible implementation of such'include', so you can write somewhere in your mock config:

include('/path/to/config/to/be/included/include.cfg')

and it will include additional config_opts from include.cfg at the point of invocation

Comment 2 Pavel Raiskup 2016-07-13 12:33:20 UTC
Thanks for having a look.

I'm not able to give proper review, but I would be careful to avoid
include loops.

Comment 3 Mikhail Campos 2016-07-13 15:48:52 UTC
Created attachment 1179336 [details]
include statement to be used in config

Pavel, thank you for the note. 

Here is another attempt attached. As far as we store every config_paths values, we can check them for multiple occurrences. It's just detected whether it is a consequent inclusion of the same already included config and that config is skipped if true.

Comment 4 Miroslav Suchý 2016-07-14 07:53:55 UTC
Commited as:
* 2f147d0 (HEAD -> devel, origin/devel) 'include' statement has been added [RHBZ#1272381]

Thank you for contribution.

Comment 5 Fedora Update System 2016-08-10 13:58:15 UTC
mock-1.2.19-2.fc23 distribution-gpg-keys-1.5-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ba1c57742

Comment 6 Fedora Update System 2016-08-10 13:58:50 UTC
mock-1.2.19-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7a569517fe

Comment 7 Fedora Update System 2016-08-10 13:59:23 UTC
mock-1.2.19-2.fc24 distribution-gpg-keys-1.5-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-497b37d2bc

Comment 8 Fedora Update System 2016-08-10 13:59:57 UTC
mock-1.2.19-2.el7 distribution-gpg-keys-1.5-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-2b233647a0

Comment 9 Fedora Update System 2016-08-10 14:00:34 UTC
mock-1.2.19-2.el6 distribution-gpg-keys-1.5-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-6b161941e5

Comment 10 Fedora Update System 2016-08-10 18:54:37 UTC
mock-1.2.19-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7a569517fe

Comment 11 Fedora Update System 2016-08-10 19:52:41 UTC
distribution-gpg-keys-1.5-1.fc23, mock-1.2.19-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ba1c57742

Comment 12 Fedora Update System 2016-08-11 03:23:45 UTC
distribution-gpg-keys-1.5-1.fc24, mock-1.2.19-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-497b37d2bc

Comment 13 Fedora Update System 2016-08-11 14:15:52 UTC
distribution-gpg-keys-1.5-1.el6, mock-1.2.19-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-6b161941e5

Comment 14 Fedora Update System 2016-08-11 14:20:02 UTC
distribution-gpg-keys-1.5-1.el7, mock-1.2.19-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-2b233647a0

Comment 15 Fedora Update System 2016-08-15 21:25:02 UTC
distribution-gpg-keys-1.5-1.fc24, mock-1.2.19-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-08-17 09:42:17 UTC
distribution-gpg-keys-1.5-1.fc23 mock-1.2.20-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ba1c57742

Comment 17 Fedora Update System 2016-08-17 09:42:50 UTC
mock-1.2.20-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7a569517fe

Comment 18 Fedora Update System 2016-08-17 09:43:37 UTC
distribution-gpg-keys-1.5-1.el7 mock-1.2.20-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-2b233647a0

Comment 19 Fedora Update System 2016-08-17 09:44:10 UTC
distribution-gpg-keys-1.5-1.el6 mock-1.2.20-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-6b161941e5

Comment 20 Fedora Update System 2016-08-17 19:54:42 UTC
mock-1.2.20-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7a569517fe

Comment 21 Fedora Update System 2016-08-18 01:51:36 UTC
distribution-gpg-keys-1.5-1.fc23, mock-1.2.20-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ba1c57742

Comment 22 Fedora Update System 2016-08-18 04:19:07 UTC
distribution-gpg-keys-1.5-1.el7, mock-1.2.20-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-2b233647a0

Comment 23 Fedora Update System 2016-08-18 04:19:19 UTC
distribution-gpg-keys-1.5-1.el6, mock-1.2.20-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-6b161941e5

Comment 24 Fedora Update System 2016-09-03 02:17:16 UTC
distribution-gpg-keys-1.5-1.el6, mock-1.2.20-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 25 Fedora Update System 2016-09-03 02:18:13 UTC
distribution-gpg-keys-1.5-1.el7, mock-1.2.20-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.

Comment 26 Fedora Update System 2016-09-03 17:39:40 UTC
mock-1.2.20-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2016-09-06 02:20:10 UTC
distribution-gpg-keys-1.5-1.fc23, mock-1.2.20-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.