summaryrefslogtreecommitdiff
path: root/app-containers/lxd/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-containers/lxd/files')
-rw-r--r--app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch74
-rw-r--r--app-containers/lxd/files/lxd-4.0.9.initd49
-rw-r--r--app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch32
3 files changed, 0 insertions, 155 deletions
diff --git a/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch b/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch
deleted file mode 100644
index d05ff2c81bd9..000000000000
--- a/app-containers/lxd/files/lxd-4.0.9-glibc-2.36-fix.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From cc7bab602e6b967fdd31c5feed0f3f6321c0a0a7 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero@gentoo.org>
-Date: Fri, 13 Jan 2023 21:43:22 +0000
-Subject: [PATCH] Fix syscall wrappers
-
----
- lxd/include/syscall_wrappers.h | 7 ++++---
- lxd/main_nsexec.go | 2 +-
- shared/idmap/shift_linux.go | 2 +-
- 3 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/lxd/include/syscall_wrappers.h b/lxd/include/syscall_wrappers.h
-index 2c28133a8..a6975ab4d 100644
---- a/lxd/include/syscall_wrappers.h
-+++ b/lxd/include/syscall_wrappers.h
-@@ -26,10 +26,10 @@ static inline int lxd_close_range(unsigned int fd, unsigned int max_fd, unsigned
- return syscall(__NR_close_range, fd, max_fd, flags);
- }
-
--static inline int open_tree(int dfd, const char *filename, unsigned int flags)
-+/* static inline int open_tree(int dfd, const char *filename, unsigned int flags)
- {
- return syscall(__NR_open_tree, dfd, filename, flags);
--}
-+}*/
-
- /*
- * mount_setattr()
-@@ -40,7 +40,7 @@ struct lxc_mount_attr {
- __u64 propagation;
- __u64 userns_fd;
- };
--
-+/*
- static inline int mount_setattr(int dfd, const char *path, unsigned int flags,
- struct lxc_mount_attr *attr, size_t size)
- {
-@@ -53,6 +53,7 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd
- return syscall(__NR_move_mount, from_dfd, from_pathname, to_dfd,
- to_pathname, flags);
- }
-+*/
-
- /* arg1 of prctl() */
- #ifndef PR_SCHED_CORE
-diff --git a/lxd/main_nsexec.go b/lxd/main_nsexec.go
-index f11c0d4cb..753024283 100644
---- a/lxd/main_nsexec.go
-+++ b/lxd/main_nsexec.go
-@@ -298,7 +298,7 @@ static char *file_to_buf(char *path, ssize_t *length)
- int mount_detach_idmap(const char *path, int fd_userns)
- {
- __do_close int fd_tree = -EBADF;
-- struct lxc_mount_attr attr = {
-+ struct mount_attr attr = {
- .attr_set = MOUNT_ATTR_IDMAP,
-
- };
-diff --git a/shared/idmap/shift_linux.go b/shared/idmap/shift_linux.go
-index daaf37275..e219ac01c 100644
---- a/shared/idmap/shift_linux.go
-+++ b/shared/idmap/shift_linux.go
-@@ -314,7 +314,7 @@ static int get_userns_fd(void)
- static int create_detached_idmapped_mount(const char *path)
- {
- __do_close int fd_tree = -EBADF, fd_userns = -EBADF;
-- struct lxc_mount_attr attr = {
-+ struct mount_attr attr = {
- .attr_set = MOUNT_ATTR_IDMAP,
- .propagation = MS_SLAVE,
-
---
-2.39.0
-
diff --git a/app-containers/lxd/files/lxd-4.0.9.initd b/app-containers/lxd/files/lxd-4.0.9.initd
deleted file mode 100644
index 7b3d464ea367..000000000000
--- a/app-containers/lxd/files/lxd-4.0.9.initd
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-DAEMON=/usr/sbin/lxd
-PIDFILE=/run/lxd.pid
-
-depend() {
- need net
- need lxcfs
-}
-
-start() {
- ebegin "Starting lxd service"
-
- modprobe -f loop > /dev/null 2>&1
-
- # Fix permissions on /var/lib/lxd and make sure it exists.
- # Create a log directory for lxd with correct permissions.
- install -d /var/lib/lxd --group lxd --owner root --mode 0775
- install -d /var/log/lxd --group lxd --owner root
- start-stop-daemon --start \
- --pidfile ${PIDFILE} \
- --exec ${DAEMON} \
- --background \
- --make-pidfile \
- -- \
- ${LXD_OPTIONS}
- eend ${?}
-}
-
-stop() {
- if [ "${RC_CMD}" = restart ]; then
- ebegin "Stopping lxd service (but not containers)"
- # start-stop-daemon sends SIGTERM with a timeout of 5s by default.
- # SIGTERM indicates to LXD that it will be stopped temporarily.
- # Instances will keep running.
- start-stop-daemon --stop --quiet -p "${PIDFILE}"
- eend ${?}
- else
- ebegin "Stopping lxd service and containers, waiting 40s"
- # SIGPWR indicates to LXD that the host is going down.
- # LXD will do a clean shutdown of all instances.
- # After 30s all remaining instances will be killed.
- # We wait up to 40s for LXD.
- start-stop-daemon --stop --quiet -R SIGPWR/40 -p "${PIDFILE}"
- eend ${?}
- fi
-}
diff --git a/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch b/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
deleted file mode 100644
index a8e457387ee6..000000000000
--- a/app-containers/lxd/files/lxd-5.0.2-remove-shellcheck-buildsystem-checks.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Naur a/Makefile b/Makefile
---- a/Makefile 2023-01-16 21:10:45.000000000 -0000
-+++ b/Makefile 2023-01-19 14:52:28.488204725 -0000
-@@ -248,28 +248,6 @@
- .PHONY: build-mo
- build-mo: $(MOFILES)
-
--.PHONY: static-analysis
--static-analysis:
--ifeq ($(shell command -v golangci-lint 2> /dev/null),)
-- go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
--endif
--ifeq ($(shell command -v shellcheck 2> /dev/null),)
-- echo "Please install shellcheck"
-- exit 1
--endif
--ifneq "$(shell shellcheck --version | grep version: | cut -d ' ' -f2)" "0.8.0"
-- @echo "WARN: shellcheck version is not 0.8.0"
--endif
--ifeq ($(shell command -v flake8 2> /dev/null),)
-- echo "Please install flake8"
-- exit 1
--endif
-- golangci-lint run --timeout 5m
-- flake8 test/deps/import-busybox
-- shellcheck --shell sh test/*.sh test/includes/*.sh test/suites/*.sh test/backends/*.sh test/lint/*.sh
-- shellcheck test/extras/*.sh
-- run-parts --regex '.sh' test/lint
--
- .PHONY: tags
- tags: *.go lxd/*.go shared/*.go lxc/*.go
- find . -type f -name '*.go' | xargs gotags > tags