Re: mock build results for same .spec build different for local & online/COPR builds -- local OK, @copr FAILS ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, July 3, 2020 3:00:48 AM CEST PGNet Dev wrote:
> https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/fedora-32-x86_64/01516680-nginx/nginx.spec

There are things like:

    %global forgeurl1 https://github.com/openresty/headers-more-nginx-module
    %define _ctag1    HEAD
    %global commit1   %( git ls-remote %{forgeurl1} | grep %{_ctag1} | cut -f1 )

So basically it needs to have the /bin/git installed in the chroot (it is
not by default), and it needs to have the internet enabled at that time to
get the contents of %commitX.

So the alternative local mock command would be:

    mock --buildsrpm --spec nginx.spec --enable-network

I'm not familiar with the %forge* macros, but I don't think it is expected
that you will add commands that need the Internet into the macro
definition.  Simply do:

    - %global commit1   %( git ls-remote %{forgeurl1} | grep %{_ctag1} | cut -f1 )
    + %global commit1 <commit|tag|branch>

Alternatively, if you really need the dynamic %commitX generator -- you
can use one of the Copr SCM methods to "generate" the spec file and bake
the _static_ %commitX one step before (before the package is imported into
the Copr DistGit).

> builds locally, on F32, via rpmbuild or mock build, from spec or srpm,
> with NO error.  resulting rpms are installable, usable & pass testing.

I'm not sure how `/bin/git` got installed into your mock chroot, and how
it comes you have the Internet there.

> 	FAILED COPR BUILD
> 	copr-cli build nginx-mainline ~/rpmbuild/SPECS/nginx.spec
> 	https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/fedora-32-x86_64/01516674-nginx/builder-live.log.gz
> 	
> The goal is to have the same spec generate the same Mock build,
> regardless of environment.

Already deleted.

> Do I need additional prep of the spec prior to submit?  Something in my
> foregemeta/scm usage that's env-dependent? Something else I've missed?

Probably, see above.

Pavel


_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux