Skip to content

Commit

Permalink
Tune OpenBSD support (#219)
Browse files Browse the repository at this point in the history
Tune OpenBSD support based on learnings from using crt-builder with downstream CRT projects.

- Don't explicitly install python (python has to be installed before running builder so this was redundant at best and just slowed the build at wost)
- Do install git
- Make mention of OpenBSD in the README
- Revert support for doas introduced in 88a4d05 (I've pivoted to a different GitHub action which includes sudo in its OpenBSD VM)
  • Loading branch information
knightjoel authored Mar 1, 2023
1 parent be0bd01 commit a1ac817
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Usage: ```builder.pyz [build|inspect|<action-name>] [spec] [OPTIONS]```
* macos|darwin: x64|x86_64
* windows: x86, x64
* freebsd: x64
* openbsd: x64

### Example build
```builder.pyz build --project=aws-c-common downstream```
Expand Down
16 changes: 1 addition & 15 deletions builder/actions/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,7 @@ def run(self, env):
args = parser.parse_known_args(env.args.args)[0]

sudo = config.get('sudo', current_os() == 'linux')
if sudo is True:
# If (a) the 'sudo' config parameter is set to True, or (b) the
# config parameter is not set and the current OS is Linux: use
# 'sudo'.
sudo = ['sudo']
elif sudo is False:
# If (a) the 'sudo' config parameter is set to False or (b) the
# 'sudo' config parameter is not set and the current OS is not
# Linux: do not use a privilege elevation command.
sudo = []
else:
# The 'sudo' config parameter is set and its value is something
# other than True: consider the value to be a command (e.g.,
# 'doas').
sudo = [sudo]
sudo = ['sudo'] if sudo else []

packages = self.packages if self.packages else config.get(
'packages', [])
Expand Down
4 changes: 2 additions & 2 deletions builder/core/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ class PKG_TOOLS(Enum):
'variables': {
'python': "python3",
},
'sudo': 'doas',
'sudo': True,

'pkg_tool': PKG_TOOLS.OBSD_PKG,
'packages': [
'cmake',
'python%3.10',
'git',
],
'pkg_install': 'pkg_add -I'
}
Expand Down

0 comments on commit a1ac817

Please sign in to comment.