* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/files/
@ 2024-06-01 9:30 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2024-06-01 9:30 UTC (permalink / raw
To: gentoo-commits
commit: ed2270179584f39d12cbb8aa0d181c7a26f009f9
Author: Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sat Jun 1 09:23:55 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jun 1 09:30:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed227017
app-containers/lxd: restore init files from 5763c7144b46
Wit commit 5763c7144b46, some of the older files were dropped that
are still needed. This commit restores them.
Fixes: 5763c7144b46
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36943
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
app-containers/lxd/files/lxd-4.0.0.confd | 23 +++++++++
app-containers/lxd/files/lxd-4.0.0.socket | 12 +++++
app-containers/lxd/files/lxd-4.0.9-r1.service | 23 +++++++++
app-containers/lxd/files/lxd-5.0.2-r1.initd | 59 ++++++++++++++++++++++
.../lxd/files/lxd-containers-4.0.0.service | 16 ++++++
5 files changed, 133 insertions(+)
diff --git a/app-containers/lxd/files/lxd-4.0.0.confd b/app-containers/lxd/files/lxd-4.0.0.confd
new file mode 100644
index 000000000000..68cf344995be
--- /dev/null
+++ b/app-containers/lxd/files/lxd-4.0.0.confd
@@ -0,0 +1,23 @@
+# Group which owns the shared socket
+LXD_OPTIONS+=" --group lxd"
+
+# Enable cpu profiling into the specified file
+#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile"
+
+# Enable memory profiling into the specified file
+#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile"
+
+# Enable debug mode
+#LXD_OPTIONS+=" --debug"
+
+# For debugging, print a complete stack trace every n seconds
+#LXD_OPTIONS+=" --print-goroutines-every 5"
+
+# Enable verbose mode
+#LXD_OPTIONS+=" -v"
+
+# Logfile to log to
+#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log"
+
+# Enable syslog logging
+#LXD_OPTIONS+=" --syslog"
diff --git a/app-containers/lxd/files/lxd-4.0.0.socket b/app-containers/lxd/files/lxd-4.0.0.socket
new file mode 100644
index 000000000000..3207c9453d11
--- /dev/null
+++ b/app-containers/lxd/files/lxd-4.0.0.socket
@@ -0,0 +1,12 @@
+[Unit]
+Description=LXD - unix socket
+Documentation=man:lxd(1)
+
+[Socket]
+ListenStream=/var/lib/lxd/unix.socket
+SocketGroup=lxd
+SocketMode=0660
+Service=lxd.service
+
+[Install]
+WantedBy=sockets.target
diff --git a/app-containers/lxd/files/lxd-4.0.9-r1.service b/app-containers/lxd/files/lxd-4.0.9-r1.service
new file mode 100644
index 000000000000..480940dab7a3
--- /dev/null
+++ b/app-containers/lxd/files/lxd-4.0.9-r1.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=LXD - main daemon
+After=network-online.target lxcfs.service lxd.socket
+Requires=network-online.target lxcfs.service lxd.socket
+Documentation=man:lxd(1)
+
+[Service]
+EnvironmentFile=-/etc/environment
+ExecStart=/usr/sbin/lxd --group lxd --syslog
+ExecStartPost=/usr/sbin/lxd waitready --timeout=600
+ExecStartPre=/bin/mkdir -p /var/log/lxd
+ExecStartPre=/bin/chown -R root:lxd /var/log/lxd
+KillMode=process
+PermissionsStartOnly=true
+TimeoutStartSec=600s
+TimeoutStopSec=30s
+Restart=on-failure
+LimitNOFILE=1048576
+LimitNPROC=infinity
+TasksMax=infinity
+
+[Install]
+Also=lxd-containers.service lxd.socket
diff --git a/app-containers/lxd/files/lxd-5.0.2-r1.initd b/app-containers/lxd/files/lxd-5.0.2-r1.initd
new file mode 100644
index 000000000000..7c74c0fdc308
--- /dev/null
+++ b/app-containers/lxd/files/lxd-5.0.2-r1.initd
@@ -0,0 +1,59 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 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 ${?}
+
+ # Create necessary systemd paths in order for systemd containers to work on openrc host.
+ # /etc/rc.conf should have following values:
+ # rc_cgroup_mode="hybrid"
+ if [ -d /sys/fs/cgroup/unified ] &&
+ [ ! -d /sys/fs/cgroup/systemd ]; then
+ install -d /sys/fs/cgroup/systemd --group lxd --owner root
+ mount -t cgroup -o none,name=systemd systemd /sys/fs/cgroup/systemd
+ fi
+}
+
+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-containers-4.0.0.service b/app-containers/lxd/files/lxd-containers-4.0.0.service
new file mode 100644
index 000000000000..894760c3506b
--- /dev/null
+++ b/app-containers/lxd/files/lxd-containers-4.0.0.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=LXD - container startup/shutdown
+Documentation=man:lxd(1)
+After=lxd.socket lxd.service
+Requires=lxd.socket
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/lxd activateifneeded
+ExecStop=/usr/sbin/lxd shutdown
+TimeoutStartSec=600s
+TimeoutStopSec=600s
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/files/
@ 2023-01-08 6:18 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2023-01-08 6:18 UTC (permalink / raw
To: gentoo-commits
commit: 2b33c4e01bd347ae6fdce2ad634218548cdd1e19
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 8 06:16:57 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Jan 8 06:16:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b33c4e0
app-containers/lxd: edit the latest openrc init.d file again
- remove suggestion for 'rc_cgroup_controllers="yes"' which is the default
value in rc.conf.
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
app-containers/lxd/files/lxd-5.0.2-r1.initd | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/app-containers/lxd/files/lxd-5.0.2-r1.initd b/app-containers/lxd/files/lxd-5.0.2-r1.initd
index 85b27a45e448..7c74c0fdc308 100644
--- a/app-containers/lxd/files/lxd-5.0.2-r1.initd
+++ b/app-containers/lxd/files/lxd-5.0.2-r1.initd
@@ -31,8 +31,7 @@ start() {
# Create necessary systemd paths in order for systemd containers to work on openrc host.
# /etc/rc.conf should have following values:
- # rc_cgroup_mode="hybrid"
- # rc_cgroup_controllers="yes"
+ # rc_cgroup_mode="hybrid"
if [ -d /sys/fs/cgroup/unified ] &&
[ ! -d /sys/fs/cgroup/systemd ]; then
install -d /sys/fs/cgroup/systemd --group lxd --owner root
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/files/
@ 2023-01-07 13:16 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2023-01-07 13:16 UTC (permalink / raw
To: gentoo-commits
commit: 61e6146248d24f24ead8828d5db13cd468670b9b
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 7 13:15:33 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jan 7 13:15:33 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61e61462
app-containers/lxd: update Copyright year to 2023 in the init.d file
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
app-containers/lxd/files/lxd-5.0.2-r1.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app-containers/lxd/files/lxd-5.0.2-r1.initd b/app-containers/lxd/files/lxd-5.0.2-r1.initd
index 288729a6831c..85b27a45e448 100644
--- a/app-containers/lxd/files/lxd-5.0.2-r1.initd
+++ b/app-containers/lxd/files/lxd-5.0.2-r1.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
DAEMON=/usr/sbin/lxd
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/files/
@ 2022-04-16 18:47 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2022-04-16 18:47 UTC (permalink / raw
To: gentoo-commits
commit: 4ec6a7ea315f172b67cf05233dce61b1fac86606
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Apr 16 15:10:56 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 18:47:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ec6a7ea
app-containers/lxd: remove unused files
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/25044
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
app-containers/lxd/files/lxd-4.0.0.initd | 47 ---------------------------
app-containers/lxd/files/lxd-4.0.7-r1.service | 20 ------------
2 files changed, 67 deletions(-)
diff --git a/app-containers/lxd/files/lxd-4.0.0.initd b/app-containers/lxd/files/lxd-4.0.0.initd
deleted file mode 100644
index e6ae971e879f..000000000000
--- a/app-containers/lxd/files/lxd-4.0.0.initd
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 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
- install -d /var/lib/lxd --group lxd --owner root --mode 0775
- 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-4.0.7-r1.service b/app-containers/lxd/files/lxd-4.0.7-r1.service
deleted file mode 100644
index f1e644b95df8..000000000000
--- a/app-containers/lxd/files/lxd-4.0.7-r1.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=LXD - main daemon
-After=network-online.target lxcfs.service lxd.socket
-Requires=network-online.target lxcfs.service lxd.socket
-Documentation=man:lxd(1)
-
-[Service]
-EnvironmentFile=-/etc/environment
-ExecStart=/usr/sbin/lxd --group lxd --syslog
-ExecStartPost=/usr/sbin/lxd waitready --timeout=600
-KillMode=process
-TimeoutStartSec=600s
-TimeoutStopSec=30s
-Restart=on-failure
-LimitNOFILE=1048576
-LimitNPROC=infinity
-TasksMax=infinity
-
-[Install]
-Also=lxd-containers.service lxd.socket
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-01 9:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-01 9:30 [gentoo-commits] repo/gentoo:master commit in: app-containers/lxd/files/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2023-01-08 6:18 Joonas Niilola
2023-01-07 13:16 Joonas Niilola
2022-04-16 18:47 Joonas Niilola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox