fix(autopatch): Added a run_script action to pre-populate the empty pesign.patches file before add_files runs, and set modify_spec: fals #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent-fix/a10s-20261001-035721"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Automated fix by autopatch agent.
Summary: Added a run_script action to pre-populate the empty pesign.patches file before add_files runs, and set modify_spec: false on add_files so it only copies the patch file.
Root cause
The
add_filesaction failed withValueError: File is emptybecausepesignuses an unusual patch-declaration mechanism:Source3: pesign.patches+%include %{SOURCE3}means allPatchN:declarations live in the separatepesign.patchesfile, not in the main spec.pesign.patchesas an empty placeholder (populated at build time by a separate tool).*.patchesfile, redirects the patch declaration target topesign.patches, and callsread_file_data("pesign.patches")— which raisesValueError: File is emptyfor a 0-byte file before it can insert anything.Fix applied:
scripts/init_patches_file.sh— a script that writesPatch0003: 0003-Add-versioned-x86_64-arches-support.patchintopesign.patcheswhen the file is empty, bypassing the tool's inability to seed an empty spec-fragment file.run_scriptaction (withcwd: rpms) immediately beforeadd_filesto invoke that script.modify_spec: falseon the existingadd_filesaction so it only copies the patch file into the package directory without trying to insert thePatchN:directive again (the script already handled that).After the fix,
pesign.patchescontains thePatch0003:declaration, the patch file is present in the rpms tree, the release suffix.alma.1is appended, and the changelog entry is added — all as intended by the original config.Original error
Type:
ValueErrorPackage:
pesign| Webhook branch:c10sShould be fixed in autopatch itself
Pull request closed