From 63204161233975328b4ca59e4269d79d2ae8d1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=BCller?= Date: Tue, 18 Jun 2024 14:34:14 +0200 Subject: [PATCH] pre-commit: introduce pre-commit and fix linters --- .devcontainer/devcontainer.json | 2 +- .github/dependabot.yml | 1 + .github/workflows/auto-merge-dependabot.yml | 3 +- .github/workflows/create-tag.yml | 3 +- .github/workflows/gitlab-helper.yml | 2 +- .github/workflows/pr_best_practices.yml | 5 +- .github/workflows/release.yml | 3 +- .github/workflows/stale-cleanup.yml | 3 +- .../test-osbuild-composer-intergation.yml | 9 ++- .github/workflows/tests.yml | 61 +++++++------- .github/workflows/trigger-gitlab.yml | 2 +- .../workflows/update-bootc-image-builder.yml | 2 +- .gitignore | 1 + .packit.yaml | 71 ++++++++-------- .pre-commit-config.yaml | 30 +++++++ .spellcheck-en-custom.txt | 81 +++++++++++++++++++ .spellcheck.yml | 28 +++++++ .yamllint | 6 ++ codecov.yml | 7 +- docs/developer/cmds.md | 2 +- docs/developer/code-manifest-generation.md | 2 +- docs/image-types/README.md | 2 +- docs/image-types/rhel8/google-gce.md | 4 +- docs/image-types/rhel8/microsoft-azure.md | 4 +- docs/image-types/rhel8/oracle-oci.md | 10 +-- pkg/blueprint/fsnode_customizations_test.go | 2 +- pkg/ostree/test_mtls_server/client.crt | 10 +-- pkg/ostree/test_mtls_server/server.crt | 8 +- pyproject.toml | 2 + schutzbot/ci_details.sh | 2 +- test/data/repositories/centos-10.json | 2 +- test/data/repositories/centos-9.json | 2 +- test/data/repositories/fedora-39.json | 2 +- test/data/repositories/rhel-10.0.json | 2 +- test/data/repositories/rhel-7.9.json | 2 +- test/data/repositories/rhel-9.0.json | 2 +- test/data/repositories/rhel-9.1.json | 2 +- test/data/repositories/rhel-9.2.json | 2 +- test/data/repositories/rhel-9.3.json | 2 +- test/data/repositories/rhel-9.4.json | 2 +- test/scripts/imgtestlib.py | 6 +- 41 files changed, 276 insertions(+), 118 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 .spellcheck-en-custom.txt create mode 100644 .spellcheck.yml create mode 100644 .yamllint create mode 100644 pyproject.toml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2951f3fda2..dbdf4a9f0f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,4 +14,4 @@ "golang.Go", "GitHub.vscode-pull-request-github" ] -} \ No newline at end of file +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d647e0da70..ef51d898d6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,5 @@ # Basic test trying dependabot +--- version: 2 updates: diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index f5e014fbb4..567a434608 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -1,7 +1,8 @@ +--- # Taken from https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#common-dependabot-automations name: Dependabot auto-approve and auto-merge -on: pull_request_target +on: pull_request_target # yamllint disable-line rule:truthy permissions: write-all diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml index 0ff40567f8..a0408d5bed 100644 --- a/.github/workflows/create-tag.yml +++ b/.github/workflows/create-tag.yml @@ -1,7 +1,8 @@ +--- # This action creates a release every Monday at 5:00 UTC. name: "Create and push release tag" -on: +on: # yamllint disable-line rule:truthy workflow_dispatch: schedule: - cron: "0 5 * * 1" diff --git a/.github/workflows/gitlab-helper.yml b/.github/workflows/gitlab-helper.yml index 0aed5ae0fe..a57c8657f2 100644 --- a/.github/workflows/gitlab-helper.yml +++ b/.github/workflows/gitlab-helper.yml @@ -5,7 +5,7 @@ --- name: GitLab -on: +on: # yamllint disable-line rule:truthy pull_request: branches: - "*" diff --git a/.github/workflows/pr_best_practices.yml b/.github/workflows/pr_best_practices.yml index 0aa528f511..66601bd503 100644 --- a/.github/workflows/pr_best_practices.yml +++ b/.github/workflows/pr_best_practices.yml @@ -1,8 +1,9 @@ +--- name: "Verify PR best practices" -on: +on: # yamllint disable-line rule:truthy pull_request_target: - branches: [ main ] + branches: [main] jobs: pr-best-practices: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ab01a68c0..d2bb983da0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ +--- name: "Create GitHub release" -on: +on: # yamllint disable-line rule:truthy push: tags: - "v*" diff --git a/.github/workflows/stale-cleanup.yml b/.github/workflows/stale-cleanup.yml index 56bbc780af..01c848d454 100644 --- a/.github/workflows/stale-cleanup.yml +++ b/.github/workflows/stale-cleanup.yml @@ -1,6 +1,7 @@ +--- name: Mark and close stale issues and PRs -on: +on: # yamllint disable-line rule:truthy schedule: - cron: '0 4 * * *' diff --git a/.github/workflows/test-osbuild-composer-intergation.yml b/.github/workflows/test-osbuild-composer-intergation.yml index caaf3670be..7b0489b939 100644 --- a/.github/workflows/test-osbuild-composer-intergation.yml +++ b/.github/workflows/test-osbuild-composer-intergation.yml @@ -1,6 +1,7 @@ +--- name: "[integration]" -on: +on: # yamllint disable-line rule:truthy pull_request: branches: - "*" @@ -13,9 +14,9 @@ jobs: image: registry.fedoraproject.org/fedora:latest steps: - # krb5-devel is needed to test internal/upload/koji package - # gcc is needed to build the mock depsolver binary for the unit tests - # gpgme-devel is needed for container upload dependencies + # krb5-devel is needed to test internal/upload/koji package + # gcc is needed to build the mock depsolver binary for the unit tests + # gpgme-devel is needed for container upload dependencies - name: Install build and test dependencies run: dnf -y install krb5-devel gcc git-core go gpgme-devel osbuild-depsolve-dnf btrfs-progs-devel device-mapper-devel diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaf43d45cd..55e6d84978 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,8 +1,9 @@ +--- name: Tests # NOTE(mhayden): Restricting branches prevents jobs from being doubled since # a push to a pull request triggers two events. -on: +on: # yamllint disable-line rule:truthy pull_request: branches: - "*" @@ -78,28 +79,28 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.21 - uses: actions/setup-go@v5 - with: - go-version: "1.21" - id: go + - name: Set up Go 1.21 + uses: actions/setup-go@v5 + with: + go-version: "1.21" + id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - - name: Apt update - run: sudo apt update + - name: Apt update + run: sudo apt update - # This is needed for the container resolver dependencies - - name: Install libgpgme devel package - run: sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev podman + # This is needed for the container resolver dependencies + - name: Install libgpgme devel package + run: sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev podman - # We need to run the test as root, since we use the root - # containers-storage for the local resolvers - - name: Run unit tests - run: sudo go test -v ./pkg/container/... --force-local-resolver + # We need to run the test as root, since we use the root + # containers-storage for the local resolvers + - name: Run unit tests + run: sudo go test -v ./pkg/container/... --force-local-resolver unit-tests-c9s: name: "🛃 Unit tests (CentOS Stream 9)" @@ -172,17 +173,17 @@ jobs: name: "🐚 Shellcheck" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 - with: - ignore: vendor # We don't want to fix the code in vendored dependencies - env: - # don't check /etc/os-release sourcing, allow useless cats to live inside our codebase, and - # allow seemingly unreachable commands - SHELLCHECK_OPTS: -e SC1091 -e SC2002 -e SC2317 + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 + with: + ignore: vendor # We don't want to fix the code in vendored dependencies + env: + # don't check /etc/os-release sourcing, allow useless cats to live inside our codebase, and + # allow seemingly unreachable commands + SHELLCHECK_OPTS: -e SC1091 -e SC2002 -e SC2317 python-test: name: "🐍 pytest (imgtestlib)" diff --git a/.github/workflows/trigger-gitlab.yml b/.github/workflows/trigger-gitlab.yml index 1ac638fba5..fa3c0a0652 100644 --- a/.github/workflows/trigger-gitlab.yml +++ b/.github/workflows/trigger-gitlab.yml @@ -3,7 +3,7 @@ --- name: Start GitLab CI -on: +on: # yamllint disable-line rule:truthy workflow_run: workflows: ["GitLab"] types: [completed] diff --git a/.github/workflows/update-bootc-image-builder.yml b/.github/workflows/update-bootc-image-builder.yml index 9db861262a..6910eac21a 100644 --- a/.github/workflows/update-bootc-image-builder.yml +++ b/.github/workflows/update-bootc-image-builder.yml @@ -2,7 +2,7 @@ --- name: "Update bootc-image-builder ref" -on: +on: # yamllint disable-line rule:truthy workflow_dispatch: # temporarily disabled until we fix the compatibility between bib and our bootc containers # schedule: diff --git a/.gitignore b/.gitignore index ee60ad73fa..17ad19e97e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,6 @@ __pycache__ /rpmbuild /test/data/manifests /tools/appsre-ansible/inventory +dictionary.dic *~ diff --git a/.packit.yaml b/.packit.yaml index a32a1db086..57f8a756f7 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,4 +1,5 @@ # https://packit.dev/docs/configuration/ +--- specfile_path: osbuild-composer.spec @@ -12,40 +13,40 @@ upstream_tag_template: v{version} srpm_build_deps: [] actions: - get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||'" - post-upstream-clone: "./tools/rpm_spec_add_provides_bundle.sh" + get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||'" + post-upstream-clone: "./tools/rpm_spec_add_provides_bundle.sh" jobs: -- job: bodhi_update - trigger: commit - dist_git_branches: - - fedora-branched # rawhide updates are created automatically -- job: koji_build - trigger: commit - dist_git_branches: - - fedora-all -- job: propose_downstream - trigger: release - dist_git_branches: - - fedora-all -- job: copr_build - trigger: pull_request - targets: &build_targets - - centos-stream-8-aarch64 - - centos-stream-8-x86_64 - - centos-stream-9-aarch64 - - centos-stream-9-x86_64 - - fedora-all-aarch64 - - fedora-all-s390x - - fedora-all-ppc64le - - fedora-all - - rhel-8-aarch64 - - rhel-8-x86_64 - - rhel-9-aarch64 - - rhel-9-x86_64 -- job: copr_build - trigger: commit - branch: main - owner: "@osbuild" # copr repo namespace - project: osbuild-composer # copr repo name so you can consume the builds - targets: *build_targets + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-branched # rawhide updates are created automatically + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + - job: propose_downstream + trigger: release + dist_git_branches: + - fedora-all + - job: copr_build + trigger: pull_request + targets: &build_targets + - centos-stream-8-aarch64 + - centos-stream-8-x86_64 + - centos-stream-9-aarch64 + - centos-stream-9-x86_64 + - fedora-all-aarch64 + - fedora-all-s390x + - fedora-all-ppc64le + - fedora-all + - rhel-8-aarch64 + - rhel-8-x86_64 + - rhel-9-aarch64 + - rhel-9-x86_64 + - job: copr_build + trigger: commit + branch: main + owner: "@osbuild" # copr repo namespace + project: osbuild-composer # copr repo name so you can consume the builds + targets: *build_targets diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..82cfb12a0d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +--- + +exclude: "vendor/.*" +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - repo: https://github.com/adrienverge/yamllint + rev: v1.35.1 + hooks: + - id: yamllint + - repo: https://github.com/schuellerf/pre-commit-pyspelling + rev: 0.1.0 + hooks: + - id: pyspelling + args: ["--config", ".spellcheck.yml"] + - repo: https://github.com/hhatto/autopep8 + rev: v2.3.0 + hooks: + - id: autopep8 + - repo: https://github.com/golangci/golangci-lint + rev: v1.59.1 + hooks: + - id: golangci-lint diff --git a/.spellcheck-en-custom.txt b/.spellcheck-en-custom.txt new file mode 100644 index 0000000000..e0f484bc19 --- /dev/null +++ b/.spellcheck-en-custom.txt @@ -0,0 +1,81 @@ +bootable +bootloader +BYOS +CDN +CGE +Changelog +ci +CI's +config +configs +customizations +depsolve +depsolved +depsolves +DHCP +distro +distros +DNF +efi +filesystem +GBs +GCE +gce +GCP +Golang +GPG +https +init +instantiation +iot +IPv +JSON +Kickstart +kickstart +kickstart's +kickstarts +KVM +libguestfs +marshalling +MBR +md +MULTIQUEUE +NTP +oci +os +osbuild +osbuild's +ostree +pre +Precheck +precheck +qcow +qed +README +repo +RHEL +RHOSP +RHSM +RHUI +RHV +SDK +SEV +subdirectory +UEFI +uncompress +unmarshalling +UUIDs +vdi +vhd +vhdx +VIRTIO +vmdk +VMWare +vpc +workarounded +xfs +AMI +cmds +depsolving +subcommand +teardown diff --git a/.spellcheck.yml b/.spellcheck.yml new file mode 100644 index 0000000000..9c9185f15d --- /dev/null +++ b/.spellcheck.yml @@ -0,0 +1,28 @@ +--- + +matrix: + - name: markdown + aspell: + lang: en + d: en_US + camel-case: true + mode: markdown + sources: + - "**/*.md|!vendor/**" + dictionary: + wordlists: + - .spellcheck-en-custom.txt + pipeline: + - pyspelling.filters.context: + context_visible_first: true + escapes: '\\[\\`~]' + delimiters: + # Ignore multiline content between fences (fences can have 3 or more back ticks) + # ```language + # content + # ``` + - open: '^(?P *`{3,}).*$' + close: '^(?P=open)$' + # Ignore text between inline back ticks + - open: '(?P`+)' + close: '(?P=open)' diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000000..0c428488dd --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +--- +extends: default + +rules: + line-length: + max: 300 diff --git a/codecov.yml b/codecov.yml index 8e84e868cd..4dd670bc3b 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,9 +1,10 @@ +--- coverage: status: - patch: no + patch: false project: default: threshold: 5% codecov: - require_ci_to_pass: no -comment: no + require_ci_to_pass: false +comment: false diff --git a/docs/developer/cmds.md b/docs/developer/cmds.md index 18624d0aec..35100cf01c 100644 --- a/docs/developer/cmds.md +++ b/docs/developer/cmds.md @@ -2,7 +2,7 @@ The following utilities, defined in the `cmd/` directory, are useful for development and testing. They **should not** be relied on for production -purposes. In particular, command line options and default behaviour can change +purposes. In particular, command line options and default behavior can change at any time. The following are high level descriptions of what some of the utilities can do diff --git a/docs/developer/code-manifest-generation.md b/docs/developer/code-manifest-generation.md index 38da2a244d..996660d3d4 100644 --- a/docs/developer/code-manifest-generation.md +++ b/docs/developer/code-manifest-generation.md @@ -19,7 +19,7 @@ Manifests are generated in two general stages: _Instantiation_ and _Serializatio stage-sequences. - Serialization: Creates the sequence of stages based on each pipeline and produces [`manifest.OSBuildManifest`][godoc-manifest-osbuildmanifest], which - is a `[]byte` array with custom un/marshalling methods. + is a `[]byte` array with custom unmarshalling/marshalling methods. - This stage requires the content specifications resolved from the manifest source specifications (package specs, container specs, ostree commit specs). See [Resolving Content](#resolving-content). diff --git a/docs/image-types/README.md b/docs/image-types/README.md index 7891222de0..473aea190a 100644 --- a/docs/image-types/README.md +++ b/docs/image-types/README.md @@ -25,4 +25,4 @@ the uncompressed image to any bootable device such as an SD card. xz -d -o -``` \ No newline at end of file +``` diff --git a/docs/image-types/rhel8/google-gce.md b/docs/image-types/rhel8/google-gce.md index 3b07e3981d..a6e5f9272c 100644 --- a/docs/image-types/rhel8/google-gce.md +++ b/docs/image-types/rhel8/google-gce.md @@ -185,7 +185,7 @@ part / --size=100 --grow --ondrive=sdb --label=root --fstype=xfs repo_gpgcheck=0 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg - + [google-cloud-sdk] name=Google Cloud SDK baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64 @@ -1906,4 +1906,4 @@ A diff compared to the default RHEL-8.6 image using Google's RHUI # Generate initramfs from latest kernel instead of the running kernel. kver="$(ls -t /lib/modules | head -n1)" dracut -f --kver="${kver}" -``` \ No newline at end of file +``` diff --git a/docs/image-types/rhel8/microsoft-azure.md b/docs/image-types/rhel8/microsoft-azure.md index ca82ada4c5..05dc222d45 100644 --- a/docs/image-types/rhel8/microsoft-azure.md +++ b/docs/image-types/rhel8/microsoft-azure.md @@ -6,9 +6,9 @@ computing platform. It conforms to Azure's [requirements for images][rhelrequire ## Implementation Choices -This image is only availble for `x86_64`, because it is the only architecture available +This image is only available for `x86_64`, because it is the only architecture available in Azure. [azure]: https://azure.microsoft.com -[rhelrequirements]: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic \ No newline at end of file +[rhelrequirements]: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic diff --git a/docs/image-types/rhel8/oracle-oci.md b/docs/image-types/rhel8/oracle-oci.md index 6bba922cb6..9a7e97b898 100644 --- a/docs/image-types/rhel8/oracle-oci.md +++ b/docs/image-types/rhel8/oracle-oci.md @@ -1,15 +1,15 @@ # Oracle's oci image -This image type is meant to be used on Oracle Cloud Infrasturcure. It is derived from the KVM guest image type. +This image type is meant to be used on Oracle Cloud Infrastructure. It is derived from the KVM guest image type. ## Format The image format is `qcow2`. There are not special Oracle-specifics/metadata in it. ## Missing packages -- oracle guest agent - this image does not include the orace guest agent, which is a collection of agents to collect, report, and allow -disk usage, os updates, metrics, and more, under the web console. It is mainly excluded because we don't have the source -code and we cann't build and include it. +- oracle guest agent - this image does not include the oracle guest agent, which is a collection of agents to collect, report, and allow +disk usage, os updates, metrics, and more, under the web console. It is mainly excluded because we don't have the source +code and we can't build and include it. ## Architecture -This image type is working with `x86_64` instances. +This image type is working with `x86_64` instances. Oracle has ARM compute instances and this image type wasn't tested with it yet. diff --git a/pkg/blueprint/fsnode_customizations_test.go b/pkg/blueprint/fsnode_customizations_test.go index e3c3349f11..4ebd1ae750 100644 --- a/pkg/blueprint/fsnode_customizations_test.go +++ b/pkg/blueprint/fsnode_customizations_test.go @@ -361,7 +361,7 @@ func TestDirectoryCustomizationUnmarshalJSON(t *testing.T) { { Name: "directory-with-path", JSON: ` -{ +{ "name": "test", "description": "Test", "version": "0.0.0", diff --git a/pkg/ostree/test_mtls_server/client.crt b/pkg/ostree/test_mtls_server/client.crt index 749802ace0..8222d6eba1 100644 --- a/pkg/ostree/test_mtls_server/client.crt +++ b/pkg/ostree/test_mtls_server/client.crt @@ -33,18 +33,18 @@ Certificate: 2f:a7 Exponent: 65537 (0x10001) X509v3 extensions: - X509v3 Basic Constraints: + X509v3 Basic Constraints: CA:FALSE - X509v3 Subject Key Identifier: + X509v3 Subject Key Identifier: 8F:ED:C1:36:46:5D:80:B7:A9:3A:B9:A5:65:FD:9C:F1:07:F9:3B:A0 - X509v3 Authority Key Identifier: + X509v3 Authority Key Identifier: keyid:3A:04:ED:2B:E8:99:81:4E:30:D4:F4:46:68:E4:F1:A0:78:24:4A:12 X509v3 Key Usage: critical Digital Signature, Non Repudiation, Key Encipherment - X509v3 Extended Key Usage: + X509v3 Extended Key Usage: TLS Web Client Authentication - X509v3 Subject Alternative Name: + X509v3 Subject Alternative Name: DNS:client.osbuild.org, IP Address:127.0.0.1 Signature Algorithm: sha256WithRSAEncryption 8d:4f:f2:ab:1a:08:8f:04:f8:ac:b5:7d:0d:14:7a:38:0f:d6: diff --git a/pkg/ostree/test_mtls_server/server.crt b/pkg/ostree/test_mtls_server/server.crt index d8811f8f54..28bf34d9b7 100644 --- a/pkg/ostree/test_mtls_server/server.crt +++ b/pkg/ostree/test_mtls_server/server.crt @@ -35,18 +35,18 @@ Certificate: X509v3 extensions: X509v3 Basic Constraints: critical CA:FALSE - X509v3 Subject Key Identifier: + X509v3 Subject Key Identifier: C0:2F:23:10:5D:C6:BC:97:76:50:71:FC:93:C1:47:59:02:FD:BC:23 - X509v3 Authority Key Identifier: + X509v3 Authority Key Identifier: keyid:3A:04:ED:2B:E8:99:81:4E:30:D4:F4:46:68:E4:F1:A0:78:24:4A:12 DirName:/CN=osbuild.org serial:43:6B:7C:15:23:01:44:79:BD:E3:27:70:50:BC:90:AF:19:CA:5A:2F X509v3 Key Usage: critical Digital Signature, Key Encipherment - X509v3 Extended Key Usage: + X509v3 Extended Key Usage: TLS Web Server Authentication - X509v3 Subject Alternative Name: + X509v3 Subject Alternative Name: DNS:localhost, DNS:composer, IP Address:127.0.0.1 Signature Algorithm: sha256WithRSAEncryption 72:f9:19:12:a1:d3:f6:62:66:5b:42:cf:da:c6:62:93:c9:29: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..7ff18c2140 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.autopep8] +max_line_length = 120 diff --git a/schutzbot/ci_details.sh b/schutzbot/ci_details.sh index cd0ca70ac0..5cd9967a90 100755 --- a/schutzbot/ci_details.sh +++ b/schutzbot/ci_details.sh @@ -43,7 +43,7 @@ rpm -qa | sort echo "------------------------------------------------------------------------------" # gcp runners don't use cloud-init and some of the images have python36 installed -if [[ "$RUNNER" != *"gcp"* ]];then +if [[ "$RUNNER" != *"gcp"* ]];then if rpm --quiet -q python36; then echo -e "\n FAIL: python36 is installed, see #794 ..." exit 1 diff --git a/test/data/repositories/centos-10.json b/test/data/repositories/centos-10.json index 9af658c995..59acd98228 100644 --- a/test/data/repositories/centos-10.json +++ b/test/data/repositories/centos-10.json @@ -61,4 +61,4 @@ "gpgkeys": [] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/centos-9.json b/test/data/repositories/centos-9.json index aff9b3e5c6..e7e7adcd5d 100644 --- a/test/data/repositories/centos-9.json +++ b/test/data/repositories/centos-9.json @@ -95,4 +95,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/fedora-39.json b/test/data/repositories/fedora-39.json index d62be67e5e..3804551790 100644 --- a/test/data/repositories/fedora-39.json +++ b/test/data/repositories/fedora-39.json @@ -71,4 +71,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-10.0.json b/test/data/repositories/rhel-10.0.json index a791a164a7..d5c3dda90c 100644 --- a/test/data/repositories/rhel-10.0.json +++ b/test/data/repositories/rhel-10.0.json @@ -129,4 +129,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-7.9.json b/test/data/repositories/rhel-7.9.json index 56d48afe43..e2f9762d78 100644 --- a/test/data/repositories/rhel-7.9.json +++ b/test/data/repositories/rhel-7.9.json @@ -42,4 +42,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-9.0.json b/test/data/repositories/rhel-9.0.json index 6405ebd4ab..b56d738af3 100644 --- a/test/data/repositories/rhel-9.0.json +++ b/test/data/repositories/rhel-9.0.json @@ -193,4 +193,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-9.1.json b/test/data/repositories/rhel-9.1.json index 0027ba27be..bbf2ef789e 100644 --- a/test/data/repositories/rhel-9.1.json +++ b/test/data/repositories/rhel-9.1.json @@ -206,4 +206,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-9.2.json b/test/data/repositories/rhel-9.2.json index 8621298079..9543ad2a71 100644 --- a/test/data/repositories/rhel-9.2.json +++ b/test/data/repositories/rhel-9.2.json @@ -206,4 +206,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-9.3.json b/test/data/repositories/rhel-9.3.json index 902c9f6c5d..2809fcb944 100644 --- a/test/data/repositories/rhel-9.3.json +++ b/test/data/repositories/rhel-9.3.json @@ -206,4 +206,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/data/repositories/rhel-9.4.json b/test/data/repositories/rhel-9.4.json index e18407ccf5..bf809024d9 100644 --- a/test/data/repositories/rhel-9.4.json +++ b/test/data/repositories/rhel-9.4.json @@ -206,4 +206,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/scripts/imgtestlib.py b/test/scripts/imgtestlib.py index da655f0270..43062f9f47 100644 --- a/test/scripts/imgtestlib.py +++ b/test/scripts/imgtestlib.py @@ -254,9 +254,9 @@ def check_for_build(manifest_fname, build_info_dir, errors): dl_config = json.load(build_info_fp) except json.JSONDecodeError as jd: errors.append(( - f"failed to parse {build_info_path}\n" - f"{jd.msg}\n" - " Adding config to build pipeline.\n" + f"failed to parse {build_info_path}\n" + f"{jd.msg}\n" + " Adding config to build pipeline.\n" )) commit = dl_config["commit"]