-
Notifications
You must be signed in to change notification settings - Fork 16
microshift-io/microshift-nightly COPR: RPM with rhocp-mirror-beta config & CNIs #203
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
base: main
Are you sure you want to change the base?
Changes from all commits
305870e
ab89fd5
ccac41a
9cb0c29
1884484
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,81 @@ | ||||||||||||||||||||||||||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| _package_name="containernetworking-plugins" | ||||||||||||||||||||||||||||||||||||||||||
| _scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if [ $# -ne 1 ]; then | ||||||||||||||||||||||||||||||||||||||||||
| echo "Usage: $(basename "$0") <copr-repo-name>" | ||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| COPR_REPO_NAME="$1" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [ -z "${COPR_REPO_NAME}" ] && echo "ERROR: COPR_REPO_NAME is not set" && exit 1 | ||||||||||||||||||||||||||||||||||||||||||
| echo "COPR_REPO_NAME: '${COPR_REPO_NAME}'" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| latest_tag=$(curl -L \ | ||||||||||||||||||||||||||||||||||||||||||
| -H "Accept: application/vnd.github+json" \ | ||||||||||||||||||||||||||||||||||||||||||
| -H "X-GitHub-Api-Version: 2022-11-28" \ | ||||||||||||||||||||||||||||||||||||||||||
| https://api.github.com/repos/containernetworking/plugins/releases/latest | jq -r '.tag_name') | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| echo "### containernetworking/plugins latest tag: '${latest_tag}'" | ||||||||||||||||||||||||||||||||||||||||||
| version="${latest_tag#v}" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| echo "### Checking if package ${_package_name} ${version} already exists in the COPR repository" | ||||||||||||||||||||||||||||||||||||||||||
| cni_pkg="$(copr-cli list-packages "${COPR_REPO_NAME}" | jq -r '.[] | select(.name == "'${_package_name}'")')" | ||||||||||||||||||||||||||||||||||||||||||
| if [ -n "${cni_pkg}" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| existing_package_version=$(copr-cli get-package \ | ||||||||||||||||||||||||||||||||||||||||||
| --name "${_package_name}" \ | ||||||||||||||||||||||||||||||||||||||||||
| --with-latest-succeeded-build \ | ||||||||||||||||||||||||||||||||||||||||||
| "${COPR_REPO_NAME}" \ | ||||||||||||||||||||||||||||||||||||||||||
| | jq -r '.latest_succeeded_build.source_package.version') | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if [[ "${existing_package_version}" == "1:${version}-1" ]]; then | ||||||||||||||||||||||||||||||||||||||||||
| echo "### Package ${_package_name} ${version} already exists in the COPR repository" | ||||||||||||||||||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| temp_dir="$(mktemp -d "/tmp/containernetworking-plugins-${version}.XXXXXX")" | ||||||||||||||||||||||||||||||||||||||||||
| cp "${_scriptdir}/containernetworking-plugins.spec" "${temp_dir}/" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| pushd "${temp_dir}" >/dev/null | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| echo "### Downloading the CNI plugins x86_64 and aarch64 releases for ${version}" | ||||||||||||||||||||||||||||||||||||||||||
| curl -L -o amd64.tgz "https://github.com/containernetworking/plugins/releases/download/v${version}/cni-plugins-linux-amd64-v${version}.tgz" | ||||||||||||||||||||||||||||||||||||||||||
| curl -L -o arm64.tgz "https://github.com/containernetworking/plugins/releases/download/v${version}/cni-plugins-linux-arm64-v${version}.tgz" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| mkdir -p containernetworking-plugins-${version}/{x86_64,aarch64} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| tar xf amd64.tgz -C containernetworking-plugins-${version}/x86_64 | ||||||||||||||||||||||||||||||||||||||||||
| tar xf arm64.tgz -C containernetworking-plugins-${version}/aarch64 | ||||||||||||||||||||||||||||||||||||||||||
| cp containernetworking-plugins-${version}/x86_64/LICENSE containernetworking-plugins-${version}/x86_64/README.md containernetworking-plugins-${version}/ | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| tar czf containernetworking-plugins-${version}.tar.gz -C containernetworking-plugins-${version} . | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| mkdir -p buildroot/{RPMS,SRPMS,SOURCES,SPECS,BUILD} | ||||||||||||||||||||||||||||||||||||||||||
| mv containernetworking-plugins-${version}.tar.gz buildroot/SOURCES/ | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+50
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote Multiple unquoted uses of Proposed fix-mkdir -p containernetworking-plugins-${version}/{x86_64,aarch64}
+mkdir -p "containernetworking-plugins-${version}"/{x86_64,aarch64}
-tar xf amd64.tgz -C containernetworking-plugins-${version}/x86_64
-tar xf arm64.tgz -C containernetworking-plugins-${version}/aarch64
-cp containernetworking-plugins-${version}/x86_64/LICENSE containernetworking-plugins-${version}/x86_64/README.md containernetworking-plugins-${version}/
+tar xf amd64.tgz -C "containernetworking-plugins-${version}/x86_64"
+tar xf arm64.tgz -C "containernetworking-plugins-${version}/aarch64"
+cp "containernetworking-plugins-${version}/x86_64/LICENSE" "containernetworking-plugins-${version}/x86_64/README.md" "containernetworking-plugins-${version}/"
-tar czf containernetworking-plugins-${version}.tar.gz -C containernetworking-plugins-${version} .
+tar czf "containernetworking-plugins-${version}.tar.gz" -C "containernetworking-plugins-${version}" .
mkdir -p buildroot/{RPMS,SRPMS,SOURCES,SPECS,BUILD}
-mv containernetworking-plugins-${version}.tar.gz buildroot/SOURCES/
+mv "containernetworking-plugins-${version}.tar.gz" buildroot/SOURCES/As per coding guidelines, shell scripts should pass linting with shellcheck. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Actions: linters[warning] 50-50: SC2086: Double quote to prevent globbing and word splitting. [warning] 52-52: SC2086: Double quote to prevent globbing and word splitting. [warning] 53-53: SC2086: Double quote to prevent globbing and word splitting. [warning] 54-54: SC2086: Double quote to prevent globbing and word splitting. [warning] 54-54: SC2086: Double quote to prevent globbing and word splitting. [warning] 56-56: SC2086: Double quote to prevent globbing and word splitting. [warning] 56-56: SC2086: Double quote to prevent globbing and word splitting. [warning] 59-59: SC2086: Double quote to prevent globbing and word splitting. 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| cat > buildroot/SPECS/containernetworking-plugins.spec <<EOF | ||||||||||||||||||||||||||||||||||||||||||
| %global ver ${version} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||||
| cat containernetworking-plugins.spec >> buildroot/SPECS/containernetworking-plugins.spec | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| echo "### Building the SRPM" | ||||||||||||||||||||||||||||||||||||||||||
| rpmbuild -bs --define "_topdir ./buildroot" ./buildroot/SPECS/containernetworking-plugins.spec | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| echo "### Pushing the SRPM to COPR (${COPR_REPO_NAME}) and waiting for the build" | ||||||||||||||||||||||||||||||||||||||||||
| # Just epel-10 chroots because of the obsolesence of the original package in the CentOS Stream 10. | ||||||||||||||||||||||||||||||||||||||||||
| if copr-cli build "${COPR_REPO_NAME}" \ | ||||||||||||||||||||||||||||||||||||||||||
| --chroot epel-10-aarch64 --chroot epel-10-x86_64 \ | ||||||||||||||||||||||||||||||||||||||||||
| "${temp_dir}/buildroot/SRPMS/containernetworking-plugins-${version}-1.src.rpm"; then | ||||||||||||||||||||||||||||||||||||||||||
| copr-cli regenerate-repos "${COPR_REPO_NAME}" | ||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| popd >/dev/null | ||||||||||||||||||||||||||||||||||||||||||
| rm -rf "${temp_dir}" | ||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| %global debug_package %{nil} | ||
|
|
||
| Name: containernetworking-plugins | ||
| # Setting epoch to workaround containers-common's Obsolete of 'containernetworking-plugins < 2' | ||
| Epoch: 1 | ||
| Version: %{ver} | ||
| Release: 1 | ||
| Summary: Binaries required to provision kubernetes container networking | ||
|
|
||
| Packager: MicroShift team | ||
| License: Apache-2.0 | ||
| URL: https://microshift.io | ||
| Source0: %{name}-%{version}.tar.gz | ||
|
|
||
| %description | ||
| %{summary}. | ||
|
|
||
| %prep | ||
| %setup -q -c | ||
|
|
||
| %build | ||
| # Nothing to build | ||
|
|
||
| %install | ||
| # Detect host arch | ||
| KUBE_ARCH="$(uname -m)" | ||
|
|
||
| # Install files | ||
| mkdir -p %{buildroot}/usr/libexec/cni/ | ||
| mkdir -p %{buildroot}%{_sysconfdir}/cni/net.d/ | ||
|
|
||
| cp -a ${KUBE_ARCH}/* %{buildroot}/usr/libexec/cni/ | ||
|
|
||
| %files | ||
| /usr/libexec/cni/ | ||
| %dir %{_sysconfdir}/cni | ||
| %dir %{_sysconfdir}/cni/net.d | ||
| %license LICENSE | ||
| %doc README.md | ||
|
|
||
| %changelog | ||
| * Fri Feb 13 2026 Patryk Matuszak <pmatusza@redhat.com> 0.0.0 | ||
| - Init specfile based on https://download.opensuse.org/repositories/isv:/kubernetes:/core:/prerelease:/v1.36/rpm/src/kubernetes-cni-1.8.0-150500.1.1.src.rpm |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,10 @@ | ||||||||||||||||||||||
| FROM quay.io/fedora/fedora:latest | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| RUN dnf install -y copr-cli && dnf clean all | ||||||||||||||||||||||
| RUN dnf install \ | ||||||||||||||||||||||
| --setopt=install_weak_deps=False \ | ||||||||||||||||||||||
| -y \ | ||||||||||||||||||||||
| copr-cli jq rpmbuild \ | ||||||||||||||||||||||
| && dnf clean all | ||||||||||||||||||||||
|
Comment on lines
+3
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: On Fedora, the sudo dnf install rpm-buildTo confirm on your system: dnf provides '*/rpmbuild'Use On Fedora, the Proposed fix RUN dnf install \
--setopt=install_weak_deps=False \
-y \
- copr-cli jq rpmbuild \
+ copr-cli jq rpm-build \
&& dnf clean all📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| COPY create-build.sh microshift-io-dependencies.sh cni/containernetworking-plugins.spec / | ||||||||||||||||||||||
| COPY cni/build.sh cni/containernetworking-plugins.spec /cni/ | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,25 +61,25 @@ copr-cli: | |
| @echo "Building the COPR CLI container" | ||
| sudo podman build \ | ||
| --tag "${COPR_CLI_IMAGE}" \ | ||
| --file src/copr/copr-cli.Containerfile . | ||
| --file src/copr/copr-cli.Containerfile src/copr/ | ||
|
|
||
| .PHONY: copr-delete-build | ||
| copr-delete-build: copr-cfg-ensure-podman-secret copr-cli | ||
| @echo "Deleting the COPR build ${COPR_BUILD_ID}" | ||
| sudo podman run \ | ||
| --rm \ | ||
| --secret ${COPR_SECRET_NAME} \ | ||
| --secret ${COPR_SECRET_NAME},target=/root/.config/copr \ | ||
| "${COPR_CLI_IMAGE}" \ | ||
| bash -c "copr-cli --config /run/secrets/${COPR_SECRET_NAME} delete-build ${COPR_BUILD_ID}" | ||
| bash -c "copr-cli delete-build ${COPR_BUILD_ID}" | ||
|
|
||
| .PHONY: copr-regenerate-repos | ||
| copr-regenerate-repos: copr-cfg-ensure-podman-secret copr-cli | ||
| @echo "Regenerating the COPR repository" | ||
| sudo podman run \ | ||
| --rm \ | ||
| --secret ${COPR_SECRET_NAME} \ | ||
| --secret ${COPR_SECRET_NAME},target=/root/.config/copr \ | ||
| "${COPR_CLI_IMAGE}" \ | ||
| bash -c "copr-cli --config /run/secrets/${COPR_SECRET_NAME} regenerate-repos ${COPR_REPO_NAME}" | ||
| bash -c "copr-cli regenerate-repos ${COPR_REPO_NAME}" | ||
|
|
||
| .PHONY: copr-create-build | ||
| copr-create-build: copr-cfg-ensure-podman-secret copr-cli | ||
|
|
@@ -94,10 +94,9 @@ copr-create-build: copr-cfg-ensure-podman-secret copr-cli | |
| fi | ||
| sudo podman run \ | ||
| --rm \ | ||
| --secret ${COPR_SECRET_NAME} \ | ||
| --secret ${COPR_SECRET_NAME},target=/root/.config/copr \ | ||
| --env COPR_REPO_NAME="${COPR_REPO_NAME}" \ | ||
| --volume "${SRPM_WORKDIR}:/srpms:Z" \ | ||
| --volume "./src/copr/create-build.sh:/create-build.sh:Z" \ | ||
| "${COPR_CLI_IMAGE}" \ | ||
| bash -c "bash -x /create-build.sh" | ||
|
|
||
|
|
@@ -109,3 +108,19 @@ copr-watch-build: copr-cli | |
| --volume "${SRPM_WORKDIR}:/srpms:Z" \ | ||
| "${COPR_CLI_IMAGE}" \ | ||
| bash -c "copr-cli watch-build ${COPR_BUILD_ID}" | ||
|
|
||
| copr-dependencies: copr-cfg-ensure-podman-secret copr-cli | ||
| @echo "Building RPM with MicroShift dependencies repositories configuration" | ||
| sudo podman run \ | ||
| --rm -ti \ | ||
| --secret ${COPR_SECRET_NAME},target=/root/.config/copr \ | ||
| "${COPR_CLI_IMAGE}" \ | ||
| /microshift-io-dependencies.sh "${OKD_VERSION_TAG}" "${COPR_REPO_NAME}" | ||
|
Comment on lines
+112
to
+118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing
Proposed fix+.PHONY: copr-dependencies
copr-dependencies: copr-cfg-ensure-podman-secret copr-cli
`@echo` "Building RPM with MicroShift dependencies repositories configuration"
sudo podman run \
- --rm -ti \
+ --rm \
--secret ${COPR_SECRET_NAME},target=/root/.config/copr \
"${COPR_CLI_IMAGE}" \
/microshift-io-dependencies.sh "${OKD_VERSION_TAG}" "${COPR_REPO_NAME}"🤖 Prompt for AI Agents |
||
|
|
||
| copr-cni: copr-cfg-ensure-podman-secret copr-cli | ||
| @echo "Building RPM with CNI plugins" | ||
| sudo podman run \ | ||
| --rm -ti \ | ||
| --secret ${COPR_SECRET_NAME},target=/root/.config/copr \ | ||
| "${COPR_CLI_IMAGE}" \ | ||
| /cni/build.sh "${COPR_REPO_NAME}" | ||
|
Comment on lines
+120
to
+126
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same issues: missing Same fixes as Proposed fix+.PHONY: copr-cni
copr-cni: copr-cfg-ensure-podman-secret copr-cli
`@echo` "Building RPM with CNI plugins"
sudo podman run \
- --rm -ti \
+ --rm \
--secret ${COPR_SECRET_NAME},target=/root/.config/copr \
"${COPR_CLI_IMAGE}" \
/cni/build.sh "${COPR_REPO_NAME}"
+🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| _package_name="microshift-io-dependencies" | ||
| _minor_version_start=18 | ||
|
|
||
| if [ $# -ne 2 ]; then | ||
| echo "Usage: $(basename "$0") <okd-version-tag> <copr-repo-name>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| OKD_VERSION_TAG="$1" | ||
| COPR_REPO_NAME="$2" | ||
|
|
||
| echo "OKD_VERSION_TAG: '${OKD_VERSION_TAG}'" | ||
| echo "COPR_REPO_NAME: '${COPR_REPO_NAME}'" | ||
|
|
||
| [ -z "${OKD_VERSION_TAG}" ] && echo "ERROR: OKD_VERSION_TAG is not set" && exit 1 | ||
| [ -z "${COPR_REPO_NAME}" ] && echo "ERROR: COPR_REPO_NAME is not set" && exit 1 | ||
|
|
||
| major=$(echo "${OKD_VERSION_TAG}" | cut -d. -f1) | ||
| minor=$(echo "${OKD_VERSION_TAG}" | cut -d. -f2) | ||
| pkg_version="${major}.${minor}" | ||
| echo "New package version: '${pkg_version}'" | ||
|
|
||
| if $(copr-cli list-packages "${COPR_REPO_NAME}" | jq -r '.[].name' | grep -q "${_package_name}"); then | ||
| existing_package_version=$(copr-cli get-package \ | ||
| --name "${_package_name}" \ | ||
| --with-latest-succeeded-build \ | ||
| "${COPR_REPO_NAME}" \ | ||
| | jq -r '.latest_succeeded_build.source_package.version') | ||
|
|
||
| if [[ "${existing_package_version}" == "${pkg_version}-1" ]]; then | ||
| echo "Package ${_package_name} ${pkg_version} already exists in the COPR repository" | ||
| exit 0 | ||
| fi | ||
| fi | ||
|
Comment on lines
+26
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Remove the Proposed fix-if $(copr-cli list-packages "${COPR_REPO_NAME}" | jq -r '.[].name' | grep -q "${_package_name}"); then
+if copr-cli list-packages "${COPR_REPO_NAME}" | jq -r '.[].name' | grep -q "${_package_name}"; thenAs per coding guidelines, shell scripts should pass linting with shellcheck. 🧰 Tools🪛 GitHub Actions: linters[warning] 26-26: SC2091: Remove surrounding $() to avoid executing output (or use eval if intentional). 🤖 Prompt for AI Agents |
||
|
|
||
| rhocp_versions="" | ||
| for min in $(seq "${_minor_version_start}" "${minor}") ; do | ||
| rhocp_versions+="${major}.${min} " | ||
| done | ||
|
|
||
| echo "RHOCP versions to create .repo files for: '${rhocp_versions}'" | ||
|
|
||
| dest=$(mktemp -d "/tmp/${_package_name}.XXXXXX") | ||
| cat > "${dest}/${_package_name}.spec" <<EOF | ||
| %global rhocp_versions ${rhocp_versions} | ||
| %global version ${pkg_version} | ||
|
|
||
| Name: ${_package_name} | ||
| Version: %{version} | ||
| Release: 1%{?dist} | ||
| Summary: RPM repository configurations for MicroShift dependencies | ||
|
|
||
| License: Apache-2.0 | ||
| URL: https://github.com/microshift-io/microshift-io | ||
| BuildArch: noarch | ||
|
|
||
| %description | ||
| This package installs RPM repository configuration files required | ||
| for installing MicroShift dependencies from the OpenShift beta mirror repository. | ||
|
|
||
| %install | ||
| install -d %{buildroot}%{_sysconfdir}/yum.repos.d | ||
|
|
||
| for v in %{rhocp_versions}; do | ||
| cat >> %{buildroot}%{_sysconfdir}/yum.repos.d/openshift-mirror-beta.repo <<EOF2 | ||
| [openshift-mirror-\${v}-beta] | ||
| name=OpenShift \${v} Mirror Beta Repository | ||
| baseurl=https://mirror.openshift.com/pub/openshift-v4/\\\$basearch/dependencies/rpms/\${v}-el9-beta/ | ||
| enabled=1 | ||
| gpgcheck=0 | ||
| skip_if_unavailable=0 | ||
|
|
||
| EOF2 | ||
| done | ||
|
|
||
| %files | ||
| %config(noreplace) %{_sysconfdir}/yum.repos.d/openshift-mirror-beta.repo | ||
|
|
||
| EOF | ||
|
|
||
| echo "--------------- SPEC FILE ---------------" | ||
| cat "${dest}/${_package_name}.spec" | ||
| echo "-----------------------------------------" | ||
|
|
||
| if copr-cli build "${COPR_REPO_NAME}" "${dest}/${_package_name}.spec"; then | ||
| copr-cli regenerate-repos "${COPR_REPO_NAME}" | ||
| else | ||
| exit 1 | ||
|
Comment on lines
+88
to
+91
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
For a .spec file, COPR supports it as a build source too:
If what you actually have is a Git repo with the spec+sources, use the SCM source type (build from Git/SVN/DistGit and have COPR generate the SRPM using rpkg/tito/ Docs to read (most relevant sections):
Sources: [1] [2] 🏁 Script executed: # Check the context around line 88-91 in the file
sed -n '80,100p' src/copr/microshift-io-dependencies.shRepository: microshift-io/microshift Length of output: 426 🏁 Script executed: # Check if there's any SRPM generation earlier in the script
head -n 87 src/copr/microshift-io-dependencies.sh | tail -n 20Repository: microshift-io/microshift Length of output: 602
According to COPR documentation, 🤖 Prompt for AI Agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🧠 Learnings used |
||
| fi | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: microshift-io/microshift
Length of output: 680
🏁 Script executed:
Repository: microshift-io/microshift
Length of output: 565
🏁 Script executed:
Repository: microshift-io/microshift
Length of output: 288
🏁 Script executed:
Repository: microshift-io/microshift
Length of output: 134
Fix package name in installation command.
Line 46 references
microshift-io-dependencies-repo, but the actual package ismicroshift-io-dependencies(as defined in the spec and used inquickrpm.shline 101).Change required
📝 Committable suggestion
🤖 Prompt for AI Agents