yamine 0.7.0 → 0.7.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/yamine/cli/system.rb +28 -10
- data/lib/yamine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 96bdebf9dc726c4caf747a07f2599bbde292a975e3395bd7cf43b1daf752bea3
|
|
4
|
+
data.tar.gz: 4abda73bc87a74f344070a3d69e87d470b788f05d04abfa4d6fb5783649fea20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 627bc6d9fcb038635d90ec9b49eb7a321fae414cb58ed584b02f4bcc7fbd8fd3a49fe98b610d7fb033564c416ab8ccdbed1b87c5ef6983ef7c70023eca351110
|
|
7
|
+
data.tar.gz: 19a0c6f70d82fddf4385c616e820d04d00a12d60be5016a13ce12054da5bf82aeb5fc7a47940d030518645eda95dac28a1957502d7df139715da65695681863f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.1] — 2026-09-10
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`yamine start` now honors `YAMINE_PORT`.** `ensure_workstation!`
|
|
8
|
+
hardcoded port 443, so the documented escape hatch for CI and
|
|
9
|
+
sandboxes — "where 443 is impossible" — was ignored: with
|
|
10
|
+
`YAMINE_PORT=8443` on a non-interactive machine, `start` aborted with
|
|
11
|
+
"port 443 needs root to bind" and demanded sudo for a port the user
|
|
12
|
+
had deliberately chosen to avoid. The port and scheme now come from
|
|
13
|
+
the context, and an unprivileged port is started directly instead of
|
|
14
|
+
being treated as a setup failure. The root path is unchanged: 443 on a
|
|
15
|
+
non-interactive machine still points at `yamine setup`.
|
|
16
|
+
|
|
3
17
|
## [0.7.0] — 2026-09-10
|
|
4
18
|
|
|
5
19
|
Keeping the no-port promise when the machine's recorded port goes stale,
|
data/lib/yamine/cli/system.rb
CHANGED
|
@@ -700,9 +700,15 @@ module Yamine
|
|
|
700
700
|
|
|
701
701
|
|
|
702
702
|
# Quiet workstation setup for `start`: trust the CA, ensure a proxy
|
|
703
|
-
# on 443
|
|
704
|
-
# Each step is idempotent; only missing
|
|
705
|
-
# CI without a proxy fails fast rather
|
|
703
|
+
# on this run's port (443 by default — root service, sudo daemon
|
|
704
|
+
# fallback), and sync hosts. Each step is idempotent; only missing
|
|
705
|
+
# pieces run. Non-interactive CI without a proxy fails fast rather
|
|
706
|
+
# than prompting for sudo.
|
|
707
|
+
#
|
|
708
|
+
# The port comes from ctx, not a literal: YAMINE_PORT is the
|
|
709
|
+
# documented escape hatch for CI and sandboxes ("where 443 is
|
|
710
|
+
# impossible"), and hardcoding 443 here demanded root for a port
|
|
711
|
+
# those users had already chosen to avoid.
|
|
706
712
|
def ensure_workstation!(ctx)
|
|
707
713
|
# 1. CA
|
|
708
714
|
unless Yamine::Certs.trusted?(ctx.store.dir)
|
|
@@ -714,19 +720,30 @@ module Yamine
|
|
|
714
720
|
end
|
|
715
721
|
end
|
|
716
722
|
|
|
717
|
-
# 2. Proxy on
|
|
718
|
-
port =
|
|
719
|
-
tls =
|
|
723
|
+
# 2. Proxy on the port this run wants
|
|
724
|
+
port = ctx.proxy_port
|
|
725
|
+
tls = ctx.proxy_tls
|
|
720
726
|
unless Yamine::ProxyControl.listening?(port) && ProxyControl.ours?(port, tls: tls)
|
|
721
|
-
|
|
722
|
-
|
|
727
|
+
privileged = port < 1024
|
|
728
|
+
if privileged && !Yamine::ProxyControl.root? && !ctx.interactive?
|
|
729
|
+
abort_setup("Proxy is not running and port #{port} needs root to bind.", *privileged_port_hint)
|
|
723
730
|
end
|
|
724
731
|
ok =
|
|
725
732
|
if ProxyControl.root?
|
|
726
733
|
Yamine::CLI::SystemCommand.ensure_root_service(ctx)
|
|
727
734
|
elsif ctx.interactive?
|
|
728
735
|
begin
|
|
729
|
-
Yamine::ProxyControl.spawn_daemon(store: ctx.store, port: port, tls: tls, sudo:
|
|
736
|
+
Yamine::ProxyControl.spawn_daemon(store: ctx.store, port: port, tls: tls, sudo: privileged)
|
|
737
|
+
wait_for_ours(ctx, port, tls: tls)
|
|
738
|
+
rescue Yamine::ProxyNotRunningError, SystemCallError => e
|
|
739
|
+
warn " daemon start failed: #{e.message.lines.first&.strip}"
|
|
740
|
+
false
|
|
741
|
+
end
|
|
742
|
+
elsif !privileged
|
|
743
|
+
# Non-interactive but unprivileged: nothing to elevate, so
|
|
744
|
+
# start the daemon directly instead of failing.
|
|
745
|
+
begin
|
|
746
|
+
Yamine::ProxyControl.spawn_daemon(store: ctx.store, port: port, tls: tls, sudo: false)
|
|
730
747
|
wait_for_ours(ctx, port, tls: tls)
|
|
731
748
|
rescue Yamine::ProxyNotRunningError, SystemCallError => e
|
|
732
749
|
warn " daemon start failed: #{e.message.lines.first&.strip}"
|
|
@@ -736,7 +753,8 @@ module Yamine
|
|
|
736
753
|
false
|
|
737
754
|
end
|
|
738
755
|
unless ok
|
|
739
|
-
abort_setup("Proxy is not running and could not be started on port
|
|
756
|
+
abort_setup("Proxy is not running and could not be started on port #{port}.",
|
|
757
|
+
*privileged_port_hint)
|
|
740
758
|
end
|
|
741
759
|
end
|
|
742
760
|
|
data/lib/yamine/version.rb
CHANGED