Building foreman from foreman-packaging

Hi,

I want to build foreman from foreman-packacking. Therefore, I have cloned the git repository and switched to branch rpm/1.14. Then, I have executed "git annex" init and then "./setup_sources.sh foreman".

For building foreman, I switch to the foreman directory and execute:
tito build --rpm --test --verbose --builder tito.builder.MockBuilder --arg mock_config_dir=mock/ --arg mock=el7-scl

This will start the mock builder:
mock --configdir=/home/rpmbuild/foreman-packaging/mock/ -r el7-scl /tmp/tito/foreman-1.14.2-1.git.0.1372eff.el7.centos.src.rpm

Which will then install the dependencies with:
/usr/bin/yum-builddep --installroot /var/lib/mock/foreman-scl-7-x86_64/root/ --releasever 7 /var/lib/mock/foreman-scl-7-x86_64/root//builddir/build/SRPMS/foreman-1.14.2-1.git.0.1372eff.el7.centos.src.rpm --setopt=tsflags=nocontexts

This will fail with the following error message:
Error: No Package found for npm(es6-promise) >= 3.2.1
Error: No Package found for npm(jquery) < 1.12.0
Error: No Package found for tfm-rubygem(apipie-rails) < 0.4.0
Error: No Package found for tfm-rubygem(audited-activerecord) < 5.0
Error: No Package found for tfm-rubygem(audited-activerecord) >= 4.0
Error: No Package found for tfm-rubygem(scoped_search) < 4.0

··· ----

I guess, I have already found one issue in this git repository as switching to rpm/1.14 should also change the yum repository in the directory “mock”:

— el7-scl.cfg.orig 2017-03-14 13:43:52.740000000 +0100
+++ el7-scl.cfg 2017-03-15 12:25:54.994000000 +0100
@@ -45,17 +45,21 @@

[sclo-rh]
name=sclo-rh
+enabled=1
baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/rh/

[sclo-sclo]
name=sclo-sclo
+enabled=1
baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/sclo/

[foreman]
name=foreman
-baseurl=http://yum.theforeman.org/nightly/el7/x86_64/
+enabled=1
+baseurl=http://yum.theforeman.org/releases/1.14/el7/x86_64/

[foreman-plugins]
name=foreman-plugins
-baseurl=http://yum.theforeman.org/plugins/nightly/el7/x86_64/
+enabled=1
+baseurl=http://yum.theforeman.org/plugins/1.14/el7/x86_64/

Do you agree?

Unfortunately, it does still fail with the error message (see above). I’m using centos7 - can this be the issue? Which system should I use?

The point which really make me cracy is, that if I run:
/usr/bin/yum --installroot /var/lib/mock/foreman-scl-7-x86_64/root/ provides tfm-rubygem(scoped_search)

I will get a result - also for all the other missing packages (npm(es6-promise), npm(jquery))… How can I turn on more debugging in mock/tito?

I spent hours now and also studied the logs of http://ci.theforeman.org/ so that I can find out how this is usually done - but the build configuration isn’t available for everyone. Is it somehow possible to get the configuration options for each build target so that I can determine what I’m doing wrong?

Thank you in advance.

Best regards,
Bernhard

> I want to build foreman from foreman-packacking. Therefore, I have cloned the git repository and switched to branch rpm/1.14. Then, I have executed "git annex" init and then "./setup_sources.sh foreman".
[…]
> Which will then install the dependencies with:
> /usr/bin/yum-builddep --installroot /var/lib/mock/foreman-scl-7-x86_64/root/ --releasever 7 /var/lib/mock/foreman-scl-7-x86_64/root//builddir/build/SRPMS/foreman-1.14.2-1.git.0.1372eff.el7.centos.src.rpm --setopt=tsflags=nocontexts
>
> This will fail with the following error message:
> Error: No Package found for npm(es6-promise) >= 3.2.1
> Error: No Package found for npm(jquery) < 1.12.0
> Error: No Package found for tfm-rubygem(apipie-rails) < 0.4.0
> Error: No Package found for tfm-rubygem(audited-activerecord) < 5.0
> Error: No Package found for tfm-rubygem(audited-activerecord) >= 4.0
> Error: No Package found for tfm-rubygem(scoped_search) < 4.0
>
> ----
>
> I guess, I have already found one issue in this git repository as switching to rpm/1.14 should also change the yum repository in the directory "mock":

This would be correct, but I notice all of the packages in the error
above are ones that have changed between 1.14 and nightly. It's likely
that the yum cache still contains data from the nightly repo (changing
the baseurl will not cause cache invalidation).

Run "mock --configdir=/home/rpmbuild/foreman-packaging/mock/ -r el7-scl
–scrub=all", or remove the mock cache or var directory, then try again.

> The point which really make me cracy is, that if I run:
> /usr/bin/yum --installroot /var/lib/mock/foreman-scl-7-x86_64/root/ provides tfm-rubygem(scoped_search)
>
> I will get a result - also for all the other missing packages (npm(es6-promise), npm(jquery))… How can I turn on more debugging in mock/tito?

mock writes quite detailed logs to its var directory
(/var/lib/mock/foreman-scl-7-x86_64).

> I spent hours now and also studied the logs of http://ci.theforeman.org/ so that I can find out how this is usually done - but the build configuration isn't available for everyone. Is it somehow possible to get the configuration options for each build target so that I can determine what I'm doing wrong?

Foreman's packages are built in Koji (e.g.
http://koji.katello.org/koji/taginfo?tagID=397) so the mock
configurations in the repository are a close approximation of how Koji's
set up. Besides the version number, they ought to be accurate enough as
they use the same binary packages for the build.

They do vary in that they use the latest CentOS release and updates
(while the link above shows the real build tag uses RHEL 7.0) and that
Koji has separate build targets for Foreman and for plugins, but that
wouldn't make a difference to this build.

··· On 16/03/17 21:42, Bernhard Suttner wrote:


Dominic Cleal
dominic@cleal.org

Thanks Dominic for your fast response.

I have used " mock --configdir=/home/rpmbuild/foreman-packaging/mock/ -r el7-scl --scrub=all" and it's now building foreman! Thank you very much.

----- Ursprüngliche Mail -----

··· Von: "Dominic Cleal" An: foreman-dev@googlegroups.com Gesendet: Freitag, 17. März 2017 10:48:09 Betreff: Re: [foreman-dev] Building foreman from foreman-packaging

On 16/03/17 21:42, Bernhard Suttner wrote:

I want to build foreman from foreman-packacking. Therefore, I have cloned the git repository and switched to branch rpm/1.14. Then, I have executed “git annex” init and then “./setup_sources.sh foreman”.
[…]
Which will then install the dependencies with:
/usr/bin/yum-builddep --installroot /var/lib/mock/foreman-scl-7-x86_64/root/ --releasever 7 /var/lib/mock/foreman-scl-7-x86_64/root//builddir/build/SRPMS/foreman-1.14.2-1.git.0.1372eff.el7.centos.src.rpm --setopt=tsflags=nocontexts

This will fail with the following error message:
Error: No Package found for npm(es6-promise) >= 3.2.1
Error: No Package found for npm(jquery) < 1.12.0
Error: No Package found for tfm-rubygem(apipie-rails) < 0.4.0
Error: No Package found for tfm-rubygem(audited-activerecord) < 5.0
Error: No Package found for tfm-rubygem(audited-activerecord) >= 4.0
Error: No Package found for tfm-rubygem(scoped_search) < 4.0


I guess, I have already found one issue in this git repository as switching to rpm/1.14 should also change the yum repository in the directory “mock”:

This would be correct, but I notice all of the packages in the error
above are ones that have changed between 1.14 and nightly. It’s likely
that the yum cache still contains data from the nightly repo (changing
the baseurl will not cause cache invalidation).

Run “mock --configdir=/home/rpmbuild/foreman-packaging/mock/ -r el7-scl
–scrub=all”, or remove the mock cache or var directory, then try again.

The point which really make me cracy is, that if I run:
/usr/bin/yum --installroot /var/lib/mock/foreman-scl-7-x86_64/root/ provides tfm-rubygem(scoped_search)

I will get a result - also for all the other missing packages (npm(es6-promise), npm(jquery))… How can I turn on more debugging in mock/tito?

mock writes quite detailed logs to its var directory
(/var/lib/mock/foreman-scl-7-x86_64).

I spent hours now and also studied the logs of http://ci.theforeman.org/ so that I can find out how this is usually done - but the build configuration isn’t available for everyone. Is it somehow possible to get the configuration options for each build target so that I can determine what I’m doing wrong?

Foreman’s packages are built in Koji (e.g.
http://koji.katello.org/koji/taginfo?tagID=397) so the mock
configurations in the repository are a close approximation of how Koji’s
set up. Besides the version number, they ought to be accurate enough as
they use the same binary packages for the build.

They do vary in that they use the latest CentOS release and updates
(while the link above shows the real build tag uses RHEL 7.0) and that
Koji has separate build targets for Foreman and for plugins, but that
wouldn’t make a difference to this build.


Dominic Cleal
dominic@cleal.org


You received this message because you are subscribed to the Google Groups “foreman-dev” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.