# PRODUCT INFO
release_name = 'Fedora-IoT'
release_short = 'Fedora-IoT'
release_version = '31'
release_is_layered = False
# Let's not build install media during this run. For the image builds
# and OSTree installer we'll use inputs from other f31 runs.
skip_phases = ["buildinstall", "productimg", "extra_files"]
ostree_installer_overwrite = True

# GENERAL SETTINGS
bootable = True
comps_file = {
    'scm': 'git',
    'repo': 'https://pagure.io/fedora-comps.git',
    'branch': 'master',
    'file': 'comps-f31.xml',
    'command': 'make comps-f31.xml'
}
variants_file='variants-fedora.xml'
sigkeys = ['3C3359C4']
# limit tree architectures
# if undefined, all architectures from variants.xml will be included
# tree_arches = ['aarch64', 'armhfp', 'x86_64']
# limit tree variants
# if undefined, all variants from variants.xml will be included
tree_variants = ['IoT']
hashed_directories = True
# RUNROOT settings
runroot = True
runroot_channel = 'compose'
runroot_tag = 'f31-build'
# PKGSET
pkgset_source = 'koji' # koji, repos

# PKGSET - REPOS
# pkgset_repos format: {arch: [repo1_url, repo2_url, ...]}
# pkgset_repos = {}

# PKGSET - KOJI
#pkgset_koji_tag = 'f31-atomic'
pkgset_koji_tag = 'f31-iot'
pkgset_koji_inherit = False

filter_system_release_packages = False

# GATHER
gather_method = 'deps'
gather_profiler = True
check_deps = False
greedy_method = 'build'
# CREATEREPO
createrepo_c = True
createrepo_checksum = 'sha256'
# CHECKSUMS
media_checksums = ['sha256']
media_checksum_one_file = True
media_checksum_base_filename = 'Fedora-%(variant)s-%(version)s-%(date)s.%(respin)s-%(arch)s'
#jigdo
create_jigdo = False

# BUILDINSTALL
buildinstall_method = 'lorax'
buildinstall_skip = [
    ('^Modular$', {
        '*': True
    }),
]

# Enables macboot on x86_64 for all variants and disables upgrade image building
# # everywhere.
lorax_options = [
  ('^.*$', {
     'x86_64': {
         'nomacboot': False
     },
     '*': {
         'noupgrade': True
     }
  })
]

# We just grab everything, since everything that's gather'ed is meant as an
# override.
additional_packages = [
    ('^IoT$$', {
        '*': [
            '*',
        ],
    }),
]
multilib = [
    ('^Everything$', {
        'x86_64': ['devel', 'runtime'],
         's390x': ['devel', 'runtime']
    })
]
filter_packages = []
# format: {arch|*: [packages]}
multilib_blacklist = {
    '*': ['kernel', 'kernel-PAE*', 'kernel*debug*',
        'dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel',
        'php-devel', 'java-*',
        'httpd-devel', 'tomcat-native', 'php*', 'httpd',
        'krb5-server', 'krb5-server-ldap', 'mod_*', 'ghc-*'
    ],
}
# format: {arch|*: [packages]}
multilib_whitelist = {
    '*': ['libgnat', 'wine', 'lmms-vst', 'nspluginwrapper',
        'libflashsupport', 'valgrind', 'perl-libs', 'redhat-lsb',
        'yaboot', 'syslinux-extlinux-nonlinux', 'syslinux-nonlinux',
        'syslinux-tftpboot', 'nosync', '*-static', 'apitrace-libs',
        'fakeroot-libs', 'postgresql-odbc', 'mysql-connector-odbc',
        'fakechroot-libs','mesa-vdpau-drivers', 'p11-kit-trust',
        'mariadb-connector-odbc', 'compiler-rt'
    ],
}
createiso_skip = [
        ('^Workstation$', {
            '*': True,
            'src': True
        }),

        ('^Server$', {
            'src': True
        }),

        ('^Everything$', {
            '*': True,
            'src': True
        }),

        ('^Modular$', {
            '*': True,
            'src': True
        }),
    ]

# fomat: [(variant_uid_regex, {arch|*: [scm_dicts]})]
#extra_files = [
#    ('^(Server|Workstation)$', {
#        '*': [
#            {
#                'scm': 'rpm',
#                'repo': 'fedora-release-%(variant_id_lower)s',
#                'branch': None,
#                'file': [
#                    '/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-release',
#                ],
#                'target': '',
#            },
#        ],
#    }),
#]
# Image name respecting Fedora's image naming policy
image_name_format = 'Fedora-%(variant)s-%(disc_type)s-%(arch)s-%(version)s-%(date)s.%(respin)s.iso'
# # Use the same format for volume id
image_volid_formats = [
     'Fedora-%(variant)s-%(disc_type)s-%(arch)s-%(version)s'
     ]
# No special handling for layered products, use same format as for regular images
image_volid_layered_product_formats = []
# Used by Pungi to replace 'Cloud' with 'C' (etc.) in ISO volume IDs.
# There is a hard 32-character limit on ISO volume IDs, so we use
# these to try and produce short enough but legible IDs. Note this is
# duplicated in Koji for live images, as livemedia-creator does not
# allow Pungi to tell it what volume ID to use. Note:
# https://fedoraproject.org/wiki/User:Adamwill/Draft_fedora_image_naming_policy
# '-Workstation-' is a temporary workaround. See
# https://pagure.io/pungi-fedora/pull-request/525
volume_id_substitutions = {
                 'Beta': 'B',
              'Rawhide': 'rawh',
        'Astronomy_KDE': 'AstK',
           'AtomicHost': 'AH',
    'AtomicWorkstation': 'AW',
             'Cinnamon': 'Cinn',
                'Cloud': 'C',
         'Design_suite': 'Dsgn',
       'Electronic_Lab': 'Elec',
           'Everything': 'E',
                'Games': 'Game',
               'Images': 'img',
                  'IoT': 'iot',
              'Jam_KDE': 'Jam',
          'MATE_Compiz': 'MATE',
     # Note https://pagure.io/pungi-fedora/issue/533
     'Python-Classroom': 'Clss',
     'Python_Classroom': 'Clss',
             'Robotics': 'Robo',
       'Scientific_KDE': 'SciK',
             'Security': 'Sec',
               'Server': 'S',
        '-Workstation-': '-WS-',
}

disc_types = {
    'boot': 'netinst',
    'live': 'Live',
}

translate_paths = [
   ('/mnt/koji/compose/', 'http://kojipkgs.fedoraproject.org/compose/'),
]

# These will be inherited by live_media, live_images and image_build
global_ksurl = 'git+https://pagure.io/fedora-kickstarts.git?#origin/f31'
global_release = '!RELEASE_FROM_LABEL_DATE_TYPE_RESPIN'
global_version = '31'
# live_images ignores this in favor of live_target
global_target = 'f31'
image_build = {
    '^IoT$': [
        {
            'image-build': {
                    'format': [('raw-xz','raw.xz')],
                    'name': 'Fedora-IoT',
                    'kickstart': 'fedora-iot.ks',
                    'distro': 'Fedora-22',
                    'disk_size': 4,
                    'arches': ['aarch64', 'x86_64'],
                    'install_tree_from': "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$arch/os/",
                    'subvariant': 'IoT',
                     }
        }
        ],
}

ostree = [
    ("^IoT$", {
        "aarch64": {
            "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN",
            "treefile": "fedora-iot.json",
            "config_url": "https://pagure.io/fedora-iot/ostree.git",
            "config_branch": "f31",
            "repo": [
                "IoT",
                "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$basearch/os/",
                "https://kojipkgs.fedoraproject.org/compose/updates/f31-updates/compose/Everything/$basearch/os/",
            ]
            "tag_ref": False,
            "ostree_repo": "/mnt/koji/compose/iot/repo/",
            'failable': ['*'],
            'update_summary': True,
        },
        "armhfp": {
            "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN",
            "treefile": "fedora-iot.json",
            "config_url": "https://pagure.io/fedora-iot/ostree.git",
            "config_branch": "f31",
            "repo": [
                "IoT",
                "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$basearch/os/",
                "https://kojipkgs.fedoraproject.org/compose/updates/f31-updates/compose/Everything/$basearch/os/",
            ]
            "tag_ref": False,
            "ostree_repo": "/mnt/koji/compose/iot/repo/",
            'failable': ['*'],
            'update_summary': True,
        },
        "x86_64": {
            "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN",
            "treefile": "fedora-iot.json",
            "config_url": "https://pagure.io/fedora-iot/ostree.git",
            "config_branch": "f31",
            "repo": [
                "IoT",
                "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$basearch/os/",
                "https://kojipkgs.fedoraproject.org/compose/updates/f31-updates/compose/Everything/$basearch/os/",
            ]
            "tag_ref": False,
            "ostree_repo": "/mnt/koji/compose/iot/repo/",
            'failable': ['*'],
            'update_summary': True,
        }
    })
]

ostree_installer = [
    ("^IoT$", {
        "aarch64": {
            "repo": [
                "IoT",
                "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$arch/os/",
            ],
            "release": None,
            "rootfs_size": "4",
            "add_template": ["ostree-based-installer/lorax-configure-repo.tmpl",
                             "ostree-based-installer/lorax-embed-repo.tmpl"],
            "add_template_var": [
                "ostree_install_repo=https://kojipkgs.fedoraproject.org/compose/iot/repo/",
                "ostree_update_repo=https://ostree.fedoraproject.org/iot/",
                "ostree_osname=fedora-iot",
                "ostree_oskey=fedora-31-primary",
                "ostree_contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist",
                "ostree_install_ref=fedora/stable/aarch64/iot",
                "ostree_update_ref=fedora/stable/aarch64/iot",
            ],
            'template_repo': 'https://pagure.io/fedora-lorax-templates.git',
            'template_branch': 'f31',
        },
        "armhfp": {
            "repo": [
                "IoT",
                "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$arch/os/",
            ],
            "release": None,
            "rootfs_size": "4",
            "add_template": ["ostree-based-installer/lorax-configure-repo.tmpl",
                             "ostree-based-installer/lorax-embed-repo.tmpl"],
            "add_template_var": [
                "ostree_install_repo=https://kojipkgs.fedoraproject.org/compose/iot/repo/",
                "ostree_update_repo=https://ostree.fedoraproject.org/iot/",
                "ostree_osname=fedora-iot",
                "ostree_oskey=fedora-31-primary",
                "ostree_contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist",
                "ostree_install_ref=fedora/stable/armhfp/iot",
                "ostree_update_ref=fedora/stable/armhfp/iot",
            ],
            'template_repo': 'https://pagure.io/fedora-lorax-templates.git',
            'template_branch': 'f31',
        },
        "x86_64": {
            "repo": [
                "IoT",
                "https://kojipkgs.fedoraproject.org/compose/31/latest-Fedora-31/compose/Everything/$arch/os/",
            ],
            "release": None,
            "rootfs_size": "4",
            "add_template": ["ostree-based-installer/lorax-configure-repo.tmpl",
                             "ostree-based-installer/lorax-embed-repo.tmpl"],
            "add_template_var": [
                "ostree_install_repo=https://kojipkgs.fedoraproject.org/compose/iot/repo/",
                "ostree_update_repo=https://ostree.fedoraproject.org/iot/",
                "ostree_osname=fedora-iot",
                "ostree_oskey=fedora-31-primary",
                "ostree_contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist",
                "ostree_install_ref=fedora/stable/x86_64/iot",
                "ostree_update_ref=fedora/stable/x86_64/iot",
            ],
            'template_repo': 'https://pagure.io/fedora-lorax-templates.git',
            'template_branch': 'f31',
        }
    })
]
koji_profile = 'compose_koji'
