You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PGBuild/Modules/ABICompCheck.pm
+67-40Lines changed: 67 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@ See accompanying License file for license details
9
9
10
10
=head1PGBuild::Modules::ABICompCheck
11
11
12
-
This module is used for ABI compliance checking of PostgreSQL builds
13
-
by comparing the latest commit on a stable branch with the most recent
14
-
tag on that branch. This helps detect unintended changes that could
15
-
break compatibility for extensions or client applications.
12
+
This module is used for ABI compliance checking of PostgreSQL builds by
13
+
comparing the latest commit on a stable branch with the most recent tag on that
14
+
branch. This helps detect unintended changes that could break compatibility for
15
+
extensions or client applications.
16
16
17
17
=head2EXECUTION FLOW
18
18
@@ -22,58 +22,75 @@ The module follows these steps to perform an ABI comparison:
22
22
23
23
=item1.
24
24
25
-
The build farm completes its standard build and installation of PostgreSQL for the latest commit on a given stable branch.
25
+
The build farm completes its standard build and installation of PostgreSQL for
26
+
the latest commit on a given stable branch.
26
27
27
28
=item2.
28
29
29
30
The C<install> hook of the ABICompCheck module is triggered.
30
31
31
32
=item3.
32
33
33
-
The module identifies the most recent tag for a particular branch (e.g., REL_16_1) to use as a baseline for comparison against the most recent commit of the branch.
34
+
The module identifies the most recent tag for a particular branch (e.g.,
35
+
REL_16_1) to use as a baseline for comparison against the most recent commit of
36
+
the branch.
34
37
35
38
=item4.
36
39
37
-
It checks if a pre-existing, complete build and ABI dump for this baseline tag exists in its working directory (C<buildroot/abicheck.$animal_name>).
40
+
It checks if a pre-existing, complete build and ABI dump for this baseline tag
41
+
exists in its working directory (C<buildroot/abicheck.$animal_name>).
38
42
39
43
=item5.
40
44
41
-
If the baseline tag's build is missing or incomplete, the module performs a fresh build of that tag:
45
+
If the baseline tag's build is missing or incomplete, the module performs a
46
+
fresh build of that tag:
42
47
- It checks out the source code for the tag.
43
-
- It runs C<configure>, C<make>, and C<make install> for the tag in an isolated directory.
44
-
- It uses C<abidw> to generate XML representations of the ABI for key binaries (like C<postgres>, C<libpq.so>, C<ecpg> - These are the default binaries and can be customised by animal owners) from this tag build. These are stored for future runs.
48
+
- It runs C<configure>, C<make>, and C<make install> for the tag in an
49
+
isolated directory.
50
+
- It uses C<abidw> to generate XML representations of the ABI for key
51
+
binaries (like C<postgres>, C<libpq.so>, C<ecpg> - These are the
52
+
default binaries and can be customised by animal owners) from this tag
53
+
build. These are stored for future runs.
45
54
46
55
=item6.
47
56
48
-
The module then generates ABI XML files for the same set of key binaries from the main build (the latest commit).
57
+
The module then generates ABI XML files for the same set of key binaries from
58
+
the main build (the latest commit).
49
59
50
60
=item7.
51
61
52
-
Using C<abidiff>, it compares the ABI XML file of each binary from the latest commit against the corresponding file from the baseline tag.
62
+
Using C<abidiff>, it compares the ABI XML file of each binary from the latest
63
+
commit against the corresponding file from the baseline tag.
53
64
54
65
=item8.
55
66
56
-
Any differences detected by C<abidiff> are collected into a log report. If no differences are found, a success message is logged.
67
+
Any differences detected by C<abidiff> are collected into a log report. If no
68
+
differences are found, a success message is logged.
57
69
58
70
=item9.
59
71
60
-
The final report, containing either the ABI differences or "no abi diffs found in this run", is sent to the build farm server as part of the overall build status.
72
+
The final report, containing either the ABI differences or "no abi diffs found
73
+
in this run", is sent to the build farm server as part of the overall build
74
+
status.
61
75
62
76
=back
63
77
64
78
=head2CONFIGURATION OPTIONS
65
79
66
-
The module supports the following configuration options under `abi_comp_check` key in build-farm.conf:
80
+
The module supports the following configuration options under `abi_comp_check`
81
+
key in build-farm.conf:
67
82
68
83
=over4
69
84
70
85
=itemB<abi_compare_root>
71
86
72
-
Specifies the root directory for ABI comparison data. If not set, defaults to C<buildroot/abicheck.$animal_name>.
87
+
Specifies the root directory for ABI comparison data. If not set, defaults to
88
+
C<buildroot/abicheck.$animal_name>.
73
89
74
90
=itemB<binaries_rel_path>
75
91
76
-
A hash reference mapping binary names to their relative paths for ABI comparison. Defaults to:
92
+
A hash reference mapping binary names to their relative paths for ABI
93
+
comparison. Defaults to:
77
94
78
95
{
79
96
'postgres' => 'bin/postgres',
@@ -92,7 +109,8 @@ An array reference containing flags to pass to C<abidw>. Defaults to:
92
109
93
110
=itemB<tag_for_branch>
94
111
95
-
A hash reference mapping branch names to their corresponding tags for ABI comparison. Defaults to empty hash which means latest tags for all branches:
112
+
A hash reference mapping branch names to their corresponding tags for ABI
113
+
comparison. Defaults to empty hash which means latest tags for all branches:
96
114
97
115
{}
98
116
@@ -104,19 +122,23 @@ A hash reference mapping branch names to their corresponding tags for ABI compar
104
122
105
123
=item*
106
124
107
-
This module have msvc related duped from run_build.pl script but later I realised C<abidiff> supports only elf binaries. Maybe those functions can be used in future if some other ABI Compliance checking tool supports them.
125
+
This module have msvc related duped from run_build.pl script but later I
126
+
realised C<abidiff> supports only elf binaries. Maybe those functions can be
127
+
used in future if some other ABI Compliance checking tool supports them.
108
128
109
129
=item*
110
130
111
-
This module only works for stable branches in compliance with the PostgreSQL ABI policy for minor releases.
131
+
This module only works for stable branches in compliance with the PostgreSQL
132
+
ABI policy for minor releases.
112
133
113
134
=item*
114
135
115
136
Debug information is required for build to be able to use this module
116
137
117
138
=item*
118
139
119
-
Before using this module, ensure that you have the build-essential, abigail-tools, git installed for your animal.
140
+
Before using this module, ensure that you have the build-essential,
0 commit comments