Hello, yes it is possible to refer to the git commit. For example https://src.fedoraproject.org/rpms/yara/blob/rawhide/f/yara.spec (I mostly use stable releases, but time to time I have to switch to a git snapshot during major version stabilization or when there is some public vulnerability announced). I even have it in one spec file with a tarball release and able to switch with the conditional build "--with release" or "--without release".
# Baserelease for the engineering team to auto-update the release version when rebuilding packages %global baserelease 1 Relevant parts: # Github metadata %global gituser VirusTotal %global gitname yara %global gitdate 20240213 %global commit 8fa55cde4c0cde8a1ba4ced1c131827eb4005f0d %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Release referring to github metadata Release: %{baserelease}.%{gitdate}git%{shortcommit}%{?dist} # Source refering to specific commit Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}- %{version}-git%{gitdate}-%{shortcommit}.tar.gz # preparation using the commit directory %prep %autosetup -n %{gitname}-%{commit} -p 1 Best regards Michal Ambroz ---------- Původní e-mail ---------- Od: Kenneth Goldman <kgold...@us.ibm.com> Komu: Development discussions related to Fedora <devel@lists.fedoraproject. org> Datum: 8. 5. 2024 22:41:02 Předmět: Spec file using github repo - not tarball "Is it possible for a .spec file to clone a github.com repo rather than download a tarball? Can someone link to a working example? I found a few hints that it's possible. However, the fedoraproject.org examples use pseudocode or placeholders. I'd like a working example. -- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of -conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists. fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new _issue "
-- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue