mb
{s < d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dl m
Z
mZ d dlm
Z
mZ d dlmZ d dlmZmZmZmZ d dlmZ d dlmZmZmZmZmZ ej e Z d Z!e!" d
Z#e!" d Z$ G d
d Z% G d de%e Z& G d de%e Z' G d de Z( G d de( Z) G d de& Z*dZ+ G d de* Z, G d de Z-de.fdZ/dee fd Z0dS )! N)abstractmethod)ListOptional)Core Packaging)
LicenseCLN)AbstractFeatureFeatureError
FeatureStatusea4_only)cPanel)
OsReleaseInfo check_runrunrun_cmd_and_log
os_versionzexport PATH=/opt/imunify360/venv/bin:$PATH; _els_tmp=$(mktemp) && curl -sf -o "$_els_tmp" {url} && sh "$_els_tmp" -i; rm -f "$_els_tmp";zHhttps://repo.alt.tuxcare.com/alt-php-els/install-els-alt-php-rpm-repo.sh)urlzHhttps://repo.alt.tuxcare.com/alt-php-els/install-els-alt-php-deb-repo.shc e Zd ZdZdZdZeddee fd Z edefd Z
ed Zeede
fd Zed
Zede
fd Zej d Zej d
ZdefdZdS )SimpleInstallerMixIna This is a mixin class implementing common case installation scenario.
Installation is supposed to be through a single command cls.INSTALL_CMD.
Removal is done through interpolating a space separated list of package
names to remove into cls.REMOVE_CMD_TMPL. List of packages to remove is
obtained by collecting all installed alt-php* packages except those we want
to keep (as returned by required_packages()).
z
/bin/falseNenabledc d S N selfr s W/opt/imunify360/venv/lib/python3.11/site-packages/im360/subsys/features/hardened_php.py
generate_repoz"SimpleInstallerMixIn.generate_repoA c
K d S r r r s r pre_install_cmdz$SimpleInstallerMixIn.pre_install_cmdE s r c d S r r r s r remove_repoz SimpleInstallerMixIn.remove_repoI r r returnc " K t S )z0Set of installed package names matching alt-php*)setr r r _list_alt_php_packagesz+SimpleInstallerMixIn._list_alt_php_packagesM s uur c D | d p|dk p|dk S )Nzalt-php-internalzalt-php-configzalt-php-hyperscan)
startswith)clspkgs r _keep_installedz$SimpleInstallerMixIn._keep_installedS s5
NN-..
*&&
*))
r c r K d{V }t fd|D S )z@Set of installed alt-php packages except those we keep installedNc 3 F K | ]} | |V d S r )r- ).0r, r+ s r