1
0
mirror of https://github.com/coreos/fedora-coreos-config.git synced 2026-02-05 09:45:30 +01:00

tree: import changes from testing-devel at 0537a55cad

This commit is contained in:
CoreOS Bot
2025-07-14 16:02:50 +00:00
parent 1ed5aa6fa6
commit 811e230051
2 changed files with 21 additions and 21 deletions

View File

@@ -29,6 +29,7 @@ jobs:
podman run --rm -v $PWD:/run/src -w /run/src quay.io/fedora/fedora:latest sh -c '
set -xeuo pipefail
dnf -y install koji createrepo_c python3-dnf python3-PyYAML && dnf clean all
workdir="/run/src"
overridesdir="rpmoverrides"
# prepare directory to download override packages
@@ -40,12 +41,30 @@ jobs:
# create local yum repo
if [[ -n $(ls "${overridesdir}/"*.rpm 2> /dev/null) ]]; then
cd "${overridesdir}" && createrepo_c .
cd "${overridesdir}" && createrepo_c .
cat > "${workdir}"/local-overrides.repo <<EOF
[local-overrides]
name=local-overrides
baseurl=file://${workdir}/${overridesdir}/
enabled=1
gpgcheck=0
cost=500
EOF
else
# remove empty dir rpmoverrides
rmdir "${workdir}/${overridesdir}/"
fi
rm "${workdir}"/download-overrides.py
'
- name: Build
# Note: we should be able to drop the `-v $PWD:/run/src` once
# https://github.com/containers/buildah/issues/5952 is fixed.
run: podman build --security-opt=label=disable --cap-add=all --device /dev/fuse --build-arg-file build-args.conf -v $PWD:/run/src . -t localhost/fedora-coreos
run: |
set -xeuo pipefail
SECRETS=()
if [[ -f local-overrides.repo ]]; then
SECRETS+=(--secret id=yumrepos,src=local-overrides.repo)
fi
podman build "${SECRETS[@]}" --security-opt=label=disable --cap-add=all --device /dev/fuse --build-arg-file build-args.conf -v $PWD:/run/src . -t localhost/fedora-coreos
- name: Sanity-check
run: podman run --rm localhost/fedora-coreos echo hello

View File

@@ -33,7 +33,6 @@ def main():
locked_nevras = get_locked_nevras()
if locked_nevras:
inject_pool_repo_if_exists(locked_nevras)
create_and_inject_local_rpm_overrides_repo_if_needed(locked_nevras)
packages.extend(locked_nevras)
overlays = gather_overlays(manifest)
@@ -50,24 +49,6 @@ def main():
inject_postprocess_scripts(target_rootfs, manifest)
def create_and_inject_local_rpm_overrides_repo_if_needed(locked_nevras):
rpmoverrides_dir = os.path.join(CONTEXTDIR, 'rpmoverrides')
if not os.path.exists(rpmoverrides_dir):
return
# create local-overrides.repo
packages = ','.join(locked_nevras)
with open("/etc/yum.repos.d/local-overrides.repo", 'w') as f:
f.write(f"""
[local-overrides]
name=local-overrides
baseurl=file://{rpmoverrides_dir}/
gpgcheck=0
cost=500
includepkgs={packages}
""")
def get_treefile(manifest_path):
with tempfile.NamedTemporaryFile(suffix='.json', mode='w') as tmp_manifest:
# This ensures that the treefile represents only the CoreOS bits and