Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
260 changes: 122 additions & 138 deletions .cirrus.yml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go
check-hidden = true
ignore-regex = \b(Not|assert)In\b
ignore-words-list = ddress,secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif,whit
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/build/
/conmon/
contrib/spec/podman.spec
contrib/systemd/*/*.service
contrib/systemd/system/*.service
*.coverprofile
coverprofile
/.coverage
Expand Down Expand Up @@ -57,3 +57,4 @@ contrib/win-installer/shasums
contrib/win-installer/*.wixobj
contrib/win-installer/*.wixpdb
contrib/win-installer/*.log
podman-cleanup-tracer.log*
9 changes: 7 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ linters:
disable:
# too many reports but requires attention
- depguard
- intrange # should be turned on but we have to convert each place manually as there is no auto fix function
- tagalign
- perfsprint
- typecheck
Expand All @@ -26,7 +27,6 @@ linters:
- wsl
- godox
- tparallel
- gomnd
- nlreturn
- noctx
- nestif
Expand Down Expand Up @@ -61,7 +61,7 @@ linters:
- nonamedreturns
- exhaustruct
# deprecated linters
- execinquery
- tenv
linters-settings:
errcheck:
check-blank: false
Expand All @@ -88,3 +88,8 @@ issues:
- dependencies
exclude-files:
- swagger.go
exclude-rules:
# Exclude recvcheck from running on the imported k8s files, to much failures
- path: pkg/k8s.io/
linters:
- recvcheck
16 changes: 2 additions & 14 deletions .packit.sh → .packit-copr-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
# action in .packit.yaml. These steps only work on copr builds, not on official
# Fedora builds.

set -eox pipefail
set -exo pipefail

PACKAGE=podman

# Set path to rpm spec file
SPEC_FILE=rpm/$PACKAGE.spec

# Get short sha
SHORT_SHA=$(git rev-parse --short HEAD)
. .packit-rpm-git-commit.sh

# Get Version from HEAD
VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2)
Expand Down Expand Up @@ -40,9 +34,3 @@ sed -i "s/^Source0:.*.tar.gz/Source0: $PACKAGE-$VERSION.tar.gz/" $SPEC_FILE

# Update setup macro to use the correct build dir
sed -i "s/^%autosetup.*/%autosetup -Sgit -n %{name}-$VERSION/" $SPEC_FILE

# Update relevant sed entries in spec file with the actual VERSION and SHORT_SHA
# This allows podman --version to also show the SHORT_SHA along with the
# VERSION
sed -i "s/##VERSION##/$VERSION/" $SPEC_FILE
sed -i "s/##SHORT_SHA##/$SHORT_SHA/" $SPEC_FILE
17 changes: 17 additions & 0 deletions .packit-rpm-git-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Updates the rpm spec with the upstream git SHA. Works for both copr and koji
# builds via Packit actions. See .packit.yaml for usage.

set -exo pipefail

PACKAGE=podman

# Set path to rpm spec file
SPEC_FILE=rpm/$PACKAGE.spec

# Get short sha
GIT_COMMIT=$(git rev-parse HEAD)

# Update LDFLAGS to show commit id for Copr builds
sed -i "s/^GIT_COMMIT=.*/GIT_COMMIT=\"$GIT_COMMIT\"/" $SPEC_FILE
33 changes: 8 additions & 25 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ packages:
podman-centos:
pkg_tool: centpkg
specfile_path: rpm/podman.spec
podman-rhel:
specfile_path: rpm/podman.spec
podman-eln:
specfile_path: rpm/podman.spec

Expand All @@ -22,31 +20,25 @@ srpm_build_deps:
- make

actions:
fix-spec-file:
- "bash .packit.sh"
fix-spec-file: "bash .packit-copr-rpm.sh"
pre-sync: "bash .packit-rpm-git-commit.sh"

jobs:
- job: copr_build
trigger: pull_request
packages: [podman-fedora]
notifications: &packit_build_failure_notification
notifications: &packit_generic_failure_notification
failure_comment:
message: "Ephemeral COPR build failed. @containers/packit-build please check."
message: "[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore."
enable_net: true
targets:
- fedora-development-x86_64
- fedora-development-aarch64
- fedora-latest-x86_64
- fedora-latest-aarch64
- fedora-latest-stable-x86_64
- fedora-latest-stable-aarch64
- fedora-40-x86_64
- fedora-40-aarch64
- fedora-all-x86_64
- fedora-all-aarch64

- job: copr_build
trigger: pull_request
packages: [podman-eln]
notifications: *packit_build_failure_notification
notifications: *packit_generic_failure_notification
enable_net: true
targets:
fedora-eln-x86_64:
Expand All @@ -59,23 +51,14 @@ jobs:
- job: copr_build
trigger: pull_request
packages: [podman-centos]
notifications: *packit_build_failure_notification
notifications: *packit_generic_failure_notification
enable_net: true
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10-x86_64
- centos-stream-10-aarch64

- job: copr_build
trigger: pull_request
packages: [podman-rhel]
notifications: *packit_build_failure_notification
enable_net: true
targets:
- epel-9-x86_64
- epel-9-aarch64

# Run on commit to main branch
- job: copr_build
trigger: commit
Expand Down
14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ repos:
# trailing whitespace as part of its format. We can work around that,
# but unfortunately the buildah repo has some files with tabs, which
# git-diff formats as '[+/-]<space><tab>', which these hooks choke on.
# `contrib/systemd/user` is a symlink but for some reason, on windows,
# pre-commit consider it as a regular file and tries to fix it.
# Just disable checks on these files as a special case.
# `contrib/systemd/user` and `test/python/requirements.txt` are symlinks
# but for some reason, on windows, pre-commit consider it as a regular
# file and tries to fix it. Just disable checks on these files as a
# special case.
- id: end-of-file-fixer
exclude: test/buildah-bud/buildah-tests.diff|contrib/systemd/user
exclude: test/buildah-bud/buildah-tests.diff|contrib/systemd/user|test/python/requirements.txt
- id: trailing-whitespace
exclude: test/buildah-bud/buildah-tests.diff|test/e2e/quadlet/remap-keep-id2.container|test/e2e/quadlet/line-continuation-whitespace.container
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-yaml
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc
rev: v2.3.0
hooks:
- id: codespell
6 changes: 6 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ build:
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats
formats:
- htmlzip
- epub
- pdf

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
Expand Down
Loading
Loading