Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't run plugins on src.rpm unpacking
Historically, we've been running all plugin hooks also when "installing" source packages, due to them going through the same portions of the code path used for binary packages, specifically rpmPackageFilesInstall(). However, source packages aren't really installed (deployed) onto the end user system, they're just unpacked into %_topdir for packaging purposes, so none of the tsm/fsm/psm/scriptlet hooks should apply to them, really. Fix that by disabling all but the init and cleanup hooks for source packages. Those two would need to run anyway if there were any binary packages supplied as well (e.g. "rpm -i binary.rpm source.rpm") and are only supposed to perform reversible actions such as open/close files. This also fixes source package installations on systems using a plugin that requires root privileges, such as the ima plugin, as these installs are typically done as a regular user (see RhBug:2316785). Extending rpmtsPlugins() for this purpose would be nicer but it's part of the public API and would require a soname bump just to pass the extra "te" argument, hence the static wrapper instead. Reuse the plugin development test, it's just about the only plugin test we currently have and happens to be a good fit here, too.
- Loading branch information