-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add option to use pkgctl build
instead of makepkg
or similar
#838
Comments
( |
Thanks for the suggestion guys, I've been out of town and this is the first I've heard of |
I just gave it a shot and I think this is a good development. As you suggested, I will start by adding support for this in config only, as a list of packages that should be built via |
I know aurutils manages to set up chroots pretty quickly, but it also doesn't use I don't use Arch often anymore, but I want to note that aurutils's chroot building has been consistently reliable every time I've used it. (I don't have experience with |
|
I haven't tested it with a lot of builds, but with the few that I have done (a few rebuilds of packages / set of packages), it seemed like your very first I guess for some cases you could have it do the slightly dirty "keep reusing the chroot" method, like what's listed here: https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Handling_major_rebuilds Though that's probably more work than it's worth... |
@fosskers, I'd be curious how See also for aurutils's rationale behind EDIT 2: |
Thanks for the follow-up guys. Indeed I only tried it once - subsequent chroot setups might have been much faster. I will begin implementing this tomorrow. |
Notes on the linked
Here are # The pacman configuration in the chroot may contain a local repository that
# is not configured on the host. Therefore, $db_name is only used for the
# default paths below when specified on the command-line or through `AUR_REPO`.
if [[ -v suffix ]]; then
default_pacman_paths=("$etcdir/pacman-$suffix.conf"
"$etcdir/pacman-$machine.conf"
"$shrdir/pacman.conf.d/$suffix.conf"
"$shrdir/pacman.conf.d/aurutils-$machine.conf")
default_makepkg_paths=("$etcdir/makepkg-$suffix.conf"
"$etcdir/makepkg-$machine.conf"
"$shrdir/makepkg.conf.d/$suffix.conf"
"$shrdir/makepkg.conf.d/$machine.conf") The first candidate that exists is used. Also note that aurutils used to support pacman_config="@pkgdatadir@/pacman.conf.d/${repo}.conf"
if [[ -f @pkgdatadir@/pacman.conf.d/${repo}-${arch}.conf ]]; then
pacman_config="@pkgdatadir@/pacman.conf.d/${repo}-${arch}.conf"
fi
makepkg_config="@pkgdatadir@/makepkg.conf.d/${arch}.conf"
if [[ -f @pkgdatadir@/makepkg.conf.d/${repo}-${arch}.conf ]]; then
makepkg_config="@pkgdatadir@/makepkg.conf.d/${repo}-${arch}.conf"
fi Support for chroot-specific configs was committed on 2019-08-09 and first released in 20190821, so I'm not sure why Alad brought this up as a difference, aside from aurutils's deprecated
I don't see how this is accomplished. Though, I did find that # bind mount file:// paths to container (#461)
# required for update/build steps
while read -r key _ value; do
case $key=$value in
Server=file://*)
bindmounts_rw+=("${value#file://}") ;;
esac
done < <(pacman-conf --config "$pacman_conf")
# Architecture-specific Mount
arch_mounts=()
if [[ -f "@pkgdatadir@/mount.d/${arch}" ]]; then
mapfile -t arch_mounts < "@pkgdatadir@/mount.d/${arch}"
fi
for arch_mount in "${arch_mounts[@]}"; do
if [[ $arch_mount = rw* ]]; then
arch_mount=${arch_mount#rw }
in_array "$arch_mount" "${makechrootpkg_args[@]}" || makechrootpkg_args+=("-d" "$arch_mount")
elif [[ $arch_mount = ro* ]]; then
arch_mount=${arch_mount#ro }
in_array "$arch_mount" "${makechrootpkg_args[@]}" || makechrootpkg_args+=("-D" "$arch_mount")
fi
done In any case, that's all specific to bind mounts. I don't see where
Also supported by
I'd hope
This is something
This is something I would appreciate @AladW's thoughts on any & all of this. |
The main motivation for including a custom Dependencies then need to be installed manually into the (working copy of the) container with |
I will forego this level of control for Aura and rely on the default behaviour of
I tried it again this morning, and sure enough subsequent builds are much faster. There is of course the question of the I think I want the transition to |
Done and released as Beta 4. Give it a shot boys. |
Bit of an enhancement thing, more than a few times you'll run into some AUR package that gets really finicky with regards to what's on your system. For those cases, or just in general for better sandboxing, it's really convenient to be able to use the relatively new system of
pkgctl build
to automatically create a proper sandbox within which solely the dependencies for the build get installed, and build the package there.Simply having an option to use
pkgctl
would be a nice improvement for those edgecases, even better if it's able to store a configuration option saying "hey packagefoo
needs pkgctl" to use during the nextaura -Akuax
operation.If
aura
could go further and also handle more complicated cases like chained AUR dependencies, that could be really cool too. I.e. if AUR packagefoo
depends upon packagebar
and it's available both in the main repos and the AUR (or only in the AUR), as far as I know you need to explicitly include the already built packagebar
topkgctl build
with the-I...
option. So if this hypothetical option were able to makeaura
buildbar
first withpkgctl
and thenfoo
withbar
included that would be really cool.The text was updated successfully, but these errors were encountered: