#1511 rpmbuild: disable source fetch for the dist-git method
Merged 3 years ago by praiskup. Opened 3 years ago by praiskup.

@@ -256,6 +256,7 @@

              "--define", "dist %nil",

              "--define", "_sourcedir {0}".format(sources_dir),

              "--define", "_srcrpmdir {0}".format(args.outputdir),

+             "--define", "_disable_source_fetch 1",

          ]

  

      if args.dry_run or 'COPR_DISTGIT_CLIENT_DRY_RUN' in os.environ:

@@ -170,4 +170,5 @@

              '--define', 'dist %nil',

              '--define', '_sourcedir ' + self.workdir + '/SOURCES',

              '--define', '_srcrpmdir ' + self.workdir + '/result',

+             '--define', '_disable_source_fetch 1',

          ]

When creating source RPMs from a dist-git repository, we are 100% sure
we don't have to try to download the patches/sources from the Internet
(dist-git repo is self-standing). So let's disable the automatic
downloads explicitly (no matter if the default is ON/OFF on the host).

We still have the auto-downloading by default ON on copr builder hosts,
but that's just for the purpose of "upload spec" feature, and it is
likely to be changed with #1427.

Fixes: #1219

rebased onto 48cb9da9656ad7a5c715638d9aff344223c31297

3 years ago

I should add a test for the original #1219 though.

Since this affects only building from distgit, I think it shouldn't break anything.
+1

rebased onto 0f52cfd

3 years ago

Pull-Request has been merged by praiskup

3 years ago