Move default releasever into pylorax DEFAULT_RELEASEVER

This makes it easier to update in one place, and hopefully not forget
for new releases.

Also update default platform id to f36.
This commit is contained in:
Brian C. Lane 2021-11-03 14:35:58 -07:00
parent 5d9830e88d
commit 87f9f77e24
4 changed files with 9 additions and 8 deletions

View File

@ -61,7 +61,8 @@ else:
DRACUT_DEFAULT = ["--xz", "--install", "/.buildstamp", "--no-early-microcode", "--add", "fips"]
# Used for DNF conf.module_platform_id
DEFAULT_PLATFORM_ID = "platform:f34"
DEFAULT_PLATFORM_ID = "platform:f36"
DEFAULT_RELEASEVER = "36"
class ArchData(DataHolder):
lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64")

View File

@ -22,7 +22,7 @@ import os
import sys
import argparse
from pylorax import vernum
from pylorax import DEFAULT_RELEASEVER, vernum
version = "{0}-{1}".format(os.path.basename(sys.argv[0]), vernum)
@ -306,7 +306,7 @@ def lmc_parser(dracut_default=""):
parser.add_argument("--project", default="Linux",
help="substituted for @PROJECT@ in bootloader config files")
parser.add_argument("--releasever", default="34",
parser.add_argument("--releasever", default=DEFAULT_RELEASEVER,
help="substituted for @VERSION@ in bootloader config files")
parser.add_argument("--volid", default=None, help="volume id")
parser.add_argument("--squashfs-only", action="store_true", default=False,

View File

@ -34,7 +34,7 @@ from pykickstart.constants import KS_SHUTDOWN
from pykickstart.version import makeVersion
# Use the Lorax treebuilder branch for iso creation
from pylorax import ArchData
from pylorax import DEFAULT_RELEASEVER, ArchData
from pylorax.base import DataHolder
from pylorax.executils import execWithRedirect
from pylorax.imgutils import DracutChroot, PartitionMount
@ -149,7 +149,7 @@ def dracut_args(opts):
def make_appliance(disk_img, name, template, outfile, networks=None, ram=1024,
vcpus=1, arch=None, title="Linux", project="Linux",
releasever="34"):
releasever=DEFAULT_RELEASEVER):
"""
Generate an appliance description file
@ -163,7 +163,7 @@ def make_appliance(disk_img, name, template, outfile, networks=None, ram=1024,
:param str arch: CPU architecture. Default is 'x86_64'
:param str title: Title, passed to template. Default is 'Linux'
:param str project: Project, passed to template. Default is 'Linux'
:param str releasever: Release version, passed to template. Default is 34
:param str releasever: Release version, passed to template.
"""
if not (disk_img and template and outfile):
return None

View File

@ -20,12 +20,12 @@ import dnf
import os
import shutil
from pylorax import DEFAULT_PLATFORM_ID
from pylorax import DEFAULT_PLATFORM_ID, DEFAULT_RELEASEVER
from pylorax.sysutils import flatconfig
def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
enablerepos=None, disablerepos=None,
tempdir="/var/tmp", proxy=None, releasever="34",
tempdir="/var/tmp", proxy=None, releasever=DEFAULT_RELEASEVER,
cachedir=None, logdir=None, sslverify=True, dnfplugins=None):
""" Create a dnf Base object and setup the repositories and installroot