Commit Graph

8 Commits

Author SHA1 Message Date
eabdullin
265d235732 Add 64k tempalte for AlmaLinux 2026-06-03 16:00:04 +03:00
e6832c858e fix(autopatch): Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requ (#1)
Automated fix by autopatch agent.

**Summary:** Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requires: lines

### Root cause
The upstream spec (v10.3) changed in multiple ways: (1) '%define templatedir' no longer includes '/80-rhel' at the end (now points to the parent templates.d/ directory), (2) the %description text changed from 'placed in %{templatedir}' to 'placed in %{templatedir}/80-rhel', (3) the %install section changed from 'cp -a 80-rhel/*' to 'cp -a 80-rhel' (no trailing /*) and added a new 'cp -a 70-64k' line for the new %package 64k subpackage, (4) the %files section changed from '%{templatedir}/*' to '%{templatedir}/80-rhel/*'. Additionally, the new %package 64k subpackage introduced a second 'Requires:' line which broke the lorax-templates-almalinux-requires.sh script (sed received a multi-line replacement string). Fixed by adding 'head -1' to the grep pipeline so only the main package's Requires is captured. The reference branch (a10) had the same outdated config — no fix available there.

### Original error
**Type:** `ActionNotAppliedError`

```
Traceback (most recent call last):
  File "/root/autopatch-tool/src/webserv.py", line 87, in debrand_packages
    result = apply_modifications(
  File "/root/autopatch-tool/src/debranding.py", line 120, in apply_modifications
    config.apply_actions(rpms_working_dir + f"/{package}")
  File "/root/autopatch-tool/src/actions_handler.py", line 932, in apply_actions
    action.execute(Path(package_path))
  File "/root/autopatch-tool/src/actions_handler.py", line 472, in execute
    process_lines(
  File "/root/autopatch-tool/src/actions_handler.py", line 233, in process_lines
    raise ActionNotAppliedError(
actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['%define templatedir %{_datadir}/lorax/templates.d/80-rhel']' in /root/autopatch-tool/src/rpms-namespace/lorax-templates-rhel/lorax-templates-rhel.spec
```

---
Package: `lorax-templates-rhel` | Webhook branch: `c10s`

Co-authored-by: eabdullin <eabdullin@almalinux.org>
Reviewed-on: #1
2026-06-03 09:08:55 +00:00
eabdullin
0d9aa63a3b Update patch generator
Remove "Correct grammar in Grub" patch -- use sed instead
2026-01-30 12:46:15 +03:00
eabdullin
793e8039d2 Remove 70-almalinux dirs 2026-01-28 17:37:32 +03:00
eabdullin
4856de5e63 cp 80-rhel dir 2026-01-28 17:08:39 +03:00
eabdullin
63eb08ba82 Fix lorax-templates-almalinux-requires.sh 2026-01-28 17:05:32 +03:00
eabdullin
43067a912f - Add script to generate v2 patch dynamically
- Add riscv64 support patch as a separate file
2026-01-28 17:03:38 +03:00
Yuriy Kohut
0e6caa0345 Initiate autopatch for lorax-templates-rhel package 2026-01-27 16:49:09 +02:00