23d5c05 Check have packages for extra features been installed before restoring backup

1 file Authored by Oleg Kozlov 5 years ago, Committed by okozlov 5 years ago,
    Check have packages for extra features been installed before restoring backup
    
    `iparestore --full` should check that packages for extra features such as dns and adtrust are installed in the system before restoring a backup in case the backup includes content for these features. If the packages are not installed full backup should be refused and an error message with suggestions should be showed.
    
    If corresponding packages for these features are not installed before the backup restoring, it may cause a situation when the packages are going to be installed after the restoring. In that case configuration files restored by `ipa-restore` will be replaced by default configuration files if the files are tracked by `rpm`. E.g. if `freeipa-server-trust-ad` is not installed before `ipa-restore --full` running, when the package will be installed it also will bring `samba` package according to the dependencies. At `samba` installation step exist correct `/etc/samba/smb.conf` is going to be replaced by the default one from the `samba` package.
    
    Fixes: https://pagure.io/freeipa/issue/7630
    Reviewed-By: Christian Heimes <cheimes@redhat.com>