diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-01-21 10:39:52 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-02-03 13:47:28 +0200 |
commit | 2a8d89a1c390e6ca1de0ece49aa11012b1d0ff89 (patch) | |
tree | bcc1442c1e07cbbff589e5ee03c1701914f6b6f6 /docs/man | |
parent | 99f8997082637889e6ef08c7893d583cfaea2f04 (diff) | |
download | rpm-2a8d89a1c390e6ca1de0ece49aa11012b1d0ff89.tar.gz |
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
Diffstat (limited to 'docs/man')
-rw-r--r-- | docs/man/rpm.8.md | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/docs/man/rpm.8.md b/docs/man/rpm.8.md index 7ca4e6e31..3c8b1dae8 100644 --- a/docs/man/rpm.8.md +++ b/docs/man/rpm.8.md @@ -45,13 +45,7 @@ MISCELLANEOUS: **rpm** **\--showrc** -**rpm** **\--setperms** *PACKAGE\_NAME \...* - -**rpm** **\--setugids** *PACKAGE\_NAME \...* - -**rpm** **\--setcaps** *PACKAGE\_NAME \...* - -**rpm** **\--restore** *PACKAGE\_NAME \...* +**rpm** **\--restore** \[**select-options**\] select-options -------------- @@ -970,30 +964,14 @@ MISCELLANEOUS COMMANDS : shows the values **rpm** will use for all of the options are currently set in *rpmrc* and *macros* configuration file(s). -**rpm** **\--setperms** *PACKAGE\_NAME* - -: sets permissions of files in the given package. Consider using - **\--restore** instead. - -**rpm** **\--setugids** *PACKAGE\_NAME* - -: sets user/group ownership of files in the given package. This - command can change permissions and capabilities of files in that - package. In most cases it is better to use **\--restore** instead. - -**rpm** **\--setcaps** *PACKAGE\_NAME* - -: sets capabilities of files in the given package. Consider using - **\--restore** instead. - -**rpm** **\--restore** *PACKAGE\_NAME* +**rpm** **\--setperms** | **\--setugids** | **\--setcaps** *PACKAGE\_NAME* -: The option restores owner, group, permissions and capabilities of - files in the given package. +: obsolete aliases for **\--restore** -Options **\--setperms**, **\--setugids**, **\--setcaps** and +**rpm** **\--restore** \[**select-options**\] -: **\--restore** are mutually exclusive. +: The option restores file metadata such as timestamp, owner, group, + permissions and capabilities of files in packages. FTP/HTTP OPTIONS ---------------- |