#527 `fedpkg import` does not work with rpmautospec
Closed: Fixed 2 years ago by onosek. Opened 2 years ago by vondruch.

This does not make any sense to me:

$ fedpkg --release f40 import rubygem-jekyll-4.3.2-3.fc40.src.rpm 
Could not execute import_srpm: SRPM was processed by rpmautospec (specfile "rubygem-jekyll.spec" was analyzed)

rpmautospec should have no influence on fedpkg import.


Here is a reason why fedpkg is working this way:

https://pagure.io/rpkg/c/3087dd72e933568896b2f167bab75194482a6cd1?branch=master

If you think that this behavior is wrong, I think it would need wider discussion.

If you think that this behavior is wrong, I think it would need wider discussion.

Yes, I do think it is wrong. Let me explain.

I understand the argument and it is good one. However, the import is still the best command to have everything in order, such as adding patches, removing patches and uploading the source tarballs. There is not equivalent to this.

Actually, my real life workflow (without autospec) is something like this:

  1. fedpkg srpm
  2. fedpkg clog
  3. git add -u; git commit -F clog
  4. fedpkg import SRPM
  5. git commit --am

With autospec, it will need modifications, because clog won't make sense anymore and after the import, git reset foo.spec; git checkout foo.spec will be needed. But still, the import is to add/remove the updated patches and upload source tarball.

While I never really used that workflow, I have another use case that my teammates want to be supported before they agree to mass convert the Python packages to %autorelease.

When they import new Fedora packages to CentOS Stream 8+9, they do:

  1. centpkg import
  2. commit the changes as "initial import from Fedora"
  3. do EL-specific changes
  4. commit the changes as "EL conversion"

The inability to import an SRPM processed by rpmautopsec makes their work harder.


That said, I think I know how to solve this issue.

First, rpmautospec needs to start generating the changelog like this:

%changelog
## START: Generated by rpmautospec
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Mon Jul 10 2023 Python Maint <python-maint@redhat.com> - 7.2.5-7
- Rebuilt for Python 3.12

...
## END: Generated by rpmautospec

Then, rpkg can strip the ## START: Set by rpmautospec .. ## END: Set by rpmautospec section at the beginning and the ## START: Generated by rpmautospec .. ## END: Generated by rpmautospec section (usually) at the end.

Metadata Update from @onosek:
- Issue set to the milestone: 1.45

a year ago

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #699 Merged 2 years ago
  • #312 Closed a year ago