Commit 1d3a94d
committed
[ULS]: Add --bump mode to update_lt_spec.py for non-rebase spec updates
Adds a --bump flag for updating the spec when commits have been added
without rebasing to a new upstream kernel version.
Bump mode (--bump):
- Parses N from the current ciq_kernel-X.Y.Z-N tag and increments it
- Updates %define pkgrelease from N to N+1 and resets %define buildid
to .1, so the tarball name changes (e.g. linux-6.18.21-2.1.el9)
- Prepends a new changelog entry above existing ones using commits
since the last ciq_kernel tag as the log range; the changelog version
uses .1 directly since buildid is always reset to .1 on bump
- Optionally commits (--commit) and creates the new ciq_kernel-X.Y.Z-N+1
tag (--tag); --tag requires --commit, prints a warning if used without
--bump, and is skipped with a warning if --commit made no changes
Rebase mode now also resets %define pkgrelease back to 1%{?buildid} so
the release counter returns to 1 for the new kernel version.
New helpers in ciq_helpers.py:
- parse_ciq_tag_release(): extracts N from ciq_kernel-X.Y.Z-N tags
- parse_kernel_tag(): extended to accept ciq_kernel-X.Y.Z-N format
- prepend_spec_changelog(): inserts a new entry at the top of %changelog
- replace_spec_changelog(), prepend_spec_changelog(): raise ValueError
instead of silently no-oping when %changelog is not found
- read_spec_el_version(): reads %define values from spec lines; delegates
to private _read_spec_define() which builds the regex from name + a
value-capture pattern to avoid duplication
- _set_spec_pkgrelease(): updates the numeric base of a %define pkgrelease
line; shared by update_spec_file() and bump_spec_file()1 parent 202f727 commit 1d3a94d
2 files changed
Lines changed: 304 additions & 65 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
360 | 374 | | |
361 | | - | |
| 375 | + | |
362 | 376 | | |
363 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
364 | 380 | | |
365 | 381 | | |
366 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
367 | 387 | | |
368 | 388 | | |
369 | | - | |
| 389 | + | |
370 | 390 | | |
371 | 391 | | |
372 | 392 | | |
| |||
380 | 400 | | |
381 | 401 | | |
382 | 402 | | |
| 403 | + | |
383 | 404 | | |
384 | 405 | | |
385 | 406 | | |
| |||
393 | 414 | | |
394 | 415 | | |
395 | 416 | | |
| 417 | + | |
396 | 418 | | |
397 | 419 | | |
| 420 | + | |
398 | 421 | | |
399 | 422 | | |
400 | 423 | | |
401 | 424 | | |
402 | 425 | | |
403 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
404 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
0 commit comments