Software /
code /
prosody
Annotate
tools/build-env/build.sh @ 13439:1e229d710a3c
util.signal: Add support for signalfd(2) on Linux
signalfd allows handling signal events using the same method as sockets,
via file descriptors. Thus all signal dispatch can go through the same
main event loop as everything else, removing need for thread-scary
signal handling where execution would just jump to the signal handler
regardless of the state of Lua, and needing to keep track of Lua
states/threads.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 24 Feb 2024 00:05:29 +0100 |
parent | 13403:0369f6986824 |
rev | line source |
---|---|
13323
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 #!/bin/sh -eux |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 cd "$(dirname "$0")" |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 |
13403
0369f6986824
tools: Fix selection of container engine
Kim Alvefur <zash@zash.se>
parents:
13323
diff
changeset
|
5 containerify="$(command -v podman || command -v docker)" |
0369f6986824
tools: Fix selection of container engine
Kim Alvefur <zash@zash.se>
parents:
13323
diff
changeset
|
6 |
0369f6986824
tools: Fix selection of container engine
Kim Alvefur <zash@zash.se>
parents:
13323
diff
changeset
|
7 if [ -z "$containerify" ]; then |
0369f6986824
tools: Fix selection of container engine
Kim Alvefur <zash@zash.se>
parents:
13323
diff
changeset
|
8 echo "podman or docker required" >&2 |
0369f6986824
tools: Fix selection of container engine
Kim Alvefur <zash@zash.se>
parents:
13323
diff
changeset
|
9 exit 1 |
0369f6986824
tools: Fix selection of container engine
Kim Alvefur <zash@zash.se>
parents:
13323
diff
changeset
|
10 fi |
13323
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 $containerify build -f ./Containerfile --squash \ |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 --build-arg os="${2:-debian}" \ |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 --build-arg dist="${1:-testing}" \ |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 -t "prosody.im/build-env:${1:-testing}" |
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 |