Re: Spec file using github repo - not tarball
On 21-05-2024 18:04, Dominik Wombacher wrote: On 05/21/2024 5:54 PM CEST Tom Hughes via devel wrote: The automatic tar ball URLs on github just do a git archive and are separate to uploaded release artifacts. Just use a URL like: https://github.com/OWNER/PROJECT/archive/REVISION/NAME.tar.gz where tag can be any tag or head or commit hash. More here: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit_revision I know that, but as shared, upstream has a .gitattributes [1] defined that sets export-ignore [2] for a majority of the repo content, including /tests/. They upload the same archive to the releases as they are generated by GitHub ad-hoc. So in both cases the files are missing and can't retrieved without a git clone. Dom [1] https://github.com/guzzle/guzzle/blob/7.8/.gitattributes [2] https://git-scm.com/docs/gitattributes#_export_ignore In that situation you should probably follow the instructions in the Packaging Guidelines regarding Troublesome URLs (second part) [3] and create additional sources manually. [3] https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_troublesome_urls -- Sandro -- ___ 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
Re: Spec file using github repo - not tarball
> On 05/21/2024 5:54 PM CEST Tom Hughes via devel > wrote: > > The automatic tar ball URLs on github just do a git archive and are > separate to uploaded release artifacts. Just use a URL like: > >https://github.com/OWNER/PROJECT/archive/REVISION/NAME.tar.gz > > where tag can be any tag or head or commit hash. More here: > > https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit_revision > I know that, but as shared, upstream has a .gitattributes [1] defined that sets export-ignore [2] for a majority of the repo content, including /tests/. They upload the same archive to the releases as they are generated by GitHub ad-hoc. So in both cases the files are missing and can't retrieved without a git clone. Dom [1] https://github.com/guzzle/guzzle/blob/7.8/.gitattributes [2] https://git-scm.com/docs/gitattributes#_export_ignore -- The Wombelix Post https://dominik.wombacher.cc -- ___ 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
Re: Spec file using github repo - not tarball
On 21/05/2024 16:37, Dominik Wombacher wrote: I have a case were upstream excludes the test suite from the export [1]. But I want the tests to be part of the package build to validate that everything is fine. So this requires a bit of local git clone and create an own archive file. I can't just grab the archive from the GitHub release in that case. The automatic tar ball URLs on github just do a git archive and are separate to uploaded release artifacts. Just use a URL like: https://github.com/OWNER/PROJECT/archive/REVISION/NAME.tar.gz where tag can be any tag or head or commit hash. More here: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_commit_revision Tom -- Tom Hughes (t...@compton.nu) http://compton.nu/ -- ___ 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
Re: Spec file using github repo - not tarball
> On 05/08/2024 10:38 PM CEST Tom Hughes via devel > wrote: > > > On 08/05/2024 21:36, Kenneth Goldman wrote: > > > 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? > > No, but github can give you a tar ball for any ref you want so why > would you need/want to? > I have a case were upstream excludes the test suite from the export [1]. But I want the tests to be part of the package build to validate that everything is fine. So this requires a bit of local git clone and create an own archive file. I can't just grab the archive from the GitHub release in that case. So that's a use-case were I could think of why git clone defined in a spec file would be handy. Dom [1] https://github.com/guzzle/guzzle/blob/7.8/.gitattributes -- The Wombelix Post https://dominik.wombacher.cc -- ___ 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
Re: Spec file using github repo - not tarball
* Kenneth Goldman: > 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? There is Packit, which I think can be configured in such a way that you can work with sources directly. The service pushes auto-generated commits to Fedora dist-git. We should have something like this directly in Koji (as part of fedpkg-simple), but it's highly political. It's currently not possible to build source RPMs that contain subdirectories, either. Thanks, Florian -- ___ 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
Re: Spec file using github repo - not tarball
Am 09.05.24 um 17:21 schrieb Nico Kadel-Garcia: On Wed, May 8, 2024 at 4:36 PM Kenneth Goldman wrote: 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? Git clones are bulky, with the entire history of a project rather than merely the state of the repo at the moment of that tag or git commit. The "Source:" line can point to a specific archibal tarball or zipfile export of sourcecode at github.com, such as: https://github.com/aws/aws-cli/archive/refs/tags/2.15.46.zip IIRC, such archives are created on the fly and for some reason not consistent. Some projects do provide additionally source packages for there releases because of that ... -- Leon -- ___ 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
Re: Spec file using github repo - not tarball
On Thu, May 09, 2024 at 11:21:11AM -0400, Nico Kadel-Garcia wrote: > On Wed, May 8, 2024 at 4:36 PM Kenneth Goldman wrote: > > > > 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? > > Git clones are bulky, with the entire history of a project rather than > merely the state of the repo at the moment of that tag or git commit. FWIW, they don't have to be bulky 'git clone --maxdepth 1 ...' will skip downloading the entire history. Still not suggesting that be used for RPMs though, as the zipfile/tarball will be sufficient With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| -- ___ 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
Re: Spec file using github repo - not tarball
On Wed, May 8, 2024 at 4:36 PM Kenneth Goldman wrote: > > 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? Git clones are bulky, with the entire history of a project rather than merely the state of the repo at the moment of that tag or git commit. The "Source:" line can point to a specific archibal tarball or zipfile export of sourcecode at github.com, such as: https://github.com/aws/aws-cli/archive/refs/tags/2.15.46.zip > 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
Re: Spec file using github repo - not tarball
Hello, Sorry I forgot to mention that all builds in Fedora require to be built offline so you still need to download the tarball and upload it to Fedora side-storage of source files before build: # spectool will process the specfile and download the tarball in expected name spectool -g package.spec # it is needed to upload the tarball of the snapshot to fedora fedpkg new-sources package--git-.tar.gz In COPR (https://docs.pagure.org/copr.copr/) you can autodownload the tarball before building the package or even build from git version. For example you can autobuild of the srpm from another github repository using make_srpm: https://copr.fedorainfracloud.org/coprs/rebus/infosec/package/yara/ That requires that you store in your git project where you have the spec file also the .copr/Makefile, where you can specify how to prepare the srpm Example: https://github.com/xambroz/rpms-infosec/blob/master/.copr/Makefile On COPR you can also use web-hooks from your git with the package source spec file, to trigger automatic COPR rebuild of the package. Best regards Michal Ambroz -- Původní e-mail -- Od: Michal Ambroz Komu: Development discussions related to Fedora Datum: 9. 5. 2024 1:14:32 Předmět: Re: Spec file using github repo - not tarball "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 Komu: Development discussions related to Fedora 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
Re: Spec file using github repo - not tarball
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 Komu: Development discussions related to Fedora 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
Re: Spec file using github repo - not tarball
Kenneth, You might be looking for the forge macros: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_using_forges_hosted_revision_control -- Jonathan Steffan -- ___ 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
Re: Spec file using github repo - not tarball
On 08/05/2024 21:36, Kenneth Goldman wrote: 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? No, but github can give you a tar ball for any ref you want so why would you need/want to? Tom -- Tom Hughes (t...@compton.nu) http://compton.nu/ -- ___ 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
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. smime.p7s Description: S/MIME cryptographic signature -- ___ 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