On Fri, Sep 9, 2016 at 5:25 AM, Florian Weimer <fwei...@redhat.com> wrote:

> I would like to build (S)RPMs directly from a Git repository (which
> contains the .spec file in the top-level directory).  This is for a
> CI-style project, with a quick release cycle.
>
> I have a Lua script fragment which generates a proper SRPM with the
> mock-scm target in COPR, and which is also compatible with “fedpkg srpm”.
> But rpmbuild strips leading path components from Source: and Patch:
> references, so this only works if all files are in a single directory.
>
> Are there any alternatives that work in COPR, EPEL and Fedora proper?
>
> I think it's strange that I have to put a tarball somewhere just for RPM's
> sake if there is no separate upstream, and there are no upstream releases
> as a result.  It's just an annoyance and yet another step that can go wrong
> in various ways.
>
> Thanks,
> Florian
> --
> devel mailing list
> devel@lists.fedoraproject.org
> https://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


There is the --build-in-place option to rpmbuild, which will "Build from
locally checked out sources. Sets _builddir to current working directory.
Skips handling of -n and untar in the %setup and the deletion of the
buildSubdir."

This might be helpful, if the current working directory is the root of the
git repository. I think it's a relatively new option-- I seem to remember
it being added somewhere in the Fedora 23 cycle?

Ben Rosser
--
devel mailing list
devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to