From 7e5bf08f12bd6a8530d17f978f1ed6ad9c2fb5c7 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Wed, 20 Aug 2025 19:50:27 +0000 Subject: [PATCH 1/6] Do now add /usr/lib64/lp64d to ricv64 --- config.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/config.yaml b/config.yaml index fca047b..508d653 100644 --- a/config.yaml +++ b/config.yaml @@ -8,19 +8,6 @@ actions: %define target x86_64-redhat-linux %endif count: 1 - - target: "spec" - find: | - %ifarch s390x - %verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules.d/gconv-modules-s390.conf - %endif - replace: | - %ifarch s390x - %verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules.d/gconv-modules-s390.conf - %endif - %ifarch riscv64 - %{_libdir}/lp64d - %endif - count: 1 - modify_release: - suffix: ".alma.1" @@ -31,4 +18,3 @@ actions: email: "eabdullin@almalinux.org" line: - "Overwrite target for x86_64_v2" - - "Add /usr/lib64/lp64d to ricv64" -- 2.47.3 From 5c0c36b09221d1870c42ede3fef9bb53ab11bb6d Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 16 Sep 2025 13:30:18 +0300 Subject: [PATCH 2/6] Update patch-git.lua to handle AlmaLinux branches correctly --- config.yaml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/config.yaml b/config.yaml index 508d653..1a07dd4 100644 --- a/config.yaml +++ b/config.yaml @@ -8,6 +8,48 @@ actions: %define target x86_64-redhat-linux %endif count: 1 + - target: "patch-git.lua" + find: | + local have_git = (posix == nil -- Not running under rpm. + or (posix.access('/usr/bin/git', 'x') + and posix.access(sourcedir .. '/.git/.', 'x'))) + local commit_marker_contents -- For git_commit_file. + replace: | + local have_git = (posix == nil -- Not running under rpm. + or (posix.access('/usr/bin/git', 'x') + and posix.access(sourcedir .. '/.git/.', 'x'))) + local commit_marker_contents -- For git_commit_file. + + -- If the branch is AlmaLinux branch, then we need to get history of Upstream + -- branch, and skip all AlmaLinux-specific commits. To avoid duplicates + -- in changelog and bumped release numbers + local branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') + local log_branch = branch + local anum = string.match(branch, '^a(%d+)s$') + if anum then + log_branch = 'c' .. anum .. 's' + else + log_branch = 'HEAD' + end + count: 1 + - target: "patch-git.lua" + find: | + commit_marker_contents = + run_git('rev-parse HEAD') .. 'v' .. VERSION .. '\n' + + replace: | + commit_marker_contents = + run_git('rev-parse ' .. log_branch) .. 'v' .. VERSION .. '\n' + count: 1 + - target: "patch-git.lua" + find: | + 'log --first-parent --no-renames --raw --pretty=fuller --date=default > ' + .. git_log_file) + replace: | + 'log --first-parent --no-renames --raw --pretty=fuller --date=default ' + .. log_branch .. ' > ' .. git_log_file) + count: 1 + - modify_release: - suffix: ".alma.1" @@ -18,3 +60,4 @@ actions: email: "eabdullin@almalinux.org" line: - "Overwrite target for x86_64_v2" + - "Update patch-git.lua to handle AlmaLinux branches correctly" -- 2.47.3 From 70b920ecb4a7f3a5dd779f6cb6a208560d304d18 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 16 Sep 2025 16:30:32 +0300 Subject: [PATCH 3/6] Update patch-lua to support tags --- config.yaml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/config.yaml b/config.yaml index 1a07dd4..f3f5b66 100644 --- a/config.yaml +++ b/config.yaml @@ -20,16 +20,24 @@ actions: and posix.access(sourcedir .. '/.git/.', 'x'))) local commit_marker_contents -- For git_commit_file. - -- If the branch is AlmaLinux branch, then we need to get history of Upstream - -- branch, and skip all AlmaLinux-specific commits. To avoid duplicates + -- If the branch/tag is AlmaLinux, then we need to get history of Upstream + -- branch/tag, and skip all AlmaLinux-specific commits. To avoid duplicates -- in changelog and bumped release numbers - local branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') - local log_branch = branch - local anum = string.match(branch, '^a(%d+)s$') - if anum then - log_branch = 'c' .. anum .. 's' - else - log_branch = 'HEAD' + if have_git then + local log_branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') + if log_branch == 'HEAD' then + log_branch = string.match(run_git('describe --tags --exact-match'), '([^\n]+)') + local anum, aname = string.match(log_branch, '^changed/a(%d+s?)/(.+)$') + local cname = string.gsub(aname, '%.alma%.[0-9]+$', '') + log_branch = 'imports/c' .. anum .. '/' .. cname + else + local anum = string.match(log_branch, '^a(%d+s?)$') + if anum then + log_branch = 'c' .. anum + else + log_branch = 'HEAD' + end + end end count: 1 - target: "patch-git.lua" -- 2.47.3 From a3cf3ebd19bf8141c26429b4d0862e176bcda367 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 16 Sep 2025 16:30:32 +0300 Subject: [PATCH 4/6] Update patch-lua to support tags --- config.yaml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/config.yaml b/config.yaml index f3f5b66..9e84c52 100644 --- a/config.yaml +++ b/config.yaml @@ -23,28 +23,23 @@ actions: -- If the branch/tag is AlmaLinux, then we need to get history of Upstream -- branch/tag, and skip all AlmaLinux-specific commits. To avoid duplicates -- in changelog and bumped release numbers - if have_git then - local log_branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') - if log_branch == 'HEAD' then - log_branch = string.match(run_git('describe --tags --exact-match'), '([^\n]+)') - local anum, aname = string.match(log_branch, '^changed/a(%d+s?)/(.+)$') - local cname = string.gsub(aname, '%.alma%.[0-9]+$', '') - log_branch = 'imports/c' .. anum .. '/' .. cname - else - local anum = string.match(log_branch, '^a(%d+s?)$') - if anum then - log_branch = 'c' .. anum - else - log_branch = 'HEAD' - end - end + local log_branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') + local anum = string.match(log_branch, '^a(%d+s?)$') + if anum then + log_branch = 'c' .. anum + else + log_branch = string.match(run_git('describe --tags --exact-match'), '([^\n]+)') + local anum, aname = string.match(log_branch, '^changed/a(%d+s?)/(.+)$') + if anum then + local cname = string.gsub(aname, '%.alma%.[0-9]+$', '') + log_branch = 'imports/c' .. anum .. '/' .. cname + end end count: 1 - target: "patch-git.lua" find: | commit_marker_contents = run_git('rev-parse HEAD') .. 'v' .. VERSION .. '\n' - replace: | commit_marker_contents = run_git('rev-parse ' .. log_branch) .. 'v' .. VERSION .. '\n' -- 2.47.3 From 514a503d8c39e13acc9780936e003d3198a54793 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 17 Sep 2025 11:14:25 +0300 Subject: [PATCH 5/6] Add check for .git dir --- config.yaml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/config.yaml b/config.yaml index 9e84c52..8a82e03 100644 --- a/config.yaml +++ b/config.yaml @@ -14,27 +14,31 @@ actions: or (posix.access('/usr/bin/git', 'x') and posix.access(sourcedir .. '/.git/.', 'x'))) local commit_marker_contents -- For git_commit_file. + if have_git then + commit_marker_contents = replace: | local have_git = (posix == nil -- Not running under rpm. or (posix.access('/usr/bin/git', 'x') and posix.access(sourcedir .. '/.git/.', 'x'))) local commit_marker_contents -- For git_commit_file. - -- If the branch/tag is AlmaLinux, then we need to get history of Upstream -- branch/tag, and skip all AlmaLinux-specific commits. To avoid duplicates -- in changelog and bumped release numbers - local log_branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') - local anum = string.match(log_branch, '^a(%d+s?)$') - if anum then - log_branch = 'c' .. anum - else - log_branch = string.match(run_git('describe --tags --exact-match'), '([^\n]+)') - local anum, aname = string.match(log_branch, '^changed/a(%d+s?)/(.+)$') - if anum then - local cname = string.gsub(aname, '%.alma%.[0-9]+$', '') - log_branch = 'imports/c' .. anum .. '/' .. cname - end - end + local log_branch = 'HEAD' + if have_git then + log_branch = string.match(run_git('rev-parse --abbrev-ref HEAD'), '([^\n]+)') + local anum = string.match(log_branch, '^a(%d+s?)$') + if anum then + log_branch = 'c' .. anum + else + log_branch = string.match(run_git('describe --tags --exact-match'), '([^\n]+)') + local anum, aname = string.match(log_branch, '^changed/a(%d+s?)/(.+)$') + if anum then + local cname = string.gsub(aname, '%.alma%.[0-9]+$', '') + log_branch = 'imports/c' .. anum .. '/' .. cname + end + end + commit_marker_contents = count: 1 - target: "patch-git.lua" find: | -- 2.47.3 From 691658f579f45e3f0b68b534071e69cc7e8f8f5a Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 17 Nov 2025 16:40:42 +0300 Subject: [PATCH 6/6] Update patch for patch-git.lua --- config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index 8a82e03..a21fc27 100644 --- a/config.yaml +++ b/config.yaml @@ -12,14 +12,14 @@ actions: find: | local have_git = (posix == nil -- Not running under rpm. or (posix.access('/usr/bin/git', 'x') - and posix.access(sourcedir .. '/.git/.', 'x'))) + and posix.access(sourcedir .. '/.git', 'r'))) local commit_marker_contents -- For git_commit_file. if have_git then commit_marker_contents = replace: | local have_git = (posix == nil -- Not running under rpm. or (posix.access('/usr/bin/git', 'x') - and posix.access(sourcedir .. '/.git/.', 'x'))) + and posix.access(sourcedir .. '/.git', 'r'))) local commit_marker_contents -- For git_commit_file. -- If the branch/tag is AlmaLinux, then we need to get history of Upstream -- branch/tag, and skip all AlmaLinux-specific commits. To avoid duplicates -- 2.47.3