Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert %prep into a regular build scriptlet #2730

Merged
merged 6 commits into from Oct 27, 2023

Commits on Oct 20, 2023

  1. Rename MacroBuf to rpmMacroBuf for exporting

    This is just in preparation for exposing the handle in some APIs.
    No functional changes.
    pmatilai committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    299933e View commit details
    Browse the repository at this point in the history
  2. Rename mbErr() and mbAppend*() to rpmMacroBuf*() for exporting

    Just preparing to export in the next steps. No functional changes.
    pmatilai committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    3044f50 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. Add support for defining auxiliary macro functions

    Add rpmPushMacroAux() function which allows registering auxiliary macros
    implemented in C and some required helper facilities: export the types,
    rpmMacroBufAppend*() and rpmMacroBufErr() functions, and finally
    add rpmMacroEntryPriv() to let macro retrieve their private data.
    And that's all folks.
    pmatilai committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    ada6d27 View commit details
    Browse the repository at this point in the history
  2. Turn legacy %patchN syntax into a hard error

    This stupid syntax is the thing preventing %prep from becoming a normal
    script, and that in turn blocks so many things now that this has got to
    go.
    
    Considering how widely used this syntax is, this is a disruptive
    and abrupt change - we only started warning on %patchN in 4.18. So lets
    at least print out a legible error message with suggestions how to fix
    for now, even if it requires specifically checking for the obsolete
    syntax.
    pmatilai committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    d927ba2 View commit details
    Browse the repository at this point in the history
  3. Convert %prep into a regular build scriptlet

    Now that we can, implement %setup and %patch as auxiliary macros that are
    defined only during %prep parsing. And voila, %prep is no longer special
    at all. Not much anyhow.
    
    Notably rpmspec --parse now emits %build where it belongs.
    The error message on %patchN is now very much an ugly hack, but at least
    it's something we can drop one sunny day.
    
    Fixes: rpm-software-management#2205
    pmatilai committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    829eecb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    02198d5 View commit details
    Browse the repository at this point in the history