mirror of
https://github.com/weaselshit/incus-rpm.git
synced 2025-12-10 11:31:14 +00:00
Update to 6.2
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
From bac712576069204618f642ef5ed3d8be942864b4 Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <neal@gompa.dev>
|
||||
Date: Sat, 27 Apr 2024 10:01:14 -0400
|
||||
Subject: [PATCH] client/connection: Add support for the socket existing in
|
||||
/run/incus
|
||||
|
||||
Transient sockets are supposed to be in /run rather than /var, so make
|
||||
it possible to detect that automatically when used.
|
||||
|
||||
Signed-off-by: Neal Gompa <neal@gompa.dev>
|
||||
---
|
||||
client/connection.go | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/client/connection.go b/client/connection.go
|
||||
index 01be07685..2792ccbe4 100644
|
||||
--- a/client/connection.go
|
||||
+++ b/client/connection.go
|
||||
@@ -157,7 +157,8 @@ func ConnectIncusUnix(path string, args *ConnectionArgs) (InstanceServer, error)
|
||||
//
|
||||
// If the path argument is empty, then $INCUS_SOCKET will be used, if
|
||||
// unset $INCUS_DIR/unix.socket will be used and if that one isn't set
|
||||
-// either, then the path will default to /var/lib/incus/unix.socket.
|
||||
+// either, then the path will default to /run/incus/unix.socket or
|
||||
+// /var/lib/incus/unix.socket.
|
||||
func ConnectIncusUnixWithContext(ctx context.Context, path string, args *ConnectionArgs) (InstanceServer, error) {
|
||||
logger.Debug("Connecting to a local Incus over a Unix socket")
|
||||
|
||||
@@ -180,7 +181,11 @@ func ConnectIncusUnixWithContext(ctx context.Context, path string, args *Connect
|
||||
if path == "" {
|
||||
incusDir := os.Getenv("INCUS_DIR")
|
||||
if incusDir == "" {
|
||||
- incusDir = "/var/lib/incus"
|
||||
+ if util.PathExists("/run/incus") {
|
||||
+ incusDir = "/run/incus"
|
||||
+ } else {
|
||||
+ incusDir = "/var/lib/incus"
|
||||
+ }
|
||||
}
|
||||
|
||||
path = filepath.Join(incusDir, "unix.socket")
|
||||
--
|
||||
2.44.0
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 2a84aa00ddab35647636eeedbcf2dbd6c27577cc Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <neal@gompa.dev>
|
||||
Date: Sat, 27 Apr 2024 09:20:35 -0400
|
||||
Subject: [PATCH] cmd/incus/admin_cluster: Add libexec path for incusd
|
||||
|
||||
This is where incusd is installed on Fedora Linux and derivatives,
|
||||
and potentially other distributions that use /usr/libexec for non-path
|
||||
executables.
|
||||
|
||||
Signed-off-by: Neal Gompa <neal@gompa.dev>
|
||||
---
|
||||
cmd/incus/admin_cluster.go | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmd/incus/admin_cluster.go b/cmd/incus/admin_cluster.go
|
||||
index a54bc4f26..b03946cd2 100644
|
||||
--- a/cmd/incus/admin_cluster.go
|
||||
+++ b/cmd/incus/admin_cluster.go
|
||||
@@ -33,7 +33,9 @@ func (c *cmdAdminCluster) Run(cmd *cobra.Command, args []string) {
|
||||
env := getEnviron()
|
||||
path, _ := exec.LookPath("incusd")
|
||||
if path == "" {
|
||||
- if util.PathExists("/usr/lib/incus/incusd") {
|
||||
+ if util.PathExists("/usr/libexec/incus/incusd") {
|
||||
+ path = "/usr/libexec/incus/incusd"
|
||||
+ } else if util.PathExists("/usr/lib/incus/incusd") {
|
||||
path = "/usr/lib/incus/incusd"
|
||||
} else if util.PathExists("/opt/incus/bin/incusd") {
|
||||
path = "/opt/incus/bin/incusd"
|
||||
--
|
||||
2.44.0
|
||||
|
||||
13
incus.spec
13
incus.spec
@@ -10,7 +10,7 @@
|
||||
|
||||
# https://github.com/lxc/incus
|
||||
%global goipath github.com/lxc/incus
|
||||
Version: 6.1.0
|
||||
Version: 6.2
|
||||
|
||||
%gometa
|
||||
|
||||
@@ -22,7 +22,7 @@ Release: 1%{?dist}
|
||||
Summary: Powerful system container and virtual machine manager
|
||||
License: Apache-2.0
|
||||
URL: https://linuxcontainers.org/incus
|
||||
Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-v%{version}.tar.xz
|
||||
Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.xz
|
||||
|
||||
# Systemd units
|
||||
Source101: %{name}.socket
|
||||
@@ -55,12 +55,6 @@ Source202: %{swaggerui_source_baseurl}/swagger-ui-standalone-preset.js#/swa
|
||||
Source203: %{swaggerui_source_baseurl}/swagger-ui.css#/swagger-ui-%{swaggerui_version}.css
|
||||
|
||||
# Patches upstream or proposed upstream
|
||||
## Support correct incusd path
|
||||
### From: https://github.com/lxc/incus/pull/799
|
||||
Patch0001: 0001-cmd-incus-admin_cluster-Add-libexec-path-for-incusd.patch
|
||||
## Support /run/incus
|
||||
### From: https://github.com/lxc/incus/pull/800
|
||||
Patch0002: 0001-client-connection-Add-support-for-the-socket-existin.patch
|
||||
|
||||
# Downstream only patches
|
||||
## Allow offline builds
|
||||
@@ -470,6 +464,9 @@ export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
|
||||
%gopkgfiles
|
||||
|
||||
%changelog
|
||||
* Thu Jun 06 2024 Neal Gompa <ngompa@fedoraproject.org> - 6.2-1
|
||||
- Update to 6.2
|
||||
|
||||
* Thu May 16 2024 Fabian Mettler <dev@maveonair.com> - 6.1.0-1
|
||||
- Update to 6.1.0
|
||||
|
||||
|
||||
2
sources
2
sources
@@ -1,4 +1,4 @@
|
||||
SHA512 (incus-v6.1.0.tar.xz) = 1e4b07801789742597fedb2059fc24153a451d2f680c04722b2c025bc2a2792314d0cb32478dd97c91350388009eb67e4d2de504634c2bda38fac2c660a2873e
|
||||
SHA512 (incus-6.2.tar.xz) = a5a41199b5ec21a6b2abb7ae33d245032db67ec8aedec3eb1cd18236ce39106c25c4a71524d363103c4a6fbe4420368e0fe8763a2eb84afdbf7f069e53312fa7
|
||||
SHA512 (swagger-ui-5.17.2-bundle.js) = de5bc8c2bbb33c37da2a50fdc4c8d60cab3653e4a15bf7799dcd6ec537b97451c39e254d9746dbde9bdaf858ddb203af89c524f9cfce7034252110274606b511
|
||||
SHA512 (swagger-ui-5.17.2-standalone-preset.js) = 1eb3996b1389d825aa7952774d51b98523ced51af17397d4b4103316d925303c803f5556867f26048b19178b28e7ebb51c93cdf16a856cd4ca52f9aab2bd0221
|
||||
SHA512 (swagger-ui-5.17.2.css) = 32f6113a5286ddc0c13ec90c4203e690d81987ce4b21febccbb499df84c8a696881d0cf533fdd2ff262acc87ee7dd283263cc1f50bb5055eb74998e298990fbf
|
||||
|
||||
Reference in New Issue
Block a user