Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnfjson: support new osbuild-depsolve-dnf options for loading repositories from a root dir #537

Merged
merged 18 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c91f3d7
Schutzfile: update osbuild dependency
achilleas-k Apr 11, 2024
fd53a6b
dnfjson: osbuild-depsolve-dnf property rename
achilleas-k Apr 9, 2024
d589528
dnfjson: new osbuild-depsolve-dnf response format
achilleas-k Apr 3, 2024
25a92fb
dnfjson: add root_dir and releasever to request
achilleas-k Mar 20, 2024
2285a65
dnfjson: fix makeDepsolveRequest() docstring
achilleas-k Apr 3, 2024
b7144e2
dnfjson: move the toRPMMD() conversion method to depsolveResult
achilleas-k Apr 3, 2024
bc456ea
dnfjson: use repository configs from response to convert packages
achilleas-k Apr 3, 2024
912c9b6
mocks/rpmrepo: write config in .repo format
achilleas-k Apr 3, 2024
7c7f282
dnfjson: convert TestDepsolver tests to iterable test cases
achilleas-k Apr 3, 2024
0943fda
dnfjson: add some error cases to the depsolver test
achilleas-k Apr 3, 2024
a3fcb9c
dnfjson: add tests that use RootDir with the test repo metadata
achilleas-k Apr 3, 2024
841b2b1
dnfjson: return rpmmd.RepoConfig list from depsolve
achilleas-k Apr 9, 2024
741b4ff
cmd: return repo map from depsolve()
achilleas-k Apr 9, 2024
bdbfbf1
manifest: use new repo configs when serializing manifests
achilleas-k Apr 9, 2024
99332b9
github: install pinned osbuild commit for unit tests
achilleas-k Apr 11, 2024
56eebc3
Schutzfile: add osbuild commits for centos-8 and centos-9
achilleas-k Apr 11, 2024
ea6e95a
test/imgtestlib: remove use of match statement
achilleas-k Apr 11, 2024
6acadfb
test/configure-generators: setup-osbuild-repo for inspect
achilleas-k Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@ jobs:
image: registry.fedoraproject.org/fedora:latest

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up repository for pinned osbuild commit
run: ./test/scripts/setup-osbuild-repo

# 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

- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Mark the working directory as safe for git
run: git config --global --add safe.directory "$(pwd)"

Expand All @@ -55,14 +58,17 @@ jobs:
- name: Enable crb repo
run: dnf config-manager --set-enabled crb

- name: Install build and test dependencies
run: dnf -y install krb5-devel gcc git-core go gpgme-devel osbuild-depsolve-dnf device-mapper-devel

- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up repository for pinned osbuild commit
run: ./test/scripts/setup-osbuild-repo

- name: Install build and test dependencies
run: dnf -y install krb5-devel gcc git-core go gpgme-devel osbuild-depsolve-dnf device-mapper-devel

- name: Mark the working directory as safe for git
run: git config --global --add safe.directory "$(pwd)"

Expand All @@ -87,14 +93,19 @@ jobs:
- name: Enable powertools repo
run: dnf config-manager --set-enabled powertools

- name: Install build and test dependencies
run: dnf -y install krb5-devel gcc git-core go gpgme-devel osbuild-depsolve-dnf device-mapper-devel

- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up repository for pinned osbuild commit
run: |
dnf -y install python3
./test/scripts/setup-osbuild-repo

- name: Install build and test dependencies
run: dnf -y install krb5-devel gcc git-core go gpgme-devel osbuild-depsolve-dnf device-mapper-devel

- name: Mark the working directory as safe for git
run: git config --global --add safe.directory "$(pwd)"

Expand Down
35 changes: 35 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,7 @@ generate-manifests-centos-10-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros centos-10 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2419,6 +2420,7 @@ generate-manifests-centos-10-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros centos-10 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2437,6 +2439,7 @@ generate-manifests-centos-8-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros centos-8 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2455,6 +2458,7 @@ generate-manifests-centos-9-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros centos-9 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2473,6 +2477,7 @@ generate-manifests-centos-9-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros centos-9 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2491,6 +2496,7 @@ generate-manifests-fedora-38-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros fedora-38 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2509,6 +2515,7 @@ generate-manifests-fedora-38-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros fedora-38 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2527,6 +2534,7 @@ generate-manifests-fedora-39-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros fedora-39 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2545,6 +2553,7 @@ generate-manifests-fedora-39-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros fedora-39 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2563,6 +2572,7 @@ generate-manifests-rhel-10.0-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-10.0 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2581,6 +2591,7 @@ generate-manifests-rhel-10.0-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-10.0 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2599,6 +2610,7 @@ generate-manifests-rhel-8.10-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.10 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2617,6 +2629,7 @@ generate-manifests-rhel-8.10-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.10 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2635,6 +2648,7 @@ generate-manifests-rhel-8.4-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.4 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2653,6 +2667,7 @@ generate-manifests-rhel-8.4-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.4 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2671,6 +2686,7 @@ generate-manifests-rhel-8.5-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.5 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2689,6 +2705,7 @@ generate-manifests-rhel-8.5-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.5 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2707,6 +2724,7 @@ generate-manifests-rhel-8.6-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.6 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2725,6 +2743,7 @@ generate-manifests-rhel-8.6-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.6 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2743,6 +2762,7 @@ generate-manifests-rhel-8.7-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.7 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2761,6 +2781,7 @@ generate-manifests-rhel-8.7-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.7 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2779,6 +2800,7 @@ generate-manifests-rhel-8.8-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.8 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2797,6 +2819,7 @@ generate-manifests-rhel-8.8-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.8 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2815,6 +2838,7 @@ generate-manifests-rhel-8.9-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-8.9 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2833,6 +2857,7 @@ generate-manifests-rhel-8.9-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-8.9 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2851,6 +2876,7 @@ generate-manifests-rhel-9.0-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-9.0 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2869,6 +2895,7 @@ generate-manifests-rhel-9.0-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-9.0 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2887,6 +2914,7 @@ generate-manifests-rhel-9.1-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-9.1 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2905,6 +2933,7 @@ generate-manifests-rhel-9.1-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-9.1 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2923,6 +2952,7 @@ generate-manifests-rhel-9.2-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-9.2 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2941,6 +2971,7 @@ generate-manifests-rhel-9.2-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-9.2 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2959,6 +2990,7 @@ generate-manifests-rhel-9.3-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-9.3 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2977,6 +3009,7 @@ generate-manifests-rhel-9.3-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-9.3 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -2995,6 +3028,7 @@ generate-manifests-rhel-9.4-ppc64le:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches ppc64le --distros rhel-9.4 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand All @@ -3013,6 +3047,7 @@ generate-manifests-rhel-9.4-s390x:
RUNNER: aws/fedora-39-x86_64
INTERNAL_NETWORK: "true"
script:
- sudo ./test/scripts/setup-osbuild-repo
- sudo ./test/scripts/install-dependencies
- go run ./cmd/gen-manifests --arches s390x --distros rhel-9.4 --workers 10 --metadata=false --output ./manifests
- for manifest in ./manifests/*; do
Expand Down
16 changes: 15 additions & 1 deletion Schutzfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,24 @@
"ref": "quay.io/centos-bootc/bootc-image-builder@sha256:3a75eeb703b4f8a711f43f37bafb2c3e84f5dd12b499c8146603f05be8cccabd"
}
},
"centos-8": {
"dependencies": {
"osbuild": {
"commit": "f26e62b23f547fc5ad665cb08cc52e6431657779"
}
}
},
"centos-9": {
"dependencies": {
"osbuild": {
"commit": "f26e62b23f547fc5ad665cb08cc52e6431657779"
}
}
},
"fedora-39": {
"dependencies": {
"osbuild": {
"commit": "6549bf1992b9731d52df5416584fab3f014a421f"
"commit": "f26e62b23f547fc5ad665cb08cc52e6431657779"
}
},
"repos": [
Expand Down
Loading
Loading