ELN: Use the "global variable" feature to reduce config duplicities.
This moves all the configuration variables from eln.conf to shared/*.conf files. The configuration itself remains the same, it is just stored differently. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
parent
9d29d85adc
commit
ef9b90b1ce
51
eln.conf
51
eln.conf
@ -8,54 +8,7 @@
|
||||
# For any change which should happen only for Fedora ELN, edit the
|
||||
# "fedora/override.conf" configuration file.
|
||||
|
||||
from shared/general import *
|
||||
from shared/multilib import *
|
||||
from shared/additional_and_filter_packages import *
|
||||
from shared/runroot import *
|
||||
from shared/pkgset import *
|
||||
from shared/gather import *
|
||||
from shared/createrepo import *
|
||||
from shared/createiso import *
|
||||
from shared/buildinstall import *
|
||||
from shared/lookaside import *
|
||||
from shared/variables import *
|
||||
from fedora/variables import *
|
||||
|
||||
# PRODUCT INFO
|
||||
release_name = RELEASE_NAME
|
||||
release_short = RELEASE_SHORT
|
||||
release_version = RELEASE_VERSION
|
||||
release_is_layered = False
|
||||
|
||||
# GENERAL SETTINGS
|
||||
comps_file = {
|
||||
'scm': 'git',
|
||||
'repo': COMPS_REPO,
|
||||
'branch': COMPS_BRANCH,
|
||||
'file': COMPS_FILE,
|
||||
'command': COMPS_COMMAND
|
||||
}
|
||||
|
||||
module_defaults_dir = {
|
||||
'scm': 'git',
|
||||
'repo': MODULE_DEFAULTS_REPO,
|
||||
'branch': MODULE_DEFAULTS_BRANCH,
|
||||
'dir': '.'
|
||||
}
|
||||
|
||||
variants_file = {
|
||||
"scm": "VARIANTS_SCM",
|
||||
"repo": VARIANTS_REPO,
|
||||
"branch": VARIANTS_BRANCH,
|
||||
"file": VARIANTS_FILE,
|
||||
}
|
||||
|
||||
# RUNROOT
|
||||
runroot_channel = RUNROOT_CHANNEL
|
||||
runroot_tag = RUNROOT_TAG
|
||||
|
||||
# PKGSET
|
||||
pkgset_koji_tag = PKGSET_KOJI_TAG
|
||||
pkgset_koji_module_tag = PKGSET_KOJI_MODULE_TAG
|
||||
|
||||
# Allow overriding any option defined here if needed.
|
||||
from shared/all import *
|
||||
from fedora/override import *
|
||||
|
@ -24,7 +24,7 @@ pkgset_koji_builds = [
|
||||
# No jigdo needed in Fedora.
|
||||
create_jigdo = False
|
||||
|
||||
# We only build repositories and installer in Fedora so far.
|
||||
# We only build repositories, installer and images in Fedora so far.
|
||||
skip_phases = [
|
||||
"createiso",
|
||||
"live_media",
|
||||
@ -32,35 +32,6 @@ skip_phases = [
|
||||
"ostree",
|
||||
"osbs",
|
||||
"extra_isos",
|
||||
#"image_build"
|
||||
]
|
||||
|
||||
# Build installer only from BaseOS x86_64.
|
||||
buildinstall_skip = [
|
||||
('^BaseOS$', {
|
||||
'i386': True,
|
||||
'aarch64': True,
|
||||
'ppc64le': True,
|
||||
's390x': True
|
||||
}),
|
||||
('^Everything$', {
|
||||
'i386': True,
|
||||
'aarch64': True,
|
||||
'ppc64le': True,
|
||||
's390x': True
|
||||
}),
|
||||
("^(AppStream|CRB|ResilientStorage|HighAvailability|SAP|SAPHANA|RT|NFV)$", {
|
||||
'*': True
|
||||
}),
|
||||
]
|
||||
|
||||
# Everything contains everything.
|
||||
additional_packages = [
|
||||
('^Everything$', {
|
||||
'*': [
|
||||
'*',
|
||||
],
|
||||
}),
|
||||
]
|
||||
|
||||
# Enables macboot on x86_64 for all variants and disables upgrade image building
|
||||
@ -75,7 +46,7 @@ lorax_options = [
|
||||
'noupgrade': True,
|
||||
'rootfs_size': 3,
|
||||
# This is used to use ELN lorax templates instead of Fedora ones.
|
||||
'configuration_file': 'lorax.conf'
|
||||
'configuration_file': 'fedora/lorax.conf'
|
||||
}
|
||||
})
|
||||
]
|
||||
@ -92,13 +63,6 @@ variant_as_lookaside = [
|
||||
# source and "deps" method.
|
||||
# Generate gather_source.json on-the-fly using the prepopulate scm dict,
|
||||
# store it into /srv/odcs and use it from there.
|
||||
gather_prepopulate = {
|
||||
'scm': 'git',
|
||||
'repo': "https://pagure.io/pungi-fedora.git",
|
||||
'branch': "eln",
|
||||
'file': "prepopulate.json",
|
||||
'command': "echo {} > prepopulate.json; ./content-resolver-to-gather-source-json; cp gather_source.json /srv/odcs"
|
||||
}
|
||||
gather_source_mapping = "/srv/odcs/gather_source.json"
|
||||
|
||||
gather_method = {
|
||||
@ -112,10 +76,6 @@ gather_method = {
|
||||
# No product_id for Fedora.
|
||||
product_id_allow_missing = False
|
||||
|
||||
variants_file = "variants.xml"
|
||||
|
||||
|
||||
|
||||
# These will be inherited by live_media, live_images and image_build
|
||||
global_ksurl = 'git+https://pagure.io/fedora-kickstarts.git?#HEAD'
|
||||
global_release = '!RELEASE_FROM_LABEL_DATE_TYPE_RESPIN'
|
||||
|
@ -23,9 +23,12 @@ VARIANTS_BRANCH = "eln"
|
||||
VARIANTS_FILE = "variants.xml"
|
||||
|
||||
|
||||
GATHER_PREPOPULATE_REPO = None
|
||||
GATHER_PREPOPULATE_BRANCH = None
|
||||
GATHER_PREPOPULATE_FILE = None
|
||||
# Generate gather_source.json on-the-fly using the prepopulate scm dict,
|
||||
# store it into /srv/odcs and use it from there.
|
||||
GATHER_PREPOPULATE_REPO = "https://pagure.io/pungi-fedora.git"
|
||||
GATHER_PREPOPULATE_BRANCH = "eln"
|
||||
GATHER_PREPOPULATE_FILE = "prepopulate.json"
|
||||
GATHER_PREPOPULATE_COMMAND = "echo {} > prepopulate.json; ./content-resolver-to-gather-source-json; cp gather_source.json /srv/odcs"
|
||||
|
||||
|
||||
RUNROOT_CHANNEL = "compose"
|
||||
@ -34,3 +37,10 @@ RUNROOT_TAG = "eln-build"
|
||||
|
||||
PKGSET_KOJI_TAG = "eln"
|
||||
PKGSET_KOJI_MODULE_TAG = "eln-modular"
|
||||
|
||||
EXTRA_BUILDINSTALL_SKIP = ('^BaseOS$', {
|
||||
'i386': True,
|
||||
'aarch64': True,
|
||||
'ppc64le': True,
|
||||
's390x': True
|
||||
})
|
||||
|
@ -8,6 +8,24 @@ filter_packages = [
|
||||
}),
|
||||
]
|
||||
|
||||
|
||||
additional_packages = [
|
||||
# Everything contains everything.
|
||||
('^Everything$', {
|
||||
'*': [
|
||||
'*',
|
||||
],
|
||||
}),
|
||||
("^AppStream$", {
|
||||
"*": [
|
||||
"cloud-init",
|
||||
"cloud-utils-growpart",
|
||||
"dnf-utils",
|
||||
]
|
||||
}),
|
||||
]
|
||||
|
||||
|
||||
#
|
||||
# filter_packages = [
|
||||
# ("^(BaseOS|AppStream|HighAvailability|NFV|RT|ResilientStorage)$", {
|
||||
|
10
shared/all.conf
Normal file
10
shared/all.conf
Normal file
@ -0,0 +1,10 @@
|
||||
from general import *
|
||||
from multilib import *
|
||||
from additional_and_filter_packages import *
|
||||
from runroot import *
|
||||
from pkgset import *
|
||||
from gather import *
|
||||
from createrepo import *
|
||||
from createiso import *
|
||||
from buildinstall import *
|
||||
from lookaside import *
|
@ -8,10 +8,16 @@ lorax_options = [
|
||||
})
|
||||
]
|
||||
|
||||
# Skip buildinstall for AppStream for all architectures
|
||||
buildinstall_skip = [
|
||||
("^(AppStream|HighAvailability|ResilientStorage|RT|NFV|CRB|SAP|SAPHANA)$", {
|
||||
"*": True
|
||||
EXTRA_BUILDINSTALL_SKIP,
|
||||
('^Everything$', {
|
||||
'i386': True,
|
||||
'aarch64': True,
|
||||
'ppc64le': True,
|
||||
's390x': True
|
||||
}),
|
||||
("^(AppStream|CRB|ResilientStorage|HighAvailability|SAP|SAPHANA|RT|NFV)$", {
|
||||
'*': True
|
||||
}),
|
||||
]
|
||||
|
||||
|
@ -12,3 +12,11 @@ gather_method = {
|
||||
hashed_directories = False
|
||||
gather_allow_reuse = True
|
||||
repoclosure_backend = 'dnf'
|
||||
|
||||
gather_prepopulate = {
|
||||
'scm': 'git',
|
||||
'repo': GATHER_PREPOPULATE_REPO,
|
||||
'branch': GATHER_PREPOPULATE_BRANCH,
|
||||
'file': GATHER_PREPOPULATE_FILE,
|
||||
'command': GATHER_PREPOPULATE_COMMAND
|
||||
}
|
||||
|
@ -1,3 +1,31 @@
|
||||
release_name = RELEASE_NAME
|
||||
release_short = RELEASE_SHORT
|
||||
release_version = RELEASE_VERSION
|
||||
release_is_layered = False
|
||||
|
||||
link_type = "abspath-symlink"
|
||||
product_id_allow_missing = True
|
||||
productimg = False
|
||||
|
||||
|
||||
comps_file = {
|
||||
'scm': 'git',
|
||||
'repo': COMPS_REPO,
|
||||
'branch': COMPS_BRANCH,
|
||||
'file': COMPS_FILE,
|
||||
'command': COMPS_COMMAND
|
||||
}
|
||||
|
||||
module_defaults_dir = {
|
||||
'scm': 'git',
|
||||
'repo': MODULE_DEFAULTS_REPO,
|
||||
'branch': MODULE_DEFAULTS_BRANCH,
|
||||
'dir': '.'
|
||||
}
|
||||
|
||||
variants_file = {
|
||||
"scm": "git",
|
||||
"repo": VARIANTS_REPO,
|
||||
"branch": VARIANTS_BRANCH,
|
||||
"file": VARIANTS_FILE,
|
||||
}
|
||||
|
@ -1 +1,3 @@
|
||||
pkgset_source = "koji"
|
||||
pkgset_koji_tag = PKGSET_KOJI_TAG
|
||||
pkgset_koji_module_tag = PKGSET_KOJI_MODULE_TAG
|
||||
|
@ -5,3 +5,6 @@ global_runroot_method = "koji"
|
||||
runroot_method = {
|
||||
"createiso": "local"
|
||||
}
|
||||
|
||||
runroot_channel = RUNROOT_CHANNEL
|
||||
runroot_tag = RUNROOT_TAG
|
||||
|
31
shared/variables.conf
Normal file
31
shared/variables.conf
Normal file
@ -0,0 +1,31 @@
|
||||
global RELEASE_NAME
|
||||
global RELEASE_SHORT
|
||||
global RELEASE_VERSION
|
||||
global PKGSET_KOJI_TAG
|
||||
global PKGSET_KOJI_MODULE_TAG
|
||||
global RUNROOT_CHANNEL
|
||||
global RUNROOT_TAG
|
||||
global RELEASE_VERSION
|
||||
global RELEASE_VERSION_X
|
||||
global RELEASE_VERSION_Y
|
||||
global RELEASE_VERSION_Z
|
||||
global RELEASE_VERSION_XY
|
||||
global RELEASE_VERSION_XYZ
|
||||
global COMPS_REPO
|
||||
global COMPS_BRANCH
|
||||
global COMPS_FILE
|
||||
global COMPS_COMMAND
|
||||
global MODULE_DEFAULTS_REPO
|
||||
global MODULE_DEFAULTS_BRANCH
|
||||
global VARIANTS_REPO
|
||||
global VARIANTS_BRANCH
|
||||
global VARIANTS_FILE
|
||||
global GATHER_PREPOPULATE_REPO
|
||||
global GATHER_PREPOPULATE_BRANCH
|
||||
global GATHER_PREPOPULATE_FILE
|
||||
global EXTRA_BUILDINSTALL_SKIP
|
||||
EXTRA_BUILDINSTALL_SKIP = ("^$", {"*": False})
|
||||
global GATHER_PREPOPULATE_REPO
|
||||
global GATHER_PREPOPULATE_BRANCH
|
||||
global GATHER_PREPOPULATE_FILE
|
||||
global GATHER_PREPOPULATE_COMMAND
|
Loading…
Reference in New Issue
Block a user