akashcli 4.6.1__tar.gz → 4.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {akashcli-4.6.1 → akashcli-4.6.2}/PKG-INFO +1 -1
  2. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/relay.py +36 -9
  3. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli.egg-info/PKG-INFO +1 -1
  4. {akashcli-4.6.1 → akashcli-4.6.2}/pyproject.toml +1 -1
  5. {akashcli-4.6.1 → akashcli-4.6.2}/README.md +0 -0
  6. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/__init__.py +0 -0
  7. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/_net.py +0 -0
  8. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/auth.py +0 -0
  9. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/cli.py +0 -0
  10. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/client.py +0 -0
  11. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/config.py +0 -0
  12. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/crypto.py +0 -0
  13. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/env_manager.py +0 -0
  14. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/exceptions.py +0 -0
  15. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/exec.py +0 -0
  16. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/integrity.py +0 -0
  17. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/logger.py +0 -0
  18. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/models.py +0 -0
  19. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/p2p.py +0 -0
  20. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/packages.py +0 -0
  21. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/restore.py +0 -0
  22. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/snapshot_crypto.py +0 -0
  23. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/storage.py +0 -0
  24. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/terminal.py +0 -0
  25. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/uploader.py +0 -0
  26. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli/utils.py +0 -0
  27. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli.egg-info/SOURCES.txt +0 -0
  28. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli.egg-info/dependency_links.txt +0 -0
  29. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli.egg-info/entry_points.txt +0 -0
  30. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli.egg-info/requires.txt +0 -0
  31. {akashcli-4.6.1 → akashcli-4.6.2}/akashcli.egg-info/top_level.txt +0 -0
  32. {akashcli-4.6.1 → akashcli-4.6.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.6.1
3
+ Version: 4.6.2
4
4
  Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
5
  License: MIT
6
6
  Keywords: akash,cli,relay,remote-shell,vault
@@ -211,30 +211,51 @@ def _handle_pty(ws, frame: dict) -> None:
211
211
 
212
212
  def _child_setup():
213
213
  """Run inside the child process before exec.
214
- start_new_session=True already calls setsid(); we just need to claim
215
- the slave PTY as the controlling terminal via TIOCSCTTY."""
214
+ start_new_session=True already called setsid(); claim the slave PTY
215
+ as controlling terminal so bash gets full job control when possible."""
216
216
  try:
217
217
  fcntl.ioctl(0, termios.TIOCSCTTY, 0)
218
218
  except Exception:
219
219
  pass
220
220
 
221
221
  import subprocess as _sp
222
+ import tempfile as _tmp
223
+
222
224
  shell = command or os.environ.get("SHELL", "/bin/bash")
223
225
 
224
- # Use start_new_session=True so the child is a proper session leader
225
- # (equivalent to setsid()), then TIOCSCTTY in preexec_fn attaches the
226
- # slave PTY as the controlling terminal → bash gets full job control.
226
+ # On Android non-root, TIOCSCTTY is blocked by SELinux so bash prints:
227
+ # "cannot set terminal process group … no job control"
228
+ # Fix: launch bash with --rcfile pointing to a temp file that sources
229
+ # ~/.bashrc then runs `set +m` (disable job-control monitoring).
230
+ # This silences the warning while keeping the shell fully interactive.
231
+ _env = {**os.environ,
232
+ "TERM": "xterm-256color",
233
+ "COLUMNS": str(cols), "LINES": str(rows)}
234
+ _bash_env_file = None
235
+ _shell_args = [shell]
236
+ if "bash" in shell.lower():
237
+ try:
238
+ _fd, _bash_env_file = _tmp.mkstemp(prefix=".akash_rc_", suffix=".sh")
239
+ # Source ~/.bashrc if it exists, then disable job-control monitoring
240
+ _rc = (
241
+ b'[ -f ~/.bashrc ] && . ~/.bashrc\n'
242
+ b'set +m\n'
243
+ )
244
+ os.write(_fd, _rc)
245
+ os.close(_fd)
246
+ _shell_args = [shell, "--rcfile", _bash_env_file]
247
+ except Exception:
248
+ _bash_env_file = None
249
+
227
250
  try:
228
251
  proc = _sp.Popen(
229
- [shell],
252
+ _shell_args,
230
253
  stdin=slave_fd, stdout=slave_fd, stderr=slave_fd,
231
254
  close_fds=True,
232
255
  start_new_session=True,
233
256
  preexec_fn=_child_setup,
234
257
  cwd=os.path.expanduser("~"),
235
- env={**os.environ,
236
- "TERM": "xterm-256color",
237
- "COLUMNS": str(cols), "LINES": str(rows)},
258
+ env=_env,
238
259
  )
239
260
  except Exception as e:
240
261
  try:
@@ -326,6 +347,12 @@ def _handle_pty(ws, frame: dict) -> None:
326
347
  os.close(master_fd)
327
348
  except Exception:
328
349
  pass
350
+ # Clean up the BASH_ENV temp file if we created one
351
+ if _bash_env_file:
352
+ try:
353
+ os.unlink(_bash_env_file)
354
+ except Exception:
355
+ pass
329
356
  try:
330
357
  ws.send(json.dumps({"type": "exit", "code": proc.returncode or 0}))
331
358
  except Exception:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.6.1
3
+ Version: 4.6.2
4
4
  Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
5
  License: MIT
6
6
  Keywords: akash,cli,relay,remote-shell,vault
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "akashcli"
3
- version = "4.6.1"
3
+ version = "4.6.2"
4
4
  description = "Akash CLI — secure remote shell relay, file vault, and device management"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes