From e8ad4a8980b95b1039e2b016b69ee759fde9a164 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Tue, 20 Aug 2024 19:59:40 -0400 Subject: [PATCH] patch incus lxd-to-incus to point to the right socket location --- 1002-fedora-socket-is-in-run-incus.patch | 34 ++++++++++++++++++++++++ incus.spec | 6 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 1002-fedora-socket-is-in-run-incus.patch diff --git a/1002-fedora-socket-is-in-run-incus.patch b/1002-fedora-socket-is-in-run-incus.patch new file mode 100644 index 0000000..a9cb245 --- /dev/null +++ b/1002-fedora-socket-is-in-run-incus.patch @@ -0,0 +1,34 @@ +From 56f01aecc28a19ba1418ee418a83914ab079b6e2 Mon Sep 17 00:00:00 2001 +From: Neil Hanlon +Date: Tue, 20 Aug 2024 19:54:56 -0400 +Subject: [PATCH] fedora socket is in /run/incus + +--- + cmd/lxd-to-incus/targets_systemd.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmd/lxd-to-incus/targets_systemd.go b/cmd/lxd-to-incus/targets_systemd.go +index fb57a14..eb5d239 100644 +--- a/cmd/lxd-to-incus/targets_systemd.go ++++ b/cmd/lxd-to-incus/targets_systemd.go +@@ -3,7 +3,7 @@ package main + import ( + "time" + +- "github.com/lxc/incus/v6/client" ++ incus "github.com/lxc/incus/v6/client" + "github.com/lxc/incus/v6/shared/subprocess" + "github.com/lxc/incus/v6/shared/util" + ) +@@ -37,7 +37,7 @@ func (s *targetSystemd) start() error { + } + + func (s *targetSystemd) connect() (incus.InstanceServer, error) { +- return incus.ConnectIncusUnix("/var/lib/incus/unix.socket", &incus.ConnectionArgs{SkipGetServer: true}) ++ return incus.ConnectIncusUnix("/run/incus/unix.socket", &incus.ConnectionArgs{SkipGetServer: true}) + } + + func (s *targetSystemd) paths() (*daemonPaths, error) { +-- +2.46.0 + diff --git a/incus.spec b/incus.spec index 04e861f..a94a825 100644 --- a/incus.spec +++ b/incus.spec @@ -18,7 +18,7 @@ Version: 6.4 %global golicenses COPYING Name: incus -Release: 3%{?dist} +Release: 4%{?dist} Summary: Powerful system container and virtual machine manager License: Apache-2.0 URL: https://linuxcontainers.org/incus @@ -59,6 +59,7 @@ Source203: %{swaggerui_source_baseurl}/swagger-ui.css#/swagger-ui-%{swagger # Downstream only patches ## Allow offline builds Patch1001: incus-0.2-doc-Remove-downloads-from-sphinx-build.patch +Patch1002: 1002-fedora-socket-is-in-run-incus.patch %global bashcompletiondir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null || :) %global selinuxtype targeted @@ -457,6 +458,9 @@ export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" %endif %changelog +* Tue Aug 20 2024 Neil Hanlon - 6.4-4 +- patch to use the right socket for lxd-to-incux + * Tue Aug 20 2024 Neil Hanlon - 6.4-3 - rebuild with systemd socket change