Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

RFE: Support %autochangelog and %autorelease when doing tagless imports using rpmautospec logic #21

@nazunalika

Description

@nazunalika

CentOS Stream 10 (and Fedora) have rpmautospec as opt-in. This means that release tags can easily have %autorelease and/or %autochangelog.

When processing a repo that has SOURCES and SPECS, this generally isn't a big deal. These are typically in the format we expect with everything filled out.

When processing a repo that has everything in a flat structure, the SPEC file may have %autorelease. This can also mean %autochangelog may exist, which means an accompanying changelog file in the repo will also exist alongside the spec file.

When importing with srpmproc with tagless mode, it should be possible to properly assess the release and changelog and fill them in accordingly.

pv2 currently supports this by importing the rpmautospec python library.

Example starting spec: https://gitlab.com/redhat/centos-stream/rpms/PyYAML/-/blob/c10s/PyYAML.spec
Example processed spec: https://git.rockylinux.org/staging/src-rhel/rpms/pyyaml/-/blob/c10s/SPECS/PyYAML.spec

It should be noted that while %changelog is appended to the spec file, %autorelease is not modified. It is processed by the macro logic added at the top of the spec file by rpmautospec (if applicable). Otherwise, it is processed by other means.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions