skvidal(a)phy.duke.edu (seth vidal) writes:
We're given an srpm - we don't know where it was made, on
what arch,
nothing - so we cannot trust the buildreqs it provides.
If we're inside the chroot and on the arch we want to build on then
running:
rpm -Uvh /path/to/our/srpm
rpmbuild -bs --nodeps /path/to/the/generated/spec
should result in a srpm for us that will have valid build reqs.
To be correct, the used algorithm should be:
deps = ''
do {
old-deps = deps
rpm -Uvh --nodeps ....src.rpm
rpmbuild -bs --nodeps --force ....spec <other-opts>*
calculate-deps
install deps
} while deps != old-deps
Else, wrong results will be produced for cases like
| BuildRequires: foo
| %macrofoo
whereas the macro is defined in /etc/rpm/macros.foo (shipped by package
'foo') and expands to
| BuildRequires: bar
Enrico