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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%autopatch -p1 prints warnings when no patches are found #3493

Open
gotmax23 opened this issue Dec 17, 2024 · 1 comment
Open

%autopatch -p1 prints warnings when no patches are found #3493

gotmax23 opened this issue Dec 17, 2024 · 1 comment

Comments

@gotmax23
Copy link
Contributor

Describe the bug

The go2rpm specfile template includes %autopatch -p1 by default to automatically apply patches if they are present after calling %goprep -A which calls %autosetup -N internally. In the latest RPM version, %autopatch prints out autopatch: no matching patches in range when no patches are defined.

To Reproduce
Steps to reproduce the behavior:

  1. See golang-github-jba-templatecheck as an example or create a %prep section with

    %autosetup -N
    %autopatch -p1
    
  2. Build

Expected behavior

rpmbuild should not print warnings.

Output

RPM build warnings:
    /builddir/build/SPECS/golang-github-jba-templatecheck.spec line 36: autopatch: no matching patches in range
(...)
warning: /builddir/build/SPECS/golang-github-jba-templatecheck.spec line 36: autopatch: no matching patches in range

Environment

  • Fedora 41
  • rpm-build-4.20.0-1.fc41.x86_64

Additional context

@pmatilai
Copy link
Member

You can suppress the warning with -q to %autosetup.

But, it shouldn't really complain in this case. The warning is mostly only meaningful with the -m/-M arguments.

@ffesti ffesti added this to RPM Dec 18, 2024
@github-project-automation github-project-automation bot moved this to Backlog in RPM Dec 18, 2024
@ffesti ffesti moved this from Backlog to Todo in RPM Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants