Skip to content

Commit

Permalink
Merge pull request #239 from jkloetzke/fix-pre-commit
Browse files Browse the repository at this point in the history
Fix pre commit errors
  • Loading branch information
jkloetzke authored Nov 27, 2024
2 parents 108f804 + 4147e33 commit 766f478
Show file tree
Hide file tree
Showing 37 changed files with 206 additions and 208 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pre-commit
description: Run pre-commit check
on: [push, pull_request]
"on": [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
Expand All @@ -19,4 +19,4 @@ jobs:
${{ hashFiles('.pre-commit-config.yaml') }}"

- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
run: pre-commit run --color=always --all-files
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
args: ["--unsafe"]
# unsafe is needed to avoid:
# "could not determine a constructor for the tag '!expr'"
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
args: ["--unsafe"]
# unsafe is needed to avoid:
# "could not determine a constructor for the tag '!expr'"
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
- id: yamllint
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
- id: codespell
2 changes: 0 additions & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ rules:
indentation:
spaces: 4
indent-sequences: consistent
level: warning
key-duplicates:
forbid-duplicated-merge-keys: true
key-ordering: disable
line-length:
max: 120
# level: warning
new-line-at-end-of-file: enable
new-lines: enable
octal-values: enable
Expand Down
170 changes: 85 additions & 85 deletions classes/basement/rootrecipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,97 +4,97 @@ depends:
- if: !expr |
"${BOB_HOST_PLATFORM}" == "linux"
depends:
# Setup sandbox with corresponding toolchain
- name: devel::sandbox
use: [sandbox]
forward: True
- name: devel::sandbox-toolchain
use: [environment, tools]
forward: True
# Setup sandbox with corresponding toolchain
- name: devel::sandbox
use: [sandbox]
forward: True
- name: devel::sandbox-toolchain
use: [environment, tools]
forward: True
# Declare some initial tools that are needed to build the initial tools.
- name: devel::bootstrap-fake-pkg-config
use: [tools]
forward: True
# Declare some initial tools that are needed to build the initial tools.
- name: devel::bootstrap-fake-pkg-config
use: [tools]
forward: True
# Use compatibility toolchain that practically runs on all major
# distributions. The user might explicitly disable it's usage but this will
# then taint all binary artifacts built for the host.
- name: devel::host-compat-toolchain
use: [environment, tools]
forward: True
if: "${BASEMENT_HOST_COMPAT_TOOLCHAIN:-1}"
# Use compatibility toolchain that practically runs on all major
# distributions. The user might explicitly disable it's usage but this will
# then taint all binary artifacts built for the host.
- name: devel::host-compat-toolchain
use: [environment, tools]
forward: True
if: "${BASEMENT_HOST_COMPAT_TOOLCHAIN:-1}"
# Pick up all tools defined by the basement project. The downstream users
# can pick them as they like. Make sure to update the basement::buildall
# class to catch added tools too.
# Pick up all tools defined by the basement project. The downstream users
# can pick them as they like. Make sure to update the basement::buildall
# class to catch added tools too.
- name: devel::make
use: [tools]
forward: True
- name: devel::autotools
use: [tools]
forward: True
- name: devel::gettext
use: [tools]
forward: True
- name: devel::bison
use: [tools]
forward: True
- name: devel::cmake-bootstrap # CMake is self-hosted and has a circular
use: [tools] # dependency to itself in proper builds.
forward: True
- name: devel::pkg-config-tool
use: [tools]
forward: True
- name: python::python3-minimal
use: [tools]
forward: True
tools:
# To build python3 a working python interpreter is required. Build
# a bootstrap python3 interpreter with the native host toolchain.
# The real interpreter is then built with the
# host-compat-toolchain.
target-toolchain: host-native-toolchain
- name: python::python3
use: [tools]
forward: True
- name: devel::ninja
use: [tools]
forward: True
- name: devel::meson
use: [tools]
forward: True
- name: devel::flex
use: [tools]
forward: True
- name: devel::cmake # Overwrite "cmake" tool with properly
use: [tools] # built one.
forward: True
- name: core::util-linux
use: [tools]
forward: True
- name: devel::make
use: [tools]
forward: True
- name: devel::autotools
use: [tools]
forward: True
- name: devel::gettext
use: [tools]
forward: True
- name: devel::bison
use: [tools]
forward: True
- name: devel::cmake-bootstrap # CMake is self-hosted and has a circular
use: [tools] # dependency to itself in proper builds.
forward: True
- name: devel::pkg-config-tool
use: [tools]
forward: True
- name: python::python3-minimal
use: [tools]
forward: True
tools:
# To build python3 a working python interpreter is required. Build
# a bootstrap python3 interpreter with the native host toolchain.
# The real interpreter is then built with the
# host-compat-toolchain.
target-toolchain: host-native-toolchain
- name: python::python3
use: [tools]
forward: True
- name: devel::ninja
use: [tools]
forward: True
- name: devel::meson
use: [tools]
forward: True
- name: devel::flex
use: [tools]
forward: True
- name: devel::cmake # Overwrite "cmake" tool with properly
use: [tools] # built one.
forward: True
- name: core::util-linux
use: [tools]
forward: True
- if: !expr |
"${BOB_HOST_PLATFORM}" == "msys"
depends:
# Just declare the MSYS gcc as toolchain. The user will most probably
# use a visual studio toolchain or clang as target toolchain.
- name: devel::bootstrap-host-toolchain
use: [tools]
forward: True
# Just declare the MSYS gcc as toolchain. The user will most probably
# use a visual studio toolchain or clang as target toolchain.
- name: devel::bootstrap-host-toolchain
use: [tools]
forward: True
# Define a couple of tools. They are all native win32 executables for
# speed reasons.
- name: devel::bootstrap-fake-pkg-config
use: [tools]
forward: True
- name: devel::win::msbuild
use: [tools]
forward: True
- name: devel::win::cmake
use: [tools]
forward: True
- name: devel::win::ninja
use: [tools]
forward: True
# Define a couple of tools. They are all native win32 executables for
# speed reasons.
- name: devel::bootstrap-fake-pkg-config
use: [tools]
forward: True
- name: devel::win::msbuild
use: [tools]
forward: True
- name: devel::win::cmake
use: [tools]
forward: True
- name: devel::win::ninja
use: [tools]
forward: True
2 changes: 1 addition & 1 deletion recipes/core/coreutils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ depends:
- libs::gmp-dev
- use: []
depends:
- libs::gmp-tgt
- libs::gmp-tgt

checkoutSCM:
scm: url
Expand Down
4 changes: 2 additions & 2 deletions recipes/core/util-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ depends:

- use: []
depends:
- libs::ncurses-tgt
- libs::zlib-tgt
- libs::ncurses-tgt
- libs::zlib-tgt

checkoutSCM:
scm: url
Expand Down
8 changes: 4 additions & 4 deletions recipes/devel/bootstrap-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ depends:

# native toolchain installed in /toolchain
- environment:
GCC_PREFIX: "/toolchain"
BINUTILS_PREFIX: "/toolchain"
GCC_PREFIX: "/toolchain"
BINUTILS_PREFIX: "/toolchain"
depends:
- devel::binutils
- devel::gcc-native
- devel::binutils
- devel::gcc-native
14 changes: 7 additions & 7 deletions recipes/devel/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ multiPackage:
- net::curl-dev
- use: []
depends:
- libs::expat-tgt
- libs::jsoncpp-tgt
- libs::libarchive-tgt
- libs::libuv-tgt
- libs::rhash-tgt
- libs::zlib-tgt
- net::curl-tgt
- libs::expat-tgt
- libs::jsoncpp-tgt
- libs::libarchive-tgt
- libs::libuv-tgt
- libs::rhash-tgt
- libs::zlib-tgt
- net::curl-tgt

buildScript: |
cmakeBuild "$1" \
Expand Down
10 changes: 5 additions & 5 deletions recipes/devel/compat/gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ metaEnvironment:

depends:
- environment:
BASEMENT_LIBS: static
BASEMENT_LIBS: static
depends:
- libs::gmp-dev
- libs::mpfr-dev
- libs::mpc-dev
- libs::compat::isl-dev
- libs::gmp-dev
- libs::mpfr-dev
- libs::mpc-dev
- libs::compat::isl-dev

checkoutSCM:
scm: url
Expand Down
2 changes: 1 addition & 1 deletion recipes/devel/fakeroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ depends:

- use: []
depends:
- libs::libcap-tgt
- libs::libcap-tgt

checkoutSCM:
scm: url
Expand Down
12 changes: 6 additions & 6 deletions recipes/devel/gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ depends:

- use: []
depends:
- libs::gmp-tgt
- libs::mpfr-tgt
- libs::mpc-tgt
- libs::isl-tgt
- libs::gmp-tgt
- libs::mpfr-tgt
- libs::mpc-tgt
- libs::isl-tgt

checkoutSCM:
scm: url
Expand Down Expand Up @@ -159,11 +159,11 @@ multiPackage:
- name: libs::glibc
if: "$(eq,${GCC_LIBC},glibc)"
tools:
target-toolchain: cross-target-toolchain
target-toolchain: cross-target-toolchain
- name: libs::newlib
if: "$(eq,${GCC_LIBC},newlib)"
tools:
target-toolchain: cross-target-toolchain
target-toolchain: cross-target-toolchain

buildTools: [binutils]
buildVars: [GCC_LIBC, GCC_ENABLE_LANGUAGES]
Expand Down
6 changes: 3 additions & 3 deletions recipes/devel/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ depends:

- use: []
depends:
- libs::zlib-tgt
- libs::openssl-tgt
- net::curl-tgt
- libs::zlib-tgt
- libs::openssl-tgt
- net::curl-tgt

checkoutSCM:
scm: url
Expand Down
10 changes: 5 additions & 5 deletions recipes/devel/host-compat-toolchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ depends:
use: [tools]
forward: True
tools:
# To cross-compile python3, a working python interpreter is required.
# Instead, build the interpreter with the native host toolchain. It's
# just used for building glibc and won't be needed otherwise.
target-toolchain: host-native-toolchain
# To cross-compile python3, a working python interpreter is required.
# Instead, build the interpreter with the native host toolchain. It's
# just used for building glibc and won't be needed otherwise.
target-toolchain: host-native-toolchain

# Cross toolchain for the current architecture -> ARCH is left as is.
- name: devel::compat::cross-toolchain
use: [environment, tools]
forward: True
environment:
AUTOCONF_TARGET: "$(gen-autoconf,bob_isolation)"
AUTOCONF_TARGET: "$(gen-autoconf,bob_isolation)"

# Canadian cross toolchain. Built with above cross toolchain for the real
# $AUTOCONF_TARGET as set in environment above.
Expand Down
2 changes: 1 addition & 1 deletion recipes/devel/pkg-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ multiPackage:

- use: []
depends:
- libs::glib-tgt
- libs::glib-tgt

buildScript: |
export GLIB_CFLAGS="-I${BOB_DEP_PATHS[libs::glib-dev]}/usr/include/glib-2.0"
Expand Down
Loading

0 comments on commit 766f478

Please sign in to comment.