Add support for AlmaLinux import UBI format
This commit is contained in:
parent
14b95de976
commit
69cb69ae9b
35
config.yaml
35
config.yaml
@ -56,7 +56,41 @@ actions:
|
||||
'log --first-parent --no-renames --raw --pretty=fuller --date=default '
|
||||
.. log_branch .. ' > ' .. git_log_file)
|
||||
count: 1
|
||||
- target: "patch-git.lua"
|
||||
find: |
|
||||
function parse_trailer(message)
|
||||
replace: |
|
||||
-- Try to parse version/release from "import UBI glibc-X.XX-XX.elXX" format.
|
||||
-- Returns a synthetic trailer result or nil if pattern doesn't match.
|
||||
local function parse_import_ubi_message(message)
|
||||
-- Match pattern: import UBI glibc-VERSION-RELEASE
|
||||
local version, release = string.match(message,
|
||||
'^import UBI glibc%-([%d%.]+)%-([%d%.%w_]+)%s*\n')
|
||||
if version and release then
|
||||
local full_nvr = 'glibc-' .. version .. '-' .. release
|
||||
return {
|
||||
rpm_version = version,
|
||||
rpm_release = release,
|
||||
rpm_changelog = {'- Sync with upstream ' .. full_nvr},
|
||||
rpm_changelog_stop = true,
|
||||
patchgit_version = 1,
|
||||
}
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function parse_trailer(message)
|
||||
count: 1
|
||||
- target: "patch-git.lua"
|
||||
find: |
|
||||
-- No '\n\n', no trailer.
|
||||
replace: |
|
||||
-- No '\n\n', no trailer. Try fallback for "import UBI" format.
|
||||
local fallback = parse_import_ubi_message(message)
|
||||
if fallback then
|
||||
return fallback
|
||||
end
|
||||
count: 1
|
||||
|
||||
- modify_release:
|
||||
- suffix: ".alma.1"
|
||||
@ -68,3 +102,4 @@ actions:
|
||||
line:
|
||||
- "Overwrite target for x86_64_v2"
|
||||
- "Update patch-git.lua to handle AlmaLinux branches correctly"
|
||||
- "Add support for AlmaLinux import UBI format"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user