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

dist-git - avoid the downstream-only hacks we are using for autospec #2317

Closed
2 tasks
fedora-copr-github-bot opened this issue Nov 19, 2022 · 10 comments · Fixed by #2686
Closed
2 tasks

dist-git - avoid the downstream-only hacks we are using for autospec #2317

fedora-copr-github-bot opened this issue Nov 19, 2022 · 10 comments · Fixed by #2686

Comments

@fedora-copr-github-bot
Copy link
Collaborator

fedora-copr-github-bot commented Nov 19, 2022

There are now two problems to fix:

  • spec_file_processed_by_rpmautospec check needs to be disabled for copr dist git deployments
  • the --allow-empty option shouldn't be used while importing SRPMs and unskip test_no_op_1 (see dist-git: FTBFS with python-rpkg > 1.65 #2600)

Original issue: https://pagure.io/copr/copr/issue/2317
Opened: 2022-09-22 13:23:01
Opened by: praiskup

We need a way around this (a new opt-out in rpkg, I guess, and proper configuration in copr-dist-git or dist-git):
https://pagure.io/rpkg/c/3087dd72e933568896b2f167bab75194482a6cd1

The reason is that in Copr we want to import the pre-generated SRPMs into our "proxy" DistGit instance. This way we keep the changelog and Release info baked into the Fedora DistGit "git log".


praiskup commented at 2022-09-22 23:03:11:

For now, we can apply this patch (ansible patching), and things should be fine...

--- /usr/lib/python3.10/site-packages/pyrpkg/utils.py   2022-09-06 20:05:35.000000000 +0000            [===                                                                                               ] ---  B/s |   0  B     --:-- ETA
+++ /usr/lib/python3.10/site-packages/pyrpkg/utils.py   2022-09-22 19:08:16.328405267 +0000
@@ -323,6 +323,7 @@
 
 
 def spec_file_processed_by_rpmautospec(file_name, dir_path=None):
+    return False
     file_path = os.path.join(dir_path or "", file_name)
 
     try:
@nikromen
Copy link
Member

nikromen commented Mar 1, 2023

note that this may also solve our problem https://pagure.io/rpkg/issue/641

@praiskup
Copy link
Member

note that this may also solve our problem https://pagure.io/rpkg/issue/641

Summary from our meeting: That issue discusses possibilities of how to get the original SRPM from the generated one. That's not what we want, we'd loose the generated Release and %changelog fields that we want to keep (i.e. if Fedora DistGit has a generated Release: 2, we want to keep this release in a build from DistGit in Copr).

@praiskup
Copy link
Member

@nikromen contacted @onosek, option is being discussed

@praiskup
Copy link
Member

praiskup commented Apr 3, 2023

Related: #2600

@praiskup praiskup changed the title dist-git - avoid the downstream-only hack we are using for autospec dist-git - avoid the downstream-only hacks we are using for autospec Apr 3, 2023
@onosek
Copy link

onosek commented Apr 4, 2023

Would that work for you?
https://pagure.io/rpkg/pull-request/679
Provided you want to use this here:

upload_files = commands.import_srpm(srpm_path)

@praiskup
Copy link
Member

praiskup commented Apr 4, 2023

Absolutely, thank you for the patch @onosek! We'll just need to add "BuildRequires: python3-rpkg >= X.Y" (the new option will fail with older rpkg versions). It would be nice to get the new version of rpkg into F37+.

@praiskup
Copy link
Member

praiskup commented Apr 4, 2023

There's the second part of this issue, ie the "--allow-empty" option we need to drop from commit().

@praiskup
Copy link
Member

praiskup commented Apr 6, 2023

We have "dnf versionlock python3-rpkg" on dist-git machines.

@nikromen
Copy link
Member

nikromen commented Apr 15, 2023

sync:

next steps needed to close this issue:

  • wait until rpkg/pull-request/688 is merged
  • wait for new rpkg release that contains these patches: rpkg/pull-request/679 and rpkg/pull-request/688
  • remove the patch hack file here and remove the task here
  • use the new allow_pre_generated_srpm in Commands introduced in https://pagure.io/rpkg/pull-request/679

@nikromen
Copy link
Member

#2608 is blocking the last two steps here

nikromen added a commit to nikromen/copr that referenced this issue Apr 24, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
@nikromen nikromen mentioned this issue Apr 24, 2023
1 task
nikromen added a commit to nikromen/copr that referenced this issue Apr 24, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
nikromen added a commit to nikromen/copr that referenced this issue May 9, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
nikromen added a commit to nikromen/copr that referenced this issue May 11, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
nikromen added a commit to nikromen/copr that referenced this issue May 15, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
nikromen added a commit to nikromen/copr that referenced this issue Jun 8, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
nikromen added a commit to nikromen/copr that referenced this issue Jul 4, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us.
nikromen added a commit to nikromen/copr that referenced this issue Jul 4, 2023
Related: fedora-copr#2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us in
1.66-6 version of rpkg.
FrostyX pushed a commit that referenced this issue Jul 4, 2023
Related: #2317

pyrpkg don't allow using pre-generated SRPM by default.
They created for this `allow_pre_generated_srpm` for us in
1.66-6 version of rpkg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants