Hey all-
I have a package that gets an artifact from a repo *and* expects to have code from a different branch in the same repo. In my spec file, I can easily get the artifact via Sources, but getting the code from the separate branch required me to execute a “git clone” then checkout the branch. This works fine until I tried doing a mock build where I ran into the issue that networking like this is apparently unavailable. I saw that I can enabled it with a command line switch, but I presume that’s not possible with koji.
Is there any proper way to checkout code with git from within koji?
Thanks for any info!
Ron
On Fri, 21 Jan 2022 10:21:11 -0600 Ron Olson tachoknight@gmail.com wrote:
Hey all-
I have a package that gets an artifact from a repo *and* expects to have code from a different branch in the same repo. In my spec file, I can easily get the artifact via Sources, but getting the code from the separate branch required me to execute a “git clone” then checkout the branch. This works fine until I tried doing a mock build where I ran into the issue that networking like this is apparently unavailable. I saw that I can enabled it with a command line switch, but I presume that’s not possible with koji.
Is there any proper way to checkout code with git from within koji?
builds in koji have network disabled by design
Dan
On 21. 01. 22 17:21, Ron Olson wrote:
Hey all-
I have a package that gets an artifact from a repo /and/ expects to have code from a different branch in the same repo. In my spec file, I can easily get the artifact via Sources, but getting the code from the separate branch required me to execute a “git clone” then checkout the branch. This works fine until I tried doing a mock build where I ran into the issue that networking like this is apparently unavailable. I saw that I can enabled it with a command line switch, but I presume that’s not possible with koji.
Is there any proper way to checkout code with git from within koji?
No. You need to add it as an extra Source. Koji builds are always offline.
Is it possible to clone a repo as part of a Source line? I’ve been looking and can’t find any examples.
On 21 Jan 2022, at 10:34, Miro Hrončok wrote:
On 21. 01. 22 17:21, Ron Olson wrote:
Hey all-
I have a package that gets an artifact from a repo /and/ expects to have code from a different branch in the same repo. In my spec file, I can easily get the artifact via Sources, but getting the code from the separate branch required me to execute a “git clone” then checkout the branch. This works fine until I tried doing a mock build where I ran into the issue that networking like this is apparently unavailable. I saw that I can enabled it with a command line switch, but I presume that’s not possible with koji.
Is there any proper way to checkout code with git from within koji?
No. You need to add it as an extra Source. Koji builds are always offline.
-- Miro Hrončok -- Phone: +420777974800 IRC: mhroncok
On 21. 01. 22 17:39, Ron Olson wrote:
Is it possible to clone a repo as part of a Source line? I’ve been looking and can’t find any examples.
See https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_using_... and https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_ho...