Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new package: incus #47573

Merged
merged 6 commits into from
Jan 23, 2024
Merged

new package: incus #47573

merged 6 commits into from
Jan 23, 2024

Conversation

dkwo
Copy link
Contributor

@dkwo dkwo commented Dec 4, 2023

todo:

  • void docs: mention incus groups and something like echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid

@ahesford
Copy link
Member

I don't think we should drop lxd in this PR.

@dkwo
Copy link
Contributor Author

dkwo commented Dec 26, 2023

when building incus, i need to update raft, which makes it harder to bump dqlite and lxd.
the current lxd is also outdated, and it hasn't been rebuilt with at least go 1.21 as its distfiles have been moved.

@sbromberger
Copy link
Contributor

sbromberger commented Dec 26, 2023

I managed to get incus running on void a couple days ago. here's my runit service if it helps:

run:

#!/bin/sh
exec 2>&1
_systemd_cgrp="/sys/fs/cgroup/systemd"
if [ ! -d ${_systemd_cgrp} ]; then
        mkdir ${_systemd_cgrp}
fi
if ! mountpoint -q "${_systemd_cgrp}"; then
        mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp}
fi

[ -r conf ] && . ./conf
exec /usr/local/bin/incusd --group incus-admin --syslog ${OPTS:- --verbose}

check:

#!/bin/sh
incus config show >/dev/null 2>&1

@dkwo
Copy link
Contributor Author

dkwo commented Dec 27, 2023

Thanks! Updated incus to 0.4, tried to follow upstream recommendations https://linuxcontainers.org/incus/docs/main/packaging/ which also suggests

The incusd and incus-user daemons should be kept outside of the user’s PATH. The same is true of incus-agent which needs to be available in the daemon’s PATH but not be visible to users.

how can i keep those daemons outside of path?

@sbromberger
Copy link
Contributor

how can i keep those daemons outside of path?

Recommendation from folks on #lxc liberachat is to put them in /usr/sbin.

@sbromberger
Copy link
Contributor

Would it be possible to make cowsql a separate PR and get that integrated sooner?

@ahesford
Copy link
Member

Void is usr-merged and doesn't distinguish between root-visible and user-visible executables. If the executables are intended only for execution by other programs, a subdirectory of /usr/libexec is the proper place. Otherwise, just put them in /usr/bin.

@dkwo dkwo changed the title [wip] new package: incus (replaces lxd) new package: incus (replaces lxd) Dec 29, 2023
@dkwo
Copy link
Contributor Author

dkwo commented Dec 29, 2023

thanks, i'm now using libexec.
as for a separate cowsql pr: i had to update raft, and i'm afraid of touching lxd, but i can try.
some serious testing (in particular of runit services) is also welcome.

@dkwo dkwo marked this pull request as ready for review December 29, 2023 22:14
@dkwo
Copy link
Contributor Author

dkwo commented Dec 31, 2023

is it ok to add export PATH=/usr/libexec/incus:$PATH to the services, so that they know where to find incus-agent?

@ahesford
Copy link
Member

is it ok to add export PATH=/usr/libexec/incus:$PATH to the services, so that they know where to find incus-agent?

No. If the programs that use these utilities expect them to be in the system path, then they belong in the standard /usr/bin. Programs that use non-user-visible executables should expect to find these utilities in /usr/libexec without modifications to the search path. If the upstream suggestion is to put them in /usr/sbin to keep them out of the default path of ordinary users (/usr/sbin should always be in the default path of the super user), then the answer on Void is that we make no distinction.

@dkwo dkwo force-pushed the incus branch 5 times, most recently from 5f7cd39 to 2467e8d Compare January 7, 2024 16:27
srcpkgs/incus/template Outdated Show resolved Hide resolved
@classabbyamp
Copy link
Member

squash the two incus commits please

@dkwo
Copy link
Contributor Author

dkwo commented Jan 16, 2024

squashed.

@sbromberger
Copy link
Contributor

Now that this has been approved, what's the process for getting it merged? (Eagerly awaiting not having to have a custom install of incus!)

@ahesford ahesford merged commit 3ef9b20 into void-linux:master Jan 23, 2024
8 checks passed
@sbromberger
Copy link
Contributor

sbromberger commented Jan 24, 2024

Erm. Why is lxc a dependency here? Incus doesn't require it (nor does it strictly require wget and dnsmasq...).

@dkwo
Copy link
Contributor Author

dkwo commented Jan 24, 2024

where do you see wget?
as for lxc, it's surely needed at makedepends, isn't it? are you suggesting to remove lxc and dnsmasq from depends?
can you open pr?

@sbromberger
Copy link
Contributor

sbromberger commented Jan 24, 2024

I think wget may be a transitive dependency (possibly from lxc). I installed incus from scratch on a test void system with only cowsql and raft as dependencies (aside from the ones specified in https://linuxcontainers.org/incus/docs/main/installing/#installing). Specifically, one needs lxc-devel in makedepends but we don't need lxc.

I can try my hand at a PR but I'm unfamiliar with the config files for packaging so I might mess it up. Thanks.

@dkwo dkwo deleted the incus branch January 24, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants