Re: Is rpmbuild reentrant?

2013-10-23 Thread Dennis Gilmore
You can not rely on the rpmdb being readable in the buildroot. Which is why you 
can't call rpm. As long as you used rpmbuild with --nodeps it should work. But 
no guarantee and not recommend.

Dennis
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Is rpmbuild reentrant?

2013-10-23 Thread Neil Horman
On Wed, Oct 23, 2013 at 04:58:34AM +, Petr Pisar wrote:
 On 2013-10-22, Neil Horman nhor...@redhat.com wrote:
  On Tue, Oct 22, 2013 at 03:03:44PM +, Petr Pisar wrote:
  Is it healty to execute rpmbuild while building a package?
  
  I have tests for perl dependencency generator filters. I.e. the tests
  build a package using rpmbuild with redefeined all the `_*dir' macros,
  then use librpm to query requires and provides from built package, and
  then do checks on the values.
  
  I'm thinking how to plug the tests into Fedora. The simplest solution is
  to run the tests in %check phase of a package (I don't know which one,
  but it does not matter which one).
  
  I've already heard warnings that calling rpm from package scriptlets is
  not recommend.
  
  What the situation with rpmbuild?
  
  I'm not sure how re-entrant-safe rpmbuild is, but doing the above seems a 
  bit
  dodgy in general.  Could you instead package the test separately from the
  dependency generator rpm, make the latter depedent on the former, and then 
  use
  chain-build in koji to build them at the same time?
 
 Do you say to create a dummy package in Fedora? Package which itself has
 dummy (possibly) unsatisfied dependencies? Package that ends up in
 Fedora repositories? That's fishy.
 
Um, no.  All I was suggesting was that you build the package tests separately
from the package itself, as its own rpm.
Neil

 -- Petr
 
 -- 
 devel mailing list
 devel@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/devel
 Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Is rpmbuild reentrant?

2013-10-23 Thread Petr Pisar
On 2013-10-23, Neil Horman nhor...@redhat.com wrote:
 On Wed, Oct 23, 2013 at 04:58:34AM +, Petr Pisar wrote:
 On 2013-10-22, Neil Horman nhor...@redhat.com wrote:
  On Tue, Oct 22, 2013 at 03:03:44PM +, Petr Pisar wrote:
  Is it healty to execute rpmbuild while building a package?
  
  I have tests for perl dependencency generator filters. I.e. the tests
  build a package using rpmbuild with redefeined all the `_*dir' macros,
  then use librpm to query requires and provides from built package, and
  then do checks on the values.
  
  I'm thinking how to plug the tests into Fedora. The simplest solution is
  to run the tests in %check phase of a package (I don't know which one,
  but it does not matter which one).
  
  I've already heard warnings that calling rpm from package scriptlets is
  not recommend.
  
  What the situation with rpmbuild?
  
  I'm not sure how re-entrant-safe rpmbuild is, but doing the above
  seems a bit dodgy in general.  Could you instead package the test
  separately from the dependency generator rpm, make the latter
  depedent on the former, and then use chain-build in koji to build
  them at the same time?
 
 Do you say to create a dummy package in Fedora? Package which itself
 has dummy (possibly) unsatisfied dependencies? Package that ends up
 in Fedora repositories? That's fishy.
 
 Um, no.  All I was suggesting was that you build the package tests
 separately from the package itself, as its own rpm.  Neil

Well, but the purpose is to test the output of rpmbuild. If I had to
prebuild tested data manually or out of koji, it would not serve the
purpose.

However I know, this is the last option. I've already redesigned the
tests to be runnable from %check phase as well as on demand after installing
them into system.

-- Petr

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Is rpmbuild reentrant?

2013-10-23 Thread Petr Pisar
On 2013-10-22, Petr Pisar ppi...@redhat.com wrote:
 Is it healty to execute rpmbuild while building a package?

 I have tests for perl dependencency generator filters. I.e. the tests
 build a package using rpmbuild with redefeined all the `_*dir' macros,
 then use librpm to query requires and provides from built package, and
 then do checks on the values.

 I'm thinking how to plug the tests into Fedora. The simplest solution is
 to run the tests in %check phase of a package (I don't know which one,
 but it does not matter which one).

Thanks everybody for tips.

I managed to pass the tests in Koji
http://kojipkgs.fedoraproject.org//work/tasks/9936/6089936/build.log
(scratch build).

The package is under review now
https://bugzilla.redhat.com/show_bug.cgi?id=1022396

-- Petr

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Is rpmbuild reentrant?

2013-10-23 Thread Frank Ch. Eigler
Neil Horman nhor...@redhat.com writes:

 [...]
 Um, no.  All I was suggesting was that you build the package tests separately
 from the package itself, as its own rpm.

You can put multiple source tarballs into a single rpm, build each of
them in your spec %build/etc., and result in distinct subrpms.  Is
that not sufficient?

- FChE
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Is rpmbuild reentrant?

2013-10-22 Thread Neil Horman
On Tue, Oct 22, 2013 at 03:03:44PM +, Petr Pisar wrote:
 Is it healty to execute rpmbuild while building a package?
 
 I have tests for perl dependencency generator filters. I.e. the tests
 build a package using rpmbuild with redefeined all the `_*dir' macros,
 then use librpm to query requires and provides from built package, and
 then do checks on the values.
 
 I'm thinking how to plug the tests into Fedora. The simplest solution is
 to run the tests in %check phase of a package (I don't know which one,
 but it does not matter which one).
 
 I've already heard warnings that calling rpm from package scriptlets is
 not recommend.
 
 What the situation with rpmbuild?
 
I'm not sure how re-entrant-safe rpmbuild is, but doing the above seems a bit
dodgy in general.  Could you instead package the test separately from the
dependency generator rpm, make the latter depedent on the former, and then use
chain-build in koji to build them at the same time?

Neil

 -- Petr
 
 -- 
 devel mailing list
 devel@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/devel
 Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Is rpmbuild reentrant?

2013-10-22 Thread Petr Pisar
On 2013-10-22, Neil Horman nhor...@redhat.com wrote:
 On Tue, Oct 22, 2013 at 03:03:44PM +, Petr Pisar wrote:
 Is it healty to execute rpmbuild while building a package?
 
 I have tests for perl dependencency generator filters. I.e. the tests
 build a package using rpmbuild with redefeined all the `_*dir' macros,
 then use librpm to query requires and provides from built package, and
 then do checks on the values.
 
 I'm thinking how to plug the tests into Fedora. The simplest solution is
 to run the tests in %check phase of a package (I don't know which one,
 but it does not matter which one).
 
 I've already heard warnings that calling rpm from package scriptlets is
 not recommend.
 
 What the situation with rpmbuild?
 
 I'm not sure how re-entrant-safe rpmbuild is, but doing the above seems a bit
 dodgy in general.  Could you instead package the test separately from the
 dependency generator rpm, make the latter depedent on the former, and then use
 chain-build in koji to build them at the same time?

Do you say to create a dummy package in Fedora? Package which itself has
dummy (possibly) unsatisfied dependencies? Package that ends up in
Fedora repositories? That's fishy.

-- Petr

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct