forked from QubesOS/qubes-builder-rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock-fedora.cfg
87 lines (79 loc) · 2.67 KB
/
mock-fedora.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# global options
config_opts['cache_topdir'] = os.environ['CACHEDIR']
config_opts['basedir'] = os.environ['CHROOT_DIR'] + '/mock'
config_opts['use_bootstrap_container'] = False
config_opts['root'] = 'fedora-{}-x86_64'.format(os.environ['DIST'].replace('fc', ''))
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
config_opts['dist'] = os.environ.get('DIST') # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['releasever'] = os.environ['DIST'].replace('fc', '')
config_opts['package_manager'] = 'dnf'
config_opts['nosync'] = True
config_opts['nosync_force'] = True
config_opts['macros']['source_date_epoch_from_changelog'] = 'Y'
config_opts['macros']['clamp_mtime_to_source_date_epoch'] = 'Y'
config_opts['macros']['use_source_date_epoch_as_buildtime'] = 'Y'
config_opts['macros']['_buildhost'] = 'reproducible'
config_opts['yum.conf'] = """
[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
install_weak_deps=0
metadata_expire=0
mdpolicy=group:primary
best=1
# repos
[fedora]
name=fedora
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary
gpgcheck=1
skip_if_unavailable=0
[updates]
name=updates
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary
gpgcheck=1
skip_if_unavailable=0
[builder-local]
name=builder-local
baseurl=file://{builder_repo_dir}
gpgcheck=0
exclude=qubes-release
skip_if_unavailable=0
[qubes-current]
name=qubes-{package_set}-current
baseurl=https://yum.qubes-os.org/r{qubes_version}/current/{package_set}/fc$releasever
failovermethod=priority
gpgkey=file://{keys_dir}/RPM-GPG-KEY-qubes-{qubes_version}-primary
gpgcheck=1
exclude=qubes-release
enabled=0
skip_if_unavailable=0
[qubes-current-testing]
name=qubes-{package_set}-testing
baseurl=https://yum.qubes-os.org/r{qubes_version}/current-testing/{package_set}/fc$releasever
failovermethod=priority
gpgkey=file://{keys_dir}/RPM-GPG-KEY-qubes-{qubes_version}-primary
gpgcheck=1
exclude=qubes-release
enabled=0
skip_if_unavailable=0
""".format(
package_set=os.environ['PACKAGE_SET'],
qubes_version=os.environ['USE_QUBES_REPO_VERSION'],
keys_dir=(os.environ['RPM_PLUGIN_DIR'] + '/keys'),
builder_repo_dir=os.environ['BUILDER_REPO_DIR'],
)