Compare commits
No commits in common. "f508b1ea7f56db1dae6461e314bd3316ee2de836" and "9a4a3f40adf58857ec0428c175b1ace00e5dbc75" have entirely different histories.
f508b1ea7f
...
9a4a3f40ad
@ -1 +0,0 @@
|
|||||||
1
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
|
||||||
FROM git.query.consul/unkin/almalinux9-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
|
||||||
RUN mkdir -p /app/dist
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ARG PACKAGE_RELEASE
|
|
||||||
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|
||||||
ARG PACKAGE_VERSION
|
|
||||||
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
|
||||||
|
|
||||||
COPY scripts /app/scripts
|
|
||||||
COPY resources /app/resources
|
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN dnf install -y \
|
|
||||||
unzip \
|
|
||||||
libtool \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
make \
|
|
||||||
git \
|
|
||||||
go \
|
|
||||||
cowsql-devel \
|
|
||||||
libacl-devel \
|
|
||||||
libcap-devel \
|
|
||||||
libseccomp-devel \
|
|
||||||
libuv-devel \
|
|
||||||
raft-devel \
|
|
||||||
libudev-devel \
|
|
||||||
lxc-devel \
|
|
||||||
libsqlite3x-devel \
|
|
||||||
sqlite-devel \
|
|
||||||
systemd-rpm-macros \
|
|
||||||
bash-completion \
|
|
||||||
gettext \
|
|
||||||
help2man \
|
|
||||||
wget && \
|
|
||||||
wget -O /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz && tar -C /app -xf incus.tar.gz && \
|
|
||||||
wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz && \
|
|
||||||
export PATH=/usr/local/go/bin:$PATH && \
|
|
||||||
pushd /app/incus-${PACKAGE_VERSION} && \
|
|
||||||
make deps && \
|
|
||||||
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/" && \
|
|
||||||
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/" && \
|
|
||||||
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/" && \
|
|
||||||
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" && \
|
|
||||||
make build
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
|
||||||
CMD /app/scripts/build-packages.sh
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Incus - Instance startup
|
|
||||||
After=incus.socket incus.service
|
|
||||||
Requires=incus.socket
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=/usr/libexec/incus/incusd activateifneeded
|
|
||||||
ExecStop=/usr/libexec/incus/shutdown
|
|
||||||
TimeoutStartSec=600s
|
|
||||||
TimeoutStopSec=600s
|
|
||||||
RemainAfterExit=yes
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Incus - User daemon
|
|
||||||
After=incus-user.socket incus.service
|
|
||||||
Requires=incus-user.socket
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/libexec/incus/incus-user --group incus
|
|
||||||
Restart=on-failure
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
Also=incus-user.socket
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Incus - Daemon (user unix socket)
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=/run/incus/unix.socket.user
|
|
||||||
SocketGroup=incus
|
|
||||||
SocketMode=0660
|
|
||||||
Service=incus-user.service
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sockets.target
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Incus - Daemon
|
|
||||||
After=network-online.target openvswitch-switch.service lxcfs.service incus.socket
|
|
||||||
Requires=network-online.target lxcfs.service incus.socket
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Environment=INCUS_OVMF_PATH=/usr/share/edk2/ovmf
|
|
||||||
Environment=INCUS_SOCKET=/run/incus/unix.socket
|
|
||||||
ExecStart=/usr/libexec/incus/incusd --group incus-admin
|
|
||||||
ExecStartPost=/usr/libexec/incus/incusd waitready --timeout=600
|
|
||||||
KillMode=process
|
|
||||||
TimeoutStartSec=600s
|
|
||||||
TimeoutStopSec=30s
|
|
||||||
Restart=on-failure
|
|
||||||
Delegate=yes
|
|
||||||
LimitNOFILE=1048576
|
|
||||||
LimitNPROC=infinity
|
|
||||||
TasksMax=infinity
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
Also=incus-startup.service incus.socket
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Incus - Daemon (unix socket)
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=/run/incus/unix.socket
|
|
||||||
SocketGroup=incus-admin
|
|
||||||
SocketMode=0660
|
|
||||||
Service=incus.service
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sockets.target
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
# nfpm_incus-client.yaml
|
|
||||||
|
|
||||||
name: incus-client
|
|
||||||
version: ${PACKAGE_VERSION}
|
|
||||||
release: ${PACKAGE_RELEASE}
|
|
||||||
arch: amd64
|
|
||||||
platform: linux
|
|
||||||
section: default
|
|
||||||
priority: extra
|
|
||||||
description: "Powerful system container and virtual machine manager."
|
|
||||||
|
|
||||||
maintainer: Incus
|
|
||||||
homepage: https://github.com/lxc/incus
|
|
||||||
license: Apache-2.0
|
|
||||||
|
|
||||||
disable_globbing: false
|
|
||||||
|
|
||||||
replaces:
|
|
||||||
- incus-client
|
|
||||||
|
|
||||||
recommends:
|
|
||||||
- incus-tools
|
|
||||||
|
|
||||||
# Files to include in the package
|
|
||||||
contents:
|
|
||||||
- src: /root/go/bin/incus
|
|
||||||
dst: /usr/bin/incus
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
|
|
||||||
# Scripts to run during installation/removal (optional)
|
|
||||||
# scripts:
|
|
||||||
# postinstall: ./scripts/postinstall.sh
|
|
||||||
# postremove: ./scripts/postremove.sh
|
|
||||||
# preinstall: ./scripts/preinstall.sh
|
|
||||||
# preremove: ./scripts/preremove.sh
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
# nfpm_incus-tools.yaml
|
|
||||||
|
|
||||||
name: incus-tools
|
|
||||||
version: ${PACKAGE_VERSION}
|
|
||||||
release: ${PACKAGE_RELEASE}
|
|
||||||
arch: amd64
|
|
||||||
platform: linux
|
|
||||||
section: default
|
|
||||||
priority: extra
|
|
||||||
description: "Powerful system container and virtual machine manager."
|
|
||||||
|
|
||||||
maintainer: Incus
|
|
||||||
homepage: https://github.com/lxc/incus
|
|
||||||
license: Apache-2.0
|
|
||||||
|
|
||||||
disable_globbing: false
|
|
||||||
|
|
||||||
replaces:
|
|
||||||
- incus-tools
|
|
||||||
|
|
||||||
# Files to include in the package
|
|
||||||
contents:
|
|
||||||
- src: /root/go/bin/incus-benchmark
|
|
||||||
dst: /usr/bin/incus-benchmark
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /root/go/bin/incus-migrate
|
|
||||||
dst: /usr/bin/incus-migrate
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /root/go/bin/incus-agent
|
|
||||||
dst: /usr/bin/incus-agent
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /root/go/bin/lxc-to-incus
|
|
||||||
dst: /usr/bin/lxc-to-incus
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /root/go/bin/lxd-to-incus
|
|
||||||
dst: /usr/bin/lxd-to-incus
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
|
|
||||||
# Scripts to run during installation/removal (optional)
|
|
||||||
# scripts:
|
|
||||||
# postinstall: ./scripts/postinstall.sh
|
|
||||||
# postremove: ./scripts/postremove.sh
|
|
||||||
# preinstall: ./scripts/preinstall.sh
|
|
||||||
# preremove: ./scripts/preremove.sh
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
# nfpm_incus.yaml
|
|
||||||
|
|
||||||
name: incus
|
|
||||||
version: ${PACKAGE_VERSION}
|
|
||||||
release: ${PACKAGE_RELEASE}
|
|
||||||
arch: amd64
|
|
||||||
platform: linux
|
|
||||||
section: default
|
|
||||||
priority: extra
|
|
||||||
description: "Powerful system container and virtual machine manager."
|
|
||||||
|
|
||||||
maintainer: Incus
|
|
||||||
homepage: https://github.com/lxc/incus
|
|
||||||
license: Apache-2.0
|
|
||||||
|
|
||||||
disable_globbing: false
|
|
||||||
|
|
||||||
replaces:
|
|
||||||
- incus
|
|
||||||
|
|
||||||
depends:
|
|
||||||
- incus-client
|
|
||||||
- lxcfs
|
|
||||||
- cowsql
|
|
||||||
- raft
|
|
||||||
|
|
||||||
recommends:
|
|
||||||
- incus-tools
|
|
||||||
|
|
||||||
# Files to include in the package
|
|
||||||
contents:
|
|
||||||
- src: /root/go/bin/incusd
|
|
||||||
dst: /usr/libexec/incus/incusd
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /root/go/bin/incus-user
|
|
||||||
dst: /usr/libexec/incus/incus-user
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/shutdown
|
|
||||||
dst: /usr/libexec/incus/shutdown
|
|
||||||
file_info:
|
|
||||||
mode: 0755
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/incus.service
|
|
||||||
dst: /usr/lib/systemd/system/incus.service
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/incus.socket
|
|
||||||
dst: /usr/lib/systemd/system/incus.socket
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/incus-user.service
|
|
||||||
dst: /usr/lib/systemd/system/incus-user.service
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/incus-user.socket
|
|
||||||
dst: /usr/lib/systemd/system/incus-user.socket
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/incus-startup.service
|
|
||||||
dst: /usr/lib/systemd/system/incus-startup.service
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/sysusers.d.incus.conf
|
|
||||||
dst: /usr/lib/sysusers.d/incus.conf
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
- src: /app/resources/tmpfiles.d.incus.conf
|
|
||||||
dst: /usr/lib/tmpfiles.d/incus.conf
|
|
||||||
file_info:
|
|
||||||
mode: 0644
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
|
|
||||||
# Scripts to run during installation/removal (optional)
|
|
||||||
scripts:
|
|
||||||
postinstall: ./scripts/postinstall.sh
|
|
||||||
preremove: ./scripts/preremove.sh
|
|
||||||
postremove: ./scripts/postremove.sh
|
|
||||||
preinstall: ./scripts/preinstall.sh
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/sh
|
|
||||||
|
|
||||||
if ! systemctl -q is-active incus.service; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /usr/lib/incus/incusd shutdown
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
g incus-admin -
|
|
||||||
g incus -
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
d /var/cache/incus 0700 root root - -
|
|
||||||
d /var/log/incus 0700 root root - -
|
|
||||||
d /var/lib/incus 0711 root root - -
|
|
||||||
d /run/incus 0711 root root - -
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
nfpm pkg --config /app/resources/nfpm_incus.yaml --target /app/dist --packager rpm && \
|
|
||||||
nfpm pkg --config /app/resources/nfpm_incus-client.yaml --target /app/dist --packager rpm && \
|
|
||||||
nfpm pkg --config /app/resources/nfpm_incus-tools.yaml --target /app/dist --packager rpm
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
systemctl daemon-reload
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
systemctl daemon-reload
|
|
||||||
rm -rf /usr/libexec/incus
|
|
||||||
groupdel incus-admin
|
|
||||||
groupdel incus
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
mkdir -p /usr/libexec/incus/
|
|
||||||
groupadd --system incus-admin
|
|
||||||
groupadd --system incus
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
systemctl stop incus.service
|
|
||||||
systemctl stop incus.socket
|
|
||||||
systemctl stop incus-user.service
|
|
||||||
systemctl stop incus-user.socket
|
|
||||||
systemctl stop incus-startup.service
|
|
||||||
Loading…
Reference in New Issue
Block a user