Can the Source0 in a RPM Spec be a git repo?
Asked Answered
D

1

6

I want to build a rpm of my project automated. So when I push a new tag to my git repo, it should build a rpm from this tag revision. My problem is, how can I prep the sources and specify it in the RPM Spec file?

Is it possible to specify the git repo directly? Like: Source0: git://myserver/mygit.git

But what when I want to have the git repo available via https?

Any hints are appreciated! :)

Cheers, Thilo

Drowsy answered 19/1, 2018 at 8:46 Comment(1)
Have you tried doing that, what's the output/error do you get ?Pyrogenic
L
7

No. The URL in SourceX is being completely ignored by rpmbuild. Rpmbuild just take the basename and expect it to be present in %{_topdir}/SOURCES/

If you want to create RPM from your git archive easily then please check mock-scm or Tito.

Loera answered 22/1, 2018 at 11:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.