Skip to content
This repository was archived by the owner on Nov 19, 2026. It is now read-only.

[skip-ci] RPM: ensure config files are patched - #2026

Merged
openshift-merge-bot[bot] merged 2 commits into
containers:mainfrom
lsm5:config-patch
May 30, 2024
Merged

openshift-merge-bot[bot] merged 2 commits into
containers:mainfrom
lsm5:config-patch

Conversation

@lsm5

@lsm5 lsm5 commented May 30, 2024

Copy link
Copy Markdown
Member

This commit copies over shortnames.conf, registries.conf and storage.conf to the rpm build dir before running the patching script.

Prior to this, the script would complain about not finding those files but the rpmbuild process itself didn't fail.

@lsm5

lsm5 commented May 30, 2024

Copy link
Copy Markdown
Member Author

@edsantiago @Luap99 @jnovy PTAL

@lsm5

lsm5 commented May 30, 2024

Copy link
Copy Markdown
Member Author

@jnovy @inknos do you know how to ensure rpmbuild fails if a script used in the setup or build stages fails to find a file? I thought -e in the script should've been enough (?)

@Luap99

Luap99 commented May 30, 2024

Copy link
Copy Markdown
Member

@jnovy @inknos do you know how to ensure rpmbuild fails if a script used in the setup or build stages fails to find a file? I thought -e in the script should've been enough (?)

The script exits 0 when I execute in the repo root here despite not having all the files, the reason is that the code does if grep ... so a missing file is the same as no match and the condition just goes into the else so there is never a error thrown by the script.

@lsm5

lsm5 commented May 30, 2024

Copy link
Copy Markdown
Member Author

moved zstd:chunked to rawhide and rhel > 10.

@rhatdan

rhatdan commented May 30, 2024

Copy link
Copy Markdown
Member

LGTM

Comment thread rpm/containers-common.spec Resolved
lsm5 added 2 commits May 30, 2024 10:15
This commit copies over shortnames.conf, registries.conf
and storage.conf to the rpm build dir before running the patching
script.

Prior to this, the script would complain about not finding those files
but the rpmbuild process itself didn't fail.

Signed-off-by: Lokesh Mandvekar <[email protected]>
@openshift-ci

openshift-ci Bot commented May 30, 2024

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, lsm5

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jnovy

jnovy commented May 30, 2024

Copy link
Copy Markdown
Contributor

@Luap99 In general RPM scriptlets should never fail as a it would break the whole transaction leaving the system in inconsistent state - it can put a message in the log though.

@Luap99

Luap99 commented May 30, 2024

Copy link
Copy Markdown
Member

@Luap99 In general RPM scriptlets should never fail as a it would break the whole transaction leaving the system in inconsistent state - it can put a message in the log though.

But we are not talking about a rpm scriptlet are we? This here patches the config files at rpm build time so we very much want to know if if failed to patch the file otherwise we install invalid config files

@lsm5

lsm5 commented May 30, 2024

Copy link
Copy Markdown
Member Author

let's make sure to get this one in before the new c/common cut tomorrow.

@edsantiago

Copy link
Copy Markdown
Member

/lgtm

This is specfile, not scriptlet. Failing in rpmbuild is the right thing to do.

@openshift-ci openshift-ci Bot added the lgtm label May 30, 2024
@openshift-merge-bot
openshift-merge-bot Bot merged commit 18fdea5 into containers:main May 30, 2024
@lsm5

lsm5 commented May 30, 2024

Copy link
Copy Markdown
Member Author

/cherrypick v0.59

@jnovy

jnovy commented May 31, 2024

Copy link
Copy Markdown
Contributor

LGTM

@travier

travier commented Jun 11, 2024 •

Copy link
Copy Markdown
Member

@cgwalters

This comment was marked as outdated.

@cgwalters

Copy link
Copy Markdown
Contributor

➡️ #2048

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants