From 720332921222dfea2aadcb55abfff7d6cab1a8c5 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Wed, 30 May 2018 12:50:50 -0700 Subject: [PATCH] Move conf files into dedicated "conf" directory The "image-creator" and "koji-client-files" subdirectories are named as such to reflect their purpose from long ago. In the present, the names are confusing, so I am shuffling files around a bit to reflect current usage. All conf files (or conf file templates) have been moved to "conf" instead, and some documentation has been added to explain what the files are used for, and how they can be customized. Also, after moving the conf files, the last file remaining in one of the old subdirectories is "start_qemu.sh", so move it to the toplevel dir. We could eventually move the miscellaneous scripts into a dedicated directory too, but I will save that for another time. Signed-off-by: Patrick McCarty --- Makefile.config | 6 ++--- README.md | 2 +- conf/README.md | 28 ++++++++++++++++++++ autospec.conf => conf/autospec.conf | 0 {koji-client-files => conf}/clear.cfg | 0 {koji-client-files => conf}/koji.conf | 0 {image-creator => conf}/yum.conf | 0 provides.sh | 2 +- image-creator/start_qemu.sh => start_qemu.sh | 0 user-setup.sh | 2 +- 10 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 conf/README.md rename autospec.conf => conf/autospec.conf (100%) rename {koji-client-files => conf}/clear.cfg (100%) rename {koji-client-files => conf}/koji.conf (100%) rename {image-creator => conf}/yum.conf (100%) rename image-creator/start_qemu.sh => start_qemu.sh (100%) diff --git a/Makefile.config b/Makefile.config index 3d02589..f49cfbd 100644 --- a/Makefile.config +++ b/Makefile.config @@ -54,17 +54,17 @@ LATEST_SRPMS = $(LATEST_RELEASE)/source/SRPMS PACKAGES_FILE = $(TOPLVL)/projects/common/packages # Configuration file for autospec. -AUTOSPEC_CONF = $(TOPLVL)/projects/common/autospec.conf +AUTOSPEC_CONF = $(TOPLVL)/projects/common/conf/autospec.conf # Set this variable to any non-empty value to use the package mappings stored # in "pkg-mapping" for cloning/pulling package repos. USE_PACKAGE_MAPPING = yes # Package manager config file. Default to the in-tree copy. -PM_CONF = $(TOPLVL)/projects/common/image-creator/yum.conf +PM_CONF = $(TOPLVL)/projects/common/conf/yum.conf # Mock configuration file. Default to the in-tree copy. -MOCK_CONF = $(TOPLVL)/projects/common/koji-client-files/clear.cfg +MOCK_CONF = $(TOPLVL)/projects/common/conf/clear.cfg # Include any site local configuration variables. These variables may override diff --git a/README.md b/README.md index 9ef8a97..8baaf35 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ $ make build In the past, the various make commands that call `mock` required a mock config installed at `/etc/mock/clear.cfg`. However, at present, the commands will -instead use the mock config within this repo (`koji-client-files/clear.cfg`). +instead use the mock config within this repo (`conf/clear.cfg`). If you wish to use a custom mock config, you must override the `MOCK_CONF` variable to specify a different value to pass to mock's `-r` option. The value diff --git a/conf/README.md b/conf/README.md new file mode 100644 index 0000000..4e146dd --- /dev/null +++ b/conf/README.md @@ -0,0 +1,28 @@ +# Configuration files + +This directory contains various configuration files used by the developer +tooling framework. + +Unless otherwise noted in the config file documentation below, the config files +can be modified with custom, site-local changes by modifying a variable in +`Makefile.config.site_local` to point to a location of your choice (e.g. +somewhere in `/etc`). The framework will then read the config file from the +location you have specified instead, so copy the in-tree copy to that location +as a starting point if you need to. + +* `autospec.conf`: default Autospec configuration file used by `make autospec` + and `make autospecnew`. All configuration is commented out by default, so + default Autospec settings are used. Config variable: `AUTOSPEC_CONF` + +* `clear.cfg`: default Mock configuration file used by various targets that + call out to Mock. Config variable: `MOCK_CONF` + +* `yum.conf`: default package manager (YUM or DNF) configuration file, made + available for the framework's local repo support. Config variable: `PM_CONF` + +* `koji.conf`: template Koji configuration file. It is installed by + `user-setup.sh` to `/etc/koji.conf`, and the in-tree copy is not used. If you + are using Koji with the framework, you will need to modify `/etc/koji.conf` + according to how the Koji instance is set up for your environment. Configuring + the installation location via `Makefile.config.site_local` is not possible at + the moment but is a planned feature. diff --git a/autospec.conf b/conf/autospec.conf similarity index 100% rename from autospec.conf rename to conf/autospec.conf diff --git a/koji-client-files/clear.cfg b/conf/clear.cfg similarity index 100% rename from koji-client-files/clear.cfg rename to conf/clear.cfg diff --git a/koji-client-files/koji.conf b/conf/koji.conf similarity index 100% rename from koji-client-files/koji.conf rename to conf/koji.conf diff --git a/image-creator/yum.conf b/conf/yum.conf similarity index 100% rename from image-creator/yum.conf rename to conf/yum.conf diff --git a/provides.sh b/provides.sh index d3ea5e0..8d36cd2 100755 --- a/provides.sh +++ b/provides.sh @@ -23,7 +23,7 @@ if [ "$#" -eq 0 ]; then fi if [ ! -e /etc/yum.conf ]; then - echo "Error: yum.conf is missing. Please copy projects/common/image-creator/yum.conf to /etc" + echo "Error: yum.conf is missing. Please copy projects/common/conf/yum.conf to /etc" exit 1 fi diff --git a/image-creator/start_qemu.sh b/start_qemu.sh similarity index 100% rename from image-creator/start_qemu.sh rename to start_qemu.sh diff --git a/user-setup.sh b/user-setup.sh index 855b000..ba1eef0 100755 --- a/user-setup.sh +++ b/user-setup.sh @@ -142,7 +142,7 @@ if [ "$USE_KOJI" ]; then if [ ! -f /etc/koji.conf ]; then echo "Setting up koji config . . ." - sudo cp projects/common/koji-client-files/koji.conf /etc + sudo cp projects/common/conf/koji.conf /etc fi fi