- Prior to commit 2e672f3fae, the
callback would get called twice for every option so the expected
number of query/verify sources was doubled. Now the numbers
match with reality, adjust the check.
- --root is valid for all the remaining modes, no point checking for it
- MODES_FOR_DBPATH is completely unused (and dbpath is a common option
to all anyway)
- Installing/erasing packages, querying and verifying require different
amount of privileges on the system. Having separate binaries for
these functionalities permits limiting the capabilities through
SELinux and other similar security mechanisms: for example quering
needs much less privileges than installing.
- For now, leaving /bin/rpm to be the Swiss Army knife it
always was: capable of install/erase, query and verify. Eventually
it should be turned into just a dumb wrapper which just execs
the per-functionality binaries, but leaving that for later stage,
as popt exec/aliasing doesn't quite seem to up to par with the task.
Having the separate binaries available at least makes it possible
for callers to specify the amount of privileges they need.
- Avoids having to link /bin/rpm with librpmbuild and everything it
might bring in (eg libmagic) which are not needed for core operation.
- Minimally preserve backwards compatibility with popt exec alias
- Add popt exec aliases to rpmdb for backwards compatibility
- Change test-suite to use 'rpmdb --initdb' instead of 'rpm --initdb'
as popt exec aliases with absolute paths dont play very well
with the test-suite, duh...
- Since this is a rpmcliFoo() function, we can assume rpmcliInit()
is used and the verify disabling bits are set through the common
rpmcliQueryFlags set, making qva argument unnecessary.
- Avoid relying on the murky rpmLookupSignatureType() foobar on
low API level, pass the wanted tag explicitly from caller
- rpmLookupSignature(), rpmGetPassPhrase() + the bits they rely on
are now free of users within librpm itself
- Lose the "this has got something to do with signatures and stuff"
dispatcher mode, rpmcliSign() now only does what it says. It also
doesn't need transaction set for anything. It doesn't need much
else than files to operate on, what to do and possibly a passphrase.
It probably will need more when rpmLookupSignatureType()
is put out of its misery, but this'll do for now.
- Lose the now unnecessary passPhrase member from QVA_t
- Technically this changes the rpmcliQuery() and rpmcliVerify() API
in the sense that we no longer honor the qva->qva_flags for the
--nosignature and others, but we assume anybody using these (as if
anybody was using the "cli" API) uses rpmcliInit() which takes
care of these common bits... shrug.
- Ditch ancient and hidden --nopgp --nogpg switches along with the
dishwater which are simply alias to --nosignature.
- Eliminate now unused qva_flags from rpmInstallArguments (along with
a double vsflags goo from rpmgraph)
- rpmcliInit() and rpmcliFini() do almost exactly the same as our
newborn cli-helpers, but they've been almost unused until now.
Use them and lose the new ones.. doh.
- The downside is that popt aliases are now broken when running commands
from the build tree due to lt-foo in argv[0], whereas initCli() took
and explicit popt context name argument. Oh well...
- rpmcliFini() was missing several necessary memory cleanup calls,
add them there while at it.
This patch allows short-circuiting of building binary packages. To
prevent accidental use of short-circuited rpms, they are marked with
an unsatisfiable dependency "rpmlib(ShortCircuited)". A developer using
this feature for local development and testing will use "--nodeps".
Should such a rpm leak into the world, users will quickly notice
it does not install by default.
(v3: avoids API change, suggested by Panu Matilainen.
v2: added poisoning with unsatisfiable dependency.)
Michal
- This hidden gem used "system hdlist", ie "/usr/share/comps/%{_arch}/hdlist
as the source for queries. Such "system hdlist" hasn't existed anywhere
since RHL 9/FC 1 times...
- the last freeware PGP version (6.5.8) is from year 2000 and doesn't
come close to compiling on modern distros, commercial versions we're
not interested in
- "PGP" signatures in rpm mean RSA, gpg can handle that just fine since
forever
- the code's been unused for years, unlikely to be functional anyway...
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias
- reference digests as digests not checksums
- make old md5 related symbols obsolete and use newer reference
- update man page accordingly
- makes testsuite depend on local aliases but using default popt config
is widely documented and needs to work, testsuite needs a better method
of disabling it if necessary
- we want the same set of aliases to be seen no matter what name we're
invoked with, except for build which has it's own set of aliases
- this has a nice little side-effect of permitting popt aliases to work
from source tree on non-static builds despite libtool calling executables
lt-something instead of their real names
- it's all rolled into "rpm" itself, these are just clutter and complicate
things needlessly
- leave symlinks to rpmquery, rpmverify, rpmsign and rpmdb -> rpm to
preserve some compatibility (at least rpmquery is known to be used
in scripts)
- const on typedef'ed ARGV_t doesn't mean a thing, add a new,
(exec* compatible) ARGV_const_t and use where appropriate consistently in
argv.h, rpmcli.h etc
- popt's argv const is the wrong way around for exec() family, add explicit
ARGV_t casts on popGetArgs() uses where needed
- compiler silence, aaahh...