mirror of
https://github.com/weaselshit/incus-rpm.git
synced 2025-12-10 03:21:15 +00:00
Move libexec content to libexecdir
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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
|
||||
|
||||
2
incus.fc
2
incus.fc
@@ -1,6 +1,6 @@
|
||||
/usr/s?bin/incus gen_context(system_u:object_r:container_runtime_exec_t,s0)
|
||||
/usr/s?bin/incus-.* gen_context(system_u:object_r:container_runtime_exec_t,s0)
|
||||
/usr/lib/incus(/.*)? gen_context(system_u:object_r:container_runtime_exec_t,s0)
|
||||
/usr/libexec/incus(/.*)? gen_context(system_u:object_r:container_runtime_exec_t,s0)
|
||||
/usr/lib/systemd/system/incus.* gen_context(system_u:object_r:container_unit_file_t,s0)
|
||||
/var/cache/incus(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0)
|
||||
/var/lib/incus/unix.socket(.*)? -s gen_context(system_u:object_r:container_var_run_t,s0)
|
||||
|
||||
10
incus.spec
10
incus.spec
@@ -54,8 +54,14 @@ Source201: %{swaggerui_source_baseurl}/swagger-ui-bundle.js#/swagger-ui-%{s
|
||||
Source202: %{swaggerui_source_baseurl}/swagger-ui-standalone-preset.js#/swagger-ui-%{swaggerui_version}-standalone-preset.js
|
||||
Source203: %{swaggerui_source_baseurl}/swagger-ui.css#/swagger-ui-%{swaggerui_version}.css
|
||||
|
||||
# Allow offline builds
|
||||
Patch0: incus-0.2-doc-Remove-downloads-from-sphinx-build.patch
|
||||
# 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
|
||||
|
||||
# Downstream only patches
|
||||
## Allow offline builds
|
||||
Patch1001: incus-0.2-doc-Remove-downloads-from-sphinx-build.patch
|
||||
|
||||
%global bashcompletiondir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null || :)
|
||||
%global selinuxtype targeted
|
||||
|
||||
Reference in New Issue
Block a user