diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/incus/incus.SlackBuild | 24 | ||||
-rw-r--r-- | system/incus/incus.info | 6 | ||||
-rw-r--r-- | system/incus/install_sh.diff | 23 | ||||
-rw-r--r-- | system/incus/rc.incusd.new | 9 |
4 files changed, 52 insertions, 10 deletions
diff --git a/system/incus/incus.SlackBuild b/system/incus/incus.SlackBuild index b493f27072274..ad123234c2f58 100644 --- a/system/incus/incus.SlackBuild +++ b/system/incus/incus.SlackBuild @@ -25,8 +25,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=incus -VERSION=${VERSION:-6.5} -BUILD=${BUILD:-2} +VERSION=${VERSION:-6.6} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -55,6 +55,7 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION +patch -p0 < $CWD/install_sh.diff chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -77,7 +78,7 @@ for tool in fuidshift incus lxc-to-incus lxd-to-incus incusd incus-benchmark inc done # Install -for tool in incus incus-agent incus-user lxd-to-incus; do +for tool in fuidshift incus incus-agent incus-benchmark incus-migrate incus-user lxc-to-incus lxd-to-incus; do install -v -p -Dm755 "bin/$tool" "$PKG/usr/bin/$tool" done install -v -p -Dm755 "bin/incusd" "$PKG/usr/sbin/incusd" @@ -118,7 +119,22 @@ INCUSD_GROUP=$INCUSD_GROUP EOF -mkdir $PKG/etc/rc.d +mkdir -p $PKG/etc/profile.d +cat <<EOF > $PKG/etc/profile.d/incus.sh +# The edk2-ovmf package is required for incus +# so this path should exist + +export INCUS_EDK2_PATH=/usr/share/edk2-ovmf-x64 +EOF +cat <<EOF > $PKG/etc/profile.d/incus.csh +# The edk2-ovmf package is required for incus +# so this path should exist + +setenv INCUS_EDK2_PATH /usr/share/edk2-ovmf-x64 +EOF +chmod a+x $PKG/etc/profile.d/incus.* + +mkdir -p $PKG/etc/rc.d install -m664 $CWD/rc.incusd.new $PKG/etc/rc.d/ # Directory specified in rc.incusd for log file mkdir -p $PKG/var/log/incus diff --git a/system/incus/incus.info b/system/incus/incus.info index f8fa452537d96..dec5d435fd9e6 100644 --- a/system/incus/incus.info +++ b/system/incus/incus.info @@ -1,8 +1,8 @@ PRGNAM="incus" -VERSION="6.5" +VERSION="6.6" HOMEPAGE="https://linuxcontainers.org/incus" -DOWNLOAD="https://github.com/lxc/incus/releases/download/v6.5.0/incus-6.5.tar.xz" -MD5SUM="499d7352183418a854accd55d4f241e0" +DOWNLOAD="https://github.com/lxc/incus/releases/download/v6.6.0/incus-6.6.tar.xz" +MD5SUM="c23d2c6cc8c87fc7f6a1dc81f4dda2b8" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="cowsql edk2-ovmf google-go-lang" diff --git a/system/incus/install_sh.diff b/system/incus/install_sh.diff new file mode 100644 index 0000000000000..d3812e2737d4c --- /dev/null +++ b/system/incus/install_sh.diff @@ -0,0 +1,23 @@ +--- ./internal/server/instance/drivers/agent-loader/install.sh.orig 2024-10-04 00:42:08.000000000 +1000 ++++ ./internal/server/instance/drivers/agent-loader/install.sh 2024-10-08 11:50:40.672819166 +1100 +@@ -31,6 +31,20 @@ + sed -i "s#TARGET#${TARGET}#g" "${TARGET}/systemd/system/incus-agent.service" + sed -i "s#TARGET#${TARGET}#g" "${TARGET}/systemd/incus-agent-setup" + ++# Support incus-agent for non-systemd systems. ++if [ -e /etc/slackware-version ]; then ++ cat <<EOF >>/etc/rc.d/rc.local ++ ++if [ -x /lib/systemd/incus-agent-setup ]; then ++ /lib/systemd/incus-agent-setup ++ if [ -d /run/incus_agent ]; then ++ cd /run/incus_agent && /run/incus_agent/incus-agent & ++ fi ++fi ++ ++EOF ++fi ++ + # Make sure systemd is aware of them. + systemctl daemon-reload + diff --git a/system/incus/rc.incusd.new b/system/incus/rc.incusd.new index ab8637d829f87..ef7ca4aea555c 100644 --- a/system/incus/rc.incusd.new +++ b/system/incus/rc.incusd.new @@ -10,8 +10,8 @@ INCUSD_GROUP=wheel # Use defaults from /etc/default/incusd # (overrides anything set above). # -if [ -r /etc/default/incusd ]; then - . /etc/default/incusd +if [ -r /etc/default/incus ]; then + . /etc/default/incus fi @@ -22,7 +22,10 @@ incusd_start() { } incusd_stop() { - killall /usr/sbin/incusd + if [ "$(pgrep -fc /usr/sbin/incusd)" -gt "0" ]; then + echo "Terminating incusd" + pkill -f /usr/sbin/incusd + fi } incusd_restart() { |