summaryrefslogtreecommitdiffstats
path: root/examples/packages/1/repo/config.toml
blob: 79f9fc8f001d98603f348ad6a994ed8aed7fe1af (plain)
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
# Configuration file for BUTIDO for this repository

# In the example, these are configured via the environment.
# See README.md
#releases     = "/tmp/example-1-releases"
#staging      = "/tmp/example-1-staging"
#source_cache = "/tmp/example-1-sources"
#log_dir      = "/tmp/example-1-logs"
#database_host     = "localhost"
#database_port     = 5432
#database_user     = "pgdev"
#database_password = "password"
#database_name     = "butido"

script_highlight_theme = "Solarized (dark)"

script_linter = "linterscript"

# Phases which can be configured in the packages
available_phases = [ "checksource", "unpack", "build", "package" ]

[docker]
# Images which can be used to build
# images not listed here are automatically rejected
images = [ "debian:bullseye" ]
verify_images_present = true

# List of docker endpoints
[[docker.endpoints]]
name          = "localhost"
uri           = "http://0.0.0.0:8095"
endpoint_type = "http"
speed         = 1
maxjobs       = 10

[containers]
# environment variables which are allowed during container start
# This way, errors (typos) when passing environment to a build can be prevented
check_env_names = true
allowed_env = [ "FOO", "BAR" ]
>}/sys/devices" cpufreq_sys_depth=10 cpufreq_source_update=1 # _update_every is a special variable - it holds the number of seconds # between the calls of the _update() function cpufreq_update_every= cpufreq_priority=10000 cpufreq_find_all_files() { find $1 -maxdepth $cpufreq_sys_depth -name scaling_cur_freq 2>/dev/null } # _check is called once, to find out if this chart should be enabled or not cpufreq_check() { # this should return: # - 0 to enable the chart # - 1 to disable the chart [ -z "$( cpufreq_find_all_files $cpufreq_sys_dir )" ] && return 1 return 0 } # _create is called once, to create the charts cpufreq_create() { local dir= file= id= i= # we create a script with the source of the # cpufreq_update() function # - the highest speed we can achieve - [ $cpufreq_source_update -eq 1 ] && echo >$TMP_DIR/cpufreq.sh "cpufreq_update() {" echo "CHART cpu.cpufreq '' 'CPU Clock' 'MHz' 'cpufreq' '' line $((cpufreq_priority + 1)) $cpufreq_update_every" echo >>$TMP_DIR/cpufreq.sh "echo \"BEGIN cpu.cpufreq \$1\"" i=0 for file in $( cpufreq_find_all_files $cpufreq_sys_dir | sort -u ) do i=$(( i + 1 )) dir=$( dirname $file ) cpu= [ -f $dir/affected_cpus ] && cpu=$( cat $dir/affected_cpus ) [ -z "$cpu" ] && cpu="$i.a" id="$( fixid "cpu$cpu" )" debug "file='$file', dir='$dir', cpu='$cpu', id='$id'" echo "DIMENSION $id '$id' absolute 1 1000" echo >>$TMP_DIR/cpufreq.sh "echo \"SET $id = \"\$(< $file )" done echo >>$TMP_DIR/cpufreq.sh "echo END" [ $cpufreq_source_update -eq 1 ] && echo >>$TMP_DIR/cpufreq.sh "}" # ok, load the function cpufreq_update() we created [ $cpufreq_source_update -eq 1 ] && . $TMP_DIR/cpufreq.sh return 0 } # _update is called continuously, to collect the values cpufreq_update() { # the first argument to this function is the microseconds since last update # pass this parameter to the BEGIN statement (see bellow). # do all the work to collect / calculate the values # for each dimension # remember: KEEP IT SIMPLE AND SHORT [ $cpufreq_source_update -eq 0 ] && . $TMP_DIR/cpufreq.sh $1 return 0 }