Discussion:
Different place containing RPM in copr
Chenxiong Qi
2016-11-10 12:00:30 UTC
Permalink
Hi,

There is a difference result in copr build. In build[1], the RPM is
placed to package repository root directory directly.

Wrote: /tmp/rpkg-commands-tests-cloned-o2Dtnc/docpkg-1.2-2.el6.x86_64.rpm

But, in my development machine running Fedora 23, the RPM is placed into
an arch directory, e.g.

Wrote:
/tmp/rpkg-commands-tests-cloned-I8vMCg/x86_64/docpkg-1.2-2.el6.x86_64.rpm

Could you help to see why this difference happens in copr?

[1]
https://copr.fedorainfracloud.org/coprs/lsedlar/compose-tools/build/475371/
--
Regards,
Chenxiong Qi
_______________________________________________
buildsys mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an e
Chenxiong Qi
2016-11-11 03:00:58 UTC
Permalink
Post by Chenxiong Qi
Hi,
There is a difference result in copr build. In build[1], the RPM is
placed to package repository root directory directly.
Wrote: /tmp/rpkg-commands-tests-cloned-o2Dtnc/docpkg-1.2-2.el6.x86_64.rpm
But, in my development machine running Fedora 23, the RPM is placed into
an arch directory, e.g.
/tmp/rpkg-commands-tests-cloned-I8vMCg/x86_64/docpkg-1.2-2.el6.x86_64.rpm
Could you help to see why this difference happens in copr?
[1]
https://copr.fedorainfracloud.org/coprs/lsedlar/compose-tools/build/475371/
I just learned that %_build_name_fmt is used to control in which
subdirectory to put the RPMs, its default value is

%%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

Is this changed in https://copr.fedorainfracloud.org/coprs/?

I have no idea how copr runs a build. Is it safe to create ~/.rpmmacros
in the tests code to ensure the behavior that I want?
--
Regards,
Chenxiong Qi
_______________________________________________
buildsys mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to buildsys-
Miroslav Suchý
2016-11-11 11:00:30 UTC
Permalink
Post by Chenxiong Qi
Hi,
There is a difference result in copr build. In build[1], the RPM is
placed to package repository root directory directly.
Wrote: /tmp/rpkg-commands-tests-cloned-o2Dtnc/docpkg-1.2-2.el6.x86_64.rpm
But, in my development machine running Fedora 23, the RPM is placed into
an arch directory, e.g.
/tmp/rpkg-commands-tests-cloned-I8vMCg/x86_64/docpkg-1.2-2.el6.x86_64.rpm
How do you build the package. I suspect that you are calling `rpmbuild`
command. You should use `mock`. This is wrapper around rpmbuild, which
create reproducible builds.
Copr you `mockchain` which is wrapper around mock with some additional
features.

The exact command which Copr runs is here:
https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora-25-x86_64/00475371-rpkg/mockchain.log.gz

[2016-11-10 09:33:29,449][ INFO][PID:24412] executing:
/usr/bin/mockchain -r /var/tmp/mockremote-g5se5/fedora-25-x86_64.cfg -l
/var/tmp/mockremote-g5se5/build/ -a
https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora-25-x86_64
-a
https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora-25-x86_64/devel
-m '--define=copr_username lsedlar' -m '--define=copr_projectname
compose-tools' -m '--define=vendor Fedora Project COPR
(lsedlar/compose-tools)'
/tmp/build_package_repo/rpkg/rpkg-1.46-27.20161110gitc5138c17.fc25.src.rpm
--
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
_______________________________________________
buildsys mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to buildsys-***@lists.fedorapr
Chenxiong Qi
2016-11-11 13:19:26 UTC
Permalink
Post by Miroslav Suchý
Post by Chenxiong Qi
Hi,
There is a difference result in copr build. In build[1], the RPM is
placed to package repository root directory directly.
Wrote: /tmp/rpkg-commands-tests-cloned-o2Dtnc/docpkg-1.2-2.el6.x86_64.rpm
But, in my development machine running Fedora 23, the RPM is placed into
an arch directory, e.g.
/tmp/rpkg-commands-tests-cloned-I8vMCg/x86_64/docpkg-1.2-2.el6.x86_64.rpm
How do you build the package. I suspect that you are calling `rpmbuild`
command. You should use `mock`. This is wrapper around rpmbuild, which
create reproducible builds.
Yes, rpmbuild is called, but from rpkg local command. I wrote some test
cases for rpkg local command, each of the cases does following two steps
simply

1. invoke local command
2. verify the outcome, e.g. verify the existence of built RPMs

local command calls rpmbuild under the hood. There is mockbuild command
using mock, but local just uses rpmbuild to build RPMs.
Post by Miroslav Suchý
Copr you `mockchain` which is wrapper around mock with some additional
features.
https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora-25-x86_64/00475371-rpkg/mockchain.log.gz
/usr/bin/mockchain -r /var/tmp/mockremote-g5se5/fedora-25-x86_64.cfg -l
/var/tmp/mockremote-g5se5/build/ -a
https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora-25-x86_64
-a
https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora-25-x86_64/devel
-m '--define=copr_username lsedlar' -m '--define=copr_projectname
compose-tools' -m '--define=vendor Fedora Project COPR
(lsedlar/compose-tools)'
/tmp/build_package_repo/rpkg/rpkg-1.46-27.20161110gitc5138c17.fc25.src.rpm
--
Regards,
Chenxiong Qi
_______________________________________________
buildsys mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to buildsys-***@lists.fedo
Miroslav Suchý
2016-11-14 10:44:12 UTC
Permalink
Post by Chenxiong Qi
Yes, rpmbuild is called, but from rpkg local command.
So different tools, different directories. I'm not seeing any problem.
--
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
_______________________________________________
buildsys mailing list -- ***@lists.fedoraproject.org
To unsubscribe send a
Loading...