Bug 1272381 - RFE: implement "include" statement for mock config files
RFE: implement "include" statement for mock config files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
: FutureFeature, Reopened
Depends On:
Blocks: 1357564
  Show dependency treegraph
 
Reported: 2015-10-16 06:03 EDT by Pavel Raiskup
Modified: 2016-09-05 22:20 EDT (History)
7 users (show)

See Also:
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-02 22:17:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
new config option - include (2.34 KB, patch)
2016-07-13 08:02 EDT, Mikhail Campos
no flags Details | Diff
include statement to be used in config (2.54 KB, patch)
2016-07-13 11:48 EDT, Mikhail Campos
no flags Details | Diff

  None (edit)
Description Pavel Raiskup 2015-10-16 06:03:40 EDT
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 08:02 EDT
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 08:33:20 EDT
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 11:48 EDT
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 03:53:55 EDT
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 09:58:15 EDT
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 09:58:50 EDT
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 09:59:23 EDT
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 09:59:57 EDT
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 10:00:34 EDT
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 14:54:37 EDT
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 15:52:41 EDT
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-10 23:23:45 EDT
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 10:15:52 EDT
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 10:20:02 EDT
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 17:25:02 EDT
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 05:42:17 EDT
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 05:42:50 EDT
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 05:43:37 EDT
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 05:44:10 EDT
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 15:54:42 EDT
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-17 21:51:36 EDT
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 00:19:07 EDT
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 00:19:19 EDT
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-02 22:17:16 EDT
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-02 22:18:13 EDT
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 13:39:40 EDT
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-05 22:20:10 EDT
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.

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