Skip to content

Mock (<= v6.6) relies on existing resolv.conf with --hermetic-build#118

Merged
praiskup merged 1 commit intokonflux-ci:mainfrom
praiskup:praiskup-resolv.conf
Jan 29, 2026
Merged

Mock (<= v6.6) relies on existing resolv.conf with --hermetic-build#118
praiskup merged 1 commit intokonflux-ci:mainfrom
praiskup:praiskup-resolv.conf

Conversation

@praiskup
Copy link
Member

@snyk-io
Copy link

snyk-io bot commented Jan 29, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a workaround for an issue where mock versions up to 6.6 require /etc/resolv.conf to exist, even during a hermetic build. The change correctly creates this file. I've suggested adding a comment to document the reason for this workaround, which will improve maintainability.

Containerfile Outdated
# Assert utility versions
RUN test "$(rpm --eval '%[ v"'"$(rpm -q --qf '%{VERSION}\n' mock)"'" >= v"6.4" ]')" = "1"

RUN touch /etc/resolv.conf

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability, it's good practice to add a comment explaining why this touch command is necessary. It provides valuable context for future developers, clarifying that this is a workaround for a specific version range of the mock tool.

# Mock (<= v6.6) relies on existing resolv.conf with --hermetic-build
# See: https://bugzilla.redhat.com/show_bug.cgi?id=2433808
# See: https://github.com/rpm-software-management/mock/pull/1697
RUN touch /etc/resolv.conf

praiskup added a commit to praiskup/rpmbuild-pipeline-environment-container that referenced this pull request Jan 29, 2026
@praiskup praiskup force-pushed the praiskup-resolv.conf branch from d658b84 to a4a1bef Compare January 29, 2026 10:09
@praiskup praiskup force-pushed the praiskup-resolv.conf branch from a4a1bef to 1effaa3 Compare January 29, 2026 10:10
Copy link
Contributor

@tkopecek tkopecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@praiskup praiskup merged commit 927831a into konflux-ci:main Jan 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants