Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
uaclient /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
api
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
cli
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
clouds
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
daemon
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
entitlements
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
files
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
http
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
messages
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
timer
[ DIR ]
drwxr-xr-x
2026-07-18 06:45
__init__.py
0
B
-rw-r--r--
2026-04-08 03:24
actions.py
14.83
KB
-rw-r--r--
2026-07-06 22:36
apt.py
36.26
KB
-rw-r--r--
2026-07-06 22:36
apt_news.py
8.39
KB
-rw-r--r--
2026-04-08 03:24
config.py
18.91
KB
-rw-r--r--
2026-04-08 03:24
contract.py
35.88
KB
-rw-r--r--
2026-04-08 03:24
contract_data_types.py
9.94
KB
-rw-r--r--
2026-07-06 22:36
data_types.py
13.99
KB
-rw-r--r--
2026-07-06 22:36
defaults.py
3.19
KB
-rw-r--r--
2026-04-08 03:24
event_logger.py
8.06
KB
-rw-r--r--
2026-04-08 03:24
exceptions.py
18.29
KB
-rw-r--r--
2026-04-08 03:24
gpg.py
836
B
-rw-r--r--
2026-04-08 03:24
livepatch.py
12.85
KB
-rw-r--r--
2026-04-08 03:24
lock.py
4.42
KB
-rw-r--r--
2026-04-08 03:24
log.py
4.9
KB
-rw-r--r--
2026-04-08 03:24
secret_manager.py
648
B
-rw-r--r--
2026-04-08 03:24
security_status.py
26.16
KB
-rw-r--r--
2026-04-08 03:24
snap.py
6.26
KB
-rw-r--r--
2026-04-08 03:24
status.py
28.53
KB
-rw-r--r--
2026-04-08 03:24
system.py
28.12
KB
-rw-r--r--
2026-04-08 03:24
types.py
308
B
-rw-r--r--
2026-04-08 03:24
update_contract_info.py
1.55
KB
-rw-r--r--
2026-04-08 03:24
upgrade_lts_contract.py
3.22
KB
-rw-r--r--
2026-04-08 03:24
util.py
15.45
KB
-rw-r--r--
2026-04-08 03:24
version.py
2.64
KB
-rw-r--r--
2026-07-06 22:36
yaml.py
840
B
-rw-r--r--
2026-04-08 03:24
Save
Rename
""" Client version related functions """ import os.path from math import inf from typing import Optional from uaclient.apt import ( get_apt_cache_time, get_pkg_candidate_version, version_compare, ) from uaclient.defaults import CANDIDATE_CACHE_PATH, UAC_RUN_PATH from uaclient.exceptions import ProcessExecutionError from uaclient.system import subp __VERSION__ = "37.2" PACKAGED_VERSION = "37.2ubuntu~22.04.1" def get_version() -> str: """Return the packaged version as a string Prefer the binary PACKAGED_VESION set by debian/rules to DEB_VERSION. If unavailable, check for a .git development environments: a. If run in our upstream repo `git describe` will gives a leading XX.Y so return the --long version to allow daily build recipes to count commit offset from upstream's XX.Y signed tag. b. If run in a git-ubuntu pkg repo, upstream tags aren't visible, believe __VERSION__ is correct - there is and MUST always be a test to make sure it matches debian/changelog """ if not PACKAGED_VERSION.startswith("@@PACKAGED_VERSION"): return PACKAGED_VERSION topdir = os.path.dirname(os.path.dirname(__file__)) if os.path.exists(os.path.join(topdir, ".git")): cmd = ["git", "describe", "--abbrev=8", "--match=[0-9]*", "--long"] try: out, _ = subp(cmd) return out.strip() except ProcessExecutionError: pass return __VERSION__ def get_last_known_candidate() -> Optional[str]: # If we can't determine when the cache was updated for the last time, # We always assume it was as recent as possible - thus `inf`. last_apt_cache_update = get_apt_cache_time() or inf if ( not os.path.exists(CANDIDATE_CACHE_PATH) or os.stat(CANDIDATE_CACHE_PATH).st_mtime < last_apt_cache_update ): candidate_version = None try: candidate_version = get_pkg_candidate_version("ubuntu-pro-client") if candidate_version: os.makedirs(UAC_RUN_PATH, exist_ok=True) with open(CANDIDATE_CACHE_PATH, "w") as f: f.write(candidate_version) return candidate_version except Exception: if candidate_version is not None: return candidate_version try: with open(CANDIDATE_CACHE_PATH, "r") as f: return f.read().strip() except Exception: pass return None def check_for_new_version() -> Optional[str]: candidate = get_last_known_candidate() if candidate and version_compare(candidate, get_version()) > 0: return candidate return None