Commit d6e8338
committed
rpm: add fileattr multifile generator
This allows dlopen notes to be turned into appropriate dependencies
automatically. The dlopen_notes.attr file needs to be installed into
%{_fileattrsdir}.
By default, dependencies are generated for all files that have package
notes. I think this is a reasonable default because it makes the whole
feature easier to discover. In more realistic cases, esp. with
multiple subpackages, it's likely that the packager may need to
configure the distribution of dependencies between subpackages.
One shortcoming of the scheme is that everything is per file, so it's
not possible to say that dependencies generated from a feature should
be assigned to a different subpackage. This is how the feature is
designed in rpm.
The opt-out mechanism is a bit clunky. The first option I considered
was to tell the user to undefine
%__dlopen_notes_requires/recommends/suggests, but that requires three
lines of boilerplate. And might not be forwards-compatible if we add
new features in the future. The second option would be to tell the
user to define __dlopen_notes_requires/recommends/suggests_opts to
%nil. But that has similar problems. I think it's nice to have an
obvious oneliner to handle this. Unfortunately, when I tried to use
%__dlopen_notes_requires %{?_dlopen_notes_generator:%{_dlopen_notes_generator} ...}
%__dlopen_notes_recommends %{?_dlopen_notes_generator:%{_dlopen_notes_generator} ...}
%__dlopen_notes_suggests %{?_dlopen_notes_generator:%{_dlopen_notes_generator} ...}
in the .attr file, when the package has %undefine _dlopen_notes_generator,
we still end up with the macro being expanded. Maybe I misunderstood
the macro expansion logic. The approach with 'true' is clunky, but
it works fine.
Thanks to Neal Gompa for the suggestion to use this protocol.
The new interface is new, independent of the existing options
--feature, --rpm-recommends, --rpm-requires that were previously added
to support rpms. Unfortunately, with the fileattr protocol, the
old way to specify information is not useful. Instead of trying
to shoehorn the new metadata into existing options, I think it's
easier to add a new set with clear semantics.1 parent 2ad3aca commit d6e8338
3 files changed
+150
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
100 | 113 | | |
101 | 114 | | |
102 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
| |||
143 | 154 | | |
144 | 155 | | |
145 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
146 | 203 | | |
147 | 204 | | |
148 | 205 | | |
| |||
187 | 244 | | |
188 | 245 | | |
189 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
190 | 265 | | |
191 | 266 | | |
192 | | - | |
193 | | - | |
| 267 | + | |
| 268 | + | |
194 | 269 | | |
195 | 270 | | |
196 | 271 | | |
| |||
207 | 282 | | |
208 | 283 | | |
209 | 284 | | |
210 | | - | |
| 285 | + | |
| 286 | + | |
211 | 287 | | |
212 | 288 | | |
213 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
214 | 301 | | |
215 | 302 | | |
216 | 303 | | |
217 | 304 | | |
218 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
219 | 309 | | |
220 | 310 | | |
221 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments