rpmlib() dependencies are an install-time barrier, but dependencies
in src.rpm are considered build-time dependencies. This paradox
is the crux of the problem in https://pagure.io/copr/copr/issue/1038.
We could move the rpmlib(DynamicBuildRequires) someplace else
(eg buildrecommends) to avoid the issue, but then the dependency has
technically every right to be there, and changing it would break
existing software (mock) relying on what we already released.
Adding MISSINGOK flag allows rpm to legitimately skip it while
installing, the build-side does its own checking independently.
This is not ideal as it requires backporting of commit
1ac16611f0 to older releases to fix,
but this is the least-worst compromise we were able to come up with.
Supports new %generate_buildrequires section in the spec file which is executed
after %prep. Stdout is captured and turned into BuildRequires. These are then
checked. If they cannot be fulfilled a source package is created with all
BuildRequires and the build is terminated after that.
rpmbuild has now the following new build modes -br, -tr, -rr and exits with 11
if build requirements are not met.
That means for users:
* No %generate_buildrequires
* rpmbuild -br is equivalent to rpmbuild -bs
* rpmbuild -br --nodeps is equivalent to rpmbuild -bs
* %generate_buildrequires
* rpmbuild -br will check dynamic BuildRequires
* Satisfied → src.rpm
* Unsatisfied → buildreqs.nosrc.rpm
* rpmbuild -br --nodeps will always generate buildreqs.nosrc.rpm
Source packages contain
Requires: rpmlib(DynamicBuildRequires) <= 4.15.0-1
if the spec contains a %generate_buildrequires section and
Provide: rpmlib(DynamicBuildRequires) = 4.15.0-1
if the results been added to the source package.
Co-authored-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
- Creating a new rpmds from header each time isNewDep() gets hideously
expensive when the number of manual dependencies is high.
Add prco etc rpmds structs to each package and use those to determine
whether a dependency has already been seen: this way the ds'es remain
sorted so rpmdsMerge() will do the right thing for regular
dependencies. Triggers are somewhat different beasts with their
index tags so at least for now just do a linear search like we
always did for correctness.
- Makes worlds of difference for complex specs... the time to parse
texlive.spec from Fedora goes down from ~27s to ~10s on my laptop
with this change.
- Still doesn't make much difference as it is, but further pre-requisites
for sanitizing the way dependencies are carried around.
- Change rpmSpecDS() to return the ds based on the actual source package
header, not buildRestrictions. Using buildRestrictions was probably
kinda wrong to begin with but its more so now as the actual
requires and conflicts go to the "real" header, not buildRestrictions.
- rpmbuild_misc.h is just internal misc helpers whereas the
dependency stuff has very much to do with packages and the
like. No functional changes, just clearing up stuff...
- Add support for new "OrderWithRequires: foo" spec syntax
which has "if and only if foo is present in transaction, order
the transaction as if this package required foo" semantics.
While it looks, and in some ways is, a soft dependency, this
is not the same as recommends/suggests etc: those have unknown
depsolver policy dependent semantics attached to them, whereas
ordering hints have a clear definition and is only relevant for rpm
itself, depsolvers should not even look at the data.
- This allows packages to express correct ordering for optional
functionality, such as
%post
if [ -x %{_bindir}/register-component ]; then
%{_bindir}/register-component %{name}
fi
If the package containing %{_bindir}/register-component is included
in the same transaction, it makes sense to have it installed before the
package(s) that use it. But as it is fully optional, Requires would
not be appropriate. Using OrderWithRequires allows this to be expressed
without dragging in extraneous dependencies for optional functionality.
- Many of these cases would be true enums from preambleList & similar,
except for the list terminating sentinel. Just switch all the
remaining rpmTag's to rpmTagVals to bring our enum-whacking to
a grande finale.
- Yank everything qualifying as "internal helper function" into
internal-only headers, loosely grouped as follows:
1) Everything involving spec-manipulation goes into rpmbuild_internal.h
2) All other miscellaneous helpers go into rpmbuild_misc.h
- This leaves us a rather minimal, and nearly useful API into librpmbuild:
Users need to be able to parse a spec, query or build (parts of) it
and free up the spec structure when done. This is what we have now,
various still exposed structures not counting.
- pass the wanted dependency type to addReqProv() as tagN argument
(previously unused, eh...) instead of taking up three precious bits
for internal-only purposes from a constrained bitfield
- only requires on rpmlib(foo) are allowed
- make sure any rpmlib() foo dependencies have RPMSENSE_RPMLIB bit set,
rpmdeps as external dependency generator can create rpmlib() dependencies
without the bit set, and also any manual rpmlib() deps wont have it
- Broken by commit af8b41c64a which
simplified too much.
- There's no guarantee that rpmdsNew() returns a sorted dependency set
so rpmdsFind() doesn't work correctly here. Walk the ds manually instead.
- With multiple triggers of same type, identical trigger conditions on
different trigger script were seen as duplicates (RhBug:490378)
- Split the duplicate checking to separate helper function for clarity
- permits header.h to use the tag types
- revert other includes back to header.h, more crazy #include churn...
- rpmTagTable etc in header.h for now, don't really belong there but...
- typedef'ed as uint32_t, doesn't matter much but negative types dont exist
- easy to grep, easy to change...
- define RPM_FORCEFREE_TYPE instead of -1 "magic" for forcing
headerFreeData (ugh), easier to grep for and change than "-1"
- typedef'ed as int32_t for now, negative values used in some places for
error cases
- easy to grep, easy to change...
- add RPMTAG_NOT_FOUND define, used in place of -1 "magic",
- typedef'ed as uint32_t as that's the key size limit imposed by BDB,
relevant for RPM_BIN_TYPE
- easy to change to whatever later on as it's now consistent everywhere
- more CLI typedefs/prototypes moved from rpmlib.h to rpmcli.h.
- rpm --verify skips files in non-installed states.
- rpm --verify skips content checks for %ghost files.
- rpm --verify displays config/doc/gnost/license/readme atrrs for files.
- rpm --verify checks immutable header region digest if available.
- rpmbuild adds header region digest (SHA1 as string).
- use rpmTag* typedefs in new hge/hae/hme/hre header vectors.
CVS patchset: 4854
CVS date: 2001/06/12 04:10:21