Skip to content

Commit a3cb121

Browse files
committed
wip
1 parent 54bf421 commit a3cb121

File tree

5 files changed

+43
-9
lines changed

5 files changed

+43
-9
lines changed

Cargo.lock

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
9595
tokio = { version = "1.16.1", features = ["time", "process", "rt", "net"] }
9696
xmlrpc = "0.15.1"
9797
termcolor = "1.1.3"
98+
tokio-unix-ipc = { version = "0.2.0", features = ["serde"] }
9899

99100
[build-dependencies]
100101
anyhow = "1.0"

rpmostree-cxxrs.cxx

+2-8
Original file line numberDiff line numberDiff line change
@@ -2954,10 +2954,7 @@ extern "C"
29542954
daemon_init_inner$ (debug);
29552955
throw$.ptr = nullptr;
29562956
},
2957-
[&] (const char *catch$) noexcept {
2958-
throw$.len = ::std::strlen (catch$);
2959-
throw$.ptr = const_cast<char *> (::cxxbridge1$exception (catch$, throw$.len));
2960-
});
2957+
::rust::detail::Fail (throw$));
29612958
return throw$;
29622959
}
29632960

@@ -2971,10 +2968,7 @@ extern "C"
29712968
daemon_main_inner$ ();
29722969
throw$.ptr = nullptr;
29732970
},
2974-
[&] (const char *catch$) noexcept {
2975-
throw$.len = ::std::strlen (catch$);
2976-
throw$.ptr = const_cast<char *> (::cxxbridge1$exception (catch$, throw$.len));
2977-
});
2971+
::rust::detail::Fail (throw$));
29782972
return throw$;
29792973
}
29802974

rust/src/client.rs

+2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ pub(crate) fn client_handle_fd_argument(
164164
fn start_daemon_via_socket() -> Result<()> {
165165
use cap_std::io_lifetimes::IntoSocketlike;
166166

167+
let conn = tokio::net::UnixStream::connect("/run/rpm-ostree/client.sock")?;
168+
167169
let address = sockaddr()?;
168170
let socket = rustix::net::socket(
169171
rustix::net::AddressFamily::UNIX,

src/daemon/rpm-ostreed.socket

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ConditionKernelCommandLine=ostree
33

44
[Socket]
5-
ListenSequentialPacket=/run/rpm-ostree/client.sock
5+
ListenStream=/run/rpm-ostree/client.sock
66
SocketMode=0600
77

88
[Install]

0 commit comments

Comments
 (0)