# TODO:
# - add docker provider
# https://developer.fedoraproject.org/tools/docker/docker-installation.html
-# - avoid using network if possible (e.g. check first if pkgs are installed)
SYSTEMS = {
'fedora': [#'27', # EOLed
#'28', # EOLed
'29',
- '30'],
+ '30',
+ '31'],
'centos': ['7', '8'],
'rhel': ['8'],
'ubuntu': [#'16.04',
'18.04',
#'18.10', # EOLed
- '19.04'],
+ '19.04',
+ '19.10'],
'debian': [#'8',
'9',
'10'],
'fedora-29-virtualbox': {'bare': 'generic/fedora29', 'kea': 'godfryd/kea-fedora-29'},
'fedora-30-lxc': {'bare': 'godfryd/lxc-fedora-30', 'kea': 'godfryd/kea-fedora-30'},
'fedora-30-virtualbox': {'bare': 'generic/fedora30', 'kea': 'godfryd/kea-fedora-30'},
+ 'fedora-31-lxc': {'bare': 'isc/lxc-fedora-31', 'kea': 'isc/kea-fedora-31'},
+ 'fedora-31-virtualbox': {'bare': 'isc/vbox-fedora-31', 'kea': 'isc/kea-fedora-31'},
'centos-7-lxc': {'bare': 'godfryd/lxc-centos-7', 'kea': 'godfryd/kea-centos-7'},
'centos-7-virtualbox': {'bare': 'generic/centos7', 'kea': 'godfryd/kea-centos-7'},
'centos-8-lxc': {'bare': 'isc/lxc-centos-8', 'kea': 'isc/kea-centos-8'},
'ubuntu-18.10-virtualbox': {'bare': 'ubuntu/cosmic64', 'kea': 'godfryd/kea-ubuntu-18.10'},
'ubuntu-19.04-lxc': {'bare': 'godfryd/lxc-ubuntu-19.04', 'kea': 'godfryd/kea-ubuntu-19.04'},
'ubuntu-19.04-virtualbox': {'bare': 'ubuntu/disco64', 'kea': 'godfryd/kea-ubuntu-19.04'},
+ 'ubuntu-19.10-lxc': {'bare': 'isc/lxc-ubuntu-19.10', 'kea': 'isc/kea-ubuntu-19.10'},
+ 'ubuntu-19.10-virtualbox': {'bare': 'generic/ubuntu1910', 'kea': 'isc/kea-ubuntu-19.10'},
'debian-8-lxc': {'bare': 'godfryd/lxc-debian-8', 'kea': 'godfryd/kea-debian-8'},
'debian-8-virtualbox': {'bare': 'debian/jessie64', 'kea': 'godfryd/kea-debian-8'},
'debian-9-lxc': {'bare': 'godfryd/lxc-debian-9', 'kea': 'godfryd/kea-debian-9'},
elif system == 'FreeBSD':
system = system.lower()
revision = platform.release()
+ if '"' in revision:
+ revision = revision.replace('"', '')
return system.lower(), revision
if system == 'centos':
execute('sudo systemctl daemon-reload')
- if system == 'fedora' and revision == '30':
+ if system == 'fedora' and int(revision) >= 30:
execute("echo '-Xms1G -Xmx1G' | sudo tee -a /etc/cassandra/jvm.options")
execute('sudo systemctl start cassandra')
if 'docs' in features:
packages.extend(['python3-sphinx', 'texlive', 'texlive-collection-latexextra'])
+ if int(revision) >= 31:
+ packages.extend(['python3-sphinx_rtd_theme'])
if 'mysql' in features:
execute('sudo dnf remove -y community-mysql-devel || true')
if 'pgsql' in features:
packages.extend(['postgresql-devel', 'postgresql-server'])
- if revision in ['30']:
+ if int(revision) >= 30:
packages.extend(['postgresql-server-devel'])
if 'radius' in features:
elif system == 'fedora' and revision == '30':
frc.append('freeradius-client-1.1.7-isc20190916210635.fc30')
frc.append('freeradius-client-devel-1.1.7-isc20190916210635.fc30')
+ elif system == 'fedora' and revision == '31':
+ frc.append('freeradius-client-1.1.7-isc20191219090215.fc31')
+ frc.append('freeradius-client-devel-1.1.7-isc20191219090215.fc31')
elif system == 'centos' and revision == '7':
frc.append('freeradius-client-1.1.7-isc20190916210635.el7')
frc.append('freeradius-client-devel-1.1.7-isc20190916210635.el7')
DEFAULT_FEATURES = ['install', 'unittest', 'docs', 'perfdhcp']
ALL_FEATURES = ['install', 'distcheck', 'unittest', 'docs', 'mysql', 'pgsql', 'cql', 'native-pkg',
- 'radius', 'shell', 'forge', 'perfdhcp', 'ccache']
+ 'radius', 'shell', 'forge', 'perfdhcp', 'ccache', 'all']
def parse_args():
def _get_features(args):
features = set(vars(args)['with'])
- # distcheck is not compatible with defaults so do not add them
- if 'distcheck' not in features:
+
+ # establish initial set of features
+ if 'all' in features:
+ # special case 'all' but some of features needs to be removed
+ # as they are not compatible with others
+ features = set(ALL_FEATURES)
+ features.discard('all')
+ features.discard('distcheck')
+ features.discard('native-pkg')
+ features.discard('ccache')
+ elif 'distcheck' not in features:
+ # distcheck is not compatible with defaults so do not add defaults
features = features.union(DEFAULT_FEATURES)
+
nofeatures = set(args.without)
features = features.difference(nofeatures)
+
if hasattr(args, 'ccache_dir') and args.ccache_dir:
features.add('ccache')
+
+ # if we build native packages then some features are required and some not
if 'native-pkg' in features:
features.add('docs')
features.add('perfdhcp')
features.add('pgsql')
features.add('radius')
features.discard('unittest')
+
return features