#511 Local builds: Build SRPMs in srpm-buildroot
Opened 7 years ago by psabata. Modified 5 years ago

Just like in koji, MBS shouldn't build SRPMs on the host but rather in the srpm-buildroot, i.e. initialize a mock environment using the packages listed in the srpm-buildroot profiles of all of the module's build dependencies.

It should then check out the SPEC and download the sources using fedpkg-minimal that should always be there (if it isn't, it's a packaging error).

Building SRPMs on the MBS host might affect the package build in unexpected ways.


@frostyx said he would be willing to implement this.

Also, check out @sgallagh 's scripts that do something similar: https://github.com/sgallagher/baseruntime-package-lists

Just want to say I hit an issue related to this. I have a custom ~/.rpmmacros file like this:

%_topdir %{getenv:PWD}
%_sourcedir %{getenv:PWD}
%_builddir %{getenv:PWD}
%_rpmdir %{getenv:PWD}
%_srcrpmdir %{getenv:PWD}
%_buildrootdir %{getenv:PWD}
%_specdir %{getenv:PWD}

Similar recommendations can be found on the web to make rpmbuild default to putting all output in PWD. Might not be the best idea, but regardless this confused mbs since it implicitly depends on the default rpmbuild folder layout

I hit this issue too, had to move out custom ~/.rpmmacros to make local builds work

Metadata Update from @ralph:
- Issue assigned to fivaldi

6 years ago

Metadata Update from @ralph:
- Assignee reset

6 years ago

This is already done for some time. The srpms are built in mock already for some time.

Metadata Update from @jkaluza:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

This is still not fixed - module-build-macros is not built in mock, but directly with rpmbuild called on host system (KojiModuleBuilder.get_disttag_srpm method). This still causes problems for packages that use rpmmacros

Metadata Update from @mizdebsk:
- Issue status updated to: Open (was: Closed)

5 years ago

Login to comment on this ticket.

Metadata