rpm/lib
Panu Matilainen 2a8d89a1c3 Reimplement --restore as a transaction element, obsolete --setperms & co
--setperms, --setugids and --setcaps were fun demos of alias capabilities
in the nineties, but they can be downright dangerous when used
separately, are blisfully unaware of all state in rpm yet try to
duplicate functionality existing in C, and thus are a constant source
of bugs that are between hard to impossible to fix in the alias space.

Add a new transaction element type for the restore operation, wire
through all the necessary places. In places (like ordering) this is
an overkill but otherwise it seems like a natural thing to be able
to process restore alongside package install/remove. The restore
operation is a cross between install and erase codepath-wise so touches
some funny places, but FA_TOUCH does just the thing, and now all the
regular disablers like --nocontext and --nocaps can be used if
necessary, plugins get to do their work and also timestamps are
restored.

Remove the dangerous shell implementations of things and just make them
aliases to --restore.

Fixes: #965
2022-02-03 13:47:28 +02:00
..
backend treat 0 as valid file descriptor 2022-01-21 13:34:07 +01:00
Makefile.am Fix build regression from 376fef14a6 2021-04-26 11:35:30 +03:00
cpio.c Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
cpio.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
depends.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
formats.c Use the new shescape macro for :shescape query format too 2021-09-24 14:55:44 +02:00
fprint.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
fprint.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
fsm.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
fsm.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
gentagtbl.sh Use actual enum values in tag table sentinel to avoid int/enum mismatch 2010-09-21 15:26:25 +03:00
header.c Limit maximum array size in the header to about one million 2021-12-15 09:48:50 +02:00
header.h Issue build-time deprecation warnings for unsafe header interfaces 2021-03-11 10:58:48 +02:00
header_internal.h Make retrofit etc helpers static again now that we can 2018-04-25 16:27:45 +03:00
headerfmt.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
headerutil.c Fix a tiny memory leak 2021-03-04 16:22:54 +02:00
manifest.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
manifest.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
misc.h Clean up rpmdb leftovers from an atexit() handler. 2016-12-13 11:19:03 +02:00
order.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
package.c Exclude the xlateTags symbol from librpm's public API. 2021-06-30 10:58:59 +02:00
poptALL.c Make exit code reflect broken rcfile on --showrc 2022-01-28 11:29:14 +02:00
poptI.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
poptQV.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
psm.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
query.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
relocation.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmal.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmal.h Use the transaction set as argument in rpmalCreate() 2020-02-24 11:54:22 +02:00
rpmarchive.h Make file open and close in fsm debuggable 2021-02-19 11:09:56 +02:00
rpmcallback.h Add package verification step to transactions 2018-05-09 14:16:07 +03:00
rpmchecksig.c Resurrect --prtpkts debug switch functionality 2019-10-31 11:59:20 +01:00
rpmchroot.c Only do early name services initialization if we actually chroot 2020-11-09 14:00:56 +02:00
rpmchroot.h Add "c++ protection" to (hopefully) all of our internal headers 2010-09-21 15:21:12 +03:00
rpmcli.h Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmdb.c Bump hash for rpmdb cookie to SHA256 to appease FIPS 2022-01-31 12:00:22 +02:00
rpmdb.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
rpmdb_internal.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
rpmds.c Don't strip flags for OrderWithRequires in rpmds 2021-06-18 12:24:37 +03:00
rpmds.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
rpmds_internal.h Axe --nopromote and most of the related infrastructure 2020-05-27 14:14:00 +02:00
rpmfi.c Really fix IMA signature lengths assumed constant (#1833, RhBug:2018937) 2021-12-13 16:31:57 +02:00
rpmfi.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
rpmfi_internal.h Add mode for updating with minimal writing (RhBug:783480) 2017-04-21 13:50:50 +03:00
rpmfiles.h Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmfs.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmfs.h Reset file actions between rpmtsRun() calls (RhBug:1076552) 2014-03-21 12:44:03 +02:00
rpmgi.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmgi.h Stop abusing enum typedefs for bitfield types 2010-09-21 11:10:14 +03:00
rpmhash.C Fix memory leak in rpmhash implementation 2014-09-16 11:12:10 +02:00
rpmhash.H Add alternative hash key add/get/check methods with prehashed key 2012-09-05 10:38:36 +03:00
rpminstall.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmlead.c Plug the last data "leak" from rpmlead 2018-04-18 14:36:01 +03:00
rpmlead.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
rpmlib.h Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmlock.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmlock.h Export rpmlock release method internally as well 2013-03-11 11:12:35 +02:00
rpmplugin.h Drop the experimental collection support 2014-06-17 16:27:24 +03:00
rpmplugins.c Move <dlfcn.h> out of system.h 2020-02-04 16:39:16 +02:00
rpmplugins.h Fix doxygen warnings 2015-02-17 15:31:22 +01:00
rpmpol.h Stop abusing enum typedefs for bitfield types 2010-09-21 11:10:14 +03:00
rpmprob.c Add a pre-flight check for removed packages too 2020-06-02 15:25:57 +02:00
rpmprob.h Add package verification step to transactions 2018-05-09 14:16:07 +03:00
rpmps.c Fix couple of incorrect sizeof() uses 2011-03-17 14:08:54 +02:00
rpmps.h Eliminate all fooUnlink() functions out of the API 2010-09-13 13:08:33 +03:00
rpmrc.c Add support for loongarch64 2022-01-18 17:16:54 +01:00
rpmscript.c Do not unset $MALLOC_CHECK_ 2022-01-24 14:35:24 +02:00
rpmscript.h Make scriptlet error behavior a property of rpmScript "objects" 2018-03-09 12:21:37 +02:00
rpmtag.h Fix RPM_MIN_TYPE definition, RPM_NULL_TYPE is not a legit tag type 2021-04-16 15:57:00 +03:00
rpmtd.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00
rpmtd.h Add query formats for displaying tag numbers and names 2021-03-15 13:47:26 +02:00
rpmte.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmte.h Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmte_internal.h Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmtriggers.c Really fix spurious %transfiletriggerpostun execution (RhBug:2023311) 2022-02-02 14:11:19 +02:00
rpmtriggers.h Fixups to file trigger internal api docs + comments 2017-12-13 12:06:45 +02:00
rpmts.c Allow an optional "override clock" for deterministic timestamps 2021-11-23 10:53:04 +02:00
rpmts.h Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmts_internal.h Allow an optional "override clock" for deterministic timestamps 2021-11-23 10:53:04 +02:00
rpmtypes.h Add (beginnings of) a rpm version API (parsing, comparison) 2020-05-27 14:14:00 +02:00
rpmug.c Eliminate use of obsolete gethostbyname() function 2020-11-23 13:00:59 +02:00
rpmug.h Initialize all the name services we need 2014-01-28 09:45:55 +02:00
rpmvs.c verifySignature(): package signatures must be PGPSIGTYPE_BINARY 2021-11-01 10:59:03 +02:00
rpmvs.h Implement verify support for alternative digests and signatures 2019-10-28 15:27:56 +02:00
signature.c Don't require signature header to be in single contiguous region part II 2020-01-10 10:31:47 +02:00
signature.h Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
tagexts.c Shut up bogus Doxygen warnings about undocumented parameters 2020-10-28 10:40:41 +02:00
tagname.c Remove compare of global array tagsByName to NULL 2020-07-21 09:25:34 +02:00
transaction.c Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
verify.c Include rpmpgp.h only where it is actually needed 2021-11-17 14:21:06 +02:00