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/
On 11/10/2016 08:00 PM, Chenxiong Qi wrote:
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/
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?
Dne 10.11.2016 v 13:00 Chenxiong Qi napsal(a):
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
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...
[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... -a https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora... -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
On 11/11/2016 07:00 PM, Miroslav Suchý wrote:
Dne 10.11.2016 v 13:00 Chenxiong Qi napsal(a):
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
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.
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...
[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... -a https://copr-be.cloud.fedoraproject.org/results/lsedlar/compose-tools/fedora... -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
buildsys@lists.fedoraproject.org