config update, oops

This commit is contained in:
brent s. 2017-04-11 08:09:50 -04:00
parent ac7bfa7320
commit eec74f16e6
9 changed files with 128 additions and 1 deletions

View File

@ -62,7 +62,7 @@ archboot = ${prepdir}/${bdisk:name}
mountpt = /mnt/${bdisk:uxname} mountpt = /mnt/${bdisk:uxname}
multiarch = yes multiarch = yes
sign = yes sign = yes
ipxe = ipxe = no
i_am_a_racecar = yes i_am_a_racecar = yes


[gpg] [gpg]

View File

@ -0,0 +1,48 @@
# The modules found in here are for distro-specific differences in the builds.
# For instance, if you want to build a Debian-based BDisk, you'd specify pkg['install'] = ['apt-get', '-y', 'install', '%PKG%'],
# name this file as "debian.py", and set bdisk:distro as 'debian'.
# Note that the guest will need python installed. If distro is set as "NOCHECK", a distro check of the tarball won't be performed
# (as the distro check requires python be installed first).

# Special variables to be used in strings:
# %PKG% = the name of a package would be inserted here.

# This template uses Debian as an example.

# The name of the distro. Must match the output from platform.linux_distribution()[0].lower()
# Regex is supported.
distro = 'debian'

# The path to python. Can be either python 2.x (2.6 or higher) or 3.x.
pybin = '/usr/bin/python'

guestenv = {}
# The following environment variables will be set for the guest.
guestenv['DEBIAN_FRONTEND'] = 'noninteractive'

scripts = {}
# This variable can be used to perform some additional system tweaks and such. This is run before package installation.
# It must be formatted as a complete script- i.e. include a shebang etc.
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""

# This variable can be used to perform some additional system tweaks and such. This is run after package installation.
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""


pkg = {}
# The command, with arguments, in list format that should be run before we install software in the guest.
# For instance, if your guest distro requires a local package listing cache (nearly all of them do) to be
# updated first, this is where it would be run.
pkg['pre'] = ['apt-get', '-y', 'update']

# The command, with arguments, in a list format to install a package.
# Note that the command must be constructed in a way that does not require user interaction.
pkg['install'] = ['apt-get', '-y', 'install', '%PKG%']

# The command, with arguments, in list format to use to check if a package is installed.
# It should return 0 on exist status if it's installed. Any other exit status assumes the package is not installed.
pkg['check'] = ['dpkg-query', '-f', '${binary:Package}\n', '-W', '%PKG']

View File

@ -0,0 +1,11 @@
distro = 'arch'
pybin = '/usr/bin/python'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['pacman', '-Syyy']
pkg['install'] = ['apacman', '-S', '%PKG%']
pkg['check'] = ['pacman', '-Q', '%PKG']

View File

@ -0,0 +1,11 @@
distro = 'centos linux'
pybin = '/usr/bin/python'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['yum', 'makecache']
pkg['install'] = ['yum', '-y', 'install', '%PKG%']
pkg['check'] = ['rpm', '-qi', '%PKG']

View File

@ -0,0 +1,12 @@
distro = 'debian'
pybin = '/usr/bin/python'
guestenv['DEBIAN_FRONTEND'] = 'noninteractive'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['apt-get', '-q', '-y', 'update']
pkg['install'] = ['apt-get', '-q', '-y', '-o Dpkg::Options::="--force-confdef"', '-o Dpkg::Options::="--force-confold"', 'install', '%PKG%']
pkg['check'] = ['dpkg-query', '-f', "'${binary:Package}\n'", '-W', '%PKG']

View File

@ -0,0 +1,11 @@
distro = 'fedora'
pybin = '/usr/bin/python3'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['yum', 'makecache']
pkg['install'] = ['yum', '-y', 'install', '%PKG%']
pkg['check'] = ['rpm', '-qi', '%PKG']

View File

@ -0,0 +1,11 @@
distro = 'red hat enterprise linux (server|desktop)'
pybin = '/usr/bin/python'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['yum', 'makecache']
pkg['install'] = ['yum', '-y', 'install', '%PKG%']
pkg['check'] = ['rpm', '-qi', '%PKG']

View File

@ -0,0 +1,11 @@
distro = 'suse linux enterprise server'
pybin = '/usr/bin/python'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['zypper', 'refresh']
pkg['install'] = ['zypper', 'install', '--no-confirm', '-l', '%PKG%']
pkg['check'] = ['rpm', '-qi', '%PKG']

View File

@ -0,0 +1,12 @@
distro = 'ubuntu'
pybin = '/usr/bin/python'
guestenv['DEBIAN_FRONTEND'] = 'noninteractive'
script['pre'] = """#!/bin/bash
touch /root/BDISK
"""
script['post'] = """#!/bin/bash
rm -f /root/BDISK
"""
pkg['pre'] = ['apt-get', '-q', '-y', 'update']
pkg['install'] = ['apt-get', '-q', '-y', '-o Dpkg::Options::="--force-confdef"', '-o Dpkg::Options::="--force-confold"', 'install', '%PKG%']
pkg['check'] = ['dpkg-query', '-f', "'${binary:Package}\n'", '-W', '%PKG']