summaryrefslogtreecommitdiff
path: root/rpmqv.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-05And finally, permit --hash and --percent cli-switches on erasures tooPanu Matilainen1-4/+4
2011-09-05Make --pipe command failures reflect our exit codes (RhBug:735481)Panu Matilainen1-1/+2
2011-07-13Fix the sanity check on number of query/verify sources (RhBug:691930)Panu Matilainen1-1/+1
- Prior to commit 2e672f3fae9d8ff7ee64ae13cfa2fe65272c2ede, 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.
2011-05-30Eliminate dead NULL-assignments at scope-end in main cli utilsPanu Matilainen1-6/+7
2010-11-15Remove no longer relevant references to build from arg sanity checksPanu Matilainen1-5/+4
2010-11-15Eliminate pointless argument sanity checkPanu Matilainen1-7/+0
- --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)
2010-11-15Remove unnecessary includesPanu Matilainen1-2/+0
2010-10-08Further split the cli-tools to rpminstall, rpmquery and rpmverifyPanu Matilainen1-1/+9
- 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.
2010-10-04Lift specfile query out of main rpm(query) into separate binaryPanu Matilainen1-2/+0
- 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
2010-09-03Rip IAM_RPMDB, ie --initdb, --rebuilddb etc modes out of rpmqv.c and librpmPanu Matilainen1-65/+2
- 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...
2010-09-03Rip IAM_RPMK, ie --import and --checksig modes out of rpmqv.c + librpmPanu Matilainen1-43/+1
- Add popt exec aliases to rpmkeys for backwards compatibility
2010-09-03Further simplify rpmcliVerifySignatures()Panu Matilainen1-7/+1
- 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.
2010-09-03Rrrriiip the addsign/resign/delsign bits out of rpmqv.c + friendsPanu Matilainen1-85/+1
- Add popt exec aliases to rpmsign for backwards compatibility (dejavu...)
2010-09-03Lookup signature type from cli utility alreadyPanu Matilainen1-1/+2
- 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
2010-09-03rpmcliSign() only creates or deletes signaturesPanu Matilainen1-2/+2
- 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
2010-09-03Use rpmcliVerifySignatures() directly from rpmqv.c mainPanu Matilainen1-0/+2
2010-09-03Use rpmcliImportPubkeys() for importing instead of rpmcliSign()Panu Matilainen1-3/+11
- Add some more IamYourDaddy modes to rpmqv.c for now. We'll need to add junk to get rid of others, sigh...
2010-09-03Remove hysterically useless RPMSIGN_NONE + --sign popt leftoversPanu Matilainen1-3/+0
2010-09-03Use the common rpmcliQueryFlags for signature verify options in rpm cli tooPanu Matilainen1-1/+1
- 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)
2010-08-24Remove ancient autohelp-handling related leftoversPanu Matilainen1-2/+0
2010-08-20Argh. Realize we already have equivalents of initCli() and finishCli()Panu Matilainen1-10/+4
- 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.
2010-08-20Kludge to get rid of ugly lone --quiet on usage messagePanu Matilainen1-1/+1
2010-08-20Move --pipe handling to cliutils helpersPanu Matilainen1-29/+3
2010-08-20Oops, fallout from commit 5fe63cd8e0b552a9687666e8b5f9454cf274d69dPanu Matilainen1-1/+1
2010-08-20Lump much of the common cli-init + finish tasks into cliutils helpersPanu Matilainen1-72/+4
2010-08-20Add a convenience library for stuff common cli-bits intoPanu Matilainen1-30/+1
2010-08-20If MiNT can't cope, frankly my dear, I dont give a damnPanu Matilainen1-5/+0
2010-08-20Simplify --root argument checkingPanu Matilainen1-10/+2
- We haven't accepted url's in as root since ages, wipe out the goo
2010-08-20Chainsaw the now unused #ifdef'ed parts out of rpmqv.c and rpmbuild.cPanu Matilainen1-188/+10
2010-06-23Allow '--short-circuit' for '-bb'Michal Schmidt1-0/+2
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
2010-03-19Eliminate hysterical --hdlist query option and everything implementing itPanu Matilainen1-4/+2
- 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...
2010-03-19Eliminate --wtfwalk .. err, --ftswalk and everything implementing itPanu Matilainen1-3/+0
- that's what find + xargs are for, this is just useless cruft
2010-02-03Kill RPMTAG_FSNAMES and RPMTAG_FSSIZES and everything implementing themFlorian Festi1-1/+0
2010-01-05Move <mcheck.h> include out of system.h to the couple of places that carePanu Matilainen1-0/+3
- only two real users inside rpm - remove mcheck foo from rpminject and rpmsort, we're not interested...
2010-01-05Unconditionally include <sys/wait.h> where neededPanu Matilainen1-1/+2
- no point conditionalizing what we cant live without
2009-09-07Add noreturn annotations to argerror() helper functionsPanu Matilainen1-0/+1
2009-08-31Replace equal/not equal uses of str[n]cmp() with rstreq[n] in binariesPanu Matilainen1-3/+3
2009-03-26Put the PGP foobar signature generation out of its miseryPanu Matilainen1-8/+0
- 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...
2009-03-19Show query/verify selection options just once in --helpPanu Matilainen1-5/+3
2009-02-27Add md5->filedigest aliases (rhbz#487597)Jindrich Novy1-1/+1
- 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
2009-02-16-Use installInterfaceFlags in place of eraseInterfaceFlags. -Moved ↵Rakesh Pandit1-2/+2
transaction part from rpmInstall and rpmErase to rpmcliTransaction.
2008-12-18Permit --noscripts on verify (to disable %verifyscript execution)Panu Matilainen1-2/+2
- this used to work but got broken by the rpmi/rpmq/... unification
2008-11-29Read default popt aliases again (rhbz#473167)Panu Matilainen1-2/+0
- 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
2008-11-22Use rpmConfigDir() for finding our popt alias filePanu Matilainen1-2/+7
- this allows popt aliases to be reliably available in tests - why do we have the popt initialization done twice?
2008-06-25Force "rpm" popt context for everything but buildPanu Matilainen1-2/+9
- 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
2008-06-25Eliminate rpmd, rpmi, rpmk, rpmq "helper binaries"Panu Matilainen1-10/+0
- 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)
2008-06-24Eliminate the pointless rpmb + rpmt symlinkeryPanu Matilainen1-3/+1
- just build "rpmbuild" executable and install to bindir instead of mucking with several different names
2008-05-05Check for pipe() return code on --pipePanu Matilainen1-3/+4
2008-05-02Ensure default SIGPIPE handler for --pipe (rhbz#444389)Panu Matilainen1-0/+1
2008-04-07ARGV_t const pendantryPanu Matilainen1-5/+5
- 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...