| Server IP : 185.143.233.130 / Your IP : 185.215.232.195 Web Server : LiteSpeed System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : renecafe ( 1327) PHP Version : 8.1.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/lib/python3.9/site-packages/dnf-plugins/__pycache__/ |
Upload File : |
a
�߾g�7 � @ sf d dl mZ d dl mZ d dlmZmZ d dlZd dlZd dlZd dl Z d dl
Z
d dlZd dlmZ d dl
mZ d dlZd dlZd dlZd dlZd dlmZ d dlmZ d Zed
�Zed�Zed�Zed
�Zed�Zed�Zed�Zed�Zed�Z ed�Z!ed�Z"ed�Z#ed�Z$G dd� dej%�Z&G dd� dej'j(�Z)dd� Z*G dd� de+�Z,dd � Z-d!d"� Z.dS )#� )�absolute_import)�unicode_literals)�_�loggerN)�copy)�PRIO_PLUGINCONFIG)�ustr)�
up2dateErrorsz_spacewalk.jsonz7CloudLinux Network based repositories will be disabled.z4CloudLinux Network channel support will be disabled.z@There was an error communicating with CloudLinux Network server.z=This system is not registered with CloudLinux Network server.z.This system is not subscribed to any channels.zSystemId could not be acquired.z%You can use rhn_register to register.z@This system is receiving updates from CloudLinux Network server.z�For security reasons packages from CloudLinux Network based repositories can be verified only with locally installed gpg keys. GPG key '%s' has been rejected.z.Package profile information could not be sent.z=Missing required login information for CloudLinux Network: %sz'Leapp upgrade is running - using cache.z>Spacewalk plugin has to be run under with the root privileges.c sZ e Zd ZdZ� fdd�Zdd� Zdd� Zdd d
�Zdd� Zd
d� Z dd� Z
dd� Z� ZS )� SpacewalkZ spacewalkc s� t t| ��||� || _|| _tj�| jjj t
�| _d| _i | _
t| jj�| _| �| j�| _d| j�� v r�| j�d�}|D ]\}}| j�||t� qztj�� s�t�t� d| j_| jjs�d S t�d� | �� d S )NF�mainzinitialized Spacewalk plugin)�superr
�__init__�base�cli�os�path�join�confZ
persistdir�STORED_CHANNELS_NAME�stored_channels_path�connected_to_spacewalk�up2date_cfgr Zread_config�parser�sections�items�
_set_valuer �dnf�utilZ am_i_rootr �warning�MUST_BE_ROOT�enabled�debug�activate_channels)�selfr r �options�key�value�� __class__� �9/usr/lib/python3.9/site-packages/dnf-plugins/spacewalk.pyr
; s* �
zSpacewalk.__init__c C s$ | j jsd S | jsd S d| jj_d S )NT)r r r ZdemandsZ root_user�r# r) r) r* �configR s
zSpacewalk.configc C s t �d� d S )Nz$/usr/sbin/clnreg_ks --strict-edition)r �systemr+ r) r) r* �clnreg^ s zSpacewalk.clnregTc
C s� i }d }d}d }d }| � � }|s(|}�n�tj�d�rFt�t� |}�n�tj� � | _
t| j
�}| j
d f}d}|s�ztjj
| jjd�}d}W ql tjy� } z>|dkr�| �� d}W Y d } ~ qlt�dtt| � W Y d } ~ d S d } ~ 0 0 ql|�st�dtt� | �i � d S ztjj| jjd�}
W n� tj�yX } zt�dtt| � W Y d } ~ d S d } ~ 0 tj�y� t�dtt� | �i � Y d S tj�y� t�d ttt t� Y d S 0 d| _!t�"t#� |
D ]$}|d
�r�t$|�%� �||d <