Skip to content

Commit ad2d1f6

Browse files
committed
incus: enable installing client without the daemon
incus-client is intended to be installed without the daemon to use to control remove incus servers. incus the daemon can't me used without the client, at least to authorize another client's to access the API. I moved incus-user to the daemon package because it's a daemon and not part of the client. I added incus's generated manpages to the incus-client package. readme: I changed "and" to "or" because the two groups grant you access to the daemons in different privelege levels.
1 parent 33593e6 commit ad2d1f6

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

srcpkgs/incus/files/README.voidlinux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Users wishing to interact with incus system daemons should belong to
2-
the `_incus-admin` and `_incus` groups. The root user should also be
3-
assigned a range of subordinate user and group IDs to be mapped in
2+
either the `_incus-admin` or `_incus` group. The root user should also
3+
be assigned a range of subordinate user and group IDs to be mapped in
44
containers. For example, the command
55

66
usermod --add-subuids 1000000-1065535 \

srcpkgs/incus/template

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Template file for 'incus'
22
pkgname=incus
33
version=6.5.0
4-
revision=1
4+
revision=2
55
build_style=go
66
build_helper=qemu
77
go_import_path=github.com/lxc/incus/v6
@@ -11,7 +11,7 @@ make_check_args="-skip TestConvertNetworkConfig"
1111
hostmakedepends="pkg-config"
1212
makedepends="lxc-devel acl-devel cowsql-devel raft-devel
1313
libcap-devel libuv-devel sqlite-devel eudev-libudev-devel"
14-
depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
14+
depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs ${pkgname}-client-${version}_${revision}"
1515
short_desc="Powerful system container and virtual machine manager"
1616
maintainer="dkwo <[email protected]>"
1717
license="Apache-2.0"
@@ -38,6 +38,7 @@ post_install() {
3838
vinstall "${f}" 700 usr/libexec/incus && rm "${f}"
3939
done
4040
vsv incus
41+
vsv incus-user
4142

4243
# avoid conflict with lxd, lxd-lts
4344
mv ${DESTDIR}/usr/bin/{fuidshift,fuidshift-incus}
@@ -46,24 +47,43 @@ post_install() {
4647
chmod 700 ${DESTDIR}/usr/bin/${_tool}
4748
done
4849

49-
# generate shell completions
50+
#path to run incus commands in build
5051
local _incus=${DESTDIR}/usr/bin/incus
52+
53+
# generate shell completions
5154
for _shell in bash fish zsh; do
5255
vtargetrun ${_incus} completion ${_shell} > scripts/${_shell}-completion
5356
done
5457

58+
#generate manpages and rename files to match the manpage's internal references
59+
mkdir ${wrksrc}/man
60+
vtargetrun ${_incus} manpage --all --format=man "${wrksrc}/man/"
61+
for _manpage in ${wrksrc}/man/*; do
62+
#CMD.SUBCMD.SUBSUBCMD.1 -> CMD-SUBCMD-SUBSUBCMD-1
63+
rename -a '.' '-' "$_manpage"
64+
done
65+
for _manpage in ${wrksrc}/man/*; do
66+
#CMD-SUBCMD-SUBSUBCMD-1 -> CMD-SUBCMD-SUBSUBCMD.1
67+
rename -l '-' '.' "$_manpage"
68+
done
69+
5570
vdoc "${FILESDIR}/README.voidlinux"
5671
}
5772

5873
incus-client_package() {
5974
short_desc+=" - client"
60-
depends="${sourcepkg}>=${version}_${revision}"
6175
pkg_install() {
6276
vmove usr/bin/incus
63-
vsv incus-user
77+
78+
#install shell completions
6479
for shell in bash fish zsh; do
6580
vcompletion scripts/${shell}-completion ${shell} incus
6681
done
82+
83+
#install manpages
84+
for _manpage in ${wrksrc}/man/*; do
85+
vman "$_manpage"
86+
done
6787
}
6888
}
6989

0 commit comments

Comments
 (0)